From 6e154680b220e58203396589b46bf8a027c51a7e Mon Sep 17 00:00:00 2001 From: shijing Date: Thu, 7 Jul 2022 16:14:35 +0800 Subject: [PATCH] locationBind --- src/views/am/vchannel_view.vue | 8 ++- src/views/bigScreen/index.vue | 111 +++++++++++++++------------------ 2 files changed, 54 insertions(+), 65 deletions(-) diff --git a/src/views/am/vchannel_view.vue b/src/views/am/vchannel_view.vue index 17530ff3..9f3886af 100644 --- a/src/views/am/vchannel_view.vue +++ b/src/views/am/vchannel_view.vue @@ -193,14 +193,16 @@ //表单提交方法 submit() { let that = this; + let item = this.form.location; /*let item = this.form.location; let tool = new jsmap.JSMapCoordTool(window.map); let coordinate = {x:item[0],y:item[1],z:item.z}; let pixel = tool.mapToScreenCoordinate(coordinate); that.form.location = pixel;*/ - this.form.code = this.channelCode; - this.form.type = this.channelType; - this.form.name = this.channelName; + that.form.code = that.channelCode; + that.form.type = that.channelType; + that.form.name = that.channelName; + that.form.location = {x:item[0],y:item[1],z:item.z}; that.$API.am.tdevice.labelLocation.req(that.form) .then(res => { that.isSaveing = false; diff --git a/src/views/bigScreen/index.vue b/src/views/bigScreen/index.vue index 600de877..6cf3ba7a 100644 --- a/src/views/bigScreen/index.vue +++ b/src/views/bigScreen/index.vue @@ -327,7 +327,13 @@
需充电卡片0人
- + @@ -342,7 +348,18 @@ @node-click="groupClick" >-->
- +
+
+
区域统计
+ +
+
+
+
+
+
+
+
@@ -701,7 +718,7 @@
-
区域风险详情
+
风险区域详情
关闭
@@ -818,6 +835,7 @@ countIndex: '2', markList: [false, false, false, false, false, false, false], autoRun: false, + areaDetail: false, screenJob: false, screenUser: false, screenRisk: false, @@ -1069,8 +1087,12 @@ this.getWarnings();//报警统计$$ this.getAreas();//区域*/ },3000) + }, methods: { + areaRowClick(){ + this.areaDetail = true; + }, //岗位 getAllPost(){ this.$API.system.post.list.req({page:0}).then(res=>{ @@ -1427,8 +1449,24 @@ } }); that.userMaskerLayer.addMarker(iconTextMarker); + setTimeout(function () { + console.log(that.userMaskerLayer); + that.userMaskerLayer.updateMarkerPosition(iconTextMarker,{ + floorId:1, + position: {x:114.62923138539462, y:38.8133418942642, z:0}, + animate: true + });//动画效果,持续时间一秒 + },3000); + /*setTimeout(function () { + console.log(that.userMaskerLayer); + that.userMaskerLayer.updateMarkerPosition(iconTextMarker,{ + floorId:1, + position: {x:114.6315404372349, y: 38.813557855009435, z:0}, + animate: true + });//动画效果,持续时间一秒 + },6000);*/ debugger; - let employee_1 = that.userList[1].my_info.employee_; + /*let employee_1 = that.userList[1].my_info.employee_; iconTextMarker1 = new jsmap.JSIconTextMarker({ id: that.userList[1].my_info.code, position: {x: 114.62923138539462, y: 38.8133418942642, z: 0}, //坐标 @@ -1456,66 +1494,15 @@ } }); that.userMaskerLayer.addMarker(iconTextMarker1); - }else{ setTimeout(function () { - let employee_ = that.userList[0].my_info.employee_; - iconTextMarker = new jsmap.JSIconTextMarker({ - id: that.userList[0].my_info.code, - position: {x: 114.6315404372349, y: 38.813557855009435, z: 0}, //坐标 - floorId: 1, //楼层id,默认为1(地面) - image: "/img/user.png", - text: employee_.name, - font: '10px sans-serif', - fontColor: '#ffffff', - imageHeight: 25, - imageWidth: 25, - backgroundColor: 'rgba(0,0,0,0.3)', - backgroundRadius: 1, - backgroundStrokeColor: 'rgba(0,0,0,0.3)', - backgroundStrokeWidth: 1, - iconTextType: jsmap.JSIconTextType.TOPTEXT_BOTTOMICON, - allowPicking: true, - displayCondition: new jsmap.JSDisplayCondition(0.0, 1000), - nearFarScale: new jsmap.JSNearFarScale(0.0, 1, 500, 1), - show: true, - properties: { - employee: employee_ - }, - callback: (marker) => { - return employee_ - } - }); - that.userMaskerLayer.addMarker(iconTextMarker); + that.userMaskerLayer.updateMarkerPosition(jsmap.JSIconTextMarker,{ + floorId:1, + position: {x:114.6315404372349, y:38.813557855009435, z:0}, + animate: true + });//动画效果,持续时间一秒 - let employee_1 = that.userList[1].my_info.employee_; - iconTextMarker1 = new jsmap.JSIconTextMarker({ - id: that.userList[1].my_info.code, - position: {x: 114.62923138539462, y: 38.8133418942642, z: 0}, //坐标 - floorId: 1, //楼层id,默认为1(地面) - image: "/img/user.png", - text: employee_1.name, - font: '10px sans-serif', - fontColor: '#ffffff', - imageHeight: 25, - imageWidth: 25, - backgroundColor: 'rgba(0,0,0,0.3)', - backgroundRadius: 1, - backgroundStrokeColor: 'rgba(0,0,0,0.3)', - backgroundStrokeWidth: 1, - iconTextType: jsmap.JSIconTextType.TOPTEXT_BOTTOMICON, - allowPicking: true, - displayCondition: new jsmap.JSDisplayCondition(0.0, 1000), - nearFarScale: new jsmap.JSNearFarScale(0.0, 1, 500, 1), - show: true, - properties: { - employee: employee_1 - }, - callback: (marker) => { - return employee_1 - } - }); - that.userMaskerLayer.addMarker(iconTextMarker1); - },3000) + },3000)*/ + }else{ } /*that.userList.forEach(item => { if (item.my_info.code) {