king
2023-11-26 bdfec77e57c90ad4750e08ee822818ce991b019f
src/menu/datasource/verifycard/index.jsx
@@ -59,6 +59,7 @@
        dataIndex: 'label',
        inputType: 'input',
        editable: true,
        searchable: true,
        width: '28%'
      },
      {
@@ -68,6 +69,7 @@
        editable: true,
        unique: true,
        strict: true,
        searchable: true,
        copy: true,
        rules: [{
          pattern: /^[\u4E00-\u9FA50-9a-zA-Z_]*$/ig,
@@ -390,6 +392,7 @@
    if (values.uuid) {
      scripts = scripts.map(item => {
        if (item.uuid === values.uuid) {
          values.$index = item.$index || ''
          return values
        } else {
          return item
@@ -658,6 +661,25 @@
      let r = SettingUtils.getDebugSql(setting, _scripts, _columns, searches, config.type)
      let _debugId = md5(r.sql)
      if (r.custompage && setting.laypage === 'true' && _columns.findIndex(col => col.field === 'mk_total') === -1) {
        if (config.subtype !== 'basetable') {
          Modal.warning({
            title: `数据源或自定义脚本中使用自定义分页排序时,请在字段集中添加 mk_total。`,
            okText: '知道了',
            onOk: () => {
              reject()
            }
          })
          return
        } else {
          notification.warning({
            top: 92,
            message: '数据源或自定义脚本中使用自定义分页排序时,请在显示列中添加 mk_total。',
            duration: 5
          })
        }
      }
      if (debugId === _debugId) {
        resolve()
@@ -681,17 +703,19 @@
          if (/列名\s*'[a-zA-Z0-9_-]+'\s*无效/.test(result.message)) {
            let tail = ''
            let type = ''
            searches.forEach(item => {
              if (item.forbid) return
              item.key.split(',').forEach(field => {
                if (new RegExp(`'${field}'`).test(result.message)) {
                  tail = field
                  type = '搜索条件'
                }
            if (setting.execute !== 'false' && setting.queryType !== 'statistics') {
              searches.forEach(item => {
                if (item.forbid) return
                item.key.split(',').forEach(field => {
                  if (new RegExp(`'${field}'`).test(result.message)) {
                    tail = field
                    type = '搜索条件'
                  }
                })
              })
            })
            }
            if (!tail) {
            if (!tail && setting.order) {
              let keys = setting.order.replace(/\s+(asc|desc)/ig, '').replace(/\s+/g, '')
              keys.split(',').forEach(field => {
                if (new RegExp(`'${field}'`).test(result.message)) {