king
2022-02-09 d59f518f466274b2caeb2e01c10c92deafe7c93b
src/menu/components/form/formaction/formconfig.jsx
@@ -10,7 +10,7 @@
 */
export function getActionForm (card, functip, tableName, usefulFields, modules) {
  const isApp = sessionStorage.getItem('appType') === 'pc'
  const appType = sessionStorage.getItem('appType')
  let _type = '提交'
  if (card.type === 'prev') {
    _type = '上一步'
@@ -19,25 +19,27 @@
  }
  let menulist = []
  if (isApp) {
  if (appType === 'pc' || appType === 'mob') {
    menulist = sessionStorage.getItem('appMenus')
    if (menulist) {
      try {
        menulist = JSON.parse(menulist)
        menulist = menulist.map(item => ({value: item.MenuID, text: item.MenuName}))
      } catch {
      } catch (e) {
        menulist = []
      }
    } else {
      menulist = []
    }
    menulist.unshift({value: '', text: '无'})
    if (appType === 'mob') {
      menulist.push({value: 'goback', text: '返回'})
    }
  } else {
    menulist = sessionStorage.getItem('fstMenuList')
    if (menulist) {
      try {
        menulist = JSON.parse(menulist)
      } catch {
      } catch (e) {
        menulist = []
      }
    } else {
@@ -242,13 +244,22 @@
      readonly: false
    },
    {
      type: isApp ? 'select' : 'cascader',
      type: (appType === 'pc' || appType === 'mob') ? 'select' : 'cascader',
      key: 'linkmenu',
      label: '打开菜单',
      tooltip: '执行成功后需要打开的菜单。',
      initVal: card.linkmenu,
      required: false,
      allowClear: true,
      options: menulist
    },
    {
      type: 'text',
      key: 'output',
      label: '返回值',
      tooltip: '执行成功后的返回值。',
      initVal: card.output || '',
      required: false
    },
    {
      type: 'radio',
@@ -256,7 +267,7 @@
      label: '打开方式',
      initVal: card.open || 'blank',
      required: false,
      forbid: !isApp,
      forbid: appType !== 'pc',
      options: [{
        value: 'blank',
        text: '新窗口'
@@ -273,20 +284,6 @@
      tooltip: '执行成功后需要刷新的组件。',
      required: false,
      options: modules
    },
    {
      type: 'radio',
      key: 'enable',
      label: '是否显示',
      initVal: card.enable || 'false',
      required: false,
      options: [{
        value: 'true',
        text: '显示'
      }, {
        value: 'false',
        text: '隐藏'
      }]
    },
    }
  ]
}