| | |
| | | */ |
| | | export default function (wrap, buttons, columns) { |
| | | let menu = window.GLOB.customMenu |
| | | let MenuType = menu.parentId === 'BillPrintTemp' ? 'billPrint' : '' |
| | | let isprint = sessionStorage.getItem('MenuType') === 'billPrint' |
| | | let ispop = sessionStorage.getItem('editMenuType') === 'popview' |
| | | |
| | | let modules = MenuUtils.getLinkModules(menu.components) || [] |
| | | let supmodules = MenuUtils.getSupModules(menu.components, '', menu.interfaces) |
| | |
| | | } |
| | | } else { |
| | | roleList = [] |
| | | } |
| | | |
| | | if (wrap.datatype === 'public' && MenuType === 'billPrint') { |
| | | wrap.datatype = 'static' |
| | | } |
| | | |
| | | const balconyWrapForm = [ |
| | |
| | | options: [ |
| | | {value: 'dynamic', label: '动态'}, |
| | | {value: 'static', label: '静态'}, |
| | | {value: 'public', label: '公共数据源', disabled: MenuType === 'billPrint'}, |
| | | {value: 'public', label: '公共数据源'}, |
| | | ], |
| | | controlFields: [ |
| | | {field: 'empty', values: ['dynamic']}, |
| | |
| | | <div>2、同步类型中公式、按钮以及全选元素比较特殊,操作数据为其同步组件的数据。</div> |
| | | <div>3、上级类型需添加当前组件的上级组件,并可设置当前组件为始终显示,还是只有在上级组件选行后才显示。</div> |
| | | </div>, |
| | | toolWidth: 400, |
| | | required: false, |
| | | options: [ |
| | | {value: 'static', label: '独立'}, |
| | |
| | | {field: 'syncModule', values: ['sync']}, |
| | | {field: 'checkAll', values: ['sync']}, |
| | | ], |
| | | forbid: MenuType === 'billPrint' |
| | | forbid: isprint |
| | | }, |
| | | { |
| | | type: 'cascader', |
| | |
| | | initval: wrap.supModule || [], |
| | | // tooltip: '当上级组件不存在或没有权限时,当前组件不显示。', |
| | | required: true, |
| | | options: supmodules |
| | | options: supmodules, |
| | | forbid: isprint |
| | | }, |
| | | { |
| | | type: 'radio', |
| | |
| | | options: [ |
| | | {value: 'hidden', label: '选行'}, |
| | | {value: 'show', label: '始终'}, |
| | | ] |
| | | ], |
| | | forbid: isprint |
| | | }, |
| | | { |
| | | type: 'cascader', |
| | |
| | | initval: wrap.syncModule || '', |
| | | tooltip: '当同步组件不存在或没有权限时,当前组件不显示。', |
| | | required: true, |
| | | options: modules |
| | | options: modules, |
| | | forbid: isprint |
| | | }, |
| | | { |
| | | type: 'radio', |
| | |
| | | options: [ |
| | | {value: 'hidden', label: '隐藏'}, |
| | | {value: 'show', label: '显示'}, |
| | | ] |
| | | ], |
| | | forbid: isprint |
| | | }, |
| | | { |
| | | type: 'radio', |
| | |
| | | {value: 'content', label: '浮动卡'}, |
| | | {value: 'headerOrfooter', label: '页眉/页脚'}, |
| | | ], |
| | | forbid: MenuType !== 'billPrint' |
| | | forbid: !isprint |
| | | }, |
| | | { |
| | | type: 'radio', |
| | |
| | | initval: wrap.permission || (!appType ? 'true' : 'false'), |
| | | required: false, |
| | | options: [ |
| | | {value: 'true', label: '启用'}, |
| | | {value: 'true', label: !appType ? '继承菜单' : '启用'}, |
| | | {value: 'false', label: '禁用'}, |
| | | ], |
| | | forbid: sessionStorage.getItem('editMenuType') === 'popview' |
| | | forbid: ispop || isprint |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | field: 'cacheLocal', |
| | | label: '本地缓存', |
| | | initval: wrap.cacheLocal || 'true', |
| | | required: false, |
| | | options: [ |
| | | {value: 'true', label: '继承菜单'}, |
| | | {value: 'false', label: '禁用'}, |
| | | ], |
| | | forbid: ispop || isprint |
| | | }, |
| | | { |
| | | type: 'select', |
| | |
| | | initval: wrap.linkbtn || '', |
| | | required: false, |
| | | options: buttons, |
| | | forbid: MenuType === 'billPrint' |
| | | forbid: isprint |
| | | }, |
| | | { |
| | | type: 'multiselect', |
| | |
| | | initval: wrap.blacklist || [], |
| | | required: false, |
| | | options: roleList, |
| | | forbid: !!appType |
| | | forbid: !!appType || isprint |
| | | }, |
| | | ] |
| | | |