| | |
| | | * @param {*} usefulFields 存储过程可用的开始字段 |
| | | * @param {*} type 按钮类型,用于区分可选的打开方式 |
| | | */ |
| | | export function getActionForm (card, functip, setting, usefulFields, type, menulist = [], modules = []) { |
| | | export function getActionForm (card, functip, setting, usefulFields, type, menulist = [], modules = [], columns = []) { |
| | | let appMenus = [] |
| | | let opentypes = [ |
| | | { |
| | |
| | | type: 'radio', |
| | | key: 'show', |
| | | label: "显示为", |
| | | initVal: card.show || 'icon', |
| | | initVal: card.show || 'button', |
| | | required: true, |
| | | options: [{ |
| | | value: 'icon', |
| | |
| | | initVal: card.syncComponent || [], |
| | | required: false, |
| | | options: modules |
| | | }, |
| | | { |
| | | type: 'select', |
| | | key: 'controlField', |
| | | label: '控制字段', |
| | | tooltip: '显示控制字段,可根据行数据控制按钮是否显示。', |
| | | initVal: card.controlField || '', |
| | | required: false, |
| | | forbid: card.$type !== 'tableButton', |
| | | options: [{label: '无', field: ''}, ...columns] |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'controlVal', |
| | | label: '控制值', |
| | | tooltip: '当选择控制字段,且字段值与控制值相等时,按钮会隐藏,多个值用逗号分隔。', |
| | | initVal: card.controlVal || '', |
| | | forbid: card.$type !== 'tableButton', |
| | | required: false |
| | | } |
| | | ] |
| | | |