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

This commit is contained in:
gongjiale 2022-11-22 14:40:24 +08:00
commit b48a1b5862
5 changed files with 122 additions and 49 deletions

View File

@ -83,11 +83,12 @@ function createMarkerClusterLayer(layerClassName, mapObj) {
maxClusterRadius: 80, maxClusterRadius: 80,
}) })
markerClusterLayer.on('clusterclick', function(a) { markerClusterLayer.on('clusterclick', function(a) {
//console.log('cluster ' + a.layer.getAllChildMarkers().length); //console.log('cluster ' + a.layer.getAllChildMarkers());
if (a.layer.getAllChildMarkers().length < 50) { if (a.layer.getAllChildMarkers().length < 50) {
let clusterList = []; let clusterList = [];
for (var i = 0; i < a.layer.getAllChildMarkers().length; i++) { for (var i = 0; i < a.layer.getAllChildMarkers().length; i++) {
//console.log('yyyyyyyyy', a.layer.getAllChildMarkers()[i].resourceData); //console.log('yyyyyyyyy', a.layer.getAllChildMarkers()[i].resourceData);
//console.log('yyyyyyyyy', a.layer.getAllChildMarkers()[i].fData);
clusterList.push(a.layer.getAllChildMarkers()[i].resourceData); clusterList.push(a.layer.getAllChildMarkers()[i].resourceData);
} }
//console.log('clusterList ' + a.layer.getAllChildMarkers(array, true)); //console.log('clusterList ' + a.layer.getAllChildMarkers(array, true));

View File

@ -67,6 +67,7 @@ import { message } from 'ant-design-vue'
handler(newVal, oldVal) { handler(newVal, oldVal) {
console.log('oldVal:', oldVal) console.log('oldVal:', oldVal)
console.log('newVal:', newVal) console.log('newVal:', newVal)
//this.realplay(newVal,0);
}, },
// //
immediate: true immediate: true

View File

@ -2,7 +2,7 @@
* @Author: Light * @Author: Light
* @Date: 2022-11-18 11:53:43 * @Date: 2022-11-18 11:53:43
* @LastEditors: Light * @LastEditors: Light
* @LastEditTime: 2022-11-21 17:51:38 * @LastEditTime: 2022-11-22 11:57:18
* @Description: 告诉大家这是什么 * @Description: 告诉大家这是什么
--> -->
<template> <template>
@ -23,7 +23,7 @@
cancel-text="否" cancel-text="否"
@confirm="delWillApplyCamera(item.id)" @confirm="delWillApplyCamera(item.id)"
> >
<a-button type="link" danger>移出</a-button> <a-button type="link" danger style="padding: 0">移出</a-button>
</a-popconfirm> </a-popconfirm>
</a-list-item> </a-list-item>
</template> </template>
@ -45,17 +45,26 @@
{{ item.cameraInfo.channelName }} {{ item.cameraInfo.channelName }}
</a-tooltip> </a-tooltip>
</div> </div>
<a-tag color="cyan" style="margin-right: 0">
{{ item.approveStatus }}
</a-tag>
<a-popconfirm <a-popconfirm
v-if="item.approveStatus == '通过'" v-if="item.approveStatus == '通过'"
:title="'是否删除' + item.cameraInfo.channelName + '?'" :title="'是否撤销' + item.cameraInfo.channelName + '?'"
ok-text="是" ok-text="是"
cancel-text="否" cancel-text="否"
@confirm="deleteApply(item)" @confirm="deleteApply(item)"
> >
<a-button type="link" danger>删除</a-button> <a-button type="link" danger style="padding: 0">撤销</a-button>
</a-popconfirm> </a-popconfirm>
<a-button v-else type="link" danger @click="deleteApply(item)"> <a-button
删除 v-else
type="link"
danger
@click="deleteApply(item)"
style="padding: 0"
>
撤销
</a-button> </a-button>
</a-list-item> </a-list-item>
</template> </template>
@ -68,12 +77,18 @@
<a-modal <a-modal
:width="800" :width="800"
v-model:visible="visible" v-model:visible="visible"
title="删除申请" title="撤销申请"
@ok="handleOk" @ok="handleOk"
@cancel="clear" @cancel="clear"
> >
<p>本次申请的摄像头包含以下{{ showArr.length }}个摄像头是否删除申请</p> <p>本次申请的视频监控包含以下{{ showArr.length }}是否撤销申请</p>
<a-table :columns="columns" :data-source="showArr"> <a-table
:columns="columns"
:data-source="showArr"
:pagination="{
pageSize: 5,
}"
>
<template #bodyCell="{ column, text }"> <template #bodyCell="{ column, text }">
<template v-if="column.dataIndex === 'name'"> <template v-if="column.dataIndex === 'name'">
<a>{{ text }}</a> <a>{{ text }}</a>
@ -123,7 +138,7 @@
] ]
const router = useRouter() const router = useRouter()
const delWillApplyCamera = (id) => { const delWillApplyCamera = (id) => {
console.log('删除===>', id) console.log('撤销===>', id)
if (delWacFlag.value) { if (delWacFlag.value) {
delWacFlag.value = false delWacFlag.value = false
willApplyCameraBatchDelete([id]).then((res) => { willApplyCameraBatchDelete([id]).then((res) => {
@ -147,7 +162,7 @@
loading: false, loading: false,
note1: '', note1: '',
resourceId: '1522550195055828996', resourceId: '1522550195055828996',
resourceName: '摄像头列表', resourceName: '视频监控列表',
type: '基础设施', type: '基础设施',
}, },
], ],
@ -170,9 +185,9 @@
}) })
} }
} }
// //
const deleteApply = (item) => { const deleteApply = (item) => {
console.log('删除========>', item) console.log('撤销========>', item)
if (delApply.value) { if (delApply.value) {
delApply.value = false delApply.value = false
switch (item.approveStatus) { switch (item.approveStatus) {
@ -189,9 +204,9 @@
case '通过': case '通过':
delApplyCamera([item.id]).then((res) => { delApplyCamera([item.id]).then((res) => {
if (res.data.code == 0) { if (res.data.code == 0) {
message.success('删除成功') message.success('撤销成功')
} else { } else {
message.warning('删除失败') message.warning('撤销失败')
} }
initApply() initApply()
}) })
@ -202,9 +217,9 @@
const handleOk = () => { const handleOk = () => {
endProcess({ instanceId: instanceId.value }).then((res) => { endProcess({ instanceId: instanceId.value }).then((res) => {
if (res.data.code == 0) { if (res.data.code == 0) {
message.success('删除成功') message.success('撤销成功')
} else { } else {
message.warning('删除失败') message.warning('撤销失败')
} }
initApply() initApply()
visible.value = false visible.value = false
@ -247,7 +262,7 @@
mybus.on('selectCamera', (obj) => { mybus.on('selectCamera', (obj) => {
// 10 // 10
if (dataList.toBeApplied.length + dataList.requested.length >= 10) { if (dataList.toBeApplied.length + dataList.requested.length >= 10) {
message.warning('最多只能申请10个摄像头') message.warning('最多只能申请10个视频监控')
return return
} }
// //
@ -258,7 +273,7 @@
} }
}) })
dataList.requested.map((val) => { dataList.requested.map((val) => {
if (addFlag && val.channelId == obj.channelId) { if (addFlag && val.cameraInfo.channelId == obj.channelId) {
addFlag = false addFlag = false
} }
}) })
@ -274,7 +289,7 @@
init() init()
}) })
} else { } else {
message.warning('已申请该摄像头') message.warning('已申请该视频监控')
} }
} }
}) })
@ -288,34 +303,40 @@
position: fixed; position: fixed;
top: 50%; top: 50%;
right: 0.16rem; right: 0.16rem;
margin-top: -3.5rem; margin-top: -3.9rem;
.bottom { .bottom {
margin-top: 32px; margin-top: 20px;
} }
.title { .title {
font-size: 16px; font-size: 16px;
font-weight: 600; font-weight: 600;
} }
.name { .name {
width: 150px; width: 1.3rem;
overflow: hidden; overflow: hidden;
display: -webkit-box; display: -webkit-box;
-webkit-line-clamp: 1; -webkit-line-clamp: 1;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
word-break: break-all; word-break: break-all;
} }
.top .name {
width: 1.8rem;
}
:deep(.ant-list-footer) { :deep(.ant-list-footer) {
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
} }
:deep(.ant-list-items) { :deep(.ant-list-items) {
width: 2.5rem; width: 2.5rem;
height: 2.45rem; height: 3rem;
overflow-y: scroll; overflow-y: scroll;
} }
:deep(.ant-list-item) {
padding: 5px 5px 5px 10px;
}
:deep(.ant-spin-nested-loading) { :deep(.ant-spin-nested-loading) {
width: 2.5rem; width: 2.5rem;
height: 2.45rem; height: 3rem;
} }
} }
</style> </style>

View File

@ -46,11 +46,15 @@
LeftCircleOutlined, LeftCircleOutlined,
RightCircleOutlined, RightCircleOutlined,
} from '@ant-design/icons-vue' } from '@ant-design/icons-vue'
import { useRouter } from 'vue-router' // import { useRouter } from 'vue-router'
import H5Player from '@/views/home/components/H5Player.vue' import H5Player from '@/views/home/components/H5Player.vue'
import mybus from '@/myplugins/mybus' import mybus from '@/myplugins/mybus'
import { message } from 'ant-design-vue'
import { getStreamByChannelCode } from '@/api/videoSurveillance' import { getStreamByChannelCode } from '@/api/videoSurveillance'
import {getCameraLiveStream} from '@/api/file' import {getCameraLiveStream} from '@/api/file'
import {willApplyCameraSelect,
getApplyCameraListXha,
} from '@/api/home'
export default { export default {
name: '', name: '',
components: { components: {
@ -81,7 +85,7 @@
videoStream: '', videoStream: '',
videoUrl:'', //url videoUrl:'', //url
defaultIndex:0,// defaultIndex:0,//
router:useRouter() // router:useRouter()
} }
}, },
methods: { methods: {
@ -94,13 +98,59 @@
}, },
// //
applyNow(item){ applyNow(item){
console.log('applyNowapplyNow',item); getApplyCameraListXha().then(res => {
// let flag = true
this.router.push({ if (res.data.code == 0) {
path: '/apply', res.data.data.map((val) => {
query: { val.cameraInfo = JSON.parse(val.cameraInfo)
console.log('applyNowapplyNow',val.cameraInfo);
if(flag && val.cameraInfo.channelId == item.channelId){
flag = false
}
})
if(flag){
willApplyCameraSelect().then(res => {
if (res.data.code == 0) {
res.data.data.map(val => {
if(item.channelId == val.channelId){
item.id = val.id
}
})
}
let obj = {
arr: [
{
checked: true,
delFlag: 0,
id: '1593084734789996545',
idtCameraChannel: '790582098133127168',
loading: false,
note1: '',
resourceId: '1522550195055828996',
resourceName: '摄像头列表',
type: '基础设施',
}, },
],
deptName: '西海岸新区工业和信息化局',
deptId: '732560225344761856',
}
item.type = '基础设施'
item.delFlag = 0
item.resourceId = item.channelId
item.resourceName = item.channelName
obj.arr[0].note1 = JSON.stringify([item])
if (obj.arr.length > 0) {
localStorage.setItem('applyList', JSON.stringify([obj]))
console.log('applyNowapplyNowobj',obj);
this.$router.push({
path: '/apply',
})
}
})
}else{
message.warning('该摄像头已申请!')
}
}
}) })
}, },
// //

View File

@ -237,7 +237,7 @@ import { ElMessage } from 'element-plus'
let params = { let params = {
placeTypeCode: data, placeTypeCode: data,
pageNum: "1", pageNum: "1",
pageSize: 30000, pageSize: 40000,
} }
CameraConditionPlaceType(params).then((res) => { CameraConditionPlaceType(params).then((res) => {
this.addResourceTomap('videoMap', res.data.data) this.addResourceTomap('videoMap', res.data.data)
@ -523,7 +523,7 @@ import { ElMessage } from 'element-plus'
if(queryString){ if(queryString){
getCameraByCondition({ getCameraByCondition({
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 40000,
regionId: "70be8c5b664f4bcf869d82f2e8335051", regionId: "70be8c5b664f4bcf869d82f2e8335051",
type: "0", type: "0",
name:queryString, name:queryString,
@ -551,7 +551,7 @@ import { ElMessage } from 'element-plus'
let params = { let params = {
regionId: "70be8c5b664f4bcf869d82f2e8335051", regionId: "70be8c5b664f4bcf869d82f2e8335051",
pageNum: "1", pageNum: "1",
pageSize: 30000, pageSize: 40000,
type: 0, type: 0,
borderPolygonList: [] borderPolygonList: []
} }