king
2023-10-19 072227ec43346c50c93cda3bf21c346f463eb551
2023-10-19
8个文件已修改
84 ■■■■ 已修改文件
src/menu/components/table/base-table/columns/editColumn/formconfig.jsx 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/table/base-table/columns/editColumn/index.jsx 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/table/edit-table/columns/editColumn/formconfig.jsx 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/table/edit-table/columns/editColumn/index.jsx 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/table/normal-table/columns/editColumn/formconfig.jsx 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/table/normal-table/columns/editColumn/index.jsx 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/share/normalTable/index.jsx 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/table/edit-table/normalTable/index.jsx 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/table/base-table/columns/editColumn/formconfig.jsx
@@ -151,7 +151,7 @@
      type: 'radio',
      key: 'IsSort',
      label: '排序',
      initVal: card.IsSort || (card.isSub ? 'false' : 'true'),
      initVal: card.IsSort || (card.isSub || card.type === 'custom' ? 'false' : 'true'),
      required: true,
      options: [{
        value: 'true',
@@ -162,6 +162,14 @@
      }]
    },
    {
      type: 'select',
      key: 'sortField',
      label: '排序字段',
      initVal: card.sortField || '',
      required: true,
      options: fields
    },
    {
      type: 'radio',
      key: 'eval',
      label: '解析方式',
src/menu/components/table/base-table/columns/editColumn/index.jsx
@@ -16,7 +16,7 @@
  picture: ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'fieldlength', 'blacklist', 'scale', 'lenWidRadio', 'backgroundSize', 'span'],
  video: ['label', 'field', 'type', 'Align', 'Hide', 'startTime', 'Width', 'fieldlength', 'blacklist', 'aspectRatio'],
  colspan: ['label', 'type', 'Align', 'Hide', 'blacklist'],
  custom: ['label', 'type', 'Align', 'Width', 'blacklist'],
  custom: ['label', 'type', 'Align', 'Width', 'blacklist', 'IsSort'],
  action: ['label', 'type', 'Align', 'Width'],
  formula: ['label', 'type', 'Align', 'Hide', 'Width', 'prefix', 'postfix', 'eval', 'formula', 'blacklist'],
  index: ['label', 'type', 'Align', 'Width']
@@ -95,10 +95,10 @@
      } else if (this.record.perspective === 'linkurl') {
        _options.push('linkurl', 'linkfields', 'open')
      }
    }
    if (this.record.type === 'formula' && this.record.eval === 'true') {
    } else if (this.record.type === 'formula' && this.record.eval === 'true') {
      _options.push('decimal')
    } else if (this.record.type === 'custom' && this.record.IsSort === 'true') {
      _options.push('sortField')
    }
    return _options
@@ -109,6 +109,10 @@
    this.record[key] = value
    if (key === 'type') {
      if (['link', 'textarea', 'picture', 'custom'].includes(value)) {
        this.record.IsSort = 'false'
      }
      let _options = this.getOptions()
      this.setState({
@@ -126,7 +130,7 @@
          return item
        })
      }, () => {
        if (value === 'link' || value === 'textarea' || value === 'picture') {
        if (['link', 'textarea', 'picture', 'custom'].includes(value)) {
          this.props.form.setFieldsValue({IsSort: 'false'})
        } else if (value === 'text' || value === 'number') {
          this.props.form.setFieldsValue({perspective: ''})
@@ -173,7 +177,7 @@
      }
    } else if (key === 'format' && value === 'percent') {
      this.props.form.setFieldsValue({postfix: '%'})
    } else if (['perspective', 'eval'].includes(key)) {
    } else if (['perspective', 'eval', 'IsSort'].includes(key)) {
      let _options = this.getOptions()
      this.setState({
src/menu/components/table/edit-table/columns/editColumn/formconfig.jsx
@@ -133,7 +133,7 @@
      type: 'radio',
      key: 'IsSort',
      label: '排序',
      initVal: card.IsSort || (card.isSub ? 'false' : 'true'),
      initVal: card.IsSort || (card.isSub || card.type === 'custom' ? 'false' : 'true'),
      required: true,
      options: [{
        value: 'true',
@@ -144,6 +144,14 @@
      }]
    },
    {
      type: 'select',
      key: 'sortField',
      label: '排序字段',
      initVal: card.sortField || '',
      required: true,
      options: fields
    },
    {
      type: 'radio',
      key: 'eval',
      label: '解析方式',
src/menu/components/table/edit-table/columns/editColumn/index.jsx
@@ -18,7 +18,7 @@
  text: ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'prefix', 'postfix', 'textFormat', 'editable', 'initval', 'blacklist'],
  number: ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'decimal', 'format', 'prefix', 'postfix', 'editable', 'initval', 'sum', 'blacklist'],
  textarea: ['label', 'field', 'type', 'Align', 'Hide', 'Width', 'prefix', 'initval', 'postfix', 'blacklist'],
  custom: ['label', 'type', 'Align', 'Width', 'blacklist'],
  custom: ['label', 'type', 'Align', 'Width', 'blacklist', 'IsSort'],
  colspan: ['label', 'type', 'Align', 'Hide', 'blacklist'],
  action: ['label', 'type', 'Align', 'Width'],
  formula: ['label', 'type', 'Align', 'Hide', 'Width', 'prefix', 'postfix', 'eval', 'formula', 'blacklist'],
@@ -90,6 +90,8 @@
    }
    if (this.record.type === 'formula' && this.record.eval === 'true') {
      _options.push('decimal')
    } else if (this.record.type === 'custom' && this.record.IsSort === 'true') {
      _options.push('sortField')
    }
    if (['number', 'formula'].includes(this.record.type) && this.record.Hide !== 'true') {
      _options.push('noValue')
@@ -142,6 +144,10 @@
    this.record[key] = value
    if (key === 'type') {
      if (['textarea', 'custom'].includes(value)) {
        this.record.IsSort = 'false'
      }
      let _options = this.getOptions()
      let _field = ''
@@ -161,7 +167,9 @@
          return item
        })
      }, () => {
        if (value === 'colspan') {
        if (['textarea', 'custom'].includes(value)) {
          this.props.form.setFieldsValue({IsSort: 'false'})
        } else if (value === 'colspan') {
          this.props.form.setFieldsValue({Align: 'center'})
        } else if (value === 'formula' && _field) {
          this.props.form.setFieldsValue({formula: '@' + _field + '@'})
@@ -203,7 +211,7 @@
      }
    } else if (key === 'format' && value === 'percent') {
      this.props.form.setFieldsValue({postfix: '%'})
    } else if (['editable', 'editType', 'resourceType', 'ctrlField', 'eval', 'Hide'].includes(key)) {
    } else if (['editable', 'editType', 'resourceType', 'ctrlField', 'eval', 'Hide', 'IsSort'].includes(key)) {
      let _options = this.getOptions()
      this.setState({
src/menu/components/table/normal-table/columns/editColumn/formconfig.jsx
@@ -143,7 +143,7 @@
      type: 'radio',
      key: 'IsSort',
      label: '排序',
      initVal: card.IsSort || (card.isSub ? 'false' : 'true'),
      initVal: card.IsSort || (card.isSub || card.type === 'custom' ? 'false' : 'true'),
      required: true,
      options: [{
        value: 'true',
@@ -154,6 +154,14 @@
      }]
    },
    {
      type: 'select',
      key: 'sortField',
      label: '排序字段',
      initVal: card.sortField || '',
      required: true,
      options: fields
    },
    {
      type: 'radio',
      key: 'eval',
      label: '解析方式',
src/menu/components/table/normal-table/columns/editColumn/index.jsx
@@ -17,7 +17,7 @@
  picture: ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'blacklist', 'scale', 'lenWidRadio', 'backgroundSize', 'span'],
  video: ['label', 'field', 'type', 'Align', 'Hide', 'startTime', 'Width', 'blacklist', 'aspectRatio'],
  colspan: ['label', 'type', 'Align', 'Hide', 'blacklist'],
  custom: ['label', 'type', 'Align', 'Width', 'blacklist'],
  custom: ['label', 'type', 'Align', 'Width', 'blacklist', 'IsSort'],
  action: ['label', 'type', 'Align', 'Width'],
  formula: ['label', 'type', 'Align', 'Hide', 'Width', 'prefix', 'postfix', 'eval', 'formula', 'blacklist'],
  index: ['label', 'type', 'Align', 'Width']
@@ -93,10 +93,10 @@
      } else if (this.record.perspective === 'linkurl') {
        _options.push('linkurl', 'linkfields', 'open')
      }
    }
    if (this.record.type === 'formula' && this.record.eval === 'true') {
    } else if (this.record.type === 'formula' && this.record.eval === 'true') {
      _options.push('decimal')
    } else if (this.record.type === 'custom' && this.record.IsSort === 'true') {
      _options.push('sortField')
    }
    return _options
@@ -106,6 +106,10 @@
    this.record[key] = value
    if (key === 'type') {
      if (['link', 'textarea', 'picture', 'custom'].includes(value)) {
        this.record.IsSort = 'false'
      }
      let _options = this.getOptions()
      let _field = ''
@@ -125,7 +129,7 @@
          return item
        })
      }, () => {
        if (value === 'link' || value === 'textarea' || value === 'picture') {
        if (['link', 'textarea', 'picture', 'custom'].includes(value)) {
          this.props.form.setFieldsValue({IsSort: 'false'})
        } else if (value === 'text' || value === 'number') {
          this.props.form.setFieldsValue({perspective: ''})
@@ -174,7 +178,7 @@
      }
    } else if (key === 'format' && value === 'percent') {
      this.props.form.setFieldsValue({postfix: '%'})
    } else if (['perspective', 'eval'].includes(key)) {
    } else if (['perspective', 'eval', 'IsSort'].includes(key)) {
      let _options = this.getOptions()
      this.setState({
src/tabviews/custom/components/share/normalTable/index.jsx
@@ -502,13 +502,15 @@
  
            if (item.field) {
              orderfields[item.uuid] = item.field
            } else if (item.sortField) {
              orderfields[item.uuid] = item.sortField
            }
  
            cell = {
              align: item.Align,
              dataIndex: item.uuid,
              title: item.label,
              sorter: item.field && item.IsSort === 'true',
              sorter: (item.field || item.sortField) && item.IsSort === 'true',
              width: item.Width || 120,
              onCell: record => ({
                record,
src/tabviews/custom/components/table/edit-table/normalTable/index.jsx
@@ -1200,13 +1200,15 @@
    
          if (item.field) {
            orderfields[item.uuid] = item.field
          } else if (item.sortField) {
            orderfields[item.uuid] = item.sortField
          }
          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.IsSort === 'true'),
            sorter: (item.field || item.sortField) && item.IsSort === 'true',
            width: item.Width || 120,
            $type: item.type,
            onCell: record => ({