| | |
| | | } else if (value === 'excelOut') { |
| | | _fieldval.label = this.props.dict['model.form.excelOut'] |
| | | _fieldval.class = 'dgreen' |
| | | _fieldval.control = '' |
| | | this.record.control = '' |
| | | } |
| | | |
| | | if (appType !== 'mob' && _fieldval.Ot === 'notRequired') { |
| | |
| | | export function getActionForm (card, functip, config, usefulFields, type, menulist = [], modules = []) { |
| | | let appType = sessionStorage.getItem('appType') |
| | | let viewType = sessionStorage.getItem('editMenuType') // 弹窗 popview |
| | | let printTemps = sessionStorage.getItem('printTemps') || [] |
| | | let printTemps = sessionStorage.getItem('printTemps') |
| | | printTemps = printTemps ? JSON.parse(printTemps) : [] |
| | | let setting = config.setting || {} |
| | | let columns = config.columns || [] |
| | | let appMenus = [] |
| | |
| | | } else { |
| | | appMenus = [] |
| | | } |
| | | |
| | | if (appType === 'mob') { |
| | | opentypes = opentypes.filter(item => ['pop', 'prompt', 'exec', 'innerpage', 'funcbutton'].includes(item.value)) |
| | | funTypes = [ |
| | | { value: 'scan', text: '扫码' }, |
| | | { value: 'logout', text: '退出' }, |
| | | { value: 'mkBinding', text: '开通扫码登录' }, |
| | | { value: 'mkUnBinding', text: '用户解绑' }, |
| | | { value: 'reAuth', text: '切换系统(清空缓存-小程序)' }, |
| | | { value: 'goBack', text: '返回' }, |
| | | ] |
| | | pageTemps = [ |
| | | { value: 'linkpage', text: '关联菜单' }, |
| | | { value: 'custom', text: '链接' } |
| | | ] |
| | | } else { |
| | | pageTemps = [ |
| | | { value: 'linkpage', text: '关联菜单' }, |
| | | { value: 'billprint', text: '单据打印' }, |
| | | { value: 'pay', text: Formdict['model.pay'] }, |
| | | { value: 'custom', text: '链接' } |
| | | ] |
| | | funTypes = [ |
| | | { value: 'changeuser', text: '切换用户' }, |
| | | ] |
| | | opentypes = opentypes.filter(item => item.value !== 'tab') |
| | | } |
| | | } |
| | | if (appType === 'mob') { |
| | | opentypes = opentypes.filter(item => ['pop', 'prompt', 'exec', 'innerpage', 'funcbutton'].includes(item.value)) |
| | | funTypes = [ |
| | | { value: 'scan', text: '扫码' }, |
| | | { value: 'logout', text: '退出' }, |
| | | { value: 'mkBinding', text: '开通扫码登录' }, |
| | | { value: 'mkUnBinding', text: '用户解绑' }, |
| | | { value: 'reAuth', text: '切换系统(清空缓存-小程序)' }, |
| | | { value: 'goBack', text: '返回' }, |
| | | ] |
| | | pageTemps = [ |
| | | { value: 'linkpage', text: '关联菜单' }, |
| | | { value: 'custom', text: '链接' } |
| | | ] |
| | | } else if (appType === 'pc') { |
| | | opentypes = opentypes.filter(item => item.value !== 'tab') |
| | | funTypes = [ |
| | | { value: 'changeuser', text: '切换用户' }, |
| | | ] |
| | | pageTemps = [ |
| | | { value: 'linkpage', text: '关联菜单' }, |
| | | { value: 'billprint', text: '单据打印' }, |
| | | { value: 'pay', text: Formdict['model.pay'] }, |
| | | { value: 'custom', text: '链接' } |
| | | ] |
| | | } |
| | | |
| | | if (type === 'chart' && appType !== 'mob') { |
| | |
| | | options: printTemps |
| | | }, |
| | | { |
| | | type: 'select', |
| | | type: isApp ? 'select' : 'cascader', |
| | | key: 'linkmenu', |
| | | label: '关联菜单', |
| | | initVal: card.linkmenu || '', |
| | | initVal: card.linkmenu || (isApp ? '' : []), |
| | | required: true, |
| | | forbid: !isApp, |
| | | options: appMenus |
| | | options: isApp ? appMenus : menulist |
| | | }, |
| | | { |
| | | type: 'textarea', |
| | |
| | | initVal: card.Ot || (card.sqlType === 'insert' ? 'notRequired' : 'requiredSgl'), |
| | | required: true, |
| | | options: [] |
| | | }, |
| | | { |
| | | type: 'cascader', |
| | | key: 'linkmenu', |
| | | label: Formdict['model.form.linkmenu'], |
| | | initVal: card.linkmenu || [], |
| | | required: true, |
| | | forbid: isApp, |
| | | options: menulist |
| | | }, |
| | | { |
| | | type: 'select', |
| | |
| | | tooltip: '执行成功后(或功能按钮中标签关闭类型),需要同步刷新的菜单', |
| | | required: false, |
| | | forbid: isApp || viewType === 'popview', |
| | | options: menulist |
| | | }, |
| | | { |
| | | type: 'cascader', |
| | | key: 'linkmenu', |
| | | label: Formdict['model.form.linkmenu'], |
| | | initVal: card.linkmenu || [], |
| | | required: true, |
| | | forbid: isApp, |
| | | options: menulist |
| | | }, |
| | | { |