| | |
| | | /** |
| | | * @description Wrap表单配置信息 |
| | | */ |
| | | export default function (wrap, subtype, columns = [], id = '') { |
| | | export default function (wrap, subtype, columns = [], id = '', supNodes = []) { |
| | | let appType = sessionStorage.getItem('appType') |
| | | let MenuType = '' |
| | | let menu = fromJS(window.GLOB.customMenu).toJS() |
| | |
| | | MenuType = 'billPrint' |
| | | } |
| | | let modules = [] |
| | | if (subtype === 'propcard') { |
| | | if (subtype === 'propcard' || subtype === 'datacard') { |
| | | modules = MenuUtils.getSupModules(menu.components, id) || [] |
| | | } |
| | | |
| | |
| | | {value: 'false', label: '无'}, |
| | | {value: 'init', label: '初始化'}, |
| | | {value: 'always', label: '数据加载'}, |
| | | ] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | field: 'supType', |
| | | label: '上级类型', |
| | | initval: wrap.supType || 'single', |
| | | tooltip: '上级组件为单一组件或多个组件。', |
| | | required: false, |
| | | forbid: subtype !== 'datacard' || appType === 'mob', |
| | | options: [ |
| | | {value: 'single', label: '单组件'}, |
| | | {value: 'multi', label: '多组件'}, |
| | | ] |
| | | }, |
| | | { |
| | |
| | | forbid: subtype !== 'datacard' |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | field: 'supType', |
| | | label: '上级类型', |
| | | initval: wrap.supType || 'single', |
| | | tooltip: '上级组件为单一组件或多个组件。', |
| | | required: false, |
| | | forbid: subtype !== 'datacard' || appType === 'mob', |
| | | options: [ |
| | | {value: 'single', label: '单组件'}, |
| | | {value: 'multi', label: '多组件'}, |
| | | ], |
| | | controlFields: [ |
| | | {field: 'supNodes', values: ['multi']}, |
| | | ] |
| | | }, |
| | | { |
| | | type: 'multiselect', |
| | | field: 'blacklist', |
| | | label: '黑名单', |
| | |
| | | options: roleList, |
| | | forbid: !!appType |
| | | }, |
| | | { |
| | | type: 'table', |
| | | field: 'supNodes', |
| | | label: '上级组件', |
| | | initval: supNodes, |
| | | required: true, |
| | | forbid: subtype !== 'datacard' || appType === 'mob', |
| | | span: 24, |
| | | columns: [ |
| | | { |
| | | title: '序号', |
| | | dataIndex: '$index', |
| | | editable: false, |
| | | required: false, |
| | | width: '20%' |
| | | }, |
| | | { |
| | | title: '菜单', |
| | | dataIndex: 'nodes', |
| | | inputType: 'cascader', |
| | | editable: true, |
| | | required: true, |
| | | extends: [{key: 'label', value: 'label'}], |
| | | width: '50%', |
| | | render: (text, record) => record.label, |
| | | options: modules |
| | | } |
| | | ] |
| | | } |
| | | ] |
| | | |
| | | return cardWrapForm.map(item => { |