king
2021-05-26 f66e19dd13af07ee466306632ad43c72f1f16ae7
src/menu/components/share/actioncomponent/formconfig.jsx
@@ -11,7 +11,7 @@
 * @param {*} usefulFields   存储过程可用的开始字段
 * @param {*} type           按钮类型,用于区分可选的打开方式
 */
export function getActionForm (card, functip, setting, usefulFields, type, menulist = [], modules = []) {
export function getActionForm (card, functip, setting, usefulFields, type, menulist = [], modules = [], columns = []) {
  let appMenus = []
  let opentypes = [
    {
@@ -49,7 +49,7 @@
    { value: 'pay', text: Formdict['model.pay'] },
    { value: 'custom', text: Formdict['header.form.custom'] }
  ]
  const isApp = sessionStorage.getItem('appType') === 'pc'
  const isApp = ['pc', 'mob'].includes(sessionStorage.getItem('appType'))
  let funTypes = [
    { value: 'changeuser', text: Formdict['header.form.func.changeuser'] },
@@ -284,17 +284,32 @@
    },
    {
      type: 'radio',
      key: 'cross',
      label: '跨域请求',
      initVal: card.cross || 'true',
      tooltip: '如果自定义接口不支持跨域请求,会通过当前系统转发。',
      required: false,
      options: [{
        value: 'true',
        text: '支持'
      }, {
        value: 'false',
        text: '不支持'
      }]
    },
    {
      type: 'radio',
      key: 'callbackType',
      label: '回调方式',
      initVal: card.callbackType || 'script',
      tooltip: '使用默认方式执行时,需要配合计划任务。',
      tooltip: '使用后台脚本执行时,需要配合计划任务。',
      required: true,
      options: [{
        value: 'default',
        text: '默认脚本'
      }, {
        value: 'script',
        text: '自定义脚本'
      }, {
        value: 'default',
        text: '后台脚本'
      }]
    },
    {
@@ -415,7 +430,7 @@
      type: 'radio',
      key: 'show',
      label: "显示为",
      initVal: card.show || 'icon',
      initVal: card.show || 'button',
      required: true,
      options: [{
        value: 'icon',
@@ -500,6 +515,25 @@
      initVal: card.syncComponent || [],
      required: false,
      options: modules
    },
    {
      type: 'select',
      key: 'controlField',
      label: '控制字段',
      tooltip: '显示控制字段,可根据行数据控制按钮是否显示。',
      initVal: card.controlField || '',
      required: false,
      forbid: card.$type !== 'tableButton',
      options: [{label: '无', field: ''}, ...columns]
    },
    {
      type: 'text',
      key: 'controlVal',
      label: '控制值',
      tooltip: '当选择控制字段,且字段值与控制值相等时,按钮会隐藏,多个值用逗号分隔。',
      initVal: card.controlVal || '',
      forbid: card.$type !== 'tableButton',
      required: false
    }
  ]