Merge branch 'hi-ucs-dev' of http://15.2.21.221:3000/wuhongjian/hi-ucs into hi-ucs-dev
This commit is contained in:
commit
019da30ff5
|
@ -5,6 +5,7 @@
|
|||
<div class="infrastructrue-tab">
|
||||
<div v-for="(item, index) in tabList" :key="index" class="tabBox">
|
||||
<b class="leftType">{{ item.title }}</b>
|
||||
<button @click="nullClick" v-if="item.title == '视频细分'">清空</button>
|
||||
<span
|
||||
v-for="itemContent in item.content"
|
||||
:key="itemContent"
|
||||
|
@ -88,8 +89,13 @@
|
|||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import { ref } from 'vue'
|
||||
import VideoSurveillance from '@/views/home/videoSurveillance'
|
||||
import { getCategoryTreePage } from '@/api/personalCenter'
|
||||
import { dataType } from 'element-plus/es/components/table-v2/src/common'
|
||||
import { ref, onMounted } from 'vue'
|
||||
onMounted(() => {
|
||||
tabClick(0, '视频资源')
|
||||
})
|
||||
const tabList = ref([
|
||||
{
|
||||
title: '设施类型',
|
||||
|
@ -97,18 +103,19 @@
|
|||
},
|
||||
{
|
||||
title: '视频细分',
|
||||
content: [
|
||||
'云主机',
|
||||
'算力主机',
|
||||
'对象存储',
|
||||
'堡垒机',
|
||||
'防火墙',
|
||||
'网闸',
|
||||
'负载均衡',
|
||||
'公网IP',
|
||||
],
|
||||
content: [],
|
||||
},
|
||||
]) //初始化数据
|
||||
])
|
||||
// const dataTypeList = () => {
|
||||
// if (tabList.value[0].content.indexOf('视频资源') != -1) {
|
||||
// tabList.value[1].content = ['123344', '213124']
|
||||
// }else if(tabList.value[0].content.indexOf('云资源') != -1){
|
||||
// tabList.value[1].content = ['5555', '666']
|
||||
|
||||
// }
|
||||
// }
|
||||
// dataTypeList()
|
||||
//初始化数据
|
||||
const init = () => {
|
||||
tabList.value.map((item) => {
|
||||
let params = {
|
||||
|
@ -123,13 +130,13 @@
|
|||
//表格的高度
|
||||
let tableHeight = ref('600')
|
||||
//tab切换点击事件
|
||||
const tabClick = (indexFather, name, fatherName) => {
|
||||
const tabClick = (indexFather, name) => {
|
||||
if (clickList.value[indexFather].content.indexOf(name) != -1) {
|
||||
if (fatherName == '视频资源') {
|
||||
if (name == '视频资源') {
|
||||
tableHeight.value = 330
|
||||
} else if (fatherName == '云资源') {
|
||||
} else if (name == '云资源') {
|
||||
tableHeight.value = 600
|
||||
} else if (fatherName == '感知资源') {
|
||||
} else if (name == '感知资源') {
|
||||
tableHeight.value = 330
|
||||
}
|
||||
clickList.value[indexFather].content.splice(
|
||||
|
@ -137,17 +144,51 @@
|
|||
1
|
||||
)
|
||||
} else {
|
||||
if (fatherName == '视频资源') {
|
||||
if (name == '视频资源') {
|
||||
tableHeight.value = 330
|
||||
} else if (fatherName == '云资源') {
|
||||
tabList.value[1].content = []
|
||||
clickList.value[1].content = []
|
||||
clickList.value[indexFather].content[0] = name
|
||||
const params = {
|
||||
page: 1,
|
||||
limit: 50,
|
||||
dictTypeId: '1541336217898848257',
|
||||
}
|
||||
getCategoryTreePage(params).then((res) => {
|
||||
res.data.data.list.forEach((val) => {
|
||||
tabList.value[1].content.push(val.dictLabel)
|
||||
})
|
||||
})
|
||||
} else if (name == '云资源') {
|
||||
tableHeight.value = 600
|
||||
} else if (fatherName == '感知资源') {
|
||||
clickList.value[1].content = []
|
||||
clickList.value[indexFather].content[0] = name
|
||||
tabList.value[1].content = [
|
||||
'云主机',
|
||||
'算力主机',
|
||||
'对象存储',
|
||||
'堡垒机',
|
||||
'防火墙',
|
||||
'网闸',
|
||||
'负载均衡',
|
||||
'公网IP',
|
||||
]
|
||||
} else if (name == '感知资源') {
|
||||
tableHeight.value = 330
|
||||
clickList.value[1].content = []
|
||||
clickList.value[indexFather].content[0] = name
|
||||
tabList.value[1].content = ['333333', '213124']
|
||||
} else {
|
||||
clickList.value[indexFather].content.push(name)
|
||||
}
|
||||
clickList.value[indexFather].content[0] = name
|
||||
}
|
||||
console.log('clickList.value', clickList.value)
|
||||
}
|
||||
// 清空
|
||||
const nullClick = () => {
|
||||
clickList.value[1].content = []
|
||||
console.log('hhhhhhhh')
|
||||
}
|
||||
const name = ref('')
|
||||
// 搜索框
|
||||
const onSearch = (name) => {
|
||||
|
@ -333,7 +374,6 @@
|
|||
color: #ffffff;
|
||||
}
|
||||
.tabBox {
|
||||
height: 0.3rem;
|
||||
margin-bottom: 0.16rem;
|
||||
}
|
||||
.tabBox:last-of-type {
|
||||
|
|
Loading…
Reference in New Issue