king
2022-03-21 fc241324087e605b145e8bbcc4ee3aece61dbf14
src/utils/utils-datamanage.js
@@ -200,9 +200,9 @@
    }
    // 测试系统打印查询语句
    if ((options.sysType === 'local' && !window.GLOB.systemType) || window.debugger === true) {
      _customScript &&  console.info(`${setting.$name ? `/*${setting.$name} 自定义脚本*/\n` : ''}${LText ? '' : '/*不执行默认sql*/\n'}${_customScript}`)
      LText &&  console.info(`${setting.$name ? `/*${setting.$name} 数据源*/\n` : ''}` + LText)
    if (window.GLOB.debugger === true || (window.debugger === true && options.sysType !== 'cloud')) {
      _customScript && console.info(`${setting.$name ? `/*${setting.$name} 自定义脚本*/\n` : ''}${LText ? '' : '/*不执行默认sql*/\n'}${_customScript}`)
      LText && console.info(`${setting.$name ? `/*${setting.$name} 数据源*/\n` : ''}` + LText)
    }
    if (setting.$name) {
@@ -212,6 +212,25 @@
    param.custom_script = Utils.formatOptions(_customScript)
    param.LText = Utils.formatOptions(LText)
    param.DateCount = Utils.formatOptions(DateCount)
    // 多层结构数据
    // LText = `SELECT a.id as bid,a.ID,a.workerCode,a.workerName,a.jobName,a.Initials,case when isnull(m.friend_id ,'') ='' then ''
    // when isnull(m.status,0)=10 then '已添加' else '待通过' end as friend_text
    // ,case when images='' then  'http://epc.mk9h.cn/Content/images/upload/img/kane.jpg'  else images end as icon FROM
    // (select friend_id,status from oa_mail_list where userid='sso202004100959326131C0805998B6745F886F9' and  Initials=case when right('0',1)='0' then Initials else '0'  end
    // and status=10  and deleted=0) m
    //  inner join  (select * from BD_workers where
    //  Initials=case when right('0',1)='0' then Initials else '0' end and deleted=0 ) a
    //  on a.id=m.friend_id `
    // param.custom_script = ''
    // param.LText = Utils.formatOptions(LText)
    // param.DateCount = ''
    // param.prm_field = 'workerCode'
    // param.arr_field = 'workerName,jobName'
    // param.tabid = 'ID'
    // param.parid = 'BID'
    // param.sub_name = 'sub_data'
    // param.sub_field = 'BID,friend_text,icon,Initials'
    // exec_type: 'y' 解码字段:LText、LText1、LText2、custom_script、DateCount
@@ -320,7 +339,7 @@
    }
    // 测试系统打印查询语句
    if ((options.sysType === 'local' && !window.GLOB.systemType) || window.debugger === true) {
    if (window.GLOB.debugger === true || (window.debugger === true && options.sysType !== 'cloud')) {
      _customScript &&  console.info(`${setting.$name ? `/*${setting.$name} 自定义脚本 统计查询*/\n` : ''}${LText ? '' : '/*不执行默认sql*/\n'}${_customScript}`)
      LText &&  console.info(`${setting.$name ? `/*${setting.$name} 数据源 统计查询*/\n` : ''}` + LText)
    }
@@ -443,7 +462,7 @@
      })
      // 测试系统打印查询语句
      if ((options.sysType === 'local' && !window.GLOB.systemType) || window.debugger === true) {
      if (window.GLOB.debugger === true || (window.debugger === true && options.sysType !== 'cloud')) {
        console.info(sql.replace(/\n\s{8}/ig, '\n'))
      }
    }
@@ -518,7 +537,7 @@
    sql = _prevCustomScript + sql
    sql = sql + _backCustomScript
    if ((window.GLOB.systemType !== 'production' && options.sysType !== 'cloud') || window.debugger === true) {
    if (window.GLOB.debugger === true || (window.debugger === true && options.sysType !== 'cloud')) {
      console.info(sql.replace(/\n\s{8}/ig, '\n'))
    }
@@ -676,7 +695,7 @@
  }
  // 测试系统打印查询语句
  if ((options.sysType === 'local' && !window.GLOB.systemType) || window.debugger === true) {
  if (window.GLOB.debugger === true || (window.debugger === true && options.sysType !== 'cloud')) {
    _customScript && console.info(`${setting.$name ? `/*${setting.$name} 自定义脚本(同步查询)*/\n` : ''}${_dataresource ? '' : '/*不执行默认sql*/\n'}${_customScript}`)
    _dataresource && console.info(`${setting.$name ? `/*${setting.$name} 数据源(同步查询)*/\n` : ''}` + _dataresource)
  }