From e6790d88fc5b1ac33d239c0d90ce6cdea666b821 Mon Sep 17 00:00:00 2001 From: mk1990 <153958232@qq.com> Date: 星期一, 16 五月 2022 10:14:24 +0800 Subject: [PATCH] Merge branch 'wvp-28181-2.0' of https://github.com/mk1990/wvp-GB28181-pro into wvp-28181-2.0 --- web_src/src/components/devicePosition.vue | 25 ++++++++++++++++++------- 1 files changed, 18 insertions(+), 7 deletions(-) diff --git a/web_src/src/components/devicePosition.vue b/web_src/src/components/devicePosition.vue index cc74dc1..db19677 100644 --- a/web_src/src/components/devicePosition.vue +++ b/web_src/src/components/devicePosition.vue @@ -1,6 +1,6 @@ <template> <div id="devicePosition" style="width: 100vw; height: 91vh;"> - <el-container style="height: 91vh;" v-loading="isLoging"> + <el-container v-if="onOff" style="height: 91vh;" v-loading="isLoging"> <el-aside width="auto" style="background-color: #ffffff"> <DeviceTree ref="deviceTree" :clickEvent="clickEvent" :contextMenuEvent="contextmenuEventHandler" ></DeviceTree> </el-aside> @@ -8,16 +8,20 @@ <MapComponent ref="map"></MapComponent> </el-main> </el-container> + <div v-if="!onOff" style="width: 100%; height:100%; text-align: center; line-height: 5rem"> + <p>鍦板浘鍔熻兘宸插叧闂�</p> + </div> <div ref="infobox" v-if="channel != null " > <div v-if="channel != null" class="infobox-content"> <el-descriptions class="margin-top" :title="channel.name" :column="1" :colon="true" size="mini" :labelStyle="labelStyle" > - <el-descriptions-item label="鐢熶骇鍘傚晢">{{channel.manufacture}}</el-descriptions-item> + <el-descriptions-item label="缂栧彿" >{{channel.channelId}}</el-descriptions-item> <el-descriptions-item label="鍨嬪彿">{{channel.model}}</el-descriptions-item> - <el-descriptions-item label="璁惧褰掑睘" >{{channel.owner}}</el-descriptions-item> + <el-descriptions-item label="缁忕含搴�" >{{channel.longitude}},{{channel.latitude}}</el-descriptions-item> + <el-descriptions-item label="鐢熶骇鍘傚晢">{{channel.manufacture}}</el-descriptions-item> <el-descriptions-item label="琛屾斂鍖哄煙" >{{channel.civilCode}}</el-descriptions-item> + <el-descriptions-item label="璁惧褰掑睘" >{{channel.owner}}</el-descriptions-item> <el-descriptions-item label="瀹夎鍦板潃" >{{channel.address == null?'鏈煡': channel.address}}</el-descriptions-item> <el-descriptions-item label="浜戝彴绫诲瀷" >{{channel.ptztypeText}}</el-descriptions-item> - <el-descriptions-item label="缁忕含搴�" >{{channel.longitude}},{{channel.latitude}}</el-descriptions-item> <el-descriptions-item label="鐘舵��"> <el-tag size="small" v-if="channel.status === 1">鍦ㄧ嚎</el-tag> <el-tag size="small" type="info" v-if="channel.status === 0">绂荤嚎</el-tag> @@ -55,6 +59,7 @@ }, data() { return { + onOff: typeof window.mapParam !== "undefined" && window.mapParam.enable, deviceService: new DeviceService(), layer: null, lineLayer: null, @@ -71,7 +76,7 @@ console.log(this.$route.query.deviceId) // this.$refs.deviceTree.openByDeivceId(this.$route.query.deivceId) setTimeout(()=>{ // 寤惰繜浠ョ瓑寰呭湴鍥惧姞杞藉畬鎴� TODO 鍚庣画淇敼涓洪�氳繃鏄疄闄呰繖锛涚姸鎬佸姞鍥炶皟瀹屾垚 - this.deviceService.getAllChannel(false, this.$route.query.deviceId, this.channelsHandler) + this.deviceService.getAllChannel(false, false, this.$route.query.deviceId, this.channelsHandler) }, 1000) } @@ -137,7 +142,13 @@ zIndex: 3000, // 鑿滃崟鏍峰紡 z-index }); } else { - this.deviceOrSubChannelMenu(event, data) + if (typeof data.channelId === "undefined") { + this.deviceOrSubChannelMenu(event, data) + }else { + // TODO 瀛愮洰褰曟殏鏃朵笉鏀寔鏌ヨ浠栦笅闈㈡墍鏈夎澶�, 鏀寔鏀寔鏌ヨ鐩村睘浜庤繖涓洰褰曠殑璁惧 + this.deviceOrSubChannelMenu(event, data) + } + } }, @@ -151,7 +162,7 @@ disabled: false, onClick: () => { if (!data.channelId) { - this.deviceService.getAllChannel(false, data.deviceId, this.channelsHandler) + this.deviceService.getAllChannel(false, false, data.deviceId, this.channelsHandler) } if (data.channelId && data.subCount > 0) { // 鐐瑰嚮瀛愮洰褰� -- Gitblit v1.8.0