| | |
| | | ] |
| | | |
| | | let getTabs = (list) => { |
| | | return list.filter(item => { |
| | | if (item.type !== 'tabs') return false |
| | | let _list = [] |
| | | list.forEach(item => { |
| | | if (item.type !== 'tabs') return |
| | | |
| | | item.children = item.children.map(cell => { |
| | | cell.children = getTabs(cell.children) |
| | | return cell |
| | | _list.push({ |
| | | value: item.uuid, |
| | | label: item.name, |
| | | children: item.subtabs.map(cell => { |
| | | let children = getTabs(cell.components) |
| | | |
| | | if (children.length === 0) { |
| | | children = null |
| | | } |
| | | return { |
| | | value: cell.uuid, |
| | | label: cell.label, |
| | | children: children |
| | | } |
| | | }) |
| | | }) |
| | | return item |
| | | }) |
| | | return _list |
| | | } |
| | | |
| | | // if (type === 'editable') { |
| | |
| | | // } |
| | | // ] |
| | | // } |
| | | |
| | | let tabs = getTabs(JSON.parse(JSON.stringify(modules))) |
| | | let tabs = getTabs(JSON.parse(JSON.stringify(window.GLOB.customMenu.components))) |
| | | |
| | | let pageTemps = [ |
| | | { value: 'billprint', text: '单据打印' }, |
| | |
| | | options: opentypes |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'label', |
| | | label: '按钮名称', |
| | | initVal: card.label, |
| | | required: true, |
| | | }, |
| | | { |
| | | type: 'select', |
| | | key: 'funcType', |
| | | label: '功能类型', |
| | |
| | | options: [] |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'label', |
| | | label: '按钮名称', |
| | | initVal: card.label, |
| | | required: true, |
| | | }, |
| | | { |
| | | type: 'checkbox', |
| | | key: 'payType', |
| | | label: '支付方式', |
| | |
| | | }, { |
| | | value: 'inner', |
| | | text: '内部函数' |
| | | }, { |
| | | value: 'none', |
| | | text: '无' |
| | | }] |
| | | }, |
| | | { |
| | |
| | | }, { |
| | | value: 'default', |
| | | text: '后台脚本' |
| | | }, { |
| | | value: 'func', |
| | | text: '回调函数' |
| | | }, { |
| | | value: 'none', |
| | | text: '无' |
| | | }] |
| | | }, |
| | | { |
| | |
| | | key: 'callbackFunc', |
| | | label: Formdict['header.form.callbackFunc'], |
| | | initVal: card.callbackFunc || '', |
| | | required: false, |
| | | required: true |
| | | }, |
| | | { |
| | | type: 'select', |