king
2024-07-15 f4b9504cad034ddcdef21c2081d14a4984fcd2d3
src/tabviews/custom/components/table/edit-table/normalTable/index.jsx
@@ -55,7 +55,7 @@
    this.node.blur()
    
    if (config.enter === '$noAct') return
    if (/\$noAct/.test(config.enter)) return
    if (/\$next/.test(config.enter)) {
      MKEmitter.emit('nextLine' + config.tableId, lineId, config.enter.replace('$next_', ''))
@@ -191,7 +191,7 @@
    this.props.onChange(values)
    if (config.enter === '$noAct') return
    if (/\$noAct/.test(config.enter)) return
    if (/\$next/.test(config.enter)) {
      MKEmitter.emit('nextLine' + config.tableId, lineId, config.enter.replace('$next_', ''))
@@ -283,9 +283,11 @@
    this.props.onChange(values, val)
    if (config.enter === '$noActX') return
    this.node.blur()
    
    if (config.enter === '$noAct') return
    if (/\$noAct/.test(config.enter)) return
    setTimeout(() => {
      if (/\$next/.test(config.enter)) {
@@ -308,7 +310,7 @@
    const { config, lineId } = this.props
    if (config.$ctrl) {
      MKEmitter.emit('colBlur' + config.tableId, lineId, config.uuid)
      MKEmitter.emit('colBlur' + config.tableId, lineId, config.uuid, true)
    }
    setTimeout(() => {
@@ -408,7 +410,7 @@
    this.node.blur()
    
    if (config.enter === '$noAct') return
    if (/\$noAct/.test(config.enter)) return
    if (/\$next/.test(config.enter)) {
      MKEmitter.emit('nextLine' + config.tableId, lineId, config.enter.replace('$next_', ''))
@@ -536,7 +538,7 @@
    this.node.blur()
    
    if (config.enter === '$noAct') return
    if (/\$noAct/.test(config.enter)) return
    setTimeout(() => {
      if (/\$next/.test(config.enter)) {
@@ -560,6 +562,10 @@
      if (config.noValue === 'hide' && !value) {
        value = 0
      }
      if (config.required === 'true' && !value) {
        err = `${config.label}不可为${config.noValue === 'hide' ? '空' : '0'}`
      } else {
        if (typeof(config.max) === 'number' && value > config.max) {
          err = config.label + '最大为' + config.max
@@ -725,7 +731,7 @@
  }
  render() {
    let { col, config, record, style, className, ...resProps } = this.props
    let { col, record, style, className, ...resProps } = this.props
    const { editing } = this.state
    if (!col) return (<td {...resProps} className={className} style={style}/>)
@@ -745,10 +751,14 @@
      if (col.editType === 'select' && col.options.length > 0) {
        content = col.map.get(content) || content
      } else if (col.editType === 'switch') {
        if (content === config.openVal) {
          content = config.openText
        } else if (content === config.closeVal) {
          content = config.closeText
        if (content === col.openVal) {
          content = col.openText
        } else if (content === col.closeVal) {
          content = col.closeText
        }
      } else if (col.editType === 'popSelect') {
        if (col.showField) {
          content = record[col.showField] || content
        }
      }
@@ -759,6 +769,10 @@
          content = `${content.substr(0, 4)}-${content.substr(5, 2)}-${content.substr(8, 2)} ${content.substr(11, 2)}:${content.substr(14, 2)}:${content.substr(17, 2)}`
        } else if (col.textFormat === 'encryption') {
          content = <span>{col.prefix || ''}<Encrypts value={content} />{col.postfix || ''}</span>
        }
        if (col.noValue === 'hide' && content < '1949-10-02') {
          content = ''
        }
        if (col.textFormat !== 'encryption') {
@@ -807,8 +821,13 @@
              <MkDatePicker config={col} lineId={record.$$uuid} defaultValue={_value || null} autoFocus={true} onChange={this.onColChange} onBlur={() => this.setState({editing: false})}/>
            </td>)
          } else if (col.editType === 'popSelect') {
            let showValue = ''
            if (col.showField) {
              showValue = record[col.showField] || ''
            }
            return (<td onClick={(e) => e.stopPropagation()} className="editing_table_cell">
              <MKPopSelect config={col} lineId={record.$$uuid} defaultValue={_value} BID={record.$$BID} autoFocus={true} onChange={this.onColChange} onBlur={() => this.setState({editing: false})}/>
              <MKPopSelect config={col} lineId={record.$$uuid} defaultValue={_value} showValue={showValue} BID={record.$$BID} autoFocus={true} onChange={this.onColChange} onBlur={() => this.setState({editing: false})}/>
            </td>)
          } else {
            return (<td onClick={(e) => e.stopPropagation()} className="editing_table_cell">
@@ -851,6 +870,7 @@
        }
  
        if (col.format === 'thdSeparator') {
          content = content + ''
          content = content.replace(/\d{1,3}(?=(\d{3})+(\.\d*)?$)/g, '$&,')
        }
  
@@ -958,7 +978,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>
      }
@@ -994,7 +1019,7 @@
      }
      children = (
        <CardCellComponent data={record} cards={config} elements={col.elements}/>
        <CardCellComponent data={record} cards={col.config} elements={col.elements}/>
      )
    }
@@ -1025,7 +1050,7 @@
  }
  render() {
    let { col, config, record, style, className, ...resProps } = this.props
    let { col, record, style, className, ...resProps } = this.props
    if (!col) return (<td {...resProps} className={className} style={style}/>)
@@ -1054,8 +1079,13 @@
            <MkDatePicker config={col} lineId={record.$$uuid} defaultValue={_value || null} autoFocus={false} onChange={this.onColChange}/>
          )
        } else if (col.editType === 'popSelect') {
          let showValue = ''
          if (col.showField) {
            showValue = record[col.showField] || ''
          }
          children = (
            <MKPopSelect config={col} lineId={record.$$uuid} defaultValue={_value} BID={record.$$BID} autoFocus={false} onChange={this.onColChange}/>
            <MKPopSelect config={col} lineId={record.$$uuid} defaultValue={_value} showValue={showValue} BID={record.$$BID} autoFocus={false} onChange={this.onColChange}/>
          )
        } else {
          children = (
@@ -1071,10 +1101,14 @@
        if (col.editType === 'select' && col.options.length > 0) {
          content = col.map.get(content) || content
        } else if (col.editType === 'switch') {
          if (content === config.openVal) {
            content = config.openText
          } else if (content === config.closeVal) {
            content = config.closeText
          if (content === col.openVal) {
            content = col.openText
          } else if (content === col.closeVal) {
            content = col.closeText
          }
        } else if (col.editType === 'popSelect') {
          if (col.showField) {
            content = record[col.showField] || content
          }
        }
@@ -1085,6 +1119,10 @@
            content = `${content.substr(0, 4)}-${content.substr(5, 2)}-${content.substr(8, 2)} ${content.substr(11, 2)}:${content.substr(14, 2)}:${content.substr(17, 2)}`
          } else if (col.textFormat === 'encryption') {
            content = <span>{col.prefix || ''}<Encrypts value={content} />{col.postfix || ''}</span>
          }
          if (col.noValue === 'hide' && content < '1949-10-02') {
            content = ''
          }
          if (col.textFormat !== 'encryption') {
@@ -1162,6 +1200,7 @@
          }
    
          if (col.format === 'thdSeparator') {
            content = content + ''
            content = content.replace(/\d{1,3}(?=(\d{3})+(\.\d*)?$)/g, '$&,')
          }
    
@@ -1258,7 +1297,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>
      }
@@ -1294,7 +1338,7 @@
      }
      children = (
        <CardCellComponent data={record} cards={config} elements={col.elements}/>
        <CardCellComponent data={record} cards={col.config} elements={col.elements}/>
      )
    }
@@ -1339,7 +1383,8 @@
    allColumns: null,
    checkForms: [],
    allForms: [],
    reseting: false
    reseting: false,
    dict: window.GLOB.dict
  }
  timer = null
@@ -1355,7 +1400,6 @@
    let deForms = []
    let _forms = {}
    let hasBid = false
    let index = 0
    let checkForms = []
    let allForms = []
@@ -1368,25 +1412,12 @@
          cell.children = getColumns(item.subcols, sk || item.uuid)
        } else {
          if (item.editable === 'true') {
            item.$sort = index
            index++
            _forms[item.field] = item
            allForms.push({uuid: sk || item.uuid, field: item.field})
            checkForms.push(item.field)
            if (item.ctrlField) {
              item.ctrlValue = item.ctrlValue.split(',')
            }
            if (item.type === 'number' && item.clearField) {
              fields.forEach(cell => {
                if (cell.field === item.clearField) {
                  item.clearName = cell.label
                }
              })
            } else if (item.type === 'text' && item.editType === 'select') {
              item.map = new Map()
            if (item.type === 'text' && item.editType === 'select') {
              if (item.resourceType === '1') {
                let _option = Utils.getSelectQueryOptions(item)
  
@@ -1398,20 +1429,6 @@
                item.arr_field = _option.field
        
                deForms.push(item)
              } else {
                item.options.forEach(cell => {
                  item.map.set(cell.value, cell.label)
                })
              }
            } else if (item.type === 'text' && item.editType === 'date') {
              item.format = 'YYYY-MM-DD'
              if (item.precision === 'hour') {
                item.format = 'YYYY-MM-DD HH'
              } else if (item.precision === 'minute') {
                item.format = 'YYYY-MM-DD HH:mm'
              } else if (item.precision === 'second') {
                item.format = 'YYYY-MM-DD HH:mm:ss'
              }
            }
          }
@@ -1431,8 +1448,7 @@
            $key: item.uuid,
            onCell: record => ({
              record,
              col: item,
              config: item.type === 'custom' ? {setting, columns: fields} : null,
              col: item
            })
          }
        }
@@ -1471,6 +1487,10 @@
      pageOptions = pageOptions.sort((a, b) => a - b)
    }
    if (setting.maxPageSize) {
      pageOptions = pageOptions.filter(item => item <= setting.maxPageSize)
    }
    let allColumns = null
    if (colsCtrls) {
      allColumns = [..._columns]
@@ -1505,11 +1525,44 @@
  }
  UNSAFE_componentWillReceiveProps(nextProps) {
    const { BID } = this.props
    const { BID, parCtrl } = this.props
    const { deForms } = this.state
    if (deForms && nextProps.BID !== BID) {
      this.improveActionForm(deForms, nextProps.BID)
    }
    if (parCtrl && !is(fromJS(this.props.columns), fromJS(nextProps.columns))) {
      let getColumns = (cols, sk) => {
        return cols.map(item => {
          let cell = null
          if (item.type === 'colspan') {
            cell = { title: item.label, align: item.Align, $key: item.uuid }
            cell.children = getColumns(item.subcols, sk || item.uuid)
          } else {
            cell = {
              align: item.Align,
              dataIndex: item.uuid,
              title: item.editable === 'true' ? <span>{item.label}<EditOutlined className="system-color mk-edit-sign"/></span> : item.label,
              sorter: (item.field || item.sortField) && item.IsSort === 'true',
              width: item.Width || 120,
              $key: item.uuid,
              onCell: record => ({
                record,
                col: item
              })
            }
          }
          return cell
        })
      }
      let _columns = getColumns(nextProps.columns)
      this.setState({
        columns: _columns
      })
    }
  }
@@ -1550,7 +1603,11 @@
    MKEmitter.removeListener('changeRecord' + tableId, this.changeRecord)
  }
  colBlur = (lineId) => {
  colBlur = (lineId, colId, defer) => {
    if (defer && this.focusId === lineId && this.colId !== colId) {
      return
    }
    this.blurId = lineId
    this.focusId = ''
@@ -1569,7 +1626,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]
@@ -1612,7 +1669,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'
        }
@@ -1620,26 +1677,28 @@
      } else if (col.type === 'number') {
        let val = record[col.field]
        if (col.noValue === 'hide' && !val) {
        if (col.required === 'true' && !val) {
          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}`
          }
        }
@@ -1672,6 +1731,9 @@
        result = originVal === contrastVal
      } else if (item.match === '!=') {
        result = originVal !== contrastVal
      } else if (item.match === 'regexp') {
        let reg = new RegExp(item.contrastValue, 'ig')
        result = reg.test(originVal)
      } else {
        originVal = isNaN(originVal) ? originVal : +originVal
        contrastVal = isNaN(contrastVal) ? contrastVal : +contrastVal
@@ -1709,7 +1771,10 @@
  transferData = (data, type) => {
    const { edData, tableId } = this.state
    if (type === 'delete') {
    if (type === 'clear') {
      this.setState({edData: [], midData: []})
      return
    } else if (type === 'delete') {
    } else if (type === 'line') {
      let value = ''
@@ -1860,9 +1925,13 @@
    }
    if (param.LText) {
      param.LText = Utils.formatOptions(param.LText)
      if (window.GLOB.execType === 'x') {
        param.exec_type = 'x'
      }
      param.LText = Utils.formatOptions(param.LText, param.exec_type)
      param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
      param.secretkey = Utils.encrypt(param.LText, param.timestamp)
      param.secretkey = Utils.encrypt(window.GLOB.execType === 'x' ? '' : param.LText, param.timestamp)
      deffers.push(
        new Promise(resolve => {
@@ -1891,9 +1960,13 @@
    }
    if (mainparam.LText) {
      mainparam.LText = Utils.formatOptions(mainparam.LText)
      if (window.GLOB.execType === 'x') {
        mainparam.exec_type = 'x'
      }
      mainparam.LText = Utils.formatOptions(mainparam.LText, mainparam.exec_type)
      mainparam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
      mainparam.secretkey = Utils.encrypt(mainparam.LText, mainparam.timestamp)
      mainparam.secretkey = Utils.encrypt(window.GLOB.execType === 'x' ? '' : mainparam.LText, mainparam.timestamp)
      if (window.GLOB.mainSystemApi) {
        mainparam.rduri = window.GLOB.mainSystemApi
@@ -2017,7 +2090,7 @@
      setTimeout(() => {
        this.plusLine(colId)
      }, 10)
    } else if (edData[index] && setting.commit !== 'change') {
    } else if (edData[index] && (setting.commit === 'all' || setting.commit === 'amend')) {
      setTimeout(() => {
        this.submit()
      }, 10)
@@ -2158,7 +2231,7 @@
  checkData = () => {
    const { setting } = this.props
    const { edData, forms, checkForms } = this.state
    const { edData, forms, checkForms, selectedRowKeys, dict } = this.state
    let data = fromJS(edData).toJS()
@@ -2166,12 +2239,23 @@
    if (setting.commit === 'amend') {
      data = data.filter(item => !item.$origin)
    } else if (setting.commit === 'check') {
      data = data.filter(item => selectedRowKeys.includes(item.$$uuid))
      if (data.length === 0) {
        notification.warning({
          top: 92,
          message: dict['select_row'] || '请选择需要提交的数据!',
          duration: 5
        })
        return null
      }
    }
    if (data.length === 0) {
      notification.warning({
        top: 92,
        message: '数据未修改,不可提交!',
        message: dict['un_modified'] || '数据未修改,不可提交!',
        duration: 5
      })
      return null
@@ -2205,37 +2289,39 @@
        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'
          }
          item[col.field] = val
        } else if (col.type === 'number') {
          let val = item[col.field]
          if (col.noValue === 'hide' && !val) {
          if (col.required === 'true' && !val) {
            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}`)
            }
          }
@@ -2244,7 +2330,7 @@
      })
      if (line.length > 0) {
        err += `第${Index}行:` + line.join(',') + ';'
        err += (dict['line'] ? `${dict['line']} ${Index}:` : `第${Index}行:`) + line.join(',') + ';'
      }
      if (!item.$deleted) {
        Index++
@@ -2268,14 +2354,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: dict['sup_key_req'] || '需要上级主键值!',
        duration: 5
      })
@@ -2307,8 +2393,8 @@
      
      delete param.excel_in
      param.exec_type = 'y'
      param.LText = Utils.formatOptions(result.sql)
      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')
      param.secretkey = Utils.encrypt('', param.timestamp)
@@ -2353,17 +2439,18 @@
  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') { // 完成后不提示
@@ -2409,26 +2496,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({
@@ -2542,7 +2631,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
@@ -2573,13 +2662,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 = {
@@ -2592,9 +2687,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 || ''} ${height ? 'fixed-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'}`} style={style}>
          <Table
            rowKey="$$uuid"
            components={components}
@@ -2616,7 +2711,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"
@@ -2625,13 +2720,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>
      </>
    )