king
2023-05-09 7b0dbecd1d6155d26ec67be0a47a16264c738c85
src/menu/components/table/edit-table/columns/editColumn/formconfig.jsx
@@ -14,7 +14,8 @@
    roleList = []
  }
  if (['picture', 'link', 'colspan'].includes(card.type)) {
  // if (['picture', 'link', 'colspan'].includes(card.type)) {
  if (['picture', 'link'].includes(card.type)) {
    card.type = 'text'
  }
@@ -31,8 +32,11 @@
    value: 'custom',
    text: '自定义列'
  }, {
    value: 'action',
    text: '操作'
    value: 'colspan',
    text: '合并列'
  // }, {
  //   value: 'action',
  //   text: '操作'
  }, {
    value: 'formula',
    text: '公式'
@@ -40,6 +44,13 @@
    value: 'index',
    text: '序号'
  }]
  if (!card.isSub) {
    options.push({
      value: 'action',
      text: '操作'
    })
  }
  let editCols = [
    {
@@ -60,6 +71,15 @@
      editCols.push({
        field: col.uuid,
        label: col.label
      })
    } else if (col.type === 'colspan') {
      col.subcols.forEach(subcol => {
        if (subcol.editable === 'true' && subcol.uuid !== card.uuid) {
          editCols.push({
            field: subcol.uuid,
            label: col.label + '-' + subcol.label
          })
        }
      })
    }
  })
@@ -116,7 +136,7 @@
      type: 'radio',
      key: 'IsSort',
      label: '排序',
      initVal: card.IsSort || 'false',
      initVal: card.IsSort || (card.isSub ? 'false' : 'true'),
      required: true,
      options: [{
        value: 'true',
@@ -143,21 +163,21 @@
        text: '右对齐'
      }]
    },
    {
      type: 'radio',
      key: 'sum',
      label: '显示合计',
      initVal: card.sum || 'false',
      tooltip: '合计信息只在使用系统数据源时有效。',
      required: false,
      options: [{
        value: 'true',
        text: '是'
      }, {
        value: 'false',
        text: '否'
      }]
    },
    // {
    //   type: 'radio',
    //   key: 'sum',
    //   label: '显示合计',
    //   initVal: card.sum || 'false',
    //   tooltip: '合计信息只在使用系统数据源时有效。',
    //   required: false,
    //   options: [{
    //     value: 'true',
    //     text: '是'
    //   }, {
    //     value: 'false',
    //     text: '否'
    //   }]
    // },
    {
      type: 'radio',
      key: 'editable',
@@ -354,6 +374,24 @@
      tooltip: '包括文本或数值回车事件、下拉菜单选中事件、开关切换事件。',
      options: editCols
    },
    {
      type: 'select',
      key: 'ctrlField',
      label: '禁用字段',
      initVal: card.ctrlField || '',
      tooltip: '控制单元格是否可以编辑。',
      allowClear: true,
      required: false,
      options: fields
    },
    {
      type: 'text',
      key: 'ctrlValue',
      label: '禁用值',
      initVal: card.ctrlValue || '',
      tooltip: '多个值用逗号分隔。',
      required: false
    },
    // {
    //   type: 'radio',
    //   key: 'footEnter',
@@ -455,7 +493,7 @@
      type: 'radio',
      key: 'eval',
      label: '解析',
      initVal: card.eval || 'true',
      initVal: card.eval || 'false',
      tooltip: '当公式内容涉及计算时请选择“是”,当公式内容为字段拼接时请选择“否”。',
      required: false,
      options: [
@@ -481,6 +519,21 @@
      options: fields
    },
    {
      type: 'radio',
      key: 'noValue',
      label: '空值',
      initVal: card.noValue || 'show',
      tooltip: '当值为0时是否显示',
      required: false,
      options: [{
        value: 'show',
        text: '显示'
      }, {
        value: 'hide',
        text: '隐藏'
      }]
    },
    {
      type: 'multiselect',
      key: 'blacklist',
      label: '黑名单',