Merge branch 'master' of http://server4.wh-nf.cn:8081/git/root/DH_Apicture into master
commit 80b27ade1869876fa144952bd2447d56ad7cceda
2 parents 9dc707d + 4ab0969
@zhangqy zhangqy authored 9 days ago
Showing 4 changed files
View
33
src/api/MonitorAssetsOnMap.js
params: query,
});
}
 
 
// 分类列表
export function groupList (data) {
return request({
url: '/camera/oneMap/group/list',
method: 'post',
data
})
}
 
// 在线离线
export function listCameraStatus (data) {
return request({
url: '/camera/oneMap/groupRelation/listCameraStatus',
method: 'post',
data
})
}
// 摄像头列表
export function pageCameraInfoByCameraStatus (params) {
return request({
url: '/camera/oneMap/groupRelation/pageCameraInfoByCameraStatus',
method: 'get',
params
})
}
export function collect_uncollect (data) {
return request({
url: '/camera/cameraCollect/collect_uncollect',
method: 'post',
data
})
}
View
1
■■■■
src/assets/icons/svg/qiangj.svg 0 → 100644
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1736734976640" class="icon" viewBox="0 0 1042 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2577" xmlns:xlink="http://www.w3.org/1999/xlink" width="203.515625" height="200"><path d="M925.257143 566.857143v219.428571l-104.228572-54.857143v-80.457142c25.6-16.457143 43.885714-42.057143 51.2-73.142858 9.142857-31.085714 5.485714-64-10.971428-93.257142l102.4-58.514286c9.142857-5.485714 14.628571-12.8 16.457143-21.942857 1.828571-9.142857 1.828571-20.114286-3.657143-27.428572L811.885714 91.428571c-10.971429-18.285714-32.914286-23.771429-49.371428-12.8l-696.685715 402.285715c-10.971429 5.485714-16.457143 16.457143-18.285714 27.428571-1.828571 10.971429 3.657143 23.771429 12.8 31.085714l259.657143 230.4c7.314286 5.485714 14.628571 9.142857 23.771429 9.142858 5.485714 0 12.8-1.828571 18.285714-5.485715l190.171428-109.714285 87.771429-51.2c23.771429 38.4 64 58.514286 107.885714 60.342857v80.457143c0 12.8 7.314286 25.6 20.114286 32.914285l159.085714 82.285715V950.857143h73.142857V566.857143h-74.971428z m-385.828572 20.114286L438.857143 497.371429l394.971428-226.742858 64 111.542858-358.4 204.8z m256-380.342858L380.342857 446.171429l-43.885714-38.4L768 159.085714l27.428571 47.542857zM349.257143 696.685714l-201.142857-179.2 122.514285-71.314285 201.142858 179.2-122.514286 71.314285z m354.742857-120.685714l93.257143-54.857143c5.485714 10.971429 7.314286 23.771429 3.657143 36.571429-3.657143 14.628571-12.8 25.6-25.6 32.914285-23.771429 16.457143-54.857143 9.142857-71.314286-14.628571z" p-id="2578"></path><path d="M550.4 548.571429a36.571429 36.571429 0 1 0 0-73.142858 36.571429 36.571429 0 0 0 0 73.142858z" p-id="2579"></path></svg>
View
1
■■■■
src/assets/icons/svg/qiuj.svg 0 → 100644
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1736734953989" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1544" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M640 160 640 0 320 0l0 160c-150.336 62.72-256 211.008-256 384 0 147.2 76.672 276.224 192 350.144 20.288 12.992 41.536 24.448 64 33.856C369.28 948.544 423.296 960 480 960s110.72-11.456 160-32c22.464-9.344 43.712-20.864 64-33.856 115.328-73.92 192-203.008 192-350.144C896 370.944 790.336 222.72 640 160zM384 64l192 0 0 64L480 128 384 128 384 64zM480 192c136.448 0 254.72 78.208 313.152 192L166.848 384C225.28 270.208 343.552 192 480 192zM640 857.152C591.936 881.792 537.664 896 480 896S368.064 881.792 320 857.152L320 614.656C320 593.728 337.728 576 358.656 576l242.688 0C622.272 576 640 593.728 640 614.656L640 857.152zM704 815.296 704 614.656C704 558.208 657.792 512 601.344 512L358.656 512C302.208 512 256 558.208 256 614.656l0 200.64C177.856 750.72 128 653.056 128 544 128 510.656 132.928 478.592 141.632 448l676.736 0C827.072 478.592 832 510.656 832 544 832 653.056 782.144 750.72 704 815.296zM480 640C427.008 640 384 683.008 384 736S427.008 832 480 832 576 788.992 576 736 532.992 640 480 640zM480 768C462.336 768 448 753.664 448 736S462.336 704 480 704 512 718.336 512 736 497.664 768 480 768z" p-id="1545"></path></svg>
View
324
src/views/pictureOnMap/page/components/DialogTabs/component/ShiPingJianKong.vue
<template>
<div id="shipingjiankong">
<div class="leftbox" v-if="!videoList.includes(dataCode)">
<div class="leftSub">
<div class="leftTabs">
<div class="tab" :class="serchParms.groupId==i.id?'active':''" v-for="i in tabsArray" :key="i" @click="changeCamera(i)">{{i.name}}</div>
</div>
<!-- 一级分类 -->
<el-form :model="serchParms" class="serchForm">
<el-form-item label="类型">
<el-select
v-model="serchParms.accessType"
placeholder="请选择类型"
style="width: 100%"
>
<el-option :label="i.label" :value="i.value" v-for="i in accessType" :key="i"/>
</el-select>
</el-form-item>
<el-form-item label="名称">
<el-input v-model="serchParms.name" placeholder="请输入名字" clearable/>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="GetcameraList">搜索</el-button>
</el-form-item>
</el-form>
<div class="onLine flex">
<div class="flex-1" :class="cameraStatus==i.cameraStatusName?'active':''" @click="cameraStatus=i.cameraStatusName,serchCamera(i.cameraStatus)" v-for="i in state" :key="i">{{i.cameraStatusName}}({{i.number}})</div>
</div>
<div class="cameraTable">
<el-table :data="cameraList" style="height: 100%" class="dispatchTable" stripe>
<el-table-column label="摄像头名称" show-overflow-tooltip>
<template #default="{row}">
<span @click="tableActive=row.id,tableSelect(row)" class="blue" :class="tableActive==row.id?'active':''">{{row.name}}</span>
</template>
</el-table-column>
<el-table-column label="类型" width="50">
<template #default="{row}">
<svg-icon icon-class="qiangj" class="el-input__icon input-icon" v-if="row.cameraType==1"/>
<svg-icon icon-class="qiuj" class="el-input__icon input-icon" v-if="row.cameraType==2"/>
</template>
</el-table-column>
<el-table-column label="类型" width="50">
<template #default="{row}">
{{row.accessType=='owner'?'自建':'共享'}}
</template>
</el-table-column>
<el-table-column label="收藏" width="50">
<template #default="{row}">
<span class="pointer" @click="setLike(row)"><el-icon><StarFilled v-if="row.collectFlag"/><Star v-else/></el-icon></span>
</template>
</el-table-column>
</el-table>
</div>
</div>
<!-- <div class="leftbox" v-if="!videoList.includes(dataCode)">
<div
class="boxitem"
:class="item.cameraId == AllData.cameraIndexCode ? 'actived' : ''"
v-for="item in leftList"
@click="leftclick(item)"
>
{{ item.cameraName }}
</div>
</div>
<div :class="videoList.includes(dataCode) ? 'onebox' : 'rightbox'">
</div> -->
<!-- <div :class="videoList.includes(dataCode) ? 'onebox' : 'rightbox'"> -->
<div class="rightbox">
<videoDHone :channelId="AllData.cameraIndexCode"></videoDHone>
</div>
</div>
</template>
 
<script setup name="shipingjiankong">
import { getdataCamera } from '@/api/MonitorAssetsOnMap';
import { getdataCamera , groupList,listCameraStatus,pageCameraInfoByCameraStatus,collect_uncollect} from '@/api/MonitorAssetsOnMap';
import videoDHone from '@/components/videoDHone/index.vue'; //实时视频
import useUserStore from "@/store/modules/user";
 
const props = defineProps({
// 数据id
dataID: {
},
});
 
const AllData = reactive({
tabsArray:[],
serchParms:{
cameraUserId: useUserStore().userInfo.userId,
groupId:'',
pageNum:1,
pageSize:999,
cameraStatus:'',
},
cameraStatus:'全部',
 
cameraIndexCode: '',
layout: '1x1',
defaultList: [
// { cameraIndexCode: "f8b48c890c054ac190c124bb190a7007", wndId: 7 },
// { cameraIndexCode: "09aa2a2694744cb8b188442b0b2af9b7", wndId: 6 },
],
});
 
const { serchParms,cameraStatus,tabsArray} = toRefs(AllData)
 
 
const accessType=[
{
label:'自建',
value:'owner',
},
{
label:'接入',
value:'access',
}
]
 
const cameraName = ref('');
const leftList = ref([]);
const cameraList = ref([]);
const state = ref([]);
const tableActive = ref('');
 
function getOneLevel(){
groupList({cameraUserId:serchParms.value.cameraUserId}).then(res=>{
tabsArray.value=res.data
serchParms.value.groupId=tabsArray.value[1]?.id
GetcameraList()
})
}
 
// 左侧点击
function leftclick(item) {
AllData.cameraIndexCode = item.cameraId;
}
 
// 获取监控视频列表
function GetcameraList() {
pageCamera()
 
console.log('props.videoList', props.videoList);
// 如果是单独视频站点的类型 就没有多个 不用查询 直接赋值点击地图获取到的stcode
if (props.videoList.includes(props.dataCode)) {
AllData.cameraIndexCode = props.dataID;
// leftclick(res.data[0]);
AllData.cameraIndexCode = res.data[0].cameraId;
});
}
 
function pageCamera(){
let parms={
groupId:serchParms.value.groupId,
cameraUserId:serchParms.value.cameraUserId
}
listCameraStatus(parms).then(res=>{
state.value=res.data
})
pageCameraInfoByCameraStatus(serchParms.value).then(res=>{
cameraList.value=res.data
})
}
 
function changeCamera(data){
serchParms.value.groupId=data.id
pageCamera()
}
function serchCamera(num){
serchParms.value.cameraStatus=num
pageCamera()
}
 
function setLike(row){
let parms={
cameraId:row.id,
userId:serchParms.value.cameraUserId
}
collect_uncollect(parms).then(res=>{
pageCamera()
})
}
onMounted(() => {
console.log('搞什么啊', props, props.dataId);
GetcameraList();
getOneLevel()
// GetcameraList();
});
 
function tableSelect(row){
AllData.cameraIndexCode=row.indexCode
}
 
onBeforeUnmount(() => {
if (AllData.myVideoPlayer) {
hideDHPlayer();
width: 100%;
height: 100%;
display: flex;
color: #ccefff;
}
 
padding: 0 10px 10px 10px;
overflow: hidden;
}
.leftSub{
width:360px;
height: 100%;
position: relative;
padding-left:50px;
padding-right: 10px;
.leftTabs{
position: absolute;
top: 0;
left: 0;
bottom: 0;
width:40px;
.tab{
padding:10px;
text-align: center;
cursor: pointer;
&.active{
background: #1fa9f6;
}
}
}
.onLine{
font-size: 14px;
margin-bottom:10px;
border: 1px solid #53a7ff;
line-height:32px;
cursor: pointer;
text-align: center;
div.active{
background: #c5e1ff;
color: #53a7ff;
}
}
.cameraTable{
width: 100%;
height: calc(100% - 200px);
}
}
.leftbox {
width: 200px;
padding: 0 5px;
 
}
}
.rightbox {
width: calc(100% - 200px);
height: 100%;
}
 
.onebox {
width: 100%;
}
.blue{
color: #1fa9f6;
cursor: pointer;
&.active{
color: green;
}
}
.pointer{
cursor: pointer;
}
:deep(.el-form-item__label){
color: #ccefff;
}
:deep(.el-input__inner){
color: #ccefff;
}
</style>