king
2023-03-02 d1f19b794216b37417e114b71c1cd7a2ac3d7748
src/templates/zshare/formconfig.jsx
@@ -1,8 +1,4 @@
import zhCN from '@/locales/zh-CN/model.js'
import enUS from '@/locales/en-US/model.js'
import { formRule, btnClasses } from '@/utils/option.js'
const Formdict = sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS
/**
 * @description 获取树形页面设置表单配置信息
@@ -57,31 +53,32 @@
    {
      type: 'radio',
      key: 'interType',
      label: Formdict['header.form.intertype'],
      label: '接口类型',
      initVal: setting.interType || 'inner',
      required: false,
      readonly: false,
      options: [
        { value: 'inner', text: Formdict['model.interface.inner'] },
        { value: 'outer', text: Formdict['model.interface.outer'] }
        { value: 'inner', text: '内部' },
        { value: 'outer', text: '外部' }
      ]
    },
    {
      type: 'radio',
      key: 'sysInterface',
      label: Formdict['header.form.sysInterface'],
      label: '系统接口',
      initVal: setting.sysInterface || 'false',
      tooltip: '单点登录系统',
      required: false,
      readonly: false,
      options: [
        { value: 'true', text: Formdict['model.true'] },
        { value: 'false', text: Formdict['model.false'] }
        { value: 'true', text: '是' },
        { value: 'false', text: '否' }
      ]
    },
    {
      type: 'text',
      key: 'interface',
      label: Formdict['header.form.interface'],
      label: '接口地址',
      initVal: setting.sysInterface === 'true' ? (window.GLOB.mainSystemApi || '') : (setting.interface || ''),
      required: true,
      readonly: setting.sysInterface === 'true',
@@ -95,7 +92,7 @@
    {
      type: 'text',
      key: 'outerFunc',
      label: Formdict['header.form.outerFunc'],
      label: '外部函数',
      initVal: setting.outerFunc || '',
      required: false,
      readonly: false,
@@ -112,7 +109,7 @@
    {
      type: 'text',
      key: 'innerFunc',
      label: Formdict['header.form.innerFunc'],
      label: '内部函数',
      initVal: setting.innerFunc || '',
      tooltip: usefulFields.length ? '开头可用字符:' + usefulFields.join(', ') : '',
      placement: 'bottomLeft',
@@ -265,8 +262,8 @@
      required: false,
      readonly: false,
      options: [
        { value: 'true', text: Formdict['model.true'] },
        { value: 'false', text: Formdict['model.false'] }
        { value: 'true', text: '是' },
        { value: 'false', text: '否' }
      ]
    },
    {
@@ -277,8 +274,8 @@
      required: false,
      readonly: false,
      options: [
        { value: 'true', text: Formdict['model.true'] },
        { value: 'false', text: Formdict['model.false'] }
        { value: 'true', text: '是' },
        { value: 'false', text: '否' }
      ]
    }
  ]
@@ -324,10 +321,7 @@
      text: '日期(天)'
    }, {
      value: 'datemonth',
      text: Formdict['model.form.datemonth']
    // }, {
    //   value: 'daterange',
    //   text: Formdict['model.form.daterange']
      text: '日期(月)'
    }]
  } else {
@@ -390,14 +384,14 @@
    {
      type: 'text',
      key: 'label',
      label: Formdict['model.name'],
      label: '名称',
      initVal: card.label || '',
      required: true
    },
    {
      type: 'text',
      key: 'field',
      label: Formdict['model.form.field'],
      label: '字段',
      initVal: card.field || '',
      required: true,
      options: columns
@@ -405,7 +399,7 @@
    {
      type: 'select',
      key: 'type',
      label: Formdict['model.form.type'],
      label: '类型',
      initVal: card.type,
      required: true,
      options: typeOptions
@@ -420,7 +414,7 @@
    {
      type: 'text',
      key: 'initval',
      label: Formdict['header.form.initval'],
      label: '初始值',
      tooltip: '类型为下拉菜单时,初始值应为数据的Value值(使用数据源时,应为《值·字段》的值);类型为数值(区间)时,初始值使用逗号拼接,例如 3,10',
      initVal: card.initval,
      required: false
@@ -433,10 +427,10 @@
      required: true,
      options: [{
        value: '0',
        text: Formdict['header.form.custom']
        text: '自定义'
      }, {
        value: '1',
        text: Formdict['header.form.datasource']
        text: '数据源'
      }]
    },
    // {
@@ -446,10 +440,10 @@
    //   initVal: card.setAll || 'true',
    //   options: [{
    //     value: 'true',
    //     text: Formdict['model.true']
    //     text: '是'
    //   }, {
    //     value: 'false',
    //     text: Formdict['model.false']
    //     text: '否'
    //   }]
    // },
    {
@@ -495,6 +489,13 @@
      required: true
    },
    {
      type: 'text',
      key: 'colorField',
      label: '色值字段',
      initVal: card.colorField || '',
      required: true
    },
    {
      type: 'radio',
      key: 'picratio',
      label: '图片比例',
@@ -524,7 +525,7 @@
    {
      type: 'codemirror',
      key: 'dataSource',
      label: Formdict['header.form.datasource'],
      label: '数据源',
      initVal: card.dataSource || '',
      required: true
    },
@@ -612,34 +613,19 @@
      initVal: card.orderType || 'asc',
      options: [{
        value: 'asc',
        text: Formdict['header.form.asc']
        text: '正序'
      }, {
        value: 'desc',
        text: Formdict['header.form.desc']
        text: '倒序'
      }]
    },
    {
      type: 'select',
      key: 'match',
      label: Formdict['header.form.match'],
      label: '匹配模式',
      initVal: card.match || 'like',
      required: true,
      options: [{
        value: 'like',
        text: 'like'
      }, {
        value: 'equal',
        text: 'equal'
      }, {
        value: 'greater',
        text: '>'
      }, {
        value: 'less',
        text: '<'
      }, {
        value: 'greaterequal',
        text: '>='
      }]
      options: []
    },
    {
      type: 'radio',
@@ -659,7 +645,7 @@
      key: 'ratio',
      min: 1,
      max: 24,
      label: Formdict['header.form.ratio'],
      label: '比例',
      tooltip: '栅格布局,每行等分为24列。',
      initVal: card.ratio || 6,
      forbid: appType === 'mob',
@@ -699,27 +685,27 @@
    {
      type: 'radio',
      key: 'required',
      label: Formdict['model.required'],
      label: '必填',
      initVal: card.required || 'false',
      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',
      options: [{
        value: 'true',
        text: Formdict['model.true']
        text: '是'
      }, {
        value: 'false',
        text: Formdict['model.false']
        text: '否'
      }]
    },
    {
@@ -744,10 +730,10 @@
    //   tooltip: '数据查询时,类型字段是否作为参数传递,类型字段对应值为 {"日": "day", "周": "week", "月": "month", "季": "quarter", "年": "year", "自定义": "customized"}。',
    //   options: [{
    //     value: 'true',
    //     text: Formdict['model.true']
    //     text: '是'
    //   }, {
    //     value: 'false',
    //     text: Formdict['model.false']
    //     text: '否'
    //   }]
    // },
    {
@@ -797,10 +783,10 @@
      forbid: appType === 'mob' || position === 'header',
      options: [{
        value: 'true',
        text: Formdict['model.true']
        text: '是'
      }, {
        value: 'false',
        text: Formdict['model.false']
        text: '否'
      }]
    },
    {
@@ -860,7 +846,7 @@
    {
      type: 'multiselect',
      key: 'blacklist',
      label: Formdict['header.form.blacklist'],
      label: '黑名单',
      initVal: card.blacklist || [],
      required: false,
      options: roleList || [],
@@ -882,31 +868,31 @@
  let opentypes = [
    {
      value: 'pop',
      text: Formdict['model.form.popform']
      text: '弹窗(表单)'
    }, {
      value: 'prompt',
      text: Formdict['model.form.prompt']
      text: '提示框'
    }, {
      value: 'exec',
      text: Formdict['model.form.exec']
      text: '直接执行'
    }, {
      value: 'excelIn',
      text: Formdict['model.form.excelIn']
      text: '导入Excel'
    }, {
      value: 'excelOut',
      text: Formdict['model.form.excelOut']
      text: '导出Excel'
    }, {
      value: 'popview',
      text: Formdict['model.form.popview']
      text: '弹窗(标签)'
    }, {
      value: 'tab',
      text: Formdict['model.form.tab']
      text: '标签页'
    }, {
      value: 'innerpage',
      text: Formdict['model.form.newpage']
      text: '新页面'
    }, {
      value: 'funcbutton',
      text: Formdict['model.form.funcbutton']
      text: '功能按钮'
    }
  ]
@@ -957,7 +943,7 @@
    {
      type: 'select',
      key: 'OpenType',
      label: Formdict['header.form.openType'],
      label: '打开方式',
      initVal: card.OpenType,
      required: true,
      options: opentypes
@@ -1009,24 +995,24 @@
    {
      type: 'select',
      key: 'execMode',
      label: Formdict['model.form.execMode'],
      label: '执行方式',
      initVal: card.execMode || 'exec',
      required: true,
      options: [{
        value: 'exec',
        text: Formdict['model.form.exec']
        text: '直接执行'
      }, {
        value: 'prompt',
        text: Formdict['model.form.prompt']
        text: '提示框'
      }, {
        value: 'pop',
        text: Formdict['model.form.popform']
        text: '弹窗(表单)'
      }]
    },
    {
      type: 'radio',
      key: 'intertype',
      label: Formdict['header.form.intertype'],
      label: '接口类型',
      initVal: card.intertype || 'system',
      required: true,
      options: []
@@ -1052,7 +1038,7 @@
    {
      type: 'radio',
      key: 'sqlType',
      label: Formdict['header.form.action.type'],
      label: '操作类型',
      initVal: card.sqlType || '',
      required: true,
      options: []
@@ -1060,14 +1046,14 @@
    {
      type: 'text',
      key: 'sql',
      label: Formdict['model.form.tablename'],
      label: '表名',
      initVal: card.sql || config.setting.tableName || '',
      required: true
    },
    {
      type: 'text',
      key: 'innerFunc',
      label: Formdict['header.form.innerFunc'],
      label: '内部函数',
      initVal: card.innerFunc || '',
      tooltip: usefulFields.length ? `函数名称需以${usefulFields.join(', ')}等字符开始。` : '',
      fields: usefulFields,
@@ -1100,7 +1086,7 @@
    {
      type: 'select',
      key: 'pageTemplate',
      label: Formdict['model.form.newpage.type'],
      label: '页面类型',
      initVal: card.pageTemplate || '',
      required: true,
      options: [{
@@ -1114,10 +1100,10 @@
        text: '单据打印'
      }, {
        value: 'pay',
        text: Formdict['model.pay']
        text: '支付'
      }, {
        value: 'custom',
        text: Formdict['header.form.custom']
        text: '自定义'
      }]
    },
    {
@@ -1131,28 +1117,29 @@
    {
      type: 'text',
      key: 'url',
      label: Formdict['model.pageUrl'],
      label: '页面地址',
      initVal: card.url || '',
      required: true
    },
    {
      type: 'radio',
      key: 'sysInterface',
      label: Formdict['header.form.sysInterface'],
      label: '系统接口',
      initVal: card.sysInterface || 'false',
      tooltip: '单点登录系统',
      required: true,
      options: [{
        value: 'true',
        text: Formdict['model.true']
        text: '是'
      }, {
        value: 'false',
        text: Formdict['model.false']
        text: '否'
      }]
    },
    {
      type: 'text',
      key: 'outerFunc',
      label: Formdict['header.form.outerFunc'],
      label: '外部函数',
      initVal: card.outerFunc || '',
      required: false,
      readonly: false
@@ -1233,7 +1220,7 @@
    {
      type: 'text',
      key: 'callbackFunc',
      label: Formdict['header.form.callbackFunc'],
      label: '回调函数',
      initVal: card.callbackFunc || '',
      required: true,
      readonly: false
@@ -1246,16 +1233,16 @@
      required: true,
      options: [{
        value: 'toolbar',
        text: Formdict['header.form.toolbar']
        text: '工具栏'
      }, {
        value: 'grid',
        text: Formdict['header.form.grid']
        text: '表格'
      }]
    },
    {
      type: 'select',
      key: 'Ot',
      label: Formdict['header.form.isRequired'],
      label: '行设置',
      initVal: card.Ot || 'requiredSgl',
      required: true,
      options: []
@@ -1263,7 +1250,7 @@
    {
      type: 'cascader',
      key: 'linkmenu',
      label: Formdict['model.form.linkmenu'],
      label: '关联菜单',
      initVal: card.linkmenu || [],
      required: true,
      options: menulist
@@ -1279,9 +1266,9 @@
    {
      type: refresh.length === 0 ? 'radio' : 'select',
      key: 'execSuccess',
      label: Formdict['model.form.afterSuccess'],
      label: '成功后',
      initVal: card.execSuccess || 'grid',
      tooltip: '选择刷新行时,如果选择多条数据会刷新表格。',
      tooltip: '选择刷新行时,如果选择多条数据会刷新表格。如需语音播报请以@speak@开头,播报内容或文件放置于<<>>中。',
      required: true,
      options: [{
        value: 'never',
@@ -1298,9 +1285,9 @@
    {
      type: refresh.length === 0 ? 'radio' : 'select',
      key: 'execError',
      label: Formdict['model.form.afterError'],
      label: '失败后',
      initVal: card.execError || 'never',
      tooltip: '选择刷新行时,如果选择多条数据会刷新表格。',
      tooltip: '选择刷新行时,如果选择多条数据会刷新表格。如需语音播报请以@speak@开头,播报内容或文件放置于<<>>中。',
      required: true,
      options: [{
        value: 'never',
@@ -1317,7 +1304,7 @@
    {
      type: refresh.length === 0 ? 'radio' : 'select',
      key: 'popClose',
      label: Formdict['header.form.popClose'],
      label: '关闭后',
      initVal: card.popClose || 'never',
      required: true,
      options: [{
@@ -1346,14 +1333,14 @@
    {
      type: 'icon',
      key: 'icon',
      label: Formdict['model.icon'],
      label: '图标',
      initVal: card.icon,
      required: false
    },
    {
      type: 'select',
      key: 'class',
      label: Formdict['model.form.color'],
      label: '颜色',
      initVal: card.class,
      required: false,
      options: btnClasses
@@ -1386,21 +1373,21 @@
    {
      type: 'radio',
      key: 'joint',
      label: Formdict['model.form.paramJoint'],
      label: '拼接参数',
      initVal: card.joint || 'true',
      required: false,
      options: [{
        value: 'true',
        text: Formdict['model.true']
        text: '是'
      }, {
        value: 'false',
        text: Formdict['model.false']
        text: '否'
      }]
    },
    {
      type: 'text',
      key: 'sheet',
      label: Formdict['model.form.tablename'],
      label: '表名',
      initVal: card.sheet || config.setting.tableName || '',
      required: true
    },
@@ -1412,10 +1399,10 @@
      required: false,
      options: [{
        value: 'true',
        text: Formdict['model.true']
        text: '是'
      }, {
        value: 'false',
        text: Formdict['model.false']
        text: '否'
      }]
    },
    {
@@ -1460,7 +1447,7 @@
    {
      type: 'radio',
      key: 'placement',
      label: '抽屉方向',
      label: '弹出方向',
      initVal: card.placement || 'right',
      required: false,
      options: [{
@@ -1599,14 +1586,14 @@
    {
      type: 'text',
      key: 'label',
      label: Formdict['model.name'],
      label: '名称',
      initVal: card.label,
      required: true
    },
    {
      type: 'text',
      key: 'field',
      label: Formdict['model.form.field'],
      label: '字段',
      initVal: card.field,
      required: true,
      readonly: false
@@ -1614,27 +1601,27 @@
    {
      type: 'select',
      key: 'type',
      label: Formdict['model.form.type'],
      label: '类型',
      initVal: card.type,
      required: true,
      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: 'video',
        text: '视频'
      }, {
        value: 'link',
        text: Formdict['model.form.href']
        text: '链接'
      }, {
        value: 'textarea',
        text: Formdict['model.form.textarea']
        text: '多行文本'
      }, {
        value: 'index',
        text: '序号'
@@ -1643,7 +1630,7 @@
    {
      type: 'text',
      key: 'nameField',
      label: Formdict['model.name'] + Formdict['model.form.field'],
      label: '名称字段',
      initVal: card.nameField,
      required: false,
      readonly: false
@@ -1654,67 +1641,67 @@
      min: 1,
      max: 1000,
      decimal: 0,
      label: Formdict['model.form.columnWidth'],
      label: '列宽',
      initVal: card.Width,
      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 || '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: '右对齐'
      }]
    },
    {
@@ -1746,10 +1733,10 @@
      required: false,
      options: [{
        value: 'true',
        text: Formdict['model.true']
        text: '是'
      }, {
        value: 'false',
        text: Formdict['model.false']
        text: '否'
      }]
    },
    {
@@ -1761,10 +1748,10 @@
      required: false,
      options: [{
        value: 'true',
        text: Formdict['model.true']
        text: '是'
      }, {
        value: 'false',
        text: Formdict['model.false']
        text: '否'
      }]
    },
    {
@@ -1773,21 +1760,21 @@
      min: 0,
      max: 18,
      decimal: 0,
      label: Formdict['header.form.decimal'],
      label: '小数位',
      initVal: card.decimal || 0,
      required: true
    },
    {
      type: 'number',
      key: 'fieldlength',
      label: Formdict['model.form.field'] + Formdict['model.length'],
      label: '字段长度',
      initVal: card.fieldlength || (card.type === 'text' ? 50 : 512),
      required: true
    },
    {
      type: 'select',
      key: 'format',
      label: Formdict['header.form.format'],
      label: '格式化',
      initVal: card.format || 'none',
      options: [{
        value: 'none',
@@ -1807,7 +1794,7 @@
    {
      type: 'select',
      key: 'textFormat',
      label: Formdict['header.form.format'],
      label: '格式化',
      initVal: card.textFormat || 'none',
      options: [{
        value: 'none',
@@ -1827,7 +1814,7 @@
    {
      type: 'text',
      key: 'prefix',
      label: Formdict['header.form.prefix'],
      label: '前缀',
      initVal: card.prefix || '',
      required: false,
      readonly: false
@@ -1835,7 +1822,7 @@
    {
      type: 'text',
      key: 'postfix',
      label: Formdict['header.form.postfix'],
      label: '后缀',
      initVal: card.postfix || '',
      tooltipClass: 'middle',
      required: false,
@@ -1885,10 +1872,10 @@
      required: false,
      options: [{
        value: 'true',
        text: Formdict['model.true']
        text: '是'
      }, {
        value: 'false',
        text: Formdict['model.false']
        text: '否'
      }]
    },
    {
@@ -1910,7 +1897,7 @@
    {
      type: 'cascader',
      key: 'linkmenu',
      label: Formdict['model.menu'],
      label: '菜单',
      initVal: card.linkmenu || [],
      required: true,
      options: menulist
@@ -1933,7 +1920,7 @@
    {
      type: 'multiselect',
      key: 'blacklist',
      label: Formdict['header.form.blacklist'],
      label: '黑名单',
      initVal: card.blacklist || [],
      required: false,
      options: roleList
@@ -1985,7 +1972,7 @@
    {
      type: 'text',
      key: 'title',
      label: Formdict['header.form.title'],
      label: '标题',
      initVal: card.title,
      required: false
    },
@@ -2011,15 +1998,15 @@
    {
      type: 'radio',
      key: 'Hide',
      label: Formdict['model.hidden'],
      label: '隐藏',
      initVal: card.Hide,
      required: true,
      options: [{
        value: 'true',
        text: Formdict['model.true']
        text: '是'
      }, {
        value: 'false',
        text: Formdict['model.false']
        text: '否'
      }]
    },
    {
@@ -2097,7 +2084,7 @@
    {
      type: 'multiselect',
      key: 'blacklist',
      label: Formdict['header.form.blacklist'],
      label: '黑名单',
      initVal: card.blacklist || [],
      required: false,
      options: roleList
@@ -2287,10 +2274,10 @@
      forbid: !['line', 'bar'].includes(card.chartType),
      options: [{
        value: 'true',
        text: Formdict['model.true']
        text: '是'
      }, {
        value: 'false',
        text: Formdict['model.false']
        text: '否'
      }]
    },
    {
@@ -2396,12 +2383,12 @@
/**
 * @description 获取表单配置信息
 * @param {*} card            // 表单对象
 * @param {*} inputfields     // 可关联表单
 * @param {*} inputfields     // 可写入表单
 * @param {*} tabfields       // 可切换表单
 * @param {*} linkableFields  // 可关联表单
 * @param {*} linksupFields   // 上级表单
 */
export function getModalForm (card, inputfields = [], tabfields = [], linkableFields, linksupFields) {
export function getModalForm (card, inputfields = [], tabfields = [], linkableFields, linksupFields, columns = []) {
  let appType = sessionStorage.getItem('appType')
  let roleList = sessionStorage.getItem('sysRoles')
  if (roleList) {
@@ -2420,6 +2407,27 @@
  } else {
    roleList = []
  }
  inputfields = inputfields.map((item, index) => {
    item.label = `${index + 1}、${item.field || ''}(${item.label})`
    return item
  })
  tabfields = tabfields.map((item, index) => {
    item.label = `${index + 1}、${item.field || ''}(${item.label})`
    return item
  })
  tabfields.unshift({field: '', label: '原表单'})
  linkableFields = linkableFields.map((item, index) => {
    item.label = `${index + 1}、${item.field || ''}(${item.label})`
    return item
  })
  linksupFields = linksupFields.map((item, index) => {
    item.label = `${index + 1}、${item.field || ''}(${item.label})`
    return item
  })
  
  let _openType = [{
    value: 'text',
@@ -2589,7 +2597,7 @@
    {
      type: 'text',
      key: 'label',
      label: Formdict['model.name'],
      label: '名称',
      initVal: card.label,
      required: true,
      readonly: false
@@ -2597,15 +2605,16 @@
    {
      type: 'text',
      key: 'field',
      label: Formdict['model.form.field'],
      label: '字段',
      initVal: card.field || '',
      required: true,
      readonly: false
      readonly: false,
      options: columns
    },
    {
      type: 'select',
      key: 'type',
      label: Formdict['model.form.type'],
      label: '类型',
      initVal: card.type,
      required: true,
      options: _openType
@@ -2613,7 +2622,7 @@
    {
      type: 'text',
      key: 'initval',
      label: Formdict['header.form.initval'],
      label: '初始值',
      initVal: initval,
      required: false
    },
@@ -2712,6 +2721,13 @@
      readonly: false
    },
    {
      type: 'text',
      key: 'colorField',
      label: '色值字段',
      initVal: card.colorField || '',
      required: true
    },
    {
      type: 'radio',
      key: 'picratio',
      label: '图片比例',
@@ -2738,10 +2754,10 @@
    //   initVal: card.setAll || 'false',
    //   options: [{
    //     value: 'true',
    //     text: Formdict['model.true']
    //     text: '是'
    //   }, {
    //     value: 'false',
    //     text: Formdict['model.false']
    //     text: '否'
    //   }]
    // },
    {
@@ -2763,7 +2779,7 @@
    {
      type: 'codemirror',
      key: 'dataSource',
      label: Formdict['header.form.datasource'],
      label: '数据源',
      initVal: card.dataSource || '',
      required: true,
      readonly: false
@@ -2831,10 +2847,10 @@
      initVal: card.orderType || 'asc',
      options: [{
        value: 'asc',
        text: Formdict['header.form.asc']
        text: '正序'
      }, {
        value: 'desc',
        text: Formdict['header.form.desc']
        text: '倒序'
      }]
    },
    {
@@ -3022,7 +3038,7 @@
      min: 0,
      max: 18,
      precision: 0,
      label: Formdict['header.form.decimal'],
      label: '小数位',
      initVal: card.decimal || 0,
      required: true
    },
@@ -3032,7 +3048,7 @@
      min: 1,
      max: 100000,
      precision: 0,
      label: Formdict['model.form.field'] + Formdict['model.length'],
      label: '字段长度',
      // tooltip: '文本、下拉框、日期等字段默认长度为50,多行文本与文件上传字段默认长度为512',
      initVal: card.fieldlength || _fieldlength,
      required: true
@@ -3113,10 +3129,10 @@
      initVal: card.hidden || 'false',
      options: [{
        value: 'true',
        text: Formdict['model.true']
        text: '是'
      }, {
        value: 'false',
        text: Formdict['model.false']
        text: '否'
      }]
    },
    {
@@ -3126,10 +3142,10 @@
      initVal: card.readonly || 'false',
      options: [{
        value: 'true',
        text: Formdict['model.true']
        text: '是'
      }, {
        value: 'false',
        text: Formdict['model.false']
        text: '否'
      }]
    },
    {
@@ -3139,10 +3155,10 @@
      initVal: card.required || 'true',
      options: [{
        value: 'true',
        text: Formdict['model.true']
        text: '是'
      }, {
        value: 'false',
        text: Formdict['model.false']
        text: '否'
      }]
    },
    {
@@ -3214,10 +3230,23 @@
      initVal: card.writein || 'true',
      options: [{
        value: 'true',
        text: Formdict['model.true']
        text: '是'
      }, {
        value: 'false',
        text: Formdict['model.false']
        text: '否'
      }]
    },
    {
      type: 'radio',
      key: 'colorType',
      label: '颜色类型',
      initVal: card.colorType || 'hex',
      options: [{
        value: 'hex',
        text: '16进制'
      }, {
        value: 'rgba',
        text: 'RGBA'
      }]
    },
    {
@@ -3279,10 +3308,10 @@
      initVal: card.hidelabel || 'false',
      options: [{
        value: 'true',
        text: Formdict['model.true']
        text: '是'
      }, {
        value: 'false',
        text: Formdict['model.false']
        text: '否'
      }]
    },
    {
@@ -3357,16 +3386,30 @@
    },
    {
      type: 'radio',
      key: 'inputType',
      label: '加密显示',
      initVal: card.inputType || 'text',
      required: false,
      options: [{
        value: 'text',
        text: '否'
      }, {
        value: 'password',
        text: '是'
      }]
    },
    {
      type: 'radio',
      key: 'interception',
      label: '截取空格',
      initVal: card.interception || 'true',
      tooltip: '提交时,是否截取首尾的空白字符。',
      options: [{
        value: 'true',
        text: Formdict['model.true']
        text: '是'
      }, {
        value: 'false',
        text: Formdict['model.false']
        text: '否'
      }]
    },
    {
@@ -3571,6 +3614,24 @@
      required: false
    },
    {
      type: 'radio',
      key: 'lenControl',
      label: '长度控制',
      initVal: card.lenControl || 'limit',
      tooltip: '在设置字段长度后,对长度的控制方式。',
      required: false,
      options: [{
        value: 'limit',
        text: '限制输入'
      }, {
        value: 'left',
        text: '左截'
      }, {
        value: 'right',
        text: '右截'
      }]
    },
    {
      type: 'number',
      key: 'span',
      min: 1,
@@ -3602,24 +3663,6 @@
      }, {
        value: 6,
        text: 6
      }]
    },
    {
      type: 'radio',
      key: 'lenControl',
      label: '长度控制',
      initVal: card.lenControl || 'limit',
      tooltip: '在设置字段长度后,对长度的控制方式。',
      required: false,
      options: [{
        value: 'limit',
        text: '限制输入'
      }, {
        value: 'left',
        text: '左截'
      }, {
        value: 'right',
        text: '右截'
      }]
    },
    {
@@ -3687,6 +3730,24 @@
    },
    {
      type: 'text',
      key: 'regularExtra',
      label: '正则扩展符',
      initVal: card.regularExtra || '',
      tooltip: '正则验证时允许添加的自定义字符,包括~!@#$%^&*()_+:;{}<>,.-',
      required: false,
      readonly: false
    },
    {
      type: 'text',
      key: 'regularText',
      label: '正则提示',
      initVal: card.regularText || '',
      tooltip: '正则验证时的提示信息。',
      required: false,
      readonly: false
    },
    {
      type: 'text',
      key: 'tooltip',
      label: '悬浮提示',
      tooltip: '鼠标悬浮于提示文字上方时,显示提示信息。',
@@ -3722,7 +3783,7 @@
    {
      type: 'text',
      key: 'placeholder',
      label: '提示信息',
      label: '输入提示',
      tooltip: '字段预期值的提示信息。',
      initVal: card.placeholder || '',
      required: false
@@ -3791,9 +3852,21 @@
    //   forbid: appType !== 'mob'
    // },
    {
      type: 'radio',
      key: 'empty',
      label: '空值隐藏',
      initVal: card.empty || 'show',
      tooltip: '当选项为空时,隐藏该表单。',
      required: false,
      options: [
        {value: 'show', text: '否'},
        {value: 'hidden', text: '是'},
      ]
    },
    {
      type: 'multiselect',
      key: 'blacklist',
      label: Formdict['header.form.blacklist'],
      label: '黑名单',
      initVal: card.blacklist || [],
      required: false,
      options: roleList,
@@ -3816,14 +3889,14 @@
    {
      type: 'text',
      key: 'label',
      label: Formdict['header.menu.tabName'],
      label: '标签名称',
      initVal: card.label || '',
      required: true
    },
    {
      type: 'select',
      key: 'linkTab',
      label: Formdict['header.form.linkTab'],
      label: '关联标签',
      initVal: card.linkTab || '',
      required: false,
      options: []
@@ -3831,7 +3904,7 @@
    {
      type: 'icon',
      key: 'icon',
      label: Formdict['model.icon'],
      label: '图标',
      initVal: card.icon || '',
      required: false,
      forbid: type === 'CalendarPage'
@@ -3839,7 +3912,7 @@
    {
      type: 'select',
      key: 'supMenu',
      label: Formdict['header.form.supTab'],
      label: '上级标签',
      initVal: supMenu,
      required: false,
      options: menus,
@@ -3848,7 +3921,7 @@
    {
      type: 'mutilselect',
      key: 'equalTab',
      label: Formdict['header.form.equalTab'],
      label: '同级标签',
      tooltip: '如果子标签中含有刷新同级标签的按钮,在此处添加需要刷新的标签。',
      initVal: equalTab,
      required: false,