Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test_display

This commit is contained in:
fan 2021-09-13 15:33:09 +08:00
commit e84bbf7470
2 changed files with 1216 additions and 1215 deletions

File diff suppressed because it is too large Load Diff

View File

@ -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))