|
|
@@ -119,7 +119,7 @@
|
|
|
<div class="nav-box">
|
|
|
<!-- <div style="border: 1px solid #fff; background: #fff;"></div> -->
|
|
|
<ul class="viewLists">
|
|
|
- <li class="select-veido">
|
|
|
+ <!-- <li class="select-veido">
|
|
|
<el-select
|
|
|
v-model="siteVal"
|
|
|
clearable
|
|
|
@@ -136,7 +136,7 @@
|
|
|
>
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
- </li>
|
|
|
+ </li> -->
|
|
|
|
|
|
<li
|
|
|
v-for="(item, index) in Idlist"
|
|
|
@@ -188,7 +188,7 @@
|
|
|
class="rightCtr"
|
|
|
></div>
|
|
|
</div> -->
|
|
|
- <div class="btnBox" style="margin: 50px 0 0 0;">
|
|
|
+ <div class="btnBox" style="margin: 50px 0 0 0">
|
|
|
<!-- <div class="zoom">
|
|
|
无论插件还是费插件都可以放大缩小
|
|
|
<span
|
|
|
@@ -275,7 +275,7 @@
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
<!-- 添加设备 -->
|
|
|
- <el-dialog
|
|
|
+ <el-dialog
|
|
|
title="添加设备"
|
|
|
:visible.sync="addEquipDialogVisible"
|
|
|
width="400px"
|
|
|
@@ -308,11 +308,17 @@
|
|
|
<el-button @click="addEquipDialogVisible = false">取 消</el-button>
|
|
|
<el-button type="primary" @click="addEquipSubm">确定</el-button>
|
|
|
</div>
|
|
|
- </el-dialog>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
export default {
|
|
|
+ props: {
|
|
|
+ flag: {
|
|
|
+ type: Object,
|
|
|
+ default: () => {},
|
|
|
+ },
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
currPage: 1, //当前分页
|
|
|
@@ -379,33 +385,53 @@ export default {
|
|
|
// }
|
|
|
if (value.device_name) {
|
|
|
if (value.device_name.length > 8) {
|
|
|
- return `${value.device_name.slice(0, 8)}-${value.jktype}` + "...";
|
|
|
+ console.log(`${value.device_name.slice(0, 8)}...-${value.jktype}`);
|
|
|
+ return `${value.device_name.slice(0, 8)}...-${value.jktype}`;
|
|
|
+ }else{
|
|
|
+ return `${value.device_name}-${value.jktype}`;
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
},
|
|
|
created() {
|
|
|
- this.getJkList();
|
|
|
- this.plotList("");
|
|
|
+ // if (this.objData && this.objData.id) {
|
|
|
+ // console.log(this.objData);
|
|
|
+ // this.getJKList();
|
|
|
+ // }
|
|
|
+ // this.plotList("");
|
|
|
},
|
|
|
watch: {
|
|
|
siteVal(val) {
|
|
|
- console.log("11111111111111",val);
|
|
|
- if (val !== '') {
|
|
|
- this.addrPolt = true
|
|
|
+ if (val !== "") {
|
|
|
+ this.addrPolt = true;
|
|
|
} else {
|
|
|
- this.addrPolt = false
|
|
|
- this.plotData = {}
|
|
|
- this.getJkList()
|
|
|
+ this.addrPolt = false;
|
|
|
+ this.plotData = {};
|
|
|
+ this.getJkList();
|
|
|
}
|
|
|
- }
|
|
|
+ },
|
|
|
+ flag: {
|
|
|
+ handler: function (val) {
|
|
|
+ console.log("valllllllllllllllllllll",val);
|
|
|
+ if (val.cid) {
|
|
|
+ const data = {
|
|
|
+ id: val.cid,
|
|
|
+ };
|
|
|
+ this.getJkList(data, 1)
|
|
|
+ }else if(val.cid === ''){
|
|
|
+ console.log('else',val);
|
|
|
+ this.getJkList()
|
|
|
+ }
|
|
|
+ },
|
|
|
+ deep: true,
|
|
|
+ immediate: true,
|
|
|
+ },
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
//获取视频列表
|
|
|
getJkList(obj, page) {
|
|
|
// this.Idlist = []
|
|
|
- console.log(obj);
|
|
|
if (obj) {
|
|
|
console.log(obj);
|
|
|
this.currPage = page;
|
|
|
@@ -426,13 +452,14 @@ export default {
|
|
|
equip_type: 2,
|
|
|
site_id: id,
|
|
|
page_size: 12,
|
|
|
- plot_id: this.plotData.plot_id !== undefined ? this.plotData.plot_id : '',
|
|
|
+ plot_id:
|
|
|
+ this.plotData.plot_id !== undefined ? this.plotData.plot_id : "",
|
|
|
}),
|
|
|
}).then((res) => {
|
|
|
- console.log(res);
|
|
|
+ console.log(res.data.counts);
|
|
|
this.Idlist = res.data.data;
|
|
|
- console.log(this.Idlist)
|
|
|
- this.totalPage = Math.ceil(res.data.counts / 19);
|
|
|
+ console.log(this.Idlist);
|
|
|
+ this.totalPage = Math.ceil(res.data.counts / 12);
|
|
|
this.initMonitor(); //进入页面默认1屏都显示视频
|
|
|
});
|
|
|
},
|
|
|
@@ -448,7 +475,7 @@ export default {
|
|
|
}),
|
|
|
}).then((res) => {
|
|
|
this.Idlist = res.data.data;
|
|
|
- this.initMonitor()
|
|
|
+ this.initMonitor();
|
|
|
});
|
|
|
},
|
|
|
//视频分页
|
|
|
@@ -524,10 +551,10 @@ export default {
|
|
|
//分屏默认显示视频
|
|
|
initMonitor() {
|
|
|
this.id = this.Idlist[0].device_id; //第一台设备id
|
|
|
- console.log("IdlistIdlistIdlistIdlist",this.Idlist);
|
|
|
+ console.log("IdlistIdlistIdlistIdlist", this.Idlist);
|
|
|
this.videotape = this.Idlist[0].videotape; //第一台是否有回放
|
|
|
this.divName = "my-video1"; //第一台选中
|
|
|
- console.log("divNamedivName",this.divName);
|
|
|
+ console.log("divNamedivName", this.divName);
|
|
|
this.selected = 1; //第一台选中
|
|
|
for (let item = 1; item < this.divNum + 1; item++) {
|
|
|
if (this.Idlist[item - 1]) {
|
|
|
@@ -728,12 +755,12 @@ export default {
|
|
|
},
|
|
|
// 进入分配设备界面
|
|
|
taskFacility() {
|
|
|
- this.$router.push({
|
|
|
- path: `/index/addList`,
|
|
|
- query: {
|
|
|
- plotData: JSON.stringify(this.plotData),
|
|
|
- },
|
|
|
- });
|
|
|
+ this.$router.push({
|
|
|
+ path: `/index/addList`,
|
|
|
+ query: {
|
|
|
+ plotData: JSON.stringify(this.plotData),
|
|
|
+ },
|
|
|
+ });
|
|
|
},
|
|
|
|
|
|
// 地块列表展示
|
|
|
@@ -751,19 +778,19 @@ export default {
|
|
|
.then((res) => {
|
|
|
console.log(res);
|
|
|
if (res.data) {
|
|
|
- this.equipList = res.data
|
|
|
- var data = res.data
|
|
|
- this.plotDataArr = data
|
|
|
- var list = []
|
|
|
+ this.equipList = res.data;
|
|
|
+ var data = res.data;
|
|
|
+ this.plotDataArr = data;
|
|
|
+ var list = [];
|
|
|
for (var i = 0; i < data.length; i++) {
|
|
|
- var obj = {}
|
|
|
- obj['value'] = data[i].plot_id
|
|
|
- obj['label'] = data[i].plot_name
|
|
|
- obj['equip_count'] = data[i].equip_count
|
|
|
- list.push(obj)
|
|
|
+ var obj = {};
|
|
|
+ obj["value"] = data[i].plot_id;
|
|
|
+ obj["label"] = data[i].plot_name;
|
|
|
+ obj["equip_count"] = data[i].equip_count;
|
|
|
+ list.push(obj);
|
|
|
}
|
|
|
- console.log(list)
|
|
|
- this.options = list
|
|
|
+ console.log(list);
|
|
|
+ this.options = list;
|
|
|
}
|
|
|
})
|
|
|
.catch((err) => {
|
|
|
@@ -775,12 +802,12 @@ export default {
|
|
|
plotVal(data) {
|
|
|
for (var i = 0; i < this.plotDataArr.length; i++) {
|
|
|
if (data == this.plotDataArr[i].plot_id) {
|
|
|
- this.plotData = this.plotDataArr[i]
|
|
|
- console.log(this.plotData)
|
|
|
- this.getJkList()
|
|
|
+ this.plotData = this.plotDataArr[i];
|
|
|
+ console.log(this.plotData);
|
|
|
+ this.getJkList();
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
+ },
|
|
|
},
|
|
|
destroyed() {
|
|
|
for (let item in this.videoObj) {
|
|
|
@@ -952,10 +979,9 @@ li {
|
|
|
// height: 50%;
|
|
|
height: 442px;
|
|
|
overflow: auto;
|
|
|
- padding: 0;
|
|
|
+ padding: 20px 0px 0px;
|
|
|
li {
|
|
|
padding-left: 25px;
|
|
|
- padding-right: 25px;
|
|
|
line-height: 34px;
|
|
|
cursor: pointer;
|
|
|
.viewPhoto {
|