king
2024-11-22 5e5a8bafcbc346cb6246aab4e63750e5454eb270
src/menu/components/table/edit-table/columns/editColumn/formconfig.jsx
@@ -37,6 +37,9 @@
    value: 'colspan',
    text: '合并列'
  }, {
    value: 'extend',
    text: '扩展列'
  }, {
    value: 'index',
    text: '序号'
  }]
@@ -155,7 +158,7 @@
      type: 'radio',
      key: 'IsSort',
      label: '排序',
      initVal: card.IsSort || (card.isSub || card.type === 'custom' ? 'false' : 'true'),
      initVal: card.IsSort || 'false',
      required: true,
      options: [{
        value: 'true',
@@ -206,6 +209,95 @@
      }, {
        value: 'right',
        text: '右对齐'
      }]
    },
    {
      type: 'radio',
      key: 'colUnit',
      label: '单位',
      initVal: card.colUnit || 'day',
      required: true,
      options: [{
        value: 'day',
        text: '天'
      }, {
        value: 'hour',
        text: '小时'
      }]
    },
    {
      type: 'number',
      key: 'shift',
      label: '偏移量',
      initVal: card.shift || 0,
      min: -1000,
      max: 1000,
      decimal: 0,
      required: true
    },
    {
      type: 'number',
      key: 'quota',
      label: '指标数',
      initVal: card.quota || 7,
      min: 1,
      max: 1000,
      decimal: 0,
      required: true
    },
    {
      type: 'select',
      key: 'dayFormat',
      label: '格式化',
      initVal: card.dayFormat || 'M/DD',
      required: true,
      options: [{
        value: 'M/DD',
        label: 'M/DD(4/29)'
      }, {
        value: 'M-DD',
        label: 'M-DD(4-29)'
      }, {
        value: 'M月DD日',
        label: 'M月DD日(4月29日)'
      }, {
        value: 'M/DD week',
        label: 'M/DD week(4/29 星期一)'
      }, {
        value: 'M-DD week',
        label: 'M-DD week(4-29 星期一)'
      }, {
        value: 'M月DD日 week',
        label: 'M月DD日 week(4月29日 星期一)'
      }]
    },
    {
      type: 'select',
      key: 'hourFormat',
      label: '格式化',
      initVal: card.hourFormat || 'H:00',
      required: true,
      options: [{
        value: 'H:00',
        label: 'H:00(15:00)'
      }, {
        value: 'H point',
        label: 'H(15点)'
      }, {
        value: 'h:00',
        label: 'h:00(3:00 pm)'
      }]
    },
    {
      type: 'text',
      key: 'supField',
      label: '上级字段',
      initVal: card.supField || '',
      tooltip: '来源于上级组件的字段集(上级组件为空时从url参数中选取),该字段值(用逗号分隔)可控制扩展列的列名。',
      required: false,
      rules: [{
        pattern: /^[0-9a-zA-Z_]*$/ig,
        message: '字段名只允许包含数字、字母以及_'
      }]
    },
    {
@@ -279,6 +371,20 @@
      }]
    },
    {
      type: 'radio',
      key: 'required',
      label: '必填',
      initVal: card.required || 'false',
      required: false,
      options: [{
        value: 'false',
        text: '否'
      }, {
        value: 'true',
        text: '是'
      }]
    },
    {
      type: 'text',
      key: 'initval',
      label: '默认值',
@@ -340,7 +446,7 @@
      key: 'dataSource',
      label: '数据源',
      initVal: card.dataSource || '',
      placeholder: '系统变量:mk_departmentcode、mk_organization、mk_user_type。公共值@BID@。',
      placeholder: '系统变量:mk_departmentcode、mk_organization、mk_user_type。公共值:@BID@、@Appkey@、@UserID@、@SessionUid@、@LoginUID@、@lang@。',
      required: true,
    },
    {
@@ -456,6 +562,7 @@
      tooltip: '用于控制行数据是否可选择。字段值为true时,选项不可选。',
      required: false,
      allowClear: true,
      joint: true,
      options: 'columns'
    },
    {
@@ -566,6 +673,21 @@
    },
    {
      type: 'radio',
      key: 'showValue',
      label: '显示值',
      initVal: card.showValue || 'label',
      tooltip: '单元格不可编辑时显示的信息。',
      required: false,
      options: [{
        value: 'value',
        text: '值·字段'
      }, {
        value: 'label',
        text: '文本·字段'
      }]
    },
    {
      type: 'radio',
      key: 'dropdown',
      label: '下拉宽度',
      initVal: card.dropdown || 'flex',
@@ -580,20 +702,6 @@
    },
    {
      type: 'radio',
      key: 'required',
      label: '必填',
      initVal: card.required || 'false',
      required: false,
      options: [{
        value: 'false',
        text: '否'
      }, {
        value: 'true',
        text: '是'
      }]
    },
    {
      type: 'radio',
      key: 'database',
      label: '数据库',
      initVal: card.database || 'local',
@@ -602,7 +710,7 @@
        text: '本地'
      }, {
        value: 'sso',
        text: '系统'
        text: '单点'
      }]
    },
    {
@@ -739,11 +847,26 @@
      options: fields
    },
    {
      type: 'checkbox',
      key: 'evalchars',
      label: '替换字符',
      initVal: card.evalchars || ['enter', 'space'],
      tooltip: '公式解析后,可替换回车、空格等字符,实现换行、字间距控制等页面效果。',
      required: false,
      options: [{
        value: 'enter',
        text: '回车符'
      }, {
        value: 'space',
        text: '空格'
      }]
    },
    {
      type: 'radio',
      key: 'noValue',
      label: '空值',
      initVal: card.noValue || 'show',
      tooltip: '当值为0时是否显示',
      tooltip: '数值为 0 或时间小于 1949-10-02 时,是否显示',
      required: false,
      options: [{
        value: 'show',