king
2022-09-29 b883ae5d7d46fc7a3503236f16a250c2264ea7c7
2022-09-29
39个文件已修改
9个文件已删除
2623 ■■■■ 已修改文件
src/assets/css/design.scss 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/balcony/index.jsx 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/cardcellcomponent/index.jsx 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/data-card/index.jsx 62 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/data-card/options.jsx 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/prop-card/index.jsx 79 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/table-card/index.jsx 72 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/carousel/data-card/index.jsx 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/carousel/prop-card/index.jsx 72 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/chart/antv-bar/index.jsx 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/chart/antv-pie/index.jsx 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/chart/antv-scatter/index.jsx 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/chart/chart-custom/index.jsx 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/share/actioncomponent/index.jsx 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/share/logcomponent/index.jsx 132 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/share/logcomponent/index.scss 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/share/sourcecomponent/inputform/index.jsx 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/share/usercomponent/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/table/base-table/index.jsx 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/table/edit-table/columns/tableIn/index.jsx 27 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/table/edit-table/index.jsx 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/table/normal-table/index.jsx 54 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/datasource/index.jsx 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/datasource/verifycard/index.jsx 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/datasource/verifycard/settingform/index.jsx 212 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/sysinterface/index.jsx 132 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/sysinterface/index.scss 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/sysinterface/settingform/baseform/index.jsx 260 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/sysinterface/settingform/baseform/index.scss 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/sysinterface/settingform/index.jsx 179 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/sysinterface/settingform/index.scss 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/sysinterface/settingform/simplescript/index.jsx 454 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/sysinterface/settingform/simplescript/index.scss 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/sysinterface/settingform/utils.jsx 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/balcony/index.jsx 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/prop-card/index.jsx 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/carousel/prop-card/index.jsx 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/actioncomponent/verifyexcelin/index.jsx 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/settingcomponent/settingform/datasource/index.jsx 200 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/settingcomponent/settingform/index.jsx 123 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/settingcomponent/settingform/index.scss 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/settingcomponent/settingform/simplescript/index.jsx 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/customscript/index.jsx 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/utils-custom.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mobdesign/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/systemfunc/header/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/systemfunc/header/index.scss 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/css/design.scss
@@ -84,9 +84,4 @@
    height: 200px;
  }
}
.mk-color-move {
  .color-sketch-block {
    position: relative;
    top: 7px;
  }
}
src/menu/components/card/balcony/index.jsx
@@ -2,7 +2,7 @@
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { Popover, Checkbox } from 'antd'
import { PlusOutlined, PlusSquareOutlined, EditOutlined, FontColorsOutlined, DeleteOutlined, SettingOutlined, ToolOutlined } from '@ant-design/icons'
import { PlusOutlined, PlusSquareOutlined, EditOutlined, FontColorsOutlined, DeleteOutlined, SettingOutlined, ToolOutlined, ClockCircleOutlined } from '@ant-design/icons'
import asyncComponent from '@/utils/asyncComponent'
import asyncIconComponent from '@/utils/asyncIconComponent'
@@ -100,7 +100,6 @@
  updateComponent = (card) => {
    card.width = card.wrap.width
    card.name = card.wrap.name
    card.btnlog = []
    if (window.GLOB.styling && card.errors) { // 样式修改时不做筛查
      this.setState({
@@ -269,11 +268,10 @@
            <CopyComponent type="balcony" card={card}/>
            <PasteComponent options={['action', 'customCardElement']} updateConfig={this.pasteComponent} />
            <FontColorsOutlined className="style" title="调整样式" onClick={this.changeStyle} />
            <ClockComponent config={card} updateConfig={this.updateComponent}/>
            {card.wrap.datatype === 'dynamic' ? <ClockComponent config={card} updateConfig={this.updateComponent}/> : <ClockCircleOutlined style={{color: '#eeeeee', cursor: 'not-allowed'}}/>}
            <UserComponent config={card}/>
            <DeleteOutlined className="close" title="删除组件" onClick={() => this.props.deletecomponent(card.uuid)} />
            {card.wrap.datatype !== 'static' ? <SettingComponent config={card} updateConfig={this.updateComponent} /> : null}
            {card.wrap.datatype === 'static' ? <SettingOutlined style={{color: '#eeeeee', cursor: 'not-allowed'}}/> : null}
            {card.wrap.datatype === 'dynamic' ? <SettingComponent config={card} updateConfig={this.updateComponent} /> : <SettingOutlined style={{color: '#eeeeee', cursor: 'not-allowed'}}/>}
          </div>
        } trigger="hover">
          <ToolOutlined />
src/menu/components/card/cardcellcomponent/index.jsx
@@ -487,8 +487,6 @@
        if (card.OpenType === 'popview' || card.verify || card.modal) {
          card.$parentId = cardCell.uuid
          card.$side = side || ''
          // MKEmitter.emit('logButton', cards.uuid, card)
        }
        _this.setState({
src/menu/components/card/data-card/index.jsx
@@ -16,7 +16,6 @@
const NormalForm = asyncIconComponent(() => import('@/components/normalform'))
const CardComponent = asyncComponent(() => import('../cardcomponent'))
const MobPagination = asyncIconComponent(() => import('@/menu/components/share/mobPagination'))
// const LogComponent = asyncIconComponent(() => import('@/menu/components/share/logcomponent'))
const CopyComponent = asyncIconComponent(() => import('@/menu/components/share/copycomponent'))
const UserComponent = asyncIconComponent(() => import('@/menu/components/share/usercomponent'))
const PasteComponent = asyncIconComponent(() => import('@/components/paste'))
@@ -64,7 +63,6 @@
        scripts: [],
        action: [],
        search: [],
        btnlog: [],
        subcards: [{
          uuid: Utils.getuuid(),
          setting: { width: appType === 'mob' ? 24 : 6, type: 'simple'},
@@ -147,7 +145,6 @@
  componentDidMount () {
    MKEmitter.addListener('submitModal', this.handleSave)
    // MKEmitter.addListener('logButton', this.logButton)
  }
  shouldComponentUpdate (nextProps, nextState) {
@@ -162,20 +159,8 @@
      return
    }
    MKEmitter.removeListener('submitModal', this.handleSave)
    // MKEmitter.removeListener('logButton', this.logButton)
  }
  // logButton = (id, item) => {
  //   const { card } = this.state
  //   if (id !== card.uuid) return
  //   let btnlog = card.btnlog || []
  //   btnlog.push(item)
  //   this.updateComponent({...card, btnlog})
  // }
  /**
   * @description 卡片行外层信息更新(数据源,样式等)
   */
@@ -184,7 +169,6 @@
    card.width = card.wrap.width
    card.name = card.wrap.name
    card.btnlog = []
    if (window.GLOB.styling && card.errors) { // 样式修改时不做筛查
      this.setState({
@@ -342,10 +326,6 @@
      onOk() {
        card.subcards = card.subcards.filter(item => item.uuid !== cell.uuid)
        // if (card.btnlog) {
        //   card.btnlog = card.btnlog.filter(c => c.$parentId !== cell.uuid)
        // }
        _this.updateComponent(card)
        if (appType === 'mob') return
@@ -478,47 +458,6 @@
    this.updateComponent(card)
  }
  // handleLog = (type, logs, item) => {
  //   let card = fromJS(this.state.card).toJS()
  //   if (type === 'revert') {
  //     let done = false
  //     if (item.$parentId) {
  //       card.subcards.forEach(col => {
  //         if (item.$parentId === col.uuid) {
  //           if (item.$side !== 'back') {
  //             col.elements = col.elements ? [...col.elements, item] : [item]
  //           } else {
  //             col.backElements = col.backElements ? [...col.backElements, item] : [item]
  //           }
  //           done = true
  //         }
  //       })
  //     }
  //     if (!done) {
  //       card.action = card.action ? [...card.action, item] : [item]
  //     }
  //     card.btnlog = logs
  //     this.updateComponent(card)
  //     notification.success({
  //       top: 92,
  //       message: '恢复成功!',
  //       duration: 2
  //     })
  //   } else {
  //     card.btnlog = logs
  //     this.updateComponent(card)
  //     notification.success({
  //       top: 92,
  //       message: '清除成功!',
  //       duration: 2
  //     })
  //   }
  // }
  addCard = (copy) => {
    let card = fromJS(this.state.card).toJS()
@@ -779,7 +718,6 @@
            <CopyComponent type="datacard" card={card}/>
            <PasteComponent options={['action', 'search', 'form', 'cardcell']} updateConfig={this.pasteComponent} />
            <FontColorsOutlined className="style" title="调整样式" onClick={this.changeStyle}/>
            {/* <LogComponent btnlog={card.btnlog || []} handlelog={this.handleLog} /> */}
            <ClockComponent config={card} updateConfig={this.updateComponent}/>
            <UserComponent config={card}/>
            <DeleteOutlined className="close" title="删除组件" onClick={() => this.props.deletecomponent(card.uuid)} />
src/menu/components/card/data-card/options.jsx
@@ -9,6 +9,12 @@
  let MenuType = ''
  let menu = fromJS(window.GLOB.customMenu).toJS()
  let laypage = setting && setting.laypage !== 'false'
  let interfaces = (menu.interfaces || []).map(item => {
    return {
      value: item.uuid,
      label: item.name
    }
  })
  if (menu.parentId === 'BillPrintTemp') {
    MenuType = 'billPrint'
@@ -82,14 +88,25 @@
      options: [
        {value: 'dynamic', label: '动态', priKeyType: 'static'},
        {value: 'static', label: '静态', priKeyType: 'static'},
        {value: 'public', label: '公共数据源', priKeyType: 'static'},
      ],
      linkFields: ['priKeyType'],
      controlFields: [
        {field: 'goback', values: ['dynamic']},
        {field: 'empty', values: ['dynamic']},
        {field: 'empty', values: ['dynamic', 'public']},
        {field: 'jump', values: ['dynamic']},
        {field: 'supModule', values: ['static']},
        {field: 'publicId', values: ['public']},
      ],
      forbid: subtype !== 'propcard'
    },
    {
      type: 'select',
      field: 'publicId',
      label: '数据源',
      initval: wrap.publicId || '',
      required: true,
      options: interfaces,
      forbid: subtype !== 'propcard'
    },
    {
@@ -160,6 +177,9 @@
        {ParentID: 'dynamic', value: 'static', label: '静态值'},
        {ParentID: 'dynamic', value: 'dynamic', label: '动态值'},
        {ParentID: 'dynamic', value: 'joint', label: '拼接值'},
        {ParentID: 'public', value: 'static', label: '静态值'},
        {ParentID: 'public', value: 'dynamic', label: '动态值'},
        {ParentID: 'public', value: 'joint', label: '拼接值'},
      ],
      forbid: subtype !== 'propcard'
    },
src/menu/components/card/prop-card/index.jsx
@@ -2,7 +2,7 @@
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { Popover, Modal } from 'antd'
import { PlusOutlined, SettingOutlined, EditOutlined, ToolOutlined, DeleteOutlined, FontColorsOutlined } from '@ant-design/icons'
import { PlusOutlined, SettingOutlined, EditOutlined, ToolOutlined, DeleteOutlined, FontColorsOutlined, ClockCircleOutlined } from '@ant-design/icons'
import asyncComponent from '@/utils/asyncComponent'
import asyncIconComponent from '@/utils/asyncIconComponent'
@@ -17,7 +17,6 @@
const CardComponent = asyncComponent(() => import('../cardcomponent'))
const CopyComponent = asyncIconComponent(() => import('@/menu/components/share/copycomponent'))
const PasteComponent = asyncIconComponent(() => import('@/components/paste'))
// const LogComponent = asyncIconComponent(() => import('@/menu/components/share/logcomponent'))
const UserComponent = asyncIconComponent(() => import('@/menu/components/share/usercomponent'))
const ClockComponent = asyncIconComponent(() => import('@/menu/components/share/clockcomponent'))
const NormalHeader = asyncComponent(() => import('@/menu/components/share/normalheader'))
@@ -72,7 +71,6 @@
          elements: [],
          backElements: []
        }],
        btnlog: [],
      }
      if (card.config) {
@@ -109,7 +107,6 @@
  }
  componentDidMount () {
    // MKEmitter.addListener('logButton', this.logButton)
    MKEmitter.addListener('submitComponentStyle', this.updateComponentStyle)
  }
@@ -124,7 +121,6 @@
    this.setState = () => {
      return
    }
    // MKEmitter.removeListener('logButton', this.logButton)
    MKEmitter.removeListener('submitComponentStyle', this.updateComponentStyle)
  }
@@ -145,18 +141,6 @@
    })
  }
  // 按钮历史记录
  // logButton = (id, item) => {
  //   const { card } = this.state
  //   if (id !== card.uuid) return
  //   let btnlog = card.btnlog || []
  //   btnlog.push(item)
  //   this.updateComponent({...card, btnlog})
  // }
  /**
   * @description 卡片行外层信息更新(数据源,样式等)
   */
@@ -165,7 +149,6 @@
    card.width = card.wrap.width
    card.name = card.wrap.name
    card.btnlog = []
    if (window.GLOB.styling && card.errors) { // 样式修改时不做筛查
      this.setState({
@@ -236,6 +219,9 @@
        }
      })
    } else {
      // if (card.wrap.datatype === 'dynamic') {
      // }
      // let supModule = card.setting.supModule ? card.setting.supModule[card.setting.supModule.length - 1] || '' : ''
      // if (supModule === 'empty') {
      //   supModule = ''
@@ -345,10 +331,6 @@
      onOk() {
        card.subcards = card.subcards.filter(item => item.uuid !== cell.uuid)
        // if (card.btnlog) {
        //   card.btnlog = card.btnlog.filter(c => c.$parentId !== cell.uuid)
        // }
        _this.updateComponent(card)
        if (appType === 'mob') return
@@ -424,53 +406,6 @@
    this.updateComponent(card)
  }
  // handleLog = (type, logs, item) => {
  //   let card = fromJS(this.state.card).toJS()
  //   if (type === 'revert') {
  //     let done = false
  //     if (item.$parentId) {
  //       card.subcards.forEach(col => {
  //         if (item.$parentId === col.uuid) {
  //           if (item.$side !== 'back') {
  //             col.elements = col.elements ? [...col.elements, item] : [item]
  //           } else {
  //             col.backElements = col.backElements ? [...col.backElements, item] : [item]
  //           }
  //           done = true
  //         }
  //       })
  //     }
  //     card.btnlog = logs
  //     this.setState({ card: {...card, subcards: []} }, () => {
  //       this.updateComponent(card)
  //     })
  //     if (!done) {
  //       notification.warning({
  //         top: 92,
  //         message: '附属卡片已删除!',
  //         duration: 2
  //       })
  //     } else {
  //       notification.success({
  //         top: 92,
  //         message: '恢复成功!',
  //         duration: 2
  //       })
  //     }
  //   } else {
  //     card.btnlog = logs
  //     this.updateComponent(card)
  //     notification.success({
  //       top: 92,
  //       message: '清除成功!',
  //       duration: 2
  //     })
  //   }
  // }
  move = (item, direction) => {
    let card = fromJS(this.state.card).toJS()
@@ -631,12 +566,10 @@
            <CopyComponent type="propcard" card={card}/>
            <PasteComponent options={['cardcell']} updateConfig={this.pasteComponent} />
            <FontColorsOutlined className="style" title="调整样式" onClick={this.changeStyle}/>
            {/* <LogComponent btnlog={card.btnlog || []} handlelog={this.handleLog} /> */}
            <ClockComponent config={card} updateConfig={this.updateComponent}/>
            {card.wrap.datatype === 'dynamic' ? <ClockComponent config={card} updateConfig={this.updateComponent}/> : <ClockCircleOutlined style={{color: '#eeeeee', cursor: 'not-allowed'}}/>}
            <UserComponent config={card}/>
            <DeleteOutlined className="close" title="删除组件" onClick={() => this.props.deletecomponent(card.uuid)} />
            {card.wrap.datatype !== 'static' ? <SettingComponent config={card} updateConfig={this.updateComponent} /> : null}
            {card.wrap.datatype === 'static' ? <SettingOutlined style={{color: '#eeeeee', cursor: 'not-allowed'}}/> : null}
            {card.wrap.datatype === 'dynamic' ? <SettingComponent config={card} updateConfig={this.updateComponent} /> : <SettingOutlined style={{color: '#eeeeee', cursor: 'not-allowed'}}/>}
          </div>
        } trigger="hover">
          <ToolOutlined />
src/menu/components/card/table-card/index.jsx
@@ -18,7 +18,6 @@
const MobPagination = asyncIconComponent(() => import('@/menu/components/share/mobPagination'))
const CopyComponent = asyncIconComponent(() => import('@/menu/components/share/copycomponent'))
const PasteComponent = asyncIconComponent(() => import('@/components/paste'))
// const LogComponent = asyncIconComponent(() => import('@/menu/components/share/logcomponent'))
const UserComponent = asyncIconComponent(() => import('@/menu/components/share/usercomponent'))
const NormalHeader = asyncComponent(() => import('@/menu/components/share/normalheader'))
const ClockComponent = asyncIconComponent(() => import('@/menu/components/share/clockcomponent'))
@@ -71,7 +70,6 @@
          elements: []
        }],
        action: [],
        btnlog: [],
      }
      
      if (card.config) {
@@ -150,24 +148,12 @@
    }
  }
  // logButton = (id, item) => {
  //   const { card } = this.state
  //   if (id !== card.uuid) return
  //   let btnlog = card.btnlog || []
  //   btnlog.push(item)
  //   this.updateComponent({...card, btnlog})
  // }
  /**
   * @description 卡片行外层信息更新(数据源,样式等)
   */
  updateComponent = (card) => {
    card.width = card.wrap.width
    card.name = card.wrap.name
    card.btnlog = []
    if (window.GLOB.styling && card.errors) { // 样式修改时不做筛查
      this.setState({
@@ -210,14 +196,6 @@
          if (cell.OpenType === 'pop' || (cell.OpenType === 'funcbutton' && cell.execMode === 'pop')) {
            if (!cell.modal || cell.modal.fields.length === 0) {
              card.errors.push({ level: 1, detail: `按钮“${cell.label}”中表单尚未添加`})
            // } else {
            //   cell.modal.fields.forEach(m => {
            //     if (m.type === 'linkMain' && !supModule) {
            //       card.errors.push({ level: 1, detail: `按钮“${cell.label}”中关联主表表单“${m.label}”无效`})
            //     } else if (m.field && !columns.includes(m.field) && lowcols.includes(m.field.toLowerCase())) {
            //       card.errors.push({ level: 1, detail: `按钮“${cell.label}”中表单“${m.label}”大小写与字段集不一致`})
            //     }
            //   })
            }
          }
          if (linkbtn && linkbtn === cell.uuid) {
@@ -266,10 +244,6 @@
      content: '确定删除卡片吗?',
      onOk() {
        card.subcards = card.subcards.filter(item => item.uuid !== cell.uuid)
        // if (card.btnlog) {
        //   card.btnlog = card.btnlog.filter(c => c.$parentId !== cell.uuid)
        // }
        _this.updateComponent(card)
@@ -358,51 +332,6 @@
    // 注册事件-添加搜索
    MKEmitter.emit('addSearch', card.uuid, newcard)
  }
  // handleLog = (type, logs, item) => {
  //   let card = fromJS(this.state.card).toJS()
  //   if (type === 'revert') {
  //     let done = false
  //     if (item.$parentId) {
  //       card.subcards.forEach(col => {
  //         if (item.$parentId === col.uuid) {
  //           if (item.$side !== 'back') {
  //             col.elements = col.elements ? [...col.elements, item] : [item]
  //           } else {
  //             col.backElements = col.backElements ? [...col.backElements, item] : [item]
  //           }
  //           done = true
  //         }
  //       })
  //     }
  //     card.btnlog = logs
  //     this.updateComponent(card)
  //     if (!done) {
  //       notification.warning({
  //         top: 92,
  //         message: '附属卡片已删除!',
  //         duration: 2
  //       })
  //     } else {
  //       notification.success({
  //         top: 92,
  //         message: '恢复成功!',
  //         duration: 2
  //       })
  //     }
  //   } else {
  //     card.btnlog = logs
  //     this.updateComponent(card)
  //     notification.success({
  //       top: 92,
  //       message: '清除成功!',
  //       duration: 2
  //     })
  //   }
  // }
  move = (item, direction) => {
    let card = fromJS(this.state.card).toJS()
@@ -589,7 +518,6 @@
            <CopyComponent type="tablecard" card={card}/>
            <PasteComponent options={['cardcell', 'search', 'form']} updateConfig={this.pasteComponent} />
            <FontColorsOutlined className="style" title="调整样式" onClick={this.changeStyle}/>
            {/* <LogComponent btnlog={card.btnlog || []} handlelog={this.handleLog} /> */}
            <ClockComponent config={card} updateConfig={this.updateComponent}/>
            <UserComponent config={card}/>
            <DeleteOutlined className="close" title="删除组件" onClick={() => this.props.deletecomponent(card.uuid)} />
src/menu/components/carousel/data-card/index.jsx
@@ -15,7 +15,6 @@
const SettingComponent = asyncIconComponent(() => import('@/menu/datasource'))
const NormalForm = asyncIconComponent(() => import('@/components/normalform'))
const CardSimpleComponent = asyncComponent(() => import('@/menu/components/card/cardsimplecomponent'))
// const LogComponent = asyncIconComponent(() => import('@/menu/components/share/logcomponent'))
const CopyComponent = asyncIconComponent(() => import('@/menu/components/share/copycomponent'))
const ClockComponent = asyncIconComponent(() => import('@/menu/components/share/clockcomponent'))
const UserComponent = asyncIconComponent(() => import('@/menu/components/share/usercomponent'))
@@ -56,7 +55,6 @@
        style: { borderWidth: '1px', borderColor: '#e8e8e8', marginTop: '8px', marginBottom: '8px', height: '300px' },
        columns: [],
        scripts: [],
        btnlog: [],
        subcards: [{
          uuid: Utils.getuuid(),
          setting: {},
@@ -109,24 +107,12 @@
    }
  }
  // logButton = (id, item) => {
  //   const { card } = this.state
  //   if (id !== card.uuid) return
  //   let btnlog = card.btnlog || []
  //   btnlog.push(item)
  //   this.updateComponent({...card, btnlog})
  // }
  /**
   * @description 卡片行外层信息更新(数据源,样式等)
   */
  updateComponent = (card) => {
    card.width = card.wrap.width
    card.name = card.wrap.name
    card.btnlog = []
    if (window.GLOB.styling && card.errors) { // 样式修改时不做筛查
      this.setState({
@@ -215,10 +201,6 @@
      onOk() {
        card.subcards = card.subcards.filter(item => item.uuid !== cell.uuid)
        // if (card.btnlog) {
        //   card.btnlog = card.btnlog.filter(c => c.$parentId !== cell.uuid)
        // }
        _this.updateComponent(card)
        if (appType === 'mob') return
@@ -251,36 +233,6 @@
    this.updateComponent(_card)
  }
  // handleLog = (type, logs, item) => {
  //   let card = fromJS(this.state.card).toJS()
  //   if (type === 'revert') {
  //     card.subcards.forEach(col => {
  //       col.elements = [...col.elements, item]
  //       if (item.$parentId === col.uuid) {
  //         col.elements = [...col.elements, item]
  //       }
  //     })
  //     card.btnlog = logs
  //     this.updateComponent(card)
  //     notification.success({
  //       top: 92,
  //       message: '恢复成功!',
  //       duration: 2
  //     })
  //   } else {
  //     card.btnlog = logs
  //     this.updateComponent(card)
  //     notification.success({
  //       top: 92,
  //       message: '清除成功!',
  //       duration: 2
  //     })
  //   }
  // }
  getWrapForms = () => {
    const { card } = this.state
@@ -311,7 +263,6 @@
            </NormalForm>
            <CopyComponent type="datacard" card={card}/>
            <FontColorsOutlined className="style" title="调整样式" onClick={this.changeStyle}/>
            {/* <LogComponent btnlog={card.btnlog || []} handlelog={this.handleLog}/> */}
            <ClockComponent config={card} updateConfig={this.updateComponent}/>
            <UserComponent config={card}/>
            <DeleteOutlined className="close" title="删除组件" onClick={() => this.props.deletecomponent(card.uuid)}/>
src/menu/components/carousel/prop-card/index.jsx
@@ -2,7 +2,7 @@
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { Popover, Modal, Carousel } from 'antd'
import { PlusOutlined, SettingOutlined, EditOutlined, ToolOutlined, DeleteOutlined, FontColorsOutlined } from '@ant-design/icons'
import { PlusOutlined, SettingOutlined, EditOutlined, ToolOutlined, DeleteOutlined, FontColorsOutlined, ClockCircleOutlined } from '@ant-design/icons'
import asyncComponent from '@/utils/asyncComponent'
import asyncIconComponent from '@/utils/asyncIconComponent'
@@ -17,7 +17,6 @@
const CardSimpleComponent = asyncComponent(() => import('@/menu/components/card/cardsimplecomponent'))
const CopyComponent = asyncIconComponent(() => import('@/menu/components/share/copycomponent'))
const PasteComponent = asyncIconComponent(() => import('@/menu/components/share/pastecomponent'))
// const LogComponent = asyncIconComponent(() => import('@/menu/components/share/logcomponent'))
const ClockComponent = asyncIconComponent(() => import('@/menu/components/share/clockcomponent'))
const UserComponent = asyncIconComponent(() => import('@/menu/components/share/usercomponent'))
@@ -62,8 +61,7 @@
          setting: {},
          style: {},
          elements: [],
        }],
        btnlog: [],
        }]
      }
      if (card.config) {
@@ -96,7 +94,6 @@
  }
  componentDidMount () {
    // MKEmitter.addListener('logButton', this.logButton)
    MKEmitter.addListener('submitComponentStyle', this.updateComponentStyle)
  }
@@ -111,7 +108,6 @@
    this.setState = () => {
      return
    }
    // MKEmitter.removeListener('logButton', this.logButton)
    MKEmitter.removeListener('submitComponentStyle', this.updateComponentStyle)
  }
@@ -132,24 +128,12 @@
    })
  }
  // logButton = (id, item) => {
  //   const { card } = this.state
  //   if (id !== card.uuid) return
  //   let btnlog = card.btnlog || []
  //   btnlog.push(item)
  //   this.updateComponent({...card, btnlog})
  // }
  /**
   * @description 卡片行外层信息更新(数据源,样式等)
   */
  updateComponent = (card) => {
    card.width = card.wrap.width
    card.name = card.wrap.name
    card.btnlog = []
    if (window.GLOB.styling && card.errors) { // 样式修改时不做筛查
      this.setState({
@@ -263,10 +247,6 @@
      onOk() {
        card.subcards = card.subcards.filter(item => item.uuid !== cell.uuid)
        // if (card.btnlog) {
        //   card.btnlog = card.btnlog.filter(c => c.$parentId !== cell.uuid)
        // }
        _this.updateComponent(card)
        if (appType === 'mob') return
@@ -323,49 +303,6 @@
    this.updateComponent(card)
  }
  // handleLog = (type, logs, item) => {
  //   let card = fromJS(this.state.card).toJS()
  //   if (type === 'revert') {
  //     let done = false
  //     if (item.$parentId) {
  //       card.subcards.forEach(col => {
  //         if (item.$parentId === col.uuid) {
  //           col.elements = [...col.elements, item]
  //           done = true
  //         }
  //       })
  //     }
  //     card.btnlog = logs
  //     this.setState({ card: {...card, subcards: []} }, () => {
  //       this.updateComponent(card)
  //     })
  //     if (!done) {
  //       notification.warning({
  //         top: 92,
  //         message: '附属卡片已删除!',
  //         duration: 2
  //       })
  //     } else {
  //       notification.success({
  //         top: 92,
  //         message: '恢复成功!',
  //         duration: 2
  //       })
  //     }
  //   } else {
  //     card.btnlog = logs
  //     this.updateComponent(card)
  //     notification.success({
  //       top: 92,
  //       message: '清除成功!',
  //       duration: 2
  //     })
  //   }
  // }
  move = (item, direction) => {
    let card = fromJS(this.state.card).toJS()
@@ -419,12 +356,11 @@
            <CopyComponent type="propcard" card={card}/>
            <PasteComponent config={card} options={['cardcell']} updateConfig={this.updateComponent} />
            <FontColorsOutlined className="style" title="调整样式" onClick={this.changeStyle}/>
            {/* <LogComponent btnlog={card.btnlog || []} handlelog={this.handleLog} /> */}
            <ClockComponent config={card} updateConfig={this.updateComponent}/>
            {card.wrap.datatype === 'dynamic' ? <ClockComponent config={card} updateConfig={this.updateComponent}/> : <ClockCircleOutlined style={{color: '#eeeeee', cursor: 'not-allowed'}}/>}
            <UserComponent config={card}/>
            <DeleteOutlined className="close" title="删除组件" onClick={() => this.props.deletecomponent(card.uuid)} />
            {card.wrap.datatype !== 'static' ? <SettingComponent config={card} updateConfig={this.updateComponent} /> : null}
            {card.wrap.datatype === 'static' ? <SettingOutlined style={{color: '#eeeeee', cursor: 'not-allowed'}}/> : null}
            {card.wrap.datatype === 'dynamic' ? <SettingComponent config={card} updateConfig={this.updateComponent} /> : <SettingOutlined style={{color: '#eeeeee', cursor: 'not-allowed'}}/>}
          </div>
        } trigger="hover">
          <ToolOutlined/>
src/menu/components/chart/antv-bar/index.jsx
@@ -18,7 +18,6 @@
const SettingComponent = asyncIconComponent(() => import('@/menu/datasource'))
const ChartCompileForm = asyncIconComponent(() => import('./chartcompile'))
// const LogComponent = asyncIconComponent(() => import('@/menu/components/share/logcomponent'))
const CopyComponent = asyncIconComponent(() => import('@/menu/components/share/copycomponent'))
const PasteComponent = asyncIconComponent(() => import('@/menu/components/share/pastecomponent'))
const NormalHeader = asyncComponent(() => import('@/menu/components/share/normalheader'))
@@ -91,7 +90,6 @@
        search: [],
        action: [],
        plot: _plot,
        btnlog: [],
      }
      if (card.config) {
@@ -1228,7 +1226,6 @@
    card.width = card.plot.width
    card.name = card.plot.name
    card.btnlog = []
    card.errors = []
    let columns = card.columns.map(c => c.field)
@@ -1345,30 +1342,6 @@
    this.updateComponent(_card)
  }
  // handleLog = (type, logs, item) => {
  //   let card = fromJS(this.state.card).toJS()
  //   if (type === 'revert') {
  //     card.action = card.action ? [...card.action, item] : [item]
  //     card.btnlog = logs
  //     this.updateComponent(card)
  //     notification.success({
  //       top: 92,
  //       message: '恢复成功!',
  //       duration: 2
  //     })
  //   } else {
  //     card.btnlog = logs
  //     this.updateComponent(card)
  //     notification.success({
  //       top: 92,
  //       message: '清除成功!',
  //       duration: 2
  //     })
  //   }
  // }
  clickComponent = (e) => {
    if (sessionStorage.getItem('style-control') === 'true' || sessionStorage.getItem('style-control') === 'component') {
      e.stopPropagation()
@@ -1390,7 +1363,6 @@
            <CopyComponent type="line" card={card}/>
            <PasteComponent config={card} options={['action', 'search']} updateConfig={this.updateComponent} />
            <FontColorsOutlined className="style" title="调整样式" onClick={this.changeStyle}/>
            {/* <LogComponent btnlog={card.btnlog || []} handlelog={this.handleLog} /> */}
            <ClockComponent config={card} updateConfig={this.updateComponent}/>
            <UserComponent config={card}/>
            <DeleteOutlined className="close" title="delete" onClick={() => this.props.deletecomponent(card.uuid)} />
src/menu/components/chart/antv-pie/index.jsx
@@ -83,7 +83,6 @@
        search: [],
        action: [],
        plot: _plot,
        btnlog: [],
      }
      if (card.config) {
src/menu/components/chart/antv-scatter/index.jsx
@@ -16,7 +16,6 @@
const SettingComponent = asyncIconComponent(() => import('@/menu/datasource'))
const ChartCompileForm = asyncIconComponent(() => import('./chartcompile'))
// const LogComponent = asyncIconComponent(() => import('@/menu/components/share/logcomponent'))
const CopyComponent = asyncIconComponent(() => import('@/menu/components/share/copycomponent'))
const PasteComponent = asyncIconComponent(() => import('@/menu/components/share/pastecomponent'))
const NormalHeader = asyncComponent(() => import('@/menu/components/share/normalheader'))
@@ -78,7 +77,6 @@
        search: [],
        action: [],
        plot: _plot,
        btnlog: [],
      }
      if (card.config) {
@@ -363,30 +361,6 @@
    this.updateComponent(_card)
  }
  // handleLog = (type, logs, item) => {
  //   let card = fromJS(this.state.card).toJS()
  //   if (type === 'revert') {
  //     card.action = card.action ? [...card.action, item] : [item]
  //     card.btnlog = logs
  //     this.updateComponent(card)
  //     notification.success({
  //       top: 92,
  //       message: '恢复成功!',
  //       duration: 2
  //     })
  //   } else {
  //     card.btnlog = logs
  //     this.updateComponent(card)
  //     notification.success({
  //       top: 92,
  //       message: '清除成功!',
  //       duration: 2
  //     })
  //   }
  // }
  clickComponent = (e) => {
    if (sessionStorage.getItem('style-control') === 'true' || sessionStorage.getItem('style-control') === 'component') {
      e.stopPropagation()
@@ -408,7 +382,6 @@
            <CopyComponent type="line" card={card}/>
            <PasteComponent config={card} options={['action', 'search']} updateConfig={this.updateComponent}/>
            <FontColorsOutlined className="style" title="调整样式" onClick={this.changeStyle}/>
            {/* <LogComponent btnlog={card.btnlog || []} handlelog={this.handleLog}/> */}
            <ClockComponent config={card} updateConfig={this.updateComponent}/>
            <UserComponent config={card}/>
            <DeleteOutlined className="close" title="delete" onClick={() => this.props.deletecomponent(card.uuid)}/>
src/menu/components/chart/chart-custom/index.jsx
@@ -70,7 +70,6 @@
        search: [],
        action: [],
        plot: _plot,
        btnlog: [],
      }
      if (card.config) {
src/menu/components/share/actioncomponent/index.jsx
@@ -293,15 +293,10 @@
        _actionlist = _actionlist.filter(item => item.uuid !== card.uuid)
        let btnlog = config.btnlog || []
        if (card.OpenType === 'popview' || card.verify || card.modal) {
          btnlog.push(card)
        }
        _this.setState({
          actionlist: _actionlist
        }, () => {
          _this.props.updateaction({...config, action: _actionlist, btnlog})
          _this.props.updateaction({...config, action: _actionlist})
        })
        if (card.origin || appType === 'mob') return
src/menu/components/share/logcomponent/index.jsx
File was deleted
src/menu/components/share/logcomponent/index.scss
File was deleted
src/menu/components/share/sourcecomponent/inputform/index.jsx
@@ -18,9 +18,7 @@
class PopSource extends Component {
  static propTpyes = {
    btnlog: PropTypes.array,
    keyword: PropTypes.string,
    handlelog: PropTypes.func
    keyword: PropTypes.string
  }
  state = {
src/menu/components/share/usercomponent/index.jsx
@@ -16,7 +16,7 @@
class UserComponent extends Component {
  static propTpyes = {
    btnlog: PropTypes.array
    config: PropTypes.object
  }
  state = {
src/menu/components/table/base-table/index.jsx
@@ -71,7 +71,6 @@
          { origin: true, uuid: Utils.getuuid(), Align: 'left', label: 'label3', field: '', Hide: 'false', IsSort: 'true', type: 'text', Width: 120 },
        ],
        scripts: [],
        btnlog: [],
        isNew: true
      }
@@ -399,44 +398,6 @@
    this.updateComponent(card)
  }
  // handleLog = (type, logs, item) => {
  //   let card = fromJS(this.state.card).toJS()
  //   if (type === 'revert') {
  //     let done = false
  //     if (item.$parentId) {
  //       card.cols.forEach(col => {
  //         if (col.type !== 'action') return
  //         if (item.$parentId === col.uuid) {
  //           col.elements = col.elements ? [...col.elements, item] : [item]
  //           done = true
  //         }
  //       })
  //     }
  //     if (!done) {
  //       card.action = card.action ? [...card.action, item] : [item]
  //     }
  //     card.btnlog = logs
  //     this.updateComponent(card)
  //     notification.success({
  //       top: 92,
  //       message: '恢复成功!',
  //       duration: 2
  //     })
  //   } else {
  //     card.btnlog = logs
  //     this.updateComponent(card)
  //     notification.success({
  //       top: 92,
  //       message: '清除成功!',
  //       duration: 2
  //     })
  //   }
  // }
  getWrapForms = () => {
    const { wrap, action, columns, cols } = this.state.card
@@ -493,7 +454,6 @@
            <CopyComponent type="normaltable" card={card}/>
            <PasteComponent config={card} options={options} updateConfig={this.updateComponent} />
            <FontColorsOutlined className="style" title="调整样式" onClick={this.changeStyle}/>
            {/* <LogComponent btnlog={card.btnlog || []} handlelog={this.handleLog} /> */}
            <UserComponent config={card}/>
            <DeleteOutlined className="close" title="删除组件" onClick={() => this.props.deletecomponent(card.uuid)} />
            <SettingComponent config={card} updateConfig={this.updateComponent} />
src/menu/components/table/edit-table/columns/tableIn/index.jsx
@@ -196,6 +196,17 @@
  }
  componentDidMount () {
    this.getsysScript()
  }
  getsysScript = () => {
    if (sessionStorage.getItem('mk_sys_scripts')) {
      this.setState({
        systemScripts: JSON.parse(sessionStorage.getItem('mk_sys_scripts'))
      })
      return
    }
    let _scriptSql = `Select distinct func+Remark as funcname,longparam, s.Sort from  s_custom_script s inner join (select OpenID from sapp where ID=@Appkey@) p on s.openid = case when s.appkey='' then s.openid else p.OpenID end order by s.Sort`
    _scriptSql = Utils.formatOptions(_scriptSql)
@@ -214,13 +225,17 @@
    
    Api.getSystemConfig(_sParam).then(res => {
      if (res.status) {
        let _scripts = res.data.map(item => {
          return {
            name: item.funcname,
            value: window.decodeURIComponent(window.atob(item.longparam))
          }
        })
        sessionStorage.setItem('mk_sys_scripts', JSON.stringify(_scripts))
        this.setState({
          systemScripts: res.data.map(item => {
            return {
              name: item.funcname,
              value: window.decodeURIComponent(window.atob(item.longparam))
            }
          })
          systemScripts: _scripts
        })
      } else {
        notification.warning({
src/menu/components/table/edit-table/index.jsx
@@ -68,7 +68,6 @@
          { origin: true, uuid: Utils.getuuid(), Align: 'left', label: 'label3', field: '', Hide: 'false', IsSort: 'true', type: 'text', Width: 120 },
        ],
        scripts: [],
        btnlog: [],
        submit: {intertype: 'system', default: 'true', innerFunc: '', execSuccess: 'grid', execError: 'never', scripts: [], uniques: []},
        isNew: true
      }
src/menu/components/table/normal-table/index.jsx
@@ -22,7 +22,6 @@
const UserComponent = asyncIconComponent(() => import('@/menu/components/share/usercomponent'))
const PasteComponent = asyncIconComponent(() => import('@/menu/components/share/pastecomponent'))
const ClockComponent = asyncIconComponent(() => import('@/menu/components/share/clockcomponent'))
// const LogComponent = asyncIconComponent(() => import('@/menu/components/share/logcomponent'))
const ColumnComponent = asyncComponent(() => import('./columns'))
class TableCardEditComponent extends Component {
@@ -75,7 +74,6 @@
          { origin: true, uuid: Utils.getuuid(), Align: 'left', label: 'label3', field: '', Hide: 'false', IsSort: 'true', type: 'text', Width: 120 },
        ],
        scripts: [],
        btnlog: [],
        isNew: true
      }
@@ -145,7 +143,6 @@
  componentDidMount () {
    MKEmitter.addListener('submitModal', this.handleSave)
    // MKEmitter.addListener('logButton', this.logButton)
    MKEmitter.addListener('completeSave', this.completeSave)
  }
@@ -161,7 +158,6 @@
      return
    }
    MKEmitter.removeListener('submitModal', this.handleSave)
    // MKEmitter.removeListener('logButton', this.logButton)
    MKEmitter.removeListener('completeSave', this.completeSave)
  }
@@ -299,17 +295,6 @@
    this.props.updateConfig(_card)
  }
  // logButton = (id, item) => {
  //   const { card } = this.state
  //   if (id !== card.uuid) return
  //   let btnlog = card.btnlog || []
  //   btnlog.push(item)
  //   this.updateComponent({...card, btnlog})
  // }
  changeStyle = () => {
    const { card } = this.state
@@ -424,44 +409,6 @@
    this.updateComponent(card)
  }
  // handleLog = (type, logs, item) => {
  //   let card = fromJS(this.state.card).toJS()
  //   if (type === 'revert') {
  //     let done = false
  //     if (item.$parentId) {
  //       card.cols.forEach(col => {
  //         if (col.type !== 'action') return
  //         if (item.$parentId === col.uuid) {
  //           col.elements = col.elements ? [...col.elements, item] : [item]
  //           done = true
  //         }
  //       })
  //     }
  //     if (!done) {
  //       card.action = card.action ? [...card.action, item] : [item]
  //     }
  //     card.btnlog = logs
  //     this.updateComponent(card)
  //     notification.success({
  //       top: 92,
  //       message: '恢复成功!',
  //       duration: 2
  //     })
  //   } else {
  //     card.btnlog = logs
  //     this.updateComponent(card)
  //     notification.success({
  //       top: 92,
  //       message: '清除成功!',
  //       duration: 2
  //     })
  //   }
  // }
  getWrapForms = () => {
    const { wrap, action, columns, cols } = this.state.card
@@ -522,7 +469,6 @@
            <CopyComponent type="normaltable" card={card}/>
            <PasteComponent config={card} options={options} updateConfig={this.updateComponent} />
            <FontColorsOutlined className="style" title="调整样式" onClick={this.changeStyle}/>
            {/* <LogComponent btnlog={card.btnlog || []} handlelog={this.handleLog} /> */}
            <ClockComponent config={card} updateConfig={this.updateComponent}/>
            <UserComponent config={card}/>
            <DeleteOutlined className="close" title="删除组件" onClick={() => this.props.deletecomponent(card.uuid)} />
src/menu/datasource/index.jsx
@@ -40,6 +40,11 @@
    const { config } = this.props
    const { appType } = this.state
    if (config.type === 'interface') { // 公共数据源不使用搜索
      this.setState({visible: true})
      return
    }
    let search = []
    let menu = fromJS(window.GLOB.customMenu).toJS()
src/menu/datasource/verifycard/index.jsx
@@ -202,6 +202,13 @@
  }
  getsysScript = () => {
    if (sessionStorage.getItem('mk_sys_scripts')) {
      this.setState({
        systemScripts: JSON.parse(sessionStorage.getItem('mk_sys_scripts'))
      })
      return
    }
    let _scriptSql = `Select distinct func+Remark as funcname,longparam, s.Sort from  s_custom_script s inner join (select OpenID from sapp where ID=@Appkey@) p on s.openid = case when s.appkey='' then s.openid else p.OpenID end order by s.Sort`
    _scriptSql = Utils.formatOptions(_scriptSql)
@@ -220,17 +227,15 @@
    
    Api.getSystemConfig(_sParam).then(res => {
      if (res.status) {
        let _scripts = []
        res.data.forEach(item => {
          let _item = {
        let _scripts = res.data.map(item => {
          return {
            name: item.funcname,
            value: window.decodeURIComponent(window.atob(item.longparam))
          }
          _scripts.push(_item)
        })
        sessionStorage.setItem('mk_sys_scripts', JSON.stringify(_scripts))
        this.setState({
          systemScripts: _scripts
        })
src/menu/datasource/verifycard/settingform/index.jsx
@@ -1,5 +1,6 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { fromJS } from 'immutable'
import { Form, Row, Col, Input, Radio, Tooltip, notification, Select, InputNumber, Cascader } from 'antd'
import { QuestionCircleOutlined } from '@ant-design/icons'
@@ -22,18 +23,15 @@
  }
  state = {
    interType: this.props.setting.interType || 'system',
    laypage: this.props.setting.laypage || 'true',
    setting: null,
    modules: [],
    usefulFields: [],
    useMSearch: this.props.setting.useMSearch || 'false',
    sysInterface: this.props.setting.sysInterface || 'false',
    supModule: this.props.setting.supModule || [],
    innerRules: [],
    innertip: '',
    appType: sessionStorage.getItem('appType')
  }
  UNSAFE_componentWillMount () {
    const { config } = this.props
    const { config, setting } = this.props
    let modules = MenuUtils.getSupModules(window.GLOB.customMenu.components, config.uuid) || []
@@ -43,17 +41,36 @@
    })
    let usefulFields = sessionStorage.getItem('permFuncField')
    let innerRules = []
    let innertip = ''
    if (usefulFields) {
      try {
        usefulFields = JSON.parse(usefulFields)
        if (usefulFields.length > 0) {
          innertip = '开头可用字符:' + usefulFields.join(', ')
          let str = '^(' + usefulFields.join('|') + ')'
          let _patten = new RegExp(str + formRule.func.innerPattern + '$', 'g')
          innerRules.push({
            pattern: _patten,
            message: formRule.func.innerMessage
          })
        }
      } catch (e) {
        usefulFields = []
        innerRules = []
      }
    } else {
      usefulFields = []
    }
    this.setState({modules, usefulFields})
    let _setting = fromJS(setting).toJS()
    _setting.interType = setting.interType || 'system'
    _setting.laypage = setting.laypage || 'true'
    _setting.useMSearch = setting.useMSearch || 'false'
    _setting.sysInterface = setting.sysInterface || 'false'
    _setting.supModule = setting.supModule || []
    _setting.execute = setting.execute || 'true'
    this.setState({modules, innerRules, innertip, setting: _setting})
  }
  handleConfirm = () => {
@@ -69,15 +86,7 @@
          }
          // 数据源前端验证
          if (values.interType === 'system' && values.execute !== 'false' && !values.dataresource) {
            notification.warning({
              top: 92,
              message: '请填写内部函数或数据源!',
              duration: 5
            })
            reject()
            return
          } else if (values.interType === 'system' && values.execute !== 'false' && values.dataresource) {
          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)
@@ -133,35 +142,21 @@
    })
  }
  onRadioChange = (e, key) => {
    let value = e.target.value
  onOptionChange = (value, key) => {
    let setting = fromJS(this.state.setting).toJS()
    setting[key] = value
    if (key === 'interType') {
      this.setState({
        interType: value
      })
    }
  }
  onSysInter = (e) => {
    let value = e.target.value
    this.setState({
      sysInterface: value
    })
    if (value === 'true') {
    this.setState({setting})
    if (key === 'sysInterface' && value === 'true') {
      this.props.form.setFieldsValue({interface: window.GLOB.mainSystemApi})
    }
  }
  changeSupModule = (val) => {
    this.setState({supModule: val})
  }
  render() {
    const { setting, columns, config } = this.props
    const { columns, config } = this.props
    const { getFieldDecorator } = this.props.form
    const { interType, modules, useMSearch, laypage, supModule, usefulFields, appType, sysInterface } = this.state
    const { setting, modules, innerRules, appType, innertip } = this.state
    const formItemLayout = {
      labelCol: {
@@ -174,24 +169,23 @@
      }
    }
    let tooltip = null
    let rules = []
    if (usefulFields.length > 0) {
      tooltip = '开头可用字符:' + usefulFields.join(', ')
      let str = '^(' + usefulFields.join('|') + ')'
      let _patten = new RegExp(str + formRule.func.innerPattern + '$', 'g')
      rules.push({
        pattern: _patten,
        message: formRule.func.innerMessage
      })
    }
    return (
      <div className="model-datasource-setting-form-box">
        <Form {...formItemLayout} className="model-setting-form">
          <Row gutter={24}>
            {config.type === 'interface' ? <Col span={8}>
              <Form.Item label="数据源名称">
                {getFieldDecorator('name', {
                  initialValue: setting.name,
                  rules: [
                    {
                      required: true,
                      message: this.props.dict['form.required.input'] + '数据源名称!'
                    }
                  ]
                })(<Input placeholder={''} autoComplete="off" />)}
              </Form.Item>
            </Col> : null}
            <Col span={8}>
              <Form.Item label="表名">
                {getFieldDecorator('tableName', {
@@ -212,7 +206,7 @@
            <Col span={8}>
              <Form.Item label="接口类型">
                {getFieldDecorator('interType', {
                  initialValue: interType,
                  initialValue: setting.interType,
                  rules: [
                    {
                      required: true,
@@ -220,17 +214,17 @@
                    },
                  ]
                })(
                <Radio.Group onChange={(e) => {this.onRadioChange(e, 'interType')}}>
                <Radio.Group onChange={(e) => {this.onOptionChange(e.target.value, 'interType')}}>
                  <Radio value="system">系统</Radio>
                  <Radio value="inner">内部</Radio>
                  <Radio value="outer">外部</Radio>
                </Radio.Group>)}
              </Form.Item>
            </Col>
            {interType === 'outer' ? <Col span={8}>
            {setting.interType === 'outer' ? <Col span={8}>
              <Form.Item label="系统接口">
                {getFieldDecorator('sysInterface', {
                  initialValue: sysInterface,
                  initialValue: setting.sysInterface,
                  rules: [
                    {
                      required: true,
@@ -238,15 +232,15 @@
                    }
                  ]
                })(
                <Radio.Group onChange={this.onSysInter}>
                <Radio.Group onChange={(e) => {this.onOptionChange(e.target.value, 'sysInterface')}}>
                  <Radio value="true">是</Radio>
                  <Radio value="false">否</Radio>
                </Radio.Group>)}
              </Form.Item>
            </Col> : null}
            {interType === 'inner' ? <Col span={8}>
              <Form.Item label={tooltip ?
                <Tooltip placement="topLeft" title={tooltip}>
            {setting.interType === 'inner' ? <Col span={8}>
              <Form.Item label={innertip ?
                <Tooltip placement="topLeft" title={innertip}>
                  <QuestionCircleOutlined className="mk-form-tip" />
                  内部函数
                </Tooltip> : '内部函数'
@@ -258,25 +252,25 @@
                      required: true,
                      message: this.props.dict['form.required.input'] + '内部函数!'
                    },
                    ...rules
                    ...innerRules
                  ]
                })(<Input placeholder={''} autoComplete="off" />)}
              </Form.Item>
            </Col> : null}
            {interType === 'outer' ? <Col className="outer-interface" span={24}>
            {setting.interType === 'outer' ? <Col className="outer-interface" span={24}>
              <Form.Item label="接口地址">
                {getFieldDecorator('interface', {
                  initialValue: setting.interface || (sysInterface === 'true' ? window.GLOB.mainSystemApi : ''),
                  initialValue: setting.interface || (setting.sysInterface === 'true' ? window.GLOB.mainSystemApi : ''),
                  rules: [
                    {
                      required: sysInterface !== 'true' ? true : false,
                      required: setting.sysInterface !== 'true' ? true : false,
                      message: this.props.dict['form.required.input'] + '接口地址!'
                    }
                  ]
                })(<TextArea rows={2} readOnly={sysInterface === 'true'}/>)}
                })(<TextArea rows={2} readOnly={setting.sysInterface === 'true'}/>)}
              </Form.Item>
            </Col> : null}
            {interType === 'outer' && sysInterface !== 'true' ? <Col className="outer-interface" span={24}>
            {setting.interType === 'outer' && setting.sysInterface !== 'true' ? <Col className="outer-interface" span={24}>
              <Form.Item label={<Tooltip placement="topLeft" title="正式系统接口地址,为空时使用接口地址">
                  <QuestionCircleOutlined className="mk-form-tip" />
                  正式地址
@@ -287,17 +281,14 @@
                })(<TextArea rows={2}/>)}
              </Form.Item>
            </Col> : null}
            {interType === 'outer' ? <Col span={8}>
            {setting.interType === 'outer' ? <Col span={8}>
              <Form.Item label="外部函数">
                {getFieldDecorator('outerFunc', {
                  initialValue: setting.outerFunc || '',
                  rules: [
                  ]
                  initialValue: setting.outerFunc || ''
                })(<Input placeholder={''} autoComplete="off" />)}
              </Form.Item>
            </Col> : null}
            {interType === 'system' ? <Col span={24} className="data-source" style={{paddingLeft: '7px'}}>
            {setting.interType === 'system' ? <Col span={24} className="data-source" style={{paddingLeft: '7px'}}>
              <Form.Item labelCol={{xs: { span: 24 }, sm: { span: 2 }}} wrapperCol={ {xs: { span: 24 }, sm: { span: 22 }} } label={
                <Tooltip placement="topLeft" title={`使用系统函数时,需填写数据源。注:数据权限替换符 $@ -> /* 或 ''、 @$ -> */ 或 '';查询替换符 $select@ -> /* 或 ''、 @select$ -> */ 或 '';统计替换符 $sum@ -> /* 或 ''、 @sum$ -> */ 或 ''。`}>
                  <QuestionCircleOutlined className="mk-form-tip" />
@@ -305,11 +296,17 @@
                </Tooltip>
              }>
                {getFieldDecorator('dataresource', {
                  initialValue: setting.dataresource || ''
                  initialValue: setting.dataresource || '',
                  rules: [
                    {
                      required: setting.execute !== 'false' ? true : false,
                      message: this.props.dict['form.required.input'] + '数据源!'
                    }
                  ]
                })(<CodeMirror />)}
              </Form.Item>
            </Col> : null}
            {interType === 'system' ? <Col span={8}>
            {setting.interType === 'system' ? <Col span={8}>
              <Form.Item label={
                <Tooltip placement="topLeft" title={'查询时,搜索条件以where条件拼接进入sql,统计时,将数据源中以“@+搜索字段+@”的内容,以搜索条件中的值进行替换后,提交查询,注:查询类型仅在使用系统函数时有效。'}>
                  <QuestionCircleOutlined className="mk-form-tip" />
@@ -354,18 +351,18 @@
                })(<Input placeholder={'ID asc, UID desc'} autoComplete="off" />)}
              </Form.Item>
            </Col> : null}
            {interType === 'system' ? <Col span={8}>
            {setting.interType === 'system' ? <Col span={8}>
              <Form.Item label="默认sql">
                {getFieldDecorator('execute', {
                  initialValue: setting.execute || 'true'
                  initialValue: setting.execute
                })(
                <Radio.Group>
                <Radio.Group onChange={(e) => {this.onOptionChange(e.target.value, 'execute')}}>
                  <Radio value="true">执行</Radio>
                  <Radio value="false">不执行</Radio>
                </Radio.Group>)}
              </Form.Item>
            </Col> : null}
            {!['navbar', 'balcony', 'menubar'].includes(config.type) && (!config.wrap || config.wrap.supType !== 'multi') ? <Col span={8}>
            {!['navbar', 'balcony', 'menubar', 'interface'].includes(config.type) && (!config.wrap || config.wrap.supType !== 'multi') ? <Col span={8}>
              <Form.Item label={
                <Tooltip placement="topLeft" title={'该组件如果受其他组件控制,请选项相应的组件,没有时选“无”。'}>
                  <QuestionCircleOutlined className="mk-form-tip" />
@@ -373,7 +370,7 @@
                </Tooltip>
              }>
                {getFieldDecorator('supModule', {
                  initialValue: supModule,
                  initialValue: setting.supModule,
                  rules: [
                    {
                      required: true,
@@ -381,7 +378,7 @@
                    }
                  ]
                })(
                  <Cascader options={modules} onChange={this.changeSupModule} expandTrigger="hover" placeholder="" />
                  <Cascader options={modules} onChange={(val) => {this.onOptionChange(val, 'supModule')}} expandTrigger="hover" placeholder="" />
                )}
              </Form.Item>
            </Col> : null}
@@ -390,14 +387,14 @@
                {getFieldDecorator('laypage', {
                  initialValue: setting.laypage || 'true'
                })(
                  <Radio.Group onChange={(e) => this.setState({laypage: e.target.value})}>
                  <Radio.Group onChange={(e) => {this.onOptionChange(e.target.value, 'laypage')}}>
                    <Radio value="true">是</Radio>
                    <Radio value="false">否</Radio>
                  </Radio.Group>
                )}
              </Form.Item>
            </Col> : null}
            {config.pageable && laypage !== 'false' ? <Col span={8}>
            {config.pageable && setting.laypage !== 'false' ? <Col span={8}>
              <Form.Item label={
                <Tooltip placement="topLeft" title="选择分页时有效。">
                  <QuestionCircleOutlined className="mk-form-tip" />
@@ -416,7 +413,7 @@
              </Form.Item>
            </Col> : null}
            {/* 1、不分页且不存在上级模块 */}
            {!['navbar'].includes(config.type) && !['editable'].includes(config.subtype) && (!config.pageable || (config.pageable && laypage === 'false')) && (!supModule || supModule.length === 0 || supModule[0] === 'empty') ? <Col span={8}>
            {!['navbar', 'interface'].includes(config.type) && !['editable'].includes(config.subtype) && (!config.pageable || (config.pageable && setting.laypage === 'false')) && (setting.supModule.length === 0 || setting.supModule[0] === 'empty') ? <Col span={8}>
              <Form.Item label={
                <Tooltip placement="topLeft" title={'初始化加载时,是否与其他组件一同加载数据,注:仅在使用系统函数,且初始化加载数据时有效,分页请求时无效。'}>
                  <QuestionCircleOutlined className="mk-form-tip" />
@@ -433,7 +430,7 @@
                )}
              </Form.Item>
            </Col> : null}
            {!['navbar', 'balcony', 'menubar'].includes(config.type) ? <Col span={8}>
            {!['navbar', 'balcony', 'menubar', 'interface'].includes(config.type) ? <Col span={8}>
              <Form.Item label={
                <Tooltip placement="topLeft" title={'优先使用同级的搜索条件组件,同级搜索不存在时,依次向上选取,与当前组件的搜索条件一同用作数据过滤(当前组件的搜索条件优先)。'}>
                  <QuestionCircleOutlined className="mk-form-tip" />
@@ -443,14 +440,14 @@
                {getFieldDecorator('useMSearch', {
                  initialValue: setting.useMSearch || 'true'
                })(
                  <Radio.Group onChange={(e) => this.setState({useMSearch: e.target.value})}>
                  <Radio.Group onChange={(e) => {this.onOptionChange(e.target.value, 'useMSearch')}}>
                    <Radio value="true">使用</Radio>
                    <Radio value="false">不使用</Radio>
                  </Radio.Group>
                )}
              </Form.Item>
            </Col> : null}
            {!['navbar', 'balcony', 'menubar'].includes(config.type) && useMSearch === 'true' && appType !== 'mob' ? <Col span={8}>
            {!['navbar', 'balcony', 'menubar', 'interface'].includes(config.type) && setting.useMSearch === 'true' && appType !== 'mob' ? <Col span={8}>
              <Form.Item label={
                <Tooltip placement="topLeft" title={'外层搜索条件改变时,是否刷新当前组件数据。'}>
                  <QuestionCircleOutlined className="mk-form-tip" />
@@ -478,7 +475,7 @@
                </Radio.Group>)}
              </Form.Item>
            </Col>
            {!['navbar', 'balcony', 'menubar'].includes(config.type) ? <Col span={8}>
            {!['navbar', 'balcony', 'menubar', 'interface'].includes(config.type) ? <Col span={8}>
              <Form.Item label="初始化数据">
                {getFieldDecorator('onload', {
                  initialValue: setting.onload || 'true'
@@ -490,6 +487,39 @@
                )}
              </Form.Item>
            </Col> : null}
            {config.type === 'interface' ? <Col span={8}>
              <Form.Item label="定时器">
                {getFieldDecorator('timer', {
                  initialValue: setting.timer || ''
                })(
                  <Select onChange={(value) => {this.onOptionChange(value, 'timer')}}>
                    <Select.Option value=""> 无 </Select.Option>
                    <Select.Option value="2s"> 2秒 </Select.Option>
                    <Select.Option value="5s"> 5秒 </Select.Option>
                    <Select.Option value="15s"> 15秒 </Select.Option>
                    <Select.Option value="30s"> 30秒 </Select.Option>
                    <Select.Option value="1min"> 1分钟 </Select.Option>
                    <Select.Option value="5min"> 5分钟 </Select.Option>
                    <Select.Option value="10min"> 10分钟 </Select.Option>
                    <Select.Option value="15min"> 15分钟 </Select.Option>
                    <Select.Option value="30min"> 30分钟 </Select.Option>
                    <Select.Option value="1hour"> 1小时 </Select.Option>
                  </Select>
                )}
              </Form.Item>
            </Col> : null}
            {config.type === 'interface' && setting.timer ? <Col span={8}>
              <Form.Item label={
                <Tooltip placement="topLeft" title="定时器执行次数。注:0表示没有限制。">
                  <QuestionCircleOutlined className="mk-form-tip" />
                  执行次数
                </Tooltip>
              }>
                {getFieldDecorator('timerRepeats', {
                  initialValue: setting.timerRepeats || 0
                })(<InputNumber min={0} max={500} precision={0} />)}
              </Form.Item>
            </Col> : null}
          </Row>
        </Form>
      </div>
src/menu/sysinterface/index.jsx
@@ -1,14 +1,14 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { Modal, Button, Popconfirm, message } from 'antd'
import { StopTwoTone, ApiOutlined, CopyOutlined, EditOutlined, CheckCircleTwoTone, DeleteOutlined } from '@ant-design/icons'
import { Modal, Button, Popconfirm, message, notification } from 'antd'
import { StopTwoTone, DatabaseOutlined, CopyOutlined, CheckCircleTwoTone, DeleteOutlined, PlusOutlined, SwapOutlined } from '@ant-design/icons'
import Utils from '@/utils/utils.js'
import asyncComponent from '@/utils/asyncComponent'
import './index.scss'
const SettingForm = asyncComponent(() => import('./settingform'))
const DataSource = asyncComponent(() => import('@/menu/datasource'))
const EditTable = asyncComponent(() => import('@/templates/zshare/editTable'))
class InterfaceController extends Component {
@@ -19,12 +19,10 @@
  state = {
    visible: false,
    setvisible: false,
    interfaces: [],
    card: null,
    columns: [
      {
        title: '接口名称',
        title: '名称',
        dataIndex: 'name',
        width: '50%'
      },
@@ -53,8 +51,9 @@
        dataIndex: 'operation',
        render: (text, record) =>
          (<div style={{textAlign: 'center'}}>
            <span onClick={() => this.handleEdit(record)} style={{color: '#1890ff', cursor: 'pointer', fontSize: '16px', marginRight: '15px'}}><EditOutlined /></span>
            <span onClick={() => {this.copy(record)}} style={{color: '#26C281', cursor: 'pointer', fontSize: '16px', marginRight: '15px'}}><CopyOutlined /></span>
            <DataSource config={record} updateConfig={this.update}/>
            <span onClick={() => this.handleStatus(record)} style={{color: '#8E44AD', cursor: 'pointer', fontSize: '16px', marginRight: '15px'}}><SwapOutlined /></span>
            <span onClick={() => this.copy(record)} style={{color: '#26C281', cursor: 'pointer', fontSize: '16px', marginRight: '15px'}}><CopyOutlined /></span>
            <Popconfirm
              overlayClassName="popover-confirm"
              title="确定删除?"
@@ -107,8 +106,46 @@
    })
  }
  handleEdit = (record) => {
    this.setState({card: record, setvisible: true})
  handleStatus = (record) => {
    const { config } = this.props
    if (record.status === 'false') {
      if (record.setting.interType === 'system' && record.setting.execute !== 'false' && !record.setting.dataresource) {
        notification.warning({
          top: 92,
          message: '未设置数据源,不可启用!',
          duration: 5
        })
        return
      } else if (!record.setting.primaryKey) {
        notification.warning({
          top: 92,
          message: '未设置主键,不可启用!',
          duration: 5
        })
        return
      } else if (record.columns.length === 0) {
        notification.warning({
          top: 92,
          message: '未添加字段集,不可启用!',
          duration: 5
        })
        return
      }
    }
    record = fromJS(record).toJS()
    record.status = record.status === 'false' ? 'true' : 'false'
    let interfaces = this.state.interfaces.map(item => {
      if (item.uuid !== record.uuid) {
        return item
      }
      return record
    })
    this.setState({ interfaces })
    this.props.updateConfig({...config, interfaces})
  }
  deleteScript = (record) => {
@@ -126,37 +163,25 @@
    this.props.updateConfig({...config, interfaces})
  }
  settingSave = () => {
  update = (record) => {
    const { config } = this.props
    const { card } = this.state
    let interfaces = fromJS(this.state.interfaces).toJS()
    this.settingRef.handleConfirm().then(res => {
      interfaces = interfaces.map(item => {
        if (item.uuid === card.uuid) {
          res.uuid = item.uuid
    if (record.setting.primaryKey && record.columns.length > 0) {
      record.status = 'true'
    } else if (record.columns.length === 0) {
      record.status = 'false'
    }
    record.name = record.setting.name
          if (res.procMode !== 'inner' && res.preScripts && res.preScripts.filter(item => item.status !== 'false').length === 0) {
            message.warning('未设置前置脚本,不可启用!')
            res.status = 'false'
          } else if (res.callbackType === 'script' && res.cbScripts && res.cbScripts.filter(item => item.status !== 'false').length === 0) {
            message.warning('未设置回调脚本,不可启用!')
            res.status = 'false'
          }
          return res
        }
    let interfaces = this.state.interfaces.map(item => {
      if (item.uuid !== record.uuid) {
        return item
      })
      this.setState({
        card: null,
        setvisible: false,
        interfaces
      })
      this.props.updateConfig({...config, interfaces})
      }
      return record
    })
    this.setState({ interfaces })
    this.props.updateConfig({...config, interfaces})
  }
  addInterface = () => {
@@ -165,11 +190,14 @@
    interfaces.push({
      uuid: Utils.getuuid(),
      name: 'interface ' + (interfaces.length + 1),
      procMode: 'script',
      callbackType: 'script',
      preScripts: [],
      cbScripts: []
      name: '数据源' + (interfaces.length + 1),
      status: 'false',
      format: 'array',
      type: 'interface',
      pageable: false,
      setting: { interType: 'system', name: '数据源' + (interfaces.length + 1), status: 'false' },
      columns: [],
      scripts: [],
    })
    this.setState({
@@ -179,13 +207,13 @@
  }
  render() {
    const { visible, setvisible, columns, interfaces, card } = this.state
    const { visible, columns, interfaces } = this.state
    return (
      <div className="mk-sys-interface" style={{display: 'inline-block'}}>
        <Button className="mk-border-green" onClick={this.trigger}><ApiOutlined /> 接口管理</Button>
        <Button className="mk-border-green" onClick={this.trigger}><DatabaseOutlined /> 公共数据源</Button>
        <Modal
          title="接口管理"
          title="公共数据源"
          wrapClassName="interface-controller-modal"
          visible={visible}
          width={800}
@@ -198,21 +226,9 @@
          ]}
          destroyOnClose
        > 
          <Button key="add-interface" className="mk-border-green" onClick={this.addInterface}> 添加 </Button>
          <PlusOutlined key="add-interface" onClick={this.addInterface}/>
          {/* <div style={{fontSize: '12px', position: 'relative', top: '20px'}}>注:接口执行完成后,会触发默认不加载的组件刷新数据。</div> */}
          <EditTable key="manage-interface" actions={['move', 'copy']} type="interface" data={interfaces} columns={columns} onChange={this.changeScripts}/>
        </Modal>
        <Modal
          title={card ? card.name : '接口'}
          wrapClassName="interface-edit-modal"
          visible={setvisible}
          width={900}
          maskClosable={false}
          onOk={this.settingSave}
          onCancel={() => { this.setState({ setvisible: false })}}
          destroyOnClose
        >
          <SettingForm config={card} wrappedComponentRef={(inst) => this.settingRef = inst}/>
          <EditTable key="manage-interface" actions={['copy']} type="interface" data={interfaces} columns={columns} onChange={this.changeScripts}/>
        </Modal>
      </div>
    )
src/menu/sysinterface/index.scss
@@ -1,20 +1,22 @@
.interface-controller-modal {
  >.ant-modal >.ant-modal-content >.ant-modal-body {
  .ant-modal-body {
    min-height: 400px;
    >.mk-border-green {
    >.anticon-plus {
      float: right;
      position: relative;
      z-index: 1;
      margin-bottom: 10px;
      margin: 0px 10px 10px;
      font-size: 20px;
      color: #26C281;
    }
    .model-datasource {
      position: relative;
      top: 0;
      color: #1890ff;
      display: inline-block;
      > .anticon-setting {
        font-size: 16px;
      }
    }
  }
}
.interface-edit-modal {
  .ant-modal {
    top: 70px;
  }
  .ant-modal-body {
    min-height: 300px;
    padding-top: 5px;
  }
}
src/menu/sysinterface/settingform/baseform/index.jsx
File was deleted
src/menu/sysinterface/settingform/baseform/index.scss
File was deleted
src/menu/sysinterface/settingform/index.jsx
File was deleted
src/menu/sysinterface/settingform/index.scss
File was deleted
src/menu/sysinterface/settingform/simplescript/index.jsx
File was deleted
src/menu/sysinterface/settingform/simplescript/index.scss
File was deleted
src/menu/sysinterface/settingform/utils.jsx
File was deleted
src/tabviews/custom/components/card/balcony/index.jsx
@@ -50,7 +50,7 @@
      BID = BData.$BID || ''
    }
    
    if (_config.wrap.datatype !== 'static') {
    if (_config.wrap.datatype === 'dynamic') {
      _sync = _config.setting.sync === 'true'
      if (_sync && data) {
@@ -113,7 +113,7 @@
      config: _config,
      arr_field: _config.columns.map(col => col.field).join(','),
    }, () => {
      if (_config.wrap.datatype !== 'static' && _config.setting && _config.setting.sync !== 'true') {
      if (_config.wrap.datatype === 'dynamic' && _config.setting && _config.setting.sync !== 'true') {
        setTimeout(() => {
          this.loadData()
        }, _config.setting.delay || 0)
@@ -130,7 +130,7 @@
    MKEmitter.addListener('queryModuleParam', this.queryModuleParam)
    MKEmitter.addListener('refreshByButtonResult', this.refreshByButtonResult)
    
    if (config.timer) {
    if (config.timer && config.wrap.datatype === 'dynamic') {
      this.timer = new TimerTask()
      this.timer.init(config.uuid, config.timer, config.timerRepeats, () => {this.loadData(true)})
    }
src/tabviews/custom/components/card/prop-card/index.jsx
@@ -51,7 +51,7 @@
      BID = BData.$BID || ''
    }
    
    if (_config.wrap.datatype !== 'static') {
    if (_config.wrap.datatype === 'dynamic') {
      _sync = _config.setting.sync === 'true'
      if (_sync && data) {
@@ -122,7 +122,7 @@
      config: _config,
      arr_field: _config.columns.map(col => col.field).join(','),
    }, () => {
      if (_config.wrap.datatype !== 'static' && _config.setting.sync !== 'true' && _config.setting.onload === 'true') {
      if (_config.wrap.datatype === 'dynamic' && _config.setting.sync !== 'true' && _config.setting.onload === 'true') {
        setTimeout(() => {
          this.loadData()
        }, _config.setting.delay || 0)
@@ -142,7 +142,7 @@
    MKEmitter.addListener('queryModuleParam', this.queryModuleParam)
    MKEmitter.addListener('refreshByButtonResult', this.refreshByButtonResult)
    if (config.timer) {
    if (config.timer && config.wrap.datatype === 'dynamic') {
      this.timer = new TimerTask()
      this.timer.init(config.uuid, config.timer, config.timerRepeats, () => {this.loadData(true)})
    }
src/tabviews/custom/components/carousel/prop-card/index.jsx
@@ -48,7 +48,7 @@
      BID = BData.$BID || ''
    }
    
    if (_config.setting && _config.wrap.datatype !== 'static') {
    if (_config.setting && _config.wrap.datatype === 'dynamic') {
      _sync = _config.setting.sync === 'true'
      if (_sync && data) {
@@ -97,7 +97,7 @@
      config: _config,
      arr_field: _config.columns.map(col => col.field).join(','),
    }, () => {
      if (_config.wrap.datatype !== 'static' && _config.setting && _config.setting.sync !== 'true' && _config.setting.onload === 'true') {
      if (_config.wrap.datatype === 'dynamic' && _config.setting && _config.setting.sync !== 'true' && _config.setting.onload === 'true') {
        setTimeout(() => {
          this.loadData()
        }, _config.setting.delay || 0)
@@ -113,7 +113,7 @@
    MKEmitter.addListener('queryModuleParam', this.queryModuleParam)
    MKEmitter.addListener('refreshByButtonResult', this.refreshByButtonResult)
    if (config.timer) {
    if (config.timer && config.wrap.datatype === 'dynamic') {
      this.timer = new TimerTask()
      this.timer.init(config.uuid, config.timer, config.timerRepeats, () => {
        this.loadData('timer')
src/templates/sharecomponent/actioncomponent/verifyexcelin/index.jsx
@@ -277,6 +277,17 @@
  }
  componentDidMount () {
    this.getsysScript()
  }
  getsysScript = () => {
    if (sessionStorage.getItem('mk_sys_scripts')) {
      this.setState({
        systemScripts: JSON.parse(sessionStorage.getItem('mk_sys_scripts'))
      })
      return
    }
    let _scriptSql = `Select distinct func+Remark as funcname,longparam, s.Sort from  s_custom_script s inner join (select OpenID from sapp where ID=@Appkey@) p on s.openid = case when s.appkey='' then s.openid else p.OpenID end order by s.Sort`
    _scriptSql = Utils.formatOptions(_scriptSql)
@@ -290,18 +301,21 @@
    
    _sParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
    _sParam.secretkey = Utils.encrypt(_sParam.LText, _sParam.timestamp)
    _sParam.open_key = Utils.encryptOpenKey(_sParam.secretkey, _sParam.timestamp) // 云端数据验证
    
    Api.getSystemConfig(_sParam).then(res => {
      if (res.status) {
        let _scripts = res.data.map(item => {
          return {
            name: item.funcname,
            value: window.decodeURIComponent(window.atob(item.longparam))
          }
        })
        sessionStorage.setItem('mk_sys_scripts', JSON.stringify(_scripts))
        this.setState({
          systemScripts: res.data.map(item => {
            return {
              name: item.funcname,
              value: window.decodeURIComponent(window.atob(item.longparam))
            }
          })
          systemScripts: _scripts
        })
      } else {
        notification.warning({
src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx
@@ -294,6 +294,17 @@
  }
  componentDidMount () {
    this.getsysScript()
  }
  getsysScript = () => {
    if (sessionStorage.getItem('mk_sys_scripts')) {
      this.setState({
        systemScripts: JSON.parse(sessionStorage.getItem('mk_sys_scripts'))
      })
      return
    }
    let _scriptSql = `Select distinct func+Remark as funcname,longparam, s.Sort from  s_custom_script s inner join (select OpenID from sapp where ID=@Appkey@) p on s.openid = case when s.appkey='' then s.openid else p.OpenID end order by s.Sort`
    _scriptSql = Utils.formatOptions(_scriptSql)
@@ -307,18 +318,21 @@
    
    _sParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
    _sParam.secretkey = Utils.encrypt(_sParam.LText, _sParam.timestamp)
    _sParam.open_key = Utils.encryptOpenKey(_sParam.secretkey, _sParam.timestamp) // 云端数据验证
    
    Api.getSystemConfig(_sParam).then(res => {
      if (res.status) {
        let _scripts = res.data.map(item => {
          return {
            name: item.funcname,
            value: window.decodeURIComponent(window.atob(item.longparam))
          }
        })
        sessionStorage.setItem('mk_sys_scripts', JSON.stringify(_scripts))
        this.setState({
          systemScripts: res.data.map(item => {
            return {
              name: item.funcname,
              value: window.decodeURIComponent(window.atob(item.longparam))
            }
          })
          systemScripts: _scripts
        })
      } else {
        notification.warning({
src/templates/sharecomponent/settingcomponent/settingform/datasource/index.jsx
@@ -27,8 +27,6 @@
  state = {
    interType: 'system',
    procMode: 'script',
    requestMode: 'system',
    sysInterface: 'false',
    controlField: '',
    tableType: '',
@@ -66,8 +64,6 @@
    this.setState({
      interType: setting.interType || 'system',
      procMode: setting.procMode || 'script',
      requestMode: setting.requestMode || 'system',
      controlField: setting.controlField || '',
      sysInterface: setting.sysInterface || 'false',
      tableType: setting.tableType,
@@ -172,14 +168,6 @@
      this.setState({
        interType: value
      })
    } else if (key === 'procMode') {
      this.setState({
        procMode: value
      })
    } else if (key === 'requestMode') {
      this.setState({
        requestMode: value
      })
    } else if (key === 'sysInterface') {
      this.setState({
        sysInterface: value
@@ -204,7 +192,7 @@
  render() {
    const { setting, dict, menu, config, columns } = this.props
    const { getFieldDecorator } = this.props.form
    const { interType, funcRules, funcTooltip, procMode, requestMode, tableType, controlField, sysInterface } = this.state
    const { interType, funcRules, funcTooltip, tableType, controlField, sysInterface } = this.state
    const formItemLayout = {
      labelCol: {
@@ -252,7 +240,6 @@
                <Radio value="system">系统</Radio>
                <Radio value="inner">内部</Radio>
                <Radio value="outer">外部</Radio>
                <Radio value="custom">自定义</Radio>
              </Radio.Group>)}
            </Form.Item>
          </Col>
@@ -286,47 +273,7 @@
              </Radio.Group>)}
            </Form.Item>
          </Col> : null}
          {interType === 'custom' ? <Col span={8}>
            <Form.Item label="参数处理">
              {getFieldDecorator('procMode', {
                initialValue: procMode,
                rules: [
                  {
                    required: true,
                    message: dict['form.required.select'] + '参数处理方式!'
                  },
                ]
              })(
              <Radio.Group onChange={(e) => {this.onRadioChange(e, 'procMode')}}>
                <Radio value="script">前置脚本</Radio>
                <Radio value="inner">前置函数</Radio>
              </Radio.Group>)}
            </Form.Item>
          </Col> : null}
          {interType === 'custom' && procMode === 'inner' ? <Col span={8}>
            <Form.Item label={
              <Tooltip placement="topLeft" title={funcTooltip}>
                <QuestionCircleOutlined className="mk-form-tip" />
                前置函数
              </Tooltip>
            }>
              {getFieldDecorator('prevFunc', {
                initialValue: setting.prevFunc || '',
                rules: [
                  {
                    required: true,
                    message: dict['form.required.input'] + '前置函数!'
                  },
                  {
                    max: formRule.func.max,
                    message: formRule.func.maxMessage
                  },
                  ...funcRules
                ]
              })(<Input placeholder={''} autoComplete="off" />)}
            </Form.Item>
          </Col> : null}
          {interType === 'outer' || interType === 'custom' ? <Col className="mk-through-line3" span={24}>
          {interType === 'outer' ? <Col className="mk-through-line3" span={24}>
            <Form.Item label="接口地址">
              {getFieldDecorator('interface', {
                initialValue: setting.interface || (interType === 'outer' && sysInterface === 'true' ? window.GLOB.mainSystemApi : ''),
@@ -339,7 +286,7 @@
              })(<TextArea rows={2} readOnly={interType === 'outer' && sysInterface === 'true'}/>)}
            </Form.Item>
          </Col> : null}
          {(interType === 'outer' && sysInterface !== 'true') || interType === 'custom' ? <Col className="mk-through-line3" span={24}>
          {interType === 'outer' && sysInterface !== 'true' ? <Col className="mk-through-line3" span={24}>
            <Form.Item label={
              <Tooltip placement="topLeft" title="正式系统所使用的的接口地址。">
                <QuestionCircleOutlined className="mk-form-tip" />
@@ -351,41 +298,7 @@
              })(<TextArea rows={2} />)}
            </Form.Item>
          </Col> : null}
          {interType === 'custom' ? <Col span={8}>
            <Form.Item label="请求方式">
              {getFieldDecorator('method', {
                initialValue: setting.method || 'post',
                rules: [
                  {
                    required: true,
                    message: dict['form.required.select'] + '请求方式!'
                  },
                ]
              })(
              <Radio.Group>
                <Radio value="get">GET</Radio>
                <Radio value="post">POST</Radio>
              </Radio.Group>)}
            </Form.Item>
          </Col> : null}
          {interType === 'custom' ? <Col span={8}>
            <Form.Item label="数据请求">
              {getFieldDecorator('requestMode', {
                initialValue: requestMode,
                rules: [
                  {
                    required: true,
                    message: dict['form.required.select'] + '数据请求方式!'
                  },
                ]
              })(
              <Radio.Group onChange={(e) => {this.onRadioChange(e, 'requestMode')}}>
                <Radio value="system">系统函数</Radio>
                <Radio value="inner">内部函数</Radio>
              </Radio.Group>)}
            </Form.Item>
          </Col> : null}
          {interType === 'inner' || (interType === 'custom' && requestMode === 'inner') ? <Col span={8}>
          {interType === 'inner' ? <Col span={8}>
            <Form.Item label={
              <Tooltip placement="topLeft" title={funcTooltip}>
                <QuestionCircleOutlined className="mk-form-tip" />
@@ -424,7 +337,7 @@
              })(<Input placeholder={''} autoComplete="off" />)}
            </Form.Item>
          </Col> : null}
          {interType === 'system' || (interType === 'custom' && requestMode === 'system') ? <Col span={24} className="mk-through-line3">
          {interType === 'system' ? <Col span={24} className="mk-through-line3">
            <Form.Item help={'数据ID:' + menu.MenuID} labelCol={{xs: { span: 24 }, sm: { span: 4 }}} wrapperCol={ {xs: { span: 24 }, sm: { span: 20 }} } label={
              <Tooltip placement="topLeft" title={`使用系统函数时,需填写数据源。注:数据权限替换符 $@ -> /* 或 ''、 @$ -> */ 或 '';查询替换符 $select@ -> /* 或 ''、 @select$ -> */ 或 '';统计替换符 $sum@ -> /* 或 ''、 @sum$ -> */ 或 ''。`}>
                <QuestionCircleOutlined className="mk-form-tip" />
@@ -436,7 +349,7 @@
              })(<CodeMirror />)}
            </Form.Item>
          </Col> : null}
          {interType === 'system' || (interType === 'custom' && requestMode === 'system') ? <Col span={8}>
          {interType === 'system' ? <Col span={8}>
            <Form.Item label={
              <Tooltip placement="topLeft" title={'查询时,搜索条件以where条件拼接进入sql,统计时,将数据源中以“@+搜索字段+@”的内容,以搜索条件中的值进行替换后,提交查询,注:查询类型仅在使用系统函数时有效。'}>
                <QuestionCircleOutlined className="mk-form-tip" />
@@ -452,7 +365,7 @@
              </Radio.Group>)}
            </Form.Item>
          </Col> : null}
          {interType === 'system' || (interType === 'custom' && requestMode === 'system') ? <Col span={8}>
          {interType === 'system' ? <Col span={8}>
            <Form.Item label="默认sql">
              {getFieldDecorator('default', {
                initialValue: setting.default || 'true'
@@ -496,77 +409,6 @@
              })(<Input placeholder={'ID asc, UID desc'} autoComplete="off" />)}
            </Form.Item>
          </Col>
          {interType === 'custom' ? <Col span={8}>
            <Form.Item label="回调方式">
              {getFieldDecorator('callbackType', {
                initialValue: setting.callbackType || 'script'
              })(
              <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={8}>
            <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={8}>
            <Form.Item label={
              <Tooltip placement="topLeft" title={'同步执行:外部接口调用成功后再请求数据;异步执行:外部接口调用与请求数据同时进行。'}>
                <QuestionCircleOutlined className="mk-form-tip" />
                执行方式
              </Tooltip>
            }>
              {getFieldDecorator('execType', {
                initialValue: setting.execType || 'sync'
              })(
              <Radio.Group>
                <Radio value="sync">同步</Radio>
                <Radio value="async">异步</Radio>
              </Radio.Group>)}
            </Form.Item>
          </Col> : null}
          {interType === 'custom' ? <Col span={8}>
            <Form.Item label={
              <Tooltip placement="topLeft" title={'如果自定义接口不支持跨域请求,会通过当前系统转发。'}>
                <QuestionCircleOutlined className="mk-form-tip" />
                跨域请求
              </Tooltip>
            }>
              {getFieldDecorator('cross', {
                initialValue: setting.cross || 'true'
              })(
              <Radio.Group>
                <Radio value="true">支持</Radio>
                <Radio value="false">不支持</Radio>
              </Radio.Group>)}
            </Form.Item>
          </Col> : null}
          {interType === 'custom' ? <Col span={8}>
            <Form.Item label="执行次数">
              {getFieldDecorator('execTime', {
                initialValue: setting.execTime || 'once'
              })(
              <Radio.Group>
                <Radio value="always">始终</Radio>
                <Radio value="once">一次</Radio>
              </Radio.Group>)}
            </Form.Item>
          </Col> : null}
          <Col span={8}>
            <Form.Item label="是否分页">
              {getFieldDecorator('laypage', {
@@ -688,22 +530,6 @@
              </Radio.Group>)}
            </Form.Item>
          </Col>
          {/* <Col span={8}>
            <Form.Item label={
              <Tooltip placement="topLeft" title="在搜索条件存在时,是否显示搜索和重置按钮。">
                <QuestionCircleOutlined className="mk-form-tip" />
                搜索按钮
              </Tooltip>
            }>
              {getFieldDecorator('show', {
                initialValue: setting.show || 'true'
              })(
              <Radio.Group>
                <Radio value="true">显示</Radio>
                <Radio value="false">隐藏</Radio>
              </Radio.Group>)}
            </Form.Item>
          </Col> */}
          {tableType !== '' ? <Col span={8}>
            <Form.Item label={
              <Tooltip placement="topLeft" title="当按钮执行完成并返回主键值时,默认选中主键值对应行。注:在启用无人值守功能时无效。">
@@ -733,18 +559,6 @@
              })(<InputNumber min={1} max={500} precision={0} />)}
            </Form.Item>
          </Col>
          {/* <Col span={8}>
            <Form.Item label={
              <Tooltip placement="topLeft" title="高级搜索弹窗的宽度,注:当宽度值小于100时表示占窗口的百分比,大于100时表示宽度的绝对值。">
                <QuestionCircleOutlined className="mk-form-tip" />
                高级搜索
              </Tooltip>
            }>
              {getFieldDecorator('advanceWidth', {
                initialValue: setting.advanceWidth || 1000
              })(<InputNumber min={10} max={3000} precision={0}/>)}
            </Form.Item>
          </Col> */}
          <Col span={8}>
            <Form.Item label={
              <Tooltip placement="topLeft" title="双击表格中行,触发的按钮。">
src/templates/sharecomponent/settingcomponent/settingform/index.jsx
@@ -17,7 +17,6 @@
const { Paragraph } = Typography
const CodeMirror = asyncComponent(() => import('@/templates/zshare/codemirror'))
const CustomScript = asyncComponent(() => import('@/templates/zshare/customscript'))
const SimpleScript = asyncComponent(() => import('./simplescript'))
class SettingForm extends Component {
  static propTpyes = {
@@ -48,8 +47,6 @@
    let _setting = fromJS(config.setting).toJS()
    let _scripts = _setting.scripts || []
    let _preScripts = _setting.preScripts || []
    let _cbScripts = _setting.cbScripts || []
    _setting.default = _setting.default || 'true'            // 默认sql
    _setting.sysInterface = _setting.sysInterface || 'false' // 是否为系统接口
@@ -90,9 +87,6 @@
    _search = _search ? 'where ' + _search : ''
    let status = fromJS(_setting).toJS()
    status.requestMode = status.requestMode || 'system'
    status.procMode = status.procMode || 'script'
    status.callbackType = status.callbackType || 'script'
    let regoptions = this.getRegOptions(search)
    if (config.urlFields && config.urlFields.length > 0) {
@@ -111,12 +105,6 @@
        _scripts.forEach(item => {
          item.sql = item.sql.replace(reg, `$ex@${m.func_code}@ex$`)
        })
        _preScripts.forEach(item => {
          item.sql = item.sql.replace(reg, `$ex@${m.func_code}@ex$`)
        })
        _cbScripts.forEach(item => {
          item.sql = item.sql.replace(reg, `$ex@${m.func_code}@ex$`)
        })
        if (_setting.dataresource) {
          _setting.dataresource = _setting.dataresource.replace(reg, `$ex@${m.func_code}@ex$`)
        }
@@ -130,8 +118,6 @@
      regoptions: regoptions, // 搜索条件,正则替换
      columns: columns,
      scripts: _scripts,
      preScripts: _preScripts,
      cbScripts: _cbScripts,
      status
    })
  }
@@ -241,18 +227,9 @@
  }
  handleConfirm = (trigger) => {
    const { activeKey, setting, scripts, preScripts, cbScripts } = this.state
    const { activeKey, setting, scripts } = this.state
    let _loading = false
    if (this.scriptsForm && this.scriptsForm.props.form.getFieldValue('sql') && !/^\s+$/.test(this.scriptsForm.props.form.getFieldValue('sql'))) {
      _loading = true
    } else if (this.preScriptsForm && this.preScriptsForm.props.form.getFieldValue('sql') && !/^\s+$/.test(this.preScriptsForm.props.form.getFieldValue('sql'))) {
      _loading = true
    } else if (this.cbScriptsForm && this.cbScriptsForm.props.form.getFieldValue('sql') && !/^\s+$/.test(this.cbScriptsForm.props.form.getFieldValue('sql'))) {
      _loading = true
    }
    if (_loading) {
      notification.warning({
        top: 92,
        message: '存在未保存脚本,请点击确定保存,或点击取消放弃修改!',
@@ -274,7 +251,7 @@
          }, () => {
            this.sqlverify(() => {
              this.setState({loading: false})
              resolve({...res, scripts, preScripts, cbScripts})
              resolve({...res, scripts})
            }, () => {
              this.setState({loading: false})
              reject()
@@ -289,7 +266,7 @@
      return new Promise((resolve, reject) => {
        this.sqlverify(() => {
          this.setState({loading: false})
          resolve({...setting, scripts, preScripts, cbScripts})
          resolve({...setting, scripts})
        }, () => {
          this.setState({loading: false})
          reject()
@@ -298,7 +275,7 @@
    } else {
      this.setState({loading: false})
      return new Promise((resolve) => {
        resolve({...setting, scripts, preScripts, cbScripts})
        resolve({...setting, scripts})
      })
    }
  }
@@ -306,7 +283,7 @@
  sqlverify = (_resolve, _reject, type, uscripts) => {
    const { setting, scripts, arr_field, regoptions, search } = this.state
    if (setting.interType !== 'system' && setting.requestMode !== 'system') { // 不使用系统接口时,不需要sql验证
    if (setting.interType !== 'system') { // 不使用系统接口时,不需要sql验证
      _resolve()
      return
    }
@@ -382,18 +359,9 @@
  // 标签切换
  changeTab = (val) => {
    const { activeKey, search, arr_field, setting } = this.state
    const { activeKey, search, arr_field } = this.state
    let _loading = false
    if (this.scriptsForm && this.scriptsForm.props.form.getFieldValue('sql') && !/^\s+$/.test(this.scriptsForm.props.form.getFieldValue('sql'))) {
      _loading = true
    } else if (this.preScriptsForm && this.preScriptsForm.props.form.getFieldValue('sql') && !/^\s+$/.test(this.preScriptsForm.props.form.getFieldValue('sql'))) {
      _loading = true
    } else if (this.cbScriptsForm && this.cbScriptsForm.props.form.getFieldValue('sql') && !/^\s+$/.test(this.cbScriptsForm.props.form.getFieldValue('sql'))) {
      _loading = true
    }
    if (_loading) {
      notification.warning({
        top: 92,
        message: '存在未保存脚本,请点击确定保存,或点击取消放弃修改!',
@@ -402,43 +370,9 @@
      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' && 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
        }
        if (res.dataresource) {
          let _dataresource = res.dataresource
@@ -534,16 +468,6 @@
  scriptsUpdate = (scripts) => {
    this.setState({scripts})
  }
  // 前置脚本更新
  preScriptsUpdate = (preScripts) => {
    this.setState({preScripts})
  }
  // 后置脚本更新
  cbScriptsUpdate = (cbScripts) => {
    this.setState({cbScripts})
  }
  handleDelete = (item) => {
    const { script, scripts } = this.state
@@ -573,7 +497,7 @@
  render() {
    const { config, menu, dict } = this.props
    const { loading, activeKey, setting, defaultSql, columns, scripts, preScripts, cbScripts, status, regoptions, visible, script, scriptValue } = this.state
    const { loading, activeKey, setting, defaultSql, columns, scripts, status, visible, script, scriptValue } = this.state
    return (
      <div className="model-table-setting-form-box">
@@ -596,7 +520,7 @@
              自定义脚本
              {scripts.length ? <span className="count-tip">{scripts.length}</span> : null}
            </span>
          } disabled={!(status.interType === 'system' || (status.interType === 'custom' && status.requestMode === 'system'))} key="scripts" id="mk-setting-scripts">
          } disabled={status.interType !== 'system'} key="scripts" id="mk-setting-scripts">
            {scripts.length ? <BorderOutlined className="full-scripts" onClick={() => {
              if (this.scriptsForm && (this.scriptsForm.state.editItem || (this.scriptsForm.props.form.getFieldValue('sql') && !/^\s+$/.test(this.scriptsForm.props.form.getFieldValue('sql'))))) {
                notification.warning({
@@ -618,37 +542,6 @@
              scriptsChange={this.scriptsChange}
              scriptsUpdate={this.scriptsUpdate}
              wrappedComponentRef={(inst) => this.scriptsForm = inst}
            />
          </TabPane>
          <TabPane tab={
            <span>
              前置脚本
              {preScripts.length ? <span className="count-tip">{preScripts.length}</span> : null}
            </span>
          } disabled={status.interType !== 'custom' || status.procMode !== 'script'} key="prescripts">
            <SimpleScript
              dict={dict}
              setting={setting}
              scripts={preScripts}
              regoptions={regoptions}
              urlFields={config.urlFields}
              searches={this.props.search}
              scriptsUpdate={this.preScriptsUpdate}
              wrappedComponentRef={(inst) => this.preScriptsForm = inst}
            />
          </TabPane>
          <TabPane tab={
            <span>
              回调脚本
              {cbScripts.length ? <span className="count-tip">{cbScripts.length}</span> : null}
            </span>
          } disabled={status.interType !== 'custom' || status.callbackType !== 'script'} key="cbscripts">
            <SimpleScript
              dict={dict}
              setting={setting}
              scripts={cbScripts}
              scriptsUpdate={this.cbScriptsUpdate}
              wrappedComponentRef={(inst) => this.cbScriptsForm = inst}
            />
          </TabPane>
        </Tabs>
src/templates/sharecomponent/settingcomponent/settingform/index.scss
@@ -27,6 +27,13 @@
      }
    }
  }
  .mk-color-move {
    height: 40px;
    .color-sketch-block {
      position: relative;
      top: 7px;
    }
  }
  .operation-btn {
    display: inline-block;
    font-size: 16px;
src/templates/sharecomponent/settingcomponent/settingform/simplescript/index.jsx
@@ -152,6 +152,13 @@
  }
  getsysScript = () => {
    if (sessionStorage.getItem('mk_sys_scripts')) {
      this.setState({
        systemScripts: JSON.parse(sessionStorage.getItem('mk_sys_scripts'))
      })
      return
    }
    let _scriptSql = `Select distinct func+Remark as funcname,longparam, s.Sort from  s_custom_script s inner join (select OpenID from sapp where ID=@Appkey@) p on s.openid = case when s.appkey='' then s.openid else p.OpenID end order by s.Sort`
    _scriptSql = Utils.formatOptions(_scriptSql)
@@ -170,13 +177,14 @@
    Api.getSystemConfig(_sParam).then(res => {
      if (res.status) {
        let _scripts = res.data.map(item => {
          let _item = {
          return {
            name: item.funcname,
            value: window.decodeURIComponent(window.atob(item.longparam))
          }
          return _item
        })
        sessionStorage.setItem('mk_sys_scripts', JSON.stringify(_scripts))
        this.setState({
          systemScripts: _scripts
        })
src/templates/zshare/customscript/index.jsx
@@ -122,6 +122,12 @@
  }
  getsysScript = () => {
    if (sessionStorage.getItem('mk_sys_scripts')) {
      this.setState({
        systemScripts: JSON.parse(sessionStorage.getItem('mk_sys_scripts'))
      })
      return
    }
    let _scriptSql = `Select distinct func+Remark as funcname,longparam, s.Sort from  s_custom_script s inner join (select OpenID from sapp where ID=@Appkey@) p on s.openid = case when s.appkey='' then s.openid else p.OpenID end order by s.Sort`
    _scriptSql = Utils.formatOptions(_scriptSql)
@@ -147,6 +153,8 @@
          return _item
        })
        sessionStorage.setItem('mk_sys_scripts', JSON.stringify(_scripts))
        this.setState({
          systemScripts: _scripts
        })
src/utils/utils-custom.js
@@ -590,7 +590,7 @@
      }
  
      if (item.btnlog) {
        item.btnlog = []
        item.btnlog = null
      }
  
      let oriUids = {}
@@ -870,7 +870,7 @@
    }
    if (item.btnlog) {
      item.btnlog = []
      item.btnlog = null
    }
    let oriUids = {}
src/views/mobdesign/index.jsx
@@ -664,7 +664,7 @@
            backElements: []
          }
        ],
        headerStyle: {}, parentId: '', width: 24, scripts: [], btnlog: [], pageable: false,
        headerStyle: {}, parentId: '', width: 24, scripts: [], pageable: false,
        wrap: {name: 'logo', width: 24, datatype: 'static', cardType: '', blacklist: []},
        name: 'logo', floor: 1, switchable: true,
        setting:{interType: 'system'}, tabId: '', style:{paddingTop: '8vh', paddingBottom: '10vh'}, dataName: Utils.getuuid(), format: 'object', subtype: 'propcard', type: 'card', uuid: Utils.getuuid(), columns: []
@@ -696,7 +696,7 @@
            backElements: []
          }
        ],
        headerStyle: {}, parentId: '', width: 24, scripts: [], btnlog: [], pageable: false,
        headerStyle: {}, parentId: '', width: 24, scripts: [], pageable: false,
        wrap: {name: 'Power', width: 24, datatype: 'static', cardType: '', blacklist: []},
        name: 'Power', floor: 1, switchable: true,
        setting:{interType: 'system'}, tabId: '', style:{}, dataName: Utils.getuuid(), format: 'object', subtype: 'propcard', type: 'card', uuid: Utils.getuuid(), columns: []
src/views/systemfunc/header/index.jsx
@@ -32,13 +32,13 @@
      <header className="sys-header-container ant-menu-dark">
        <div className="header-logo"><img src={MainLogo} alt=""/></div>
        <div className="title">HS</div>
        <div className="close" onClick={() => window.close()}>关闭</div>
        <div className="header-setting">
          <img src={this.state.avatar} alt=""/>
          <span>
            <span className="username">{this.state.userName}</span>
          </span>
        </div>
        <div className="close" onClick={() => window.close()}>关闭</div>
      </header>
    )
  }
src/views/systemfunc/header/index.scss
@@ -31,11 +31,11 @@
  }
  .close {
    position: absolute;
    float: right;
    font-size: 16px;
    color: #ffffff;
    right: 90px;
    top: 12px;
    margin-top: 13px;
    margin-right: 15px;
    cursor: pointer;
  }