king
2024-10-18 b1fc0a89ce16dd14a6dff98c228a308e85a53828
src/utils/utils-custom.js
@@ -3100,8 +3100,14 @@
          item.setting.$name = item.$menuname || ''
          let msg = getDataSource(item, mainSearch)
          let roleId = config.uuid
          if (item.wrap && item.wrap.permission === 'false') {
            roleId = ''
          } else if (item.setting.database === 'sso') {
            roleId = ''
          }
          sqls.push({uuid: item.uuid, type: 'datasource', ...msg})
          sqls.push({uuid: item.uuid, roleId: roleId, type: 'datasource', ...msg})
        } else if (item.setting && item.setting.useMSearch === 'true') {
          let searches = item.search || []
          if (mainSearch.length > 0) {
@@ -3226,6 +3232,14 @@
  let resetButton = (item, cell, isback) => {
    cell.logLabel = item.$menuname + '-' + cell.label
    let roleId = cell.uuid
    if (item.wrap && item.wrap.permission === 'false') {
      roleId = ''
    } else if (cell.hidden === 'true' || cell.permission === 'false') {
      roleId = ''
    } else if (cell.database === 'sso') {
      roleId = ''
    }
    if (['exec', 'prompt', 'pop', 'form', 'formSubmit'].includes(cell.OpenType)) {
      if (cell.intertype === 'system' || cell.procMode === 'system') { // 系统接口
@@ -3239,11 +3253,11 @@
          let msg = getSysDefaultSql(cell, _item)
          sqls.push({uuid: cell.uuid, type: 'button', ...msg})
          sqls.push({uuid: cell.uuid, roleId: roleId, type: 'button', ...msg})
        } else {
          let msg = getSysDefaultSql(cell, item)
          sqls.push({uuid: cell.uuid, type: 'button', ...msg})
          sqls.push({uuid: cell.uuid, roleId: roleId, type: 'button', ...msg})
        }
      }
      if (cell.callbackType === 'script' && cell.verify && cell.verify.cbScripts) {
@@ -3278,24 +3292,30 @@
      if (cell.intertype === 'system') {
        let msg = getExcelInSql(cell)
        sqls.push({uuid: cell.uuid, type: 'excelIn', ...msg})
        sqls.push({uuid: cell.uuid, roleId: roleId, type: 'excelIn', ...msg})
      }
    } else if (cell.OpenType === 'excelOut') {
      if (cell.intertype === 'system' && cell.verify && cell.verify.dataType === 'custom') {
        let msg = getExcelOutSql(cell, item)
        sqls.push({uuid: cell.uuid, type: 'excelOut', ...msg})
      } else if (cell.intertype === 'system' && cell.verify && item.subtype === 'dualdatacard' && item.setting && item.setting.interType === 'system') {
        let msg = getDoubleExcelOutSql(cell, item)
        sqls.push({uuid: cell.uuid, type: 'excelOut', ...msg})
        sqls.push({uuid: cell.uuid, roleId: roleId, type: 'excelOut', ...msg})
      } else if (cell.intertype === 'system' && cell.verify && item.setting && item.setting.interType === 'system') {
        if (appType === 'mob') {
          cell.pagination = 'false'
        }
        if (item.subtype === 'dualdatacard' || item.setting.laypage !== cell.pagination) {
          let msg = getDoubleExcelOutSql(cell, item)
          sqls.push({uuid: cell.uuid, roleId: roleId, type: 'excelOut', ...msg})
        }
      }
    } else if (cell.OpenType === 'funcbutton') {
      if (cell.funcType === 'print') {
        if (cell.intertype === 'system' && cell.verify && cell.verify.dataType === 'custom') {
          let msg = getPrintSql(cell, item)
  
          sqls.push({uuid: cell.uuid, type: 'print', ...msg})
          sqls.push({uuid: cell.uuid, roleId: roleId, type: 'print', ...msg})
        }
        if (cell.execMode === 'pop' && cell.modal && cell.modal.fields) {
          cell.modal.fields.forEach(form => {
@@ -3314,13 +3334,13 @@
      } else if ((cell.funcType === 'refund' || cell.funcType === 'pay') && cell.payMode === 'system') {
        let msg = getPaySql(cell, item)
        sqls.push({uuid: cell.uuid, type: 'pay', ...msg})
        sqls.push({uuid: cell.uuid, roleId: roleId, type: 'pay', ...msg})
      }
    } else if (cell.OpenType === 'innerpage' || cell.OpenType === 'outerpage') {
      if (cell.pageTemplate === 'pay' && cell.payMode === 'system') {
        let msg = getPaySql(cell, item)
        sqls.push({uuid: cell.uuid, type: 'pay', ...msg})
        sqls.push({uuid: cell.uuid, roleId: roleId, type: 'pay', ...msg})
      }
    } else if (cell.OpenType === 'popview') {
      if (cell.config && cell.config.components) {
@@ -5557,8 +5577,11 @@
  let getDoubleExcelOutSql = (btn, component) => {
    let item = fromJS(component).toJS()
    item.search = item.$searches || []
    if (item.subtype === 'dualdatacard') {
      item.columns = [...item.columns, ...item.subColumns]
    }
    item.subtype = 'datacard'
    item.columns = [...item.columns, ...item.subColumns]
    item.setting.laypage = btn.pagination
    item.setting.$name = btn.logLabel || ''