king
2024-12-24 84fff2a2002e3ab601fd52ce207c99114e9b9b8d
2024-12-24
6个文件已修改
70 ■■■■■ 已修改文件
public/README.txt 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/index.js 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/header/index.jsx 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/index.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/datasource/verifycard/index.jsx 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/utils-custom.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/README.txt
@@ -24,4 +24,5 @@
execType          -- 脚本传输方式,值为x时,启用AES加密
SysNotice         -- 是否开启系统消息
updateStatus      -- 是否更新开发状态,默认开启,当值为 false 时禁用
forcedUpdate      -- 传输号升级时,是否自动退出,格式为(YYYY-MM-DD),用于升级后刷新用户本地配置
forcedUpdate      -- 传输号升级时,是否自动退出,格式为(YYYY-MM-DD),用于升级后刷新用户本地配置
errorLog          -- 记录500、504时的报错日志,值为 true 时开启,业务系统有效
src/api/index.js
@@ -74,6 +74,32 @@
      placement: 'bottomRight',
      duration: 15
    })
    if ([500, 504].includes(response.status) && error.config && error.config.url && error.config.data) {
      window.mkInfo(error.config.url)
      window.mkInfo(error.config.data)
      if (window.GLOB.errorLog && !sessionStorage.getItem('local_error')) {
        let urlReg = new RegExp('^(' + window.GLOB.baseurl + '|/)webapi/(exstars|dostars)', 'ig')
        if (urlReg.test(error.config.url) && !/s_special_error_note_log/.test(error.config.url)) {
          let res = null
          try {
            let data = JSON.parse(error.config.data)
            if (!data.rduri) {
              res = {
                api_url: error.config.url,
                error_code: response.status,
                error_time: moment().format('YYYY-MM-DD HH:mm:ss'),
                api_param: error.config.data
              }
            }
          } catch (e) {
            res = null
          }
          if (res) {
            sessionStorage.setItem('local_error', JSON.stringify(res))
          }
        }
      }
    }
  }
  return Promise.reject(response)
src/components/header/index.jsx
@@ -83,6 +83,24 @@
        }
      }
    })
    if (sessionStorage.getItem('local_error')) {
      try {
        let param = JSON.parse(sessionStorage.getItem('local_error'))
        setTimeout(() => {
          Api.genericInterface({
            func: 's_special_error_note_log',
            ...param
          }).then(res => {
            if (res.status) {
              sessionStorage.removeItem('local_error')
            }
          })
        }, 3000)
      } catch (e) {
        sessionStorage.removeItem('local_error')
      }
    }
  }
  shouldComponentUpdate (nextProps, nextState) {
src/index.js
@@ -166,6 +166,10 @@
      
        GLOB.mainSystemApi = systemApi
      }
      if (config.errorLog === 'true' && /#\/(login|main|billprint|docprint|tab|iframe|view|ssologin)/.test(window.location.href)) {
        GLOB.errorLog = true
      }
    }
    if (/#\/hs$/.test(window.location.href)) { // hs下不打印脚本
src/menu/datasource/verifycard/index.jsx
@@ -719,11 +719,24 @@
      if (r.custompage && setting.laypage === 'true' && _columns.findIndex(col => col.field === 'mk_total') === -1) {
        if (config.subtype !== 'basetable') {
          Modal.warning({
            title: `数据源或自定义脚本中使用自定义分页排序时,请在字段集中添加 mk_total。`,
          const that = this
          Modal.confirm({
            title: `数据源或自定义脚本中使用自定义分页排序时,字段集中需要添加 mk_total。`,
            okText: '知道了',
            cancelText: '添加',
            onOk: () => {
              reject()
            },
            onCancel() {
              let item = {
                field: 'mk_total',
                label: 'mk_total',
                datatype: 'Int',
                uuid: Utils.getuuid()
              }
              that.setState({ columns: [item, ...columns] })
              reject()
            }
          })
          return
src/utils/utils-custom.js
@@ -4707,7 +4707,7 @@
        } else if (['mk_address'].includes(s)) {
          decSql.push(`@mk_address nvarchar(100)`)
        } else if (['mk_deleted'].includes(s)) {
          secSql.push(`@mk_deleted int`)
          decSql.push(`@mk_deleted int`)
        } else {
          decSql.push(`@${s} nvarchar(50)`)
        }