king
2024-02-04 0bbaa727cdfc65622e33e91c4bf694c83f184535
src/utils/utils-datamanage.js
@@ -69,6 +69,12 @@
        } else {
          param.$token = setting.exInterface || ''
        }
      } else if (setting.sysInterface === 'custom') {
        if (window.GLOB.systemType === 'production') {
          param.rduri = setting.proInterface
        } else {
          param.rduri = setting.interface
        }
      } else {
        if (window.GLOB.systemType === 'production' && setting.proInterface) {
          param.rduri = setting.proInterface
@@ -96,7 +102,7 @@
    let param = {
      func: 'sPC_Get_TableData',
      obj_name: 'data',
      exec_type: 'y',
      exec_type: window.GLOB.execType || 'y',
      arr_field: setting.arr_field,
      default_sql: setting.execute ? 'true' : 'false'
    }
@@ -278,9 +284,9 @@
      param.menuname = setting.$name
    }
    param.custom_script = Utils.formatOptions(_customScript)
    param.LText = Utils.formatOptions(LText)
    param.DateCount = Utils.formatOptions(DateCount)
    param.custom_script = Utils.formatOptions(_customScript, param.exec_type)
    param.LText = Utils.formatOptions(LText, param.exec_type)
    param.DateCount = Utils.formatOptions(DateCount, param.exec_type)
    if (setting.sub_field) {
      param.sub_name = setting.subdata
@@ -289,7 +295,7 @@
      param.sub_field = setting.sub_field
    }
    // exec_type: 'y' 解码字段:LText、LText1、LText2、custom_script、DateCount
    // exec_type 解码字段:LText、LText1、LText2、custom_script、DateCount
    param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
    param.secretkey = Utils.encrypt('', param.timestamp)
@@ -308,6 +314,8 @@
      if (setting.tableName === 's_custom_script' && window.GLOB.mainSystemApi) {
        param.rduri = window.GLOB.mainSystemApi
      }
    } else if (window.GLOB.forcedUpdate) {
      param.s_version_up = 'true'
    }
    return param
@@ -320,7 +328,7 @@
    let param = {
      func: 'sPC_Get_TableData',
      obj_name: 'data',
      exec_type: 'y',
      exec_type: window.GLOB.execType || 'y',
      arr_field: statFields.map(col => col.field).join(','),
      default_sql: setting.execute ? 'true' : 'false'
    }
@@ -409,8 +417,8 @@
      param.menuname = setting.$name
    }
    
    param.custom_script = Utils.formatOptions(_customScript)
    param.LText = Utils.formatOptions(LText)
    param.custom_script = Utils.formatOptions(_customScript, param.exec_type)
    param.LText = Utils.formatOptions(LText, param.exec_type)
    param.DateCount = ''
    param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
@@ -512,7 +520,6 @@
/**
 * @description 生成sPC_Get_structured_data请求参数
 * 1、把大接口sPC_Get_structured_data的ltext拆成三份,第一段:@LText1,第二段@LText,第三段@LText2
 */
export function getStructuredParams (params, config, BID) {
  let LText_field = []
@@ -560,8 +567,6 @@
  let param = {
    func: 'sPC_Get_structured_data',
    LText: _LText.join(' union all '),
    LText_field: LText_field.join(' union all '),
    BID: BID,
    username: sessionStorage.getItem('User_Name') || '',
    fullName: sessionStorage.getItem('Full_Name') || ''
@@ -571,12 +576,9 @@
    param.menuname = config.MenuName
  }
  let { LText, LText1, LText2 } = Utils.sPCInUpDeFormatOptions(param.LText)
  param.LText1 = LText1
  param.LText = LText
  param.LText2 = LText2
  param.LText_field = Utils.formatOptions(param.LText_field)
  param.exec_type = window.GLOB.execType || 'y'
  param.LText = Utils.formatOptions(_LText.join(' union all '), param.exec_type)
  param.custom_script = Utils.formatOptions(LText_field.join(' union all '), param.exec_type)
  if (config.cacheUseful === 'true') {
    param.time_type = config.timeUnit
@@ -588,7 +590,7 @@
  }
  param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
  param.secretkey = Utils.encrypt(param.LText, param.timestamp)
  param.secretkey = Utils.encrypt('', param.timestamp)
  return param
}