king
2021-09-01 31ec63f0419895876cbaba99637a884a32d33d0d
src/menu/components/share/actioncomponent/formconfig.jsx
@@ -56,7 +56,8 @@
  let funTypes = [
    { value: 'changeuser', text: Formdict['header.form.func.changeuser'] },
    { value: 'print', text: '标签打印' }
    { value: 'print', text: '标签打印' },
    { value: 'closetab', text: '标签关闭' },
  ]
  
  if (isApp) {
@@ -74,8 +75,7 @@
    if (appMenus) {
      try {
        appMenus = JSON.parse(appMenus)
        appMenus = appMenus.map(item => ({value: item.MenuID, text: item.MenuName}))
      } catch {
      } catch (e) {
        appMenus = []
      }
    } else {
@@ -83,7 +83,13 @@
    }
    if (appType === 'mob') {
      opentypes = opentypes.filter(item => ['pop', 'prompt', 'exec', 'innerpage'].includes(item.value))
      opentypes = opentypes.filter(item => ['pop', 'prompt', 'exec', 'innerpage', 'funcbutton'].includes(item.value))
      funTypes = [
        { value: 'mkBinding', text: '开通扫码登录' },
        { value: 'mkUnBinding', text: '用户解绑' },
        { value: 'scan', text: '扫一扫' },
        { value: 'reAuth', text: '重新授权' },
      ]
    } else {
      opentypes = opentypes.filter(item => item.value !== 'tab')
    }
@@ -112,7 +118,7 @@
      options: opentypes
    },
    {
      type: 'radio',
      type: 'select',
      key: 'funcType',
      label: Formdict['header.form.funcType'],
      initVal: card.funcType || '',
@@ -332,6 +338,15 @@
      options: menulist
    },
    {
      type: 'cascader',
      key: 'refreshTab',
      label: '刷新标签',
      initVal: card.refreshTab || [],
      required: false,
      forbid: isApp,
      options: menulist
    },
    {
      type: 'select',
      key: 'execSuccess',
      label: Formdict['model.form.afterSuccess'],
@@ -415,7 +430,7 @@
    {
      type: 'radio',
      key: 'show',
      label: "显示为",
      label: '显示为',
      initVal: card.show || 'button',
      required: true,
      options: [{
@@ -551,6 +566,15 @@
      options: appMenus
    },
    {
      type: 'text',
      key: 'output',
      label: '返回值',
      tooltip: '执行成功后的返回值。',
      initVal: card.output || '',
      forbid: appType !== 'pc' && appType !== 'mob',
      required: false
    },
    {
      type: 'radio',
      key: 'open',
      label: '打开方式',
@@ -564,7 +588,53 @@
        value: 'self',
        text: '当前窗口'
      }]
    }
    },
    {
      type: 'radio',
      key: 'display',
      label: '显示方式',
      initVal: card.display || 'modal',
      required: true,
      options: [{
        value: 'modal',
        text: '模态框'
      }, {
        value: 'drawer',
        text: '抽屉'
      }]
    },
    {
      type: 'number',
      key: 'ratio',
      min: 1,
      max: 24,
      precision: 0,
      label: '比例',
      initVal: card.ratio || 85,
      tooltip: '小于100为宽度(或高度)百分比,大于100为像素值。',
      required: true
    },
    {
      type: 'radio',
      key: 'placement',
      label: '抽屉方向',
      initVal: card.placement || 'right',
      tooltip: '使用抽屉时有效。',
      required: false,
      options: [{
        value: 'right',
        text: '右侧'
      }, {
        value: 'left',
        text: '左侧'
      }, {
        value: 'top',
        text: '上侧'
      }, {
        value: 'bottom',
        text: '下侧'
      }]
    },
  ]
  return forms