| | |
| | | * @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', |
| | |
| | | } |
| | | ] |
| | | |
| | | 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', |
| | |
| | | initVal: card.pageTemplate || '', |
| | | required: true, |
| | | options: [{ |
| | | value: 'print', |
| | | text: Formdict['header.menu.printTemplate'] |
| | | value: 'billprint', |
| | | text: '单据打印' |
| | | }, { |
| | | value: 'pay', |
| | | text: Formdict['model.pay'] |
| | |
| | | }] |
| | | }, |
| | | { |
| | | 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: "显示为", |
| | |
| | | text: '非必填' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'mcascader', |
| | | key: 'syncComponent', |
| | | label: '同步刷新', |
| | | initVal: card.syncComponent || [], |
| | | required: false, |
| | | options: modules |
| | | }, |
| | | // { |
| | | // type: 'select', |
| | | // key: 'linkcomponents', |
| | |
| | | // } |
| | | ] |
| | | |
| | | // if (type === 'chart') { |
| | | // return forms |
| | | // } |
| | | return forms |
| | | } |