king
2021-01-20 0227c25e4ed573d3095ada3f9c9a4ba5f18b0de5
src/menu/components/table/normal-table/columns/editColumn/index.jsx
@@ -9,7 +9,7 @@
const columnTypeOptions = {
  text: ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'prefix', 'postfix', 'textFormat', 'blacklist', 'perspective', 'rowspan'],
  number: ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'decimal', 'format', 'prefix', 'postfix', 'blacklist', 'perspective', 'sum'],
  number: ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'decimal', 'format', 'prefix', 'postfix', 'blacklist', 'perspective', 'sum', 'rowspan'],
  link: ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'joint', 'Width', 'blacklist', 'nameField'],
  textarea: ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'prefix', 'postfix', 'blacklist'],
  picture: ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'blacklist', 'scale', 'lenWidRadio', 'picSort'],
@@ -107,6 +107,13 @@
      })
    } else if (key === 'field') {
      this.props.form.setFieldsValue({label: option.props.children})
      if (this.state.type === 'number') {
        let decimal = 0
        if (/Decimal/ig.test(option.props.datatype)) {
          decimal = +option.props.datatype.replace(/Decimal\(18,/ig, '').replace(')', '')
        }
        this.props.form.setFieldsValue({decimal})
      }
    } else if (key === 'format' && value === 'percent') {
      this.props.form.setFieldsValue({postfix: '%'})
    }
@@ -140,7 +147,7 @@
    if (!formlist) return null
    formlist.forEach((item, index) => {
      if (item.hidden) return
      if (item.hidden || item.forbidden) return
      if (item.type === 'text') { // 文本搜索
        let rules = []
@@ -213,7 +220,7 @@
                  getPopupContainer={() => document.getElementById('columnwinter')}
                >
                  {item.options.map((option, index) =>
                    <Select.Option key={`${option.value || option.field}${index}`} value={option.value || option.field}>
                    <Select.Option key={`${option.value || option.field}${index}`} datatype={option.datatype || ''} value={option.value || option.field}>
                      {option.text || option.label}
                    </Select.Option>
                  )}