|
@@ -118,6 +118,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
+ <TVWall ref="TVWall"></TVWall>
|
|
|
<!--事件弹层-->
|
|
|
<div class="event-info">
|
|
|
<eventdetailsdialog ref="eventdetailsdialog" :calendarDay="this.getCurrentDataStr"></eventdetailsdialog>
|
|
@@ -141,23 +142,22 @@ import {
|
|
|
import {
|
|
|
getHaiKangVideoServer
|
|
|
} from '@/api/haikang/haikang'
|
|
|
-import vBottomMenu from '@/components/vBottomMenu.vue' //一体化公共底部菜单
|
|
|
import eventLocationSupermap from '@/components/supermap' //超图
|
|
|
import eventdetailsdialog from '@/views/eventdetailsdialog.vue' //事件详情弹窗
|
|
|
+
|
|
|
/** ----------------------------------摄像头预览开始------------------------------------- */
|
|
|
import {
|
|
|
- getDahuaVideoServer
|
|
|
+ getDahuaVideoServer, getTVWallList
|
|
|
} from '@/api/dahua/dahua'
|
|
|
import DHWs from '@/dahua/lib/DHWs'
|
|
|
-
|
|
|
+import TVWall from "@/components/TVWall.vue";
|
|
|
/** ----------------------------------摄像头预览结束------------------------------------- */
|
|
|
export default {
|
|
|
dicts: ['event_source'],
|
|
|
components: {
|
|
|
eventLocationSupermap,
|
|
|
eventdetailsdialog,
|
|
|
- vBottomMenu
|
|
|
-
|
|
|
+ TVWall
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
@@ -448,19 +448,22 @@ export default {
|
|
|
let markersMap = {
|
|
|
lng: 124.59,
|
|
|
lat: 43.02,
|
|
|
- icon: 'camera',
|
|
|
- bindPopupHtml: '',
|
|
|
- click: 'preview',
|
|
|
+ icon: "camera",
|
|
|
+ bindPopupHtml: "",
|
|
|
+ click: "preview",
|
|
|
+ parameter: "",
|
|
|
+ name: i,
|
|
|
keepBindPopup: false,
|
|
|
- isAggregation: false
|
|
|
- }
|
|
|
- if (res.data[i].cameraCode != null) {
|
|
|
+ isAggregation: false,
|
|
|
+ };
|
|
|
+ if (res.data[i].channelCode != null) {
|
|
|
markersMap.parameter = {
|
|
|
code: res.data[i].cameraCode,
|
|
|
- type: res.data[i].cameraFactory
|
|
|
- }
|
|
|
+ name: res.data[i].cameraName,
|
|
|
+ type: res.data[i].cameraFactory,
|
|
|
+ };
|
|
|
} else {
|
|
|
- markersMap.parameter = []
|
|
|
+ markersMap.parameter = [];
|
|
|
}
|
|
|
if (res.data.length > 50) {
|
|
|
markersMap.isAggregation = true
|
|
@@ -528,6 +531,49 @@ export default {
|
|
|
showEventLocation() {
|
|
|
this.eventLocationVisible = true
|
|
|
},
|
|
|
+ showTVWall(channelCode, channelName) {
|
|
|
+ let tvListJson = [
|
|
|
+ {
|
|
|
+ switchTab: "2",
|
|
|
+ treeLabels: [
|
|
|
+ {
|
|
|
+ id: null,
|
|
|
+ labelCode: "999",
|
|
|
+ labelName: "电视墙",
|
|
|
+ cameraType: null,
|
|
|
+ parentLabelCode: "",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: "spcamera00010",
|
|
|
+ labelCode: channelCode,
|
|
|
+ labelName: channelName,
|
|
|
+ cameraType: "1",
|
|
|
+ parentLabelCode: "999",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ labelChannels: [
|
|
|
+ {
|
|
|
+ labelCode: channelCode,
|
|
|
+ channelDates: [
|
|
|
+ {
|
|
|
+ channelCode: channelCode,
|
|
|
+ channelName: channelName,
|
|
|
+ channelSn: null,
|
|
|
+ cameraType: "1",
|
|
|
+ online: "1",
|
|
|
+ cameraCode: "1",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ ];
|
|
|
+ this.$refs.TVWall.showTVWall(tvListJson, [
|
|
|
+ {
|
|
|
+ channelId: channelCode,
|
|
|
+ },
|
|
|
+ ]);
|
|
|
+ },
|
|
|
/** ----------------------------------摄像头预览开始------------------------------------- */
|
|
|
alertLogin: function() {
|
|
|
this.$modal.msg('登录中....')
|
|
@@ -552,48 +598,7 @@ export default {
|
|
|
},
|
|
|
/** 预览按钮操作 */
|
|
|
preview(cameraParam) {
|
|
|
- if (cameraParam.type == '1') {
|
|
|
- getDahuaVideoServer().then(newResponse => {
|
|
|
- console.log(newResponse)
|
|
|
- this.ws.detectConnectQt().then(res => {
|
|
|
- if (res) { // 连接客户端成功
|
|
|
- this.alertLogin()
|
|
|
- this.ws.login({
|
|
|
- loginIp: newResponse.loginIp,
|
|
|
- loginPort: newResponse.loginPort,
|
|
|
- userName: newResponse.userName,
|
|
|
- userPwd: newResponse.userPwd,
|
|
|
- token: '',
|
|
|
- https: 0
|
|
|
- })
|
|
|
- this.ws.on('loginState', (res) => {
|
|
|
- this.isLogin = res
|
|
|
- console.log('---res-----', res)
|
|
|
- if (res) {
|
|
|
- this.alertLoginSuccess()
|
|
|
- this.activePanel = 'key2'
|
|
|
- this.realTimeVideoDialog(cameraParam.code)
|
|
|
- } else {
|
|
|
- this.alertLoginFailed()
|
|
|
- }
|
|
|
- })
|
|
|
- } else { // 连接客户端失败
|
|
|
- this.alertReinstall()
|
|
|
- }
|
|
|
- })
|
|
|
- })
|
|
|
- } else if (cameraParam.type == '0') {
|
|
|
- let that = this
|
|
|
- that.cameraVisible = true
|
|
|
- getHaiKangVideoServer({ cameraCode: cameraParam.code }).then(newResponse => {
|
|
|
- that.cameraTitle = '摄像头-' + newResponse.data.cameraName
|
|
|
- that.initPlugin(newResponse.data.appkey, newResponse.data.loginIp, newResponse.data.secret, newResponse.data.loginPort)
|
|
|
- setTimeout(function() {
|
|
|
- that.playhk(newResponse.data.channelCode)
|
|
|
- }, 5000)
|
|
|
- })
|
|
|
- }
|
|
|
-
|
|
|
+ this.showTVWall(cameraParam.code, cameraParam.name);
|
|
|
},
|
|
|
realTimeVideoDialog(cameraParams) { // 调用弹窗实时播放接口
|
|
|
if (!this.isLogin) {
|