king
2022-10-08 809987a63ced6f35a7d37623af33bdba31ca6c93
2022-10-08
11个文件已修改
130 ■■■■■ 已修改文件
src/index.js 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/prop-card/index.jsx 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/datasource/verifycard/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/commontable/index.jsx 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/index.jsx 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/settingcalcomponent/verifycard/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/settingcomponent/settingform/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/treesettingcomponent/settingform/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/verifycard/customscript/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/utils.js 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/main/index.jsx 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/index.js
@@ -282,16 +282,6 @@
      writable: false,
      value: GLOB
    })
    Object.defineProperty(window, 'debug', {
      set(value) {
        if (value + '' === 'false') {
          sessionStorage.removeItem('breakpoint')
        } else {
          sessionStorage.setItem('breakpoint', value)
        }
        console.info('请刷新页面。')
      }
    })
    window.GLOB.CacheMap = new Map()     // 缓存配置信息
    window.GLOB.UserCacheMap = new Map() // 缓存用户自定义设置
src/menu/components/card/prop-card/index.jsx
@@ -488,7 +488,10 @@
      } else {
        _card.setting.supModule = ''
      }
    } else if (res.datatype === 'public') {
      // let interfaces = window.GLOB.customMenu.interfaces || []
    }
    if (res.layout === 'flex') {
      _card.wrap.pagestyle = 'page'
    }
src/menu/datasource/verifycard/index.jsx
@@ -1,7 +1,7 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { fromJS } from 'immutable'
import { Tabs, Popconfirm, notification, Modal, Typography, Spin, message, Button } from 'antd'
import { Form, Tabs, Popconfirm, notification, Modal, Typography, Spin, message, Button } from 'antd'
import { StopOutlined, CheckCircleOutlined, EditOutlined, SwapOutlined, DeleteOutlined, CopyOutlined, BorderOutlined } from '@ant-design/icons'
import moment from 'moment'
@@ -851,4 +851,4 @@
  }
}
export default VerifyCard
export default Form.create()(VerifyCard)
src/tabviews/commontable/index.jsx
@@ -69,7 +69,8 @@
    absFields: [],        // 绝对值字段
    loadCustomApi: true,  // 加载外部资源
    hasReqFields: false,
    autoMatic: null
    autoMatic: null,
    visible: false
  }
  /**
@@ -432,7 +433,7 @@
        chartId,
        config,
        statFields,
        shortcuts,
        shortcuts: shortcuts.length > 0 ? shortcuts : null,
        setting: config.setting,
        searchlist: config.search,
        actions: _actions,
@@ -463,11 +464,6 @@
  setShortcut = () => {
    const { shortcuts } = this.state
    if (!shortcuts || shortcuts.length === 0) {
      document.onkeydown = () => {}
      return
    }
    document.onkeydown = (event) => {
      let e = event || window.event
      let keyCode = e.keyCode || e.which || e.charCode
@@ -484,6 +480,16 @@
      if (!preKey || !keyCode) return
      let _shortcut = `${preKey}+${keyCode}`
      if (window.GLOB.breakpoint && _shortcut === 'ctrl+67') {
        window.debugger = false
        window.GLOB.breakpoint = false
        sessionStorage.removeItem('breakpoint')
        MKEmitter.emit('debugChange')
      }
      if (!shortcuts) return
      shortcuts.some(item => {
        if (item.$shortcut === _shortcut) {
@@ -1090,6 +1096,10 @@
    }
  }
  debugChange = () => {
    this.setState({visible: !this.state.visible})
  }
  UNSAFE_componentWillMount () {
    // 组件加载时,获取菜单数据
    this.loadconfig()
@@ -1101,6 +1111,7 @@
  componentDidMount () {
    MKEmitter.addListener('reloadData', this.reloadData)
    MKEmitter.addListener('debugChange', this.debugChange)
    MKEmitter.addListener('reloadMenuView', this.reloadMenuView)
    MKEmitter.addListener('changeTableLine', this.changeTableLine)
    MKEmitter.addListener('resetActiveMenu', this.resetActiveMenu)
@@ -1117,6 +1128,7 @@
    }
    document.onkeydown = () => {}
    MKEmitter.removeListener('reloadData', this.reloadData)
    MKEmitter.removeListener('debugChange', this.debugChange)
    MKEmitter.removeListener('reloadMenuView', this.reloadMenuView)
    MKEmitter.removeListener('changeTableLine', this.changeTableLine)
    MKEmitter.removeListener('resetActiveMenu', this.resetActiveMenu)
@@ -1276,7 +1288,7 @@
        {setting && window.GLOB.breakpoint ? <DebugTable /> : null}
        {!window.GLOB.mkHS && autoMatic ? <AutoMatic autoMatic={autoMatic} config={config} /> : null}
        {!window.GLOB.mkHS && window.GLOB.systemType !== 'production' ? <PagemsgComponent menu={{MenuName: this.props.MenuName, MenuNo: this.props.MenuNo}} config={config} dict={this.state.dict} /> : null}
        {!window.GLOB.mkHS && shortcuts ? <SettingComponent config={config} dict={this.state.dict} shortcuts={shortcuts}/> : null}
        {!window.GLOB.mkHS && setting ? <SettingComponent config={config} dict={this.state.dict} shortcuts={shortcuts || []}/> : null}
        {viewlost ? <NotFount msg={this.state.lostmsg} /> : null}
      </div>
    )
src/tabviews/custom/index.jsx
@@ -65,7 +65,6 @@
    data: null,           // 列表数据集
    loading: false,       // 列表数据加载中
    visible: false,       // 标签页控制
    treevisible: false,   // 菜单结构树弹框显示隐藏控制
    shortcuts: null       // 快捷键
  }
@@ -210,7 +209,7 @@
      this.setState({
        BID: BID,
        shortcuts,
        shortcuts: shortcuts.length > 0 ? shortcuts : null,
        config,
        mainSearch
      }, () => {
@@ -246,11 +245,6 @@
  setShortcut = () => {
    const { shortcuts } = this.state
    if (!shortcuts || shortcuts.length === 0) {
      document.onkeydown = () => {}
      return
    }
    document.onkeydown = (event) => {
      let e = event || window.event
      let keyCode = e.keyCode || e.which || e.charCode
@@ -265,8 +259,18 @@
      }
      if (!preKey || !keyCode) return
      let _shortcut = `${preKey}+${keyCode}`
      if (window.GLOB.breakpoint && _shortcut === 'ctrl+67') {
        window.debugger = false
        window.GLOB.breakpoint = false
        sessionStorage.removeItem('breakpoint')
        MKEmitter.emit('debugChange')
      }
      if (!shortcuts) return
      shortcuts.some(item => {
        if (item.$shortcut === _shortcut) {
@@ -1151,6 +1155,7 @@
  }
  componentDidMount () {
    MKEmitter.addListener('debugChange', this.debugChange)
    MKEmitter.addListener('reloadMenuView', this.reloadMenuView)
    MKEmitter.addListener('resetActiveMenu', this.resetActiveMenu)
  }
@@ -1162,11 +1167,16 @@
    this.setState = () => {
      return
    }
    MKEmitter.removeListener('debugChange', this.debugChange)
    MKEmitter.removeListener('reloadMenuView', this.reloadMenuView)
    MKEmitter.removeListener('resetActiveMenu', this.resetActiveMenu)
    window.GLOB.CacheData.delete(this.props.MenuID)
    this.deleteCache(this.state.config.components)
  }
  debugChange = () => {
    this.setState({visible: !this.state.visible})
  }
  deleteCache = (components) => {
@@ -1368,7 +1378,7 @@
        <Row className="component-wrap">{this.getComponents()}</Row>
        {config && window.GLOB.breakpoint ? <DebugTable /> : null}
        {!window.GLOB.mkHS && window.GLOB.systemType !== 'production' ? <PagemsgComponent menu={{MenuName: this.props.MenuName, MenuNo: this.props.MenuNo}} config={config} dict={this.state.dict} /> : null}
        {!window.GLOB.mkHS && shortcuts ? <SettingComponent config={config} dict={this.state.dict} shortcuts={shortcuts}/> : null}
        {!window.GLOB.mkHS && config ? <SettingComponent config={config} dict={this.state.dict} shortcuts={shortcuts || []}/> : null}
        {viewlost ? <NotFount msg={this.state.lostmsg} /> : null}
      </div>
    )
src/templates/sharecomponent/settingcalcomponent/verifycard/index.jsx
@@ -1,7 +1,7 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { fromJS } from 'immutable'
import { Tabs, Table, Popconfirm, notification, Modal, Spin } from 'antd'
import { Form, Tabs, Table, Popconfirm, notification, Modal, Spin } from 'antd'
import { EditOutlined, DeleteOutlined } from '@ant-design/icons'
import moment from 'moment'
@@ -442,4 +442,4 @@
  }
}
export default VerifyCard
export default Form.create()(VerifyCard)
src/templates/sharecomponent/settingcomponent/settingform/index.jsx
@@ -1,7 +1,7 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { fromJS } from 'immutable'
import { notification, Modal, Spin, Tabs, Typography, Popconfirm, Button } from 'antd'
import { Form, notification, Modal, Spin, Tabs, Typography, Popconfirm, Button } from 'antd'
import { CheckCircleOutlined, StopOutlined, SwapOutlined, DeleteOutlined, BorderOutlined } from '@ant-design/icons'
import moment from 'moment'
@@ -607,4 +607,4 @@
  }
}
export default SettingForm
export default Form.create()(SettingForm)
src/templates/sharecomponent/treesettingcomponent/settingform/index.jsx
@@ -1,7 +1,7 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { fromJS } from 'immutable'
import { notification, Modal, Spin, Tabs } from 'antd'
import { Form, notification, Modal, Spin, Tabs } from 'antd'
import moment from 'moment'
import Api from '@/api'
@@ -284,4 +284,4 @@
  }
}
export default SettingForm
export default Form.create()(SettingForm)
src/templates/zshare/verifycard/customscript/index.jsx
@@ -325,7 +325,7 @@
          </Col>
          <Col span={24} className="sql">
            <Form.Item label={
              <Tooltip placement="topLeft" title={'数据检查替换符 $check@ -> \'\'、 @check$ -> \'\',ErrorCode等于C时 $check@ -> /*、 @check$ -> */。注:1、需使用系统接口 2、行设置为“选择多行”时无效。调试替换符 /*$breakpoint_begin_xxxx@ 、@breakpoint_end_xxxx$*/'}>
              <Tooltip placement="topLeft" overlayStyle={{width: '320px', maxWidth: '320px'}} title={<><div>{'调试替换符 /*$breakpoint_begin_xxxx@ 、@breakpoint_end_xxxx$*/,在控制台中输入 window.debug = \'xxxx\' 会启用对应的调试语句,快捷键 ctrl+c 或在控制台中输入 window.debug = false 关闭调试。'}</div><div style={{height: '5px'}}></div><div>{'数据检查替换符 $check@ -> \'\'、 @check$ -> \'\',ErrorCode等于C时 $check@ -> /*、 @check$ -> */。注:1、需使用系统接口 2、行设置为“选择多行”时无效。'}</div></>}>
                <QuestionCircleOutlined className="mk-form-tip" />
                sql
              </Tooltip>
src/utils/utils.js
@@ -2069,6 +2069,20 @@
    _sql += _backCustomScript
  }
  if (window.GLOB.breakpoint) {
    let start = new RegExp('\\/\\*\\$breakpoint_begin_' + window.GLOB.breakpoint + '@', 'ig')
    let end = new RegExp('@breakpoint_end_' + window.GLOB.breakpoint + '\\$\\*\\/', 'ig')
    if (window.GLOB.breakpoint === 'all') {
      start = /\/\*\$breakpoint_begin_[0-9a-z_]+@/ig
      end = /@breakpoint_end_[0-9a-z_]+\$\*\//ig
    }
    _sql = _sql.replace(start, '').replace(end, '')
    _sql += `
      z_debug_end: select @ErrorCode='E',@retmsg='debug_end' goto aaa`
  }
  if (retmsg) {
    _sql += `
      aaa: if @ErrorCode!=''
@@ -2087,20 +2101,6 @@
  _sql = _sql.replace(/@SessionUid@/ig, `'${localStorage.getItem('SessionUid') || ''}'`)
  _sql = _sql.replace(/@UserID@/ig, `'${sessionStorage.getItem('UserID') || ''}'`)
  _sql = _sql.replace(/@Appkey@/ig, `'${window.GLOB.appkey || ''}'`)
  if (window.GLOB.breakpoint) {
    let start = new RegExp('\\/\\*\\$breakpoint_begin_' + window.GLOB.breakpoint + '@', 'ig')
    let end = new RegExp('@breakpoint_end_' + window.GLOB.breakpoint + '\\$\\*\\/', 'ig')
    if (window.GLOB.breakpoint === 'all') {
      start = /\/\*\$breakpoint_begin_[0-9a-z_]+@/ig
      end = /@breakpoint_end_[0-9a-z_]+\$\*\//ig
    }
    _sql = _sql.replace(start, '').replace(end, '')
    _sql += `
      z_debug_end: select @ErrorCode='E',@retmsg='debug_end' goto aaa`
  }
  if (window.GLOB.debugger === true || (window.debugger === true && options.sysType !== 'cloud')) {
    // _sql = _sql.replace(/\n\s{8}/ig, '\n')
src/views/main/index.jsx
@@ -23,6 +23,21 @@
  componentDidMount () {
    MKEmitter.addListener('resetSelectLine', this.resetParentParam)
    Object.defineProperty(window, 'debug', {
      set(value) {
        if (value + '' === 'false') {
          window.debugger = false
          window.GLOB.breakpoint = false
          sessionStorage.removeItem('breakpoint')
        } else {
          window.debugger = true
          window.GLOB.breakpoint = value + ''
          sessionStorage.setItem('breakpoint', value)
        }
        MKEmitter.emit('debugChange')
      }
    })
  }
  componentWillUnmount () {