king
2021-09-01 31ec63f0419895876cbaba99637a884a32d33d0d
src/menu/components/share/actioncomponent/formconfig.jsx
@@ -56,11 +56,11 @@
  let funTypes = [
    { value: 'changeuser', text: Formdict['header.form.func.changeuser'] },
    { value: 'print', text: '标签打印' }
    { value: 'print', text: '标签打印' },
    { value: 'closetab', text: '标签关闭' },
  ]
  
  if (isApp) {
    opentypes = opentypes.filter(item => item.value !== 'tab')
    pageTemps = [
      // { value: 'page', text: '菜单' },
      { value: 'linkpage', text: '关联菜单' },
@@ -75,16 +75,27 @@
    if (appMenus) {
      try {
        appMenus = JSON.parse(appMenus)
        appMenus = appMenus.map(item => ({value: item.MenuID, text: item.MenuName}))
      } catch {
      } catch (e) {
        appMenus = []
      }
    } else {
      appMenus = []
    }
    if (appType === 'mob') {
      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')
    }
  }
  
  if (type === 'chart') {
  if (type === 'chart' && appType !== 'mob') {
    opentypes = opentypes.filter(item => item.value === 'excelIn' || item.value === 'excelOut')
  }
@@ -107,10 +118,10 @@
      options: opentypes
    },
    {
      type: 'radio',
      type: 'select',
      key: 'funcType',
      label: Formdict['header.form.funcType'],
      initVal: card.funcType || (isApp ? 'changeuser' : ''),
      initVal: card.funcType || '',
      required: true,
      options: funTypes
    },
@@ -204,14 +215,6 @@
      forbid: !isApp,
      options: appMenus
    },
    // {
    //   type: 'select',
    //   key: 'copyMenuId',
    //   label: '复制菜单',
    //   initVal: card.copyMenuId || '',
    //   required: false,
    //   options: appMenus
    // },
    {
      type: 'textarea',
      key: 'url',
@@ -335,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'],
@@ -418,7 +430,7 @@
    {
      type: 'radio',
      key: 'show',
      label: "显示为",
      label: '显示为',
      initVal: card.show || 'button',
      required: true,
      options: [{
@@ -531,7 +543,8 @@
      tooltip: '禁用控制字段,可根据数据控制按钮是否禁用。',
      initVal: card.controlField || '',
      required: false,
      options: [{label: '无', field: ''}, ...columns]
      allowClear: true,
      options: columns
    },
    {
      type: 'text',
@@ -546,10 +559,20 @@
      key: 'openmenu',
      label: '打开菜单',
      tooltip: '执行成功后需要打开的菜单。',
      initVal: card.openmenu,
      initVal: card.openmenu || '',
      forbid: appType !== 'pc' && appType !== 'mob',
      required: false,
      options: [{value: '', text: '无'}, ...appMenus]
      allowClear: true,
      options: appMenus
    },
    {
      type: 'text',
      key: 'output',
      label: '返回值',
      tooltip: '执行成功后的返回值。',
      initVal: card.output || '',
      forbid: appType !== 'pc' && appType !== 'mob',
      required: false
    },
    {
      type: 'radio',
@@ -565,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