| | |
| | | import enUS from '@/locales/en-US/main.js' |
| | | import Utils from '@/utils/utils.js' |
| | | import UtilsDM from '@/utils/utils-datamanage.js' |
| | | import UtilsUpdate from '@/utils/utils-update.js' |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | | import asyncSpinComponent from '@/utils/asyncSpinComponent' |
| | | import { refreshTabView } from '@/store/action' |
| | |
| | | return |
| | | } |
| | | |
| | | if (!config.version || config.version < '1.0') { |
| | | // 兼容标签 |
| | | if (!config.tabgroups) { |
| | | config.tabgroups = [{ uuid: 'tabs', sublist: [] }] |
| | | } else if (typeof(config.tabgroups[0]) === 'string') { |
| | | let _tabgroups = [] |
| | | config.tabgroups.forEach(groupId => { |
| | | let _group = { |
| | | uuid: groupId, |
| | | sublist: fromJS(config[groupId]).toJS() |
| | | } |
| | | |
| | | delete config[groupId] |
| | | |
| | | _tabgroups.push(_group) |
| | | }) |
| | | |
| | | config.tabgroups = _tabgroups |
| | | } |
| | | |
| | | // 兼容图表 |
| | | if (!config.charts) { |
| | | config.expand = true |
| | | config.charts = [{ uuid: Utils.getuuid(), label: '', title: '', chartType: 'table', icon: 'table', Hide: 'false', blacklist: [] }] |
| | | } else { |
| | | config.charts.forEach(card => { |
| | | if (card.chartType === 'card') { |
| | | card.details = card.details.map(_cell => { |
| | | _cell.fontSize = _cell.fontSize || 14 |
| | | if (!_cell.width) { |
| | | _cell.width = 100 |
| | | } else if (_cell.width === 'helf') { |
| | | _cell.width = 50 |
| | | } else if (_cell.width === 'third') { |
| | | _cell.width = 33 |
| | | } |
| | | if (!_cell.fontWeight && _cell.bold === 'true') { |
| | | _cell.fontWeight = 'normal' |
| | | } |
| | | _cell.height = _cell.height || 1 |
| | | |
| | | return _cell |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | // 版本兼容 |
| | | config = UtilsUpdate.updateCommonTable(config) |
| | | |
| | | // 权限过滤 |
| | | if (this.props.menuType !== 'HS') { |