king
2021-09-28 432b788acf901b0720184b8ee8bc81a2e6fa47e0
src/templates/zshare/formconfig.jsx
@@ -292,7 +292,7 @@
  if (roleList) {
    try {
      roleList = JSON.parse(roleList)
    } catch {
    } catch (e) {
      roleList = []
    }
  } else {
@@ -746,11 +746,25 @@
    },
    {
      type: 'radio',
      key: 'dropdown',
      label: '下拉框',
      initVal: card.dropdown || 'true',
      forbid: appType === 'mob',
      options: [{
        value: 'true',
        text: '定宽'
      }, {
        value: 'false',
        text: '自适应'
      }]
    },
    {
      type: 'radio',
      key: 'inputType',
      label: '输入样式',
      initVal: card.inputType || 'input',
      tooltip: '使用高级搜索时无效。',
      required: false,
      forbid: appType === null,
      options: [{
        value: 'input',
        text: '输入框'
@@ -788,12 +802,11 @@
/**
 * @description 获取按钮表单配置信息
 * @param {*} card           编辑按钮
 * @param {*} functip        生成存储过程提示
 * @param {*} config         页面配置
 * @param {*} usefulFields   存储过程可用的开始字段
 * @param {*} type           按钮类型,用于区分可选的打开方式
 */
export function getActionForm (card, functip, config, usefulFields, type, menulist = [], printTemps = []) {
export function getActionForm (card, config, usefulFields, type, menulist = [], printTemps = []) {
  let columns = (config.columns || []).filter(col => col.field)
  let opentypes = [
@@ -871,7 +884,7 @@
      options: opentypes
    },
    {
      type: 'radio',
      type: 'select',
      key: 'funcType',
      label: Formdict['header.form.funcType'],
      initVal: card.funcType || '',
@@ -882,6 +895,9 @@
      }, {
        value: 'print',
        text: '标签打印'
      }, {
        value: 'closetab',
        text: '标签关闭'
      }]
    },
    {
@@ -951,23 +967,12 @@
      key: 'innerFunc',
      label: Formdict['header.form.innerFunc'],
      initVal: card.innerFunc || '',
      tooltip: functip,
      tooltip: `函数名称需以${usefulFields.join(', ')}等字符开始。`,
      fields: usefulFields,
      tooltipClass: 'middle',
      required: card.intertype === 'inner',
      readonly: false
    },
    // {
    //   type: 'select',
    //   key: 'tabType',
    //   label: Formdict['model.form.tabType'],
    //   initVal: card.tabType || 'SubTable',
    //   required: true,
    //   options: [{
    //     value: 'SubTable',
    //     text: Formdict['model.menu.tab.subtable']
    //   }]
    // },
    {
      type: 'select',
      key: 'linkTab',
@@ -1156,6 +1161,14 @@
      options: menulist
    },
    {
      type: 'cascader',
      key: 'refreshTab',
      label: '刷新标签',
      initVal: card.refreshTab || [],
      required: false,
      options: menulist
    },
    {
      type: 'radio',
      key: 'afterExecSuccess',
      label: Formdict['header.form.afterExecSuccess'],
@@ -1257,6 +1270,23 @@
      initVal: card.class,
      required: false,
      options: []
    },
    {
      type: 'cascader',
      key: 'openmenu',
      label: '打开菜单',
      initVal: card.openmenu || [],
      tooltip: '执行成功后需要打开的菜单。',
      required: false,
      options: menulist
    },
    {
      type: 'text',
      key: 'output',
      label: '返回值',
      tooltip: '执行成功后的返回值。',
      initVal: card.output || '',
      required: false
    },
    {
      type: 'radio',
@@ -1370,6 +1400,17 @@
        text: '下侧'
      }]
    },
    {
      type: 'text',
      key: 'preFunc',
      label: '前置函数',
      initVal: card.preFunc || '',
      tooltip: `函数名称需以${usefulFields.join(', ')}等字符开始;前置函数执行完成后,结果会传入内部函数中,此时内部函数会异步执行。`,
      fields: usefulFields,
      tooltipClass: 'middle',
      required: false,
      readonly: false
    },
  ]
}
@@ -1383,7 +1424,7 @@
  if (roleList) {
    try {
      roleList = JSON.parse(roleList)
    } catch {
    } catch (e) {
      roleList = []
    }
  } else {
@@ -1702,7 +1743,7 @@
  if (roleList) {
    try {
      roleList = JSON.parse(roleList)
    } catch {
    } catch (e) {
      roleList = []
    }
  } else {
@@ -2164,7 +2205,7 @@
          label: role.text
        }
      })
    } catch {
    } catch (e) {
      roleList = []
    }
  } else {
@@ -2523,6 +2564,15 @@
      }]
    },
    {
      type: 'text',
      key: 'disableField',
      label: '禁用·字段',
      initVal: card.disableField || '',
      tooltip: '设置禁用字段,且字段值为true时,选项不可选。',
      required: false,
      readonly: false
    },
    {
      type: 'radio',
      key: 'multiple',
      label: '可多选',
@@ -2718,7 +2768,7 @@
      type: 'radio',
      key: 'readin',
      label: Formdict['header.form.readin'],
      tooltip: Formdict['header.form.readin.tooltip'],
      tooltip: '是否将表格选中的数据自动填充到表单(字段相同)',
      initVal: card.readin || 'true',
      options: [{
        value: 'true',
@@ -2726,6 +2776,9 @@
      }, {
        value: 'false',
        text: Formdict['model.false']
      }, {
        value: 'top',
        text: '首行'
      }]
    },
    {
@@ -2740,6 +2793,20 @@
      }, {
        value: 'false',
        text: Formdict['model.false']
      }]
    },
    {
      type: 'radio',
      key: 'dropdown',
      label: '下拉框',
      initVal: card.dropdown || 'true',
      forbid: appType === 'mob',
      options: [{
        value: 'true',
        text: '定宽'
      }, {
        value: 'false',
        text: '自适应'
      }]
    },
    {
@@ -3061,17 +3128,6 @@
      initVal: card.label || '',
      required: true
    },
    // {
    //   type: 'select',
    //   key: 'type',
    //   label: Formdict['model.form.tabType'],
    //   initVal: card.type || 'SubTable',
    //   required: true,
    //   options: [{
    //     value: 'SubTable',
    //     text: Formdict['model.menu.tab.subtable']
    //   }]
    // },
    {
      type: 'select',
      key: 'linkTab',