| | |
| | | let params = [] |
| | | let BID = urlparam.$BID || '' |
| | | |
| | | config.components = this.formatSetting(config.components, params, balMap, tbMap) |
| | | config.components = this.formatSetting(config.components, params, balMap, tbMap, BID) |
| | | |
| | | this.setState({ |
| | | BID: BID, |
| | |
| | | |
| | | if (item.hasExtend) { |
| | | item.setting.hasExtend = true |
| | | item.setting.sync = 'false' |
| | | item.setting.tableMode = 'compatible' |
| | | item.setting.extendTime = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | item.colsCtrls = null |
| | |
| | | } |
| | | } |
| | | } else if (item.type === 'card' || item.type === 'carousel' || item.type === 'timeline') { |
| | | if (item.wrap.datatype === 'public') { |
| | | balMap.set(item.wrap.publicId + 'public', true) |
| | | } |
| | | item.subcards && item.subcards.forEach(card => { |
| | | if (card.style.boxShadow) { |
| | | delete card.style.hShadow |
| | |
| | | |
| | | if (item.setting.sync === 'true') { |
| | | // pageable 是否分页,组件属性,不分页的组件才可以统一查询 |
| | | if ((!item.pageable || (item.pageable && !item.setting.laypage)) && item.setting.onload === 'true') { |
| | | if ((!item.pageable || (item.pageable && !item.setting.laypage)) && item.setting.onload === 'true' && !_tailScript) { |
| | | |
| | | } else { |
| | | item.setting.sync = 'false' |
| | |
| | | if (cell.OpenType === 'excelOut') { // 导出 |
| | | cell.$menuName = item.$menuname |
| | | } else if (cell.OpenType === 'pop' && cell.modal) { |
| | | cell.modal.uuid = cell.uuid + 'pop' |
| | | cell.modal.uuid = cell.uuid + '_pop' |
| | | } |
| | | |
| | | if (cell.verify) { |
| | | let isStatic = item.wrap && (item.wrap.datatype === 'static' || item.wrap.datatype === 'public') |
| | | if (cell.verify.invalid === 'true') { |
| | | if (item.wrap && (item.wrap.datatype === 'static' || item.wrap.datatype === 'public')) { |
| | | if (isStatic) { |
| | | cell.verify.invalid = 'false' |
| | | } else if (item.setting && item.setting.maxScript && item.setting.maxScript >= 300) { |
| | | cell.verify.invalid = 'false' |
| | |
| | | } else if (cell.Ot === 'notRequired') { |
| | | cell.verify.invalid = 'false' |
| | | } |
| | | } |
| | | |
| | | if (cell.verify.uniques && cell.verify.uniques.length > 0 && cell.Ot === 'requiredOnce' && isStatic) { |
| | | cell.verify.uniques = [] |
| | | } |
| | | |
| | | if (cell.verify.linkEnable === 'true' && /@/.test(cell.verify.linkUrl)) { |
| | |
| | | } |
| | | |
| | | // 格式化默认设置 |
| | | formatSetting = (components, params, balMap, tbMap) => { |
| | | formatSetting = (components, params, balMap, tbMap, BID) => { |
| | | let delay = 20 |
| | | return components.map(component => { |
| | | if (component.type === 'tabs') { |
| | | component.subtabs = component.subtabs.map(tab => { |
| | | tab.components = this.formatSetting(tab.components, null, balMap, tbMap) |
| | | tab.components = this.formatSetting(tab.components, null, balMap, tbMap, BID) |
| | | return tab |
| | | }) |
| | | return component |
| | | } else if (component.type === 'group') { |
| | | component.components = this.formatSetting(component.components, params, balMap, tbMap) |
| | | component.components = this.formatSetting(component.components, params, balMap, tbMap, BID) |
| | | return component |
| | | } |
| | | |
| | |
| | | |
| | | if (component.setting.interType !== 'system') return component |
| | | |
| | | component.setting.uuid = component.uuid |
| | | |
| | | // dataName 系统生成的数据源名称 |
| | | if (component.setting.sync === 'true') { |
| | | component.dataName = 'mk' + component.uuid.slice(-18) |
| | |
| | | component.setting.sync = 'false' |
| | | component.setting.onload = 'false' |
| | | } else { |
| | | params.push(getStructDefaultParam(component, searchlist, params.length === 0)) |
| | | let backend = false |
| | | if (window.backend && params.length === 0 && window.GLOB.CacheData.has('sql_' + component.uuid)) { |
| | | backend = true |
| | | } else if (window.backend && params[0] && params[0].exps) { |
| | | backend = true |
| | | } |
| | | |
| | | if (backend && !window.GLOB.CacheData.has('sql_' + component.uuid)) { |
| | | component.setting.sync = 'false' |
| | | } else { |
| | | params.push(getStructDefaultParam(component, searchlist, params.length === 0, BID)) |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | params.forEach((item) => { |
| | | let _data = result[item.name] || '' |
| | | let _data = result[item.dataName] || '' |
| | | if (_data && !Array.isArray(_data)) { |
| | | _data = [_data] |
| | | } |
| | | window.GLOB.SyncData.set(item.name, _data) |
| | | window.GLOB.SyncData.set(item.dataName, _data) |
| | | }) |
| | | |
| | | MKEmitter.emit('transferSyncData', Tab.uuid) |