| | |
| | | */ |
| | | export function getActionForm (card, functip, config, usefulFields, type, menulist = [], modules = []) { |
| | | let appType = sessionStorage.getItem('appType') |
| | | let viewType = sessionStorage.getItem('editMenuType') // 弹窗 popview |
| | | let setting = config.setting || {} |
| | | let columns = config.columns || [] |
| | | let appMenus = [] |
| | |
| | | } |
| | | |
| | | let refresh = [] |
| | | if (sessionStorage.getItem('editMenuType') === 'popview') { // 弹窗标签 |
| | | if (viewType === 'popview') { // 弹窗标签 |
| | | opentypes = opentypes.filter(item => item.value !== 'popview' && item.value !== 'funcbutton') |
| | | refresh.push({ |
| | | value: 'popclose', |
| | |
| | | initVal: card.refreshTab || [], |
| | | tooltip: '执行成功后或标签关闭时,需要同步刷新的菜单', |
| | | required: false, |
| | | forbid: isApp, |
| | | forbid: isApp || viewType === 'popview', |
| | | options: menulist |
| | | }, |
| | | { |
| | |
| | | required: false |
| | | }, |
| | | { |
| | | type: 'select', |
| | | type: 'cascader', |
| | | key: 'linkmenu', |
| | | label: Formdict['model.form.linkmenu'], |
| | | initVal: card.linkmenu || [], |
| | | required: true, |
| | | forbid: isApp, |
| | | options: menulist |
| | | }, |
| | | { |
| | | type: !appType ? 'cascader' : 'select', |
| | | key: 'openmenu', |
| | | label: '打开菜单', |
| | | tooltip: '执行成功后需要打开的菜单。', |
| | | initVal: card.openmenu || '', |
| | | forbid: appType !== 'pc' && appType !== 'mob', |
| | | initVal: card.openmenu || (!appType ? [] : ''), |
| | | required: false, |
| | | allowClear: true, |
| | | options: appType !== 'mob' ? appMenus : [...appMenus, {value: 'goback', text: '返回'}] |
| | | options: appType === 'mob' ? [...appMenus, {value: 'goback', text: '返回'}] : (appType === 'pc' ? appMenus : menulist), |
| | | forbid: viewType === 'popview' |
| | | }, |
| | | { |
| | | type: 'text', |
| | |
| | | label: '返回值', |
| | | tooltip: '执行成功后的返回值。', |
| | | initVal: card.output || '', |
| | | forbid: appType !== 'pc' && appType !== 'mob', |
| | | required: false |
| | | required: false, |
| | | forbid: viewType === 'popview' |
| | | }, |
| | | { |
| | | type: 'radio', |