king
2023-11-05 ab949bb71eadda3ec1736ccdcfaa1b12b04cce6a
Merge branch 'develop'
44个文件已修改
1280 ■■■■ 已修改文件
src/assets/css/viewstyle.scss 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/header/index.jsx 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/index.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/share/actioncomponent/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/table/edit-table/columns/editColumn/formconfig.jsx 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/table/edit-table/columns/editColumn/index.jsx 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/table/edit-table/columns/index.jsx 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/table/edit-table/columns/index.scss 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/table/edit-table/columns/tableIn/customscript/index.jsx 70 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/table/edit-table/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/table/edit-table/options.jsx 52 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/datasource/verifycard/customscript/index.jsx 70 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/datasource/verifycard/settingform/index.jsx 60 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/basetable/index.jsx 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/cardcellList/index.jsx 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/table/edit-table/normalTable/index.jsx 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/table/edit-table/normalTable/index.scss 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/table/edit-table/normalTable/mkPopSelect/index.jsx 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/index.jsx 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/popview/index.jsx 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/actionList/printbutton/index.jsx 60 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/actioncomponent/verifyexcelin/customscript/index.jsx 70 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/actioncomponent/verifyexcelout/customscript/index.jsx 69 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/actioncomponent/verifyexcelout/datasource/index.jsx 53 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/actioncomponent/verifyprint/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/searchcomponent/searchform/index.jsx 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/settingcomponent/settingform/datasource/index.jsx 53 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/treesettingcomponent/settingform/datasource/index.jsx 53 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/customscript/index.jsx 73 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/modalform/index.jsx 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/verifycard/callbackcustomscript/index.jsx 72 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/verifycard/customform/index.jsx 70 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/verifycard/customscript/index.jsx 70 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/utils-custom.js 147 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/utils.js 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/billprint/index.jsx 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/login/index.jsx 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/menudesign/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/menudesign/menuform/index.jsx 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/menudesign/menuform/index.scss 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/sso/index.jsx 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tabledesign/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tabledesign/menuform/index.jsx 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tabledesign/menuform/index.scss 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/css/viewstyle.scss
@@ -219,7 +219,7 @@
    }
    .ant-pagination-options {
      > div:not(:first-child) {
        z-index: 1;
        z-index: 3;
      }
    }
  }
src/components/header/index.jsx
@@ -328,6 +328,7 @@
                  trdItem.type = PageParam.Template || 'CommonTable'
                  trdItem.OpenType = PageParam.OpenType || 'newtab'
                  trdItem.hidden = PageParam.hidden || 'false'
                  trdItem.menuColor = PageParam.menuColor || ''
                  if (trdItem.type === 'NewPage') {
                    trdItem.OpenType = 'newpage'
@@ -706,7 +707,7 @@
                            <div className="title" onClick={e => e.stopPropagation()}>{cell.MenuName}</div>
                            <div className="menu-detail">
                              {cell.children && cell.children.map(m => (
                                <div key={m.MenuID} title={m.MenuName} onClick={() => {this.changeVerMenu(m)}}>
                                <div key={m.MenuID} title={m.MenuName} style={m.menuColor ? {color: m.menuColor} : null} onClick={() => {this.changeVerMenu(m)}}>
                                  {m.MenuName}
                                </div>
                              ))}
src/index.js
@@ -175,6 +175,7 @@
        GLOB.showline = _systemMsg.showline || ''
        GLOB.navBar = _systemMsg.navBar || 'shutter'
        GLOB.appVersion = _systemMsg.app_version || ''
        sessionStorage.setItem('appname', _systemMsg.appname || '')
        let levels = [30, 10, 20, 40, 50, 60, 70, 80, 90, 100]
src/menu/components/share/actioncomponent/index.jsx
@@ -136,7 +136,7 @@
  changeBtnStyle = (element) => {
    let _style = element.style ? fromJS(element.style).toJS() : {}
    let options = ['font', 'border', 'background', 'margin', 'padding']
    let options = ['font', 'border', 'background', 'margin', 'padding', 'minHeight']
    this.setState({
      card: element
src/menu/components/table/edit-table/columns/editColumn/formconfig.jsx
@@ -600,6 +600,14 @@
      options: fields
    },
    {
      type: 'text',
      key: 'ctrlValue',
      label: '禁止值',
      initVal: card.ctrlValue || '',
      tooltip: '多个值用逗号分隔。',
      required: false
    },
    {
      type: 'select',
      key: 'clearField',
      label: '清空字段',
@@ -608,14 +616,6 @@
      allowClear: true,
      required: false,
      options: fields
    },
    {
      type: 'text',
      key: 'ctrlValue',
      label: '禁止值',
      initVal: card.ctrlValue || '',
      tooltip: '多个值用逗号分隔。',
      required: false
    },
    {
      type: 'number',
src/menu/components/table/edit-table/columns/editColumn/index.jsx
@@ -6,6 +6,7 @@
import Api from '@/api'
import Utils from '@/utils/utils.js'
import { checkSQL } from '@/utils/utils-custom.js'
import { getColumnForm } from './formconfig'
import asyncComponent from '@/utils/asyncComponent'
import { formRule } from '@/utils/option.js'
@@ -521,16 +522,9 @@
        }
        if (values.dataSource) {
          let error = Utils.verifySql(values.dataSource)
          let pass = checkSQL(values.dataSource)
  
          if (error) {
            notification.warning({
              top: 92,
              message: '数据源中不可使用' + error,
              duration: 5
            })
            return
          }
          if (!pass) return
        }
        if (values.editType === 'select' && values.resourceType === '1' && values.dataSource) {
src/menu/components/table/edit-table/columns/index.jsx
@@ -190,8 +190,9 @@
class NormalTableColumns extends Component {
  static propTpyes = {
    config: PropTypes.object,       // 配置信息
    updatecolumn: PropTypes.func    // 数据变化
    config: PropTypes.object,
    updatecolumn: PropTypes.func,
    addColumns: PropTypes.func
  }
  state = {
@@ -691,6 +692,7 @@
          } trigger="hover">
            <Button className="submit-btn" style={config.submit.style} onDoubleClick={() => this.setState({visible: true})} type="primary">提交</Button>
          </Popover>
          <PlusOutlined title="添加列" onClick={this.props.addColumns}/>
          <CopyOutlined title="复制显示列" onClick={this.copycolumn} />
          <MarkColumn columns={fields} type="line" marks={lineMarks} onSubmit={this.updateLineMarks} />
          <ColsControl config={config} onSubmit={this.props.updatecolumn}/>
src/menu/components/table/edit-table/columns/index.scss
@@ -109,7 +109,7 @@
      margin-right: 10px;
      cursor: pointer;
    }
    >.anticon-copy {
    >.anticon-copy, >.anticon-plus {
      color: #26C281;
      margin-left: 5px;
    }
src/menu/components/table/edit-table/columns/tableIn/customscript/index.jsx
@@ -3,8 +3,8 @@
import { Form, Row, Col, Button, notification, Modal, Tooltip, Radio, Select, Switch } from 'antd'
import { QuestionCircleOutlined } from '@ant-design/icons'
import Utils from '@/utils/utils.js'
import Api from '@/api'
import { checkSQL } from '@/utils/utils-custom.js'
import CodeMirror from '@/templates/zshare/codemirror'
import './index.scss'
@@ -95,73 +95,9 @@
          values.status = editItem.status || 'true'
        }
        let _quot = values.sql.match(/'{1}/g)
        let _lparen = values.sql.match(/\({1}/g)
        let _rparen = values.sql.match(/\){1}/g)
        let pass = checkSQL(values.sql, 'customscript')
        _quot = _quot ? _quot.length : 0
        _lparen = _lparen ? _lparen.length : 0
        _rparen = _rparen ? _rparen.length : 0
        if (_quot % 2 !== 0) {
          notification.warning({
            top: 92,
            message: 'sql中\'必须成对出现',
            duration: 5
          })
          return
        } else if (_lparen !== _rparen) {
          notification.warning({
            top: 92,
            message: 'sql中()必须成对出现',
            duration: 5
          })
          return
        } else if (/--/ig.test(values.sql)) {
          notification.warning({
            top: 92,
            message: '自定义sql语句中,不可出现字符 -- ,注释请用 /*内容*/',
            duration: 5
          })
          return
        } else if (/,,/ig.test(values.sql)) {
          notification.warning({
            top: 92,
            message: '自定义sql语句中,不可出现连续的英文逗号(,,)',
            duration: 5
          })
          return
        } else if (/\son\s+[a-z0-9_]+\.[a-z0-9_]+\s*=\s*[a-z0-9_]+\.[a-z0-9_]+/ig.test(values.sql)) {
          let list = values.sql.match(/\son\s+[a-z0-9_]+\.[a-z0-9_]+\s*=\s*[a-z0-9_]+\.[a-z0-9_]+/ig)
          let errors = []
          list.forEach(str => {
            str = str.replace(/^\s/, '')
            let strs = str.match(/(\s|=)[a-z0-9_]+\./ig)
            if (strs.length === 2 && (strs[0].replace(/\s|\./g, '') === strs[1].replace(/\s|\./g, ''))) {
              errors.push(str)
            }
          })
          if (errors.length > 0) {
            notification.warning({
              top: 92,
              message: '不可使用同一个表字段进行关联:' + errors.join('、'),
              duration: 5
            })
            return
          }
        }
        let error = Utils.verifySql(values.sql, 'customscript')
        if (error) {
          notification.warning({
            top: 92,
            message: 'sql中不可使用' + error,
            duration: 5
          })
          return
        }
        if (!pass) return
        let sheet = btn.sheet.replace(/(.*)\.(.*)\.|@db@/ig, '')
        let tail = `
src/menu/components/table/edit-table/index.jsx
@@ -371,7 +371,7 @@
        </Popover>
        <SearchComponent config={card} updatesearch={this.updateComponent}/>
        <ActionComponent config={card} setSubConfig={this.setSubConfig} updateaction={this.updateComponent}/>
        <ColumnComponent config={card} updatecolumn={this.updatecolumn}/>
        <ColumnComponent config={card} updatecolumn={this.updatecolumn} addColumns={this.addColumns}/>
        <div className="component-name">
          <div className="center">
            <div className="title" onDoubleClick={() => {
src/menu/components/table/edit-table/options.jsx
@@ -78,18 +78,18 @@
        {value: 'multi', label: '整体'},
      ]
    },
    {
      type: 'radio',
      field: 'cache',
      label: '缓存',
      initval: wrap.cache || 'true',
      tooltip: '对于使用数据源的下拉菜单,下拉选项是否缓存到本地。',
      required: false,
      options: [
        {value: 'true', label: '使用'},
        {value: 'false', label: '不使用'},
      ]
    },
    // {
    //   type: 'radio',
    //   field: 'cache',
    //   label: '缓存',
    //   initval: wrap.cache || 'true',
    //   tooltip: '对于使用数据源的下拉菜单,下拉选项是否缓存到本地。',
    //   required: false,
    //   options: [
    //     {value: 'true', label: '使用'},
    //     {value: 'false', label: '不使用'},
    //   ]
    // },
    {
      type: 'radio',
      field: 'tableType',
@@ -100,6 +100,20 @@
        {value: '', label: '不可选'},
        {value: 'radio', label: '单选'},
        {value: 'checkbox', label: '多选'},
      ]
    },
    {
      type: 'radio',
      field: 'size',
      label: '表格大小',
      initval: wrap.size || 'middle',
      tooltip: '表格的内边距,从大到小依次递减。',
      required: false,
      options: [
        {value: 'default', label: '大'},
        {value: 'middle', label: '中'},
        {value: 'small', label: '小'},
        {value: 'mini', label: '迷你'},
      ]
    },
    {
@@ -122,20 +136,6 @@
      options: [
        {value: 'show', label: '显示'},
        {value: 'hidden', label: '隐藏'},
      ]
    },
    {
      type: 'radio',
      field: 'size',
      label: '表格大小',
      initval: wrap.size || 'middle',
      tooltip: '表格的内边距,从大到小依次递减。',
      required: false,
      options: [
        {value: 'default', label: '大'},
        {value: 'middle', label: '中'},
        {value: 'small', label: '小'},
        {value: 'mini', label: '迷你'},
      ]
    },
    {
src/menu/datasource/verifycard/customscript/index.jsx
@@ -6,7 +6,7 @@
import Toast from 'antd-mobile/es/components/toast'
import Dialog from 'antd-mobile/es/components/dialog'
import Utils from '@/utils/utils.js'
import { checkSQL } from '@/utils/utils-custom.js'
import CodeMirror from '@/templates/zshare/codemirror'
import MKEmitter from '@/utils/events.js'
import './index.scss'
@@ -107,73 +107,9 @@
        values.uuid = this.state.editItem ? this.state.editItem.uuid : ''
        let _quot = values.sql.match(/'{1}/g)
        let _lparen = values.sql.match(/\({1}/g)
        let _rparen = values.sql.match(/\){1}/g)
        let pass = checkSQL(values.sql, 'customscript')
        _quot = _quot ? _quot.length : 0
        _lparen = _lparen ? _lparen.length : 0
        _rparen = _rparen ? _rparen.length : 0
        if (_quot % 2 !== 0) {
          notification.warning({
            top: 92,
            message: 'sql中\'必须成对出现',
            duration: 5
          })
          return
        } else if (_lparen !== _rparen) {
          notification.warning({
            top: 92,
            message: 'sql中()必须成对出现',
            duration: 5
          })
          return
        } else if (/--/ig.test(values.sql)) {
          notification.warning({
            top: 92,
            message: '自定义sql语句中,不可出现字符 -- ,注释请用 /*内容*/',
            duration: 5
          })
          return
        } else if (/,,/ig.test(values.sql)) {
          notification.warning({
            top: 92,
            message: '自定义sql语句中,不可出现连续的英文逗号(,,)',
            duration: 5
          })
          return
        } else if (/\son\s+[a-z0-9_]+\.[a-z0-9_]+\s*=\s*[a-z0-9_]+\.[a-z0-9_]+/ig.test(values.sql)) {
          let list = values.sql.match(/\son\s+[a-z0-9_]+\.[a-z0-9_]+\s*=\s*[a-z0-9_]+\.[a-z0-9_]+/ig)
          let errors = []
          list.forEach(str => {
            str = str.replace(/^\s/, '')
            let strs = str.match(/(\s|=)[a-z0-9_]+\./ig)
            if (strs.length === 2 && (strs[0].replace(/\s|\./g, '') === strs[1].replace(/\s|\./g, ''))) {
              errors.push(str)
            }
          })
          if (errors.length > 0) {
            notification.warning({
              top: 92,
              message: '不可使用同一个表字段进行关联:' + errors.join('、'),
              duration: 5
            })
            return
          }
        }
        let error = Utils.verifySql(values.sql, 'customscript')
        if (error) {
          notification.warning({
            top: 92,
            message: 'sql中不可使用' + error,
            duration: 5
          })
          return
        }
        if (!pass) return
        if (skip) {
          this.setState({
src/menu/datasource/verifycard/settingform/index.jsx
@@ -5,8 +5,8 @@
import { QuestionCircleOutlined, PlusOutlined } from '@ant-design/icons'
import { formRule } from '@/utils/option.js'
import Utils from '@/utils/utils.js'
import MenuUtils from '@/utils/utils-custom.js'
import { checkSQL } from '@/utils/utils-custom.js'
import CodeMirror from '@/templates/zshare/codemirror'
import KeyInterface from '@/components/keyInterface'
import './index.scss'
@@ -108,56 +108,9 @@
          // 数据源前端验证
          if (values.interType === 'system' && values.execute !== 'false' && values.dataresource) {
            let _quot = values.dataresource.match(/'{1}/g)
            let _lparen = values.dataresource.match(/\({1}/g)
            let _rparen = values.dataresource.match(/\){1}/g)
            let pass = checkSQL(values.dataresource)
            _quot = _quot ? _quot.length : 0
            _lparen = _lparen ? _lparen.length : 0
            _rparen = _rparen ? _rparen.length : 0
            if (_quot % 2 !== 0) {
              notification.warning({
                top: 92,
                message: '数据源中\'必须成对出现',
                duration: 5
              })
              reject()
              return
            } else if (_lparen !== _rparen) {
              notification.warning({
                top: 92,
                message: '数据源中()必须成对出现',
                duration: 5
              })
              reject()
              return
            } else if (/--/ig.test(values.dataresource)) {
              notification.warning({
                top: 92,
                message: '数据源中,不可出现字符 -- ,注释请用 /*内容*/',
                duration: 5
              })
              reject()
              return
            } else if (/,,/ig.test(values.dataresource)) {
              notification.warning({
                top: 92,
                message: '数据源中,不可出现连续的英文逗号(,,)',
                duration: 5
              })
              reject()
              return
            }
            let error = Utils.verifySql(values.dataresource)
            if (error) {
              notification.warning({
                top: 92,
                message: '数据源中不可使用' + error,
                duration: 5
              })
            if (!pass) {
              reject()
              return
            }
@@ -521,12 +474,7 @@
              </Form.Item>
            </Col> : null}
            {config.pageable && setting.laypage !== 'false' ? <Col span={8}>
              <Form.Item label={
                <Tooltip placement="topLeft" title="选择分页时有效。">
                  <QuestionCircleOutlined className="mk-form-tip" />
                  每页数量
                </Tooltip>
              }>
              <Form.Item label="每页数量">
                {getFieldDecorator('pageSize', {
                  initialValue: setting.pageSize || 10,
                  rules: [
src/tabviews/basetable/index.jsx
@@ -516,6 +516,8 @@
  getPrinter = (item, parentId) => {
    let _item = window.GLOB.UserCacheMap.get(parentId + item.uuid)
    item.verify.logLabel = item.logLabel
    if (_item) {
      item.printer = _item.printer || ''
      item.verify.defaultPrinter = _item.printer || ''
src/tabviews/custom/components/card/cardcellList/index.jsx
@@ -294,12 +294,13 @@
  
        if (card.datatype === 'static') {
          val = card.value || ''
          if (/@username@|@fullName@|@mk_city@|@bid@/ig.test(val)) {
          if (/@username@|@fullName@|@mk_city@|@appname@|@bid@/ig.test(val)) {
            let userName = sessionStorage.getItem('User_Name') || ''
            let fullName = sessionStorage.getItem('Full_Name') || ''
            let city = sessionStorage.getItem('city') || ''
            let appname = sessionStorage.getItem('appname') || ''
            let bid = data.$$BID || ''
            val = val.replace(/@username@/ig, userName).replace(/@fullName@/ig, fullName).replace(/@mk_city@/ig, city).replace(/@bid@/ig, bid)
            val = val.replace(/@username@/ig, userName).replace(/@fullName@/ig, fullName).replace(/@mk_city@/ig, city).replace(/@appname@/ig, appname).replace(/@bid@/ig, bid)
          } else if (/@month@/ig.test(val)) {
            val = val.replace(/@month@/ig, new Date().toLocaleString('en-US', { month: 'long' }))
          } else if (/@week@/ig.test(val)) {
@@ -813,7 +814,7 @@
  
            val += _val
          })
        } else if (data && data.$$empty) {
        } else if (data && data.$$empty && /@.*@/.test(card.formula)) {
          val = ''
        } else if (data) {
          let _val = card.formula
src/tabviews/custom/components/table/edit-table/normalTable/index.jsx
@@ -1389,7 +1389,7 @@
              if (item.resourceType === '1') {
                let _option = Utils.getSelectQueryOptions(item)
  
                if (/@BID@/ig.test(_option.sql)) {
                if (/@BID@/ig.test(_option.sql) && setting.supModule) {
                  hasBid = true
                }
        
@@ -1490,14 +1490,11 @@
      pageOptions,
      columns: _columns,
      tableId: setting.tableId,
      orderfields
      orderfields,
      deForms: hasBid ? deForms : null
    }, () => {
      if (deForms.length > 0) {
        if (hasBid && setting.supModule && !BID) {
          this.setState({ deForms })
        } else {
      if (deForms.length > 0 && (!hasBid || BID)) {
          this.improveActionForm(deForms, BID)
        }
      }
    })
  }
@@ -1793,12 +1790,9 @@
  }
  improveActionForm = (deForms, BID) => {
    const { setting } = this.props
    let deffers = []
    let mainItems = []  // 云端或单点数据
    let localItems = [] // 本地数据
    let cache = setting.cache !== 'false'
    let debug = window.GLOB.debugger === true
    let _sql = `Declare @mk_departmentcode nvarchar(512),@mk_organization nvarchar(512),@mk_user_type nvarchar(20)  select @mk_departmentcode='${sessionStorage.getItem('departmentcode') || ''}',@mk_organization='${sessionStorage.getItem('organization') || ''}',@mk_user_type='${sessionStorage.getItem('mk_user_type') || ''}'\n`
    let _sso = _sql
@@ -1850,7 +1844,7 @@
      deffers.push(
        new Promise(resolve => {
          Api.getSystemCacheConfig(param, cache).then(res => {
          Api.getSystemCacheConfig(param, false).then(res => {
            if (!res.status) {
              notification.warning({
                top: 92,
@@ -1885,7 +1879,7 @@
      deffers.push(
        new Promise(resolve => {
          Api.getSystemCacheConfig(mainparam, cache).then(res => {
          Api.getSystemCacheConfig(mainparam, false).then(res => {
            if (!res.status) {
              notification.warning({
                top: 92,
src/tabviews/custom/components/table/edit-table/normalTable/index.scss
@@ -186,6 +186,7 @@
        right: 0px;
        bottom: 0px;
        border: 1px solid var(--mk-sys-color);
        background: #ffffff;
      }
    }
    .ant-calendar-picker {
src/tabviews/custom/components/table/edit-table/normalTable/mkPopSelect/index.jsx
@@ -284,7 +284,7 @@
    this.props.onChange(values, record.$$uuid)
    this.setState({visible: false})
    this.setState({visible: false, value: record.$$uuid})
    if (config.$ctrl) {
      MKEmitter.emit('colBlur' + config.tableId, lineId, config.uuid)
@@ -294,11 +294,13 @@
    if (config.enter === '$noAct') return
    setTimeout(() => {
    if (/\$next/.test(config.enter)) {
      MKEmitter.emit('nextLine' + config.tableId, lineId, config.enter.replace('$next_', ''))
    } else {
      MKEmitter.emit('setFocus' + config.tableId, lineId, config.enter)
    }
    }, 10)
  }
  trigger = (e) => {
src/tabviews/custom/index.jsx
@@ -990,6 +990,8 @@
  getPrinter = (item, parentId) => {
    let _item = window.GLOB.UserCacheMap.get(parentId + item.uuid)
    item.verify.logLabel = item.logLabel
    if (_item) {
      item.printer = _item.printer || ''
      item.verify.defaultPrinter = _item.printer || ''
src/tabviews/custom/popview/index.jsx
@@ -699,24 +699,6 @@
    return cell
  }
  getPrinter = (item, parentId) => {
    let _item = window.GLOB.UserCacheMap.get(parentId + item.uuid)
    if (_item) {
      item.printer = _item.printer || ''
      item.verify.defaultPrinter = _item.printer || ''
      if (item.verify.printerTypeList && _item.printerList) {
        item.verify.printerTypeList = item.verify.printerTypeList.map(cell => {
          cell.printer = _item.printerList[cell.Value] || ''
          return cell
        })
      }
    }
    return item
  }
  // 格式化默认设置
  formatSetting = (components, params, regs, balMap) => {
    let delay = 20
src/tabviews/zshare/actionList/printbutton/index.jsx
@@ -270,6 +270,9 @@
            Object.keys(cell).forEach(key => {
              let _key = key.toLowerCase()
              if (/^\$/.test(_key)) return
              _cell[_key] = cell[key]
            })
@@ -564,16 +567,28 @@
  execCustomPrint = (printlist, formdata) => {
    const { btn } = this.props
    let callback = null
    if (/callback\(\)/.test(btn.verify.printFunc)) {
      callback = () => {
    this.execSuccess({
      ErrCode: '-1',
      message: '',
      status: true
    })
      }
    } else {
      this.execSuccess({
        ErrCode: '-1',
        message: '',
        status: true
      })
    }
    try {
      // eslint-disable-next-line
      let func = new Function('data', 'form', 'printer', 'notification', 'Api', 'systemType', btn.verify.printFunc)
      func(printlist, formdata, btn.verify, notification, Api, window.GLOB.systemType)
      let func = new Function('data', 'form', 'printer', 'notification', 'Api', 'systemType', 'callback', btn.verify.printFunc)
      func(printlist, formdata, btn.verify, notification, Api, window.GLOB.systemType, callback)
      // 自定义打印示例
      // let defaultPrinter = printer.defaultPrinter || 'lackprinter'
@@ -769,18 +784,11 @@
    } catch (e) {
      console.warn(e)
      try {
        // eslint-disable-next-line
        let evalfunc = eval('(true && function (data, form, printer, notification, Api, systemType) {' + btn.verify.printFunc + '})')
        evalfunc(printlist, formdata, btn.verify, notification, Api, window.GLOB.systemType)
      } catch (error) {
        console.warn(error)
        notification.warning({
          top: 92,
          message: '自定义函数执行错误!',
          duration: 5
        })
      }
    }
  }
@@ -1761,26 +1769,35 @@
      return
    }
    if (printerList.length === 0) {
      this.execSuccess({
        ErrCode: '-1',
        message: '未获取到打印信息!',
        status: true
      })
      return
    }
    if (!socket || socket.readyState !== 1 || socket.url !== 'ws://' + btn.verify.linkUrl) {
      socket = new WebSocket('ws://' + btn.verify.linkUrl)
    } else {
      this.syncMessageSend(printerList)
      this.syncMessageSend(printerList, () => {
      this.execSuccess({
        ErrCode: 'S',
        message: '打印请求已发出。',
        status: true
      })
      })
    }
    // 打开Socket
    socket.onopen = () =>{
      this.syncMessageSend(printerList)
      this.syncMessageSend(printerList, () => {
      this.execSuccess({
        ErrCode: 'S',
        message: '打印请求已发出。',
        status: true
        })
      })
    }
    // 监听消息
@@ -1835,17 +1852,26 @@
    }
  }
  syncMessageSend = (list) => {
  syncMessageSend = (list, callback) => {
    let param = list.shift()
    if (socket && param) {
    if (socket) {
      try {
      socket.send(JSON.stringify(param))
      } catch(e) {
        console.warn('打印请求发送失败!')
      }
    }
    if (list && list.length > 0) {
      setTimeout(() => {this.syncMessageSend(list)}, 3000)
    if (list.length > 0) {
      setTimeout(() => {
        this.syncMessageSend(list, callback)
      }, 3000)
    } else {
      callback()
    }
  }
  /**
   * @description 操作成功后处理
   * 1、excel导出,成功后取消导出按钮加载中状态
src/templates/sharecomponent/actioncomponent/verifyexcelin/customscript/index.jsx
@@ -4,8 +4,8 @@
import { Form, Row, Col, Button, notification, Modal, Tooltip, Radio, Select, Switch } from 'antd'
import { QuestionCircleOutlined } from '@ant-design/icons'
import Utils from '@/utils/utils.js'
import Api from '@/api'
import { checkSQL } from '@/utils/utils-custom.js'
import CodeMirror from '@/templates/zshare/codemirror'
import './index.scss'
@@ -112,73 +112,9 @@
          values.status = editItem.status || 'true'
        }
        let _quot = values.sql.match(/'{1}/g)
        let _lparen = values.sql.match(/\({1}/g)
        let _rparen = values.sql.match(/\){1}/g)
        let pass = checkSQL(values.sql, 'customscript')
        _quot = _quot ? _quot.length : 0
        _lparen = _lparen ? _lparen.length : 0
        _rparen = _rparen ? _rparen.length : 0
        if (_quot % 2 !== 0) {
          notification.warning({
            top: 92,
            message: 'sql中\'必须成对出现',
            duration: 5
          })
          return
        } else if (_lparen !== _rparen) {
          notification.warning({
            top: 92,
            message: 'sql中()必须成对出现',
            duration: 5
          })
          return
        } else if (/--/ig.test(values.sql)) {
          notification.warning({
            top: 92,
            message: '自定义sql语句中,不可出现字符 -- ,注释请用 /*内容*/',
            duration: 5
          })
          return
        } else if (/,,/ig.test(values.sql)) {
          notification.warning({
            top: 92,
            message: '自定义sql语句中,不可出现连续的英文逗号(,,)',
            duration: 5
          })
          return
        } else if (/\son\s+[a-z0-9_]+\.[a-z0-9_]+\s*=\s*[a-z0-9_]+\.[a-z0-9_]+/ig.test(values.sql)) {
          let list = values.sql.match(/\son\s+[a-z0-9_]+\.[a-z0-9_]+\s*=\s*[a-z0-9_]+\.[a-z0-9_]+/ig)
          let errors = []
          list.forEach(str => {
            str = str.replace(/^\s/, '')
            let strs = str.match(/(\s|=)[a-z0-9_]+\./ig)
            if (strs.length === 2 && (strs[0].replace(/\s|\./g, '') === strs[1].replace(/\s|\./g, ''))) {
              errors.push(str)
            }
          })
          if (errors.length > 0) {
            notification.warning({
              top: 92,
              message: '不可使用同一个表字段进行关联:' + errors.join('、'),
              duration: 5
            })
            return
          }
        }
        let error = Utils.verifySql(values.sql, 'customscript')
        if (error) {
          notification.warning({
            top: 92,
            message: 'sql中不可使用' + error,
            duration: 5
          })
          return
        }
        if (!pass) return
        let sheet = btn.sheet.replace(/(.*)\.(.*)\.|@db@/ig, '')
        let tail = `
src/templates/sharecomponent/actioncomponent/verifyexcelout/customscript/index.jsx
@@ -7,6 +7,7 @@
import Api from '@/api'
import Utils from '@/utils/utils.js'
import { checkSQL } from '@/utils/utils-custom.js'
import CodeMirror from '@/templates/zshare/codemirror'
import './index.scss'
@@ -147,73 +148,9 @@
        
        values.uuid = this.state.editItem ? this.state.editItem.uuid : ''
        let _quot = values.sql.match(/'{1}/g)
        let _lparen = values.sql.match(/\({1}/g)
        let _rparen = values.sql.match(/\){1}/g)
        let pass = checkSQL(values.sql, 'customscript')
        _quot = _quot ? _quot.length : 0
        _lparen = _lparen ? _lparen.length : 0
        _rparen = _rparen ? _rparen.length : 0
        if (_quot % 2 !== 0) {
          notification.warning({
            top: 92,
            message: 'sql中\'必须成对出现',
            duration: 5
          })
          return
        } else if (_lparen !== _rparen) {
          notification.warning({
            top: 92,
            message: 'sql中()必须成对出现',
            duration: 5
          })
          return
        } else if (/--/ig.test(values.sql)) {
          notification.warning({
            top: 92,
            message: '自定义sql语句中,不可出现字符 -- ,注释请用 /*内容*/',
            duration: 5
          })
          return
        } else if (/,,/ig.test(values.sql)) {
          notification.warning({
            top: 92,
            message: '自定义sql语句中,不可出现连续的英文逗号(,,)',
            duration: 5
          })
          return
        } else if (/\son\s+[a-z0-9_]+\.[a-z0-9_]+\s*=\s*[a-z0-9_]+\.[a-z0-9_]+/ig.test(values.sql)) {
          let list = values.sql.match(/\son\s+[a-z0-9_]+\.[a-z0-9_]+\s*=\s*[a-z0-9_]+\.[a-z0-9_]+/ig)
          let errors = []
          list.forEach(str => {
            str = str.replace(/^\s/, '')
            let strs = str.match(/(\s|=)[a-z0-9_]+\./ig)
            if (strs.length === 2 && (strs[0].replace(/\s|\./g, '') === strs[1].replace(/\s|\./g, ''))) {
              errors.push(str)
            }
          })
          if (errors.length > 0) {
            notification.warning({
              top: 92,
              message: '不可使用同一个表字段进行关联:' + errors.join('、'),
              duration: 5
            })
            return
          }
        }
        let error = Utils.verifySql(values.sql, 'customscript')
        if (error) {
          notification.warning({
            top: 92,
            message: 'sql中不可使用' + error,
            duration: 5
          })
          return
        }
        if (!pass) return
        this.setState({
          loading: true
src/templates/sharecomponent/actioncomponent/verifyexcelout/datasource/index.jsx
@@ -3,7 +3,7 @@
import { Form, Row, Col, Input, Radio, Tooltip, notification, InputNumber } from 'antd'
import { QuestionCircleOutlined } from '@ant-design/icons'
import Utils from '@/utils/utils.js'
import { checkSQL } from '@/utils/utils-custom.js'
import asyncComponent from '@/utils/asyncComponent'
import './index.scss'
@@ -44,56 +44,9 @@
            reject()
            return
          } else if (values.defaultSql === 'true' && values.dataresource) {
            let _quot = values.dataresource.match(/'{1}/g)
            let _lparen = values.dataresource.match(/\({1}/g)
            let _rparen = values.dataresource.match(/\){1}/g)
            let pass = checkSQL(values.dataresource)
            _quot = _quot ? _quot.length : 0
            _lparen = _lparen ? _lparen.length : 0
            _rparen = _rparen ? _rparen.length : 0
            if (_quot % 2 !== 0) {
              notification.warning({
                top: 92,
                message: '数据源中\'必须成对出现',
                duration: 5
              })
              reject()
              return
            } else if (_lparen !== _rparen) {
              notification.warning({
                top: 92,
                message: '数据源中()必须成对出现',
                duration: 5
              })
              reject()
              return
            } else if (/--/ig.test(values.dataresource)) {
              notification.warning({
                top: 92,
                message: '数据源中,不可出现字符 -- ,注释请用 /*内容*/',
                duration: 5
              })
              reject()
              return
            } else if (/,,/ig.test(values.dataresource)) {
              notification.warning({
                top: 92,
                message: '数据源中,不可出现连续的英文逗号(,,)',
                duration: 5
              })
              reject()
              return
            }
            let error = Utils.verifySql(values.dataresource)
            if (error) {
              notification.warning({
                top: 92,
                message: '数据源中不可使用' + error,
                duration: 5
              })
            if (!pass) {
              reject()
              return
            }
src/templates/sharecomponent/actioncomponent/verifyprint/index.jsx
@@ -270,7 +270,7 @@
      dataType: _verify.dataType || 'line',
      linkType: _verify.linkType,
      printMode: _verify.printMode,
      printFunc: _verify.printFunc || '// Function(data, form, printer, notification) data-打印数据列表,form-表单信息(不存在时为{}),printer-打印设置,notification-信息提示控件'
      printFunc: _verify.printFunc || '// Function(data, form, printer, notification) data-打印数据列表,form-表单信息(不存在时为{}),printer-打印设置,notification-信息提示控件,callback-释放按钮的回调'
    })
  }
src/templates/sharecomponent/searchcomponent/searchform/index.jsx
@@ -6,6 +6,7 @@
import { dateOptions, matchReg, formRule } from '@/utils/option.js'
import Utils from '@/utils/utils.js'
import { checkSQL } from '@/utils/utils-custom.js'
import CodeMirror from '@/templates/zshare/codemirror'
import asyncComponent from '@/utils/asyncComponent'
import './index.scss'
@@ -828,16 +829,9 @@
            }
          })
          let error = Utils.verifySql(values.dataSource)
          let pass = checkSQL(values.dataSource)
          if (error) {
            notification.warning({
              top: 92,
              message: '数据源中不可使用' + error,
              duration: 5
            })
            return
          }
          if (!pass) return
          resolve(values)
        } else {
src/templates/sharecomponent/settingcomponent/settingform/datasource/index.jsx
@@ -4,7 +4,7 @@
import { QuestionCircleOutlined } from '@ant-design/icons'
import { formRule } from '@/utils/option.js'
import Utils from '@/utils/utils.js'
import { checkSQL } from '@/utils/utils-custom.js'
import asyncComponent from '@/utils/asyncComponent'
// import './index.scss'
@@ -84,56 +84,9 @@
            reject()
            return
          } else if (values.interType === 'system' && values.default !== 'false' && values.dataresource) {
            let _quot = values.dataresource.match(/'{1}/g)
            let _lparen = values.dataresource.match(/\({1}/g)
            let _rparen = values.dataresource.match(/\){1}/g)
            let pass = checkSQL(values.dataresource)
            _quot = _quot ? _quot.length : 0
            _lparen = _lparen ? _lparen.length : 0
            _rparen = _rparen ? _rparen.length : 0
            if (_quot % 2 !== 0) {
              notification.warning({
                top: 92,
                message: '数据源中\'必须成对出现',
                duration: 5
              })
              reject()
              return
            } else if (_lparen !== _rparen) {
              notification.warning({
                top: 92,
                message: '数据源中()必须成对出现',
                duration: 5
              })
              reject()
              return
            } else if (/--/ig.test(values.dataresource)) {
              notification.warning({
                top: 92,
                message: '数据源中,不可出现字符 -- ,注释请用 /*内容*/',
                duration: 5
              })
              reject()
              return
            } else if (/,,/ig.test(values.dataresource)) {
              notification.warning({
                top: 92,
                message: '数据源中,不可出现连续的英文逗号(,,)',
                duration: 5
              })
              reject()
              return
            }
            let error = Utils.verifySql(values.dataresource)
            if (error) {
              notification.warning({
                top: 92,
                message: '数据源中不可使用' + error,
                duration: 5
              })
            if (!pass) {
              reject()
              return
            }
src/templates/sharecomponent/treesettingcomponent/settingform/datasource/index.jsx
@@ -4,7 +4,7 @@
import { QuestionCircleOutlined } from '@ant-design/icons'
import { formRule } from '@/utils/option.js'
import Utils from '@/utils/utils.js'
import { checkSQL } from '@/utils/utils-custom.js'
import CodeMirror from '@/templates/zshare/codemirror'
// import './index.scss'
@@ -73,56 +73,9 @@
            reject()
            return
          } else if (values.interType === 'system' && values.default !== 'false' && values.dataresource) {
            let _quot = values.dataresource.match(/'{1}/g)
            let _lparen = values.dataresource.match(/\({1}/g)
            let _rparen = values.dataresource.match(/\){1}/g)
            let pass = checkSQL(values.dataresource)
            _quot = _quot ? _quot.length : 0
            _lparen = _lparen ? _lparen.length : 0
            _rparen = _rparen ? _rparen.length : 0
            if (_quot % 2 !== 0) {
              notification.warning({
                top: 92,
                message: '数据源中\'必须成对出现',
                duration: 5
              })
              reject()
              return
            } else if (_lparen !== _rparen) {
              notification.warning({
                top: 92,
                message: '数据源中()必须成对出现',
                duration: 5
              })
              reject()
              return
            } else if (/--/ig.test(values.dataresource)) {
              notification.warning({
                top: 92,
                message: '数据源中,不可出现字符 -- ,注释请用 /*内容*/',
                duration: 5
              })
              reject()
              return
            } else if (/,,/ig.test(values.dataresource)) {
              notification.warning({
                top: 92,
                message: '数据源中,不可出现连续的英文逗号(,,)',
                duration: 5
              })
              reject()
              return
            }
            let error = Utils.verifySql(values.dataresource)
            if (error) {
              notification.warning({
                top: 92,
                message: '数据源中不可使用' + error,
                duration: 5
              })
            if (!pass) {
              reject()
              return
            }
src/templates/zshare/customscript/index.jsx
@@ -7,6 +7,7 @@
import Utils from '@/utils/utils.js'
import Api from '@/api'
import { checkSQL } from '@/utils/utils-custom.js'
import CodeMirror from '@/templates/zshare/codemirror'
import asyncComponent from '@/utils/asyncComponent'
import MKEmitter from '@/utils/events.js'
@@ -202,77 +203,13 @@
      return
    }
    let pass = checkSQL(_sql, 'customscript')
    if (!pass) return
    let values = {
      uuid: editItem && editItem.uuid ? editItem.uuid : Utils.getuuid(),
      sql: _sql
    }
    let _quot = values.sql.match(/'{1}/g)
    let _lparen = values.sql.match(/\({1}/g)
    let _rparen = values.sql.match(/\){1}/g)
    _quot = _quot ? _quot.length : 0
    _lparen = _lparen ? _lparen.length : 0
    _rparen = _rparen ? _rparen.length : 0
    if (_quot % 2 !== 0) {
      notification.warning({
        top: 92,
        message: 'sql中\'必须成对出现',
        duration: 5
      })
      return
    } else if (_lparen !== _rparen) {
      notification.warning({
        top: 92,
        message: 'sql中()必须成对出现',
        duration: 5
      })
      return
    } else if (/--/ig.test(values.sql)) {
      notification.warning({
        top: 92,
        message: '自定义sql语句中,不可出现字符 -- ,注释请用 /*内容*/',
        duration: 5
      })
      return
    } else if (/,,/ig.test(values.sql)) {
      notification.warning({
        top: 92,
        message: '自定义sql语句中,不可出现连续的英文逗号(,,)',
        duration: 5
      })
      return
    } else if (/\son\s+[a-z0-9_]+\.[a-z0-9_]+\s*=\s*[a-z0-9_]+\.[a-z0-9_]+/ig.test(values.sql)) {
      let list = values.sql.match(/\son\s+[a-z0-9_]+\.[a-z0-9_]+\s*=\s*[a-z0-9_]+\.[a-z0-9_]+/ig)
      let errors = []
      list.forEach(str => {
        str = str.replace(/^\s/, '')
        let strs = str.match(/(\s|=)[a-z0-9_]+\./ig)
        if (strs.length === 2 && (strs[0].replace(/\s|\./g, '') === strs[1].replace(/\s|\./g, ''))) {
          errors.push(str)
        }
      })
      if (errors.length > 0) {
        notification.warning({
          top: 92,
          message: '不可使用同一个表字段进行关联:' + errors.join('、'),
          duration: 5
        })
        return
      }
    }
    let error = Utils.verifySql(values.sql, 'customscript')
    if (error) {
      notification.warning({
        top: 92,
        message: 'sql中不可使用' + error,
        duration: 5
      })
      return
    }
    let _scripts = fromJS(scripts).toJS()
src/templates/zshare/modalform/index.jsx
@@ -9,6 +9,7 @@
import { dateOptions } from '@/utils/option.js'
import Utils from '@/utils/utils.js'
import EditTable from './modaleditable'
import { checkSQL } from '@/utils/utils-custom.js'
import asyncComponent from '@/utils/asyncComponent'
import CodeMirror from '@/templates/zshare/codemirror'
import './index.scss'
@@ -1075,16 +1076,9 @@
            }
          })
          let error = Utils.verifySql(values.dataSource)
          let pass = checkSQL(values.dataSource)
          if (error) {
            notification.warning({
              top: 92,
              message: '数据源中不可使用' + error,
              duration: 5
            })
            return
          }
          if (!pass) return
          window.GLOB.formId = card.uuid
src/templates/zshare/verifycard/callbackcustomscript/index.jsx
@@ -1,10 +1,10 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { Form, Row, Col, Button, notification, Modal, Tooltip, Radio, Select, Switch } from 'antd'
import { Form, Row, Col, Button, Modal, Tooltip, Radio, Select, Switch } from 'antd'
import { QuestionCircleOutlined } from '@ant-design/icons'
import Utils from '@/utils/utils.js'
import Api from '@/api'
import { checkSQL } from '@/utils/utils-custom.js'
import CodeMirror from '@/templates/zshare/codemirror'
import './index.scss'
@@ -42,73 +42,9 @@
      if (!err) {
        values.uuid = editItem ? editItem.uuid : ''
        let _quot = values.sql.match(/'{1}/g)
        let _lparen = values.sql.match(/\({1}/g)
        let _rparen = values.sql.match(/\){1}/g)
        let pass = checkSQL(values.sql, 'customscript')
        _quot = _quot ? _quot.length : 0
        _lparen = _lparen ? _lparen.length : 0
        _rparen = _rparen ? _rparen.length : 0
        if (_quot % 2 !== 0) {
          notification.warning({
            top: 92,
            message: 'sql中\'必须成对出现',
            duration: 5
          })
          return
        } else if (_lparen !== _rparen) {
          notification.warning({
            top: 92,
            message: 'sql中()必须成对出现',
            duration: 5
          })
          return
        } else if (/--/ig.test(values.sql)) {
          notification.warning({
            top: 92,
            message: '自定义sql语句中,不可出现字符 -- ,注释请用 /*内容*/',
            duration: 5
          })
          return
        } else if (/,,/ig.test(values.sql)) {
          notification.warning({
            top: 92,
            message: '自定义sql语句中,不可出现连续的英文逗号(,,)',
            duration: 5
          })
          return
        } else if (/\son\s+[a-z0-9_]+\.[a-z0-9_]+\s*=\s*[a-z0-9_]+\.[a-z0-9_]+/ig.test(values.sql)) {
          let list = values.sql.match(/\son\s+[a-z0-9_]+\.[a-z0-9_]+\s*=\s*[a-z0-9_]+\.[a-z0-9_]+/ig)
          let errors = []
          list.forEach(str => {
            str = str.replace(/^\s/, '')
            let strs = str.match(/(\s|=)[a-z0-9_]+\./ig)
            if (strs.length === 2 && (strs[0].replace(/\s|\./g, '') === strs[1].replace(/\s|\./g, ''))) {
              errors.push(str)
            }
          })
          if (errors.length > 0) {
            notification.warning({
              top: 92,
              message: '不可使用同一个表字段进行关联:' + errors.join('、'),
              duration: 5
            })
            return
          }
        }
        let error = Utils.verifySql(values.sql, 'customscript')
        if (error) {
          notification.warning({
            top: 92,
            message: 'sql中不可使用' + error,
            duration: 5
          })
          return
        }
        if (!pass) return
        let tail = `
          aaa:
src/templates/zshare/verifycard/customform/index.jsx
@@ -2,8 +2,8 @@
import PropTypes from 'prop-types'
import { Form, Row, Col, Input, Select, Button, notification, Modal, Tooltip } from 'antd'
import Utils from '@/utils/utils.js'
import Api from '@/api'
import { checkSQL } from '@/utils/utils-custom.js'
import CodeMirror from '@/templates/zshare/codemirror'
// import './index.scss'
@@ -60,73 +60,9 @@
        values.uuid = this.state.editItem ? this.state.editItem.uuid : ''
        values.resultName = values.result === 'false' ? '不存在' : '存在'
        let _quot = values.sql.match(/'{1}/g)
        let _lparen = values.sql.match(/\({1}/g)
        let _rparen = values.sql.match(/\){1}/g)
        let pass = checkSQL(values.sql, 'customscript')
        _quot = _quot ? _quot.length : 0
        _lparen = _lparen ? _lparen.length : 0
        _rparen = _rparen ? _rparen.length : 0
        if (_quot % 2 !== 0) {
          notification.warning({
            top: 92,
            message: 'sql中\'必须成对出现',
            duration: 5
          })
          return
        } else if (_lparen !== _rparen) {
          notification.warning({
            top: 92,
            message: 'sql中()必须成对出现',
            duration: 5
          })
          return
        } else if (/--/ig.test(values.sql)) {
          notification.warning({
            top: 92,
            message: '自定义sql语句中,不可出现字符 -- ,注释请用 /*内容*/',
            duration: 5
          })
          return
        } else if (/,,/ig.test(values.sql)) {
          notification.warning({
            top: 92,
            message: '自定义sql语句中,不可出现连续的英文逗号(,,)',
            duration: 5
          })
          return
        } else if (/\son\s+[a-z0-9_]+\.[a-z0-9_]+\s*=\s*[a-z0-9_]+\.[a-z0-9_]+/ig.test(values.sql)) {
          let list = values.sql.match(/\son\s+[a-z0-9_]+\.[a-z0-9_]+\s*=\s*[a-z0-9_]+\.[a-z0-9_]+/ig)
          let errors = []
          list.forEach(str => {
            str = str.replace(/^\s/, '')
            let strs = str.match(/(\s|=)[a-z0-9_]+\./ig)
            if (strs.length === 2 && (strs[0].replace(/\s|\./g, '') === strs[1].replace(/\s|\./g, ''))) {
              errors.push(str)
            }
          })
          if (errors.length > 0) {
            notification.warning({
              top: 92,
              message: '不可使用同一个表字段进行关联:' + errors.join('、'),
              duration: 5
            })
            return
          }
        }
        let error = Utils.verifySql(values.sql)
        if (error) {
          notification.warning({
            top: 92,
            message: 'sql中不可使用' + error,
            duration: 5
          })
          return
        }
        if (!pass) return
        let sql = `${this.props.initsql}
          /* 自定义验证 */
src/templates/zshare/verifycard/customscript/index.jsx
@@ -3,8 +3,8 @@
import { Form, Row, Col, Button, notification, Modal, Tooltip, Radio, Select, Switch } from 'antd'
import { QuestionCircleOutlined } from '@ant-design/icons'
import Utils from '@/utils/utils.js'
import Api from '@/api'
import { checkSQL } from '@/utils/utils-custom.js'
import CodeMirror from '@/templates/zshare/codemirror'
import './index.scss'
@@ -72,73 +72,9 @@
          values.status = editItem.status || 'true'
        }
        let _quot = values.sql.match(/'{1}/g)
        let _lparen = values.sql.match(/\({1}/g)
        let _rparen = values.sql.match(/\){1}/g)
        let pass = checkSQL(values.sql, 'customscript')
        _quot = _quot ? _quot.length : 0
        _lparen = _lparen ? _lparen.length : 0
        _rparen = _rparen ? _rparen.length : 0
        if (_quot % 2 !== 0) {
          notification.warning({
            top: 92,
            message: 'sql中\'必须成对出现',
            duration: 5
          })
          return
        } else if (_lparen !== _rparen) {
          notification.warning({
            top: 92,
            message: 'sql中()必须成对出现',
            duration: 5
          })
          return
        } else if (/--/ig.test(values.sql)) {
          notification.warning({
            top: 92,
            message: '自定义sql语句中,不可出现字符 -- ,注释请用 /*内容*/',
            duration: 5
          })
          return
        } else if (/,,/ig.test(values.sql)) {
          notification.warning({
            top: 92,
            message: '自定义sql语句中,不可出现连续的英文逗号(,,)',
            duration: 5
          })
          return
        } else if (/\son\s+[a-z0-9_]+\.[a-z0-9_]+\s*=\s*[a-z0-9_]+\.[a-z0-9_]+/ig.test(values.sql)) {
          let list = values.sql.match(/\son\s+[a-z0-9_]+\.[a-z0-9_]+\s*=\s*[a-z0-9_]+\.[a-z0-9_]+/ig)
          let errors = []
          list.forEach(str => {
            str = str.replace(/^\s/, '')
            let strs = str.match(/(\s|=)[a-z0-9_]+\./ig)
            if (strs.length === 2 && (strs[0].replace(/\s|\./g, '') === strs[1].replace(/\s|\./g, ''))) {
              errors.push(str)
            }
          })
          if (errors.length > 0) {
            notification.warning({
              top: 92,
              message: '不可使用同一个表字段进行关联:' + errors.join('、'),
              duration: 5
            })
            return
          }
        }
        let error = Utils.verifySql(values.sql, 'customscript')
        if (error) {
          notification.warning({
            top: 92,
            message: 'sql中不可使用' + error,
            duration: 5
          })
          return
        }
        if (!pass) return
        let tail = `
          aaa:
src/utils/utils-custom.js
@@ -1,4 +1,5 @@
import md5 from 'md5'
import { notification } from 'antd'
export default class MenuUtils {
  /**
@@ -1703,3 +1704,149 @@
  return errors
}
/**
 * @description 检测sql
 */
export function checkSQL(sql, type) {
  if (!sql) return true
  let label = '数据源中'
  if (type === 'customscript') {
    label = '自定义sql语句中'
  }
  let _quot = sql.match(/'{1}/g)
  let _lparen = sql.match(/\({1}/g)
  let _rparen = sql.match(/\){1}/g)
  _quot = _quot ? _quot.length : 0
  _lparen = _lparen ? _lparen.length : 0
  _rparen = _rparen ? _rparen.length : 0
  if (_quot % 2 !== 0) {
    notification.warning({
      top: 92,
      message: 'sql中\'必须成对出现',
      duration: 5
    })
    return false
  } else if (_lparen !== _rparen) {
    notification.warning({
      top: 92,
      message: 'sql中()必须成对出现',
      duration: 5
    })
    return false
  } else if (/--/ig.test(sql)) {
    let lines = []
    sql.split(/\n/).forEach((s, i) => {
      if (/--/ig.test(s)) {
        lines.push(i + 1)
      }
    })
    lines = lines.join('、')
    lines = lines ? '(第' + lines + '行)' : ''
    notification.warning({
      top: 92,
      message: label + `${lines},不可出现字符 -- ,注释请用 /*内容*/`,
      duration: 5
    })
    return false
  } else if (/,,/ig.test(sql)) {
    let lines = []
    sql.split(/\n/).forEach((s, i) => {
      if (/,,/ig.test(s)) {
        lines.push(i + 1)
      }
    })
    lines = lines.join('、')
    lines = lines ? '(第' + lines + '行)' : ''
    notification.warning({
      top: 92,
      message: label + `${lines},不可出现连续的英文逗号,,`,
      duration: 5
    })
    return false
  } else if (/‘|’/ig.test(sql)) {
    let lines = []
    sql.split(/\n/).forEach((s, i) => {
      if (/‘|’/ig.test(s)) {
        lines.push(i + 1)
      }
    })
    lines = lines.join('、')
    lines = lines ? '(第' + lines + '行)' : ''
    notification.warning({
      top: 92,
      message: label + `${lines},不可出现中文单引号`,
      duration: 5
    })
    return false
  } else if (type === 'customscript' && /\son\s+[a-z0-9_]+\.[a-z0-9_]+\s*=\s*[a-z0-9_]+\.[a-z0-9_]+/ig.test(sql)) {
    let list = sql.match(/\son\s+[a-z0-9_]+\.[a-z0-9_]+\s*=\s*[a-z0-9_]+\.[a-z0-9_]+/ig)
    let errors = []
    list.forEach(str => {
      str = str.replace(/^\s/, '')
      let strs = str.match(/(\s|=)[a-z0-9_]+\./ig)
      if (strs.length === 2 && (strs[0].replace(/\s|\./g, '') === strs[1].replace(/\s|\./g, ''))) {
        errors.push(str)
      }
    })
    if (errors.length > 0) {
      notification.warning({
        top: 92,
        message: '不可使用同一个表字段进行关联:' + errors.join('、'),
        duration: 5
      })
      return false
    }
  }
  let error = ''
  let chars = [
    {key: 'create', reg: /(^|\s|\(|\))create\s/ig},
    {key: 'insert', reg: /(^|\s|\(|\))insert\s/ig},
    {key: 'delete', reg: /(^|\s|\(|\))delete\s/ig},
    {key: 'update', reg: /(^|\s|\(|\))update\s/ig},
    {key: 'set', reg: /(^|\s|\(|\))set\s/ig},
    {key: 'drop', reg: /(^|\s|\(|\))drop\s/ig},
    {key: 'alter', reg: /(^|\s|\(|\))alter\s/ig},
    {key: 'truncate', reg: /(^|\s|\(|\))truncate\s/ig},
    {key: 'if', reg: /(^|\s|\(|\))if\s/ig},
    {key: 'exec', reg: /(^|\s|\(|\))exec(\s|\()/ig},
    {key: 'OBJECT', reg: /(^|\s|\(|\))object(\s|\()/ig},
    {key: 'sys.', reg: /(^|\s|\(|\))sys\./ig},
    {key: 'kill', reg: /(^|\s|\(|\))kill\s/ig}
  ]
  if (type === 'customscript') {
    chars = chars.filter(char => !['create', 'insert', 'delete', 'update', 'set', 'drop', 'if', 'exec'].includes(char.key))
  }
  sql = sql.replace(/sys\.fn_/ig, '') // 跳过sys.fn_验证
  chars.forEach(char => {
    if (!error && char.reg.test(sql)) {
      error = char.key
    }
  })
  if (error) {
    notification.warning({
      top: 92,
      message: 'sql中不可使用' + error,
      duration: 5
    })
    return false
  }
  return true
}
src/utils/utils.js
@@ -116,46 +116,6 @@
  }
  /**
   * @description sql语法验证
   * @return {String}  sql    sql语句
   * @return {String}  type   验证类型
   */
  static verifySql (sql, type) {
    if (!sql) return ''
    let chars = [
      {key: 'create', reg: /(^|\s|\(|\))create\s/ig},
      {key: 'insert', reg: /(^|\s|\(|\))insert\s/ig},
      {key: 'delete', reg: /(^|\s|\(|\))delete\s/ig},
      {key: 'update', reg: /(^|\s|\(|\))update\s/ig},
      {key: 'set', reg: /(^|\s|\(|\))set\s/ig},
      {key: 'drop', reg: /(^|\s|\(|\))drop\s/ig},
      {key: 'alter', reg: /(^|\s|\(|\))alter\s/ig},
      {key: 'truncate', reg: /(^|\s|\(|\))truncate\s/ig},
      {key: 'if', reg: /(^|\s|\(|\))if\s/ig},
      {key: 'exec', reg: /(^|\s|\(|\))exec(\s|\()/ig},
      {key: 'OBJECT', reg: /(^|\s|\(|\))object(\s|\()/ig},
      {key: 'sys.', reg: /(^|\s|\(|\))sys\./ig},
      {key: 'kill', reg: /(^|\s|\(|\))kill\s/ig}
    ]
    if (type === 'customscript') {
      chars = chars.filter(char => !['create', 'insert', 'delete', 'update', 'set', 'drop', 'if', 'exec'].includes(char.key))
    }
    let error = ''
    sql = sql.replace(/sys\.fn_/ig, '') // 跳过sys.fn_验证
    chars.forEach(char => {
      if (!error && char.reg.test(sql)) {
        error = char.key
      }
    })
    return error
  }
  /**
   * @description sql加密
   * @return {String}   value
   */
src/views/billprint/index.jsx
@@ -184,6 +184,7 @@
          if (res.status) {
            window.GLOB.style = res.CSS
            document.title = res.titleName
            sessionStorage.setItem('appname', res.appname || '')
        
            if (window.GLOB.style && styles[window.GLOB.style]) {
              document.body.className = styles[window.GLOB.style] + ' ' + (res.split_line_show === 'false' ? 'hidden-split-line' : '')
src/views/login/index.jsx
@@ -614,7 +614,8 @@
              webSite: res.WebSite || '',
              navBar: res.menu_type, // shutter 百叶窗、linkage_navigation 联动菜单、linkage 联动菜单_无导航栏、menu_board 菜单面板、menu_board_navigation 菜单面板_标签页
              app_version: res.app_version,
              Member_Level: 0
              Member_Level: 0,
              appname: res.appname || ''
            }
            if ([10, 20, 30, 40, 50, 60, 70, 80, 90, 100].includes(res.member_level)) {
@@ -701,6 +702,7 @@
            window.GLOB.style = systemMsg.style
            window.GLOB.navBar = systemMsg.navBar
            window.GLOB.appVersion = systemMsg.app_version
            sessionStorage.setItem('appname', res.appname || '')
        
            if (window.GLOB.style && styles[window.GLOB.style]) {
              document.body.className = styles[window.GLOB.style] + ' ' + (res.split_line_show === 'false' ? 'hidden-split-line' : '')
src/views/menudesign/index.jsx
@@ -791,7 +791,7 @@
        EasyCode: config.easyCode || '',
        Template: 'CustomPage',
        MenuName: config.MenuName || '',
        PageParam: JSON.stringify({Template: 'CustomPage', OpenType: config.OpenType || 'newtab', hidden: config.hidden || 'false', interfaces}),
        PageParam: JSON.stringify({Template: 'CustomPage', OpenType: config.OpenType || 'newtab', hidden: config.hidden || 'false', menuColor: config.menuColor || '', interfaces}),
        open_edition: config.open_edition,
        LText: '',
        LTexttb: '',
src/views/menudesign/menuform/index.jsx
@@ -4,9 +4,13 @@
import { QuestionCircleOutlined } from '@ant-design/icons'
import Api from '@/api'
import asyncComponent from '@/utils/asyncComponent'
import './index.scss'
const { TextArea } = Input
const ColorSketch = asyncComponent(() => import('@/mob/colorsketch'))
const SysColorSketch = asyncComponent(() => import('@/menu/stylecontroller/syscolorsketch'))
class CustomMenuForm extends Component {
  static propTpyes = {
@@ -475,6 +479,16 @@
              })(<TextArea rows={2} placeholder={''} onChange={(e) => {this.selectChange('Remark', e.target.value)}}/>)}
            </Form.Item>
          </Col>
          <Col span={24}>
            <Form.Item style={{marginBottom: '0px'}} label="菜单颜色">
              <ColorSketch allowClear={true} value={config.menuColor || ''} onChange={(val) => {this.selectChange('menuColor', val)}} />
            </Form.Item>
          </Col>
          <Col span={24}>
            <Form.Item style={{marginBottom: '0px'}} label="系统色">
              <SysColorSketch onChange={(val) => {this.selectChange('menuColor', val)}} />
            </Form.Item>
          </Col>
        </Row>
      </Form>
    )
src/views/menudesign/menuform/index.scss
@@ -13,4 +13,21 @@
      color: red;
    }
  }
  .color-sketch-block {
    position: relative;
    top: 7px;
    .color-sketch-block-box {
      width: 40px;
    }
    .color-sketch-value {
      width: 130px;
      .anticon-close-circle {
        right: 10px;
      }
    }
  }
  .sys-color-sketch-block {
    white-space: nowrap;
  }
}
src/views/sso/index.jsx
@@ -83,7 +83,8 @@
          webSite: res.WebSite || '',
          navBar: res.menu_type,
          app_version: res.app_version,
          Member_Level: 0
          Member_Level: 0,
          appname: res.appname || ''
        }
        if ([10, 20, 30, 40, 50, 60, 70, 80, 90, 100].includes(res.member_level)) {
@@ -131,6 +132,7 @@
        window.GLOB.style = systemMsg.style
        window.GLOB.navBar = systemMsg.navBar
        window.GLOB.appVersion = systemMsg.app_version
        sessionStorage.setItem('appname', res.appname || '')
    
        if (window.GLOB.style && styles[window.GLOB.style]) {
          document.body.className = styles[window.GLOB.style] + ' ' + (res.split_line_show === 'false' ? 'hidden-split-line' : '')
src/views/tabledesign/index.jsx
@@ -592,7 +592,7 @@
        EasyCode: config.easyCode || '',
        Template: 'BaseTable',
        MenuName: config.MenuName || '',
        PageParam: JSON.stringify({Template: 'BaseTable', OpenType: config.OpenType || 'newtab', hidden: config.hidden || 'false', interfaces}),
        PageParam: JSON.stringify({Template: 'BaseTable', OpenType: config.OpenType || 'newtab', hidden: config.hidden || 'false', menuColor: config.menuColor || '', interfaces}),
        open_edition: config.open_edition,
        LText: '',
        LTexttb: '',
src/views/tabledesign/menuform/index.jsx
@@ -3,9 +3,13 @@
import { Form, Row, Col, Input, Select, notification, Switch, Radio } from 'antd'
import Api from '@/api'
import asyncComponent from '@/utils/asyncComponent'
import './index.scss'
const { TextArea } = Input
const ColorSketch = asyncComponent(() => import('@/mob/colorsketch'))
const SysColorSketch = asyncComponent(() => import('@/menu/stylecontroller/syscolorsketch'))
class CustomMenuForm extends Component {
  static propTpyes = {
@@ -374,6 +378,16 @@
              })(<TextArea rows={2} placeholder={''} onChange={this.changeRemark} />)}
            </Form.Item>
          </Col>
          <Col span={24}>
            <Form.Item style={{marginBottom: '0px'}} label="菜单颜色">
              <ColorSketch allowClear={true} value={config.menuColor || ''} onChange={(val) => {this.selectChange('menuColor', val)}} />
            </Form.Item>
          </Col>
          <Col span={24}>
            <Form.Item style={{marginBottom: '0px'}} label="系统色">
              <SysColorSketch onChange={(val) => {this.selectChange('menuColor', val)}} />
            </Form.Item>
          </Col>
        </Row>
      </Form>
    )
src/views/tabledesign/menuform/index.scss
@@ -13,4 +13,20 @@
      color: red;
    }
  }
  .color-sketch-block {
    position: relative;
    top: 7px;
    .color-sketch-block-box {
      width: 40px;
    }
    .color-sketch-value {
      width: 130px;
      .anticon-close-circle {
        right: 10px;
      }
    }
  }
  .sys-color-sketch-block {
    white-space: nowrap;
  }
}