Compare commits

...

2 Commits

Author SHA1 Message Date
gongjiale e1905140f4 暂存 staged 2022-11-21 12:26:18 +08:00
gongjiale 3e225ddce2 标签视频添加 2022-11-21 12:21:21 +08:00
3 changed files with 59 additions and 28 deletions

View File

@ -113,6 +113,15 @@ export function getPlaceType() {
config2
)
}
//西
export function CameraConditionPlaceType(params) {
return axios.post(
'http://10.134.135.92:9537/data_service/getCamera/CameraConditionPlaceType',
params,
config2
)
}
// 西-- (10.134.135.92:9537)
let _cameraUrl =
(_global &&

View File

@ -108,6 +108,8 @@
<div v-for="(item, index) in biaoqianList">
<div class="titleName">{{ item.placeTypeName }}</div>
<div class="glgkmk" v-for="(child, index) in item.children">
<a-tooltip placement="topLeft">
<template #title>{{ child.placeTypeName }}</template>
<div
class="glgknum"
:class="{ active: child.placeTypeCode == chooseId }"
@ -115,6 +117,8 @@
>
{{ child.placeTypeName }}
</div>
</a-tooltip>
</div>
</div>
</div>
@ -123,7 +127,8 @@
<script>
import { defineComponent, ref, watch } from 'vue'
import { getCameraAllOrgan } from '@/api/videoSurveillance'
import { getCameraInfoByAreaId } from '@/api/file'
import { getCameraInfoByAreaId ,getPlaceType} from '@/api/file'
import mybus from '@/myplugins/mybus'
import { useRouter } from 'vue-router'
import { UpOutlined, DownOutlined } from '@ant-design/icons-vue'
@ -148,6 +153,9 @@ export default defineComponent({
//
const tabClick = (id) => {
chooseId.value = id
let placeTypeCode =[]
placeTypeCode.push(id)
mybus.emit('CameraConditionPlaceType', placeTypeCode)
}
//
const init = async () => {
@ -159,6 +167,7 @@ export default defineComponent({
select = ''
}
if (select == '基础设施') {
let res = {}
if (whoShow1.value && !whoShow1.value.itShowXiHaiAn) {
res = await getCameraAllOrgan({ parentId: 'S4NbecfYB1DBH8HNULGS34' })
@ -169,24 +178,10 @@ export default defineComponent({
})
}
treeData.value = (res.data && res.data.data) || []
let tabs={}
tabs = await getPlaceType()
//=========
biaoqianList.value = [
{
placeTypeName: '政府机构',
children: [
{ placeTypeName: '行政中心', placeTypeCode: '1' },
{ placeTypeName: '行政中心', placeTypeCode: '12' },
{ placeTypeName: '行政中心', placeTypeCode: '14' },
],
},
{
placeTypeName: '政府机构1',
children: [
{ placeTypeName: '行政中心', placeTypeCode: '2' },
{ placeTypeName: '行政中心', placeTypeCode: '3' },
],
},
]
biaoqianList.value =(tabs.data && tabs.data.data) || []
//
if (res.data && res.data.data.length == 1) {
showBottom(treeData.value[0])
@ -202,6 +197,7 @@ export default defineComponent({
if (whoShow1.value && !whoShow1.value.itShowXiHaiAn) {
res = await getCameraAllOrgan({ parentId: val.id })
} else {
 mybus.emit('getCameraByParentId', val.id)
// 西
res = await getCameraInfoByAreaId({ areaId: val.id })
}
@ -285,24 +281,33 @@ export default defineComponent({
<style lang="less" scoped>
.titleName {
font-size: 18px;
color: #1e1a1a;
color: #7e7676;
margin-bottom: 10px;
padding-left: 10px;
border-left: 6px solid #1296db;
}
.glgkmk {
cursor: pointer;
text-align: center;
text-align: left;
position: relative;
display: inline-block;
width: 30%;
margin-bottom: 10px;
margin-left: 6px;
.glgknum {
// width: 100px;
// color: #000000;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
word-break: break-all;
}
.active {
color: #0058e1;
}
.glgknum {
// color: #000000;
}
}
.glgkmk :hover {

View File

@ -108,7 +108,7 @@ import { ElMessage } from 'element-plus'
selectByLabelName,
selectByChannelName,
} from '@/api/videoSurveillance'
import { getCameraByCondition,getListForPOI } from '@/api/file'
import { getCameraByCondition,getListForPOIm,CameraConditionPlaceType } from '@/api/file'
import mybus from '@/myplugins/mybus'
import * as turf from '@turf/turf';
@ -204,8 +204,25 @@ import { ElMessage } from 'element-plus'
mybus.on('cameraDataOnMap', (data) => {
this.addResourceTomap('videoMap', data)
})
//
mybus.off('CameraConditionPlaceType')
mybus.on('CameraConditionPlaceType', (data) => {
this.queryCameraConditionPlace(data)
})
},
methods: { //
//
queryCameraConditionPlace(data) {
let params = {
placeTypeCode: data,
pageNum: "1",
pageSize: 30000,
}
CameraConditionPlaceType(params).then((res) => {
this.addResourceTomap('videoMap', res.data.data)
})
},
handleEnter(){
console.log('查询',this.address,this.addressType)
if(this.address){
@ -378,9 +395,9 @@ import { ElMessage } from 'element-plus'
//
initAddressMatchService() {
this.L = window.L || {}
this.addressMatchService = L.supermap.addressMatchService(
this.addressMatchUrl
)
// this.addressMatchService = L.supermap.addressMatchService(
// this.addressMatchUrl
// )
},
areaMode(){
//