king
2022-10-17 e8edfdadb561cd83bf6e1c3e00d55b8cc2aee6d5
src/menu/components/table/base-table/columns/editColumn/formconfig.jsx
@@ -1,8 +1,3 @@
import zhCN from '@/locales/zh-CN/model.js'
import enUS from '@/locales/en-US/model.js'
const Formdict = sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS
/**
 * @description 获取显示列表单配置信息
 * @param {object} card       // 搜索条件对象
@@ -40,19 +35,19 @@
  let options = [{
    value: 'text',
    text: Formdict['model.form.text']
    text: '文本'
  }, {
    value: 'number',
    text: Formdict['model.form.number']
    text: '数字'
  }, {
    value: 'picture',
    text: Formdict['model.form.picture']
    text: '图片'
  }, {
    value: 'link',
    text: Formdict['model.form.href']
    text: '链接'
  }, {
    value: 'textarea',
    text: Formdict['model.form.textarea']
    text: '多行文本'
  }, {
    value: 'custom',
    text: '自定义列'
@@ -89,7 +84,7 @@
    {
      type: 'select',
      key: 'type',
      label: Formdict['model.form.type'],
      label: '类型',
      initVal: card.type,
      required: true,
      options: options
@@ -97,7 +92,7 @@
    {
      type: 'select',
      key: 'field',
      label: Formdict['model.form.field'],
      label: '字段',
      initVal: card.field,
      required: true,
      options: fields
@@ -105,7 +100,7 @@
    {
      type: 'select',
      key: 'nameField',
      label: Formdict['model.name'] + Formdict['model.form.field'],
      label: '名称字段',
      initVal: card.nameField || '',
      required: false,
      options: [{uuid: 'empty', field: '', label: '空'}, ...fields]
@@ -116,67 +111,67 @@
      min: 20,
      max: 1000,
      decimal: 0,
      label: Formdict['model.form.columnWidth'],
      label: '列宽',
      initVal: card.Width || 120,
      required: true
    },
    {
      type: 'radio',
      key: 'joint',
      label: Formdict['model.form.paramJoint'],
      label: '拼接参数',
      initVal: card.joint || 'true',
      required: true,
      options: [{
        value: 'true',
        text: Formdict['model.true']
        text: '是'
      }, {
        value: 'false',
        text: Formdict['model.false']
        text: '否'
      }]
    },
    {
      type: 'radio',
      key: 'Hide',
      label: Formdict['model.hidden'],
      label: '隐藏',
      initVal: card.Hide || 'false',
      required: true,
      options: [{
        value: 'true',
        text: Formdict['model.true']
        text: '是'
      }, {
        value: 'false',
        text: Formdict['model.false']
        text: '否'
      }]
    },
    {
      type: 'radio',
      key: 'IsSort',
      label: Formdict['model.sort'],
      label: '排序',
      initVal: card.IsSort || (card.isSub ? 'false' : 'true'),
      required: true,
      options: [{
        value: 'true',
        text: Formdict['model.true']
        text: '是'
      }, {
        value: 'false',
        text: Formdict['model.false']
        text: '否'
      }]
    },
    {
      type: 'radio',
      key: 'Align',
      label: Formdict['model.form.align'],
      label: '对齐方式',
      initVal: card.Align || 'left',
      required: true,
      options: [{
        value: 'left',
        text: Formdict['model.form.alignLeft']
        text: '左对齐'
      }, {
        value: 'center',
        text: Formdict['model.form.alignCenter']
        text: '居中'
      }, {
        value: 'right',
        text: Formdict['model.form.alignRight']
        text: '右对齐'
      }]
    },
    {
@@ -188,10 +183,10 @@
      required: false,
      options: [{
        value: 'true',
        text: Formdict['model.true']
        text: '是'
      }, {
        value: 'false',
        text: Formdict['model.false']
        text: '否'
      }]
    },
    {
@@ -203,10 +198,10 @@
      required: false,
      options: [{
        value: 'true',
        text: Formdict['model.true']
        text: '是'
      }, {
        value: 'false',
        text: Formdict['model.false']
        text: '否'
      }]
    },
    {
@@ -215,14 +210,14 @@
      min: 0,
      max: 18,
      decimal: 0,
      label: Formdict['header.form.decimal'],
      label: '小数位',
      initVal: card.decimal || 0,
      required: true
    },
    {
      type: 'select',
      key: 'format',
      label: Formdict['header.form.format'],
      label: '格式化',
      initVal: card.format || 'none',
      options: [{
        value: 'none',
@@ -242,7 +237,7 @@
    {
      type: 'select',
      key: 'textFormat',
      label: Formdict['header.form.format'],
      label: '格式化',
      initVal: card.textFormat || 'none',
      options: [{
        value: 'none',
@@ -262,7 +257,7 @@
    {
      type: 'text',
      key: 'prefix',
      label: Formdict['header.form.prefix'],
      label: '前缀',
      initVal: card.prefix || '',
      required: false,
      readonly: false
@@ -270,7 +265,7 @@
    {
      type: 'text',
      key: 'postfix',
      label: Formdict['header.form.postfix'],
      label: '后缀',
      initVal: card.postfix || '',
      required: false,
      readonly: false
@@ -319,10 +314,10 @@
      required: false,
      options: [{
        value: 'true',
        text: Formdict['model.true']
        text: '是'
      }, {
        value: 'false',
        text: Formdict['model.false']
        text: '否'
      }]
    },
    {
@@ -345,7 +340,7 @@
    {
      type: appType === 'pc' ? 'select' : 'cascader',
      key: 'linkmenu',
      label: Formdict['model.menu'],
      label: '菜单',
      initVal: card.linkmenu || (appType === 'pc' ? '' : []),
      required: true,
      options: menulist,
@@ -404,7 +399,7 @@
    {
      type: 'multiselect',
      key: 'blacklist',
      label: Formdict['header.form.blacklist'],
      label: '黑名单',
      initVal: card.blacklist || [],
      required: false,
      options: roleList,