From c99cad106ef5be9f818e45d385dfdcec29ce19e5 Mon Sep 17 00:00:00 2001 From: hanbaoshan <hanbaoshan@aiotlink.com> Date: 星期四, 03 十二月 2020 16:52:24 +0800 Subject: [PATCH] 修复绘制多边形撤销错误的bug --- src/components/LeftNav.vue | 112 ++++++++++++++++++++++++++++++++----------------------- 1 files changed, 65 insertions(+), 47 deletions(-) diff --git a/src/components/LeftNav.vue b/src/components/LeftNav.vue index 5322b01..dbf8e0c 100644 --- a/src/components/LeftNav.vue +++ b/src/components/LeftNav.vue @@ -126,7 +126,8 @@ <div class="tree-edit gb-refresh" v-show="!TreeDataPool.gbReadonly"> <el-tooltip content="鍒锋柊" placement="top" popper-class="atooltip"> <button @click="refreshGB"> - <i class="el-icon-refresh" style="font-size:16px"></i> + <i v-if="loadingGBTree" class="el-icon-loading" style="font-size:16px"></i> + <i v-else class="el-icon-refresh" style="font-size:16px"></i> </button> </el-tooltip> </div> @@ -189,6 +190,10 @@ </el-input> </div> </div> + <div class="top-menu" style="margin:0 0 10px;text-align:left;"> + <span class="iconfont iconjiqun" style="font-size:20px;"></span> + <span style="font-size:14px; margin-left: 5px;font-weight: 600;">{{clusterName}}</span> + </div> <div class="cluster-list"> <tree-menu ref="tree" @@ -205,7 +210,7 @@ <el-tab-pane label="鏁版嵁鏍�" name="dataStack" - :style="`height:${height - 56}px;`" + v-if="showDataStack" > <div class="local-vedio-area"> @@ -233,7 +238,7 @@ size="small" clearable @input="querySearchAsync('dir')" - :style="'width:103px;'" + :style="'width:148px;'" > <i class="el-icon-search el-input__icon" @@ -311,6 +316,7 @@ import LocalVedioList from '@/components/subComponents/LocalVedioList'; import FileUpload from '@/components/subComponents/FileUpload/index'; import XLSX from 'xlsx' +import { findCluster } from "@/api/clusterManage"; export default { components: { @@ -334,17 +340,17 @@ }, computed: { - showTab () { + showTab() { return true; }, - showCam () { + showCam() { return this.appName === "Camera" || this.appName === 'Cluster' || (this.appName === "Search" && (this.buttonAuthority.indexOf("search:camera") >= 0 || this.isAdmin)); }, - showCluster () { + showCluster() { return this.appName === "Cluster"; }, // 鏁版嵁鏍堥厤缃繀椤绘樉绀恒�� 妫�绱㈤�氳繃鏉冮檺鎺у埗鏄剧ず, 鏈畨瑁呮暟鎹爤涔熶笉鏄剧ず - showDataStack () { + showDataStack() { if (this.appName === "DataStack") { return true; } @@ -364,10 +370,10 @@ return false; }, - showLock () { + showLock() { return this.edit; }, - openeds () { + openeds() { let arry = []; for (let i = 0; i < this.TreeDataPool.openeds.length; i++) { if (this.TreeDataPool.openeds[i]) { @@ -378,7 +384,7 @@ } return arry; }, - isAdmin () { + isAdmin() { if ( sessionStorage.getItem("userInfo") && sessionStorage.getItem("userInfo") !== "" @@ -389,7 +395,7 @@ return false; } }, - data () { + data() { return { cameraAuth: "videoMonitor:camera", dataStack: "videoMonitor:dataStack", @@ -441,10 +447,11 @@ fileUploadBox: false, loadingGBTree: false, importAreaId: "", - menuLoading: false + menuLoading: false, + clusterName: '' }; }, - created () { + created() { console.log(this.appName) console.log(this.showCam) if (this.showCam) { @@ -459,47 +466,53 @@ if (this.showCluster) { this.TreeDataPool.treeActiveName = "cluster" this.TreeDataPool.fetchClusterTree(); + findCluster().then(res => { + if (res.success) { + this.clusterName = res.data.clusterName; + } + + }) } }, methods: { - searchAreaData () { + searchAreaData() { this.TreeDataPool.fetchTreeData(); }, - searchDataStack () { + searchDataStack() { this.DataStackPool.fetchFiles(); }, - searchClusterData () { + searchClusterData() { this.TreeDataPool.fetchClusterTree(); }, - lockSwitch () { + lockSwitch() { this.TreeDataPool.readonly = !this.TreeDataPool.readonly; }, - gbLockSwitch () { + gbLockSwitch() { this.TreeDataPool.gbReadonly = !this.TreeDataPool.gbReadonly; }, - dataStackLockSwitch () { + dataStackLockSwitch() { this.DataStackPool.readonly = !this.DataStackPool.readonly; }, - closeTree () { + closeTree() { this.TreeDataPool.showTreeBox = false; bus.$emit('refreshCompareImg') }, - addNode (event) { + addNode(event) { this.$refs.tree.addNode(event, { id: 0 }); }, - addCamera (node) { + addCamera(node) { bus.$emit("addCameraOnTree", node); }, - addDir (node) { + addDir(node) { bus.$emit("addDirOnTree", node); }, - menuOpen (index) { + menuOpen(index) { this.TreeDataPool.openeds[index] = true; }, - menuClose (index) { + menuClose(index) { this.TreeDataPool.openeds[index] = false; }, - refreshGB () { + refreshGB() { // 闃叉閲嶅鍒锋柊 if (this.loadingGBTree) { return; @@ -513,18 +526,21 @@ this.loadingGBTree = false; }, 1000 * 60); }, - querySearchAsync (type) { + querySearchAsync(type) { clearTimeout(this.timeout); this.timeout = setTimeout(() => { if (type === "camera") { this.TreeDataPool.fetchTreeData(); + } + if(type === "cluster"){ + this.TreeDataPool.fetchClusterTree(); } if (type === "dir") { this.DataStackPool.fetchFiles(); } }, 500); }, - handleClick (event) { + handleClick(event) { if (event.name == 'dataStack') { this.DataStackPool.fetchFiles(); this.DataStackPool.clean(); @@ -533,7 +549,7 @@ this.TreeDataPool.treeActiveName = event.name console.log("褰撳墠婵�娲籲ame锛�", this.TreeDataPool.treeActiveName) }, - async changeEnable () { + async changeEnable() { if (this.PollData.localVideo === 0) { this.$notify({ title: "澶辫触", @@ -549,13 +565,13 @@ console.log(res, '鍒囨崲鏈湴鏂囦欢鍒嗘瀽寮�鍏�') } }, - getCheckedFiles () { + getCheckedFiles() { let list1 = this.TreeDataPool.localVedioList.filter(i => { return i.checkStatus }) return list1 }, - async stopVedio (status) { + async stopVedio(status) { // let list1 = this.getCheckedFiles(); if (this.TreeDataPool.checkedLocalVedio.length == 0) { this.$notify({ @@ -578,7 +594,7 @@ console.log(res, '寮�鍚殏鍋滃弬鏁�') } }, - async deleteLocalFiles () { + async deleteLocalFiles() { let list1 = this.getCheckedFiles(); console.log(list1, '宸插嬀閫夌殑瑙嗛') if (list1.length == 0) { @@ -600,16 +616,16 @@ } }, - refrash (current, pageSize) { + refrash(current, pageSize) { this.TreeDataPool.localCurrentPage = current; }, - importCameras (area) { + importCameras(area) { this.importAreaId = area this.$refs["import-btn"].click() }, - async uploadFile (params) { + async uploadFile(params) { const _file = params.file; const fileReader = new FileReader(); fileReader.onload = (ev) => { @@ -667,14 +683,14 @@ }; fileReader.readAsBinaryString(_file); }, - exceed () { + exceed() { this.$message.error("鏈�澶氬彧鑳戒笂浼�1涓獂ls鏂囦欢"); }, //鍒犻櫎鏂囦欢 - remove () { + remove() { }, - newCamera () { + newCamera() { return { latitude: 0, rtsp: "", @@ -855,15 +871,17 @@ } .dev-vedio-list { padding: 0 15px; - max-height: 740px; + box-sizing: border-box; + height: calc(100vh - 80px); + //max-height: 740px; overflow-x: hidden; overflow-y: auto; - @media screen and (max-height: 720px) { - max-height: 580px; - } - @media screen and (min-height: 900px) { - max-height: 740px; - } + // @media screen and (max-height: 720px) { + // max-height: 580px; + // } + // @media screen and (min-height: 900px) { + // max-height: 740px; + // } } .dev-vedio-list::-webkit-scrollbar { /*婊氬姩鏉℃暣浣撴牱寮�*/ @@ -883,7 +901,7 @@ } .tree-edit { - z-index: 1; + z-index: 2; font-size: 16px; position: absolute; top: 56px; @@ -950,7 +968,7 @@ color: #606266; } } -.flex-box{ +.flex-box { display: flex; } </style> \ No newline at end of file -- Gitblit v1.8.0