Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test_display
This commit is contained in:
commit
e84bbf7470
File diff suppressed because it is too large
Load Diff
@ -221,20 +221,17 @@ export default {
|
||||
URL.revokeObjectURL(url)
|
||||
},
|
||||
generateExportData() {
|
||||
// TODO 复杂度优化
|
||||
let res = {}
|
||||
this.modelList.forEach(item => {
|
||||
res[`${item.type.toLowerCase()}List`] = item.list.map(_ => _.code)
|
||||
if (item.type === 'Section')
|
||||
item.logicSectionList.forEach(_ => {
|
||||
res[`${item.type.toLowerCase()}List`].push(_.code)
|
||||
})
|
||||
res[`${item.type.toLowerCase()}List`] = [...item.list.map(_ => _.code), ...(item.logicSectionList || []).map(_ => _.code)]
|
||||
})
|
||||
res.switchList = res.switchList.map(c => this.$store.state.map.map.switchList.find(_ => _.code === c))
|
||||
res.switchList.forEach(swch => {
|
||||
if (!res.sectionList.includes(swch.sectionACode)) res.sectionList.push(swch.sectionACode)
|
||||
if (!res.sectionList.includes(swch.sectionBCode)) res.sectionList.push(swch.sectionBCode)
|
||||
if (!res.sectionList.includes(swch.sectionCCode)) res.sectionList.push(swch.sectionCCode)
|
||||
'ABC'.split('').forEach(c => {
|
||||
if (!res.sectionList.includes(swch[`section${c}Code`])) {
|
||||
res.sectionList.push(swch[`section${c}Code`])
|
||||
}
|
||||
})
|
||||
})
|
||||
for (let key in res) {
|
||||
if (key !== 'switchList') res[key] = this.$store.state.map.map[key].filter(model => res[key].includes(model.code))
|
||||
|
Loading…
Reference in New Issue
Block a user