2022-10-17 10:13:22 +08:00
|
|
|
<template>
|
|
|
|
|
<div class="monitor">
|
2023-01-04 14:27:14 +08:00
|
|
|
<div class="title">
|
|
|
|
|
<Card title="总平面图" style="width:390%">
|
|
|
|
|
<div style="width:326px;height:170px;position: absolute;">
|
|
|
|
|
<img style="width:310px;height:170px;margin-top: 20px;" src="~@/assets/images/zjsj/monitor.jpg" alt="">
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</Card>
|
|
|
|
|
</div>
|
|
|
|
|
<Card title="监控设备列表" style="width: 16% !important;margin: 13% 0px 0 -100px; ">
|
2022-10-23 18:12:21 +08:00
|
|
|
<!-- 左边列表 -->
|
|
|
|
|
<div class="videoLeft">
|
|
|
|
|
<div class="videoList" v-if="dataType == 1">
|
2023-01-04 14:27:14 +08:00
|
|
|
<!-- <el-table-column type="index" label="序号"></el-table-column> -->
|
|
|
|
|
|
2022-10-23 18:12:21 +08:00
|
|
|
<el-tree
|
|
|
|
|
:data="dataList"
|
|
|
|
|
:props="defaultProps"
|
|
|
|
|
@node-click="changeVideo"
|
2023-01-04 14:27:14 +08:00
|
|
|
>
|
2023-01-04 22:41:30 +08:00
|
|
|
|
2023-01-04 14:27:14 +08:00
|
|
|
</el-tree>
|
|
|
|
|
|
2022-10-23 18:12:21 +08:00
|
|
|
</div>
|
|
|
|
|
<div class="videoBox" v-else>
|
|
|
|
|
<vue-scroll>
|
|
|
|
|
<el-collapse v-model="activeNames" style="padding: 0 20px">
|
|
|
|
|
<el-collapse-item
|
|
|
|
|
:title="item.name"
|
|
|
|
|
:name="index"
|
|
|
|
|
v-for="(item, index) in devList"
|
|
|
|
|
:key="index"
|
|
|
|
|
>
|
|
|
|
|
<ul v-if="item.list.length > 0">
|
|
|
|
|
<li
|
|
|
|
|
@click="changeVideo(data)"
|
|
|
|
|
v-for="(data, index2) in item.list"
|
|
|
|
|
:key="index2"
|
|
|
|
|
>
|
|
|
|
|
<img
|
|
|
|
|
v-if="data.deviceType == 2"
|
|
|
|
|
src="@/assets/images/icon-video2-white.png"
|
|
|
|
|
/>
|
|
|
|
|
<img v-else src="@/assets/images/icon-video-white.png" />
|
|
|
|
|
{{ data.videoName }}
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
</el-collapse-item>
|
|
|
|
|
</el-collapse>
|
|
|
|
|
</vue-scroll>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</Card>
|
|
|
|
|
|
|
|
|
|
<!-- 右边视频 -->
|
|
|
|
|
<Card title="视频监控" style="width: 80%; margin-right: 40px">
|
|
|
|
|
<div class="videoTight">
|
|
|
|
|
<VideoModule
|
|
|
|
|
class="playVideoBox"
|
|
|
|
|
:type="'project'"
|
|
|
|
|
:value="selectList"
|
|
|
|
|
:displayBottomMod="false"
|
|
|
|
|
:winNumBer="9"
|
|
|
|
|
:autoplay="false"
|
|
|
|
|
:showCaptrue="false"
|
|
|
|
|
:showControl="false"
|
|
|
|
|
:showPlayback="false"
|
|
|
|
|
:xxx="7"
|
|
|
|
|
></VideoModule>
|
|
|
|
|
</div>
|
|
|
|
|
</Card>
|
2022-10-17 10:13:22 +08:00
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
2022-10-23 18:12:21 +08:00
|
|
|
// import Left from "./left.vue";
|
|
|
|
|
// import Right from "./right.vue"
|
|
|
|
|
import {
|
|
|
|
|
selectProjectVideoListApi,
|
|
|
|
|
selectUserVideoListApi,
|
|
|
|
|
} from "@/assets/js/api/equipmentCenter/cameraList";
|
|
|
|
|
import Card from "../components/Card.vue";
|
|
|
|
|
import VideoModule from "@/components/videoModule/videoModule.vue";
|
2022-10-19 14:06:29 +08:00
|
|
|
export default {
|
2022-10-23 18:12:21 +08:00
|
|
|
components: { Card, VideoModule },
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
devList: [],
|
|
|
|
|
selectList: [],
|
|
|
|
|
dataType: 1,
|
|
|
|
|
activeNames: [0],
|
|
|
|
|
screens: {},
|
|
|
|
|
pluginType: "",
|
|
|
|
|
current: -1,
|
|
|
|
|
threeIndex: -1,
|
|
|
|
|
currentTwo: -1,
|
2022-11-03 18:49:51 +08:00
|
|
|
dataList: [],
|
2022-10-23 18:12:21 +08:00
|
|
|
defaultProps: {
|
|
|
|
|
children: "list",
|
|
|
|
|
label: "videoName",
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
mounted() {
|
|
|
|
|
// console.dir(window.parent)
|
|
|
|
|
// console.log(window.parent.document.getElementById("myFrame"), 12312313)
|
|
|
|
|
if (this.$store.state.userInfo.accountType != 6) {
|
|
|
|
|
this.loadData();
|
|
|
|
|
} else {
|
|
|
|
|
this.loadData2();
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
2023-01-04 14:27:14 +08:00
|
|
|
|
2022-10-23 18:12:21 +08:00
|
|
|
changeVideo(item) {
|
|
|
|
|
console.log(item, "xxxxxxxxxx");
|
|
|
|
|
this.selectList = [item];
|
|
|
|
|
console.log("右边的值", this.selectList);
|
|
|
|
|
},
|
|
|
|
|
loadData() {
|
|
|
|
|
selectProjectVideoListApi({
|
|
|
|
|
projectSn: this.$store.state.projectSn,
|
|
|
|
|
}).then((res) => {
|
2022-11-03 18:49:51 +08:00
|
|
|
this.dataList=res.result.videoList
|
2023-01-04 22:41:30 +08:00
|
|
|
for(let i = 1; i <= this.dataList.length;i++) {
|
|
|
|
|
this.dataList[i-1].videoName = i+"."+this.dataList[i-1].videoName
|
|
|
|
|
}
|
|
|
|
|
|
2022-12-24 17:27:18 +08:00
|
|
|
this.selectList = [this.dataList[0],this.dataList[1],this.dataList[2],this.dataList[3]];
|
2022-11-03 18:49:51 +08:00
|
|
|
console.log("视频的列表", res);
|
2022-10-23 18:12:21 +08:00
|
|
|
this.dataType = res.result.type;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
loadData2() {
|
|
|
|
|
selectUserVideoListApi({
|
|
|
|
|
projectSn: this.$store.state.projectSn,
|
|
|
|
|
userId: this.$store.state.userInfo.userId,
|
|
|
|
|
}).then((res) => {
|
|
|
|
|
var DATA = res.result.videoList;
|
|
|
|
|
this.devList = DATA;
|
|
|
|
|
this.dataType = res.result.type;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
showThree(a, b) {},
|
|
|
|
|
next2(item) {
|
|
|
|
|
// this.secondId = item.id;
|
|
|
|
|
// this.loadRigthtList();
|
|
|
|
|
},
|
|
|
|
|
next(index, $event, data, type) {
|
|
|
|
|
console.log("data", data);
|
|
|
|
|
this.currentTwo = -1;
|
|
|
|
|
//
|
|
|
|
|
if (this.current != index) {
|
|
|
|
|
this.threeIndex = -1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.threeData = [];
|
|
|
|
|
this.type = type;
|
|
|
|
|
this.parentid1 = data.id;
|
|
|
|
|
if (this.current == index) {
|
|
|
|
|
this.current = -1;
|
|
|
|
|
} else {
|
|
|
|
|
this.current = index;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
};
|
2022-10-17 10:13:22 +08:00
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="less" scoped>
|
|
|
|
|
.monitor {
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 100%;
|
|
|
|
|
display: flex;
|
2022-10-23 18:12:21 +08:00
|
|
|
justify-content: space-between;
|
2023-01-04 14:27:14 +08:00
|
|
|
.topImg{
|
|
|
|
|
position: absolute;
|
|
|
|
|
}
|
2022-10-23 18:12:21 +08:00
|
|
|
.textSize {
|
|
|
|
|
font-size: 15px !important;
|
|
|
|
|
}
|
|
|
|
|
.videoLeft {
|
|
|
|
|
width: 20%;
|
|
|
|
|
height: 100%;
|
|
|
|
|
.videoList {
|
|
|
|
|
margin-top: 20px;
|
2022-12-14 18:31:34 +08:00
|
|
|
margin-left: 2px !important;
|
2022-10-23 18:12:21 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.videoTight {
|
|
|
|
|
width: 99%;
|
|
|
|
|
height: 90%;
|
|
|
|
|
margin-left: 9px;
|
2022-11-05 15:54:25 +08:00
|
|
|
margin-top: 1.5%;
|
2022-10-19 14:06:29 +08:00
|
|
|
}
|
2022-10-23 18:12:21 +08:00
|
|
|
|
|
|
|
|
::v-deep .el-tree-node__expand-icon {
|
|
|
|
|
position: absolute;
|
|
|
|
|
right: -600%;
|
|
|
|
|
// color: red;
|
|
|
|
|
font-size: 16px;
|
|
|
|
|
}
|
|
|
|
|
::v-deep .el-tree-node__label {
|
|
|
|
|
font-size: 16px;
|
2023-01-04 14:27:14 +08:00
|
|
|
margin-left: 15px;
|
2023-01-04 22:41:30 +08:00
|
|
|
color: #fff;
|
2022-10-23 18:12:21 +08:00
|
|
|
}
|
|
|
|
|
::v-deep .el-tree-node {
|
|
|
|
|
// color: #fff;
|
2023-01-04 14:27:14 +08:00
|
|
|
height: 30px;
|
|
|
|
|
margin-top: 15px;
|
2022-12-14 18:31:34 +08:00
|
|
|
width: 300px !important;
|
2023-01-04 14:27:14 +08:00
|
|
|
background: url('~@/assets/images/zjsj/zjsj_bgi.png') no-repeat;
|
|
|
|
|
background-size: 100% 100%;
|
2022-10-23 18:12:21 +08:00
|
|
|
}
|
|
|
|
|
::v-deep .el-tree-node__content {
|
|
|
|
|
font-size: 15px;
|
|
|
|
|
}
|
|
|
|
|
::v-deep .el-tree-node__children {
|
|
|
|
|
width: 300px;
|
2023-01-04 22:41:30 +08:00
|
|
|
color: #fff !important;
|
2022-10-23 18:12:21 +08:00
|
|
|
}
|
|
|
|
|
::v-deep .el-tree-node__content {
|
2023-01-04 22:41:30 +08:00
|
|
|
color:#fff !important;
|
2022-12-14 18:31:34 +08:00
|
|
|
width: 300px !important;
|
2022-10-23 18:12:21 +08:00
|
|
|
|
|
|
|
|
// color: #fff !important;
|
|
|
|
|
font-size: 20px;
|
|
|
|
|
|
2022-10-17 10:13:22 +08:00
|
|
|
}
|
2022-12-14 18:31:34 +08:00
|
|
|
::v-deep .el-tree__empty-text {
|
|
|
|
|
width: 200px;
|
|
|
|
|
position: absolute;
|
2022-12-19 09:29:02 +08:00
|
|
|
left: 250%;
|
2022-12-14 18:31:34 +08:00
|
|
|
top: 600%;
|
|
|
|
|
transform: translate(-50%, -50%);
|
|
|
|
|
color: #737996;
|
2022-12-19 09:29:02 +08:00
|
|
|
font-size: 18px;
|
2022-12-14 18:31:34 +08:00
|
|
|
}
|
2023-01-04 14:27:14 +08:00
|
|
|
::v-deep .el-tree-node:focus > .el-tree-node__content{
|
|
|
|
|
background-color:none
|
|
|
|
|
}
|
2023-01-04 22:41:30 +08:00
|
|
|
::v-deep .el-tree-node:focus > .el-tree-node__content {
|
|
|
|
|
/*设置选中的样式 */
|
|
|
|
|
height: 30px;
|
|
|
|
|
background-color: #66D4D9 !important;
|
|
|
|
|
}
|
|
|
|
|
::v-deep .el-tree-node__content:hover {
|
|
|
|
|
/*设置鼠标飘过的颜色 */
|
|
|
|
|
background: #66D4D9 !important;
|
|
|
|
|
color: #fff;
|
|
|
|
|
height: 30px;
|
|
|
|
|
|
|
|
|
|
}
|
2022-10-23 18:12:21 +08:00
|
|
|
|
2023-01-04 22:41:30 +08:00
|
|
|
::v-deep .el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content {
|
|
|
|
|
/*current选中的样式 */
|
|
|
|
|
height: 30px;
|
|
|
|
|
|
|
|
|
|
color: #fff;
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
background-color: #66D4D9 !important;
|
|
|
|
|
}
|
2022-10-17 10:13:22 +08:00
|
|
|
}
|
|
|
|
|
</style>
|