king
2020-05-05 92108e6c93de657838bbd766a9eb4f27d85e1c2d
src/templates/zshare/formconfig.jsx
@@ -1703,14 +1703,14 @@
      type: 'number',
      key: 'min',
      label: '最小值',
      initVal: card.min || '',
      initVal: card.min || card.min === 0 ? card.min : '',
      required: false
    },
    {
      type: 'number',
      key: 'max',
      label: '最大值',
      initVal: card.max || '',
      initVal: card.max || card.max === 0 ? card.max : '',
      required: false
    },
    {
@@ -1879,4 +1879,103 @@
      options: roleList
    }
  ]
}
/**
 * @description 获取子菜单基本信息表单配置信息
 * @param {object} card  // 标签配置信息
 */
export function getTabForm (card, supMenu, menus, equalTab, equalTabs, type) {
  return [
    {
      type: 'text',
      key: 'label',
      label: Formdict['header.menu.tabName'],
      initVal: card.label || '',
      required: true
    },
    {
      type: 'select',
      key: 'type',
      label: Formdict['header.form.tabType'],
      initVal: card.type || 'SubTable',
      required: true,
      options: [{
        value: 'SubTable',
        text: Formdict['header.menu.tab.subtable']
      }]
    },
    {
      type: 'select',
      key: 'linkTab',
      label: Formdict['header.form.linkTab'],
      initVal: card.linkTab || '',
      required: false,
      options: []
    },
    {
      type: 'select',
      key: 'icon',
      label: Formdict['header.menu.icon'],
      initVal: card.icon || '',
      required: false,
      options: [{
        value: '',
        text: Formdict['header.form.empty']
      }, {
        value: 'table',
        text: 'table'
      }, {
        value: 'bar-chart',
        text: 'bar-chart'
      }, {
        value: 'pie-chart',
        text: 'pie-chart'
      }, {
        value: 'line-chart',
        text: 'line-chart'
      }]
    },
    {
      type: 'select',
      key: 'supMenu',
      label: Formdict['header.form.supTab'],
      initVal: supMenu,
      required: false,
      options: menus
    },
    {
      type: 'mutilselect',
      key: 'equalTab',
      label: Formdict['header.form.equalTab'],
      tooltip: '如果子标签中含有刷新同级标签的按钮,在此处添加需要刷新的标签。',
      initVal: equalTab,
      required: false,
      options: equalTabs
    },
    {
      type: 'text',
      key: 'foreignKey',
      label: '外键',
      tooltip: '外键旨在标签页中执行默认函数(添加)时,替换BID字段',
      initVal: card.foreignKey || '',
      required: false
    },
    {
      type: 'radio',
      key: 'searchPass',
      label: '主表搜索',
      initVal: card.searchPass || 'false',
      tooltip: '使用主表搜索条件时,主表的搜索条件会传入子表中。',
      required: false,
      forbid: type !== 'main',
      options: [{
        value: 'true',
        text: '使用'
      }, {
        value: 'false',
        text: '不使用'
      }]
    }
  ]
}