From 56154669b9ab76c3e7ff83be244fad134eb8fc42 Mon Sep 17 00:00:00 2001 From: shijing Date: Wed, 7 Sep 2022 09:37:56 +0800 Subject: [PATCH] 0906 --- src/components/scBind/index.vue | 68 ++++++------------- src/views/bigScreen/index.vue | 113 ++++++++++++++++---------------- src/views/hrm/employee.vue | 8 ++- src/views/vm/visit_detial.vue | 2 +- 4 files changed, 84 insertions(+), 107 deletions(-) diff --git a/src/components/scBind/index.vue b/src/components/scBind/index.vue index 4c37f48e..67dae8fb 100644 --- a/src/components/scBind/index.vue +++ b/src/components/scBind/index.vue @@ -2,6 +2,7 @@ @@ -9,7 +10,7 @@ {{ bindName }} - + { - that.$refs.table.toggleRowSelection(item, false) - }) - }else{ - that.apiObj.map(item => { - debugger; - if (item.id === that.user) { - that.$refs.table.toggleRowSelection(item, true) - } - }) - } - }) - }, - getBltList() { let that = this; that.$API.third.tdevice.list.req({ type: 30, page: 0 }).then((res) => { @@ -100,29 +83,18 @@ }); }, - //加载人员 - handleQuery() { - this.$API.system.user.list - .req(this.query) - .then((res) => { - this.apiObj = res; - }); - }, - submitBindBlt() { let that = this; - this.form.type=this.bindType; - this.form.bindBtl=this.bindBtl; - this.form.bindEmployee=this.bindEmployee; that.$API.third.tdevice.bltBind.req(this.form).then((res) => { if (res.err_msg) { } else { - that.showBindBlt = false; - that.$emit('success',false); + that.pageShow=false; + that.$emit('success',false); } }); }, closeDrawer(){ + this.pageShow=false; this.$emit('closed',false); }, }, diff --git a/src/views/bigScreen/index.vue b/src/views/bigScreen/index.vue index 9255e5c2..420e2778 100644 --- a/src/views/bigScreen/index.vue +++ b/src/views/bigScreen/index.vue @@ -936,8 +936,8 @@ export default { let that = this; let type = event.nodeType.toString(); console.log(type === 'Symbol(icontextmaker)'); - debugger; - console.log(item) + // debugger; + // console.log(item) if (item.markers.length > 0) { if (type === 'Symbol(boxmarker)') { this.screenJob = false; @@ -1158,12 +1158,10 @@ export default { }) }, getAreaList() { - debugger; let that = this; that.$API.am.area.list.req({page:0}).then(res => { if (res.err_msg) { } else { - debugger; that.areaList = res; } }) @@ -1475,61 +1473,64 @@ export default { }, //人员 showUserMarkers(userList) { + // debugger; let that = this; - //人员mark - let iconTextMarker = null; //标记图片 let userImage = ''; if (userList.length > 0) { - // debugger; - console.log(userList); - // debugger; - let lng = [114.62923138539462, 114.6315404372349];//经度 - let i = 0; - iconTextMarker = userList[0].mac; - let employee_ = userList[0].my_info.employee_; - employee_.mac = userList[0].mac; - console.log(userList[0].my_info.employee_.type) - // debugger; - if (userList[0].my_info.employee_.type === 'employee') { - userImage = "/img/employee.png" - } else if (serList[0].my_info.employee_.type === 'remployee') { - userImage = "/img/employee.png" - } else { - userImage = "/img/visitor.png" - } - that.userMarker[iconTextMarker] = new jsmap.JSIconTextMarker({ - id: userList[0].my_info.code, - position: { x: 114.62923138539462, y: 38.8133418942645, z: 0 }, //坐标 - floorId: 1, //楼层id,默认为1(地面) - image: userImage, - 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_ - }, - }); - that.userMaskerLayer.addMarker(that.userMarker[iconTextMarker]); - setInterval(function () { - i = (i + 1) % 2; - that.userMaskerLayer.updateMarkerPosition(that.userMarker[iconTextMarker], { - floorId: 1, - position: { x: lng[i], y: 38.8133418942642, z: 0 }, - animate: { duration: 10000, } - });//动画效果,持续时间一秒 - }, 11000) + userList.forEach(item=>{ + let employee_ = item.my_info.employee_; + employee_.mac = item.mac; + console.log(item.my_info.employee_.type) + let employeeType = item.my_info.employee_.type + if (employeeType === 'employee') { + userImage = "/img/employee.png" + }else if (employeeType === 'driver') { + userImage = "/img/visitor.png" + } else if (employeeType === 'remployee') { + userImage = "/img/employee.png" + }else { + userImage = "/img/visitor.png" + } + debugger; + console.log(item.longitude); + console.log(item.latitude); + let x=item.longitude; + let y=item.latitude; + that.userMarker[item.mac] = new jsmap.JSIconTextMarker({ + id: item.my_info.code, + position: { x: x, y: y, z: 0 }, //坐标 + floorId: 1, //楼层id,默认为1(地面) + image: userImage, + 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_ + }, + }); + that.userMaskerLayer.addMarker(that.userMarker[item.mac]); + }) + + // setInterval(function () { + // i = (i + 1) % 2; + // that.userMaskerLayer.updateMarkerPosition(that.userMarker[iconTextMarker], { + // floorId: 1, + // position: { x: lng[i], y: 38.8133418942642, z: 0 }, + // animate: { duration: 10000, } + // });//动画效果,持续时间一秒 + // }, 11000) } /*setInterval(function () { that.refreshUserMarker(); @@ -1737,7 +1738,7 @@ export default { getVchannels() { let that = this; // debugger; - that.$API.am.tdevice.vchannel.req({pageSize:999}).then(res => { + that.$API.am.tdevice.vchannel.req({page_size:999}).then(res => { if (res.err_msg) { that.$message.error(res.err_msg); } else { diff --git a/src/views/hrm/employee.vue b/src/views/hrm/employee.vue index 97ff370d..5ea56715 100644 --- a/src/views/hrm/employee.vue +++ b/src/views/hrm/employee.vue @@ -130,7 +130,7 @@ @closed="dialog.save = false" > - +