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 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) // 西-- (10.134.135.92:9537)
let _cameraUrl = let _cameraUrl =
(_global && (_global &&

View File

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

View File

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