From e044cb7dedd0c171e6a38bed486bf46c8f8c58bb Mon Sep 17 00:00:00 2001 From: hanbaoshan <hanbaoshan@aiotlink.com> Date: 星期三, 23 十二月 2020 15:20:36 +0800 Subject: [PATCH] 长春全景追踪应用更新(添加轨迹图查询,布局结构更新),场景轮播图算法图标不显示问题修复 --- src/pages/labelMark/components/RightSide.vue | 134 +++++++++++++++----------------------------- 1 files changed, 46 insertions(+), 88 deletions(-) diff --git a/src/pages/labelMark/components/RightSide.vue b/src/pages/labelMark/components/RightSide.vue index e243da4..d8a4478 100644 --- a/src/pages/labelMark/components/RightSide.vue +++ b/src/pages/labelMark/components/RightSide.vue @@ -9,7 +9,7 @@ element-loading-text="鍔犺浇涓�" type="border-card" > - <el-tab-pane label="浣嶇疆鏍囨敞" name="1"> + <el-tab-pane label="浣嶇疆鏍囧畾" name="1"> <el-tabs type="border-card"> <el-tab-pane label="鎽勫儚鏈烘爣娉�" name="11"> <div class> @@ -219,7 +219,7 @@ show-icon v-if="groupList.length==0" ></el-alert> - <div class="flex-box"> + <div class="flex-box" v-if="groupList.length!==0"> <div class="group-card" :class="{'checked':group.checked}" @@ -253,7 +253,7 @@ </div> </div> <!-- <div class="part" v-if="groupList.length"> --> - <div class="part" v-if="Object.keys(curGroup)"> + <div class="part" v-if="groupList.length!==0 && Object.keys(curGroup)"> <div class="title">缁樺埗鍖哄煙(鐢ㄤ簬绠楁硶鍒嗘瀽)</div> <div class="relative-partment" v-if="curGroup.cameras&&curGroup.cameras.length"> <div class="area-wrap" v-for="i in 2" :key="'sc'+i"> @@ -312,7 +312,7 @@ </div> </el-tab-pane> </el-tabs> - <el-dialog class="dialog-group" title="鏂板缓鍒嗙粍" :visible.sync="groupModelVisible"> + <el-dialog class="dialog-group" :title="groupForm.id?'缂栬緫鍒嗙粍':'鏂板缓鍒嗙粍'" :visible.sync="groupModelVisible"> <el-form :model="groupForm" ref="groupForm"> <el-form-item> <label>鍒嗙粍鍚嶇О</label> @@ -347,7 +347,7 @@ import { getCamerasByServer } from '@/api/pollConfig'; import { getCameraMarks, updateCameraMarks, findCameraGroups, saveCameraGroupInfo, delCameraGroup } from '@/api/camera'; import { getSearchList } from '@/api/search'; -import TreeDataPool from "@/Pool/TreeData"; + import { isNonnegativeInteger } from '@/scripts/validate'; import { getAllPolygon, saveRelationPolygon, findByCamGroup, findByGroup, delRelation } from '@/api/polygon'; import SlideCanvas from './SlideCanvas'; @@ -356,50 +356,42 @@ components: { SlideCanvas }, data () { return { - labels: [], - colorPick: '#79f2fb', - dotSize: 3, - isEdit: false, - isShowPop: false, - isNewLabel: false, + // labels: [], + // colorPick: '#79f2fb', + // dotSize: 3, + // isEdit: false, + // isShowPop: false, + // isNewLabel: false, // curLabel: { // id: '', - // posX: '', - // posY: '', - // x: '', - // y: '' + // x1: '', + // y1: '', + // x0: '', + // y0: '' // }, - curLabel: { - id: '', - x1: '', - y1: '', - x0: '', - y0: '' - }, - rules: { - x1: [ - { validator: isNonnegativeInteger, trigger: 'change' } - ], - y1: [ - { validator: isNonnegativeInteger, trigger: 'change' } - ] - }, - baseUrl: '', - snapshot_url: '', - userImg: '', - cameraData: [], - traceX: 0, - traceY: 0, - isShowCurPos: false, - actPage: '1', - loading: false, - spaceWidth: '', - spaceHeight: '', - curCameraData: { - cameraId: '', - coords: [] - }, - relativeCameras: [], + // rules: { + // x1: [ + // { validator: isNonnegativeInteger, trigger: 'change' } + // ], + // y1: [ + // { validator: isNonnegativeInteger, trigger: 'change' } + // ] + // }, + // baseUrl: '', + // snapshot_url: '', + // userImg: '', + // cameraData: [], + // traceX: 0, + // traceY: 0, + // isShowCurPos: false, + // actPage: '1', + // loading: false, + // spaceWidth: '', + // spaceHeight: '', + // curCameraData: { + // cameraId: '', + // coords: [] + // }, relativeList: [], cameraAreas: [], groupModelVisible: false, @@ -437,12 +429,7 @@ }, deep: true }, - 'TreeDataPool.selectedNodes': { - handler (n, o) { - }, - deep: true - }, isEdit (n, o) { if (n) { this.$refs['editBoard'].addEventListener('click', this.bindListen); @@ -453,7 +440,6 @@ }, methods: { polygonUpdate(){ - debugger this.getAllGroups(); }, delRelation (item) { @@ -506,13 +492,7 @@ } }) }, - saveRelativeList () { - let params = { - groupId: this.curGroup.id, - } - //saveRelationPolygon().then() - }, async findPolygonByIds (cameras) { for (var i = 0; i < cameras.length; i++) { let res = await getAllPolygon({ cameraId: cameras[i].id }); @@ -572,9 +552,12 @@ for(var i = 0; i< groups.length; i++){ groups[i].cameras = await _this.findPolygonByIds(groups[i].cameras) } - this.groupList = groups + + this.groupList = groups; + debugger //閫変腑绗竴涓� - this.checkCurrentGroup(_this.groupList[0]); + this.groupList.length && this.checkCurrentGroup(_this.groupList[0]); + }, addRelation () { @@ -674,15 +657,9 @@ groupName: '', cameras: [] } + }, - }, - changeTab () { - if (this.actPage == '1') { - this.$parent.$children[0].$el.parentNode.parentElement.style.display = 'block'; - } else { - this.$parent.$children[0].$el.parentNode.parentElement.style.display = 'none'; - } - }, +//labelMark start sure () { let _this = this; this.$refs['labelForm'].validate(valid => { @@ -740,9 +717,6 @@ onChange (file, fileList) { fileList = [file] this.isShowCurPos = false; - // this.traceX = e.offsetX; - // this.traceY = e.offsetY; - //fileList.push(file) }, definedUpload (params) { let _file = params.file @@ -765,18 +739,6 @@ console.log(e) }) }, - // async getAllCameraData () { - // let res = await getCamerasByServer(); - // this.cameraData = res.data; - // let tempArr = []; - // this.cameraData.forEach(camera=>{ - // getAllPolygon({ cameraId: camera.id }).then(res=>{ - // tempArr.push(res.data); - // }) - // }); - // this.cameraAndPolygonData = tempArr; - // console.log(this.cameraAndPolygonData) - // }, bindListen (e) { this.newLabel(e); }, @@ -801,13 +763,11 @@ this.isNewLabel = true; }, editLabel (label) { - debugger if (!this.isEdit) return; this.isShowPop = true; this.$refs['labelForm'].clearValidate(); this.curLabel = JSON.parse(JSON.stringify(label)); - console.log(this.curLabel) - //this.curLabel = label; + }, cancle () { this.isShowPop = false; @@ -1009,8 +969,6 @@ } //color: #4966b7 } - } - .img-card { } .upload-demo, .el-upload { -- Gitblit v1.8.0