king
2022-10-17 e8edfdadb561cd83bf6e1c3e00d55b8cc2aee6d5
src/menu/components/share/actioncomponent/formconfig.jsx
@@ -1,8 +1,5 @@
import zhCN from '@/locales/zh-CN/model.js'
import enUS from '@/locales/en-US/model.js'
import { btnCustomClasses } from '@/utils/option.js'
const Formdict = sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS
/**
 * @description 获取按钮表单配置信息
@@ -156,7 +153,7 @@
    pageTemps = [
      { value: 'linkpage', text: '关联菜单' },
      { value: 'billprint', text: '单据打印' },
      { value: 'pay', text: Formdict['model.pay'] },
      { value: 'pay', text: '支付' },
      { value: 'custom', text: '链接' }
    ]
  }
@@ -225,7 +222,7 @@
    {
      type: 'select',
      key: 'OpenType',
      label: Formdict['header.form.openType'],
      label: '打开方式',
      initVal: card.OpenType,
      required: true,
      options: opentypes
@@ -273,24 +270,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: []
@@ -329,7 +326,7 @@
    {
      type: 'radio',
      key: 'sqlType',
      label: Formdict['header.form.action.type'],
      label: '操作类型',
      initVal: card.sqlType || '',
      required: true,
      options: []
@@ -344,7 +341,7 @@
    {
      type: 'text',
      key: 'innerFunc',
      label: Formdict['header.form.innerFunc'],
      label: '内部函数',
      initVal: card.innerFunc || '',
      tooltip: functip,
      fields: usefulFields,
@@ -362,7 +359,7 @@
    {
      type: 'select',
      key: 'pageTemplate',
      label: Formdict['model.form.newpage.type'],
      label: '页面类型',
      initVal: card.pageTemplate || '',
      required: true,
      options: pageTemps
@@ -387,28 +384,28 @@
    {
      type: 'textarea',
      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',
      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,
    },
@@ -488,14 +485,14 @@
    {
      type: 'text',
      key: 'callbackFunc',
      label: Formdict['header.form.callbackFunc'],
      label: '回调函数',
      initVal: card.callbackFunc || '',
      required: true
    },
    {
      type: 'select',
      key: 'Ot',
      label: Formdict['header.form.isRequired'],
      label: '行设置',
      initVal: card.Ot || (card.sqlType === 'insert' ? 'notRequired' : 'requiredSgl'),
      required: true,
      options: []
@@ -503,13 +500,13 @@
    {
      type: 'select',
      key: 'execSuccess',
      label: Formdict['model.form.afterSuccess'],
      label: '成功后',
      initVal: card.execSuccess || 'grid',
      tooltip: refresh.length ? '执行刷新源组件时,请在源按钮中设置关闭后刷新那一项,注:此时会同步刷新当前组件和上级组件-行。' : '选择刷新行时,如果选择多条数据会刷新表格。注:上级组件在数据源中添加。',
      required: true,
      options: [{
        value: 'never',
        text: Formdict['header.form.refresh.never']
        text: '不刷新'
      }, {
        value: 'line',
        text: '刷新行'
@@ -526,13 +523,13 @@
    {
      type: 'select',
      key: 'execError',
      label: Formdict['model.form.afterError'],
      label: '失败后',
      initVal: card.execError || 'never',
      tooltip: refresh.length ? '执行刷新源组件时,请在源按钮中设置关闭后刷新那一项,注:此时会同步刷新当前组件和上级组件-行。' : '选择刷新行时,如果选择多条数据会刷新表格,注:上级组件在数据源中添加。',
      required: true,
      options: [{
        value: 'never',
        text: Formdict['header.form.refresh.never']
        text: '不刷新'
      }, {
        value: 'line',
        text: '刷新行'
@@ -548,12 +545,12 @@
    {
      type: 'select',
      key: 'popClose',
      label: Formdict['header.form.popClose'],
      label: '关闭后',
      initVal: card.popClose || 'never',
      required: true,
      options: [{
        value: 'never',
        text: Formdict['header.form.refresh.never']
        text: '不刷新'
      }, {
        value: 'grid',
        text: '刷新当前组件'
@@ -627,7 +624,7 @@
    {
      type: 'icon',
      key: 'icon',
      label: Formdict['model.icon'],
      label: '图标',
      initVal: card.icon,
      required: false,
      forbid: type === 'datacard' && appType === 'mob', // 移动端,滑动显示的按钮只显示文字
@@ -636,7 +633,7 @@
    {
      type: 'select',
      key: 'class',
      label: Formdict['model.form.color'],
      label: '颜色',
      initVal: card.class,
      tooltip: '此颜色为按钮初始化颜色,可在样式调整中修改。',
      required: false,
@@ -646,7 +643,7 @@
    {
      type: 'radio',
      key: 'color',
      label: Formdict['model.form.color'],
      label: '颜色',
      initVal: card.color || 'primary',
      required: false,
      forbid: (type !== 'datacard' || appType !== 'mob'), // 移动端,滑动显示的按钮只可设置固定颜色
@@ -670,21 +667,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 || setting.tableName || '',
      required: true
    },
@@ -696,10 +693,10 @@
      required: false,
      options: [{
        value: 'true',
        text: Formdict['model.true']
        text: '是'
      }, {
        value: 'false',
        text: Formdict['model.false']
        text: '否'
      }]
    },
    {
@@ -954,7 +951,7 @@
    {
      type: 'text',
      key: 'field',
      label: Formdict['model.form.field'],
      label: '字段',
      initVal: card.field || '',
      required: true,
      readonly: false