king
2024-04-30 496bf836a5560bc2e2f67b1e2f38fc01c9274906
Merge branch 'master' into positec
11个文件已修改
79 ■■■■■ 已修改文件
src/menu/components/table/edit-table/index.jsx 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/table/normal-table/index.jsx 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/datasource/verifycard/customscript/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/datasource/verifycard/index.jsx 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/datasource/verifycard/utils.jsx 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/debug/index.jsx 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/basetable/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/commontable/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/index.jsx 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/treepage/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/utils-datamanage.js 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/table/edit-table/index.jsx
@@ -297,6 +297,18 @@
    config.absFields = []
    config.mergeCol = false
    let mapCol = (cols) => {
      cols.forEach(col => {
        if (col.type === 'number') {
          if (col.format === 'abs') {
            config.absFields.push(col.field)
          }
        } else if (col.type === 'colspan' && col.subcols) {
          mapCol(col.subcols)
        }
      })
    }
    config.cols.forEach((col, index) => {
      delete col.pops
@@ -305,13 +317,7 @@
          config.absFields.push(col.field)
        }
      } else if (col.type === 'colspan' && col.subcols) {
        col.subcols.forEach(scol => {
          if (scol.type === 'number') {
            if (scol.format === 'abs') {
              config.absFields.push(scol.field)
            }
          }
        })
        mapCol(col.subcols)
      } else if (col.type === 'text') {
        if (col.editable === 'true' && col.editType === 'popSelect' && /^tab:/.test(col.initval)) {
          config.mergeCol = config.mergeCol || []
src/menu/components/table/normal-table/index.jsx
@@ -330,21 +330,21 @@
  updatecolumn = (config) => {
    config.absFields = []
    config.cols.forEach(col => {
    config.hasExtend = false
    let mapCol = (cols) => {
      cols.forEach(col => {
      if (col.type === 'number') {
        if (col.format === 'abs') {
          config.absFields.push(col.field)
        }
        } else if (col.type === 'extend') {
          config.hasExtend = true
      } else if (col.type === 'colspan' && col.subcols) {
        col.subcols.forEach(scol => {
          if (scol.type === 'number') {
            if (scol.format === 'abs') {
              config.absFields.push(scol.field)
            }
          mapCol(col.subcols)
          }
        })
      }
    })
    mapCol(config.cols)
    if (config.absFields.length) {
      config.absFields = Array.from(new Set(config.absFields))
src/menu/datasource/verifycard/customscript/index.jsx
@@ -210,7 +210,7 @@
  }
  render() {
    const { systemScripts, setting, type } = this.props
    const { systemScripts, setting, type, hasExtend } = this.props
    const { getFieldDecorator } = this.props.form
    const { usefulFields, skip } = this.state
@@ -245,7 +245,7 @@
            <Form.Item label="可用字段" className="field-able">
              <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'公共值,请按照@xxx@格式使用。'}><span style={{color: '#1890ff'}}>BID, LoginUID, SessionUid, UserID, Appkey, time_id, typename, datam</span></Tooltip>,&nbsp;
              <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'系统变量,系统会定义变量并赋值。'}><span style={{color: '#fa8c16'}}>UserName, FullName, RoleID, mk_departmentcode, mk_organization, mk_user_type, mk_nation, mk_province, mk_city, mk_district, mk_address</span></Tooltip>,&nbsp;
              <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'排序、分页以及搜索条件变量,请按照@xxx@格式使用。使用@pageSize@或@orderBy@代表自定义分页,总数请以mk_total返回。'}>orderBy, pageSize, pageIndex{usefulFields ? ', ' + usefulFields : ''}{type === 'calendar' ? ', mk_year' : ''}</Tooltip>
              <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'排序、分页以及搜索条件变量,请按照@xxx@格式使用。使用@pageSize@或@orderBy@代表自定义分页,总数请以mk_total返回。'}>orderBy, pageSize, pageIndex{usefulFields ? ', ' + usefulFields : ''}{type === 'calendar' ? ', mk_year' : ''}{hasExtend ? ', mk_time' : ''}</Tooltip>
              <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'url变量,请按照@xxx@格式使用。'}>{urlFields ? ', ' : ''}<span style={{color: '#13c2c2'}}>{urlFields}</span></Tooltip>
              {window.GLOB.process ? <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'工作流变量,请按照@xxx@格式使用。'}>, <span style={{color: 'purple'}}>works_flow_code</span></Tooltip> : null}
            </Form.Item>
src/menu/datasource/verifycard/index.jsx
@@ -679,7 +679,7 @@
        _columns = [...columns, ...subColumns]
      }
      let r = SettingUtils.getDebugSql(setting, _scripts, _columns, searches, config.subtype)
      let r = SettingUtils.getDebugSql(setting, _scripts, _columns, searches, config.subtype, config.hasExtend)
      let _debugId = md5(r.sql)
      
@@ -1217,6 +1217,7 @@
            }}/> : null}
            <CustomScriptsForm
              type={config.type}
              hasExtend={config.hasExtend}
              setting={setting}
              searches={searches}
              defaultsql={defaultsql}
src/menu/datasource/verifycard/utils.jsx
@@ -9,7 +9,7 @@
   * @return {Object}  setting       页面设置
   * @return {Array}   columns       显示字段
   */
  static getDebugSql (setting, scripts, columns, searches = [], type) {
  static getDebugSql (setting, scripts, columns, searches = [], type, hasExtend) {
    let sql = ''
    let error = ''
    let _dataresource = ''
@@ -79,6 +79,9 @@
      regs.push({reg: /@works_flow_code@/ig, value: `'${getuuid()}'`})
    }
    if (hasExtend) {
      regs.push({reg: /@mk_time@/ig, value: '2024-04-29 17:20:00'})
    }
    if (type === 'calendar') {
      regs.push({reg: /@mk_year@/ig, value: '2024'})
    }
src/menu/debug/index.jsx
@@ -1887,6 +1887,9 @@
      { reg: /@typename@/ig, value: `'admin'`},
    )
    if (item.hasExtend) {
      regs.push({reg: /@mk_time@/ig, value: '2024-04-29 17:20:00'})
    }
    if (item.type === 'calendar') {
      regoptions.push({ reg: /@mk_year@/ig, value: '2024' })
    }
src/tabviews/basetable/index.jsx
@@ -148,8 +148,8 @@
        try { // 配置信息解析
          let userConfig = JSON.parse(window.decodeURIComponent(window.atob(result.LongParamUser)))
          if (userConfig) {
            shortcuts = userConfig.action
            userConfig.printers.forEach(item => {
            shortcuts = userConfig.action || []
            userConfig.printers && userConfig.printers.forEach(item => {
              window.GLOB.UserCacheMap.set(item.parentId + item.uuid, item)
            })
          }
src/tabviews/commontable/index.jsx
@@ -138,8 +138,8 @@
              })
            })
          } else if (userConfig) {
            shortcuts = userConfig.action
            userConfig.printers.forEach(item => {
            shortcuts = userConfig.action || []
            userConfig.printers && userConfig.printers.forEach(item => {
              window.GLOB.UserCacheMap.set(item.parentId + item.uuid, item)
            })
          }
src/tabviews/custom/index.jsx
@@ -2,6 +2,7 @@
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { notification, Spin, Row, Col, Modal } from 'antd'
import moment from 'moment'
import Api from '@/api'
import Utils from '@/utils/utils.js'
@@ -182,8 +183,8 @@
        try { // 配置信息解析
          let userConfig = JSON.parse(window.decodeURIComponent(window.atob(result.LongParamUser)))
          if (userConfig) {
            shortcuts = userConfig.action
            userConfig.printers.forEach(item => {
            shortcuts = userConfig.action || []
            userConfig.printers && userConfig.printers.forEach(item => {
              window.GLOB.UserCacheMap.set(item.parentId + item.uuid, item)
            })
          }
@@ -688,6 +689,12 @@
        
        item.cols = getCols(item.cols)
        if (item.hasExtend) {
          item.setting.hasExtend = true
          item.setting.extendTime = moment().format('YYYY-MM-DD HH:mm:ss')
          item.colsCtrls = null
        }
        if (item.subtype === 'editable') {
          item.submit.logLabel = item.$menuname + '-提交'
          item.submit.$menuId = item.uuid
src/tabviews/treepage/index.jsx
@@ -78,8 +78,8 @@
        try { // 配置信息解析
          let userConfig = JSON.parse(window.decodeURIComponent(window.atob(result.LongParamUser)))
          if (userConfig) {
            shortcuts = userConfig.action
            userConfig.printers.forEach(item => {
            shortcuts = userConfig.action || []
            userConfig.printers && userConfig.printers.forEach(item => {
              window.GLOB.UserCacheMap.set(item.parentId + item.uuid, item)
            })
          }
src/utils/utils-datamanage.js
@@ -48,6 +48,10 @@
      param.mk_year = year
    }
    if (setting.hasExtend) {
      param.mk_time = setting.extendTime
    }
    if (setting.interType === 'inner') {
      param.func = setting.innerFunc
@@ -150,6 +154,9 @@
      { reg: /@typename@/ig, value: `'admin'`},
    )
    if (setting.hasExtend) {
      regoptions.push({ reg: /@mk_time@/ig, value: setting.extendTime })
    }
    if (setting.$re_year) {
      regoptions.push({ reg: /@mk_year@/ig, value: year })
    }