king
2020-11-10 5df578ff69f6b02e821d59a8883bc75d78695a62
src/menu/actioncomponent/formconfig.jsx
@@ -11,7 +11,7 @@
 * @param {*} permFuncField  存储过程可用的开始字段
 * @param {*} type           按钮类型,用于区分可选的打开方式
 */
export function getActionForm (card, functip, setting, permFuncField = [], type, menulist = []) {
export function getActionForm (card, functip, setting, permFuncField = [], type, menulist = [], modules = []) {
  let opentypes = [
    {
      value: 'pop',
@@ -43,23 +43,7 @@
    }
  ]
  if (card.intertype === 'inner' && !card.innerFunc) {
    card.intertype = 'system'
  }
  if (type === 'chart') {
    if (card.focus) {
      // 导入和导出excel,按钮名称直接为导入、导出
      card.label = '导出Excel'
      card.OpenType = 'excelOut'
      card.icon = 'download'
      card.intertype = setting.interType
      card.innerFunc = setting.innerFunc
      card.sysInterface = setting.sysInterface
      card.outerFunc = setting.outerFunc
      card.interface = setting.interface
      card.class = 'dgreen'
    }
    opentypes = [
      {
        value: 'excelIn',
@@ -166,8 +150,8 @@
      initVal: card.pageTemplate || '',
      required: true,
      options: [{
        value: 'print',
        text: Formdict['header.menu.printTemplate']
        value: 'billprint',
        text: '单据打印'
      }, {
        value: 'pay',
        text: Formdict['model.pay']
@@ -308,6 +292,18 @@
      }]
    },
    {
      type: 'number',
      key: 'width',
      min: 1,
      max: 24,
      precision: 0,
      label: '宽度',
      initVal: card.width || 12,
      tooltip: '栅格布局,每行等分为24列。',
      forbid: type !== 'card',
      required: true
    },
    {
      type: 'select',
      key: 'show',
      label: "显示为",
@@ -389,6 +385,14 @@
        text: '非必填'
      }]
    },
    {
      type: 'mcascader',
      key: 'syncComponent',
      label: '同步刷新',
      initVal: card.syncComponent || [],
      required: false,
      options: modules
    },
    // {
    //   type: 'select',
    //   key: 'linkcomponents',
@@ -399,8 +403,5 @@
    // }
  ]
  // if (type === 'chart') {
  //   return forms
  // }
  return forms
}