king
2023-09-18 f561deb896de5754d94d17447f3d87aedcbd3198
Merge branch 'positec' into bms
2个文件已添加
89个文件已修改
2214 ■■■■ 已修改文件
src/api/index.js 69 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/header/index.jsx 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/index.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/calendar/board/index.scss 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/double-data-card/options.jsx 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/form/simple-form/index.jsx 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/form/step-form/index.jsx 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/form/tab-form/index.jsx 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/group/normal-group/index.jsx 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/group/normal-group/index.scss 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/search/main-search/index.jsx 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/share/actioncomponent/formconfig.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/share/pastebasetable/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/share/searchcomponent/index.jsx 23 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/table/edit-table/columns/editColumn/index.jsx 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/table/edit-table/columns/tableIn/customscript/index.jsx 23 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/datasource/index.jsx 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/datasource/verifycard/customscript/index.jsx 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/datasource/verifycard/index.jsx 131 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/datasource/verifycard/settingform/index.jsx 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/datasource/verifycard/utils.jsx 57 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/debug/index.jsx 203 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/debug/index.scss 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/header/index.jsx 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/header/index.scss 51 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/modalconfig/index.jsx 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/pastecontroller/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/picturecontroller/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/replaceField/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/sysinterface/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/tablenodes/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/versions/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/mob/modalconfig/index.jsx 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/mob/searchconfig/index.jsx 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/basetable/index.jsx 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/commontable/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/calendar/board/index.jsx 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/calendar/board/index.scss 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/cardItem/index.jsx 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/double-data-card/index.jsx 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/double-data-card/index.scss 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/table-card/index.jsx 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/carousel/cardItem/index.jsx 35 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/carousel/data-card/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/carousel/prop-card/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/chart/antv-G6/index.jsx 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/chart/antv-X6/index.jsx 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/chart/antv-bar-line/index.jsx 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/chart/antv-pie/index.jsx 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/form/simple-form/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/form/step-form/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/form/tab-form/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/group/normal-group/index.scss 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/module/account/index.jsx 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/module/voucher/saveAsTemp/index.jsx 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/index.jsx 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/popview/index.jsx 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/home/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/subtable/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/actionList/normalbutton/index.jsx 94 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/actionList/tabbutton/index.jsx 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/topSearch/index.jsx 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/modalconfig/index.jsx 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/actioncomponent/verifyexcelin/customscript/index.jsx 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/actioncomponent/verifyexcelin/index.jsx 122 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/actioncomponent/verifyexcelout/customscript/index.jsx 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx 82 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/actioncomponent/verifyexcelout/utils.jsx 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/actioncomponent/verifyprint/index.jsx 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/actioncomponent/verifyprint/utils.jsx 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/searchcomponent/index.jsx 23 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/searchcomponent/searchform/index.jsx 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/settingcomponent/settingform/index.jsx 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/settingcomponent/settingform/simplescript/index.jsx 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/settingcomponent/settingform/utils.jsx 57 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/treesettingcomponent/settingform/index.jsx 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/treesettingcomponent/settingform/utils.jsx 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/formconfig.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/modalform/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/unattended/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/verifycard/callbackcustomscript/index.jsx 33 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/verifycard/customform/index.jsx 31 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/verifycard/customscript/index.jsx 58 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/verifycard/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/utils.js 100 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/menudesign/index.jsx 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/menudesign/index.scss 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mkiframe/index.jsx 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mobdesign/index.scss 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tabledesign/index.jsx 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tabledesign/index.scss 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/index.js
@@ -1067,6 +1067,75 @@
      data: qs.stringify(data)
    })
  }
  /**
   * @description sql检验
   */
  sDebug (sql, rduri = null) {
    let param = {
      func: 's_debug_sql',
      exec_type: 'y',
      timestamp: moment().format('YYYY-MM-DD HH:mm:ss'),
      userid: sessionStorage.getItem('UserID') || '',
      lang: sessionStorage.getItem('lang') || '',
      SessionUid: localStorage.getItem('SessionUid') || '',
      LoginUID: sessionStorage.getItem('LoginUID') || '',
      appkey: window.GLOB.appkey || ''
    }
    if (window.GLOB.externalDatabase !== null) {
      sql = sql.replace(/@db@/ig, window.GLOB.externalDatabase)
    }
    console.info(`/* sql 验证 */\n${sql.replace(/\n\s{6,20}/ig, '\n')}`)
    sql = sql.replace(/\n/ig, ' ')
    param.LText = Utils.formatOptions(sql)
    param.secretkey = Utils.encrypt('', param.timestamp)
    param = this.encryptParam(param)
    let url = '/webapi/dostars'
    if (rduri) {
      url = rduri
    }
    let timer = setTimeout(() => {
      let _param = {
        func: 's_debug_sql_cancel',
        userid: sessionStorage.getItem('UserID') || '',
        lang: sessionStorage.getItem('lang') || '',
        SessionUid: localStorage.getItem('SessionUid') || '',
        LoginUID: sessionStorage.getItem('LoginUID') || '',
        appkey: window.GLOB.appkey || ''
      }
      _param = this.encryptParam(_param)
      axios({
        url: `${url}/s_debug_sql_cancel`,
        method: 'post',
        data: JSON.stringify(_param)
      })
    }, 20000)
    return new Promise(resolve => {
      axios({
        url: `${url}/s_debug_sql`,
        method: 'post',
        data: JSON.stringify(param)
      }).then(res => {
        clearTimeout(timer)
        if (/Shared Memory Provider|会话处于终止状态|当前命令发生了严重错误/.test(res.message)) {
          res.message = '验证失败,请检查SQL中是否存在死循环。'
        }
        resolve(res)
      }, () => {
        clearTimeout(timer)
        resolve({status: false, ErrCode: 'E', message: '验证失败:1请检查SQL中是否存在死循环;2请检查网络连接是否正常。'})
      })
    })
  }
}
export default new Api()
src/components/header/index.jsx
@@ -60,7 +60,7 @@
      if (e.key === 'getSessionStorage' && e.newValue === window.GLOB.appkey) {
        localStorage.setItem('sessionStorage', JSON.stringify(sessionStorage))
      } else if (e.key === 'getSysPermission' && e.newValue === window.GLOB.appkey) {
        localStorage.setItem('sysPermissions', JSON.stringify({mkThdMenus: window.GLOB.mkThdMenus, mkActions: window.GLOB.mkActions}))
        localStorage.setItem('sysPermissions', JSON.stringify({mkThdMenus: this.state.thdMenuList, mkActions: window.GLOB.mkActions}))
      } else if (e.key === 'menuUpdate') {
        let vals = e.newValue.split(',')
        let menuId = vals[1]
@@ -180,13 +180,22 @@
      }
      window.GLOB.mainMenu = mainMenu
      window.GLOB.mkThdMenus = [...thdMenuList, {MenuID: 'home_page_id', EasyCode: '', MenuName: 'home', type: 'CustomPage'}]
      thdMenuList.forEach(item => {
        window.GLOB.mkThdMenus.set(item.MenuID, item)
      })
      window.GLOB.mkThdMenus.set('home_page_id', {MenuID: 'home_page_id', EasyCode: '', MenuName: 'home', type: 'CustomPage'})
      MKEmitter.emit('mainMenuChange')
      if (_menu) {
        this.openTab(_menu, 0)
      }
      setTimeout(() => {
        this.getwork()
      }, 100)
    })
    
    // 获取角色权限, edition_type 接口版本控制 ''、'Y'、'A'
@@ -205,7 +214,7 @@
              _permAction[menu.MenuID] = true
            })
          }
        } else {
        } else if (!/PRIMARY KEY/ig.test(result.message)) {
          notification.error({
            top: 92,
            message: result.message,
@@ -218,6 +227,23 @@
    }, 50)
  }
  getwork = () => {
    if (sessionStorage.getItem('work_grade')) return
    Api.genericInterface({func: 's_get_local_my_worker_v1'}).then(result => {
      sessionStorage.setItem('work_grade', result.work_grade || 0)
      sessionStorage.setItem('work_group', result.work_group || '')
      if (!result.status && sessionStorage.getItem('debug') === 'true') {
        notification.error({
          top: 92,
          message: /s_get_local_my_worker_v1/.test(result.message) ? '职员信息获取失败,请联系管理员。' : result.message,
          duration: 10
        })
      }
    })
  }
  openTab = (menu, times) => {
    if (times > 50) return
    times++
src/index.js
@@ -241,7 +241,6 @@
    let lang = localStorage.getItem(_href + 'lang') || (config.defaultLang !== 'en-US' ? 'zh-CN' : 'en-US')
    sessionStorage.setItem('lang', lang)
    GLOB.mkThdMenus = [] // 三级菜单
    GLOB.mkActions = {}  // 按钮权限集
    Object.defineProperty(GLOB, 'appId', {
@@ -309,6 +308,7 @@
    window.GLOB.CacheData = new Map()    // 存储选中数据
    window.GLOB.SearchBox = new Map()    // 存储搜索条件
    window.GLOB.SyncData = new Map()     // 存储同步查询数据
    window.GLOB.mkThdMenus = new Map()   // 三级菜单
    render(Route)
  })
src/menu/components/calendar/board/index.scss
@@ -4,21 +4,6 @@
  padding: 20px;
  color: rgba(0, 0, 0, 0.85);
  .loading-data {
    position: absolute;
    top: 0;
    left: 20px;
    right: 20px;
    bottom: 0;
    z-index: 2;
    opacity: 0.5;
    background: #ffffff;
    .ant-spin-spinning {
      position: absolute;
      left: 50%;
      top: 270px;
    }
  }
  .mk-calendar-control {
    text-align: right;
    .ant-select {
src/menu/components/card/double-data-card/options.jsx
@@ -60,22 +60,6 @@
      precision: 0,
      required: true
    },
    // {
    //   type: 'radio',
    //   field: 'layout',
    //   label: '卡片布局',
    //   initval: wrap.layout || 'grid',
    //   tooltip: appType === 'mob' ? '弹性布局时,滑动加载无效' : '',
    //   required: false,
    //   options: [
    //     {value: 'grid', label: '栅格布局'},
    //     {value: 'flex', label: '弹性布局'},
    //   ],
    //   controlFields: [
    //     {field: 'printHeight', values: ['flex']},
    //     {field: 'cardFloat', values: ['grid']},
    //   ]
    // },
    {
      type: 'radio',
      field: 'pagestyle',
@@ -127,14 +111,14 @@
      type: 'select',
      field: 'selStyle',
      label: '选中风格',
      initval: wrap.selStyle || 'active',
      tooltip: '存在边框时,边框会使用系统色。',
      initval: wrap.selStyle || 'check',
      // tooltip: '存在边框时,边框会使用系统色。',
      required: false,
      options: [
        {value: 'none', label: '无'},
        {value: 'active', label: '外阴影'},
        {value: 'backFont', label: '背景+文字'},
        {value: 'font', label: '文字'},
        // {value: 'active', label: '外阴影'},
        // {value: 'backFont', label: '背景+文字'},
        // {value: 'font', label: '文字'},
        {value: 'check', label: '勾选(圆框)'},
        {value: 'check square', label: '勾选(方框)'}
      ]
src/menu/components/form/simple-form/index.jsx
@@ -3,7 +3,6 @@
import { is, fromJS } from 'immutable'
import { Popover, Modal, Button, Switch, notification, message } from 'antd'
import { PlusOutlined, SettingOutlined, EditOutlined, ToolOutlined, DeleteOutlined, FontColorsOutlined } from '@ant-design/icons'
import moment from 'moment'
import Api from '@/api'
import asyncComponent from '@/utils/asyncComponent'
@@ -437,26 +436,18 @@
          sqlVerifing: true
        })
        let param = {
          func: 's_debug_sql',
          exec_type: 'y',
          LText: `declare @mk_departmentcode nvarchar(512),@mk_organization nvarchar(512),@mk_user_type nvarchar(20)
            ${res.dataSource}`
        }
        let sql = `declare @mk_departmentcode nvarchar(512),@mk_organization nvarchar(512),@mk_user_type nvarchar(20)
        ${res.dataSource}`
        param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
        param.LText = param.LText.replace(/@\$|\$@/ig, '').replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id)@/ig, `'${param.timestamp}'`)
        param.LText = param.LText.replace(/\n/g, ' ')
        param.LText = Utils.formatOptions(param.LText)
        param.secretkey = Utils.encrypt('', param.timestamp)
        sql = sql.replace(/@\$|\$@/ig, '').replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id)@/ig, `'1949-10-01 15:00:00'`)
        let rduri = ''
        if (window.GLOB.mainSystemApi && res.database === 'sso') {
          param.rduri = window.GLOB.mainSystemApi
          rduri = window.GLOB.mainSystemApi
        }
        
        Api.genericInterface(param).then(result => {
          if (result.status) {
        Api.sDebug(sql, rduri).then(result => {
          if (result.status || result.ErrCode === '-2') {
            this.setState({
              sqlVerifing: false,
              editform: null,
src/menu/components/form/step-form/index.jsx
@@ -3,7 +3,6 @@
import { is, fromJS } from 'immutable'
import { Popover, Modal, Button, Switch, notification, message } from 'antd'
import { PlusOutlined, SettingOutlined, EditOutlined, ToolOutlined, DeleteOutlined, FontColorsOutlined } from '@ant-design/icons'
import moment from 'moment'
import Api from '@/api'
import asyncComponent from '@/utils/asyncComponent'
@@ -539,26 +538,18 @@
          sqlVerifing: true
        })
        let param = {
          func: 's_debug_sql',
          exec_type: 'y',
          LText: `declare @mk_departmentcode nvarchar(512),@mk_organization nvarchar(512),@mk_user_type nvarchar(20)
            ${res.dataSource}`
        }
        let sql = `declare @mk_departmentcode nvarchar(512),@mk_organization nvarchar(512),@mk_user_type nvarchar(20)
        ${res.dataSource}`
        param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
        param.LText = param.LText.replace(/@\$|\$@/ig, '').replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id)@/ig, `'${param.timestamp}'`)
        param.LText = param.LText.replace(/\n/g, ' ')
        sql = sql.replace(/@\$|\$@/ig, '').replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id)@/ig, `'1949-10-01 15:00:00'`)
        
        param.LText = Utils.formatOptions(param.LText)
        param.secretkey = Utils.encrypt('', param.timestamp)
        let rduri = ''
        if (window.GLOB.mainSystemApi && res.database === 'sso') {
          param.rduri = window.GLOB.mainSystemApi
          rduri = window.GLOB.mainSystemApi
        }
        
        Api.genericInterface(param).then(result => {
          if (result.status) {
        Api.sDebug(sql, rduri).then(result => {
          if (result.status || result.ErrCode === '-2') {
            this.setState({
              sqlVerifing: false,
              editform: null,
src/menu/components/form/tab-form/index.jsx
@@ -3,7 +3,6 @@
import { is, fromJS } from 'immutable'
import { Popover, Modal, Button, Switch, notification, message } from 'antd'
import { PlusOutlined, SettingOutlined, EditOutlined, ToolOutlined, DeleteOutlined, FontColorsOutlined } from '@ant-design/icons'
import moment from 'moment'
import Api from '@/api'
import asyncComponent from '@/utils/asyncComponent'
@@ -543,27 +542,19 @@
        this.setState({
          sqlVerifing: true
        })
        let param = {
          func: 's_debug_sql',
          exec_type: 'y',
          LText: `declare @mk_departmentcode nvarchar(512),@mk_organization nvarchar(512),@mk_user_type nvarchar(20)
            ${res.dataSource}`
        }
        param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
        param.LText = param.LText.replace(/@\$|\$@/ig, '').replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id)@/ig, `'${param.timestamp}'`)
        param.LText = param.LText.replace(/\n/g, ' ')
        
        param.LText = Utils.formatOptions(param.LText)
        param.secretkey = Utils.encrypt('', param.timestamp)
        let sql = `declare @mk_departmentcode nvarchar(512),@mk_organization nvarchar(512),@mk_user_type nvarchar(20)
        ${res.dataSource}`
        sql = sql.replace(/@\$|\$@/ig, '').replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id)@/ig, `'1949-10-01 15:00:00'`)
        let rduri = ''
        if (window.GLOB.mainSystemApi && res.database === 'sso') {
          param.rduri = window.GLOB.mainSystemApi
          rduri = window.GLOB.mainSystemApi
        }
        
        Api.genericInterface(param).then(result => {
          if (result.status) {
        Api.sDebug(sql, rduri).then(result => {
          if (result.status || result.ErrCode === '-2') {
            this.setState({
              sqlVerifing: false,
              editform: null,
src/menu/components/group/normal-group/index.jsx
@@ -187,7 +187,6 @@
        } trigger="hover">
          <ToolOutlined />
        </Popover>
        {/* {group.setting && group.setting.print === 'true' ? <Button className="print-button" onClick={this.print}><PrinterOutlined /></Button> : null} */}
        <GroupComponents config={group} handleList={this.updateComponent} deleteCard={this.deleteCard} />
      </div>
    )
src/menu/components/group/normal-group/index.scss
@@ -17,14 +17,6 @@
    padding: 5px;
    background: rgba(255, 255, 255, 0.55);
  }
  .print-button, .print-button:hover, .print-button:focus, .print-button:active {
    position: absolute;
    right: 40px;
    top: 0px;
    border: 0;
    background: transparent;
    color: #bcbcbc;
  }
}
.menu-group-edit-box.padding:before {
  content: ' ';
src/menu/components/search/main-search/index.jsx
@@ -3,7 +3,6 @@
import { is, fromJS } from 'immutable'
import { Modal, notification, Popover, Switch, message } from 'antd'
import { PlusOutlined, EditOutlined, ToolOutlined, DeleteOutlined, FontColorsOutlined } from '@ant-design/icons'
import moment from 'moment'
import Api from '@/api'
import Utils from '@/utils/utils.js'
@@ -256,25 +255,16 @@
          sqlVerifing: true
        })
        let param = {
          func: 's_debug_sql',
          exec_type: 'y',
          LText: res.dataSource
        }
        let sql = res.dataSource
        sql = sql.replace(/@\$|\$@/ig, '').replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id)@/ig, `'1949-10-01 15:00:00'`)
        param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
        param.LText = param.LText.replace(/@\$|\$@/ig, '').replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id)@/ig, `'${param.timestamp}'`)
        param.LText = param.LText.replace(/\n/g, ' ')
        param.LText = Utils.formatOptions(param.LText)
        param.secretkey = Utils.encrypt('', param.timestamp)
        let rduri = ''
        if (window.GLOB.mainSystemApi && res.database === 'sso') {
          param.rduri = window.GLOB.mainSystemApi
          rduri = window.GLOB.mainSystemApi
        }
        
        Api.genericInterface(param).then(result => {
          if (result.status) {
        Api.sDebug(sql, rduri).then(result => {
          if (result.status || result.ErrCode === '-2') {
            this.setState({
              sqlVerifing: false,
              visible: false
src/menu/components/share/actioncomponent/formconfig.jsx
@@ -647,7 +647,7 @@
      type: 'select',
      key: 'popClose',
      label: '关闭后',
      initVal: card.popClose || 'never',
      initVal: card.popClose || 'grid',
      required: true,
      options: [{
        value: 'never',
@@ -1756,7 +1756,7 @@
      type: 'select',
      key: 'popClose',
      label: '关闭后',
      initVal: card.popClose || 'never',
      initVal: card.popClose || 'grid',
      required: true,
      options: [{
        value: 'never',
src/menu/components/share/pastebasetable/index.jsx
@@ -95,7 +95,7 @@
    const { visible } = this.state
    return (
      <div style={{display: 'inline-block'}}>
      <>
        {type === 'page' ? <Button icon="snippets" style={{color: '#1890ff', borderColor: '#1890ff'}} onClick={() => {this.setState({visible: true})}} >粘贴</Button> : <SnippetsOutlined style={{color: 'purple'}} onClick={() => {this.setState({visible: true})}} />}
        <Modal
          title="粘贴"
@@ -108,7 +108,7 @@
        >
          <PasteForm wrappedComponentRef={(inst) => this.pasteFormRef = inst} inputSubmit={this.pasteSubmit}/>
        </Modal>
      </div>
      </>
    )
  }
}
src/menu/components/share/searchcomponent/index.jsx
@@ -2,11 +2,9 @@
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { Modal, notification } from 'antd'
import moment from 'moment'
import MKEmitter from '@/utils/events.js'
import Api from '@/api'
import Utils from '@/utils/utils.js'
import { getSearchForm } from '@/templates/zshare/formconfig'
import SearchForm from '@/templates/sharecomponent/searchcomponent/searchform'
@@ -204,25 +202,16 @@
          sqlVerifing: true
        })
        let param = {
          func: 's_debug_sql',
          exec_type: 'y',
          LText: res.dataSource
        }
        let sql = res.dataSource
        sql = sql.replace(/@\$|\$@/ig, '').replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id)@/ig, `'1949-10-01 15:00:00'`)
        param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
        param.LText = param.LText.replace(/@\$|\$@/ig, '').replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id)@/ig, `'${param.timestamp}'`)
        param.LText = param.LText.replace(/\n/g, ' ')
        param.LText = Utils.formatOptions(param.LText)
        param.secretkey = Utils.encrypt('', param.timestamp)
        let rduri = ''
        if (window.GLOB.mainSystemApi && res.database === 'sso') {
          param.rduri = window.GLOB.mainSystemApi
          rduri = window.GLOB.mainSystemApi
        }
        
        Api.genericInterface(param).then(result => {
          if (result.status) {
        Api.sDebug(sql, rduri).then(result => {
          if (result.status || result.ErrCode === '-2') {
            this.setState({
              sqlVerifing: false,
              searchlist: _searchlist,
src/menu/components/table/edit-table/columns/editColumn/index.jsx
@@ -3,7 +3,6 @@
import { is, fromJS } from 'immutable'
import { Form, Row, Col, Input, Select, InputNumber, Radio, Tooltip, Modal, notification, Popover } from 'antd'
import { QuestionCircleOutlined } from '@ant-design/icons'
import moment from 'moment'
import Api from '@/api'
import Utils from '@/utils/utils.js'
@@ -449,27 +448,19 @@
          this.setState({
            loading: true
          })
          let param = {
            func: 's_debug_sql',
            exec_type: 'y',
            LText: `declare @mk_departmentcode nvarchar(512),@mk_organization nvarchar(512),@mk_user_type nvarchar(20)
              ${values.dataSource}`
          }
          param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
          param.LText = param.LText.replace(/@\$|\$@/ig, '').replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id)@/ig, `'${param.timestamp}'`)
          param.LText = param.LText.replace(/\n/g, ' ')
          param.LText = Utils.formatOptions(param.LText)
          param.secretkey = Utils.encrypt('', param.timestamp)
          let sql = `declare @mk_departmentcode nvarchar(512),@mk_organization nvarchar(512),@mk_user_type nvarchar(20)
          ${values.dataSource}`
          sql = sql.replace(/@\$|\$@/ig, '').replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id)@/ig, `'1949-10-01 15:00:00'`)
          let rduri = ''
          if (window.GLOB.mainSystemApi && values.database === 'sso') {
            param.rduri = window.GLOB.mainSystemApi
            rduri = window.GLOB.mainSystemApi
          }
          
          Api.genericInterface(param).then(result => {
            if (result.status) {
          Api.sDebug(sql, rduri).then(result => {
            if (result.status || result.ErrCode === '-2') {
              this.setState({visible: false, loading: false, formlist: null})
              this.props.submitCol(values)
              this.record = null
src/menu/components/table/edit-table/columns/tableIn/customscript/index.jsx
@@ -2,7 +2,6 @@
import PropTypes from 'prop-types'
import { Form, Row, Col, Button, notification, Modal, Tooltip, Radio, Select, Switch } from 'antd'
import { QuestionCircleOutlined } from '@ant-design/icons'
import moment from 'moment'
import Utils from '@/utils/utils.js'
import Api from '@/api'
@@ -195,23 +194,9 @@
          }
        }
        let param = {
          func: 's_debug_sql',
          exec_type: 'y',
          LText: this.state.verifySql + _initCustomScript + _prevCustomScript + _backCustomScript + tail
        }
        param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
        param.LText = param.LText.replace(/@\$|\$@/ig, '').replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id)@/ig, `'${param.timestamp}'`)
        param.LText = param.LText.replace(/\n/g, ' ')
        let sql = this.state.verifySql + _initCustomScript + _prevCustomScript + _backCustomScript + tail
        
        // 外联数据库替换
        if (window.GLOB.externalDatabase !== null) {
          param.LText = param.LText.replace(/@db@/ig, window.GLOB.externalDatabase)
        }
        param.LText = Utils.formatOptions(param.LText)
        param.secretkey = Utils.encrypt('', param.timestamp)
        sql = sql.replace(/@\$|\$@/ig, '').replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id)@/ig, `'1949-10-01 15:00:00'`)
        if (skip) {
          this.setState({
@@ -225,8 +210,8 @@
          })
        } else {
          this.setState({loading: true})
          Api.genericInterface(param).then(res => {
            if (res.status) {
          Api.sDebug(sql).then(res => {
            if (res.status || res.ErrCode === '-2') {
              this.setState({
                loading: false,
                editItem: null
src/menu/datasource/index.jsx
@@ -20,14 +20,7 @@
    mainSearch: [],
    visible: false,
    loading: false,
    setting: null,
    record: {}
  }
  UNSAFE_componentWillMount () {
    const { config } = this.props
    this.setState({setting: fromJS(config.setting).toJS()})
  }
  shouldComponentUpdate (nextProps, nextState) {
@@ -227,6 +220,13 @@
      }
      this.setState({loading: false, visible: false})
      if (res.cols) {
        res.cols = [...config.cols, ...res.cols]
      } else {
        delete res.cols
      }
      this.props.updateConfig({...config, ...res})
    }, () => {
      this.setState({loading: false})
src/menu/datasource/verifycard/customscript/index.jsx
@@ -19,7 +19,8 @@
    searches: PropTypes.array,      // 搜索条件
    systemScripts: PropTypes.array, // 系统脚本
    scriptSubmit: PropTypes.func,   // 脚本验证后提交
    scriptsChange: PropTypes.func   // 脚本验证
    scriptsChange: PropTypes.func,
    addProcess: PropTypes.func
  }
  state = {
@@ -40,9 +41,19 @@
        _usefulFields.push(item.field)
        _usefulFields.push(item.datefield)
        _usefulFields.push(item.datefield + '1')
      } else if (['dateweek', 'datemonth', 'daterange'].includes(item.type)) {
      } else if (['dateweek', 'datemonth'].includes(item.type)) {
        _usefulFields.push(item.field)
        _usefulFields.push(item.field + '1')
      } else if (item.type === 'daterange') {
        let _skey = item.field
        let _ekey = item.field + '1'
        if (/,/.test(item.field)) {
          _skey = item.field.split(',')[0]
          _ekey = item.field.split(',')[1]
        }
        _usefulFields.push(_skey)
        _usefulFields.push(_ekey)
      } else if (item.type === 'date' && _usefulFields.includes(item.field)) {
        _usefulFields.push(item.field + '1')
      } else {
@@ -66,9 +77,19 @@
          _usefulFields.push(item.field)
          _usefulFields.push(item.datefield)
          _usefulFields.push(item.datefield + '1')
        } else if (['dateweek', 'datemonth', 'daterange'].includes(item.type)) {
        } else if (['dateweek', 'datemonth'].includes(item.type)) {
          _usefulFields.push(item.field)
          _usefulFields.push(item.field + '1')
        } else if (item.type === 'daterange') {
          let _skey = item.field
          let _ekey = item.field + '1'
          if (/,/.test(item.field)) {
            _skey = item.field.split(',')[0]
            _ekey = item.field.split(',')[1]
          }
          _usefulFields.push(_skey)
          _usefulFields.push(_ekey)
        } else if (item.type === 'date' && _usefulFields.includes(item.field)) {
          _usefulFields.push(item.field + '1')
        } else {
@@ -220,6 +241,9 @@
    if (value === 'defaultsql') {
      value = this.props.defaultsql
    } else if (value === 'flowsql') {
      value = `/* select a.*,w.remark as remark_w,w.statusname as statusname_w,w.status as status_w,w.works_flow_param from (数据源) a inner join (select * from  s_my_works_flow  where works_flow_code=@works_flow_code@ and status=0 and deleted=0) w on a.id=w.works_flow_id */`
      this.props.addProcess()
    }
    _sql = _sql.replace(/\s{6}$/, '')
@@ -341,6 +365,7 @@
                onSelect={this.selectScript}
              >
                <Select.Option style={{whiteSpace: 'normal'}} key="default" value="defaultsql">默认sql</Select.Option>
                {window.GLOB.process ? <Select.Option style={{whiteSpace: 'normal'}} key="default" value="flowsql">默认sql(工作流)</Select.Option> : null}
                <Select.Option key="debugger" value={`z_debug: select @ErrorCode='E',@retmsg='测试断点' goto aaa`}>
                  测试断点
                </Select.Option>
src/menu/datasource/verifycard/index.jsx
@@ -22,6 +22,7 @@
const { TabPane } = Tabs
const { Paragraph } = Typography
const { Search } = Input
const { confirm } = Modal
const CodeMirror = asyncComponent(() => import('@/templates/zshare/codemirror'))
const FieldsComponent = asyncComponent(() => import('@/templates/sharecomponent/fieldscomponent'))
@@ -51,6 +52,7 @@
    reload: false,
    script: null,
    scriptValue: '',
    cols: null,
    colColumns: [
      {
        title: '名称',
@@ -383,7 +385,7 @@
    }
    return new Promise((resolve, reject) => {
      this.sqlverify(resolve, reject, false, scripts)
      this.sqlverify(resolve, reject, 'script', scripts)
    })
  }
@@ -447,7 +449,7 @@
              loading: false
            })
            this.getdefaultSql()
          }, true)
          }, 'change')
        })
      }, () => {
        this.setState({loading: false})
@@ -579,7 +581,7 @@
  submitDataSource = () => {
    const { config, mainSearch } = this.props
    const { activeKey, setting, columns, subColumns, scripts } = this.state
    const { activeKey, setting, columns, subColumns, scripts, cols } = this.state
    if (config.subtype === 'dualdatacard') {
      let arr = columns.map(col => col.field.toLowerCase())
@@ -620,7 +622,7 @@
            defaultSearch: _search,
            setting: res
          }, () => {
            this.sqlverify(() => { resolve({setting: res, columns, subColumns, scripts }) }, reject, false)
            this.sqlverify(() => { resolve({setting: res, columns, subColumns, scripts, cols }) }, reject, 'submit')
          })
        }, () => {
          reject()
@@ -635,7 +637,7 @@
          reject()
          return
        }
        this.sqlverify(() => { resolve({setting, columns, subColumns, scripts }) }, reject, false)
        this.sqlverify(() => { resolve({setting, columns, subColumns, scripts, cols }) }, reject, 'submit')
      } else if (activeKey === 'subcolumns') {
        if (this.subdatasource && this.subdatasource.state.editingKey) {
          notification.warning({
@@ -646,7 +648,7 @@
          reject()
          return
        }
        this.sqlverify(() => { resolve({setting, columns, subColumns, scripts }) }, reject, false)
        this.sqlverify(() => { resolve({setting, columns, subColumns, scripts, cols }) }, reject, 'submit')
      } else if (activeKey === 'scripts') {
        let _loading = false
        if (this.scriptsForm && this.scriptsForm.state.editItem) {
@@ -665,12 +667,12 @@
          return
        }
        this.sqlverify(() => { resolve({setting, columns, subColumns, scripts }) }, reject, false)
        this.sqlverify(() => { resolve({setting, columns, subColumns, scripts, cols }) }, reject, 'submit')
      }
    })
  }
  sqlverify = (resolve, reject, change = false, testScripts) => {
  sqlverify = (resolve, reject, type, testScripts) => {
    const { config } = this.props
    const { columns, setting, scripts, searches, defaultSearch, debugId } = this.state
@@ -679,7 +681,7 @@
    if (testScripts) {
      _scripts = testScripts.filter(item => item.status !== 'false')
    }
    if (!change && setting.interType === 'system' && setting.execute === 'false' && _scripts.length === 0) {
    if (type !== 'change' && setting.interType === 'system' && setting.execute === 'false' && _scripts.length === 0) {
      notification.warning({
        top: 92,
        message: '不执行默认sql时,请添加自定义脚本!',
@@ -689,14 +691,13 @@
      return
    }
    if (change && columns.length === 0) {
    if (type === 'change' && columns.length === 0) {
      reject()
      return
    }
    if ((setting.interType === 'system' && setting.execute !== 'false') || _scripts.length > 0) {
      let timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
      let r = SettingUtils.getDebugSql(setting, _scripts, columns, searches, defaultSearch, config.type, '2023-04-20 15:29:37')
      let r = SettingUtils.getDebugSql(setting, _scripts, columns, searches, defaultSearch, config.type)
      let _debugId = md5(r.sql)
@@ -713,52 +714,31 @@
        })
      }
      let param = {
        func: 's_debug_sql',
        exec_type: 'y',
        LText: r.sql
      }
      param.LText = Utils.formatOptions(param.LText)
      param.timestamp = timestamp
      param.secretkey = Utils.encrypt('', timestamp)
      let sumParam = null
      if (r.sumSql) {
        sumParam = {
          func: 's_debug_sql',
          exec_type: 'y',
          LText: r.sumSql
        }
        sumParam.LText = Utils.formatOptions(sumParam.LText)
        sumParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
        sumParam.secretkey = Utils.encrypt('', sumParam.timestamp)
      }
      Api.genericInterface(param).then(result => {
        if (result.status) {
          if (sumParam) {
            Api.genericInterface(sumParam).then(res => {
              if (res.status) {
                this.setState({debugId: _debugId}, () => {
                  resolve()
                })
              } else {
      Api.sDebug(r.sql).then(result => {
        if (result.status || result.ErrCode === '-2') {
          this.setState({debugId: _debugId}, () => {
            resolve()
          })
        } else {
          if (type === 'submit') {
            Modal.confirm({
              title: result.message,
              okText: '知道了',
              cancelText: '强制保存',
              onOk: () => {
                reject()
                Modal.error({
                  title: res.message
                })
              },
              onCancel() {
                resolve()
              }
            })
          } else {
            this.setState({debugId: _debugId}, () => {
              resolve()
            reject()
            Modal.error({
              title: result.message,
              okText: '知道了'
            })
          }
        } else {
          reject()
          Modal.error({
            title: result.message
          })
        }
      })
    } else {
@@ -799,7 +779,7 @@
    this.setState({loading: true})
    this.sqlverify(() => {this.setState({scripts: _scripts, script: null, scriptValue: '', loading: false})}, () => {this.setState({loading: false})}, false, _scripts)
    this.sqlverify(() => {this.setState({scripts: _scripts, script: null, scriptValue: '', loading: false})}, () => {this.setState({loading: false})}, 'script', _scripts)
  }
  updatefields = (columns) => {
@@ -965,6 +945,49 @@
    message.success('复制成功。')
  }
  addProcess = () => {
    const { config } = this.props
    const { columns } = this.state
    if (config.subtype === 'dualdatacard') return
    let fields = []
    let cols = []
    let _cols = columns.map(item => item.field.toLowerCase())
    if (!_cols.includes('remark_w')) {
      fields.push({ uuid: Utils.getuuid(), label: '备注', field: 'remark_w', datatype: 'Nvarchar(50)', fieldlength: 50, type: 'text' })
      cols.push({ uuid: Utils.getuuid(), Width: 120, label: '备注', field: 'remark_w', type: 'text', Hide: 'false', IsSort: 'false', fieldlength: 50 })
    }
    if (!_cols.includes('statusname_w')) {
      fields.push({ uuid: Utils.getuuid(), label: '状态', field: 'statusname_w', datatype: 'Nvarchar(50)', fieldlength: 50, type: 'text' })
      cols.push({ uuid: Utils.getuuid(), Width: 120, label: '状态', field: 'statusname_w', type: 'text', Hide: 'false', IsSort: 'false', fieldlength: 50 })
    }
    if (!_cols.includes('works_flow_param')) {
      fields.push({ uuid: Utils.getuuid(), label: '流程参数', field: 'works_flow_param', datatype: 'Nvarchar(512)', fieldlength: 512, type: 'text' })
      cols.push({ uuid: Utils.getuuid(), Width: 120, label: '流程参数', field: 'works_flow_param', type: 'text', Hide: 'true', IsSort: 'false', fieldlength: 512 })
    }
    if (fields.length === 0) return
    const that = this
    if (config.subtype !== 'basetable') {
      cols = null
    }
    confirm({
      content: cols ? '显示列中是否添加工作流字段?' : '字段集中是否添加工作流字段?',
      onOk() {
        that.setState({
          cols: cols,
          columns: [...fields, ...columns]
        })
      },
      onCancel() {}
    })
  }
  /**
   * @description 组件销毁,清除state更新
   */
@@ -995,6 +1018,7 @@
              setting={setting}
              scripts={scripts}
              updateStatus={this.updateStatus}
              addProcess={this.addProcess}
              wrappedComponentRef={(inst) => this.settingForm = inst}
            /> : null}
          </TabPane>
@@ -1058,6 +1082,7 @@
              systemScripts={this.state.systemScripts}
              scriptsChange={this.scriptsChange}
              scriptSubmit={this.scriptSubmit}
              addProcess={this.addProcess}
              wrappedComponentRef={(inst) => this.scriptsForm = inst}
            />
            <EditTable actions={['move']} data={scripts} columns={scriptsColumns} onChange={this.changeScripts}/>
src/menu/datasource/verifycard/settingform/index.jsx
@@ -16,6 +16,7 @@
class SettingForm extends Component {
  static propTpyes = {
    updateStatus: PropTypes.func,
    addProcess: PropTypes.func,
    config: PropTypes.object,     // 组件配置
    setting: PropTypes.object,    // 数据源配置
    columns: PropTypes.array,     // 列设置
@@ -183,11 +184,13 @@
  addProcess = () => {
    let _sql = this.props.form.getFieldValue('dataresource')
    _sql = _sql + `\n/* select a.*,case when isnull(w.remark,'')='' then a.remark else w.remark end as remark_w,case when isnull(w.statusname,'')='' then a.statusname else w.statusname end as statusname_w,w.status as status_w  from 数据源 a left join (select * from  s_my_works_flow  where works_flow_code='流程编码' and deleted=0) w on a.id=w.works_flow_id where  isnull(w.status,0)=0 */`
    _sql = _sql + `\n/* select a.*,w.remark as remark_w,w.statusname as statusname_w,w.status as status_w,w.works_flow_param from (数据源) a inner join (select * from  s_my_works_flow  where works_flow_code=@works_flow_code@ and status=0 and deleted=0) w on a.id=w.works_flow_id */`
    this.props.form.setFieldsValue({
      dataresource: _sql
    })
    this.props.addProcess()
  }
  render() {
src/menu/datasource/verifycard/utils.jsx
@@ -7,7 +7,7 @@
   * @return {Object}  setting       页面设置
   * @return {Array}   columns       显示字段
   */
  static getDebugSql (setting, scripts, columns, searches = [], defSearch, type, timestamp) {
  static getDebugSql (setting, scripts, columns, searches = [], defSearch, type) {
    let sql = ''
    let error = ''
    let _dataresource = ''
@@ -47,13 +47,19 @@
      })
    }
    _dataresource = _dataresource.replace(/@(BID|LoginUID|SessionUid|UserID|Appkey|time_id|datam|upid|typename)@/ig, `'${timestamp}'`)
    _customScript = _customScript.replace(/@(BID|LoginUID|SessionUid|UserID|Appkey|time_id|datam|upid|typename)@/ig, `'${timestamp}'`)
    _tailScript = _tailScript.replace(/@(BID|LoginUID|SessionUid|UserID|Appkey|time_id|datam|upid|typename)@/ig, `'${timestamp}'`)
    _dataresource = _dataresource.replace(/@(BID|LoginUID|SessionUid|UserID|Appkey|time_id|datam|upid|typename)@/ig, `'1949-10-01 15:00:00'`)
    _customScript = _customScript.replace(/@(BID|LoginUID|SessionUid|UserID|Appkey|time_id|datam|upid|typename)@/ig, `'1949-10-01 15:00:00'`)
    _tailScript = _tailScript.replace(/@(BID|LoginUID|SessionUid|UserID|Appkey|time_id|datam|upid|typename)@/ig, `'1949-10-01 15:00:00'`)
    _dataresource = _dataresource.replace(/@\$|\$@/ig, '')
    _customScript = _customScript.replace(/@\$|\$@/ig, '')
    _tailScript = _tailScript.replace(/@\$|\$@/ig, '')
    if (window.GLOB.process) {
      _dataresource = _dataresource.replace(/@works_flow_code@/ig, `'1949-10-01 15:00:00'`)
      _customScript = _customScript.replace(/@works_flow_code@/ig, `'1949-10-01 15:00:00'`)
      _tailScript = _tailScript.replace(/@works_flow_code@/ig, `'1949-10-01 15:00:00'`)
    }
    _dataresource = _dataresource.replace(/@select\$|\$select@/ig, '')
    _customScript = _customScript.replace(/@select\$|\$select@/ig, '')
@@ -97,46 +103,53 @@
      if (!item.field) return
      if (item.datefield) {
        _regoptions.push({
          var: new RegExp('@' + item.datefield, 'ig'),
          reg: new RegExp('@' + item.datefield + '@', 'ig')
        })
        _regoptions.push({
          var: new RegExp('@' + item.datefield + '1', 'ig'),
          reg: new RegExp('@' + item.datefield + '1@', 'ig')
        })
      }
      if (['dateweek', 'datemonth', 'daterange', 'range'].includes(item.type)) {
      if (['dateweek', 'datemonth', 'range'].includes(item.type)) {
        _regoptions.push({
          var: new RegExp('@' + item.field, 'ig'),
          reg: new RegExp('@' + item.field + '@', 'ig')
        })
        _regoptions.push({
          var: new RegExp('@' + item.field + '1', 'ig'),
          reg: new RegExp('@' + item.field + '1@', 'ig')
        })
      } else if (item.type === 'daterange') {
        let _skey = item.field
        let _ekey = item.field + '1'
        if (/,/.test(item.field)) {
          _skey = item.field.split(',')[0]
          _ekey = item.field.split(',')[1]
        }
        _regoptions.push({
          reg: new RegExp('@' + _skey + '@', 'ig')
        })
        _regoptions.push({
          reg: new RegExp('@' + _ekey + '@', 'ig')
        })
      } else if (item.type === 'date') {
        if (_fields.includes(item.field)) {
          _regoptions.push({
            var: new RegExp('@' + item.field + '1', 'ig'),
            reg: new RegExp('@' + item.field + '1@', 'ig')
          })
        } else {
          _fields.push(item.field)
          _regoptions.push({
            var: new RegExp('@' + item.field, 'ig'),
            reg: new RegExp('@' + item.field + '@', 'ig')
          })
        }
      } else if (item.type === 'text' || item.type === 'select') {
        item.field.split(',').forEach(field => {
          _regoptions.push({
            var: new RegExp('@' + field, 'ig'),
            reg: new RegExp('@' + field + '@', 'ig')
          })
        })
      } else {
        _regoptions.push({
          var: new RegExp('@' + item.field, 'ig'),
          reg: new RegExp('@' + item.field + '@', 'ig')
        })
      }
@@ -178,31 +191,25 @@
    }
    if (_customScript) {
      sql = `/* sql 验证 */
        ${_customScript}
      sql = `${_customScript}
        ${_dataresource}
        ${_tailScript}
        aaa:
        if @ErrorCode!=''
          insert into tmp_err_retmsg (ID, ErrorCode, retmsg, CreateUserID) select '${timestamp}',@ErrorCode, @retmsg,'${timestamp}'
          insert into tmp_err_retmsg (ID, ErrorCode, retmsg, CreateUserID) select '1949-10-01 15:00:00',@ErrorCode, @retmsg,'1949-10-01 15:00:00'
      `
    } else if (_tailScript) {
      sql = `/* sql 验证 */
        declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(512),@mk_organization nvarchar(512),@mk_user_type nvarchar(20),@mk_nation nvarchar(50),@mk_province nvarchar(50),@mk_city nvarchar(50),@mk_district nvarchar(50),@mk_address nvarchar(100) select @ErrorCode='',@retmsg =''
      sql = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(512),@mk_organization nvarchar(512),@mk_user_type nvarchar(20),@mk_nation nvarchar(50),@mk_province nvarchar(50),@mk_city nvarchar(50),@mk_district nvarchar(50),@mk_address nvarchar(100) select @ErrorCode='',@retmsg =''
        ${_dataresource}
        ${_tailScript}
        aaa:
        if @ErrorCode!=''
          insert into tmp_err_retmsg (ID, ErrorCode, retmsg, CreateUserID) select '${timestamp}',@ErrorCode, @retmsg,'${timestamp}'
          insert into tmp_err_retmsg (ID, ErrorCode, retmsg, CreateUserID) select '1949-10-01 15:00:00',@ErrorCode, @retmsg,'1949-10-01 15:00:00'
      `
    } else {
      sql = `/* sql 验证 */
        declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(512),@mk_organization nvarchar(512),@mk_user_type nvarchar(20),@mk_nation nvarchar(50),@mk_province nvarchar(50),@mk_city nvarchar(50),@mk_district nvarchar(50),@mk_address nvarchar(100) select @ErrorCode='',@retmsg =''
      sql = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(512),@mk_organization nvarchar(512),@mk_user_type nvarchar(20),@mk_nation nvarchar(50),@mk_province nvarchar(50),@mk_city nvarchar(50),@mk_district nvarchar(50),@mk_address nvarchar(100) select @ErrorCode='',@retmsg =''
        ${_dataresource}`
    }
    sql = sql.replace(/\n\s{8}/ig, '\n')
    console.info(sql)
    let errors = []
@@ -247,8 +254,6 @@
        })
      })
    }
    sql = sql.replace(/\n/g, ' ')
    return { error, sql, errors: errors.join(';') }
  }
src/menu/debug/index.jsx
New file
@@ -0,0 +1,203 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
// import { fromJS } from 'immutable'
import { Modal, Button } from 'antd'
// import moment from 'moment'
// import Api from '@/api'
// import Utils from '@/utils/utils.js'
import './index.scss'
class DebugSql extends Component {
  static propTpyes = {
    config: PropTypes.object
  }
  state = {
    visible: false,
    confirming: false,
  }
  trigger = () => {
    // const { config } = this.props
    // let list = []
    // let mainSearch = []
  }
  // formatSearch (config) {
  //   if (!config.search) return []
  //   let values = []
  //   config.search.forEach(item => {
  //     item.hidden = item.Hide === 'true'
  //     item.required = !item.hidden && item.required === 'true'
  //     item.advanced = item.advanced === 'true'
  //     item.$forbid = item.query === 'false'
  //     item.precision = item.precision || 'day'
  //     if (item.type === 'date') { // 时间搜索
  //       let format = 'YYYY-MM-DD'
  //       if (item.precision === 'day') {
  //       } else if (item.precision === 'hour') {
  //         format = 'YYYY-MM-DD HH'
  //       } else if (item.precision === 'minute') {
  //         format = 'YYYY-MM-DD HH:mm'
  //       } else if (item.precision === 'second') {
  //         format = 'YYYY-MM-DD HH:mm:ss'
  //       }
  //       item.initval = item.initval ? moment().subtract(item.initval, 'days').format(format) : ''
  //     } else if (item.type === 'datemonth') {
  //       item.initval = item.initval ? moment().subtract(item.initval, 'month').format('YYYY-MM') : ''
  //     } else if (item.type === 'dateweek') {
  //       item.initval = item.initval ? moment().subtract(item.initval * 7, 'days').format('YYYY-MM-DD') : ''
  //     } else if (item.type === 'daterange') {
  //       let format = 'YYYY-MM-DD'
  //       if (item.precision === 'day') {
  //       } else if (item.precision === 'hour') {
  //         format = 'YYYY-MM-DD HH'
  //       } else if (item.precision === 'minute') {
  //         format = 'YYYY-MM-DD HH:mm'
  //       } else if (item.precision === 'second') {
  //         format = 'YYYY-MM-DD HH:mm:ss'
  //       }
  //       if (item.initval === 'week') {
  //         item.initval = [moment().startOf('week').format(format), moment().endOf('week').format(format)].join(',')
  //       } else if (item.initval === 'month') {
  //         item.initval = [moment().startOf('month').format(format), moment().endOf('month').format(format)].join(',')
  //       } else if (item.initval === 'lastMonth') {
  //         item.initval = [moment().subtract(1, 'months').startOf('month').format(format), moment().subtract(1, 'months').endOf('month').format(format)].join(',')
  //       } else if (item.initval) {
  //         try {
  //           let _initval = JSON.parse(item.initval)
  //           let _vals = [moment().subtract(_initval[0], 'days').format(format), moment().subtract(_initval[1], 'days').format(format)]
  //           item.initval = _vals.join(',')
  //         } catch (e) {
  //           item.initval = ''
  //         }
  //       }
  //     } else if (item.type === 'group') {
  //       if (item.initval && item.initval[0]) {
  //         let _type = item.initval[0]
  //         let _val = item.initval[1]
  //         let _dateRange = ''
  //         if (_type === 'day') {
  //           _dateRange = [moment().subtract(_val, 'days').format('YYYY-MM-DD'),
  //             moment().subtract(_val, 'days').format('YYYY-MM-DD')]
  //         } else if (_type === 'week') {
  //           _dateRange = [moment().subtract(_val * 7, 'days').startOf('week').format('YYYY-MM-DD'),
  //             moment().subtract(_val * 7, 'days').endOf('week').format('YYYY-MM-DD')]
  //         } else if (_type === 'month') {
  //           _dateRange = [moment().subtract(_val, 'month').startOf('month').format('YYYY-MM-DD'),
  //             moment().subtract(_val, 'month').endOf('month').format('YYYY-MM-DD')]
  //         } else if (_type === 'quarter') {
  //           let _differ = parseInt(moment().format('MM')) % 3
  //           let _pdiffer = 0
  //           let _ndiffer = 0
  //           // 差值计算
  //           switch(_differ) {
  //             case 0:
  //               _pdiffer = 2
  //               _ndiffer = 0
  //               break
  //             case 1:
  //               _pdiffer = 0
  //               _ndiffer = -2
  //               break
  //             case 2:
  //               _pdiffer = 1
  //               _ndiffer = -1
  //               break
  //             default:
  //           }
  //           _dateRange = [moment().subtract(_pdiffer + _val * 3, 'month').startOf('month').format('YYYY-MM-DD'),
  //             moment().subtract(_ndiffer + _val * 3, 'month').endOf('month').format('YYYY-MM-DD')]
  //         } else if (_type === 'year') {
  //           let _year = parseInt(moment().format('YYYY')) - _val
  //           _dateRange = [_year + '-01-01', _year + '-12-31']
  //         } else if (_type === 'customized') {
  //           try {
  //             _val = JSON.parse(_val)
  //           } catch (e) {
  //             _val = [0, 0]
  //           }
  //           _dateRange = [moment().subtract(_val[0], 'days').format('YYYY-MM-DD'),
  //             moment().subtract(_val[1], 'days').format('YYYY-MM-DD')]
  //         }
  //         item.initval = _dateRange.join(',')
  //         item.initType = _type
  //       } else {
  //         item.initval = ''
  //         item.initType = ''
  //       }
  //     }
  //     item.oriInitval = item.initval
  //     if (values) {
  //       item.initval = values[item.field] || ''
  //     }
  //     if (item.blacklist && item.blacklist.length > 0 && !item.hidden) {
  //       if (item.blacklist.filter(v => roleId.indexOf(v) > -1).length > 0) {
  //         item.hidden = true
  //         item.required = false
  //       }
  //     }
  //     if (item.required) {
  //       required = true
  //     }
  //     if (item.type === 'text' || item.type === 'select') {
  //       if (/,/.test(item.field)) {
  //         item.field.split(',').forEach(field => {
  //           keys.push(field.toLowerCase())
  //         })
  //       } else {
  //         keys.push(item.field.toLowerCase())
  //       }
  //     } else if (item.type === 'group') {
  //       keys.push(item.field.toLowerCase())
  //       keys.push(item.datefield.toLowerCase())
  //     }
  //     return item
  //   })
  //   config.$s_keys = keys
  //   config.$s_req = required
  // }
  render() {
    const { visible, confirming } = this.state
    return (
      <>
        <Button className="mk-border-yellow" icon="bug" onClick={this.trigger}>调试</Button>
        <Modal
          title="SQL验证"
          wrapClassName="debug-modal"
          visible={visible}
          width={600}
          maskClosable={false}
          onOk={this.submit}
          onCancel={() => { this.setState({ visible: false })}}
          confirmLoading={confirming}
          destroyOnClose
        >
        </Modal>
      </>
    )
  }
}
export default DebugSql
src/menu/debug/index.scss
New file
@@ -0,0 +1,9 @@
.replace-field-modal {
  .ant-modal {
    top: 70px;
  }
  .ant-modal-body {
    min-height: 150px;
    padding-top: 40px;
  }
}
src/menu/header/index.jsx
@@ -1,5 +1,4 @@
import React, {Component} from 'react'
import { is, fromJS } from 'immutable'
import avatar from '@/assets/img/avatar.jpg'
import MainLogo from '@/assets/img/main-logo.png'
@@ -11,21 +10,19 @@
    userName: sessionStorage.getItem('CloudUserName')
  }
  shouldComponentUpdate (nextProps, nextState) {
    return !is(fromJS(this.state), fromJS(nextState))
  }
  render () {
    const { menuName } = this.props
    return (
      <header className="menu-header-container">
        <div className="header-logo"><img src={MainLogo} alt=""/></div>
          <div className="header-setting">
            <img src={this.state.avatar} alt=""/>
            <span>
              <span className="username">{this.state.userName}</span>
            </span>
          </div>
        <div className="menu-name">{menuName}</div>
        <div className="header-setting">
          <img src={this.state.avatar} alt=""/>
          <span>
            <span className="username">{this.state.userName}</span>
          </span>
        </div>
      </header>
    )
  }
src/menu/header/index.scss
@@ -10,7 +10,7 @@
  border-bottom: 1px solid #000;
  .header-logo {
    float: left;
    position: absolute;
    width: 180px;
    line-height: 48px;
    text-align: center;
@@ -22,8 +22,17 @@
      max-height: 40px;
    }
  }
  .menu-name {
    text-align: center;
    color: #ffffff;
    line-height: 45px;
    font-size: 16px;
    margin-left: 40px;
  }
  .header-setting {
    float: right;
    position: absolute;
    right: 0px;
    top: 0px;
    line-height: 48px;
    margin-right: 10px;
    img {
@@ -43,44 +52,6 @@
        text-overflow: ellipsis;
        white-space: nowrap;
      }
    }
  }
  >.ant-menu {
    float: left;
    width: unset;
    .ant-menu-item {
      margin-bottom: 0;
      float: left;
      width: unset;
      cursor: default;
      .anticon-arrow-left {
        height: 24px;
        cursor: pointer;
      }
      .ant-btn {
        color: #fff;
        width: unset;
        cursor: pointer;
        height: 37px;
        background: transparent;
        border: 0;
        .anticon-save {
          margin-right: 0;
        }
      }
      .ant-btn[ant-click-animating-without-extra-node="true"]::after {
        display: none!important;
      }
      .ant-btn::before {
        display: none!important;
      }
    }
    .ant-menu-item.ant-menu-item-selected {
      background-color: transparent;
    }
    .ant-menu-item:not(:last-child) {
      border-right: 1px solid #353535;
    }
  }
}
src/menu/modalconfig/index.jsx
@@ -3,12 +3,10 @@
import { is, fromJS } from 'immutable'
import { DndProvider } from 'react-dnd'
import HTML5Backend from 'react-dnd-html5-backend'
import moment from 'moment'
import { Button, Card, Modal, Collapse, notification, Switch, message } from 'antd'
import { SettingOutlined, CopyOutlined } from '@ant-design/icons'
import Api from '@/api'
import Utils from '@/utils/utils.js'
import { getModalForm } from '@/templates/zshare/formconfig'
import SourceElement from '@/templates/modalconfig/dragelement/source'
@@ -264,26 +262,18 @@
          sqlVerifing: true
        })
        let param = {
          func: 's_debug_sql',
          exec_type: 'y',
          LText: `declare @mk_departmentcode nvarchar(512),@mk_organization nvarchar(512),@mk_user_type nvarchar(20)
            ${res.dataSource}`
        }
        let sql = `declare @mk_departmentcode nvarchar(512),@mk_organization nvarchar(512),@mk_user_type nvarchar(20)
        ${res.dataSource}`
        param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
        param.LText = param.LText.replace(/@\$|\$@/ig, '').replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id)@/ig, `'${param.timestamp}'`)
        param.LText = param.LText.replace(/\n/g, ' ')
        sql = sql.replace(/@\$|\$@/ig, '').replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id)@/ig, `'1949-10-01 15:00:00'`)
        
        param.LText = Utils.formatOptions(param.LText)
        param.secretkey = Utils.encrypt('', param.timestamp)
        let rduri = ''
        if (window.GLOB.mainSystemApi && res.database === 'sso') {
          param.rduri = window.GLOB.mainSystemApi
          rduri = window.GLOB.mainSystemApi
        }
        
        Api.genericInterface(param).then(result => {
          if (result.status) {
        Api.sDebug(sql, rduri).then(result => {
          if (result.status || result.ErrCode === '-2') {
            this.setState({
              sqlVerifing: false,
              config: _config,
src/menu/pastecontroller/index.jsx
@@ -94,7 +94,7 @@
    const { visible } = this.state
    return (
      <div className="mk-view-paste" style={{display: 'inline-block'}}>
      <>
        <Button style={{borderColor: '#40a9ff', color: '#40a9ff'}} onClick={() => {this.setState({visible: true})}}><SnippetsOutlined />粘贴</Button>
        <Modal
          title="粘贴"
@@ -107,7 +107,7 @@
        >
          <PasteForm wrappedComponentRef={(inst) => this.pasteFormRef = inst} inputSubmit={this.pasteSubmit}/>
        </Modal>
      </div>
      </>
    )
  }
}
src/menu/picturecontroller/index.jsx
@@ -261,7 +261,7 @@
    const { visible, editvisible, card, filpictures, filvideos, piclist, vidlist, imageKey, videoKey, pageSize, picIndex, vidIndex, colorlist, iconlist } = this.state
    return (
      <div style={{display: 'inline-block'}}>
      <>
        <Button className="mk-border-purple" onClick={this.trigger}><PictureOutlined /> 资源管理</Button>
        <Modal
          wrapClassName="mk-pop-modal picture-control-model"
@@ -389,7 +389,7 @@
        >
          <EditForm card={card} wrappedComponentRef={(inst) => this.editFormRef = inst} inputSubmit={this.save}/>
        </Modal>
      </div>
      </>
    )
  }
}
src/menu/replaceField/index.jsx
@@ -636,7 +636,7 @@
    const { visible, loadingTable, tables, confirming } = this.state
    return (
      <div className="mk-replace-field" style={{display: 'inline-block'}}>
      <>
        <Button className="mk-border-yellow" icon="swap" loading={loadingTable} onClick={this.trigger}>字段替换</Button>
        <Modal
          title="字段替换"
@@ -651,7 +651,7 @@
        >
          <SettingForm tables={tables} wrappedComponentRef={(inst) => this.settingRef = inst}/>
        </Modal>
      </div>
      </>
    )
  }
}
src/menu/sysinterface/index.jsx
@@ -253,7 +253,7 @@
    const { visible, columns, interfaces } = this.state
    return (
      <div className="mk-sys-interface" style={{display: 'inline-block'}}>
      <>
        <Button className="mk-border-danger" onClick={this.trigger}><DatabaseOutlined /> 公共数据源</Button>
        <Modal
          title="公共数据源"
@@ -272,7 +272,7 @@
          <PlusOutlined key="add-interface" onClick={this.addInterface}/>
          <EditTable key="manage-interface" actions={['copy']} type="interface" data={interfaces} columns={columns} onChange={this.changeScripts}/>
        </Modal>
      </div>
      </>
    )
  }
}
src/menu/tablenodes/index.jsx
@@ -800,7 +800,7 @@
    const { visible, loading, empty } = this.state
    return (
      <div style={{display: 'inline-block'}}>
      <>
        <Button style={{borderColor: '#8E44AD', color: '#8E44AD'}} onClick={this.trigger}><ForkOutlined /> 表关系图</Button>
        <Modal
          title=""
@@ -824,7 +824,7 @@
            <span className="tip">注:点击表名(右侧)可展开/收起菜单,左侧橙色标注为接口或函数名。</span>
          </div>
        </Modal>
      </div>
      </>
    )
  }
}
src/menu/versions/index.jsx
@@ -128,7 +128,7 @@
    const { visible, preconfirming, nextconfirming } = this.state
    return (
      <div style={{display: 'inline-block'}}>
      <>
        <Button style={{borderColor: '#40a9ff', color: '#40a9ff'}} onClick={this.trigger}><CalendarOutlined /> 版本管理</Button>
        <Modal
          title=""
@@ -148,7 +148,7 @@
            <Button key="cancel" onClick={() => { this.setState({ visible: false })}}>取消</Button>
          </div>
        </Modal>
      </div>
      </>
    )
  }
}
src/mob/modalconfig/index.jsx
@@ -3,12 +3,10 @@
import { is, fromJS } from 'immutable'
import { DndProvider } from 'react-dnd'
import HTML5Backend from 'react-dnd-html5-backend'
import moment from 'moment'
import { Button, Modal, Collapse, notification, Switch, message } from 'antd'
import { LeftOutlined } from '@ant-design/icons'
import Api from '@/api'
import Utils from '@/utils/utils.js'
import { getModalForm } from '@/templates/zshare/formconfig'
import SourceElement from '@/templates/modalconfig/dragelement/source'
@@ -261,26 +259,18 @@
          sqlVerifing: true
        })
        let param = {
          func: 's_debug_sql',
          exec_type: 'y',
          LText: `declare @mk_departmentcode nvarchar(512),@mk_organization nvarchar(512),@mk_user_type nvarchar(20)
            ${res.dataSource}`
        }
        let sql = `declare @mk_departmentcode nvarchar(512),@mk_organization nvarchar(512),@mk_user_type nvarchar(20)
        ${res.dataSource}`
        param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
        param.LText = param.LText.replace(/@\$|\$@/ig, '').replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id)@/ig, `'${param.timestamp}'`)
        param.LText = param.LText.replace(/\n/g, ' ')
        sql = sql.replace(/@\$|\$@/ig, '').replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id)@/ig, `'1949-10-01 15:00:00'`)
        
        param.LText = Utils.formatOptions(param.LText)
        param.secretkey = Utils.encrypt('', param.timestamp)
        let rduri = ''
        if (window.GLOB.mainSystemApi && res.database === 'sso') {
          param.rduri = window.GLOB.mainSystemApi
          rduri = window.GLOB.mainSystemApi
        }
        
        Api.genericInterface(param).then(result => {
          if (result.status) {
        Api.sDebug(sql, rduri).then(result => {
          if (result.status || result.ErrCode === '-2') {
            this.setState({
              sqlVerifing: false,
              config: _config,
src/mob/searchconfig/index.jsx
@@ -3,7 +3,6 @@
import { is, fromJS } from 'immutable'
import { DndProvider } from 'react-dnd'
import HTML5Backend from 'react-dnd-html5-backend'
import moment from 'moment'
import { Button, Modal, Collapse, notification, Switch } from 'antd'
import { SettingOutlined, LeftOutlined, SearchOutlined, PlusOutlined } from '@ant-design/icons'
@@ -229,25 +228,16 @@
          sqlVerifing: true
        })
        let param = {
          func: 's_debug_sql',
          exec_type: 'y',
          LText: res.dataSource
        }
        param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
        param.LText = param.LText.replace(/@\$|\$@/ig, '').replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id)@/ig, `'${param.timestamp}'`)
        param.LText = param.LText.replace(/\n/g, ' ')
        let sql = res.dataSource
        sql = sql.replace(/@\$|\$@/ig, '').replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id)@/ig, `'1949-10-01 15:00:00'`)
        
        param.LText = Utils.formatOptions(param.LText)
        param.secretkey = Utils.encrypt('', param.timestamp)
        let rduri = ''
        if (window.GLOB.mainSystemApi && res.database === 'sso') {
          param.rduri = window.GLOB.mainSystemApi
          rduri = window.GLOB.mainSystemApi
        }
        
        Api.genericInterface(param).then(result => {
          if (result.status) {
        Api.sDebug(sql, rduri).then(result => {
          if (result.status || result.ErrCode === '-2') {
            this.setState({
              sqlVerifing: false,
              group: _group,
src/tabviews/basetable/index.jsx
@@ -190,6 +190,10 @@
        })
      }
      if (config.flow_code) {
        regs.push({ reg: /@works_flow_code@/ig, value: config.flow_code })
      }
      config.components = this.filterComponent(config.components, roleId, window.GLOB.mkActions, skip, param, MenuID, config.MenuName, config.process === 'true')
      let autoMatic = null
@@ -416,7 +420,7 @@
    
          if (col.linkmenu && col.linkmenu.length > 0) {
            let menu_id = col.linkmenu.pop()
            col.linkThdMenu = window.GLOB.mkThdMenus.filter(m => m.MenuID === menu_id)[0] || ''
            col.linkThdMenu = window.GLOB.mkThdMenus.get(menu_id) || ''
          } else {
            col.linkThdMenu = ''
          }
src/tabviews/commontable/index.jsx
@@ -349,7 +349,7 @@
          if (col.linkmenu && col.linkmenu.length > 0) {
            let menu_id = col.linkmenu.slice(-1)[0]
            col.linkThdMenu = window.GLOB.mkThdMenus.filter(m => m.MenuID === menu_id)[0] || ''
            col.linkThdMenu = window.GLOB.mkThdMenus.get(menu_id) || ''
          } else {
            col.linkThdMenu = ''
          }
src/tabviews/custom/components/calendar/board/index.jsx
@@ -493,31 +493,29 @@
      MKEmitter.emit('modifyTabs', newtab, true)
    } else if (config.wrap.click === 'menu') {
      let menuId = config.wrap.MenuID || config.wrap.menu.slice(-1)[0]
      let menu = window.GLOB.mkThdMenus.filter(m => m.MenuID === menuId)[0]
      let menuId = config.wrap.menu.slice(-1)[0]
      let menu = null
      if (!menu && config.wrap.MenuName && config.wrap.tabType) {
      if (window.GLOB.mkThdMenus.has(menuId)) {
        menu = {...window.GLOB.mkThdMenus.get(menuId)}
      } else if (config.wrap.MenuID) {
        menu = {
          MenuID: menuId,
          MenuID: config.wrap.MenuID,
          MenuName: config.wrap.MenuName,
          MenuNo: config.wrap.MenuNo || '',
          type: config.wrap.tabType
        }
      }
      if (!menu) return
      let newtab = {
        ...menu,
        param: {$BID: data.$$uuid || ''}
      }
      menu.param = {$BID: data.$$uuid || ''}
      Object.keys(data).forEach(key => {
        if (/^\$/.test(key)) return
        newtab.param[key] = data[key]
        menu.param[key] = data[key]
      })
      MKEmitter.emit('modifyTabs', newtab, true)
      MKEmitter.emit('modifyTabs', menu, true)
    }
  }
src/tabviews/custom/components/calendar/board/index.scss
@@ -4,21 +4,6 @@
  padding: 20px;
  color: rgba(0, 0, 0, 0.85);
  .loading-data {
    position: absolute;
    top: 0;
    left: 20px;
    right: 20px;
    bottom: 0;
    z-index: 2;
    opacity: 0.5;
    background: #ffffff;
    .ant-spin-spinning {
      position: absolute;
      left: 50%;
      top: 270px;
    }
  }
  .mk-calendar-control {
    text-align: right;
    .ant-select {
src/tabviews/custom/components/card/cardItem/index.jsx
@@ -1,7 +1,6 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { notification } from 'antd'
import asyncComponent from '@/utils/asyncComponent'
import MKEmitter from '@/utils/events.js'
@@ -16,10 +15,8 @@
    data: PropTypes.object,
  }
  state = {}
  shouldComponentUpdate (nextProps, nextState) {
    return !is(fromJS(this.props.data), fromJS(nextProps.data))
    return !is(fromJS(this.props), fromJS(nextProps))
  }
  /**
@@ -55,7 +52,6 @@
      let newtab = {
        MenuID: menu.MenuID,
        MenuName: menu.MenuName,
        MenuNo: menu.MenuNo || '',
        type: menu.tabType,
        param: {}
      }
@@ -72,43 +68,34 @@
      MKEmitter.emit('modifyTabs', newtab, true)
    } else if (card.setting.click === 'menu') {
      let menuId = card.setting.MenuID || card.setting.menu.slice(-1)[0]
      let menu = window.GLOB.mkThdMenus.filter(m => m.MenuID === menuId)[0]
      let menuId = card.setting.menu.slice(-1)[0]
      let menu = null
      if (!menu && card.setting.MenuName && card.setting.tabType) {
      if (window.GLOB.mkThdMenus.has(menuId)) {
        menu = {...window.GLOB.mkThdMenus.get(menuId)}
      } else if (card.setting.MenuID) {
        menu = {
          MenuID: menuId,
          MenuID: card.setting.MenuID,
          MenuName: card.setting.MenuName,
          MenuNo: card.setting.MenuNo || '',
          type: card.setting.tabType
        }
      }
      if (!menu) {
        notification.warning({
          top: 92,
          message: '菜单已删除或没有访问权限!',
          duration: 5
        })
        return
      }
      if (!menu) return
      let newtab = {
        ...menu,
        param: {}
      }
      menu.param = {}
      if (card.setting.joint === 'true') {
        newtab.param.$BID = data.$$uuid || ''
        menu.param.$BID = data.$$uuid || ''
        
        Object.keys(data).forEach(key => {
          if (/^\$/.test(key)) return
          if (key === 'children') return
          newtab.param[key] = data[key]
          menu.param[key] = data[key]
        })
      }
      MKEmitter.emit('modifyTabs', newtab, true)
      MKEmitter.emit('modifyTabs', menu, true)
    } else if (card.setting.click === 'link') {
      let src = card.setting.linkurl
src/tabviews/custom/components/card/double-data-card/index.jsx
@@ -1033,36 +1033,34 @@
    if (subcard.setting.click || card.setting.position !== 'inner' || card.setting.click !== 'menu') return
    
    let menuId = card.setting.MenuID || card.setting.menu.slice(-1)[0]
    let menu = window.GLOB.mkThdMenus.filter(m => m.MenuID === menuId)[0]
    let menuId = card.setting.menu.slice(-1)[0]
    let menu = null
    if (!menu && card.setting.MenuName && card.setting.tabType) {
    if (window.GLOB.mkThdMenus.has(menuId)) {
      menu = {...window.GLOB.mkThdMenus.get(menuId)}
    } else if (card.setting.MenuID) {
      menu = {
        MenuID: menuId,
        MenuID: card.setting.MenuID,
        MenuName: card.setting.MenuName,
        MenuNo: card.setting.MenuNo || '',
        type: card.setting.tabType
      }
    }
    if (!menu) return
    let newtab = {
      ...menu,
      param: {}
    }
    menu.param = {}
    if (card.setting.joint === 'true') {
      newtab.param.$BID = item.$$uuid || ''
      menu.param.$BID = item.$$uuid || ''
      
      Object.keys(item).forEach(key => {
        if (/^\$/.test(key)) return
        if (key === 'children') return
        newtab.param[key] = item[key]
        menu.param[key] = item[key]
      })
    }
    MKEmitter.emit('modifyTabs', newtab, true)
    MKEmitter.emit('modifyTabs', menu, true)
  }
  onDoubleClick = (i, subClass) => {
src/tabviews/custom/components/card/double-data-card/index.scss
@@ -22,16 +22,6 @@
      }
    }
  }
  .data-zoom.scale {
    .card-row-list {
      .mk-card:hover {
        >.card-item-box {
          z-index: 1;
          transform: scale(1.05);
        }
      }
    }
  }
  .card-row-list {
    flex: 10;
    max-width: 100%;
@@ -42,24 +32,6 @@
    >.ant-col {
      width: 5%;
      flex: 1;
    }
  }
  .card-row-list.float-center {
    text-align: center;
    >.ant-col {
      display: inline-block;
      float: none;
      text-align: left;
      vertical-align: top;
    }
  }
  .card-row-list.float-right {
    text-align: right;
    >.ant-col {
      display: inline-block;
      float: none;
      text-align: left;
      vertical-align: top;
    }
  }
  .card-item-box {
src/tabviews/custom/components/card/table-card/index.jsx
@@ -462,41 +462,32 @@
  openView = (card, data) => {
    if (card.setting.click === 'menu' && card.setting.menu) {
      let menuId = card.setting.menu.slice(-1)[0]
      let menu = window.GLOB.mkThdMenus.filter(m => m.MenuID === menuId)[0]
      let menu = null
      if (!menu && card.setting.MenuName && card.setting.MenuID) {
      if (window.GLOB.mkThdMenus.has(menuId)) {
        menu = {...window.GLOB.mkThdMenus.get(menuId)}
      } else if (card.setting.MenuID) {
        menu = {
          MenuID: card.setting.MenuID,
          MenuName: card.setting.MenuName,
          MenuNo: card.setting.MenuNo || '',
          type: card.setting.tabType
        }
      }
      if (!menu) {
        notification.warning({
          top: 92,
          message: '菜单已删除或没有访问权限!',
          duration: 5
        })
        return
      }
      if (!menu) return
      let newtab = {
        ...menu,
        param: {}
      }
      menu.param = {}
      if (card.setting.joint === 'true') {
        newtab.param.$BID = data.$$uuid || ''
        menu.param.$BID = data.$$uuid || ''
        Object.keys(data).forEach(key => {
          if (/^\$/.test(key)) return
          newtab.param[key] = data[key]
          menu.param[key] = data[key]
        })
      }
      MKEmitter.emit('modifyTabs', newtab, true)
      MKEmitter.emit('modifyTabs', menu, true)
    } else if (card.setting.click === 'link') {
      let src = card.setting.linkurl
src/tabviews/custom/components/carousel/cardItem/index.jsx
@@ -16,10 +16,6 @@
    data: PropTypes.object,
  }
  state = {
    card: null,            // 卡片信息,包括正反面
  }
  /**
   * @description 搜索条件初始化
   */
@@ -45,29 +41,34 @@
    if (!card.setting.click || data.$disabled) return
    if (card.setting.click === 'menu' && card.setting.MenuID) {
      let menu = {
        MenuID: card.setting.MenuID,
        MenuName: card.setting.MenuName,
        MenuNo: card.setting.MenuNo,
        type: card.setting.tabType
    if (card.setting.click === 'menu') {
      let menuId = card.setting.menu.slice(-1)[0]
      let menu = null
      if (window.GLOB.mkThdMenus.has(menuId)) {
        menu = {...window.GLOB.mkThdMenus.get(menuId)}
      } else if (card.setting.MenuID) {
        menu = {
          MenuID: card.setting.MenuID,
          MenuName: card.setting.MenuName,
          type: card.setting.tabType
        }
      }
      let newtab = {
        ...menu,
        param: {}
      }
      if (!menu) return
      menu.param = {}
      if (card.setting.joint === 'true') {
        newtab.param.$BID = data.$$uuid || ''
        menu.param.$BID = data.$$uuid || ''
        Object.keys(data).forEach(key => {
          if (/^\$/.test(key)) return
          newtab.param[key] = data[key]
          menu.param[key] = data[key]
        })
      }
      MKEmitter.emit('modifyTabs', newtab, true)
      MKEmitter.emit('modifyTabs', menu, true)
    } else if (card.setting.click === 'link') {
      let src = card.setting.linkurl
src/tabviews/custom/components/carousel/data-card/index.jsx
@@ -82,8 +82,8 @@
    if (!_config.wrap.height) { // 兼容
      _config.wrap.height = _config.style.height || '300px'
      delete _config.style.height
    }
    delete _config.style.height
    _card.style.height = _config.wrap.height
src/tabviews/custom/components/carousel/prop-card/index.jsx
@@ -74,8 +74,8 @@
    if (!_config.wrap.height) { // 兼容
      _config.wrap.height = _config.style.height || '300px'
      delete _config.style.height
    }
    delete _config.style.height
    _config.subcards.forEach(card => {
      card.style.height = _config.wrap.height
src/tabviews/custom/components/chart/antv-G6/index.jsx
@@ -1660,34 +1660,32 @@
      if (!data) return
      
      let menuId = plot.menu.slice(-1)[0]
      let newtab = window.GLOB.mkThdMenus.filter(m => m.MenuID === menuId)[0]
      let menu = null
      if (!newtab && plot.MenuID) {
        newtab = {
      if (window.GLOB.mkThdMenus.has(menuId)) {
        menu = {...window.GLOB.mkThdMenus.get(menuId)}
      } else if (plot.MenuID) {
        menu = {
          MenuID: plot.MenuID,
          MenuName: plot.MenuName,
          MenuNo: plot.MenuNo,
          type: plot.tabType
        }
      } else if (!newtab) {
        return
      }
      newtab = {
        ...newtab,
        param: {}
      }
      if (!menu) return
      menu.param = {}
      if (plot.joint === 'true') {
        newtab.param.$BID = data.$$uuid || ''
        menu.param.$BID = data.$$uuid || ''
        Object.keys(data).forEach(key => {
          if (/^\$/.test(key)) return
          newtab.param[key] = data[key]
          menu.param[key] = data[key]
        })
      }
      MKEmitter.emit('modifyTabs', newtab, true)
      MKEmitter.emit('modifyTabs', menu, true)
    } else {
      if (data) {
        this.selectedId = data.$$uuid || ''
src/tabviews/custom/components/chart/antv-X6/index.jsx
@@ -1939,20 +1939,23 @@
      MKEmitter.emit('modifyTabs', newtab, true)
    } else if (plot.click === 'menu') {
      let menuId = plot.menu.slice(-1)[0]
      let newtab = window.GLOB.mkThdMenus.filter(m => m.MenuID === menuId)[0]
      let menu = null
      if (!newtab && plot.MenuID) {
        newtab = {
      if (window.GLOB.mkThdMenus.has(menuId)) {
        menu = {...window.GLOB.mkThdMenus.get(menuId)}
      } else if (plot.MenuID) {
        menu = {
          MenuID: plot.MenuID,
          MenuName: plot.MenuName,
          MenuNo: plot.MenuNo,
          type: plot.tabType
        }
      } else if (!newtab) {
        return
      }
      MKEmitter.emit('modifyTabs', {...newtab, param: {$BID: sign}}, true)
      if (!menu) return
      menu.param = {$BID: sign}
      MKEmitter.emit('modifyTabs', menu, true)
    } else {
      MKEmitter.emit('resetSelectLine', config.uuid, sign, {})
    }
src/tabviews/custom/components/chart/antv-bar-line/index.jsx
@@ -1875,34 +1875,32 @@
        MKEmitter.emit('modifyTabs', newtab, true)
      } else if (plot.click === 'menu') {
        let menuId = plot.menu.slice(-1)[0]
        let newtab = window.GLOB.mkThdMenus.filter(m => m.MenuID === menuId)[0]
        let menu = null
        if (!newtab && plot.MenuID) {
          newtab = {
        if (window.GLOB.mkThdMenus.has(menuId)) {
          menu = {...window.GLOB.mkThdMenus.get(menuId)}
        } else if (plot.MenuID) {
          menu = {
            MenuID: plot.MenuID,
            MenuName: plot.MenuName,
            MenuNo: plot.MenuNo,
            type: plot.tabType
          }
        } else if (!newtab) {
          return
        }
        if (!menu) return
  
        newtab = {
          ...newtab,
          param: {}
        }
        menu.param = {}
  
        if (plot.joint === 'true') {
          newtab.param.$BID = data.$$uuid || ''
          menu.param.$BID = data.$$uuid || ''
          Object.keys(data).forEach(key => {
            if (/^\$/.test(key)) return
            newtab.param[key] = data[key]
            menu.param[key] = data[key]
          })
        }
  
        MKEmitter.emit('modifyTabs', newtab, true)
        MKEmitter.emit('modifyTabs', menu, true)
      } else {
        MKEmitter.emit('resetSelectLine', config.uuid, (data ? data.$$uuid : ''), data)
      }
src/tabviews/custom/components/chart/antv-pie/index.jsx
@@ -1031,16 +1031,9 @@
      let menu_id = plot.linkmenu.slice(-1)[0]
      
      chart.on('element:dblclick', (ev) => {
        let menu = window.GLOB.mkThdMenus.filter(m => m.MenuID === menu_id)[0] || ''
        let menu = window.GLOB.mkThdMenus.get(menu_id) || ''
        if (!menu) {
          notification.warning({
            top: 92,
            message: '菜单已删除或没有访问权限!',
            duration: 5
          })
          return
        }
        if (!menu) return
        try {
          let data = ev.data.data
src/tabviews/custom/components/form/simple-form/index.jsx
@@ -207,7 +207,7 @@
  execSuccess = (btn, id) => {
    if (btn.linkmenu && btn.linkmenu.length > 0) {
      let menu_id = btn.linkmenu[btn.linkmenu.length - 1]
      let menu = window.GLOB.mkThdMenus.filter(m => m.MenuID === menu_id)[0] || ''
      let menu = window.GLOB.mkThdMenus.get(menu_id) || ''
      if (!menu) return
src/tabviews/custom/components/form/step-form/index.jsx
@@ -268,7 +268,7 @@
    if (btn.linkmenu && btn.linkmenu.length > 0) {
      let menu_id = btn.linkmenu[btn.linkmenu.length - 1]
      let menu = window.GLOB.mkThdMenus.filter(m => m.MenuID === menu_id)[0] || ''
      let menu = window.GLOB.mkThdMenus.get(menu_id) || ''
      if (!menu) return
src/tabviews/custom/components/form/tab-form/index.jsx
@@ -221,7 +221,7 @@
  execSuccess = (btn, id) => {
    if (btn.linkmenu && btn.linkmenu.length > 0) {
      let menu_id = btn.linkmenu[btn.linkmenu.length - 1]
      let menu = window.GLOB.mkThdMenus.filter(m => m.MenuID === menu_id)[0] || ''
      let menu = window.GLOB.mkThdMenus.get(menu_id) || ''
      if (!menu) return
src/tabviews/custom/components/group/normal-group/index.scss
@@ -1,16 +1,4 @@
.normal-group-wrap {
  .print-button, .print-button:hover, .print-button:focus, .print-button:active {
    position: absolute;
    right: 0px;
    top: 0px;
    z-index: 2;
    border: 0;
    background: transparent;
  }
  .print-button:hover, .print-button:focus, .print-button:active {
    color: var(--mk-sys-color5);
  }
  .group-header {
    position: relative;
    height: 45px;
src/tabviews/custom/components/module/account/index.jsx
@@ -160,24 +160,18 @@
  addBook = () => {
    const { config } = this.props
    let menuId = config.wrap.MenuID
    let menu = window.GLOB.mkThdMenus.filter(m => m.MenuID === menuId)[0]
    if (!menu && config.wrap.MenuNo) {
      menu = {
        MenuID: menuId,
        MenuName: config.wrap.MenuName,
        MenuNo: config.wrap.MenuNo || '',
        type: config.wrap.tabType
      }
    }
    let newtab = {
      ...menu,
    let menu = {
      MenuID: config.wrap.MenuID,
      MenuName: config.wrap.MenuName,
      type: config.wrap.tabType,
      param: {}
    }
    MKEmitter.emit('modifyTabs', newtab, true)
    if (window.GLOB.mkThdMenus.has(config.wrap.MenuID)) {
      menu = {...window.GLOB.mkThdMenus.get(config.wrap.MenuID), param: {}}
    }
    MKEmitter.emit('modifyTabs', menu, true)
  }
  render() {
src/tabviews/custom/components/module/voucher/saveAsTemp/index.jsx
@@ -18,15 +18,13 @@
  UNSAFE_componentWillMount() {
    let menuId = '16289973311406f3ko9nm8ehotdmu80o'
    let menu = window.GLOB.mkThdMenus.filter(m => m.MenuID === menuId)[0]
    let menu = window.GLOB.mkThdMenus.get(menuId)
    if (menu) {
      let newtab = {
      this.setState({menu: {
        ...menu,
        param: {}
      }
      this.setState({menu: newtab})
      }})
    }
  }
src/tabviews/custom/index.jsx
@@ -231,6 +231,10 @@
        })
      }
      if (config.flow_code) {
        regs.push({ reg: /@works_flow_code@/ig, value: config.flow_code })
      }
      config.$cache = config.cacheLocal === 'true'
      config.$time = config.localCacheTime || 0
@@ -642,7 +646,7 @@
      
            if (col.linkmenu && col.linkmenu.length > 0) {
              let menu_id = col.linkmenu.pop()
              col.linkThdMenu = window.GLOB.mkThdMenus.filter(m => m.MenuID === menu_id)[0] || ''
              col.linkThdMenu = window.GLOB.mkThdMenus.get(menu_id) || ''
            } else {
              col.linkThdMenu = ''
            }
src/tabviews/custom/popview/index.jsx
@@ -123,6 +123,11 @@
      })
    }
    if (Tab.$process && window.GLOB.UserCacheMap.has(Tab.$flowId)) {
      let flow = window.GLOB.UserCacheMap.get(Tab.$flowId)
      regs.push({ reg: /@works_flow_code@/ig, value: flow.flow_code || '' })
    }
    config.components = this.filterComponent(config.components, roleId, balMap, param, Tab, Tab.uuid, Tab.uuid)
    
    // 获取主搜索条件
@@ -395,7 +400,7 @@
      
            if (col.linkmenu && col.linkmenu.length > 0) {
              let menu_id = col.linkmenu.pop()
              col.linkThdMenu = window.GLOB.mkThdMenus.filter(m => m.MenuID === menu_id)[0] || ''
              col.linkThdMenu = window.GLOB.mkThdMenus.get(menu_id) || ''
            } else {
              col.linkThdMenu = ''
            }
src/tabviews/home/index.jsx
@@ -39,7 +39,7 @@
  check = (times) => {
    times++
    if ((window.GLOB.mkThdMenus.length > 0 && window.GLOB.mkActions.loaded) || times > 50) {
    if ((window.GLOB.mkThdMenus.size > 0 && window.GLOB.mkActions.loaded) || times > 50) {
      this.setState({
        waiting: false
      })
src/tabviews/subtable/index.jsx
@@ -165,7 +165,7 @@
          if (col.linkmenu && col.linkmenu.length > 0) {
            let menu_id = col.linkmenu.slice(-1)[0]
            col.linkThdMenu = window.GLOB.mkThdMenus.filter(m => m.MenuID === menu_id)[0] || ''
            col.linkThdMenu = window.GLOB.mkThdMenus.get(menu_id) || ''
          } else {
            col.linkThdMenu = ''
          }
src/tabviews/zshare/actionList/normalbutton/index.jsx
@@ -451,12 +451,6 @@
          }
        }
        if (sessionStorage.getItem('dataM') === 'true') { // 数据权限
          param.LText = param.LText.replace(/\$@/ig, '/*').replace(/@\$/ig, '*/').replace(/@datam@/ig, '\'Y\'')
        } else {
          param.LText = param.LText.replace(/@\$|\$@/ig, '').replace(/@datam@/ig, '\'\'')
        }
        param.exec_type = 'y' // 后台解码
        param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
        param.secretkey = Utils.encrypt('', param.timestamp)
@@ -492,12 +486,6 @@
              param.key_back_type = 'Y'
            }
          }
          if (sessionStorage.getItem('dataM') === 'true') { // 数据权限
            param.LText = param.LText.replace(/\$@/ig, '/*').replace(/@\$/ig, '*/').replace(/@datam@/ig, '\'Y\'')
          } else {
            param.LText = param.LText.replace(/@\$|\$@/ig, '').replace(/@datam@/ig, '\'\'')
          }
          param.exec_type = 'y' // 后台解码
          param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
@@ -523,12 +511,6 @@
            if (btn.output) {
              param.key_back_type = 'Y'
            }
          }
          if (sessionStorage.getItem('dataM') === 'true') { // 数据权限
            param.LText = param.LText.replace(/\$@/ig, '/*').replace(/@\$/ig, '*/').replace(/@datam@/ig, '\'Y\'')
          } else {
            param.LText = param.LText.replace(/@\$|\$@/ig, '').replace(/@datam@/ig, '\'\'')
          }
          param.exec_type = 'y' // 后台解码
@@ -596,12 +578,6 @@
              param.key_back_type = 'Y'
            }
          }
          if (sessionStorage.getItem('dataM') === 'true') { // 数据权限
            param.LText = param.LText.replace(/\$@/ig, '/*').replace(/@\$/ig, '*/').replace(/@datam@/ig, '\'Y\'')
          } else {
            param.LText = param.LText.replace(/@\$|\$@/ig, '').replace(/@datam@/ig, '\'\'')
          }
          param.exec_type = 'y' // 后台解码
          param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
@@ -642,12 +618,6 @@
                param.key_back_type = 'Y'
              }
            }
            if (sessionStorage.getItem('dataM') === 'true') { // 数据权限
              param.LText = param.LText.replace(/\$@/ig, '/*').replace(/@\$/ig, '*/').replace(/@datam@/ig, '\'Y\'')
            } else {
              param.LText = param.LText.replace(/@\$|\$@/ig, '').replace(/@datam@/ig, '\'\'')
            }
            param.exec_type = 'y' // 后台解码
            param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
@@ -673,12 +643,6 @@
              if (btn.output) {
                param.key_back_type = 'Y'
              }
            }
            if (sessionStorage.getItem('dataM') === 'true') { // 数据权限
              param.LText = param.LText.replace(/\$@/ig, '/*').replace(/@\$/ig, '*/').replace(/@datam@/ig, '\'Y\'')
            } else {
              param.LText = param.LText.replace(/@\$|\$@/ig, '').replace(/@datam@/ig, '\'\'')
            }
            param.exec_type = 'y' // 后台解码
@@ -769,7 +733,7 @@
      }
      if (retmsg) {
        param.$callbacksql = this.getSysDeclareSql(btn, formdata, data[0], columns, primaryId, this.props.BID)
        param.$callbacksql = this.getSysDeclareSql(btn, formdata, data[0], columns, this.props.BID)
      }
      _params.push(param)
@@ -819,7 +783,7 @@
        }
        if (retmsg) {
          param.$callbacksql = this.getSysDeclareSql(btn, formdata, cell, columns, primaryId, this.props.BID)
          param.$callbacksql = this.getSysDeclareSql(btn, formdata, cell, columns, this.props.BID)
        }
        return param
@@ -832,7 +796,7 @@
  /**
   * @description 获取回调脚本的字段定义
   */
  getSysDeclareSql = (btn, formdata, data, columns, primaryId, BID = '') => {
  getSysDeclareSql = (btn, formdata, data, columns, BID = '') => {
    let datavars = {}                 // 声明的变量,表单及显示列
    // 需要声明的变量集
    let _vars = ['tbid', 'errorcode', 'retmsg', 'billcode', 'bvoucher', 'fibvoucherdate', 'fiyear', 'username', 'fullname', 'modulardetailcode', 'roleid', 'mk_departmentcode', 'mk_organization', 'mk_user_type', 'mk_nation', 'mk_province', 'mk_city', 'mk_district', 'mk_address', 'mk_deleted', 'bid']
@@ -999,20 +963,6 @@
        /* 显示列变量赋值 */
        select ${_initColfields.join(',')}
        `
    }
    _sql = _sql.replace(/@ID@/ig, `'${primaryId || ''}'`)
    _sql = _sql.replace(/@BID@/ig, `'${BID}'`)
    _sql = _sql.replace(/@LoginUID@/ig, `'${sessionStorage.getItem('LoginUID') || ''}'`)
    _sql = _sql.replace(/@SessionUid@/ig, `'${localStorage.getItem('SessionUid') || ''}'`)
    _sql = _sql.replace(/@UserID@/ig, `'${sessionStorage.getItem('UserID') || ''}'`)
    _sql = _sql.replace(/@Appkey@/ig, `'${window.GLOB.appkey || ''}'`)
    _sql = _sql.replace(/@typename@/ig, `'admin'`)
    if (sessionStorage.getItem('dataM') === 'true') { // 数据权限
      _sql = _sql.replace(/@datam@/ig, '\'Y\'')
    } else {
      _sql = _sql.replace(/@datam@/ig, '\'\'')
    }
    return _sql
@@ -1195,6 +1145,8 @@
   * @description 自定义请求循环执行
   */
  customLoopRequest = (params, _resolve) => {
    const { setting, btn } = this.props
    let param = params.shift()
    this.setState({
@@ -1206,6 +1158,10 @@
      ID: param.ID || '',
      callbacksql: param.$callbacksql || '',
      mk_api_key: ''
    }
    if (!record.ID && btn.Ot !== 'notRequired' && param[setting.primaryKey]) {
      record.ID = param[setting.primaryKey]
    }
    delete param.$callbacksql
@@ -1567,7 +1523,7 @@
      param.func = 'sPC_TableData_InUpDe'
      
      if (record.BID) {
        param.BID = this.props.BID
        param.BID = record.BID
      }
      if (record.ID) {
        param.ID = record.ID
@@ -1597,6 +1553,8 @@
      if (btn.output) {
        _backCustomScript += `
          aaa: select @ErrorCode as ErrorCode,@retmsg as retmsg,${btn.output} as mk_b_id`
        param.key_back_type = 'Y'
      } else {
        _backCustomScript += `
          aaa: select @ErrorCode as ErrorCode,@retmsg as retmsg`
@@ -1612,7 +1570,7 @@
      sql = sql + _backCustomScript
      sql = sql.replace(/@ID@/ig, `'${record.ID || ''}'`)
      sql = sql.replace(/@BID@/ig, `'${this.props.BID || ''}'`)
      sql = sql.replace(/@BID@/ig, `'${record.BID || ''}'`)
      sql = sql.replace(/@LoginUID@/ig, `'${sessionStorage.getItem('LoginUID') || ''}'`)
      sql = sql.replace(/@SessionUid@/ig, `'${localStorage.getItem('SessionUid') || ''}'`)
      sql = sql.replace(/@UserID@/ig, `'${sessionStorage.getItem('UserID') || ''}'`)
@@ -1771,7 +1729,7 @@
   * @description 外部请求循环执行
   */
  outerLoopRequest = (params, _resolve) => {
    if (!params && params.length === 0) return
    const { setting, btn } = this.props
    let param = params.shift()
@@ -1783,6 +1741,10 @@
      BID: param.BID || '',
      ID: param.ID || '',
      callbacksql: param.$callbacksql || ''
    }
    if (!record.ID && btn.Ot !== 'notRequired' && param[setting.primaryKey]) {
      record.ID = param[setting.primaryKey]
    }
    delete param.$callbacksql
@@ -2200,22 +2162,22 @@
    if (btn.openmenu && Array.isArray(btn.openmenu) && btn.openmenu.length > 0 && sign !== '@no_target_menu@') {
      let menuId = btn.openmenu.slice(-1)[0]
      let newtab = window.GLOB.mkThdMenus.filter(m => m.MenuID === menuId)[0]
      let menu = null
      if (!newtab && btn.MenuID) {
        newtab = {
      if (window.GLOB.mkThdMenus.has(menuId)) {
        menu = {...window.GLOB.mkThdMenus.get(menuId), param: { $BID: id }}
      } else if (btn.MenuID) {
        menu = {
          MenuID: btn.MenuID,
          MenuName: btn.MenuName,
          MenuNo: btn.MenuNo,
          type: btn.tabType
          type: btn.tabType,
          param: { $BID: id }
        }
      } else if (!newtab) {
        return
      }
      newtab = {...newtab, param: { $BID: id }}
      MKEmitter.emit('modifyTabs', newtab, true)
      if (menu) {
        MKEmitter.emit('modifyTabs', menu, true)
      }
    }
    if (btn.execSuccess === 'popclose' && btn.$tabId) { // 标签关闭刷新
src/tabviews/zshare/actionList/tabbutton/index.jsx
@@ -146,14 +146,16 @@
      }
    } else if (btn.linkmenu && btn.linkmenu.length > 0) {
      let menuId = btn.linkmenu.slice(-1)[0]
      let menu = window.GLOB.mkThdMenus.filter(m => m.MenuID === menuId)[0]
      let menu = null
      if (!menu && btn.MenuName && btn.MenuID) {
      if (window.GLOB.mkThdMenus.has(menuId)) {
        menu = {...window.GLOB.mkThdMenus.get(menuId), param: { $BID: primaryId }}
      } else if (btn.MenuID) {
        menu = {
          MenuID: btn.MenuID,
          MenuName: btn.MenuName,
          MenuNo: btn.MenuNo,
          type: btn.tabType
          type: btn.tabType,
          param: { $BID: primaryId }
        }
      }
@@ -166,12 +168,7 @@
        return
      }
      newtab = {
        ...menu,
        param: {
          $BID: primaryId
        }
      }
      newtab = menu
    }
    if (btn.openTab === 'view') {
src/tabviews/zshare/topSearch/index.jsx
@@ -41,7 +41,7 @@
  sign = ''
  UNSAFE_componentWillMount () {
    const { config } = this.props
    const { config, BID } = this.props
    let _searchlist = []
    let fieldMap = new Map()
@@ -144,6 +144,8 @@
        if (item.resourceType === '1' && item.dataSource) {
          let _option = Utils.getSelectQueryOptions(item)
          _option.sql = _option.sql.replace(/@BID@/ig, `'${BID || ''}'`)
          if (window.GLOB.debugger === true) {
            console.info(_option.sql)
          }
src/templates/modalconfig/index.jsx
@@ -3,12 +3,10 @@
import { is, fromJS } from 'immutable'
import { DndProvider } from 'react-dnd'
import HTML5Backend from 'react-dnd-html5-backend'
import moment from 'moment'
import { Button, Card, Modal, Collapse, notification, Switch } from 'antd'
import { SettingOutlined } from '@ant-design/icons'
import Api from '@/api'
import Utils from '@/utils/utils.js'
import { getModalForm } from '@/templates/zshare/formconfig'
import SourceElement from './dragelement/source'
@@ -392,26 +390,18 @@
          sqlVerifing: true
        })
        let param = {
          func: 's_debug_sql',
          exec_type: 'y',
          LText: `declare @mk_departmentcode nvarchar(512),@mk_organization nvarchar(512),@mk_user_type nvarchar(20)
            ${res.dataSource}`
        }
        let sql = `declare @mk_departmentcode nvarchar(512),@mk_organization nvarchar(512),@mk_user_type nvarchar(20)
        ${res.dataSource}`
        param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
        param.LText = param.LText.replace(/@\$|\$@/ig, '').replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id)@/ig, `'${param.timestamp}'`)
        param.LText = param.LText.replace(/\n/g, ' ')
        sql = sql.replace(/@\$|\$@/ig, '').replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id)@/ig, `'1949-10-01 15:00:00'`)
        
        param.LText = Utils.formatOptions(param.LText)
        param.secretkey = Utils.encrypt('', param.timestamp)
        let rduri = ''
        if (window.GLOB.mainSystemApi && res.database === 'sso') {
          param.rduri = window.GLOB.mainSystemApi
          rduri = window.GLOB.mainSystemApi
        }
        
        Api.genericInterface(param).then(result => {
          if (result.status) {
        Api.sDebug(sql, rduri).then(result => {
          if (result.status || result.ErrCode === '-2') {
            this.setState({
              sqlVerifing: false,
              config: _config,
src/templates/sharecomponent/actioncomponent/verifyexcelin/customscript/index.jsx
@@ -3,7 +3,6 @@
import { is, fromJS } from 'immutable'
import { Form, Row, Col, Button, notification, Modal, Tooltip, Radio, Select, Switch } from 'antd'
import { QuestionCircleOutlined } from '@ant-design/icons'
import moment from 'moment'
import Utils from '@/utils/utils.js'
import Api from '@/api'
@@ -212,23 +211,8 @@
          }
        }
        let param = {
          func: 's_debug_sql',
          exec_type: 'y',
          LText: this.state.verifySql + _initCustomScript + _prevCustomScript + _backCustomScript + tail
        }
        param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
        param.LText = param.LText.replace(/@\$|\$@/ig, '').replace(/\$check@|@check\$/ig, '').replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id|datam|typename)@/ig, `'${param.timestamp}'`)
        param.LText = param.LText.replace(/\n/g, ' ')
        // 外联数据库替换
        if (window.GLOB.externalDatabase !== null) {
          param.LText = param.LText.replace(/@db@/ig, window.GLOB.externalDatabase)
        }
        param.LText = Utils.formatOptions(param.LText)
        param.secretkey = Utils.encrypt('', param.timestamp)
        let sql = this.state.verifySql + _initCustomScript + _prevCustomScript + _backCustomScript + tail
        sql = sql.replace(/@\$|\$@/ig, '').replace(/\$check@|@check\$/ig, '').replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id|datam|typename)@/ig, `'1949-10-01 15:00:00'`)
        
        if (skip) {
          this.setState({
@@ -242,8 +226,8 @@
          })
        } else {
          this.setState({loading: true})
          Api.genericInterface(param).then(res => {
            if (res.status) {
          Api.sDebug(sql).then(res => {
            if (res.status || res.ErrCode === '-2') {
              this.setState({
                loading: false,
                editItem: null
src/templates/sharecomponent/actioncomponent/verifyexcelin/index.jsx
@@ -388,48 +388,100 @@
    const { verify } = this.state
    let _columns = JSON.parse(JSON.stringify(verify.columns))
    let _names = {}
    let _cols = _columns.map(item => {
      let key = item.Column.toLowerCase()
      _names[key] = item.Text
    let _cols = _columns.map(col => col.Column)
      return key
    })
    let names = {$up: false}
    columns.forEach(col => {
      if (col.field && !_cols.includes(col.field)) {
        let _type = 'Nvarchar(50)'
        let _limit = '50'
        if (col.type === 'number' && !col.decimal) {
          _type = 'Int'
          _limit = ''
        } else if (col.type === 'number') {
          _type = 'Decimal(18,' + col.decimal + ')'
          _limit = col.decimal
      if (!col.field) return
      let key = col.field.toLowerCase()
      if (_cols.includes(key)) {
        if (_names[key] !== col.label) {
          names.$up = true
          names[key] = col.label
        }
        let _cell = {
          uuid: col.uuid,
          Column: col.field,
          Text: col.label,
          type: _type,
          limit: _limit,
          import: 'true',
          required: 'true'
        }
        if (_type !== 'Nvarchar(50)') {
          _cell.min = 0
          _cell.max = 999999
        }
        _columns.push(_cell)
        return
      }
      let _type = 'Nvarchar(50)'
      let _limit = '50'
      if (col.type === 'number' && !col.decimal) {
        _type = 'Int'
        _limit = ''
      } else if (col.type === 'number') {
        _type = 'Decimal(18,' + col.decimal + ')'
        _limit = col.decimal
      }
      let _cell = {
        uuid: col.uuid,
        Column: col.field,
        Text: col.label,
        type: _type,
        limit: _limit,
        import: 'true',
        required: 'true'
      }
      if (_type !== 'Nvarchar(50)') {
        _cell.min = 0
        _cell.max = 999999
      }
      _columns.push(_cell)
    })
    this.setState({
      verify: {
        ...verify,
        columns: _columns
      }
    }, () => {
      this.resetUniqueColumns()
    })
    if (names.$up) {
      const that = this
      confirm({
        content: '部分字段名称与显示列不一致,是否更新?',
        onOk() {
          _columns = _columns.map(item => {
            let key = item.Column.toLowerCase()
            if (names[key]) {
              item.Text = names[key]
            }
            return item
          })
          that.setState({
            verify: {
              ...verify,
              columns: _columns
            }
          }, () => {
            that.resetUniqueColumns()
          })
        },
        onCancel() {
          that.setState({
            verify: {
              ...verify,
              columns: _columns
            }
          }, () => {
            that.resetUniqueColumns()
          })
        }
      })
    } else {
      this.setState({
        verify: {
          ...verify,
          columns: _columns
        }
      }, () => {
        this.resetUniqueColumns()
      })
    }
  }
  clearField = () => {
src/templates/sharecomponent/actioncomponent/verifyexcelout/customscript/index.jsx
@@ -95,9 +95,19 @@
        _usefulFields.push(item.field)
        _usefulFields.push(item.datefield)
        _usefulFields.push(item.datefield + '1')
      } else if (['dateweek', 'datemonth', 'daterange'].includes(item.type)) {
      } else if (['dateweek', 'datemonth'].includes(item.type)) {
        _usefulFields.push(item.field)
        _usefulFields.push(item.field + '1')
      } else if (item.type === 'daterange') {
        let _skey = item.field
        let _ekey = item.field + '1'
        if (/,/.test(item.field)) {
          _skey = item.field.split(',')[0]
          _ekey = item.field.split(',')[1]
        }
        _usefulFields.push(_skey)
        _usefulFields.push(_ekey)
      } else if (item.type === 'date' && _usefulFields.includes(item.field)) {
        _usefulFields.push(item.field + '1')
      } else {
src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx
@@ -3,7 +3,6 @@
import { fromJS } from 'immutable'
import { Form, Tabs, Row, Col, Button, notification, Modal, message, InputNumber, Spin, Typography, Popconfirm } from 'antd'
import { EditOutlined, StopOutlined, CheckCircleOutlined, SwapOutlined, DeleteOutlined } from '@ant-design/icons'
import moment from 'moment'
import md5 from 'md5'
import Api from '@/api'
@@ -600,11 +599,25 @@
    const { verify } = this.state
    let columns = fromJS(verify.columns).toJS()
    let fields = columns.map(item => item.Column)
    let _names = {}
    let fields = columns.map(item => {
      let key = item.Column.toLowerCase()
      _names[key] = item.Text
      return key
    })
    let names = {$up: false}
    config.columns.forEach(item => {
      if (fields.includes(item.field) || !item.field) return
      fields.push(item.field)
      if (!item.field) return
      let key = item.field.toLowerCase()
      if (fields.includes(key)) {
        if (_names[key] !== item.label) {
          names.$up = true
          names[key] = item.label
        }
        return
      }
      let cell = {
        Column: item.field,
@@ -627,8 +640,15 @@
    if (config.subtype === 'dualdatacard') {
      config.subColumns.forEach(item => {
        if (fields.includes(item.field) || !item.field) return
        fields.push(item.field)
        if (!item.field) return
        let key = item.field.toLowerCase()
        if (fields.includes(key)) {
          if (_names[key] !== item.label) {
            names.$up = true
            names[key] = item.label
          }
          return
        }
  
        let cell = {
          Column: item.field,
@@ -650,9 +670,37 @@
      })
    }
    this.setState({
      verify: {...verify, columns: columns}
    })
    if (names.$up) {
      const that = this
      confirm({
        content: '部分字段名称与显示列不一致,是否更新?',
        onOk() {
          columns = columns.map(item => {
            let key = item.Column.toLowerCase()
            if (names[key]) {
              item.Text = names[key]
            }
            return item
          })
          that.setState({
            verify: {...verify, columns: columns}
          })
        },
        onCancel() {
          that.setState({
            verify: {...verify, columns: columns}
          })
        }
      })
    } else {
      this.setState({
        verify: {...verify, columns: columns}
      })
    }
  }
  clearField = () => {
@@ -836,8 +884,7 @@
      return
    }
    let timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
    let sql = SettingUtils.getDebugSql(verify, scripts, (verify.useSearch === 'true' ? searches : []), Utils, '2023-04-20 15:29:37')
    let sql = SettingUtils.getDebugSql(verify, scripts, (verify.useSearch === 'true' ? searches : []), Utils)
    let _debugId = md5(sql)
@@ -846,17 +893,8 @@
      return
    }
    let param = {
      func: 's_debug_sql',
      exec_type: 'y',
      LText: sql
    }
    param.LText = Utils.formatOptions(param.LText)
    param.timestamp = timestamp
    param.secretkey = Utils.encrypt('', timestamp)
    Api.genericInterface(param).then(result => {
      if (result.status) {
    Api.sDebug(sql).then(result => {
      if (result.status || result.ErrCode === '-2') {
        this.setState({debugId: _debugId})
        _resolve()
      } else {
src/templates/sharecomponent/actioncomponent/verifyexcelout/utils.jsx
@@ -5,7 +5,7 @@
  /**
   * @description 生成页面查询语句
   */
  static getDebugSql (verify, scripts, searches, Utils, timestamp) {
  static getDebugSql (verify, scripts, searches, Utils) {
    let sql = ''
    let _dataresource = verify.dataresource || ''
    let regoptions = this.getRegOptions(searches)
@@ -52,9 +52,9 @@
      _dataresource = '(' + _dataresource + ') tb'
    }
    
    _dataresource = _dataresource.replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id|datam|typename)@/ig, `'${timestamp}'`)
    _customScript = _customScript.replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id|datam|typename)@/ig, `'${timestamp}'`)
    _tailScript = _tailScript.replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id|datam|typename)@/ig, `'${timestamp}'`)
    _dataresource = _dataresource.replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id|datam|typename)@/ig, `'1949-10-01 15:00:00'`)
    _customScript = _customScript.replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id|datam|typename)@/ig, `'1949-10-01 15:00:00'`)
    _tailScript = _tailScript.replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id|datam|typename)@/ig, `'1949-10-01 15:00:00'`)
    _dataresource = _dataresource.replace(/@\$|\$@/ig, '')
    _customScript = _customScript.replace(/@\$|\$@/ig, '')
    _tailScript = _tailScript.replace(/@\$|\$@/ig, '')
@@ -107,14 +107,13 @@
    }
    if (_customScript) {
      sql = `/* sql 验证 */
        ${declare}
      sql = `${declare}
        ${_customScript}
        ${_dataresource}
        ${_tailScript}
        aaa:
        if @ErrorCode!=''
          insert into tmp_err_retmsg (ID, ErrorCode, retmsg, CreateUserID) select @time_id@,@ErrorCode, @retmsg,@UserID@
          insert into tmp_err_retmsg (ID, ErrorCode, retmsg, CreateUserID) select '1949-10-01 15:00:00',@ErrorCode, @retmsg,'1949-10-01 15:00:00'
      `
    } else if (_tailScript) {
      sql = `${declare}
@@ -122,16 +121,12 @@
        ${_tailScript}
        aaa:
        if @ErrorCode!=''
          insert into tmp_err_retmsg (ID, ErrorCode, retmsg, CreateUserID) select @time_id@,@ErrorCode, @retmsg,@UserID@
          insert into tmp_err_retmsg (ID, ErrorCode, retmsg, CreateUserID) select '1949-10-01 15:00:00',@ErrorCode, @retmsg,'1949-10-01 15:00:00'
      `
    } else {
      sql = `/* sql 验证 */
        ${declare}
      sql = `${declare}
        ${_dataresource}`
    }
    sql = sql.replace(/\n\s{8}/ig, '\n')
    console.info(sql)
    sql = sql.replace(/\n/g, ' ')
    return sql
  }
@@ -220,12 +215,29 @@
          value: '0'
        })
        options.push(item)
      } else if (['datemonth', 'dateweek', 'daterange'].includes(search.type)) {
      } else if (['datemonth', 'dateweek'].includes(search.type)) {
        options.push(item)
        options.push({
          key: item.key + '1',
          value: '0'
        })
      } else if (search.type === 'daterange') {
        let _skey = search.field
        let _ekey = search.field + '1'
        if (/,/.test(search.field)) {
          _skey = search.field.split(',')[0]
          _ekey = search.field.split(',')[1]
        }
        options.push({
          key: _skey,
          value: '0'
        })
        options.push({
          key: _ekey,
          value: '0'
        })
      } else if (search.type === 'text' || search.type === 'select') {
        item.key.split(',').forEach(field => {
          let cell = JSON.parse(JSON.stringify(item))
src/templates/sharecomponent/actioncomponent/verifyprint/index.jsx
@@ -637,8 +637,7 @@
  sqlverify = (_resolve, _reject, scripts) => {
    const { verify, declareSql, debugId } = this.state
    let timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
    let sql = SettingUtils.getDebugSql(verify.setting || {}, verify.columns, scripts, declareSql, '2023-04-20 15:29:37')
    let sql = SettingUtils.getDebugSql(verify.setting || {}, verify.columns, scripts, declareSql)
    let _debugId = md5(sql)
@@ -647,17 +646,8 @@
      return
    }
    let param = {
      func: 's_debug_sql',
      exec_type: 'y',
      LText: sql
    }
    param.LText = Utils.formatOptions(param.LText)
    param.timestamp = timestamp
    param.secretkey = Utils.encrypt('', timestamp)
    Api.genericInterface(param).then(result => {
      if (result.status) {
    Api.sDebug(sql).then(result => {
      if (result.status || result.ErrCode === '-2') {
        this.setState({debugId: _debugId})
        _resolve()
      } else {
src/templates/sharecomponent/actioncomponent/verifyprint/utils.jsx
@@ -1,6 +1,6 @@
export default class SettingUtils {
  static getDebugSql (setting, columns, scripts, declareSql, timestamp) {
  static getDebugSql (setting, columns, scripts, declareSql) {
    let sql = ''
    let _dataresource = setting.dataresource || ''
@@ -33,9 +33,9 @@
      _dataresource = '(' + _dataresource + ') tb'
    }
    
    _dataresource = _dataresource.replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id|datam|typename)@/ig, `'${timestamp}'`)
    _customScript = _customScript.replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id|datam|typename)@/ig, `'${timestamp}'`)
    _tailScript = _tailScript.replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id|datam|typename)@/ig, `'${timestamp}'`)
    _dataresource = _dataresource.replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id|datam|typename)@/ig, `'1949-10-01 15:00:00'`)
    _customScript = _customScript.replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id|datam|typename)@/ig, `'1949-10-01 15:00:00'`)
    _tailScript = _tailScript.replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id|datam|typename)@/ig, `'1949-10-01 15:00:00'`)
    _dataresource = _dataresource.replace(/@\$|\$@/ig, '')
    _customScript = _customScript.replace(/@\$|\$@/ig, '')
    _tailScript = _tailScript.replace(/@\$|\$@/ig, '')
@@ -64,33 +64,27 @@
    }
    if (_customScript) {
      sql = `/* sql 验证 */
        ${_customScript}
      sql = `${_customScript}
        ${_dataresource}
        ${_tailScript}
        aaa:
        if @ErrorCode!=''
          insert into tmp_err_retmsg (ID, ErrorCode, retmsg, CreateUserID) select @time_id@,@ErrorCode, @retmsg,@UserID@
          insert into tmp_err_retmsg (ID, ErrorCode, retmsg, CreateUserID) select '1949-10-01 15:00:00',@ErrorCode, @retmsg,'1949-10-01 15:00:00'
      `
    } else if (_tailScript) {
      sql = `/* sql 验证 */
        declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(512),@mk_organization nvarchar(512),@mk_user_type nvarchar(20),@mk_nation nvarchar(50),@mk_province nvarchar(50),@mk_city nvarchar(50),@mk_district nvarchar(50),@mk_address nvarchar(100) select @ErrorCode='',@retmsg =''
      sql = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(512),@mk_organization nvarchar(512),@mk_user_type nvarchar(20),@mk_nation nvarchar(50),@mk_province nvarchar(50),@mk_city nvarchar(50),@mk_district nvarchar(50),@mk_address nvarchar(100) select @ErrorCode='',@retmsg =''
        ${declareSql}
        ${_dataresource}
        ${_tailScript}
        aaa:
        if @ErrorCode!=''
          insert into tmp_err_retmsg (ID, ErrorCode, retmsg, CreateUserID) select @time_id@,@ErrorCode, @retmsg,@UserID@
          insert into tmp_err_retmsg (ID, ErrorCode, retmsg, CreateUserID) select '1949-10-01 15:00:00',@ErrorCode, @retmsg,'1949-10-01 15:00:00'
      `
    } else {
      sql = `/* sql 验证 */
        declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(512),@mk_organization nvarchar(512),@mk_user_type nvarchar(20),@mk_nation nvarchar(50),@mk_province nvarchar(50),@mk_city nvarchar(50),@mk_district nvarchar(50),@mk_address nvarchar(100) select @ErrorCode='',@retmsg =''
      sql = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(512),@mk_organization nvarchar(512),@mk_user_type nvarchar(20),@mk_nation nvarchar(50),@mk_province nvarchar(50),@mk_city nvarchar(50),@mk_district nvarchar(50),@mk_address nvarchar(100) select @ErrorCode='',@retmsg =''
        ${declareSql}
        ${_dataresource}`
    }
    sql = sql.replace(/\n\s{8}/ig, '\n')
    console.info(sql)
    sql = sql.replace(/\n/g, ' ')
    return sql
  }
src/templates/sharecomponent/searchcomponent/index.jsx
@@ -2,10 +2,8 @@
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { Modal, notification, Switch } from 'antd'
import moment from 'moment'
import Api from '@/api'
import Utils from '@/utils/utils.js'
import { getSearchForm } from '@/templates/zshare/formconfig'
import asyncComponent from '@/utils/asyncComponent'
import MKEmitter from '@/utils/events.js'
@@ -211,25 +209,16 @@
          sqlVerifing: true
        })
        let param = {
          func: 's_debug_sql',
          exec_type: 'y',
          LText: res.dataSource
        }
        let sql = res.dataSource
        sql = sql.replace(/@\$|\$@/ig, '').replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id)@/ig, `'1949-10-01 15:00:00'`)
        param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
        param.LText = param.LText.replace(/@\$|\$@/ig, '').replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id)@/ig, `'${param.timestamp}'`)
        param.LText = param.LText.replace(/\n/g, ' ')
        param.LText = Utils.formatOptions(param.LText)
        param.secretkey = Utils.encrypt('', param.timestamp)
        let rduri = ''
        if (window.GLOB.mainSystemApi && res.database === 'sso') {
          param.rduri = window.GLOB.mainSystemApi
          rduri = window.GLOB.mainSystemApi
        }
        
        Api.genericInterface(param).then(result => {
          if (result.status) {
        Api.sDebug(sql, rduri).then(result => {
          if (result.status || result.ErrCode === '-2') {
            this.setState({
              sqlVerifing: false,
              searchlist: _searchlist,
src/templates/sharecomponent/searchcomponent/searchform/index.jsx
@@ -257,6 +257,8 @@
    if (type === 'text' || type === 'select') {
      reTooltip.field = '字段名可以使用逗号分隔,进行综合搜索。'
    } else if (type === 'daterange') {
      reTooltip.field = '字段名可以使用逗号分隔,例如startTime,endTime。'
    } else if (type === 'group') {
      reTooltip.field = '查询数据时(自定义脚本或统计数据源),类型字段将用作替换脚本中的 @字段@ ,类型字段对应值为:日 -> day;周 -> week;月 -> month;季 -> quarter;年 -> year;自定义 -> customized'
      reLabel.field = '类型字段'
@@ -463,7 +465,7 @@
        ]
        if (item.key === 'field' || item.key === 'datefield') {
          rules.push({
            pattern: (type === 'text' || type === 'select') ? formRule.field.multipattern : formRule.field.pattern,
            pattern: (type === 'text' || type === 'select' || type === 'daterange') ? formRule.field.multipattern : formRule.field.pattern,
            message: formRule.field.message
          }, {
            max: formRule.field.max,
@@ -619,6 +621,15 @@
      this.props.form.validateFieldsAndScroll((err, values) => {
        if (!err) {
          values.uuid = this.props.card.uuid
          if (/,/.test(values.field)) {
            values.field = values.field.split(',').filter(Boolean)
            if (values.type === 'daterange' && values.field.length > 2) {
              values.field.length = 2
            }
            values.field = values.field.join(',')
          }
          // 下拉菜单或联动菜单
          if (['multiselect', 'select', 'link', 'radio'].includes(values.type)) {
            if (values.resourceType === '0') {
src/templates/sharecomponent/settingcomponent/settingform/index.jsx
@@ -156,10 +156,27 @@
          value: '0'
        })
        options.push(item)
      } else if (['datemonth', 'dateweek', 'daterange'].includes(search.type)) {
      } else if (['datemonth', 'dateweek'].includes(search.type)) {
        options.push(item)
        options.push({
          key: item.key + '1',
          value: '0'
        })
      } else if (search.type === 'daterange') {
        let _skey = search.field
        let _ekey = search.field + '1'
        if (/,/.test(search.field)) {
          _skey = search.field.split(',')[0]
          _ekey = search.field.split(',')[1]
        }
        options.push({
          key: _skey,
          value: '0'
        })
        options.push({
          key: _ekey,
          value: '0'
        })
      } else if (search.type === 'text' || search.type === 'select') {
@@ -299,16 +316,7 @@
    } else if (type === 'scripts' && _scripts.length === 0) {
      _resolve()
    } else { // type 为 submit 、 verify ,以及其他需要验证的场景
      let timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
      let r = SettingUtils.getDebugSql(setting, _scripts, arr_field, regoptions, search, timestamp)
      let param = {
        func: 's_debug_sql',
        exec_type: 'y',
        LText: r.sql
      }
      param.LText = Utils.formatOptions(param.LText)
      param.timestamp = timestamp
      param.secretkey = Utils.encrypt('', timestamp)
      let r = SettingUtils.getDebugSql(setting, _scripts, arr_field, regoptions, search)
      if (r.errors) {
        notification.warning({
@@ -317,35 +325,10 @@
          duration: 5
        })
      }
      let sumParam = null
      if (r.sumSql) {
        sumParam = {
          func: 's_debug_sql',
          exec_type: 'y',
          LText: r.sumSql
        }
        sumParam.LText = Utils.formatOptions(sumParam.LText)
        sumParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
        sumParam.secretkey = Utils.encrypt('', sumParam.timestamp)
      }
      
      Api.genericInterface(param).then(result => {
        if (result.status) {
          if (sumParam) {
            Api.genericInterface(sumParam).then(res => {
              if (res.status) {
                _resolve()
              } else {
                _reject()
                Modal.error({
                  title: res.message
                })
              }
            })
          } else {
            _resolve()
          }
      Api.sDebug(r.sql).then(result => {
        if (result.status || result.ErrCode === '-2') {
          _resolve()
        } else {
          _reject()
          Modal.error({
src/templates/sharecomponent/settingcomponent/settingform/simplescript/index.jsx
@@ -299,22 +299,12 @@
      _scripts.push(values)
    }
    let param = {
      func: 's_debug_sql',
      exec_type: 'y',
      LText: SettingUtils.getCustomDebugSql(_scripts, this.props.regoptions)
    }
    param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
    param.LText = param.LText.replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id)@/ig, `'${param.timestamp}'`)
    param.LText = param.LText.replace(/\n/g, ' ')
    param.LText = Utils.formatOptions(param.LText)
    param.secretkey = Utils.encrypt('', param.timestamp)
    let sql = SettingUtils.getCustomDebugSql(_scripts, this.props.regoptions)
    sql = sql.replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id)@/ig, `'1949-10-01 15:00:00'`)
    
    this.setState({loading: true})
    Api.genericInterface(param).then(result => {
      if (result.status) {
    Api.sDebug(sql).then(result => {
      if (result.status || result.ErrCode === '-2') {
        this.setState({
          loading: false,
          scripts: _scripts,
src/templates/sharecomponent/settingcomponent/settingform/utils.jsx
@@ -7,7 +7,7 @@
   * @return {Object}  setting       页面设置
   * @return {Array}   regoptions    搜索条件正则替换
   */
  static getDebugSql (setting, scripts, arr_field, regoptions, search, timestamp) {
  static getDebugSql (setting, scripts, arr_field, regoptions, search) {
    let sql = ''
    let _dataresource = setting.dataresource || ''
    let _customScript = ''
@@ -35,8 +35,8 @@
      })
    }
    
    _dataresource = _dataresource.replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id|datam|upid)@/ig, `'${timestamp}'`)
    _customScript = _customScript.replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id|datam|upid)@/ig, `'${timestamp}'`)
    _dataresource = _dataresource.replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id|datam|upid)@/ig, `'1949-10-01 15:00:00'`)
    _customScript = _customScript.replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id|datam|upid)@/ig, `'1949-10-01 15:00:00'`)
    _dataresource = _dataresource.replace(/@\$|\$@/ig, '')
    _customScript = _customScript.replace(/@\$|\$@/ig, '')
    _dataresource = _dataresource.replace(/@select\$|\$select@/ig, '')
@@ -99,26 +99,6 @@
      })
    }
    let sumSql = ''
    if (arr_field && _dataresource && /\/\*\$sum@/ig.test(_dataresource)) {
      let _sql = _dataresource.replace(/\/\*\$sum@|@sum\$\*\//ig, '')
      _sql = `/*system_query*/${_sql} ${_search}`
      if (_customScript) {
        sumSql = `/* sql sum验证 */
          ${_customScript}
          ${_sql}
          aaa:
          if @ErrorCode!=''
            insert into tmp_err_retmsg (ID, ErrorCode, retmsg, CreateUserID) select '${timestamp}',@ErrorCode, @retmsg,'${timestamp}'
        `
      } else {
        sumSql = `/* sql sum验证 */
          declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(512),@mk_organization nvarchar(512),@mk_user_type nvarchar(20),@mk_nation nvarchar(50),@mk_province nvarchar(50),@mk_city nvarchar(50),@mk_district nvarchar(50),@mk_address nvarchar(100) select @ErrorCode='',@retmsg =''
          ${_sql}`
      }
    }
    // 数据源处理, 存在显示列时 
    if (arr_field && _dataresource) {
      if (/\s/.test(_dataresource)) {
@@ -129,21 +109,16 @@
    }
    if (_customScript) {
      sql = `/* sql 验证 */
        ${_customScript}
      sql = `${_customScript}
        ${_dataresource}
        aaa:
        if @ErrorCode!=''
          insert into tmp_err_retmsg (ID, ErrorCode, retmsg, CreateUserID) select '${timestamp}',@ErrorCode, @retmsg,'${timestamp}'
          insert into tmp_err_retmsg (ID, ErrorCode, retmsg, CreateUserID) select '1949-10-01 15:00:00',@ErrorCode, @retmsg,'1949-10-01 15:00:00'
      `
    } else {
      sql = `/* sql 验证 */
        declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(512),@mk_organization nvarchar(512),@mk_user_type nvarchar(20),@mk_nation nvarchar(50),@mk_province nvarchar(50),@mk_city nvarchar(50),@mk_district nvarchar(50),@mk_address nvarchar(100) select @ErrorCode='',@retmsg =''
      sql = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(512),@mk_organization nvarchar(512),@mk_user_type nvarchar(20),@mk_nation nvarchar(50),@mk_province nvarchar(50),@mk_city nvarchar(50),@mk_district nvarchar(50),@mk_address nvarchar(100) select @ErrorCode='',@retmsg =''
        ${_dataresource}`
    }
    sql = sql.replace(/\n\s{8}/ig, '\n')
    console.info(sql)
    let errors = []
@@ -163,14 +138,7 @@
      })
    }
    if (sumSql) {
      sumSql = sumSql.replace(/\n\s{10}/ig, '\n')
      console.info(sumSql)
      sumSql = sumSql.replace(/\n/g, ' ')
    }
    sql = sql.replace(/\n/g, ' ')
    return { sql, sumSql, errors: errors.join(';') }
    return { sql, errors: errors.join(';') }
  }
  /**
@@ -205,10 +173,6 @@
    _customScript = _customScript.replace(/@\$|\$@/ig, '')
    _customScript = _customScript.replace(/@userName@|@fullName@/ig, `''`)
    // 外联数据库替换
    if (window.GLOB.externalDatabase !== null) {
      _customScript = _customScript.replace(/@db@/ig, window.GLOB.externalDatabase)
    }
    
    // 正则替换
    if (regoptions) {
@@ -224,15 +188,12 @@
    }
    if (_customScript) {
      sql = `/* sql 验证 */
        ${_customScript}
      sql = `${_customScript}
        aaa:
        if @ErrorCode!=''
          insert into tmp_err_retmsg (ID, ErrorCode, retmsg, CreateUserID) select @time_id@,@ErrorCode, @retmsg,@UserID@
          insert into tmp_err_retmsg (ID, ErrorCode, retmsg, CreateUserID) select '1949-10-01 15:00:00',@ErrorCode, @retmsg,'1949-10-01 15:00:00'
      `
    }
    sql = sql.replace(/\n\s{8}/ig, '\n')
    console.info(sql)
    return sql
  }
src/templates/sharecomponent/treesettingcomponent/settingform/index.jsx
@@ -2,10 +2,8 @@
import PropTypes from 'prop-types'
import { fromJS } from 'immutable'
import { Form, notification, Modal, Spin, Tabs } from 'antd'
import moment from 'moment'
import Api from '@/api'
import Utils from '@/utils/utils.js'
import SettingUtils from './utils.jsx'
import DataSource from './datasource'
import asyncComponent from '@/utils/asyncComponent'
@@ -134,19 +132,10 @@
    } else if (type === 'scripts' && _scripts.length === 0) {
      _resolve()
    } else { // type 为 submit 、 verify ,以及其他需要验证的场景
      let timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
      let param = {
        func: 's_debug_sql',
        exec_type: 'y',
        LText: SettingUtils.getDebugSql(setting, _scripts, timestamp)
      }
      param.LText = param.LText.replace(/\n/g, ' ')
      param.LText = Utils.formatOptions(param.LText)
      param.timestamp = timestamp
      param.secretkey = Utils.encrypt('', timestamp)
      let sql = SettingUtils.getDebugSql(setting, _scripts)
      
      Api.genericInterface(param).then(result => {
        if (result.status) {
      Api.sDebug(sql).then(result => {
        if (result.status || result.ErrCode === '-2') {
          _resolve()
        } else {
          _reject()
src/templates/sharecomponent/treesettingcomponent/settingform/utils.jsx
@@ -5,7 +5,7 @@
   * @return {String}  scripts       自定义脚本
   * @return {Object}  setting       页面设置
   */
  static getDebugSql (setting, scripts, timestamp) {
  static getDebugSql (setting, scripts) {
    let arr_field = `${setting.valueField},${setting.labelField},${setting.parentField}`
    let sql = ''
    let _dataresource = setting.dataresource || ''
@@ -35,16 +35,10 @@
      })
    }
    
    _dataresource = _dataresource.replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id)@/ig, `'${timestamp}'`)
    _customScript = _customScript.replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id)@/ig, `'${timestamp}'`)
    _dataresource = _dataresource.replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id)@/ig, `'1949-10-01 15:00:00'`)
    _customScript = _customScript.replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id)@/ig, `'1949-10-01 15:00:00'`)
    _dataresource = _dataresource.replace(/@\$|\$@/ig, '')
    _customScript = _customScript.replace(/@\$|\$@/ig, '')
    // 外联数据库替换
    if (window.GLOB.externalDatabase !== null) {
      _dataresource = _dataresource.replace(/@db@/ig, window.GLOB.externalDatabase)
      _customScript = _customScript.replace(/@db@/ig, window.GLOB.externalDatabase)
    }
    
    // 正则替换
    let _regoptions = [
@@ -68,20 +62,16 @@
    }
    if (_customScript) {
      sql = `/* sql 验证 */
        ${_customScript}
      sql = `${_customScript}
        ${_dataresource}
        aaa:
        if @ErrorCode!=''
          insert into tmp_err_retmsg (ID, ErrorCode, retmsg, CreateUserID) select @time_id@,@ErrorCode, @retmsg,@UserID@
          insert into tmp_err_retmsg (ID, ErrorCode, retmsg, CreateUserID) select '1949-10-01 15:00:00',@ErrorCode, @retmsg,'1949-10-01 15:00:00'
      `
    } else {
      sql = `/* sql 验证 */
        declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(512),@mk_organization nvarchar(512),@mk_user_type nvarchar(20),@mk_nation nvarchar(50),@mk_province nvarchar(50),@mk_city nvarchar(50),@mk_district nvarchar(50),@mk_address nvarchar(100) select @ErrorCode='',@retmsg =''
      sql = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(512),@mk_organization nvarchar(512),@mk_user_type nvarchar(20),@mk_nation nvarchar(50),@mk_province nvarchar(50),@mk_city nvarchar(50),@mk_district nvarchar(50),@mk_address nvarchar(100) select @ErrorCode='',@retmsg =''
        ${_dataresource}`
    }
    sql = sql.replace(/\n\s{8}/ig, '\n')
    console.info(sql)
    
    return sql
  }
src/templates/zshare/formconfig.jsx
@@ -1417,7 +1417,7 @@
      type: refresh.length === 0 ? 'radio' : 'select',
      key: 'popClose',
      label: '关闭后',
      initVal: card.popClose || 'never',
      initVal: card.popClose || 'grid',
      required: true,
      options: [{
        value: 'never',
src/templates/zshare/modalform/index.jsx
@@ -27,7 +27,7 @@
  checkcard: ['initval', 'readonly', 'required', 'hidden', 'readin', 'resourceType', 'span', 'labelwidth', 'display', 'tooltip', 'extra', 'place', 'width', 'multiple', 'splitline', 'marginTop', 'marginBottom'],
  multiselect: ['initval', 'readonly', 'required', 'hidden', 'readin', 'resourceType', 'fieldlength', 'span', 'labelwidth', 'tooltip', 'extra', 'marginTop', 'marginBottom', 'dropdown'],
  link: ['initval', 'readonly', 'required', 'hidden', 'readin', 'resourceType', 'declare', 'setAll', 'linkField', 'linkSubField', 'span', 'place', 'labelwidth', 'tooltip', 'extra', 'emptyText', 'enter', 'splitline', 'dropdown', 'marginTop', 'marginBottom', 'pickerMode'],
  fileupload: ['readonly', 'required', 'readin', 'fieldlength', 'maxfile', 'fileType', 'span', 'labelwidth', 'tooltip', 'extra', 'compress', 'miniSet', 'splitline', 'marginTop', 'marginBottom', 'maxSize'],
  fileupload: ['readonly', 'required', 'hidden', 'readin', 'fieldlength', 'maxfile', 'fileType', 'span', 'labelwidth', 'tooltip', 'extra', 'compress', 'miniSet', 'splitline', 'marginTop', 'marginBottom', 'maxSize'],
  switch: ['initval', 'openVal', 'closeVal', 'openText', 'closeText', 'readonly', 'hidden', 'readin', 'span', 'labelwidth', 'linkSubField', 'tooltip', 'extra', 'splitline', 'marginTop', 'marginBottom'],
  check: ['initval', 'openVal', 'closeVal', 'readonly', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'splitline', 'marginTop', 'marginBottom', 'checkTip'],
  date: ['initval', 'readonly', 'required', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'declareType', 'mode', 'splitline', 'place', 'marginTop', 'marginBottom', 'minDate', 'maxDate', 'precision'],
src/templates/zshare/unattended/index.jsx
@@ -65,7 +65,7 @@
    const { visible, actions, autoMatic } = this.state
    return (
      <div style={{display: 'inline-block'}}>
      <>
        <Button className="mk-border-purple" onClick={this.trigger}><UserOutlined/> 无人值守</Button>
        <Modal
          title="无人值守"
@@ -79,7 +79,7 @@
        >
          <SettingForm actions={actions} autoMatic={autoMatic} wrappedComponentRef={(inst) => this.settingRef = inst}/>
        </Modal>
      </div>
      </>
    )
  }
}
src/templates/zshare/verifycard/callbackcustomscript/index.jsx
@@ -2,7 +2,6 @@
import PropTypes from 'prop-types'
import { Form, Row, Col, Button, notification, Modal, Tooltip, Radio, Select, Switch } from 'antd'
import { QuestionCircleOutlined } from '@ant-design/icons'
import moment from 'moment'
import Utils from '@/utils/utils.js'
import Api from '@/api'
@@ -129,38 +128,18 @@
          }
        }
        let param = {
          func: 's_debug_sql',
          exec_type: 'y',
          LText: this.props.initsql +  _prevCustomScript + _backCustomScript + tail
        }
        let sql = this.props.initsql +  _prevCustomScript + _backCustomScript + tail
        if (window.GLOB.funcs && window.GLOB.funcs.length > 0) {
          window.GLOB.funcs.forEach(item => {
            let reg = new RegExp('\\$ex@' + item.func_code + '@ex\\$', 'ig')
            param.LText = param.LText.replace(reg, `/*$ex@${item.func_code}-begin*/\n${item.key_sql}\n/*@ex$-end*/`)
            sql = sql.replace(reg, `/*$ex@${item.func_code}-begin*/\n${item.key_sql}\n/*@ex$-end*/`)
          })
        }
        // 数据权限
        param.LText = param.LText.replace(/@\$|\$@/ig, '')
        // check
        param.LText = param.LText.replace(/\$check@|@check\$/ig, '')
        // 外联数据库替换
        if (window.GLOB.externalDatabase !== null) {
          param.LText = param.LText.replace(/@db@/ig, window.GLOB.externalDatabase)
        }
        param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
        param.LText = param.LText.replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id|typename)@/ig, `'${param.timestamp}'`)
        console.info(`/* sql 验证 */\n${param.LText.replace(/\n\s{6,20}/ig, '\n')}`)
        param.LText = param.LText.replace(/\n/g, ' ')
        param.LText = Utils.formatOptions(param.LText)
        param.secretkey = Utils.encrypt('', param.timestamp)
        sql = sql.replace(/@\$|\$@/ig, '').replace(/\$check@|@check\$/ig, '')
        sql = sql.replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id|typename)@/ig, `'1949-10-01 15:00:00'`)
        
        if (skip) {
          this.setState({
@@ -174,8 +153,8 @@
          })
        } else {
          this.setState({loading: true})
          Api.genericInterface(param).then(res => {
            if (res.status) {
          Api.sDebug(sql).then(res => {
            if (res.status || res.ErrCode === '-2') {
              this.setState({
                loading: false,
                editItem: null
src/templates/zshare/verifycard/customform/index.jsx
@@ -1,7 +1,6 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { Form, Row, Col, Input, Select, Button, notification, Modal, Tooltip } from 'antd'
import moment from 'moment'
import Utils from '@/utils/utils.js'
import Api from '@/api'
@@ -110,12 +109,7 @@
          return
        }
        let param = {
          func: 's_debug_sql',
          exec_type: 'y',
        }
        param.LText = `${this.props.initsql}
        let sql = `${this.props.initsql}
          /* 自定义验证 */
          select @tbid='', @ErrorCode='',@retmsg=''
          select top 1 @tbid='X' from (${values.sql}) a
@@ -129,30 +123,17 @@
        if (window.GLOB.funcs && window.GLOB.funcs.length > 0) {
          window.GLOB.funcs.forEach(item => {
            let reg = new RegExp('\\$ex@' + item.func_code + '@ex\\$', 'ig')
            param.LText = param.LText.replace(reg, `/*$ex@${item.func_code}-begin*/\n${item.key_sql}\n/*@ex$-end*/`)
            sql = sql.replace(reg, `/*$ex@${item.func_code}-begin*/\n${item.key_sql}\n/*@ex$-end*/`)
          })
        }
        
        // 数据权限
        param.LText = param.LText.replace(/@\$|\$@/ig, '')
        // 外联数据库替换
        if (window.GLOB.externalDatabase !== null) {
          param.LText = param.LText.replace(/@db@/ig, window.GLOB.externalDatabase)
        }
        param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
        param.LText = param.LText.replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id)@/ig, `'${param.timestamp}'`)
        console.info(`/* sql 验证 */\n${param.LText.replace(/\n\s{10}/ig, '\n')}`)
        param.LText = param.LText.replace(/\n/g, ' ')
        param.LText = Utils.formatOptions(param.LText)
        param.secretkey = Utils.encrypt('', param.timestamp)
        sql = sql.replace(/@\$|\$@/ig, '')
        sql = sql.replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id)@/ig, `'1949-10-01 15:00:00'`)
        
        this.setState({loading: true})
        Api.genericInterface(param).then(res => {
          if (res.status) {
        Api.sDebug(sql).then(res => {
          if (res.status || res.ErrCode === '-2') {
            this.setState({
              loading: false,
              editItem: null
src/templates/zshare/verifycard/customscript/index.jsx
@@ -2,7 +2,6 @@
import PropTypes from 'prop-types'
import { Form, Row, Col, Button, notification, Modal, Tooltip, Radio, Select, Switch } from 'antd'
import { QuestionCircleOutlined } from '@ant-design/icons'
import moment from 'moment'
import Utils from '@/utils/utils.js'
import Api from '@/api'
@@ -45,7 +44,7 @@
  }
  handleConfirm = () => {
    const { type } = this.props
    const { type, workFlow } = this.props
    const { editItem, skip } = this.state
    // 表单提交时检查输入值是否正确
    this.props.form.validateFieldsAndScroll((err, values) => {
@@ -172,37 +171,29 @@
          }
        }
        let param = {
          func: 's_debug_sql',
          exec_type: 'y',
          LText: this.props.initsql + _initCustomScript + _prevCustomScript + _backCustomScript + tail
        }
        let sql = this.props.initsql + _initCustomScript + _prevCustomScript + _backCustomScript + tail
        if (window.GLOB.funcs && window.GLOB.funcs.length > 0) {
          window.GLOB.funcs.forEach(item => {
            let reg = new RegExp('\\$ex@' + item.func_code + '@ex\\$', 'ig')
            param.LText = param.LText.replace(reg, `/*$ex@${item.func_code}-begin*/\n${item.key_sql}\n/*@ex$-end*/`)
            sql = sql.replace(reg, `/*$ex@${item.func_code}-begin*/\n${item.key_sql}\n/*@ex$-end*/`)
          })
        }
        // 数据权限
        param.LText = param.LText.replace(/@\$|\$@/ig, '')
        // check
        param.LText = param.LText.replace(/\$check@|@check\$/ig, '')
        sql = sql.replace(/@\$|\$@/ig, '').replace(/\$check@|@check\$/ig, '')
        sql = sql.replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id|datam|typename)@/ig, `'1949-10-01 15:00:00'`)
        // 外联数据库替换
        if (window.GLOB.externalDatabase !== null) {
          param.LText = param.LText.replace(/@db@/ig, window.GLOB.externalDatabase)
        if (window.GLOB.process && workFlow === 'true') {
          sql = sql.replace(/@works_flow_code@/ig, `'1949-10-01 15:00:00'`)
          sql = sql.replace(/@works_flow_name@/ig, `'1949-10-01 15:00:00'`)
          sql = sql.replace(/@works_flow_param@/ig, `'1949-10-01 15:00:00'`)
          sql = sql.replace(/@works_flow_detail_id@/ig, `'1949-10-01 15:00:00'`)
          sql = sql.replace(/@status@/ig, `'1949-10-01 15:00:00'`)
          sql = sql.replace(/@statusname@/ig, `'1949-10-01 15:00:00'`)
          sql = sql.replace(/@work_group@/ig, `'1949-10-01 15:00:00'`)
          sql = sql.replace(/@work_grade@/ig, `'1949-10-01 15:00:00'`)
        }
        param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
        param.LText = param.LText.replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id|datam|typename)@/ig, `'${param.timestamp}'`)
        console.info(`/* sql 验证 */\n${param.LText.replace(/\n\s{6,20}/ig, '\n')}`)
        param.LText = param.LText.replace(/\n/g, ' ')
        param.LText = Utils.formatOptions(param.LText)
        param.secretkey = Utils.encrypt('', param.timestamp)
        
        if (skip) {
          this.setState({
@@ -216,8 +207,8 @@
          })
        } else {
          this.setState({loading: true})
          Api.genericInterface(param).then(res => {
            if (res.status) {
          Api.sDebug(sql).then(res => {
            if (res.status || res.ErrCode === '-2') {
              this.setState({
                loading: false,
                editItem: null
@@ -251,7 +242,7 @@
  }
  selectScript = (value, option) => {
    // const { flowType } = this.props
    const { flowType } = this.props
    if (!value || !option) return
@@ -266,8 +257,19 @@
    }
    if (value === 'flowSql') {
      value = `insert into s_my_works_flow ( works_flow_id,works_flow_code,works_flow_param,work_group,works_flow_detail_id,work_grade,bid,createuserid,CreateUser,CreateStaff)
      select @ID@,'流程编码','下一步要用到的参数串','职员分组','流程节点id','职员等级',@bid@,@UserID@,@UserName,@FullName`
      if (flowType === 'start') {
        value = `insert into s_my_works_flow (works_flow_id,works_flow_code,works_flow_name,works_flow_param,work_group,works_flow_detail_id,work_grade,bid,createuserid,CreateUser,CreateStaff)
        select @ID@,@works_flow_code@,@works_flow_name@,@works_flow_param@,@work_group@,@works_flow_detail_id@,@work_grade@,@bid@,@UserID@,@UserName,@FullName
        insert into s_my_works_flow_log (works_flow_id,works_flow_code,works_flow_name,works_flow_param,status,statusname,works_flow_detail_id,work_group,work_grade)
        select @works_flow_id@,@works_flow_code@,@works_flow_name@ ,@works_flow_param@,@status@,@statusname@,@works_flow_detail_id@,@work_group@,@work_grade@`
      } else {
        value = `insert into s_my_works_flow (works_flow_id,works_flow_code,works_flow_name,works_flow_param,work_group,works_flow_detail_id,work_grade,bid,createuserid,CreateUser,CreateStaff)
        select @ID@,@works_flow_code@,@works_flow_name@,@works_flow_param@,@work_group@,@works_flow_detail_id@,@work_grade@,@bid@,@UserID@,@UserName,@FullName
        insert into s_my_works_flow_log (works_flow_id,works_flow_code,works_flow_name,works_flow_param,status,statusname,works_flow_detail_id,work_group,work_grade)
        select @works_flow_id@,@works_flow_code@,@works_flow_name@,@works_flow_param@,@status@,@statusname@,@works_flow_detail_id@,@work_group@,@work_grade@`
      }
      value = value.replace(/\n\s{8}/g, '\n')
    }
    _sql = _sql.replace(/\s{6}$/, '')
src/templates/zshare/verifycard/index.jsx
@@ -573,7 +573,7 @@
    if (window.GLOB.process) {
      _verify.workFlow = _verify.workFlow || 'false'
      _verify.flowType = _verify.flowType || 'approval'
      _verify.flowType = _verify.flowType || (card.sqlType === 'insert' ? 'start' : 'approval')
      _verify.flowSql = _verify.flowSql || 'true'
    } else {
      delete _verify.workFlow
src/utils/utils.js
@@ -546,8 +546,16 @@
          }
        }
        newsearches[item.key] = _startval
        newsearches[item.key + '1'] = _endval
        let _skey = item.key
        let _ekey = item.key + '1'
        if (/,/.test(item.key)) {
          _skey = item.key.split(',')[0]
          _ekey = item.key.split(',')[1]
        }
        newsearches[_skey] = _startval
        newsearches[_ekey] = _endval
      } else if (item.type === 'text' || item.type === 'select') {
        item.key.split(',').forEach(field => { // 综合搜索,所字段拼接
          newsearches[field] = item.value
@@ -638,7 +646,15 @@
          _endval = val[1] + '.000'
        }
        searchText.push('(' + item.key + ' >= \'' + _startval + '\' AND ' + item.key + ' < \'' + _endval + '\')')
        let _skey = item.key
        let _ekey = item.key
        if (/,/.test(item.key)) {
          _skey = item.key.split(',')[0]
          _ekey = item.key.split(',')[1]
        }
        searchText.push('(' + _skey + ' >= \'' + _startval + '\' AND ' + _ekey + ' < \'' + _endval + '\')')
      } else if (item.type === 'range') {
        let val = item.value.split(',')
@@ -854,7 +870,9 @@
      sql = sql.replace(/@db@/ig, window.GLOB.externalDatabase)
    }
    sql = sql.replace(/@LoginUID@/ig, `'${sessionStorage.getItem('LoginUID') || ''}'`)
    sql = sql.replace(/@SessionUid@/ig, `'${localStorage.getItem('SessionUid') || ''}'`)
    sql = sql.replace(/@UserID@/ig, `'${sessionStorage.getItem('UserID') || ''}'`)
    sql = sql.replace(/@Appkey@/ig, `'${window.GLOB.appkey || ''}'`)
    return {
@@ -1539,6 +1557,8 @@
    }
    columns.forEach(col => {
      if (col.field === 'works_flow_param') return
      if (col.type === 'colspan' || col.type === 'old_colspan') {
        col.subcols.forEach(cell => {
          setField(cell)
@@ -2085,6 +2105,62 @@
    `
  }
  if (btn.$process && verify.workFlow === 'true' && window.GLOB.UserCacheMap.has(btn.$flowId)) {
    let flow = window.GLOB.UserCacheMap.get(btn.$flowId)
    let node = null
    let line = null
    let target = null
    let status = 0
    let statusName = ''
    let detailId = ''
    if (verify.flowSql === 'true') {
      if (verify.flowType === 'start') {
        target = flow.cells.filter(cell => cell.mknode === 'start')[0]
        if (target) {
          detailId = target.id
          status = target.mkdata.status
          statusName = target.mkdata.statusName
        }
      } else if (_data.works_flow_param) {
        node = JSON.parse(window.decodeURIComponent(window.atob(_data.works_flow_param)))
        if (node) {
          line = flow.cells.filter(cell => cell.shape === 'edge' && cell.source.cell === node.id)[0]
        }
        if (line) {
          target = flow.cells.filter(cell => cell.id === line.target.cell)[0]
        }
      }
      if (target) {
        _sql += `
      /* 工作流默认sql */
      insert into s_my_works_flow (works_flow_id,works_flow_code,works_flow_name,works_flow_param,work_group,works_flow_detail_id,work_grade,bid,createuserid,CreateUser,CreateStaff)
      select @ID@,@works_flow_code@,@works_flow_name@,@works_flow_param@,@work_group@,@works_flow_detail_id@,@work_grade@,@bid@,@UserID@,@UserName,@FullName
      insert into s_my_works_flow_log (works_flow_id,works_flow_code,works_flow_name,works_flow_param,status,statusname,works_flow_detail_id,work_group,work_grade)
      select @ID@,@works_flow_code@,@works_flow_name@,@works_flow_param@,@status@,@statusname@,@works_flow_detail_id@,@work_group@,@work_grade@
      `
      }
    }
    _sql = _sql.replace(/@works_flow_code@/ig, `'${flow.flow_code}'`)
    _sql = _sql.replace(/@works_flow_name@/ig, `'${flow.flow_name}'`)
    if (target) {
      let msg = {...target.mkdata, id: target.id}
      _sql = _sql.replace(/@works_flow_param@/ig, `'${window.btoa(window.encodeURIComponent(JSON.stringify(msg)))}'`)
    } else {
      _sql = _sql.replace(/@works_flow_param@/ig, `''`)
    }
    _sql = _sql.replace(/@works_flow_detail_id@/ig, `'${detailId}'`)
    _sql = _sql.replace(/@status@/ig, `'${status}'`)
    _sql = _sql.replace(/@statusname@/ig, `'${statusName}'`)
    _sql = _sql.replace(/@work_group@/ig, `'${sessionStorage.getItem('work_group') || ''}'`)
    _sql = _sql.replace(/@work_grade@/ig, `'${sessionStorage.getItem('work_grade') || 0}'`)
  }
  if (_backCustomScript) {
    _sql += _backCustomScript
  }
@@ -2124,9 +2200,9 @@
  _sql = _sql.replace(/@typename@/ig, `'admin'`)
  if (sessionStorage.getItem('dataM') === 'true') { // 数据权限
    _sql = _sql.replace(/@datam@/ig, '\'Y\'')
    _sql = _sql.replace(/\$@/ig, '/*').replace(/@\$/ig, '*/').replace(/@datam@/ig, `'Y'`)
  } else {
    _sql = _sql.replace(/@datam@/ig, '\'\'')
    _sql = _sql.replace(/@\$|\$@/ig, '').replace(/@datam@/ig, `''`)
  }
  if (window.GLOB.debugger === true) {
@@ -2135,20 +2211,6 @@
  }
  if (retmsg) {
    _callbacksql = _callbacksql.replace(/@ID@/ig, `'${primaryId || ''}'`)
    _callbacksql = _callbacksql.replace(/@BID@/ig, `'${BID}'`)
    _callbacksql = _callbacksql.replace(/@LoginUID@/ig, `'${sessionStorage.getItem('LoginUID') || ''}'`)
    _callbacksql = _callbacksql.replace(/@SessionUid@/ig, `'${localStorage.getItem('SessionUid') || ''}'`)
    _callbacksql = _callbacksql.replace(/@UserID@/ig, `'${sessionStorage.getItem('UserID') || ''}'`)
    _callbacksql = _callbacksql.replace(/@Appkey@/ig, `'${window.GLOB.appkey || ''}'`)
    _callbacksql = _callbacksql.replace(/@typename@/ig, `'admin'`)
    if (sessionStorage.getItem('dataM') === 'true') { // 数据权限
      _callbacksql = _callbacksql.replace(/@datam@/ig, '\'Y\'')
    } else {
      _callbacksql = _callbacksql.replace(/@datam@/ig, '\'\'')
    }
    return {
      sql: _sql,
      callbacksql: _callbacksql
src/views/menudesign/index.jsx
@@ -36,6 +36,7 @@
const PasteController = asyncComponent(() => import('@/menu/pastecontroller'))
const StyleController = asyncComponent(() => import('@/menu/stylecontroller'))
const ReplaceField = asyncComponent(() => import('@/menu/replaceField'))
// const Debug = asyncComponent(() => import('@/menu/debug'))
const NormalCss = asyncComponent(() => import('@/menu/normalCss'))
const Versions = asyncComponent(() => import('@/menu/versions'))
const TableNodes = asyncComponent(() => import('@/menu/tablenodes'))
@@ -1108,7 +1109,7 @@
    return (
      <ConfigProvider locale={_locale}>
        <Header />
        <Header menuName={config ? config.MenuName : ''}/>
        <DndProvider backend={HTML5Backend}>
          {view !== 'popview' ? <div className={'pc-menu-view ' + (MenuType || '')}>
            <div className="menu-body">
@@ -1159,8 +1160,9 @@
                </Collapse>
              </div>
              <div className={'menu-view' + (menuloading ? ' saving' : '') + (eyeopen ? ' eye-open' : '')}>
                <Card title={config ? config.MenuName : ''} bordered={false} extra={
                <Card bordered={false} extra={
                  <div className="mk-opeartion-list">
                    {/* <Debug config={config}/> */}
                    <Button className="mk-border-purple" onClick={() => this.setState({eyeopen: !eyeopen})}>{!eyeopen ? <EyeOutlined /> : <EyeInvisibleOutlined />} 组件名</Button>
                    <Versions MenuId={MenuId} open_edition={config ? config.open_edition : ''}/>
                    <TableNodes config={config} />
src/views/menudesign/index.scss
@@ -189,8 +189,8 @@
            button {
              margin-left: 10px;
            }
            >div >div >button, .style-control-button {
              padding: 0px 7px;
            .mk-opeartion-list button:not(.ant-switch):not(:last-child):not(:nth-last-child(2)) {
              padding: 0px 10px;
            }
            .ant-switch.big {
              min-width: 60px;
src/views/mkiframe/index.jsx
@@ -32,8 +32,10 @@
          let values = event.newValue
          values = JSON.parse(values)
          window.GLOB.mkThdMenus = values.mkThdMenus
          window.GLOB.mkActions = values.mkActions
          values.mkThdMenus && values.mkThdMenus.forEach(item => {
            window.GLOB.mkThdMenus.set(item.MenuID, item)
          })
        } else if (event.key === 'menuUpdate') {
          let vals = event.newValue.split(',')
          let MenuId = vals[1]
src/views/mobdesign/index.scss
@@ -323,7 +323,7 @@
    }
  }
  .menu-control {
    .back-view, .mk-view-paste, .quote-wrap, .mk-sys-interface, .set-home, .set-login, .mk-replace-field {
    .quote-wrap, .set-home, .set-login {
      display: none!important;
    }
  }
src/views/tabledesign/index.jsx
@@ -34,6 +34,7 @@
const BgController = asyncComponent(() => import('@/pc/bgcontroller'))
const StyleController = asyncComponent(() => import('@/menu/stylecontroller'))
const ReplaceField = asyncComponent(() => import('@/menu/replaceField'))
// const Debug = asyncComponent(() => import('@/menu/debug'))
const Versions = asyncComponent(() => import('@/menu/versions'))
const Transfer = asyncComponent(() => import('@/menu/transfer'))
const Unattended = asyncComponent(() => import('@/templates/zshare/unattended'))
@@ -822,7 +823,7 @@
    return (
      <ConfigProvider locale={_locale}>
        <Header />
        <Header menuName={config ? config.MenuName : ''}/>
        <DndProvider backend={HTML5Backend}>
        {view !== 'popview' ? <div className="pc-table-view">
            <div className="menu-body">
@@ -869,10 +870,9 @@
                </Collapse>
              </div>
              <div className={'menu-view' + (menuloading ? ' saving' : '')}>
                <Card title={
                  <div style={{paddingLeft: '15px'}}> {config && config.MenuName} </div>
                } bordered={false} extra={
                  <div>
                <Card bordered={false} extra={
                  <div className="mk-opeartion-list">
                    {/* {config ? <Debug config={config}/> : null} */}
                    {config ? <Transfer config={config}/> : null}
                    {config ? <Unattended config={config} updateConfig={this.updateConfig}/> : null}
                    <Versions MenuId={MenuId} open_edition={config ? config.open_edition : ''}/>
src/views/tabledesign/index.scss
@@ -148,8 +148,8 @@
            button {
              margin-left: 15px;
            }
            >div >div >button, .style-control-button {
              padding: 0px 7px;
            .mk-opeartion-list button:not(.ant-switch):not(:last-child):not(:nth-last-child(2)) {
              padding: 0px 10px;
            }
            .ant-switch.big {
              min-width: 60px;