|
@@ -3,26 +3,6 @@
|
|
|
<el-dialog title="电视墙" :visible.sync="TVWallVisible" v-if="TVWallVisible" width="80%" @close="cancelEventLocationShow()">
|
|
|
<div class="event-info">
|
|
|
<div class="event-info-con">
|
|
|
- <div class="e-location-left">
|
|
|
- <el-tabs v-model="activeName">
|
|
|
- <el-tab-pane label="视频列表" name="tv">
|
|
|
- <div class="forthis">
|
|
|
- <div class="i-list-con overflow-y" style="height: 50vh;">
|
|
|
- <div class="d-l-con d-evnet-list-con" v-for="(item,index) in 5"
|
|
|
- v-on:click="preview()">
|
|
|
- <!-- <img :src="" v-if="item.picturePath!=null&&item.picturePath!=''" class="event-list-img"> -->
|
|
|
- <img :src="item.picturePath" v-if="item.picturePath!=null&&item.picturePath!=''"
|
|
|
- class="event-list-img">
|
|
|
- <img src="@/assets/images/visual/img-sample.png" v-else class="event-list-img">
|
|
|
- <div class="event-list-text">
|
|
|
- <h3>列表</h3>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </el-tab-pane>
|
|
|
- </el-tabs>
|
|
|
- </div>
|
|
|
<div class="e-location-right" style="width:100%;height:350px;position:relative;">
|
|
|
<div id="dom1" class="dom1"></div>
|
|
|
<div id="dom2" class="dom2"></div>
|
|
@@ -37,7 +17,7 @@
|
|
|
|
|
|
<script>
|
|
|
/** ----------------------------------摄像头预览开始------------------------------------- */
|
|
|
- import { getDahuaVideoServer } from '@/api/dahua/dahua'
|
|
|
+ import { getDahuaVideoServer,getTVWallList } from '@/api/dahua/dahua'
|
|
|
import DHWs from '@/dahua/lib/DHWs'
|
|
|
|
|
|
/** ----------------------------------摄像头预览结束------------------------------------- */
|
|
@@ -124,14 +104,6 @@
|
|
|
activePanel: 'key1',
|
|
|
isLogin: false,
|
|
|
loginType: '1',
|
|
|
- // loginIp: '10.1.240.10',
|
|
|
- // userName: 'yanshi',
|
|
|
- // userPwd: 'dahua123',
|
|
|
- // loginPort: '8320',
|
|
|
- loginIp: '202.111.178.254',
|
|
|
- userName: 'system',
|
|
|
- userPwd: 'Admin@123',
|
|
|
- loginPort: '7902',
|
|
|
token: '',
|
|
|
ctrlType: 'playerWin',
|
|
|
https: 1,
|
|
@@ -303,9 +275,11 @@
|
|
|
cancelEventLocationShow() {
|
|
|
this.activeName = 'tv'
|
|
|
this.TVWallVisible=false
|
|
|
+ this.destroy()
|
|
|
},
|
|
|
showTVWall() {
|
|
|
this.TVWallVisible = true
|
|
|
+ this.preview()
|
|
|
},
|
|
|
/** ----------------------------------摄像头预览开始------------------------------------- */
|
|
|
alertLogin: function() {
|
|
@@ -340,7 +314,9 @@
|
|
|
if (res) {
|
|
|
this.alertLoginSuccess()
|
|
|
this.activePanel = 'key2'
|
|
|
- this.create()
|
|
|
+ getTVWallList().then(newres=> {
|
|
|
+ this.create(newres.data)
|
|
|
+ });
|
|
|
} else {
|
|
|
this.alertLoginFailed()
|
|
|
}
|
|
@@ -352,7 +328,8 @@
|
|
|
})
|
|
|
},
|
|
|
|
|
|
- create() { // 调用创建控件接口
|
|
|
+ create(tvListJson) { // 调用创建控件接口
|
|
|
+ console.log(tvListJson)
|
|
|
debugger
|
|
|
let _this = this;
|
|
|
console.log(this.cutPosX,"this.cutPosX")
|
|
@@ -376,16 +353,16 @@
|
|
|
this.setPos();
|
|
|
_this.ws.createCtrl(params).then(res => {
|
|
|
console.log(res);
|
|
|
- _this.ws.customizeTree(this.tvListJson);
|
|
|
+ _this.ws.customizeTree(tvListJson);
|
|
|
}).catch(e => {
|
|
|
console.log(e);
|
|
|
});
|
|
|
_this.ws.on('createCtrlResult', (res) => {
|
|
|
console.log(res);
|
|
|
- _this.ws.customizeTree(this.tvListJson);
|
|
|
+ _this.ws.customizeTree(tvListJson);
|
|
|
_this.ws.on('createCtrlResult', (res) => {
|
|
|
console.log(res);
|
|
|
- _this.ws.customizeTree(this.tvListJson);
|
|
|
+ _this.ws.customizeTree(tvListJson);
|
|
|
});
|
|
|
});
|
|
|
},
|
|
@@ -404,6 +381,18 @@
|
|
|
window.fireEvent("onresize");
|
|
|
}
|
|
|
},
|
|
|
+ destroy() { // 调用销毁控件接口
|
|
|
+ if (!this.isLogin) {
|
|
|
+ this.$Message.info('正在登陆客户端,请稍等......');
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ const ctrls = this.ws.ctrls.map(i => {
|
|
|
+ if (i.ctrlCode === this.ctrl) {
|
|
|
+ return i.ctrlCode;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ this.ws.destroyCtrl(ctrls);
|
|
|
+ },
|
|
|
/** ----------------------------------摄像头预览结束------------------------------------- */
|
|
|
}
|
|
|
}
|