king
2025-05-23 d5edf87014863eceaa44f28809ae4b54a39b9a8e
src/tabviews/custom/components/table/edit-table/normalTable/index.jsx
@@ -20,7 +20,6 @@
class MkSwitch extends Component {
  static propTpyes = {
    autoFocus: PropTypes.bool,
    defaultValue: PropTypes.any,
    config: PropTypes.object,
    onChange: PropTypes.func
@@ -78,12 +77,10 @@
    if (config.$ctrl) {
      MKEmitter.emit('colBlur' + config.tableId, lineId, config.uuid)
    }
    this.props.onBlur && this.props.onBlur()
  }
  render() {
    const { config, autoFocus } = this.props
    const { config } = this.props
    const { status } = this.state
    return (
@@ -91,7 +88,6 @@
        ref={ref => this.node = ref}
        checkedChildren={config.openText}
        checked={status}
        autoFocus={autoFocus}
        onFocus={this.onFocus}
        onBlur={this.onBlur}
        unCheckedChildren={config.closeText}
@@ -586,19 +582,34 @@
    const { config } = this.props
    const { value, err } = this.state
    return (
      <InputNumber
        title={err}
        className={err ? 'has-error' : ''}
        ref={ref => this.node = ref}
        precision={config.decimal || 0}
        value={value}
        onChange={(value) => this.onChange(value)}
        onPressEnter={this.enterPress}
        onFocus={this.onFocus}
        onBlur={this.onBlur}
      />
    )
    if (!config.decimal && config.decimal !== 0) {
      return (
        <InputNumber
          title={err}
          className={err ? 'has-error' : ''}
          ref={ref => this.node = ref}
          value={value}
          onChange={(value) => this.onChange(value)}
          onPressEnter={this.enterPress}
          onFocus={this.onFocus}
          onBlur={this.onBlur}
        />
      )
    } else {
      return (
        <InputNumber
          title={err}
          className={err ? 'has-error' : ''}
          ref={ref => this.node = ref}
          precision={config.decimal}
          value={value}
          onChange={(value) => this.onChange(value)}
          onPressEnter={this.enterPress}
          onFocus={this.onFocus}
          onBlur={this.onBlur}
        />
      )
    }
  }
}
@@ -748,7 +759,7 @@
        content = `${record[col.field]}`
      }
      if (col.editType === 'select' && col.options.length > 0) {
      if (col.editType === 'select' && col.showValue !== 'value' && col.options.length > 0) {
        content = col.map.get(content) || content
      } else if (col.editType === 'switch') {
        if (content === col.openVal) {
@@ -805,16 +816,17 @@
      }
      if (col.editable === 'true' && !disabled) {
        if (editing) {
        if (col.editType === 'switch') {
          let _value = record[col.field] !== undefined ? record[col.field] : ''
          return (<td onClick={(e) => e.stopPropagation()} className="editing_table_cell">
            <MkSwitch config={col} lineId={record.$$uuid} defaultValue={_value} onChange={this.onColChange}/>
          </td>)
        } else if (editing) {
          let _value = record[col.field] !== undefined ? record[col.field] : ''
          if (!col.editType || col.editType === 'text') {
            return (<td onClick={(e) => e.stopPropagation()} className="editing_table_cell">
              <MkInput config={col} lineId={record.$$uuid} defaultValue={_value} autoFocus={true} onChange={this.onColChange} onBlur={() => this.setState({editing: false})}/>
            </td>)
          } else if (col.editType === 'switch') {
            return (<td onClick={(e) => e.stopPropagation()} className="editing_table_cell">
              <MkSwitch config={col} lineId={record.$$uuid} defaultValue={_value} autoFocus={true} onChange={this.onColChange} onBlur={() => this.setState({editing: false})}/>
            </td>)
          } else if (col.editType === 'date') {
            return (<td onClick={(e) => e.stopPropagation()} className="editing_table_cell">
@@ -862,6 +874,9 @@
        }
        if (col.format === 'percent') {
          content = content * 100
          if (!col.round) {
            content = +content.toFixed(2)
          }
        } else if (col.format === 'abs') {
          content = Math.abs(content)
        }
@@ -946,6 +961,15 @@
          content = ''
        }
      } else {
        if (col.eval === 'false' && col.noValue === 'hide') { // 空值隐藏
          Object.keys(record).forEach(key => {
            if (/^\$/.test(key)) return
            if (record[key]) return
            content = content.replace(new RegExp('[^@]*@' + key + '@', 'ig'), '')
          })
        }
        Object.keys(record).forEach(key => {
          let reg = new RegExp('@' + key + '@', 'ig')
          content = content.replace(reg, record[key])
@@ -956,7 +980,7 @@
            // eslint-disable-next-line
            content = eval(content)
          } catch (e) {
            console.info(content)
            window.mkInfo(content)
            console.warn(e)
            content = ''
          }
@@ -978,7 +1002,12 @@
        content = <span dangerouslySetInnerHTML={{__html: content}}></span>
      } else if (content !== '') {
        content = `${col.prefix || ''}${content}${col.postfix || ''}`
        content = content.replace(/\n/ig, '<br/>').replace(/\s/ig, '&nbsp;')
        if (!col.evalchars || col.evalchars.includes('enter')) {
          content = content.replace(/\n/ig, '<br/>')
        }
        if (!col.evalchars || col.evalchars.includes('space')) {
          content = content.replace(/\s/ig, '&nbsp;')
        }
        content = <span dangerouslySetInnerHTML={{__html: content}}></span>
      }
@@ -1067,7 +1096,7 @@
          )
        } else if (col.editType === 'switch') {
          children = (
            <MkSwitch config={col} lineId={record.$$uuid} defaultValue={_value} autoFocus={false} onChange={this.onColChange}/>
            <MkSwitch config={col} lineId={record.$$uuid} defaultValue={_value} onChange={this.onColChange}/>
          )
        } else if (col.editType === 'date') {
          children = (
@@ -1093,7 +1122,7 @@
          content = `${record[col.field]}`
        }
        if (col.editType === 'select' && col.options.length > 0) {
        if (col.editType === 'select' && col.showValue !== 'value' && col.options.length > 0) {
          content = col.map.get(content) || content
        } else if (col.editType === 'switch') {
          if (content === col.openVal) {
@@ -1187,6 +1216,9 @@
          }
          if (col.format === 'percent') {
            content = content * 100
            if (!col.round) {
              content = +content.toFixed(2)
            }
          } else if (col.format === 'abs') {
            content = Math.abs(content)
          }
@@ -1260,6 +1292,15 @@
          content = ''
        }
      } else {
        if (col.eval === 'false' && col.noValue === 'hide') { // 空值隐藏
          Object.keys(record).forEach(key => {
            if (/^\$/.test(key)) return
            if (record[key]) return
            content = content.replace(new RegExp('[^@]*@' + key + '@', 'ig'), '')
          })
        }
        Object.keys(record).forEach(key => {
          let reg = new RegExp('@' + key + '@', 'ig')
          content = content.replace(reg, record[key])
@@ -1270,7 +1311,7 @@
            // eslint-disable-next-line
            content = eval(content)
          } catch (e) {
            console.info(content)
            window.mkInfo(content)
            console.warn(e)
            content = ''
          }
@@ -1292,7 +1333,12 @@
        content = <span dangerouslySetInnerHTML={{__html: content}}></span>
      } else if (content !== '') {
        content = `${col.prefix || ''}${content}${col.postfix || ''}`
        content = content.replace(/\n/ig, '<br/>').replace(/\s/ig, '&nbsp;')
        if (!col.evalchars || col.evalchars.includes('enter')) {
          content = content.replace(/\n/ig, '<br/>')
        }
        if (!col.evalchars || col.evalchars.includes('space')) {
          content = content.replace(/\s/ig, '&nbsp;')
        }
        content = <span dangerouslySetInnerHTML={{__html: content}}></span>
      }
@@ -1373,7 +1419,8 @@
    allColumns: null,
    checkForms: [],
    allForms: [],
    reseting: false
    reseting: false,
    dict: window.GLOB.dict
  }
  timer = null
@@ -1459,6 +1506,9 @@
        } else {
          _item.datatype = item.datatype
        }
        if (_item.type === 'number' && item.type === 'number') {
          _item.decimal = item.decimal || 0
        }
        forms.push(_item)
      } else {
@@ -1504,7 +1554,11 @@
      deForms: hasBid ? deForms : null
    }, () => {
      if (deForms.length > 0 && (!hasBid || BID)) {
        this.improveActionForm(deForms, BID)
        if (window.backend && window.GLOB.CacheData.has('sql_' + deForms[0].uuid)) {
          this.improveBackActionForm(deForms, BID)
        } else {
          this.improveActionForm(deForms, BID)
        }
      }
    })
  }
@@ -1518,7 +1572,11 @@
    const { deForms } = this.state
    if (deForms && nextProps.BID !== BID) {
      this.improveActionForm(deForms, nextProps.BID)
      if (window.backend && window.GLOB.CacheData.has('sql_' + deForms[0].uuid)) {
        this.improveBackActionForm(deForms, nextProps.BID)
      } else {
        this.improveActionForm(deForms, nextProps.BID)
      }
    }
    if (parCtrl && !is(fromJS(this.props.columns), fromJS(nextProps.columns))) {
      let getColumns = (cols, sk) => {
@@ -1615,7 +1673,7 @@
  }
  checkLine = () => {
    const { edData, forms, checkForms } = this.state
    const { edData, forms, checkForms, dict } = this.state
    let data = edData.filter(item => item.$$uuid === this.blurId)[0]
@@ -1658,7 +1716,7 @@
      if (col.type === 'text') {
        let val = record[col.field] !== undefined ? (record[col.field] + '') : ''
        if (col.required === 'true' && !val) {
          err = `${col.label}不可为空`
          err = `${col.label}${dict['not_empty'] || '不可为空'}`
        } else if (col.datatype === 'datetime' && !val) {
          val = '1949-10-01'
        }
@@ -1667,27 +1725,27 @@
        let val = record[col.field]
        if (col.required === 'true' && !val) {
          err = `${col.label}不可为${col.noValue === 'hide' ? '空' : '0'}`
          err = `${col.label}${col.noValue === 'hide' ? (dict['not_empty'] || '不可为空') : dict['not_zero'] || '不可为0'}`
        } else if (col.noValue === 'hide' && !val) {
          if (col.clearField && checkForms.includes(col.clearField) && !record[col.clearField]) {
            err = `请填写 ${col.label} 或 ${col.clearName}`
            err = `${dict['input_tip'] || '请填写 '}${col.label} ${dict['or'] || '或'} ${col.clearName}`
          }
          val = 0
        } else if (!val && val !== 0) {
          err = `${col.label}不可为空`
          err = `${col.label}${dict['not_empty'] || '不可为空'}`
        } else {
          val = +val
          if (isNaN(val)) {
            err = `${col.label}数据格式错误`
            err = `${col.label} ${dict['data_format'] || '数据格式错误'}`
            return
          }
  
          val = +val.toFixed(col.decimal || 0)
          
          if (typeof(col.max) === 'number' && val > col.max) {
            err = `${col.label}不可大于${col.max}`
            err = `${col.label}${dict['max_limit'] || ' 不可大于 '}${col.max}`
          } else if (typeof(col.min) === 'number' && val < col.min) {
            err = `${col.label}不可小于${col.min}`
            err = `${col.label}${dict['less_limit'] || ' 不可小于 '}${col.min}`
          }
        }
@@ -1881,7 +1939,7 @@
        sql = sql.replace(/@BID@/ig, `'${BID}'`)
        if (debug) {
          console.info(sql)
          window.mkInfo(sql)
        }
        sql = sql.replace(/%/ig, ' mpercent ')
@@ -1894,7 +1952,7 @@
        sql = sql.replace(/@BID@/ig, `'${BID}'`)
        if (debug) {
          console.info(sql)
          window.mkInfo(sql)
        }
        sql = sql.replace(/%/ig, ' mpercent ')
@@ -1925,7 +1983,7 @@
      deffers.push(
        new Promise(resolve => {
          Api.getSystemCacheConfig(param, false).then(res => {
            if (!res.status) {
            if (!res.status && res.ErrCode !== '-2') {
              notification.warning({
                top: 92,
                message: res.message,
@@ -1964,7 +2022,7 @@
      deffers.push(
        new Promise(resolve => {
          Api.getSystemCacheConfig(mainparam, false).then(res => {
            if (!res.status) {
            if (!res.status && res.ErrCode !== '-2') {
              notification.warning({
                top: 92,
                message: res.message,
@@ -1984,6 +2042,106 @@
      delete result.ErrMesg
      delete result.message
      delete result.status
      this.resetFormList(result)
    })
  }
  improveBackActionForm = (deForms, BID) => {
    let sysvals = {
      mk_departmentcode: sessionStorage.getItem('departmentcode') || '',
      mk_organization: sessionStorage.getItem('organization') || '',
      mk_user_type: sessionStorage.getItem('mk_user_type') || '',
      bid: BID || '',
      datam: sessionStorage.getItem('dataM') === 'true' ? 'Y' : '',
      datam_begin: sessionStorage.getItem('dataM') === 'true' ? 'Y' : '',
      datam_end: sessionStorage.getItem('dataM') === 'true' ? 'Y' : ''
    }
    if (window.GLOB.externalDatabase !== null) {
      sysvals.db = window.GLOB.externalDatabase
    }
    let deffers = []
    let mainItems = []  // 云端或单点数据
    let localItems = [] // 本地数据
    deForms.forEach(item => {
      let ex = window.GLOB.CacheData.get('sql_' + item.uuid)
      if (!ex) return
      let exps = []
      ex.reps.forEach(n => {
        let key = n.toLowerCase()
        if (sysvals.hasOwnProperty(key)) {
          exps.push({
            key: n,
            value: sysvals[key]
          })
        }
      })
      let cell = {
        id: ex.id,
        menuname: item.label + '(表单)',
        exps: exps,
        md5_id: ''
      }
      if (item.database === 'sso' && window.GLOB.mainSystemApi) {
        mainItems.push(cell)
      } else {
        localItems.push(cell)
      }
    })
    if (localItems.length) {
      deffers.push({
        $backend: true,
        $type: 's_Get_SelectedList',
        data: localItems
      })
    }
    if (mainItems.length) {
      deffers.push({
        $backend: true,
        $type: 's_Get_SelectedList',
        data: mainItems,
        rduri: window.GLOB.mainSystemApi
      })
    }
    if (!deffers.length) return
    deffers = deffers.map(item => {
      return new Promise(resolve => {
        Api.getSystemCacheConfig(item, false).then(res => {
          if (!res.status && res.ErrCode !== '-2') {
            notification.warning({
              top: 92,
              message: res.message,
              duration: 5
            })
          }
          resolve(res)
        })
      })
    })
    Promise.all(deffers).then(response => {
      let result = {...response[0], ...(response[1] || {})}
      delete result.ErrCode
      delete result.ErrMesg
      delete result.message
      delete result.status
      this.props.columns.forEach(item => {
        if (item.arr_field && result[item.field]) {
          result[item.uuid] = result[item.field]
        }
      })
      this.resetFormList(result)
    })
@@ -2220,7 +2378,7 @@
  checkData = () => {
    const { setting } = this.props
    const { edData, forms, checkForms, selectedRowKeys } = this.state
    const { edData, forms, checkForms, selectedRowKeys, dict } = this.state
    let data = fromJS(edData).toJS()
@@ -2234,7 +2392,7 @@
      if (data.length === 0) {
        notification.warning({
          top: 92,
          message: '请选择需要提交的数据!',
          message: dict['select_row'] || '请选择需要提交的数据!',
          duration: 5
        })
        return null
@@ -2244,7 +2402,7 @@
    if (data.length === 0) {
      notification.warning({
        top: 92,
        message: '数据未修改,不可提交!',
        message: dict['un_modified'] || '数据未修改,不可提交!',
        duration: 5
      })
      return null
@@ -2278,7 +2436,7 @@
        if (col.type === 'text') {
          let val = item[col.field] !== undefined ? (item[col.field] + '') : ''
          if (col.required === 'true' && !val) {
            line.push(`${col.label}不可为空`)
            line.push(`${col.label}${dict['not_empty'] || '不可为空'}`)
          } else if (col.datatype === 'datetime' && !val) {
            val = '1949-10-01'
          }
@@ -2286,31 +2444,31 @@
        } else if (col.type === 'number') {
          let val = item[col.field]
          if (col.required === 'true' && !val) {
            err = `${col.label}不可为${col.noValue === 'hide' ? '空' : '0'}`
            err = `${col.label}${col.noValue === 'hide' ? (dict['not_empty'] || '不可为空') : dict['not_zero'] || '不可为0'}`
          } else if (col.noValue === 'hide' && !val) {
            if (col.clearField && checkForms.includes(col.clearField) && !item[col.clearField]) {
              let msg = `请填写 ${col.label} 或 ${col.clearName}`
              let msg = `${dict['input_tip'] || '请填写 '}${col.label} ${dict['or'] || '或'} ${col.clearName}`
              if (!line.includes(msg)) {
                line.push(msg)
              }
            }
            val = 0
          } else if (!val && val !== 0) {
            line.push(`${col.label}不可为空`)
            line.push(`${col.label}${dict['not_empty'] || '不可为空'}`)
            return
          } else {
            val = +val
            if (isNaN(val)) {
              line.push(`${col.label}数据格式错误`)
              line.push(`${col.label} ${dict['data_format'] || '数据格式错误'}`)
              return
            }
  
            val = +val.toFixed(col.decimal || 0)
            
            if (typeof(col.max) === 'number' && val > col.max) {
              line.push(`${col.label}不可大于${col.max}`)
              line.push(`${col.label}${dict['max_limit'] || ' 不可大于 '}${col.max}`)
            } else if (typeof(col.min) === 'number' && val < col.min) {
              line.push(`${col.label}不可小于${col.min}`)
              line.push(`${col.label}${dict['less_limit'] || ' 不可小于 '}${col.min}`)
            }
          }
@@ -2319,7 +2477,7 @@
      })
      if (line.length > 0) {
        err += `第${Index}行:` + line.join(',') + ';'
        err += (dict['line'] ? `${dict['line']} ${Index}:` : `第${Index}行:`) + line.join(',') + ';'
      }
      if (!item.$deleted) {
        Index++
@@ -2343,14 +2501,14 @@
  submit = (record) => {
    const { submit, BID, setting } = this.props
    const { forms } = this.state
    const { forms, dict } = this.state
    this.setState({visible: false, midData: null})
    if (setting.supModule && !BID) {
      notification.warning({
        top: 92,
        message: '需要上级主键值!',
        message: setting.supModTip || dict['sup_key_req'] || '需要上级主键值!',
        duration: 5
      })
@@ -2366,22 +2524,32 @@
    if (!data) return
    let result = getEditTableSql(submit, data, forms)
    let param = {
      excel_in: result.lines,
      BID: BID || ''
    }
    this.setState({
      loading: true
    })
    if (submit.intertype === 'system') { // 系统存储过程
      param.func = 'sPC_TableData_InUpDe'
      delete param.excel_in
    if (submit.intertype === 'system' && window.backend && window.GLOB.CacheData.has('sql_submit_' + submit.$menuId)) {
      let ex = window.GLOB.CacheData.get('sql_submit_' + submit.$menuId)
      let param = this.getExps(ex, submit, data, forms)
      Api.genericInterface(param).then((res) => {
        if (res.status) {
          this.execSuccess(res, record)
        } else {
          this.execError(res, record)
        }
      }, (error) => {
        if (error && error.ErrCode === 'LoginError') return
        this.execError({})
      })
    } else if (submit.intertype === 'system') { // 系统存储过程
      let result = getEditTableSql(submit, data, forms, setting)
      let param = {}
      param.func = 'sPC_TableData_InUpDe'
      param.BID = BID || ''
      param.exec_type = window.GLOB.execType || 'y'
      param.LText = Utils.formatOptions(result.sql, param.exec_type)
      param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
@@ -2405,7 +2573,12 @@
        this.execError({})
      })
    } else if (submit.intertype === 'inner' && submit.innerFunc) { // 自定义存储过程
      let result = getEditTableSql(submit, data, forms, setting)
      let param = {}
      param.func = submit.innerFunc
      param.BID = BID || ''
      param.excel_in = result.lines
      if (submit.recordUser === 'true') {
        param.username = sessionStorage.getItem('User_Name') || ''
@@ -2426,19 +2599,96 @@
    }
  }
  getExps = (ex, btn, data, forms) => {
    const { BID } = this.props
    let exps = []
    let values = {
      time_id: Utils.getguid(),
      roleid: sessionStorage.getItem('role_id') || '',
      mk_departmentcode: sessionStorage.getItem('departmentcode') || '',
      mk_organization: sessionStorage.getItem('organization') || '',
      mk_user_type: sessionStorage.getItem('mk_user_type') || '',
      mk_nation: sessionStorage.getItem('nation') || '',
      mk_province: sessionStorage.getItem('province') || '',
      mk_city: sessionStorage.getItem('city') || '',
      mk_district: sessionStorage.getItem('district') || '',
      mk_address: sessionStorage.getItem('address') || '',
      bid: BID || '',
      typename: 'admin',
      datam: sessionStorage.getItem('dataM') === 'true' ? 'Y' : '',
      datam_begin: sessionStorage.getItem('dataM') === 'true' ? 'Y' : '',
      datam_end: sessionStorage.getItem('dataM') === 'true' ? 'Y' : '',
    }
    if (window.GLOB.externalDatabase !== null) {
      values.db = window.GLOB.externalDatabase
    }
    let lines = data.map(item => {
      let vals = []
      forms.forEach(col => {
        if (typeof(item[col.field]) === 'number') {
          vals.push(item[col.field] + '')
        } else {
          vals.push(item[col.field])
        }
      })
      vals.push(item.$$uuid)
      vals.push(item.$type || 'upt')
      vals.push(BID)
      return vals
    })
    ex.reps.forEach(n => {
      let key = n.toLowerCase()
      if (values.hasOwnProperty(key)) {
        exps.push({
          key: n,
          value: values[key]
        })
      }
    })
    exps.push({
      key: 'mk_excel_data',
      value: lines
    })
    let md5_id = ''
    if (window.GLOB.probation) {
      md5_id = md5(ex.id + JSON.stringify(exps) + Math.floor(new Date().getTime() / 600000))
      md5_id = moment().format('YYYYMMDDHHmmss') + md5_id.slice(-18)
    }
    return {
      $backend: true,
      $type: 's_TableData_InUpDe',
      data: [{
        id: ex.id,
        menuname: btn.logLabel || '',
        exps: exps,
        md5_id: md5_id
      }]
    }
  }
  execSuccess = (res, record) => {
    const { submit } = this.props
    const { edData } = this.state
    const { edData, dict } = this.state
    if (res && res.ErrCode === 'S') { // 执行成功
      notification.success({
        top: 92,
        message: res.message || '执行成功',
        message: res.message || dict['exc_success'] || '执行成功',
        duration: submit.stime ? submit.stime : 2
      })
    } else if (res && res.ErrCode === 'Y') { // 执行成功
      Modal.success({
        title: res.message || '执行成功'
        title: res.message || dict['exc_success'] || '执行成功',
        okText: dict['got_it'] || '知道了'
      })
    } else if (res && res.ErrCode === '-1') { // 完成后不提示
@@ -2484,26 +2734,28 @@
  execError = (res, record) => {
    const { submit } = this.props
    const { dict } = this.state
    if (res.ErrCode === 'E') {
      Modal.error({
        title: res.message || '执行失败!',
        title: res.message || dict['exc_fail'] || '执行失败!',
        okText: dict['got_it'] || '知道了'
      })
    } else if (res.ErrCode === 'N') {
      notification.error({
        top: 92,
        message: res.message || '执行失败!',
        message: res.message || dict['exc_fail'] || '执行失败!',
        duration: submit.ntime ? submit.ntime : 10
      })
    } else if (res.ErrCode === 'F') {
      notification.error({
        className: 'notification-custom-error',
        top: 92,
        message: res.message || '执行失败!',
        message: res.message || dict['exc_fail'] || '执行失败!',
        duration: submit.ftime ? submit.ftime : 10
      })
    } else if (res.ErrCode === 'NM') {
      message.error(res.message || '执行失败!')
      message.error(res.message || dict['exc_fail'] || '执行失败!')
    }
    
    this.setState({
@@ -2617,7 +2869,7 @@
  render() {
    const { setting, lineMarks, submit } = this.props
    const { edData, columns, loading, pageOptions, selectedRowKeys, visible, midData, reseting } = this.state
    const { edData, columns, loading, pageOptions, selectedRowKeys, visible, midData, reseting, dict } = this.state
    if (reseting) return null
@@ -2648,13 +2900,19 @@
        pageSizeOptions: pageOptions,
        showSizeChanger: true,
        total: this.props.total || 0,
        showTotal: (total, range) => `${range[0]}-${range[1]} 共 ${total} 条`
        showTotal: (total, range) => `${range[0]}-${range[1]} ${dict['of'] || '共'} ${total} ${dict['items'] || '条'}`
      }
    }
    let height = setting.height || false
    if (height && height <= 100) {
      height = height + 'vh'
    if (height) {
      if (height <= 100) {
        if (height < 0) {
          height = `calc(100vh - ${-height}px)`
        } else {
          height = height + 'vh'
        }
      }
    }
    let style = {
@@ -2667,9 +2925,9 @@
    return (
      <>
        {setting.hasSubmit && edData.length > 0 ? <div className="edit-custom-table-btn-wrap" style={submit.wrapStyle}>
          <Button style={submit.style} onClick={() => setTimeout(() => {this.submit()}, 10)} loading={loading} className="submit-table" type="link">提交</Button>
          <Button style={submit.style} onClick={() => setTimeout(() => {this.submit()}, 10)} loading={loading} className="submit-table" type="link">{dict['submit'] || '提交'}</Button>
        </div> : null}
        <div className={`edit-custom-table ${setting.tableHeader || ''} ${setting.parity === 'true' ? 'mk-parity' : ''} ${height ? 'fixed-table-height' : ''} ${setting.mode || ''} table-vertical-${setting.vertical || ''} mk-edit-${setting.editType || 'simple'}`} style={style}>
        <div className={`edit-custom-table ${setting.tableHeader || ''} ${setting.parity === 'true' ? 'mk-parity' : ''} ${height ? 'fixed-table-height' : ''} ${setting.mode || ''} table-vertical-${setting.vertical || ''} mk-edit-${setting.editType || 'simple'} ${setting.empSign === 'hidden' ? 'mk-empty-hide' : ''}`} style={style}>
          <Table
            rowKey="$$uuid"
            components={components}
@@ -2691,7 +2949,7 @@
            onChange={this.changeTable}
            pagination={_pagination}
          />
          {setting.hasSubmit && _data.length > 10 ? <Button style={submit.style} onClick={() => setTimeout(() => {this.submit()}, 10)} loading={loading} className="submit-footer-table" type="link">提交</Button> : null}
          {setting.hasSubmit && _data.length > 10 ? <Button style={submit.style} onClick={() => setTimeout(() => {this.submit()}, 10)} loading={loading} className="submit-footer-table" type="link">{dict['submit'] || '提交'}</Button> : null}
        </div>
        <Modal
          className="mk-user-confirm"
@@ -2700,13 +2958,13 @@
          maskClosable={false}
          closable={false}
          footer={[
            <Button key="cancel" onClick={() => { this.setState({ visible: false, midData: null }) }}>取消</Button>,
            <Button key="refresh" className="table-refresh" onClick={() => { midData && this.updateMutil(midData) }}>刷新表格</Button>,
            <Button key="confirm" type="primary" onClick={() => setTimeout(() => {this.submit()}, 10)}>提交数据</Button>
            <Button key="cancel" onClick={() => { this.setState({ visible: false, midData: null }) }}>{dict['cancel'] || '取消'}</Button>,
            <Button key="refresh" className="table-refresh" onClick={() => { midData && this.updateMutil(midData) }}>{dict['refresh'] || '刷新表格'}</Button>,
            <Button key="confirm" type="primary" onClick={() => setTimeout(() => {this.submit()}, 10)}>{dict['submit'] || '提交数据'}</Button>
          ]}
          destroyOnClose
        >
          <div><QuestionCircleOutlined />表格中有数据尚未提交</div>
          <div><QuestionCircleOutlined />{dict['data_not_sub'] || '表格中有数据尚未提交'}</div>
        </Modal>
      </>
    )