| | |
| | | */ |
| | | export default function (wrap, subtype, columns = [], id = '', supNodes = [], setting, buttons = []) { |
| | | let appType = sessionStorage.getItem('appType') |
| | | let MenuType = '' |
| | | let isprint = sessionStorage.getItem('MenuType') === 'billPrint' |
| | | let ispop = sessionStorage.getItem('editMenuType') === 'popview' |
| | | let menu = window.GLOB.customMenu |
| | | let laypage = setting && setting.laypage !== 'false' |
| | | let interfaces = [] |
| | |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | if (menu.parentId === 'BillPrintTemp') { |
| | | MenuType = 'billPrint' |
| | | } |
| | | let modules = [] |
| | | if (subtype === 'propcard' || subtype === 'datacard') { |
| | |
| | | {field: 'empty', values: ['dynamic', 'public']}, |
| | | {field: 'jump', values: ['dynamic', 'public']}, |
| | | {field: 'broadcast', values: ['dynamic', 'public']}, |
| | | {field: 'autoExec', values: ['dynamic', 'public']}, |
| | | {field: 'supModule', values: ['static']}, |
| | | {field: 'publicId', values: ['public']}, |
| | | ], |
| | |
| | | options: [ |
| | | {value: 'page', label: '页码'}, |
| | | {value: 'switch', label: '左右切换', forbid: appType === 'mob' || subtype === 'tablecard'}, |
| | | {value: 'slide', label: '滑动加载', forbid: appType !== 'mob' || sessionStorage.getItem('editMenuType') === 'popview'}, |
| | | {value: 'slide', label: '滑动加载', forbid: appType !== 'mob' || ispop}, |
| | | {value: 'more', label: '查看更多'}, |
| | | ], |
| | | controlFields: [ |
| | |
| | | ], |
| | | forbid: subtype === 'tablecard' |
| | | }, |
| | | // { |
| | | // type: 'radio', |
| | | // field: 'checkAll', |
| | | // label: '全选', |
| | | // initval: wrap.checkAll || 'hidden', |
| | | // required: false, |
| | | // options: [ |
| | | // {value: 'hidden', label: '隐藏'}, |
| | | // {value: 'show', label: '显示'}, |
| | | // ], |
| | | // forbid: subtype !== 'datacard' || appType !== 'mob' |
| | | // }, |
| | | { |
| | | type: 'radio', |
| | | field: 'cardFloat', |
| | |
| | | field: 'printType', |
| | | label: '组件类型', |
| | | initval: wrap.printType || 'content', |
| | | tooltip: '选择类型为《页眉/页脚》时,打印的每页里都会带有该组件。', |
| | | tooltip: '选择类型为《页眉/页脚》时,打印的每页里都会带有该组件。注:页眉页脚中文本元素将替换 @pageIndex@(页码)、@total@(总数)、@date@(当前日期)、@datetime@(当前时间),使用分页参数时注意打印模板的页面布局使用分页。', |
| | | required: false, |
| | | options: [ |
| | | {value: 'content', label: '内容'}, |
| | | {value: 'content', label: '属性卡'}, |
| | | {value: 'headerOrfooter', label: '页眉/页脚'}, |
| | | ], |
| | | controlFields: [ |
| | | {field: 'printHeight', values: ['content']}, |
| | | ], |
| | | forbid: subtype !== 'propcard' || MenuType !== 'billPrint' |
| | | forbid: subtype !== 'propcard' || !isprint |
| | | }, |
| | | { |
| | | type: 'number', |
| | |
| | | initval: wrap.printHeight || '', |
| | | tooltip: subtype !== 'propcard' ? '当前数据卡高度相当于几条数据。' : '当前属性卡高度相当于几条数据。', |
| | | required: false, |
| | | forbid: subtype === 'tablecard' || MenuType !== 'billPrint' |
| | | forbid: subtype === 'tablecard' || !isprint |
| | | }, |
| | | { |
| | | type: 'select', |
| | |
| | | {value: 'true', label: '验证'}, |
| | | {value: 'false', label: '忽略'}, |
| | | ], |
| | | forbid: subtype !== 'datacard' |
| | | forbid: subtype !== 'datacard' || isprint |
| | | }, |
| | | { |
| | | type: 'cascader', |
| | |
| | | required: false, |
| | | options: modules, |
| | | allowClear: true, |
| | | forbid: subtype !== 'propcard' |
| | | forbid: subtype !== 'propcard' || isprint |
| | | }, |
| | | { |
| | | type: 'select', |
| | |
| | | initval: wrap.supType || 'single', |
| | | tooltip: '上级组件为单一组件或多个组件。', |
| | | required: false, |
| | | forbid: subtype !== 'datacard' || appType === 'mob', |
| | | forbid: subtype !== 'datacard' || appType === 'mob' || isprint, |
| | | options: [ |
| | | {value: 'single', label: '单组件'}, |
| | | {value: 'multi', label: '多组件'}, |
| | |
| | | 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: 'multiselect', |
| | |
| | | initval: wrap.blacklist || [], |
| | | required: false, |
| | | options: roleList, |
| | | forbid: !!appType |
| | | forbid: !!appType || isprint |
| | | }, |
| | | { |
| | | type: 'text', |
| | |
| | | label: '上级组件', |
| | | initval: supNodes, |
| | | required: true, |
| | | forbid: subtype !== 'datacard' || appType === 'mob', |
| | | forbid: subtype !== 'datacard' || appType === 'mob' || isprint, |
| | | span: 24, |
| | | columns: [ |
| | | { |