| | |
| | | return _style |
| | | } |
| | | |
| | | resetSyncQuery = (components) => { |
| | | return components.map(item => { |
| | | if (item.type === 'tabs') { |
| | | item.subtabs.forEach(tab => { |
| | | tab.components = this.resetSyncQuery(tab.components) |
| | | }) |
| | | } else if (item.type === 'group') { |
| | | item.components = this.resetSyncQuery(item.components) |
| | | } else if (item.setting && item.setting.interType === 'system' && item.setting.sync === 'true') { |
| | | let sql = '' |
| | | if (item.setting.execute !== 'false' && item.setting.dataresource) { |
| | | sql = item.setting.dataresource |
| | | } |
| | | |
| | | item.scripts && item.scripts.forEach(script => { |
| | | if (script.status === 'false') return |
| | | |
| | | sql += script.sql |
| | | }) |
| | | |
| | | if (sql.length > 8000) { |
| | | item.setting.sync = 'false' |
| | | } |
| | | } |
| | | |
| | | return item |
| | | }) |
| | | } |
| | | |
| | | submitConfig = () => { |
| | | const { adapters } = this.state |
| | | let config = fromJS(this.state.config).toJS() |
| | |
| | | config.enabled = false |
| | | } |
| | | |
| | | if (config.cacheUseful !== 'true') { |
| | | config.components = this.resetSyncQuery(config.components) |
| | | } |
| | | |
| | | let tbs = [] |
| | | let roleParam = {type: 'view', version: '1.0', key: config.uuid, title: config.MenuName, children: []} |
| | | roleParam.children = this.getMenuMessage(tbs) |