Pārlūkot izejas kodu

将东方德思足迹地址从Javashop获取修改成本地获取

wenningning 2 gadi atpakaļ
vecāks
revīzija
19b9f3befe

+ 7 - 0
src/api/ncs_device.js

@@ -269,4 +269,11 @@ export function rebootDevice(id){
   })
 }
 
+export function getWatchFootprint(memberId, deviceType){
+  return request({
+    url: `/ncs/device/getWatchFootprint/${memberId}/${deviceType}`,
+    method: 'get'
+  })
+}
+
 

+ 12 - 10
src/views/customer/components/customerManager.vue

@@ -556,6 +556,8 @@ import * as shop_API from "@/api/ncs_shop";
 import {getDevicesByUuid} from "@/api/initialize"
 import myMapHtml from '@/views/customer/myMapHtml'
 import {getRelativeList, removeRelative} from "@/api/ncs_relative";
+import { getWatchFootprint } from '@/api/ncs_device'
+import {DEVICE_TYPE} from '@/utils/enum/DeviceTypeEnum'
 const serverUrl = domain.serverUrl
 export default {
   name: 'CustomerManager',
@@ -1137,7 +1139,7 @@ export default {
     },
     handleClick() {
       if (this.activeName === 'footprint') {
-        this.$router.push({path:'/myMapHtml', query: {mapUrl: this.mapUrl}})
+        this.$router.push({path:'/device/myMapHtml', query: {mapUrl: this.mapUrl}})
       }
     },
     /** 生日选择变化,修改年龄字段 */
@@ -1317,15 +1319,15 @@ export default {
       this.getQrCode()
       this.getRemarks()
       this.getRelatives()
-      if (this.isCloud) {
-        const _this = this
-        getDevicesByUuid(row.uuid).then(res => {
-          if (res) {
-            _this.boolDevice = true
-            _this.mapUrl = res
-          }
-        })
-      }
+      // 获取该用户的胸牌/手环
+      const _this = this
+      getWatchFootprint(row.member_id,  DEVICE_TYPE.BREASTPLATE).then(res => {
+        if (res) {
+          _this.boolDevice = true
+          _this.mapUrl = res
+        }
+      })
+
     },
     /** 出院 退床 **/
     handleOut(row) {

+ 11 - 10
src/views/customer/components/elderlyCareManager.vue

@@ -523,6 +523,8 @@
     import {RELATIVE_NAME_TYPE} from "@/utils/enum/RelativeNameTypeEnum";
     import SleepDetectData from "../sleep-detect-data";
     import {getRelativeList, removeRelative} from "@/api/ncs_relative";
+    import { getWatchFootprint } from '@/api/ncs_device'
+    import { DEVICE_TYPE } from '@/utils/enum/DeviceTypeEnum'
     const serverUrl = domain.serverUrl
     export default {
         name: 'ElderlyCareManager',
@@ -1084,7 +1086,7 @@
             },
             handleClick() {
               if (this.activeName === 'footprint') {
-                this.$router.push({path:'/myMapHtml', query: {mapUrl: this.mapUrl}})
+                this.$router.push({path:'/device/myMapHtml', query: {mapUrl: this.mapUrl}})
               }
             },
             /** 生日选择变化,修改年龄字段 */
@@ -1279,15 +1281,14 @@
                 this.handNusreColor()
                 this.getRemarks()
                 this.getRelatives()
-                if (this.isCloud) {
-                  const _this = this
-                  getDevicesByUuid(row.uuid).then(res => {
-                    if (res) {
-                      _this.boolDevice = true
-                      _this.mapUrl = res
-                    }
-                  })
-                }
+                // 获取该用户的胸牌/手环
+                const _this = this
+                getWatchFootprint(row.member_id, DEVICE_TYPE.BREASTPLATE).then(res => {
+                  if (res) {
+                    _this.boolDevice = true
+                    _this.mapUrl = res
+                  }
+                })
             },
             /** 出院 退床 **/
             handleOut(row) {

+ 5 - 4
src/views/customer/components/patientManager.vue

@@ -551,6 +551,8 @@
     import {CHILDBIRTH_TYPE} from "@/utils/enum/ChildbirthTypeEnum";
     import SleepDetectData from "../sleep-detect-data";
     import {getRelativeList, removeRelative} from "@/api/ncs_relative";
+    import { getWatchFootprint } from '@/api/ncs_device'
+    import { DEVICE_TYPE } from '@/utils/enum/DeviceTypeEnum'
     const serverUrl = domain.serverUrl
     export default {
         name: 'PatientManager',
@@ -1160,7 +1162,7 @@
           },
             handleClick() {
               if (this.activeName === 'footprint') {
-                this.$router.push({path:'/myMapHtml', query: {mapUrl: this.mapUrl}})
+                this.$router.push({path:'/device/myMapHtml', query: {mapUrl: this.mapUrl}})
               }
             },
             /** 生日选择变化,修改年龄字段 */
@@ -1362,15 +1364,14 @@
                 this.getQrCode()
                 this.getRemarks()
                 this.getRelatives()
-              if (this.isCloud) {
+                // 获取该用户的胸牌/手环
                 const _this = this
-                getDevicesByUuid(row.uuid).then(res => {
+                getWatchFootprint(row.member_id, DEVICE_TYPE.BREASTPLATE).then(res => {
                   if (res) {
                     _this.boolDevice = true
                     _this.mapUrl = res
                   }
                 })
-              }
             },
             /** 出院 退床 **/
             handleOut(row) {