king
2021-01-24 606b0b991748740179fa37448f645e6e9c7f1c41
2021-01-24
12个文件已修改
391 ■■■■ 已修改文件
src/menu/datasource/verifycard/index.jsx 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/mob/datasource/verifycard/index.jsx 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/scriptmanage/index.jsx 71 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/actioncomponent/verifyexcelin/index.jsx 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/settingcomponent/index.scss 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/settingcomponent/settingform/datasource/index.jsx 29 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/settingcomponent/settingform/index.jsx 84 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/settingcomponent/settingform/simplescript/index.jsx 104 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/settingcomponent/settingform/utils.jsx 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/customscript/index.jsx 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/verifycard/index.jsx 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/utils.js 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/datasource/verifycard/index.jsx
@@ -230,7 +230,6 @@
          let _item = {
            name: item.funcname,
            value: window.decodeURIComponent(window.atob(item.longparam))
            // value: Utils.UnformatOptions(item.longparam)
          }
          _scripts.push(_item)
src/mob/datasource/verifycard/index.jsx
@@ -151,7 +151,6 @@
          let _item = {
            name: item.funcname,
            value: window.decodeURIComponent(window.atob(item.longparam))
            // value: Utils.UnformatOptions(item.longparam)
          }
          _scripts.push(_item)
src/tabviews/scriptmanage/index.jsx
@@ -134,7 +134,7 @@
    if (result.status) {
      this.setState({
        data: result.data.map((item, index) => {
          // item.LongParam = Utils.UnformatOptions(item.LongParam)
          // item.LongParam = this.UnformatOptions(item.LongParam)
          item.key = index
          return item
        }),
@@ -153,6 +153,75 @@
    }
  }
  // UnformatOptions = (value) => {
  //   if (!value) return ''
  //   let salt = 'minKe' // 盐值
  //   let _value = ''
  //   const formatKeys = [
  //     { key: 'select', value: ' msltk ' },
  //     { key: 'from', value: ' mfrmk ' },
  //     { key: 'where', value: ' mwhrk ' },
  //     { key: 'order by', value: ' modbk ' },
  //     { key: 'asc', value: ' modack ' },
  //     { key: 'desc', value: ' moddesk ' },
  //     { key: 'top', value: ' mtpk ' },
  //     { key: 'like', value: ' mlkk ' },
  //     { key: 'not like', value: ' mnlkk ' },
  //     { key: 'between', value: ' mbtnk ' },
  //     { key: 'and', value: ' madk ' },
  //     { key: 'insert', value: ' mistk ' },
  //     { key: 'into', value: ' mitk ' },
  //     { key: 'update', value: ' muptk ' },
  //     { key: 'delete', value: ' mdelk ' },
  //     { key: 'begin', value: ' mbgink ' },
  //     { key: 'end', value: ' medk ' },
  //     { key: 'if', value: ' mefk ' },
  //     { key: 'while', value: ' mwilk ' },
  //     { key: 'create', value: ' mcrtk ' },
  //     { key: 'alter', value: ' matek ' },
  //     { key: 'len', value: ' mlnk ' },
  //     { key: 'left', value: ' mlftk ' },
  //     { key: 'right', value: ' mritk ' },
  //     { key: 'union', value: ' munok ' },
  //     { key: 'varchar', value: ' mvcrk ' },
  //     { key: 'getdate', value: ' mgtdtk ' },
  //     { key: 'TRY', value: ' mtryonek ' },
  //     { key: 'TRAN', value: ' mtrnk ' },
  //     { key: 'goto', value: ' mgtk ' },
  //     { key: 'set', value: ' mstk ' },
  //     { key: 'ROLLBACK', value: ' mrlbkk ' }
  //   ]
  //   try {
  //     try {
  //       _value = JSON.parse(window.decodeURIComponent(window.atob(value)))
  //     } catch {
  //       _value = ''
  //     }
  //     if (!_value) {
  //       _value = window.atob(value)
  //       _value = _value.replace(salt, '')
  //       _value = window.decodeURIComponent(window.atob(_value))
  //       _value = _value.replace(/\smpercent\s/g, '%')
  //       formatKeys.forEach(item => {
  //         let reg = new RegExp(item.value, 'g')
  //         _value = _value.replace(reg, ' ' + item.key + ' ')
  //       })
  //       _value = _value.replace(/\s\n\s/ig, '\n')
  //       _value = _value.replace(/(^\s+|\s+$)/ig, '')
  //     }
  //   } catch {
  //     console.warn('UnFormat Failure')
  //     _value = ''
  //   }
  //   return _value
  // }
  /**
   * @description 获取系统存储过程 sPC_Get_TableData 的参数
   */
src/templates/sharecomponent/actioncomponent/verifyexcelin/index.jsx
@@ -300,7 +300,6 @@
            return {
              name: item.funcname,
              value: window.decodeURIComponent(window.atob(item.longparam))
              // value: Utils.UnformatOptions(item.longparam)
            }
          })
        })
src/templates/sharecomponent/settingcomponent/index.scss
@@ -15,6 +15,7 @@
    padding-bottom: 5px;
    .ant-modal-body {
      max-height: calc(100vh - 190px);
      min-height: 250px;
      overflow-y: auto;
      padding-top: 10px;
    }
src/templates/sharecomponent/settingcomponent/settingform/datasource/index.jsx
@@ -19,11 +19,12 @@
    setting: PropTypes.object,    // 数据源配置
    columns: PropTypes.array,     // 列设置
    scripts: PropTypes.array,     // 自定义脚本
    updateStatus: PropTypes.func, // 状态更新
  }
  state = {
    interType: 'system',
    procMode: 'system',
    procMode: 'script',
    requestMode: 'system',
    funcTooltip: '',
    funcRules: []
@@ -59,7 +60,7 @@
    this.setState({
      interType: setting.interType || 'system',
      procMode: setting.procMode || 'system',
      procMode: setting.procMode || 'script',
      requestMode: setting.requestMode || 'system',
      funcTooltip: tooltip,
      funcRules: rules
@@ -175,6 +176,7 @@
        interface: window.GLOB.mainSystemApi || ''
      })
    }
    this.props.updateStatus({[key]: value})
  }
  primaryKeyChange = (val) => {
@@ -279,7 +281,7 @@
                  ]
                })(
                <Radio.Group style={{whiteSpace: 'nowrap'}} onChange={(e) => {this.onRadioChange(e, 'procMode')}}>
                  <Radio value="system">前置脚本</Radio>
                  <Radio value="script">前置脚本</Radio>
                  <Radio value="inner">前置函数</Radio>
                </Radio.Group>)}
              </Form.Item>
@@ -463,15 +465,32 @@
            {interType === 'custom' ? <Col span={12}>
              <Form.Item label="回调方式">
                {getFieldDecorator('callbackType', {
                  initialValue: setting.callbackType || 'default'
                  initialValue: setting.callbackType || 'script'
                })(
                <Radio.Group>
                <Radio.Group onChange={(e) => {this.onRadioChange(e, 'callbackType')}}>
                  <Radio value="default">默认脚本</Radio>
                  <Radio value="script">自定义脚本</Radio>
                </Radio.Group>)}
              </Form.Item>
            </Col> : null}
            {interType === 'custom' ? <Col span={12}>
              <Form.Item label="回调表名">
                {getFieldDecorator('cbTable', {
                  initialValue: setting.cbTable || '',
                  rules: [
                    {
                      required: true,
                      message: dict['form.required.input'] + '回调表名!'
                    },
                    {
                      max: formRule.input.max,
                      message: formRule.input.message
                    }
                  ]
                })(<Input placeholder={''} autoComplete="off" />)}
              </Form.Item>
            </Col> : null}
            {interType === 'custom' ? <Col span={12}>
              <Form.Item label={
                <Tooltip placement="topLeft" title={'同步执行:外部接口调用成功后再请求数据;异步执行:外部接口调用与请求数据同时进行。'}>
                  <Icon type="question-circle" />
src/templates/sharecomponent/settingcomponent/settingform/index.jsx
@@ -31,7 +31,8 @@
    arr_field: '',
    regoptions: [],
    setting: null,
    defaultSql: ''
    defaultSql: '',
    status: {}
  }
  UNSAFE_componentWillMount() {
@@ -80,6 +81,11 @@
    _search = _search.replace(/@\$@/ig, '')
    _search = _search ? 'where ' + _search : ''
    let status = fromJS(_setting).toJS()
    status.requestMode = status.requestMode || 'system'
    status.procMode = status.procMode || 'script'
    status.callbackType = status.callbackType || 'script'
    this.setState({
      setting: _setting,
      search: _search,
@@ -88,7 +94,8 @@
      columns: columns,
      scripts: _scripts,
      preScripts: _preScripts,
      cbScripts: _cbScripts
      cbScripts: _cbScripts,
      status
    })
  }
@@ -147,7 +154,7 @@
  }
  handleConfirm = (trigger) => {
    const { activeKey, setting, scripts } = this.state
    const { activeKey, setting, scripts, preScripts, cbScripts } = this.state
    let _loading = false
    if (this.scriptsForm && this.scriptsForm.props.form.getFieldValue('sql')) {
@@ -195,7 +202,7 @@
            this.setState({loading: false})
            reject()
            return
          } else if (res.interType === 'system' && res.default === 'false' && _scripts.length === 0) {
          } else if ((res.interType === 'system' || res.requestMode === 'system') && res.default === 'false' && _scripts.length === 0) {
            notification.warning({
              top: 92,
              message: '不执行默认sql时,请添加自定义脚本!',
@@ -210,7 +217,7 @@
          }, () => {
            this.sqlverify(() => {
              this.setState({loading: false})
              resolve({...res, scripts})
              resolve({...res, scripts, preScripts, cbScripts})
            }, () => {
              this.setState({loading: false})
              reject()
@@ -221,7 +228,7 @@
          reject()
        })
      })
    } else {
    } else if (activeKey === 'scripts') {
      return new Promise((resolve, reject) => {
        if (trigger === 'func' && setting.interType !== 'inner') {
          notification.warning({
@@ -231,7 +238,7 @@
          })
          this.setState({loading: false})
          reject()
        } else if (setting.interType === 'system' && setting.default === 'false' && _scripts.length === 0) {
        } else if ((setting.interType === 'system' || setting.requestMode === 'system') && setting.default === 'false' && _scripts.length === 0) {
          notification.warning({
            top: 92,
            message: '不执行默认sql时,请添加自定义脚本!',
@@ -242,12 +249,17 @@
        } else {
          this.sqlverify(() => {
            this.setState({loading: false})
            resolve({...setting, scripts})
            resolve({...setting, scripts, preScripts, cbScripts})
          }, () => {
            this.setState({loading: false})
            reject()
          }, 'submit')
        }
      })
    } else {
      this.setState({loading: false})
      return new Promise((resolve) => {
        resolve({...setting, scripts, preScripts, cbScripts})
      })
    }
  }
@@ -255,7 +267,7 @@
  sqlverify = (_resolve, _reject, type, uscripts) => {
    const { setting, scripts, arr_field, regoptions, search } = this.state
    if (setting.interType !== 'system') { // 不使用系统接口时,不需要sql验证
    if (setting.interType !== 'system' && setting.requestMode !== 'system') { // 不使用系统接口时,不需要sql验证
      _resolve()
      return
    }
@@ -296,7 +308,7 @@
  // 标签切换
  changeTab = (val) => {
    const { activeKey, search, arr_field } = this.state
    const { activeKey, search, arr_field, setting } = this.state
    let _loading = false
    if (this.scriptsForm && this.scriptsForm.props.form.getFieldValue('sql')) {
@@ -316,13 +328,38 @@
      return
    }
    if (activeKey !== 'setting') {
      if (setting.interType !== 'system' && setting.requestMode !== 'system' && val === 'scripts') {
        notification.warning({
          top: 92,
          message: '使用系统接口时,才可以设置自定义脚本!',
          duration: 5
        })
        return
      } else if (setting.interType !== 'custom' && (val === 'prescripts' || val === 'cbscripts')) {
        notification.warning({
          top: 92,
          message: '使用自定义接口时,才可以设置前置或回调脚本!',
          duration: 5
        })
        return
      }
    }
    if (activeKey === 'setting') {
      let _defaultSql = ''
      this.settingForm.handleConfirm().then(res => {
        if (res.interType !== 'system') {
        if (res.interType !== 'system' && res.requestMode !== 'system' && val === 'scripts') {
          notification.warning({
            top: 92,
            message: '使用系统接口时,才可以设置自定义脚本!',
            duration: 5
          })
          return
        } else if (res.interType !== 'custom' && (val === 'prescripts' || val === 'cbscripts')) {
          notification.warning({
            top: 92,
            message: '使用自定义接口时,才可以设置前置或回调脚本!',
            duration: 5
          })
          return
@@ -369,6 +406,10 @@
          loading: false
        })
      }, activeKey)
    } else {
      this.setState({
        activeKey: val
      })
    }
  }
@@ -394,9 +435,13 @@
    this.setState({cbScripts})
  }
  updateStatus = (status) => {
    this.setState({status: {...this.state.status, ...status}})
  }
  render() {
    const { config, menu, dict } = this.props
    const { loading, activeKey, setting, defaultSql, columns, scripts, preScripts, cbScripts } = this.state
    const { loading, activeKey, setting, defaultSql, columns, scripts, preScripts, cbScripts, status, regoptions } = this.state
    return (
      <div className="model-table-setting-form-box" id="model-setting-form-body">
@@ -410,6 +455,7 @@
              columns={columns}
              setting={setting}
              scripts={scripts}
              updateStatus={this.updateStatus}
              wrappedComponentRef={(inst) => this.settingForm = inst}
            />
          </TabPane>
@@ -418,13 +464,14 @@
              自定义脚本
              {scripts.length ? <span className="count-tip">{scripts.length}</span> : null}
            </span>
          } key="scripts">
          } disabled={!(status.interType === 'system' || (status.interType === 'custom' && status.requestMode === 'system'))} key="scripts">
            <CustomScript
              dict={dict}
              setting={setting}
              scripts={scripts}
              defaultSql={defaultSql}
              searches={this.props.search}
              scriptsChange={this.scriptsChange}
              scriptsUpdate={this.scriptsUpdate}
              wrappedComponentRef={(inst) => this.scriptsForm = inst}
            />
@@ -434,14 +481,13 @@
              前置脚本
              {preScripts.length ? <span className="count-tip">{preScripts.length}</span> : null}
            </span>
          } key="prescripts">
          } disabled={status.interType !== 'custom' || status.procMode !== 'script'} key="prescripts">
            <SimpleScript
              dict={dict}
              setting={setting}
              scripts={preScripts}
              defaultSql={defaultSql}
              regoptions={regoptions}
              searches={this.props.search}
              scriptsChange={this.scriptsChange}
              scriptsUpdate={this.preScriptsUpdate}
              wrappedComponentRef={(inst) => this.preScriptsForm = inst}
            />
@@ -451,14 +497,12 @@
              回调脚本
              {cbScripts.length ? <span className="count-tip">{cbScripts.length}</span> : null}
            </span>
          } key="cbscripts">
          } disabled={status.interType !== 'custom' || status.callbackType !== 'script'} key="cbscripts">
            <SimpleScript
              dict={dict}
              setting={setting}
              scripts={cbScripts}
              searches={this.props.search}
              scriptsChange={this.scriptsChange}
              scriptsUpdate={this.scriptsUpdate}
              scriptsUpdate={this.cbScriptsUpdate}
              wrappedComponentRef={(inst) => this.cbScriptsForm = inst}
            />
          </TabPane>
src/templates/sharecomponent/settingcomponent/settingform/simplescript/index.jsx
@@ -1,11 +1,12 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { fromJS } from 'immutable'
import { Form, Row, Col, Icon, Button, notification, Select, Popconfirm, Typography } from 'antd'
import { Form, Row, Col, Icon, Button, notification, Select, Popconfirm, Typography, Modal } from 'antd'
import moment from 'moment'
import Utils from '@/utils/utils.js'
import Api from '@/api'
import SettingUtils from '../utils'
import CodeMirror from '@/templates/zshare/codemirror'
import asyncComponent from '@/utils/asyncComponent'
import './index.scss'
@@ -19,7 +20,7 @@
    setting: PropTypes.object,      // 设置
    scripts: PropTypes.array,       // 自定义脚本列表
    searches: PropTypes.array,      // 搜索条件
    defaultSql: PropTypes.string,   // 默认sql
    regoptions: PropTypes.any,      // 正则替换
    scriptsChange: PropTypes.func,  // 自定义脚本切换时验证
    scriptsUpdate: PropTypes.func   // 表单
  }
@@ -90,26 +91,32 @@
    const { searches, scripts } = this.props
    let _usefulFields = []
    searches.forEach(item => {
      if (!item.field) return
      if (item.type === 'group') {
        if (item.transfer === 'true') {
    if (searches) {
      searches.forEach(item => {
        if (!item.field) return
        if (item.type === 'group') {
          if (item.transfer === 'true') {
            _usefulFields.push(item.field)
          }
          _usefulFields.push(item.datefield)
          _usefulFields.push(item.datefield + '1')
        } else if (['dateweek', 'datemonth', 'daterange'].includes(item.type)) {
          _usefulFields.push(item.field)
          _usefulFields.push(item.field + '1')
        } else if (_usefulFields.includes(item.field)) {
          _usefulFields.push(item.field + '1')
        } else {
          _usefulFields.push(item.field)
        }
        _usefulFields.push(item.datefield)
        _usefulFields.push(item.datefield + '1')
      } else if (['dateweek', 'datemonth', 'daterange'].includes(item.type)) {
        _usefulFields.push(item.field)
        _usefulFields.push(item.field + '1')
      } else if (_usefulFields.includes(item.field)) {
        _usefulFields.push(item.field + '1')
      } else {
        _usefulFields.push(item.field)
      }
    })
      })
      _usefulFields = _usefulFields.join(', ')
    } else {
      _usefulFields = null
    }
    this.setState({
      usefulFields: _usefulFields.join(', '),
      usefulFields: _usefulFields,
      scripts: fromJS(scripts).toJS()
    })
  }
@@ -140,7 +147,6 @@
          let _item = {
            name: item.funcname,
            value: window.decodeURIComponent(window.atob(item.longparam))
            // value: Utils.UnformatOptions(item.longparam)
          }
          return _item
        })
@@ -249,24 +255,39 @@
      _scripts.push(values)
    }
    let param = {
      func: 's_debug_sql',
      exec_type: 'y',
      LText: SettingUtils.getCustomDebugSql(_scripts, this.props.regoptions)
    }
    param.LText = Utils.formatOptions(param.LText)
    param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
    param.secretkey = Utils.encrypt('', param.timestamp)
    this.setState({loading: true})
    this.props.scriptsChange(_scripts).then(res => {
      this.setState({
        loading: false,
        scripts: _scripts,
        editItem: null
      })
      this.props.scriptsUpdate(_scripts)
      this.props.form.setFieldsValue({
        sql: ''
      })
    }, () => {
      this.setState({loading: false})
    Api.getLocalConfig(param).then(result => {
      if (result.status) {
        this.setState({
          loading: false,
          scripts: _scripts,
          editItem: null
        })
        this.props.scriptsUpdate(_scripts)
        this.props.form.setFieldsValue({
          sql: ''
        })
      } else {
        this.setState({loading: false})
        Modal.error({
          title: result.message
        })
      }
    })
  }
  selectScript = (value, option) => {
    if (!value || !option) return
    let _sql = this.props.form.getFieldValue('sql')
    if (_sql) {
      _sql = _sql + ` 
@@ -344,7 +365,7 @@
  }
  render() {
    const { setting, defaultSql, scripts } = this.props
    const { setting, scripts } = this.props
    const { getFieldDecorator } = this.props.form
    const { usefulFields, scriptsColumns, systemScripts } = this.state
    const formItemLayout = {
@@ -362,29 +383,30 @@
      <div className="modal-menu-setting-script">
        <Form {...formItemLayout}>
          <Row gutter={24}>
            {setting.tableName ? <Col span={8}>
              <Form.Item label={'表名'} style={{whiteSpace: 'nowrap', margin: 0}}>
                {setting.tableName}
            <Col span={8}>
              <Form.Item label={'回调表名'} style={{whiteSpace: 'nowrap', margin: 0}}>
                {setting.cbTable}
              </Form.Item>
            </Col> : null}
            </Col>
            <Col span={16}>
              <Form.Item label={'报错字段'} style={{margin: 0}}>
                ErrorCode, retmsg
              </Form.Item>
            </Col>
            <Col span={24} className="sqlfield">
            {usefulFields ? <Col span={24} className="sqlfield">
              <Form.Item label={'可用字段'}>
                id, bid, loginuid, sessionuid, userid, username, fullname, appkey, time_id, orderBy{setting.laypage === 'true' ? ', pageSize, pageIndex': ''}{usefulFields ? ', ' + usefulFields : ''}
                id, bid, loginuid, sessionuid, userid, username, fullname, appkey, time_id{usefulFields ? ', ' + usefulFields : ''}
              </Form.Item>
            </Col>
            </Col> : null}
            <Col span={10} className="quick-add">
              <Form.Item label={'快捷添加'} style={{marginBottom: 0}}>
                <Select
                  allowClear
                  showSearch
                  filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0}
                  onChange={this.selectScript}
                >
                  <Select.Option key="default" value={defaultSql}>默认sql</Select.Option>
                  {!usefulFields ? <Select.Option key="default" value={`declare @${setting.cbTable} table (mk_api_key nvarchar(100))`}>默认sql</Select.Option> : null}
                  {systemScripts.map((option, i) =>
                    <Select.Option style={{whiteSpace: 'normal'}} key={i} value={option.value}>{option.name}</Select.Option>
                  )}
src/templates/sharecomponent/settingcomponent/settingform/utils.jsx
@@ -99,4 +99,60 @@
    return sql
  }
  /**
   * @description 生成前置或后置语句
   * @return {String}  scripts       脚本
   * @return {Array}   regoptions    搜索条件正则替换
   */
  static getCustomDebugSql (scripts, regoptions) {
    let sql = ''
    let _customScript = ''
    scripts.forEach(script => {
      if (script.status === 'false') return
      _customScript += `
      ${script.sql}
      `
    })
    if (_customScript) {
      _customScript = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50) select @ErrorCode='',@retmsg =''
        ${_customScript}
      `
    }
    _customScript = _customScript.replace(/@\$|\$@/ig, '')
    // 外联数据库替换
    if (window.GLOB.externalDatabase !== null) {
      _customScript = _customScript.replace(/@db@/ig, window.GLOB.externalDatabase)
    }
    // 正则替换
    if (regoptions) {
      let _regoptions = regoptions.map(item => {
        return {
          reg: new RegExp('@' + item.key + '@', 'ig'),
          value: `'0'`
        }
      })
      _regoptions.forEach(item => {
        _customScript = _customScript.replace(item.reg, item.value)
      })
    }
    if (_customScript) {
      sql = `/* sql 验证 */
        ${_customScript}
        aaa:
        if @ErrorCode!=''
          insert into tmp_err_retmsg (ID, ErrorCode, retmsg, CreateUserID) select @time_id@,@ErrorCode, @retmsg,@UserID@
      `
    }
    sql = sql.replace(/\n\s{8}/ig, '\n')
    console.info(sql)
    return sql
  }
}
src/templates/zshare/customscript/index.jsx
@@ -140,7 +140,6 @@
          let _item = {
            name: item.funcname,
            value: window.decodeURIComponent(window.atob(item.longparam))
            // value: Utils.UnformatOptions(item.longparam)
          }
          return _item
        })
@@ -267,6 +266,7 @@
  }
  selectScript = (value, option) => {
    if (!value || !option) return
    let _sql = this.props.form.getFieldValue('sql')
    if (_sql) {
      _sql = _sql + ` 
@@ -380,6 +380,7 @@
            <Col span={10} className="quick-add">
              <Form.Item label={'快捷添加'} style={{marginBottom: 0}}>
                <Select
                  allowClear
                  showSearch
                  filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0}
                  onChange={this.selectScript}
src/templates/zshare/verifycard/index.jsx
@@ -978,7 +978,6 @@
            return {
              name: item.funcname,
              value: window.decodeURIComponent(window.atob(item.longparam))
              // value: Utils.UnformatOptions(item.longparam)
            }
          })
        })
src/utils/utils.js
@@ -183,45 +183,6 @@
  }
  /**
   * @description 解密
   * @return {String}   value
   */
  static UnformatOptions (value) {
    if (!value) return ''
    let salt = 'minKe' // 盐值
    let _value = ''
    try {
      try {
        _value = JSON.parse(window.decodeURIComponent(window.atob(value)))
      } catch {
        _value = ''
      }
      if (!_value) {
        _value = window.atob(value)
        _value = _value.replace(salt, '')
        _value = window.decodeURIComponent(window.atob(_value))
        _value = _value.replace(/\smpercent\s/g, '%')
        formatKeys.forEach(item => {
          let reg = new RegExp(item.value, 'g')
          _value = _value.replace(reg, ' ' + item.key + ' ')
        })
        _value = _value.replace(/\s\n\s/ig, '\n')
        _value = _value.replace(/(^\s+|\s+$)/ig, '')
      }
    } catch {
      console.warn('UnFormat Failure')
      _value = ''
    }
    return _value
  }
  /**
   * @description sPC_TableData_InUpDe sql加密
   * @return {String}  value
   */