From 6f83e8078c222c2b3fffaf3d6d66fd097f92d6bb Mon Sep 17 00:00:00 2001 From: 18650502300 <18650502300@163.com> Date: Thu, 20 Jun 2024 15:09:30 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/system/device.js | 6 +- src/components/Map/location/LocationMap.vue | 39 +++++- src/views/system/device/index.vue | 12 +- src/views/system/fee/index.vue | 39 ++++-- src/views/system/order/index.vue | 145 +++++++++++++++++++- src/views/system/refund/index.vue | 61 +------- src/views/user/user/index.vue | 32 ++++- 7 files changed, 249 insertions(+), 85 deletions(-) diff --git a/src/api/system/device.js b/src/api/system/device.js index 5d32769..8ac2fe7 100644 --- a/src/api/system/device.js +++ b/src/api/system/device.js @@ -54,7 +54,7 @@ export function allDevice() { // 开锁 export function handleUnlocking(data){ return request({ - url: '/appVerify/admin/unlocking?sn='+data.sn, + url: '/system/device/admin/unlockingByMac?mac='+data.mac, method: 'post' }) } @@ -62,7 +62,7 @@ export function handleUnlocking(data){ // 关锁 export function handleLock(data){ return request({ - url: '/appVerify/admin/lock?sn='+data.sn, + url: '/system/device/admin/lockByMac?mac='+data.mac, method: 'post' }) } @@ -70,7 +70,7 @@ export function handleLock(data){ // 响铃寻车 export function ring(data){ return request({ - url: '/app/device/ring?sn='+data.sn, + url: '/app/device/ringByMac?mac='+data.mac, method: 'post' }) } diff --git a/src/components/Map/location/LocationMap.vue b/src/components/Map/location/LocationMap.vue index e8f4559..8a3dc24 100644 --- a/src/components/Map/location/LocationMap.vue +++ b/src/components/Map/location/LocationMap.vue @@ -40,11 +40,19 @@ export default { }, initLng: { type: String, - default: 120.250452 + default: '120.250452' }, initLat: { type: String, - default: 27.101745 + default: '27.101745' + }, + status: { + type: String, + default: '0' + }, + onlineStatus: { + type: String, + default: '0' }, }, data() { @@ -115,7 +123,8 @@ export default { this.getGeoAddress(this.initLng, this.initLat).then(res => { // 标点 this.removeAllMarker(); - this.addMarker(this.initLng, this.initLat, res.regeocode.formattedAddress); + console.log("添加标记点") + this.addMarker(this.initLng, this.initLat, res.regeocode.formattedAddress, this.status, this.onlineStatus); this.$emit('map-geo', res, this.initLng, this.initLat); // 地区 @@ -129,16 +138,38 @@ export default { }) } }, - addMarker(lng, lat, title) { + addMarker(lng, lat, title,status,onlineStatus) { //创建一个 Marker 实例: let marker = new AMap.Marker({ position: new AMap.LngLat(lng, lat), //经纬度对象 + icon: this.formarStatus(status,onlineStatus), title: title, }); //将创建的点标记添加到已有的地图实例: this.map.add(marker); this.markers.push(marker); }, + formarStatus(status,onlineStatus){ + if(onlineStatus == "0"){ + return globalConfig.icon.red; + }else{ + if(status == "0"){ + return globalConfig.icon.gray; + }else if(status == "1"){ + return globalConfig.icon.blue; + }else if(status == "2"){ + return globalConfig.icon.yellow; + }else if(status == "3"){ + return globalConfig.icon.yellow; + }else if(status == "4"){ + return globalConfig.icon.light_blue; + }else if(status == "8"){ + return globalConfig.icon.gray; + }else if(status == "9"){ + return globalConfig.icon.gray; + } + } + }, // 删除所有的标记点 removeAllMarker() { this.map.remove(this.markers); diff --git a/src/views/system/device/index.vue b/src/views/system/device/index.vue index 9ed6750..0a27717 100644 --- a/src/views/system/device/index.vue +++ b/src/views/system/device/index.vue @@ -302,7 +302,15 @@ {{ form.onlineStatus == 1 ? '在线' : '离线' }} @@ -328,6 +336,8 @@ @map-geo="onMapGeo" :init-lat="form.latitude" :init-lng="form.longitude" + :status="form.status" + :online-status="form.onlineStatus" /> diff --git a/src/views/system/fee/index.vue b/src/views/system/fee/index.vue index cb4194e..4bde136 100644 --- a/src/views/system/fee/index.vue +++ b/src/views/system/fee/index.vue @@ -2,6 +2,16 @@
+ + + + + @@ -41,7 +51,7 @@ - + + + + + + + + + + @@ -312,6 +322,7 @@ + diff --git a/src/views/system/refund/index.vue b/src/views/system/refund/index.vue index 03c1988..7b64c51 100644 --- a/src/views/system/refund/index.vue +++ b/src/views/system/refund/index.vue @@ -17,10 +17,10 @@ @keyup.enter.native="handleQuery" /> - + @@ -33,7 +33,7 @@ @keyup.enter.native="handleQuery" /> - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -107,24 +74,6 @@ - - - - - + + + + + - + + + + + + + + @@ -318,7 +337,7 @@ import { listUser as getSysUserList } from "@/api/system/user"; export default { name: "User", - dicts: ['sys_normal_disable', 'sys_user_sex'], + dicts: ['sys_normal_disable', 'sys_user_sex','et_user_is_authentication','et_asuser_role'], data() { return { // 遮罩层 @@ -339,6 +358,7 @@ export default { sysUserList: null, sysUserOptions: null, userId:null, + role: null, // 弹出层标题 title: "", // 是否显示弹出层 @@ -511,7 +531,7 @@ export default { submitBand: function () { console.log(this.form.userId) console.log(this.userId) - bandSystemUser({userId:this.form.userId,sysUserId:this.userId}).then(response => { + bandSystemUser({userId:this.form.userId,sysUserId:this.userId,role:this.role}).then(response => { this.$modal.msgSuccess("绑定成功"); this.open2 = false; this.getList(); @@ -549,7 +569,7 @@ export default { handleBandSysUser(row){ this.reset(); const userId = row.userId || this.ids; - getSysUserList(userId).then(response => { + getSysUserList({"userType":"00"}).then(response => { this.sysUserOptions = response.rows; this.form.userId = userId; this.open2 = true;