Merge branch 'hi-ucs-dev' of http://15.2.21.221:3000/wuhongjian/hi-ucs into hi-ucs-dev

# Conflicts:
#	front/public/static/config/location.js
This commit is contained in:
a0049873 2022-07-08 08:53:52 +08:00
commit e8485a86f9
10 changed files with 451 additions and 403 deletions

View File

@ -2,7 +2,7 @@
* @Author: hisense.wuhongjian * @Author: hisense.wuhongjian
* @Date: 2020-07-07 16:03:23 * @Date: 2020-07-07 16:03:23
* @LastEditors: hisense.liangjunhua * @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-07 20:22:03 * @LastEditTime: 2022-07-08 08:53:41
* @Description: 数据资源参数配置 * @Description: 数据资源参数配置
*/ */
const newLocation = 'qingdao' const newLocation = 'qingdao'

View File

@ -125,7 +125,10 @@ const actions = {
commit('setUsername', data.data.username) commit('setUsername', data.data.username)
commit('setRole', data.data.roleIdList.length) commit('setRole', data.data.roleIdList.length)
commit('setUserId', data.data.id) commit('setUserId', data.data.id)
resolve() setTimeout(()=>{
resolve()
},500)
}) })
}) })
}, },

View File

@ -2,7 +2,7 @@
* @Author: hisense.wuhongjian * @Author: hisense.wuhongjian
* @Date: 2022-04-01 17:23:11 * @Date: 2022-04-01 17:23:11
* @LastEditors: hisense.wuhongjian * @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-07-07 18:15:38 * @LastEditTime: 2022-07-07 19:58:32
* @Description: 告诉大家这是什么 * @Description: 告诉大家这是什么
*/ */
/** /**
@ -49,7 +49,7 @@ router.beforeEach(async (to, from, next) => {
next() next()
} else { } else {
store.dispatch('user/getUserInfo').then((res)=>{ store.dispatch('user/getUserInfo').then((res)=>{
debugger console.log('马到成功!')
next() next()
}) })
// if (recordRoute) // if (recordRoute)

View File

@ -18,11 +18,15 @@
<!-- <span class="name">{{ props.dataList.name }}</span> --> <!-- <span class="name">{{ props.dataList.name }}</span> -->
<div class="label-content"> <div class="label-content">
<p class="lable-father"> <p class="lable-father">
<span class="label"> <span class="label" v-if="props.dataList.type">
{{ componentType || props.dataList.type }} {{ props.dataList.type }}
</span>
<span class="label" v-if="props.dataList.shareType">
{{ props.dataList.shareType }}
</span>
<span class="label" v-if="props.dataList.shareCondition">
{{ props.dataList.shareCondition }}
</span> </span>
<span class="label">{{ props.dataList.shareType }}</span>
<span class="label">{{ props.dataList.shareCondition }}</span>
</p> </p>
</div> </div>
<!-- <span class="label">免费</span> --> <!-- <span class="label">免费</span> -->

View File

@ -2,17 +2,34 @@
<template> <template>
<div class="application-deployment-and-security"> <div class="application-deployment-and-security">
<div class="title"> <div class="title">
<DetalsTitle :title="dataFrom.title" :type="dataFrom.englishTitle"></DetalsTitle> <DetalsTitle
:title="dataFrom.title"
:type="dataFrom.englishTitle"
></DetalsTitle>
</div> </div>
<div class="content"> <div class="content">
<div v-for="(item, index) in dataFrom.content" :key="index" class="content-card"> <div
v-for="(item, index) in dataFrom.content"
:key="index"
class="content-card"
>
<div class="card-title">{{ item.childrenTitle }}</div> <div class="card-title">{{ item.childrenTitle }}</div>
<div class="card-content"> <div class="card-content">
<div v-for="carditem in item.childrenContent" :key="carditem"> <div
v-for="carditem in item.childrenContent"
:key="carditem"
:class="
carditem.attrType == '访问地址' ? 'access-to-the-address' : ''
"
>
<span>{{ carditem.attrType }}</span> <span>{{ carditem.attrType }}</span>
<a-tooltip> <a-tooltip>
<template #title>{{ carditem.attrValue }}</template> <template #title>{{ carditem.attrValue }}</template>
<span>{{ carditem.attrValue }}</span> <span
@click="addressFunction(carditem.attrType, carditem.attrValue)"
>
{{ carditem.attrValue }}
</span>
</a-tooltip> </a-tooltip>
</div> </div>
</div> </div>
@ -22,176 +39,187 @@
</template> </template>
<script setup> <script setup>
import DetalsTitle from '@/views/detailsAll/components/DetalsTitle' import DetalsTitle from '@/views/detailsAll/components/DetalsTitle'
import { ref, defineProps, watch } from 'vue' import { ref, defineProps, watch } from 'vue'
let dataFrom = ref({ let dataFrom = ref({
title: '部署与安全', title: '部署与安全',
englishTitle: 'DEPLOY&SAFE', englishTitle: 'DEPLOY&SAFE',
content: [ content: [
{ {
childrenTitle: '部署', childrenTitle: '部署',
childrenContent: [], childrenContent: [],
}, },
{ {
childrenTitle: '安全', childrenTitle: '安全',
childrenContent: [], childrenContent: [],
}, },
], ],
})
//
const props = defineProps({
dataList: { type: Object, default: null },
})
if (props.dataList.infoList) {
props.dataList.infoList.map((item) => {
if (
item.attrType === '部署区域' ||
item.attrType === '是否统一登录' ||
item.attrType === '部署位置'
) {
dataFrom.value.content[0].childrenContent.push(item)
} else if (
item.attrType === '是否等保备案' ||
item.attrType === '等保定级'
) {
dataFrom.value.content[1].childrenContent.push(item)
} else if (item.attrType === '访问地址') {
let obj = {
attrType: '访问地址',
attrValue: item.attrValue || '------',
}
dataFrom.value.content[0].childrenContent.push(obj)
}
}) })
if (dataFrom.value.content[1].childrenContent.length <= 0) { //
let data = [ const props = defineProps({
{ dataList: { type: Object, default: null },
attrType: '是否等保备案', })
attrValue: '------', if (props.dataList.infoList) {
}, props.dataList.infoList.map((item) => {
{ if (
attrType: '等保定级', item.attrType === '部署区域' ||
attrValue: '------', item.attrType === '是否统一登录' ||
}, item.attrType === '部署位置'
] ) {
data.map((itemContent) => { dataFrom.value.content[0].childrenContent.push(item)
dataFrom.value.content[1].childrenContent.push(itemContent) } else if (
}) item.attrType === '是否等保备案' ||
} item.attrType === '等保定级'
} ) {
watch( dataFrom.value.content[1].childrenContent.push(item)
() => props.dataList, } else if (item.attrType === '访问地址') {
(val) => { let obj = {
if (val) { attrType: '访问地址',
dataFrom.value.content[0].childrenContent = [] attrValue: item.attrValue || '------',
dataFrom.value.content[1].childrenContent = []
props.dataList.infoList.map((item) => {
if (
item.attrType === '部署区域' ||
item.attrType === '是否统一登录' ||
item.attrType === '部署位置'
) {
dataFrom.value.content[0].childrenContent.push(item)
} else if (
item.attrType === '是否等保备案' ||
item.attrType === '等保定级'
) {
dataFrom.value.content[1].childrenContent.push(item)
} else if (item.attrType === '访问地址') {
let obj = {
attrType: '访问地址',
attrValue: item.attrValue || '------',
}
dataFrom.value.content[0].childrenContent.push(obj)
} }
}) dataFrom.value.content[0].childrenContent.push(obj)
if (dataFrom.value.content[1].childrenContent.length <= 0) {
let data = [
{
attrType: '是否等保备案',
attrValue: '------',
},
{
attrType: '等保定级',
attrValue: '------',
},
]
data.map((itemContent) => {
dataFrom.value.content[1].childrenContent.push(itemContent)
})
} }
// let obj = { })
// attrType: '访', if (dataFrom.value.content[1].childrenContent.length <= 0) {
// attrValue: props.dataList.link || '------', let data = [
// } {
// dataFrom.value.content[0].childrenContent.push(obj) attrType: '是否等保备案',
attrValue: '------',
},
{
attrType: '等保定级',
attrValue: '------',
},
]
data.map((itemContent) => {
dataFrom.value.content[1].childrenContent.push(itemContent)
})
} }
} }
) //访
const addressFunction = (name, itemValue) => {
if (name == '访问地址') {
window.open(itemValue)
}
}
watch(
() => props.dataList,
(val) => {
if (val) {
dataFrom.value.content[0].childrenContent = []
dataFrom.value.content[1].childrenContent = []
props.dataList.infoList.map((item) => {
if (
item.attrType === '部署区域' ||
item.attrType === '是否统一登录' ||
item.attrType === '部署位置'
) {
dataFrom.value.content[0].childrenContent.push(item)
} else if (
item.attrType === '是否等保备案' ||
item.attrType === '等保定级'
) {
dataFrom.value.content[1].childrenContent.push(item)
} else if (item.attrType === '访问地址') {
let obj = {
attrType: '访问地址',
attrValue: item.attrValue || '------',
}
dataFrom.value.content[0].childrenContent.push(obj)
}
})
if (dataFrom.value.content[1].childrenContent.length <= 0) {
let data = [
{
attrType: '是否等保备案',
attrValue: '------',
},
{
attrType: '等保定级',
attrValue: '------',
},
]
data.map((itemContent) => {
dataFrom.value.content[1].childrenContent.push(itemContent)
})
}
// let obj = {
// attrType: '访',
// attrValue: props.dataList.link || '------',
// }
// dataFrom.value.content[0].childrenContent.push(obj)
}
}
)
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.application-deployment-and-security { .application-deployment-and-security {
padding: 0.8rem 0; padding: 0.8rem 0;
display: flex;
flex-direction: column;
align-items: center;
.title {
margin-bottom: 0.3rem;
}
.content {
display: flex; display: flex;
width: 13rem; flex-direction: column;
justify-content: space-between; align-items: center;
.content-card { .title {
height: 1.5rem; margin-bottom: 0.3rem;
width: 6.2rem; }
border-radius: 0.2rem;
background: linear-gradient(to right, .content {
rgba(113, 132, 252, 0.4),
rgba(148, 163, 252, 0.4));
padding: 0 0.3rem;
display: flex; display: flex;
flex-direction: column; width: 13rem;
justify-content: center; justify-content: space-between;
.card-title { .content-card {
font-size: 0.26rem; height: 1.5rem;
line-height: 0.26rem; width: 6.2rem;
color: #212956; border-radius: 0.2rem;
margin-bottom: 0.2rem; background: linear-gradient(
} to right,
rgba(113, 132, 252, 0.4),
rgba(148, 163, 252, 0.4)
);
padding: 0 0.3rem;
display: flex;
flex-direction: column;
justify-content: center;
.card-content { .card-title {
div { font-size: 0.26rem;
display: inline-block; line-height: 0.26rem;
margin-right: 0.7rem; color: #212956;
color: rgba(33, 41, 86, 0.8); margin-bottom: 0.2rem;
font-size: 0.2rem; }
line-height: 0.2rem;
max-width: 5.84rem;
overflow: hidden;
/*超出的隐藏*/
white-space: nowrap;
text-overflow: ellipsis;
/*超出的设置为省略号*/ .card-content {
span { div {
display: inline-block; display: inline-block;
max-width: 4rem; margin-right: 0.7rem;
color: rgba(33, 41, 86, 0.8);
font-size: 0.2rem;
line-height: 0.2rem;
max-width: 5.84rem;
overflow: hidden; overflow: hidden;
/*超出的隐藏*/ /*超出的隐藏*/
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
/*超出的设置为省略号*/ /*超出的设置为省略号*/
span {
display: inline-block;
max-width: 4rem;
overflow: hidden;
/*超出的隐藏*/
white-space: nowrap;
text-overflow: ellipsis;
/*超出的设置为省略号*/
}
}
.access-to-the-address {
cursor: pointer;
} }
} }
} }
} }
} }
}
</style> </style>

View File

@ -18,9 +18,15 @@
<!-- <span class="name">{{ props.dataList.name }}</span> --> <!-- <span class="name">{{ props.dataList.name }}</span> -->
<div class="label-content"> <div class="label-content">
<p class="lable-father"> <p class="lable-father">
<span class="label">{{ props.dataList.type }}</span> <span class="label" v-if="props.dataList.type">
<span class="label">{{ props.dataList.shareType }}</span> {{ props.dataList.type }}
<span class="label">{{ props.dataList.shareCondition }}</span> </span>
<span class="label" v-if="props.dataList.shareType">
{{ props.dataList.shareType }}
</span>
<span class="label" v-if="props.dataList.shareCondition">
{{ props.dataList.shareCondition }}
</span>
</p> </p>
</div> </div>
<!-- <span class="label">免费</span> --> <!-- <span class="label">免费</span> -->

View File

@ -18,11 +18,15 @@
<!-- <span class="name">{{ props.dataList.name }}</span> --> <!-- <span class="name">{{ props.dataList.name }}</span> -->
<div class="label-content"> <div class="label-content">
<p class="lable-father"> <p class="lable-father">
<span class="label"> <span class="label" v-if="props.dataList.type">
{{ componentType || props.dataList.type }} {{ props.dataList.type }}
</span>
<span class="label" v-if="props.dataList.shareType">
{{ props.dataList.shareType }}
</span>
<span class="label" v-if="props.dataList.shareCondition">
{{ props.dataList.shareCondition }}
</span> </span>
<span class="label">{{ props.dataList.shareType }}</span>
<span class="label">{{ props.dataList.shareCondition }}</span>
</p> </p>
</div> </div>
<!-- <span class="label">免费</span> --> <!-- <span class="label">免费</span> -->
@ -59,215 +63,216 @@
</div> </div>
</template> </template>
<script setup> <script setup>
import { ShoppingCartOutlined } from '@ant-design/icons-vue' import { ShoppingCartOutlined } from '@ant-design/icons-vue'
import { defineProps, ref, watch } from 'vue' import { defineProps, ref, watch } from 'vue'
import { scInsert } from '@/api/personalCenter' import { scInsert } from '@/api/personalCenter'
import { sgcInsert } from '@/api/home' import { sgcInsert } from '@/api/home'
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
import mybus from '@/myplugins/mybus' import mybus from '@/myplugins/mybus'
import { message } from 'ant-design-vue' import { message } from 'ant-design-vue'
const props = defineProps({ const props = defineProps({
dataList: { type: Object, default: null }, dataList: { type: Object, default: null },
})
const router = useRouter()
const businessArea = ref('')
// //
const addShoppingCart = () => {
console.log('加入申购车==================>', props.dataList)
sgcInsert({
delFlag: '0',
resourceId: props.dataList.id,
// userId: userId.value,
}).then((res) => {
console.log(res)
message.success('添加申购车成功!')
mybus.emit('getSgcNum')
}) })
} const router = useRouter()
// // const businessArea = ref('')
function toView() { // //
// window.open(newpage.href, '_blank') const addShoppingCart = () => {
console.log('一键申请===================>', props.dataList) console.log('加入申购车==================>', props.dataList)
localStorage.setItem( sgcInsert({
'applyList', delFlag: '0',
JSON.stringify([ resourceId: props.dataList.id,
{ // userId: userId.value,
arr: [ }).then((res) => {
{ console.log(res)
delFlag: props.dataList.delFlag, message.success('添加申购车成功!')
description: props.dataList.description, mybus.emit('getSgcNum')
resourceId: props.dataList.id, })
resourceName: props.dataList.name,
time: props.dataList.createDate,
type: props.dataList.type,
componentType: '业务组件',
},
],
deptId: props.dataList.deptId,
deptName: props.dataList.deptName,
},
])
)
router.push({
path: '/apply',
})
}
//
const goTOCollection = () => {
console.log('收藏===================》', props.dataList)
scInsert([{ resourceId: props.dataList.id }]).then((res) => {
console.log(res)
message.success('收藏成功')
})
}
const componentType = ref('')
if (props.dataList.infoList) {
businessArea.value = props.dataList.infoList.filter(
(val) => val.attrType === '应用领域'
)[0].attrValue
let obj = props.dataList.infoList.filter(
(val) => val.attrType === '组件类型'
)[0]
if (obj) {
componentType.value = obj.attrValue
} }
} // //
watch( function toView() {
() => props.dataList, // window.open(newpage.href, '_blank')
(val) => { console.log('一键申请===================>', props.dataList)
if (val) { localStorage.setItem(
businessArea.value = props.dataList.infoList.filter( 'applyList',
(val) => val.attrType === '应用领域' JSON.stringify([
)[0].attrValue {
let obj = props.dataList.infoList.filter( arr: [
(val) => val.attrType === '组件类型' {
)[0] delFlag: props.dataList.delFlag,
if (obj) { description: props.dataList.description,
componentType.value = obj.attrValue resourceId: props.dataList.id,
} resourceName: props.dataList.name,
time: props.dataList.createDate,
type: props.dataList.type,
componentType: '业务组件',
},
],
deptId: props.dataList.deptId,
deptName: props.dataList.deptName,
},
])
)
router.push({
path: '/apply',
})
}
//
const goTOCollection = () => {
console.log('收藏===================》', props.dataList)
scInsert([{ resourceId: props.dataList.id }]).then((res) => {
console.log(res)
message.success('收藏成功')
})
}
const componentType = ref('')
if (props.dataList.infoList) {
businessArea.value = props.dataList.infoList.filter(
(val) => val.attrType === '应用领域'
)[0].attrValue
let obj = props.dataList.infoList.filter(
(val) => val.attrType === '组件类型'
)[0]
if (obj) {
componentType.value = obj.attrValue
} }
} }
) watch(
() => props.dataList,
(val) => {
if (val) {
businessArea.value = props.dataList.infoList.filter(
(val) => val.attrType === '应用领域'
)[0].attrValue
let obj = props.dataList.infoList.filter(
(val) => val.attrType === '组件类型'
)[0]
if (obj) {
componentType.value = obj.attrValue
}
}
}
)
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.algorithm-top-details { .algorithm-top-details {
height: 6rem; height: 6rem;
padding: 1.8rem 0 0; padding: 1.8rem 0 0;
background: url('~@/assets/detailsAll/sf_top_bg.png') no-repeat; background: url('~@/assets/detailsAll/sf_top_bg.png') no-repeat;
background-size: 100%;
display: flex;
justify-content: center;
.left {
max-width: 7.2rem;
color: #fff;
margin-right: 0.8rem;
.top {
display: flex;
align-items: center;
span {
font-size: 0.14rem;
}
.name {
// max-width: 3.3rem;
// overflow: hidden;
// text-overflow: ellipsis;
// white-space: nowrap;
font-size: 0.4rem;
margin-right: 0.2rem;
max-width: 7rem;
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
}
.label-content {
position: relative;
}
.lable-father {
position: absolute;
min-width: 3.5rem;
right: -3.5rem;
top: 0;
}
.label {
padding: 0.01rem 0.1rem;
margin-right: 0.1rem;
border-radius: 0.13rem;
background: rgba(255, 255, 255, 0.4);
}
}
.main {
margin-top: 0.2rem;
font-size: 0.18rem;
line-height: 0.34rem;
&>div:nth-of-type(1) {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
&>div:nth-of-type(2) {
max-height: 1rem;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
}
}
.bottom {
margin-top: 0.4rem;
display: flex;
.ant-btn {
height: 0.5rem;
margin-right: 0.2rem;
background: #ffffff;
border-radius: 0.06rem;
font-size: 0.2rem;
display: flex;
justify-content: center;
align-items: center;
}
.ant-btn-primary {
color: #1890ff;
}
.ant-btn:nth-of-type(1) {
width: 1.8rem;
}
.ant-btn:nth-of-type(2) {
width: 2.2rem;
}
.ant-btn:nth-of-type(3) {
width: 1.45rem;
background: #fff;
color: #526aff;
}
}
}
.right {
width: 5.8rem;
height: 4rem;
background: url('~@/assets/detailsAll/business/business_right_bg.png') no-repeat;
background-size: 100%; background-size: 100%;
margin-top: -0.4rem; display: flex;
justify-content: center;
.left {
max-width: 7.2rem;
color: #fff;
margin-right: 0.8rem;
.top {
display: flex;
align-items: center;
span {
font-size: 0.14rem;
}
.name {
// max-width: 3.3rem;
// overflow: hidden;
// text-overflow: ellipsis;
// white-space: nowrap;
font-size: 0.4rem;
margin-right: 0.2rem;
max-width: 7rem;
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
}
.label-content {
position: relative;
}
.lable-father {
position: absolute;
min-width: 3.5rem;
right: -3.5rem;
top: 0;
}
.label {
padding: 0.01rem 0.1rem;
margin-right: 0.1rem;
border-radius: 0.13rem;
background: rgba(255, 255, 255, 0.4);
}
}
.main {
margin-top: 0.2rem;
font-size: 0.18rem;
line-height: 0.34rem;
& > div:nth-of-type(1) {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
& > div:nth-of-type(2) {
max-height: 1rem;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
}
}
.bottom {
margin-top: 0.4rem;
display: flex;
.ant-btn {
height: 0.5rem;
margin-right: 0.2rem;
background: #ffffff;
border-radius: 0.06rem;
font-size: 0.2rem;
display: flex;
justify-content: center;
align-items: center;
}
.ant-btn-primary {
color: #1890ff;
}
.ant-btn:nth-of-type(1) {
width: 1.8rem;
}
.ant-btn:nth-of-type(2) {
width: 2.2rem;
}
.ant-btn:nth-of-type(3) {
width: 1.45rem;
background: #fff;
color: #526aff;
}
}
}
.right {
width: 5.8rem;
height: 4rem;
background: url('~@/assets/detailsAll/business/business_right_bg.png')
no-repeat;
background-size: 100%;
margin-top: -0.4rem;
}
} }
}
</style> </style>

View File

@ -18,11 +18,15 @@
<!-- <span class="name">{{ props.dataList.name }}</span> --> <!-- <span class="name">{{ props.dataList.name }}</span> -->
<div class="label-content"> <div class="label-content">
<p class="lable-father"> <p class="lable-father">
<span class="label"> <span class="label" v-if="props.dataList.type">
{{ componentType || props.dataList.type }} {{ props.dataList.type }}
</span>
<span class="label" v-if="props.dataList.shareType">
{{ props.dataList.shareType }}
</span>
<span class="label" v-if="props.dataList.shareCondition">
{{ props.dataList.shareCondition }}
</span> </span>
<span class="label">{{ props.dataList.shareType }}</span>
<span class="label">{{ props.dataList.shareCondition }}</span>
</p> </p>
</div> </div>
<!-- <span class="label">免费</span> --> <!-- <span class="label">免费</span> -->

View File

@ -18,11 +18,15 @@
<!-- <span class="name">{{ props.dataList.name }}</span> --> <!-- <span class="name">{{ props.dataList.name }}</span> -->
<div class="label-content"> <div class="label-content">
<p class="lable-father"> <p class="lable-father">
<span class="label"> <span class="label" v-if="props.dataList.type">
{{ componentType || props.dataList.type }} {{ props.dataList.type }}
</span>
<span class="label" v-if="props.dataList.shareType">
{{ props.dataList.shareType }}
</span>
<span class="label" v-if="props.dataList.shareCondition">
{{ props.dataList.shareCondition }}
</span> </span>
<span class="label">{{ props.dataList.shareType }}</span>
<span class="label">{{ props.dataList.shareCondition }}</span>
</p> </p>
</div> </div>
<!-- <span class="label">免费</span> --> <!-- <span class="label">免费</span> -->

View File

@ -5,13 +5,11 @@
<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>
<a-button @click="nullClick" v-if="item.title == '视频标签'"> <button @click="nullClick" v-if="item.title == '视频标签'">清空</button>
清空
</a-button>
<span <span
v-for="itemContent in item.content" v-for="itemContent in item.content"
:key="itemContent" :key="itemContent"
@click="tabClick(index, itemContent, item)" @click="tabClick(index, itemContent)"
:class=" :class="
clickList[index].content.indexOf(itemContent.labelName) != -1 || clickList[index].content.indexOf(itemContent.labelName) != -1 ||
clickList[index].content.indexOf(itemContent) != -1 clickList[index].content.indexOf(itemContent) != -1
@ -117,8 +115,8 @@
</template> </template>
<script setup> <script setup>
import VideoSurveillance from '@/views/home/videoSurveillance' import VideoSurveillance from '@/views/home/videoSurveillance'
import { getCategoryTreePage } from '@/api/personalCenter' // import { getCategoryTreePage } from '@/api/personalCenter'
import { dataType } from 'element-plus/es/components/table-v2/src/common' // import { dataType } from 'element-plus/es/components/table-v2/src/common'
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
import { message } from 'ant-design-vue' import { message } from 'ant-design-vue'
import { ref, reactive, onMounted } from 'vue' import { ref, reactive, onMounted } from 'vue'
@ -245,7 +243,7 @@
clickList.value.push(params) clickList.value.push(params)
}) })
mybus.off('tranferToList') mybus.off('tranferToList')
mybus.on('tranferToList', (data) => { mybus.on('tranferToList', () => {
console.log('获取到的列表数据') console.log('获取到的列表数据')
}) })
} }
@ -255,7 +253,6 @@
let tableHeight = ref('600') let tableHeight = ref('600')
//tab //tab
const tabClick = (indexFather, name) => { const tabClick = (indexFather, name) => {
console.log(clickList.value, indexFather, name)
selectedRowKeys.value = [] selectedRowKeys.value = []
selectedList.value = [] selectedList.value = []
if (clickList.value[indexFather].content.indexOf(name) != -1) { if (clickList.value[indexFather].content.indexOf(name) != -1) {
@ -341,12 +338,22 @@
}) })
console.log('选中的标签code', mapSearchParam.value) console.log('选中的标签code', mapSearchParam.value)
mapSearchParam.value.labelCodes = mapSearchParam.value.labelCodes + '' mapSearchParam.value.labelCodes = mapSearchParam.value.labelCodes + ''
if (name == '视频资源') { let fatherName = ref('视频资源')
if (name == '视频资源' || name == '云资源' || name == '感知资源') {
fatherName.value == name
}
if (fatherName.value == '视频资源') {
getCamera() getCamera()
} else { } else {
dataSource.value = [] dataSource.value = []
pagination.value.total = 0 pagination.value.total = 0
} }
// if (name == '') {
// getCamera()
// } else {
// dataSource.value = []
// pagination.value.total = 0
// }
} }
// //
const nullClick = () => { const nullClick = () => {
@ -395,10 +402,10 @@
message.error('请选择需要申请的数据') message.error('请选择需要申请的数据')
} }
} }
// // //
const addShopCar = () => { // const addShopCar = () => {
console.log('添加至购物车') // console.log('')
} // }
const getCamera = () => { const getCamera = () => {
console.log('初始化调用') console.log('初始化调用')
getCameraByParentId(mapSearchParam.value).then((res) => { getCameraByParentId(mapSearchParam.value).then((res) => {
@ -445,7 +452,7 @@
key: 'channelId', key: 'channelId',
}, },
]) ])
const allClick = ref([]) // const allClick = ref([])
const onSelectChange = (record, selected, selectedRows, nativeEvent) => { const onSelectChange = (record, selected, selectedRows, nativeEvent) => {
console.log('hahhahah', record, selected, selectedRows, nativeEvent) console.log('hahhahah', record, selected, selectedRows, nativeEvent)
if (selected) { if (selected) {
@ -541,19 +548,6 @@
} }
.tabBox { .tabBox {
margin-bottom: 0.16rem; margin-bottom: 0.16rem;
:deep(.ant-btn:active) {
color: unset;
border-color: unset;
}
:deep(.ant-btn) {
margin-left: 10px;
border: 1px solid #666666;
color: #666666;
border-radius: 10px;
}
:deep(.ant-btn:hover) {
color: #40a9ff;
}
} }
.tabBox:last-of-type { .tabBox:last-of-type {
margin-bottom: 0; margin-bottom: 0;