| | |
| | | |
| | | let initInters = [] |
| | | |
| | | this.formatInterSetting(config.interfaces, regs, initInters, params, BID) |
| | | this.formatInterSetting(config.interfaces, regs, initInters, params, BID, config.MenuName) |
| | | |
| | | config.components = config.components.map(component => { |
| | | if (component.action) { |
| | |
| | | component.$searches = [] |
| | | } |
| | | component.data = [] // 初始化数据为空 |
| | | |
| | | component.$menuname = (config.MenuName || '') + '-' + (component.name || '') |
| | | |
| | | if (component.subtype === 'tablecard') { // 兼容 |
| | | component.type = 'card' |
| | |
| | | |
| | | component.setting.arr_field = component.columns ? component.columns.map(col => col.field).join(',') : '' |
| | | component.setting.laypage = false // 是否分页,转为boolean 统一格式 |
| | | component.setting.$name = component.$menuname |
| | | |
| | | if (component.format === 'object') { |
| | | component.setting.$top = true |
| | |
| | | return component |
| | | }) |
| | | |
| | | _pars = this.getFormatParam(_pars) |
| | | _pars = this.getFormatParam(_pars, config.MenuName) |
| | | |
| | | if (_pars) { |
| | | _pars.componentId = 'union' |
| | |
| | | return cell |
| | | } |
| | | |
| | | formatInterSetting = (inters, regs, initInters, params, BID) => { |
| | | formatInterSetting = (inters, regs, initInters, params, BID, MenuName) => { |
| | | if (!inters) return [] |
| | | |
| | | let delay = 15 |
| | |
| | | |
| | | inter.setting.supModule = '' |
| | | inter.setting.arr_field = inter.columns.map(col => col.field).join(',') |
| | | inter.setting.$name = (MenuName || '') + '-公共数据源-' + inter.setting.name |
| | | |
| | | if (inter.setting.interType !== 'system') { |
| | | let param = UtilsDM.getQueryDataParams(inter.setting, [], inter.setting.order || '', 1, 1000, BID) |
| | |
| | | }) |
| | | delete inter.scripts |
| | | |
| | | inter.setting.$name = '公共数据源-' + inter.setting.name |
| | | inter.setting.execute = inter.setting.execute !== 'false' |
| | | inter.setting.laypage = false |
| | | inter.setting.$top = true |
| | |
| | | } |
| | | } |
| | | |
| | | getFormatParam = (params) => { |
| | | getFormatParam = (params, MenuName) => { |
| | | const { BID } = this.state |
| | | |
| | | if (!params || params.length === 0) return '' |
| | |
| | | fullName: fullName |
| | | } |
| | | |
| | | if (MenuName) { |
| | | param.menuname = MenuName |
| | | } |
| | | |
| | | param.LText = Utils.formatOptions(param.LText) |
| | | param.LText_field = Utils.formatOptions(param.LText_field) |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |