king
2022-06-09 69070570c9b5c4f1c5ca38eaf052f1a72e5fd888
2022-06-09
6个文件已修改
114 ■■■■ 已修改文件
src/menu/components/card/cardcomponent/options.jsx 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/cardsimplecomponent/options.jsx 48 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/form/formaction/actionform/index.jsx 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/form/formaction/formconfig.jsx 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/share/actioncomponent/actionform/index.jsx 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/share/actioncomponent/formconfig.jsx 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/cardcomponent/options.jsx
@@ -154,10 +154,10 @@
      initval: setting.open || 'blank',
      required: false,
      options: [
        {value: 'blank', label: '新窗口'},
        {value: 'self', label: '当前窗口'},
        {value: 'blank', label: appType !== 'mob' ? '新窗口' : '新页面'},
        {value: 'self', label: appType !== 'mob' ? '当前窗口' : '当前页面'},
      ],
      forbid: appType !== 'pc'
      forbid: appType !== 'pc' && appType !== 'mob'
    },
    {
      type: 'radio',
src/menu/components/card/cardsimplecomponent/options.jsx
@@ -111,6 +111,18 @@
      ],
    },
    {
      type: 'radio',
      field: 'open',
      label: '打开方式',
      initval: setting.open || 'blank',
      required: false,
      options: [
        {value: 'blank', label: appType !== 'mob' ? '新窗口' : '新页面'},
        {value: 'self', label: appType !== 'mob' ? '当前窗口' : '当前页面'},
      ],
      forbid: appType !== 'pc' && appType !== 'mob'
    },
    {
      type: appType ? 'select' : 'cascader',
      field: 'menu',
      label: '关联菜单',
@@ -127,18 +139,6 @@
      required: true,
      options: [],
      span: 24
    },
    {
      type: 'radio',
      field: 'open',
      label: '打开方式',
      initval: setting.open || 'blank',
      required: false,
      options: [
        {value: 'blank', label: '新窗口'},
        {value: 'self', label: '当前窗口'},
      ],
      forbid: appType !== 'pc'
    },
    {
      type: 'select',
@@ -236,25 +236,16 @@
      options: appType ? appmenulist : menulist,
    },
    {
      type: 'textarea',
      field: 'linkurl',
      label: '链接',
      initval: setting.linkurl || '',
      required: true,
      options: [],
      span: 24
    },
    {
      type: 'radio',
      field: 'open',
      label: '打开方式',
      initval: setting.open || 'blank',
      required: false,
      options: [
        {value: 'blank', label: '新窗口'},
        {value: 'self', label: '当前窗口'},
        {value: 'blank', label: appType !== 'mob' ? '新窗口' : '新页面'},
        {value: 'self', label: appType !== 'mob' ? '当前窗口' : '当前页面'},
      ],
      forbid: appType !== 'pc'
      forbid: appType !== 'pc' && appType !== 'mob'
    },
    {
      type: 'radio',
@@ -267,6 +258,15 @@
        {value: 'false', label: '否'},
      ],
    },
    {
      type: 'textarea',
      field: 'linkurl',
      label: '链接',
      initval: setting.linkurl || '',
      required: true,
      options: [],
      span: 24
    },
  ]
  return cardSettingForm
src/menu/components/form/formaction/actionform/index.jsx
@@ -21,6 +21,7 @@
    formlist: null,  // 表单信息
    interType: null, // 接口类型:内部、外部
    procMode: null,  // 参数方式
    linkmenu: null
  }
  
@@ -30,11 +31,12 @@
    let _intertype = card.intertype || 'system'  // 接口类型
    let _procMode = card.procMode || 'system'    // 参数请求方式
    let _options = this.getOptions(_intertype, _procMode)
    let _options = this.getOptions(_intertype, _procMode, card.linkmenu)
    this.setState({
      interType: _intertype,
      procMode: _procMode,
      linkmenu: card.linkmenu,
      formlist: this.props.formlist.map(item => {
        if (item.key === 'innerFunc' && _procMode === 'inner') {
          item.required = true
@@ -46,7 +48,7 @@
    })
  }
  getOptions = (_intertype, _procMode) => {
  getOptions = (_intertype, _procMode, linkmenu) => {
    const { card } = this.props
    if (card.type === 'prev') {
@@ -54,7 +56,7 @@
    } else if (card.type === 'next') {
      return ['type', 'label', 'enable']
    }
    let _options = ['type', 'label', 'intertype', 'Ot', 'execSuccess', 'syncComponent', 'anchors', 'linkmenu', 'open', 'enable', 'output', 'reload'] // 选项列表
    let _options = ['type', 'label', 'intertype', 'Ot', 'execSuccess', 'syncComponent', 'anchors', 'linkmenu', 'enable', 'output', 'reload'] // 选项列表
    
    if (_intertype === 'custom') {
      _options.pop()
@@ -72,6 +74,10 @@
      _options.push('sql', 'sqlType')
    }
    if (linkmenu && linkmenu !== 'goback') {
      _options.push('open')
    }
    return _options
  }
@@ -82,10 +88,10 @@
   * 3、切换标签类型,重置可选标签
   */
  optionChange = (key, value) => {
    const { procMode } = this.state
    const { procMode, linkmenu } = this.state
    if (key === 'intertype') {
      let _options = this.getOptions(value, procMode)
      let _options = this.getOptions(value, procMode, linkmenu)
      this.setState({
        interType: value,
@@ -101,7 +107,7 @@
        })
      })
    } else if (key === 'procMode') {
      let _options = this.getOptions(this.state.interType, value)
      let _options = this.getOptions(this.state.interType, value, linkmenu)
      this.setState({
        procMode: value,
@@ -114,6 +120,16 @@
          return item
        })
      })
    } else if (key === 'linkmenu') {
      let _options = this.getOptions(this.state.interType, procMode, value)
      this.setState({
        linkmenu: value,
        formlist: this.state.formlist.map(item => {
          item.hidden = !_options.includes(item.key)
          return item
        })
      })
    } else if (key === 'sysInterface') {
      if (value === 'true') {
        this.props.form.setFieldsValue({
src/menu/components/form/formaction/formconfig.jsx
@@ -297,14 +297,11 @@
      label: '打开方式',
      initVal: card.open || 'blank',
      required: false,
      forbid: appType !== 'pc',
      options: [{
        value: 'blank',
        text: '新窗口'
      }, {
        value: 'self',
        text: '当前窗口'
      }]
      forbid: appType !== 'pc' && appType !== 'mob',
      options: [
        {value: 'blank', text: appType !== 'mob' ? '新窗口' : '新页面'},
        {value: 'self', text: appType !== 'mob' ? '当前窗口' : '当前页面'},
      ]
    },
    {
      type: 'cascader',
src/menu/components/share/actioncomponent/actionform/index.jsx
@@ -18,7 +18,7 @@
  excelOut: ['label', 'OpenType', 'intertype', 'show', 'icon', 'class', 'color', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'pagination', 'search', 'width', 'hidden'],
  popview: ['label', 'Ot', 'OpenType', 'show', 'icon', 'class', 'color', 'popClose', 'width', 'display', 'ratio', 'syncComponent', 'clickouter', 'hidden'],
  tab: ['label', 'Ot', 'OpenType', 'show', 'icon', 'class', 'color', 'linkmenu', 'width', 'hidden'],
  innerpage: ['label', 'Ot', 'OpenType', 'pageTemplate', 'show', 'swipe', 'icon', 'class', 'color', 'width', 'open', 'hidden'],
  innerpage: ['label', 'Ot', 'OpenType', 'pageTemplate', 'show', 'swipe', 'icon', 'class', 'color', 'width', 'hidden'],
  funcbutton: ['label', 'OpenType', 'funcType', 'show', 'swipe', 'icon', 'class', 'color', 'width', 'hidden'],
  form: ['label', 'OpenType', 'formType', 'intertype', 'Ot', 'execSuccess', 'execError', 'syncComponent', 'width', 'refreshTab', 'title', 'hidden']
}
@@ -318,9 +318,9 @@
      reOptions.Ot = requireOptions.filter(op => ['notRequired', 'requiredSgl'].includes(op.value))
      if (this.record.pageTemplate === 'custom') {
        shows.push('url', 'joint')
        shows.push('url', 'joint', 'open')
      } else if (this.record.pageTemplate === 'linkpage') {
        shows.push('linkmenu')
        shows.push('linkmenu', 'open')
        if (Ot === 'requiredSgl') {
          shows.push('joint')
src/menu/components/share/actioncomponent/formconfig.jsx
@@ -724,16 +724,13 @@
      key: 'open',
      label: '打开方式',
      initVal: card.open || 'blank',
      tooltip: '菜单打开方式。注:移动端只在小程序或app中有效。',
      tooltip: '菜单打开方式。',
      required: true,
      forbid: appType !== 'pc' && appType !== 'mob',
      options: [{
        value: 'blank',
        text: '新窗口'
      }, {
        value: 'self',
        text: '当前窗口'
      }]
      options: [
        {value: 'blank', text: appType !== 'mob' ? '新窗口' : '新页面'},
        {value: 'self', text: appType !== 'mob' ? '当前窗口' : '当前页面'},
      ]
    },
    {
      type: 'radio',