bug修复

This commit is contained in:
wuhongjian 2022-07-01 17:03:15 +08:00
parent 5d8416a0a4
commit 418b5f1de7
1 changed files with 23 additions and 10 deletions

View File

@ -5,7 +5,7 @@
<div class="infrastructrue-tab"> <div class="infrastructrue-tab">
<div v-for="(item, index) in tabList" :key="index" class="tabBox"> <div v-for="(item, index) in tabList" :key="index" class="tabBox">
<b class="leftType">{{ item.title }}</b> <b class="leftType">{{ item.title }}</b>
<button @click="nullClick" v-if="item.title == '视频细分'">清空</button> <button @click="nullClick" v-if="item.title == '视频标签'">清空</button>
<span <span
v-for="itemContent in item.content" v-for="itemContent in item.content"
:key="itemContent" :key="itemContent"
@ -206,7 +206,7 @@
content: ['视频资源', '云资源', '感知资源'], content: ['视频资源', '云资源', '感知资源'],
}, },
{ {
title: '视频细分', title: '视频标签',
content: [], content: [],
}, },
]) ])
@ -255,12 +255,18 @@
if (name == '视频资源') { if (name == '视频资源') {
tableHeight.value = 330 tableHeight.value = 330
showMap.value = true showMap.value = true
tabList.value[1].title = '视频标签'
} else if (name == '云资源') { } else if (name == '云资源') {
tableHeight.value = 600 tableHeight.value = 600
showMap.value = false showMap.value = false
dataSource.value = []
pagination.value.total = 0
tabList.value[1].title = '云资源分类'
} else if (name == '感知资源') { } else if (name == '感知资源') {
tableHeight.value = 330 tableHeight.value = 330
showMap.value = true showMap.value = true
dataSource.value = []
pagination.value.total = 0
} }
clickList.value[indexFather].content.splice( clickList.value[indexFather].content.splice(
clickList.value[indexFather].content.indexOf(name), clickList.value[indexFather].content.indexOf(name),
@ -272,6 +278,7 @@
showMap.value = true showMap.value = true
tabList.value[1].content = [] tabList.value[1].content = []
clickList.value[1].content = [] clickList.value[1].content = []
tabList.value[1].title = '视频标签'
clickList.value[indexFather].content[0] = name clickList.value[indexFather].content[0] = name
getCameraAllLabel().then((res) => { getCameraAllLabel().then((res) => {
res.data.data.forEach((val) => { res.data.data.forEach((val) => {
@ -281,10 +288,21 @@
}) })
}) })
}) })
// labelCode
mapSearchParam.value.labelCodes = []
clickList.value[1].content.map((item) => {
mapSearchParam.value.labelCodes.push(item.labelCode)
})
console.log('选中的标签code', mapSearchParam.value)
mapSearchParam.value.labelCodes = mapSearchParam.value.labelCodes + ''
getCamera()
} else if (name == '云资源') { } else if (name == '云资源') {
tableHeight.value = 600 tableHeight.value = 600
showMap.value = false showMap.value = false
dataSource.value = []
pagination.value.total = 0
clickList.value[1].content = [] clickList.value[1].content = []
tabList.value[1].title = '云资源分类'
clickList.value[indexFather].content[0] = name clickList.value[indexFather].content[0] = name
tabList.value[1].content = [ tabList.value[1].content = [
'云主机', '云主机',
@ -300,20 +318,15 @@
tableHeight.value = 330 tableHeight.value = 330
showMap.value = true showMap.value = true
clickList.value[1].content = [] clickList.value[1].content = []
pagination.value.total = 0
tabList.value[1].title = '感知资源分类'
clickList.value[indexFather].content[0] = name clickList.value[indexFather].content[0] = name
tabList.value[1].content = [] tabList.value[1].content = []
dataSource.value = []
} else { } else {
clickList.value[indexFather].content.push(name) clickList.value[indexFather].content.push(name)
} }
} }
// labelCode
mapSearchParam.value.labelCodes = []
clickList.value[1].content.map((item) => {
mapSearchParam.value.labelCodes.push(item.labelCode)
})
console.log('选中的标签code', mapSearchParam.value)
mapSearchParam.value.labelCodes = mapSearchParam.value.labelCodes + ''
getCamera()
} }
// //
const nullClick = () => { const nullClick = () => {