king
2022-07-22 0c439ced2c97905cb2b02f5f689a37b19369fb8a
src/utils/utils-datamanage.js
@@ -13,16 +13,15 @@
   * @param {Number}   pageIndex    页码
   * @param {Number}   pageSize     每页数量
   * @param {String}   BID          上级ID
   * @param {String}   menuType     菜单类型,普通菜单与HS
   * @return {Object}  param
   */
  static getQueryDataParams (setting, arrFields, search = [], orderBy = '', pageIndex = 1, pageSize = 10, BID, menuType, id) {
  static getQueryDataParams (setting, arrFields, search = [], orderBy = '', pageIndex = 1, pageSize = 10, BID, id) {
    let param = null
    if (setting.interType === 'system' || (setting.interType === 'custom' && setting.requestMode === 'system')) {
      param = this.getDefaultQueryParam(setting, arrFields, search, orderBy, pageIndex, pageSize, menuType, id, BID)
      param = this.getDefaultQueryParam(setting, arrFields, search, orderBy, pageIndex, pageSize, id, BID)
    } else {
      param = this.getCustomQueryParam(setting, search, orderBy, pageIndex, pageSize, menuType, id)
      param = this.getCustomQueryParam(setting, search, orderBy, pageIndex, pageSize, id)
    }
    if (BID) {
@@ -39,7 +38,7 @@
  /**
   * @description 获取用户自定义存储过程传参
   */
  static getCustomQueryParam (setting, search, orderBy, pageIndex, pageSize, menuType, id) {
  static getCustomQueryParam (setting, search, orderBy, pageIndex, pageSize, id) {
    let param = Utils.formatCustomMainSearch(search)
    if (orderBy) {
@@ -56,7 +55,7 @@
    if (setting.interType === 'inner' || (setting.interType === 'custom' && setting.requestMode === 'inner')) {
      param.func = setting.innerFunc
    } else {
      if (menuType === 'HS') {
      if (window.GLOB.mkHS) {
        if (setting.sysInterface === 'true' && options.cloudServiceApi) {
          param.rduri = options.cloudServiceApi
        } else if (setting.sysInterface !== 'true') {
@@ -81,7 +80,7 @@
  /**
   * @description 获取系统存储过程 sPC_Get_TableData 的参数
   */
  static getDefaultQueryParam (setting, arrFields, search, orderBy, pageIndex, pageSize, menuType, id, BID) {
  static getDefaultQueryParam (setting, arrFields, search, orderBy, pageIndex, pageSize, id, BID) {
    let param = {
      func: 'sPC_Get_TableData',
      obj_name: 'data',
@@ -263,7 +262,7 @@
    param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
    param.secretkey = Utils.encrypt('', param.timestamp)
    if (menuType === 'HS') { // 云端数据验证
    if (window.GLOB.mkHS) { // 云端数据验证
      param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp)
    }
@@ -273,7 +272,7 @@
  /**
   * @description 获取系统存储过程 sPC_Get_TableData 合计值的参数
   */
  static getStatQueryDataParams (setting, statFields, search, orderBy, BID, menuType) {
  static getStatQueryDataParams (setting, statFields, search, orderBy, BID) {
    let param = {
      func: 'sPC_Get_TableData',
      obj_name: 'data',
@@ -407,7 +406,7 @@
    param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
    param.secretkey = Utils.encrypt('', param.timestamp)
    if (menuType === 'HS') { // 云端数据验证
    if (window.GLOB.mkHS) { // 云端数据验证
      param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp)
    }
@@ -432,14 +431,13 @@
   * @param {Number}   pageIndex    页码
   * @param {Number}   pageSize     每页数量
   * @param {String}   BID          上级ID
   * @param {String}   menuType     菜单类型,普通菜单与HS
   * @return {Object}  param
   */
  static getPrevQueryParams (setting, search = [], BID, menuType) {
  static getPrevQueryParams (setting, search = [], BID) {
    let param = null
    if (setting.procMode !== 'inner') {
      param = this.getDefaultPrevQueryParam(setting, search, menuType, BID)
      param = this.getDefaultPrevQueryParam(setting, search, BID)
    } else {
      param = Utils.formatCustomMainSearch(search)
      param.func = setting.prevFunc || ''
@@ -455,7 +453,7 @@
  /**
   * @description 获取系统前置脚本
   */
  static getDefaultPrevQueryParam (setting, search, menuType, BID) {
  static getDefaultPrevQueryParam (setting, search, BID) {
    let param = {
      func: 'sPC_TableData_InUpDe',
      exec_type: 'y',
@@ -529,7 +527,7 @@
    param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
    param.secretkey = Utils.encrypt('', param.timestamp)
    if (menuType === 'HS') { // 函数 sPC_TableData_InUpDe 云端验证
    if (window.GLOB.mkHS) { // 函数 sPC_TableData_InUpDe 云端验证
      param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp)
    }