| | |
| | | } |
| | | } |
| | | |
| | | let interfaces = [] |
| | | if (menu.interfaces) { |
| | | menu.interfaces.forEach(item => { |
| | | if (item.status === 'true') { |
| | | interfaces.push({ |
| | | value: item.uuid, |
| | | label: item.name |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | const wrapForm = [ |
| | | { |
| | | type: 'text', |
| | |
| | | options: [ |
| | | {value: 'dynamic', label: '动态'}, |
| | | {value: 'static', label: '静态'}, |
| | | {value: 'public', label: '公共数据源'} |
| | | ], |
| | | controlFields: [ |
| | | {field: 'empty', values: ['dynamic']}, |
| | | {field: 'supModule', values: ['static']}, |
| | | {field: 'publicId', values: ['public']}, |
| | | ] |
| | | }, |
| | | { |
| | | type: 'select', |
| | | field: 'publicId', |
| | | label: '数据源', |
| | | initval: wrap.publicId || '', |
| | | required: true, |
| | | options: interfaces, |
| | | reset_source: config.subtype !== 'tabform', |
| | | callback: (map, record) => { |
| | | if (!record.publicId) return |
| | | |
| | | let interfaces = window.GLOB.customMenu.interfaces || [] |
| | | |
| | | let d = interfaces.filter(m => m.uuid === record.publicId && m.status === 'true')[0] |
| | | |
| | | if (!d || !d.columns) return |
| | | |
| | | let columns = JSON.parse(JSON.stringify(d.columns)) |
| | | |
| | | let _sCtrl = map.get('statusControl') |
| | | |
| | | if (_sCtrl && !_sCtrl.forbid) { |
| | | _sCtrl.options = columns |
| | | _sCtrl.oriOptions = columns |
| | | map.set('statusControl', _sCtrl) |
| | | } |
| | | } |
| | | }, |
| | | { |
| | | type: 'select', |
| | | field: 'statusControl', |
| | | label: '状态控制', |
| | | initval: wrap.statusControl || '', |