diff --git a/web_src/package.json b/web_src/package.json index 72b22c78..847b5d04 100644 --- a/web_src/package.json +++ b/web_src/package.json @@ -20,6 +20,7 @@ "moment": "^2.29.1", "ol": "^6.14.1", "postcss-pxtorem": "^5.1.1", + "screenfull": "5.1.0", "uuid": "^8.3.2", "v-charts": "^1.19.0", "vue": "^2.6.11", diff --git a/web_src/src/components/common/GroupTree.vue b/web_src/src/components/common/GroupTree.vue index 07321687..b7c08ebf 100755 --- a/web_src/src/components/common/GroupTree.vue +++ b/web_src/src/components/common/GroupTree.vue @@ -80,6 +80,10 @@ export default { type: 0 }]); } else { + if (node.data.leaf) { + resolve([]); + return + } this.$axios({ method: 'get', url: `/api/group/tree/list`, diff --git a/web_src/src/components/common/RegionTree.vue b/web_src/src/components/common/RegionTree.vue index a2264ad0..a2e6c9de 100755 --- a/web_src/src/components/common/RegionTree.vue +++ b/web_src/src/components/common/RegionTree.vue @@ -80,6 +80,10 @@ export default { type: 0 }]); } else if (node.data.deviceId.length <= 8) { + if (node.data.leaf) { + resolve([]); + return + } this.$axios({ method: 'get', url: `/api/region/tree/list`, diff --git a/web_src/src/components/live.vue b/web_src/src/components/live.vue index aed5dca9..64d169f9 100755 --- a/web_src/src/components/live.vue +++ b/web_src/src/components/live.vue @@ -5,15 +5,20 @@ - - 分屏: - - - - + +
+ 分屏: + + + + +
+
+ +
-
@@ -32,6 +37,7 @@ import uiHeader from "../layout/UiHeader.vue"; import player from './common/jessibuca.vue' import DeviceTree from './common/DeviceTree.vue' +import screenfull from "screenfull"; export default { name: "live", @@ -236,6 +242,11 @@ export default { console.log(data); window.localStorage.setItem('playData', JSON.stringify(data)) }, + fullScreen: function (){ + if (screenfull.isEnabled) { + screenfull.toggle(this.$refs.playBox); + } + } } }; @@ -255,12 +266,11 @@ export default { } .redborder { - border: 2px solid rgb(64, 158, 255) !important; + border: 4px solid rgb(0, 198, 255) !important; } .play-box { background-color: #000000; - //border: 2px solid #505050; display: flex; align-items: center; justify-content: center; diff --git a/web_src/src/components/map.vue b/web_src/src/components/map.vue index d53dc7d8..b8d096d3 100755 --- a/web_src/src/components/map.vue +++ b/web_src/src/components/map.vue @@ -107,7 +107,10 @@ export default { } }).then((res) => { if (res.data.code === 0) { - if (!res.data.gbLongitude || res.data.gbLatitude) { + console.log(res.data.data) + console.log(res.data.data.gbLongitude) + console.log(res.data.data.gbLatitude) + if (!res.data.data.gbLongitude || !res.data.data.gbLatitude) { this.$message.error({ showClose: true, message: "位置信息不存在" @@ -118,45 +121,20 @@ export default { } this.closeInfoBox() this.layer = this.$refs.map.addLayer([{ - position: [res.data.gbLongitude, res.data.gbLatitude], + position: [res.data.data.gbLongitude, res.data.data.gbLatitude], image: { - src: this.getImageByChannel(res.data), + src: this.getImageByChannel(res.data.data), anchor: [0.5, 1] }, - data: data + data: res.data.data }], this.featureClickEvent) - this.$refs.map.panTo([data[this.longitudeStr], data[this.latitudeStr]], mapParam.maxZoom) + this.$refs.map.panTo([res.data.data.gbLongitude, res.data.data.gbLatitude], mapParam.maxZoom) } } }).catch(function (error) { console.log(error); }); - - this.device = device; - if (data.channelId && !isCatalog) { - // 点击通道 - if (data[this.longitudeStr] * data[this.latitudeStr] === 0) { - this.$message.error({ - showClose: true, - message: "未获取到位置信息" - }) - } else { - if (this.layer != null) { - this.$refs.map.removeLayer(this.layer); - } - this.closeInfoBox() - this.layer = this.$refs.map.addLayer([{ - position: [data[this.longitudeStr], data[this.latitudeStr]], - image: { - src: this.getImageByChannel(data), - anchor: [0.5, 1] - }, - data: data - }], this.featureClickEvent) - this.$refs.map.panTo([data[this.longitudeStr], data[this.latitudeStr]], mapParam.maxZoom) - } - } }, contextmenuEventHandler: function (device, event, data, isCatalog) { console.log(device) diff --git a/web_src/src/layout/UiHeader.vue b/web_src/src/layout/UiHeader.vue index 7208687e..623df322 100755 --- a/web_src/src/layout/UiHeader.vue +++ b/web_src/src/layout/UiHeader.vue @@ -6,7 +6,7 @@ 控制台 分屏监控 - 电子地图 + 国标设备 推流列表 拉流代理