king
2021-12-24 66fe0749db196f66021e09c6e6f83400f13f7412
2021-12-24
2个文件已修改
83 ■■■■■ 已修改文件
src/menu/components/share/actioncomponent/actionform/index.jsx 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/share/actioncomponent/formconfig.jsx 81 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/share/actioncomponent/actionform/index.jsx
@@ -420,6 +420,8 @@
      } else if (value === 'excelOut') {
        _fieldval.label = this.props.dict['model.form.excelOut']
        _fieldval.class = 'dgreen'
        _fieldval.control = ''
        this.record.control = ''
      }
      if (appType !== 'mob' && _fieldval.Ot === 'notRequired') {
src/menu/components/share/actioncomponent/formconfig.jsx
@@ -15,7 +15,8 @@
export function getActionForm (card, functip, config, usefulFields, type, menulist = [], modules = []) {
  let appType = sessionStorage.getItem('appType')
  let viewType = sessionStorage.getItem('editMenuType') // 弹窗 popview
  let printTemps = sessionStorage.getItem('printTemps') || []
  let printTemps = sessionStorage.getItem('printTemps')
  printTemps = printTemps ? JSON.parse(printTemps) : []
  let setting = config.setting || {}
  let columns = config.columns || []
  let appMenus = []
@@ -100,33 +101,32 @@
    } else {
      appMenus = []
    }
    if (appType === 'mob') {
      opentypes = opentypes.filter(item => ['pop', 'prompt', 'exec', 'innerpage', 'funcbutton'].includes(item.value))
      funTypes = [
        { value: 'scan', text: '扫码' },
        { value: 'logout', text: '退出' },
        { value: 'mkBinding', text: '开通扫码登录' },
        { value: 'mkUnBinding', text: '用户解绑' },
        { value: 'reAuth', text: '切换系统(清空缓存-小程序)' },
        { value: 'goBack', text: '返回' },
      ]
      pageTemps = [
        { value: 'linkpage', text: '关联菜单' },
        { value: 'custom', text: '链接' }
      ]
    } else {
      pageTemps = [
        { value: 'linkpage', text: '关联菜单' },
        { value: 'billprint', text: '单据打印' },
        { value: 'pay', text: Formdict['model.pay'] },
        { value: 'custom', text: '链接' }
      ]
      funTypes = [
        { value: 'changeuser', text: '切换用户' },
      ]
      opentypes = opentypes.filter(item => item.value !== 'tab')
    }
  }
  if (appType === 'mob') {
    opentypes = opentypes.filter(item => ['pop', 'prompt', 'exec', 'innerpage', 'funcbutton'].includes(item.value))
    funTypes = [
      { value: 'scan', text: '扫码' },
      { value: 'logout', text: '退出' },
      { value: 'mkBinding', text: '开通扫码登录' },
      { value: 'mkUnBinding', text: '用户解绑' },
      { value: 'reAuth', text: '切换系统(清空缓存-小程序)' },
      { value: 'goBack', text: '返回' },
    ]
    pageTemps = [
      { value: 'linkpage', text: '关联菜单' },
      { value: 'custom', text: '链接' }
    ]
  } else if (appType === 'pc') {
    opentypes = opentypes.filter(item => item.value !== 'tab')
    funTypes = [
      { value: 'changeuser', text: '切换用户' },
    ]
    pageTemps = [
      { value: 'linkpage', text: '关联菜单' },
      { value: 'billprint', text: '单据打印' },
      { value: 'pay', text: Formdict['model.pay'] },
      { value: 'custom', text: '链接' }
    ]
  }
  
  if (type === 'chart' && appType !== 'mob') {
@@ -257,13 +257,12 @@
      options: printTemps
    },
    {
      type: 'select',
      type: isApp ? 'select' : 'cascader',
      key: 'linkmenu',
      label: '关联菜单',
      initVal: card.linkmenu || '',
      initVal: card.linkmenu || (isApp ? '' : []),
      required: true,
      forbid: !isApp,
      options: appMenus
      options: isApp ? appMenus : menulist
    },
    {
      type: 'textarea',
@@ -374,15 +373,6 @@
      initVal: card.Ot || (card.sqlType === 'insert' ? 'notRequired' : 'requiredSgl'),
      required: true,
      options: []
    },
    {
      type: 'cascader',
      key: 'linkmenu',
      label: Formdict['model.form.linkmenu'],
      initVal: card.linkmenu || [],
      required: true,
      forbid: isApp,
      options: menulist
    },
    {
      type: 'select',
@@ -628,15 +618,6 @@
      tooltip: '执行成功后(或功能按钮中标签关闭类型),需要同步刷新的菜单',
      required: false,
      forbid: isApp || viewType === 'popview',
      options: menulist
    },
    {
      type: 'cascader',
      key: 'linkmenu',
      label: Formdict['model.form.linkmenu'],
      initVal: card.linkmenu || [],
      required: true,
      forbid: isApp,
      options: menulist
    },
    {