diff --git a/web/src/views/HandDevice/Home/components/services/popup.service.ts b/web/src/views/HandDevice/Home/components/services/popup.service.ts
index 113ce70..0cacc04 100644
--- a/web/src/views/HandDevice/Home/components/services/popup.service.ts
+++ b/web/src/views/HandDevice/Home/components/services/popup.service.ts
@@ -36,6 +36,14 @@ export class PopupService {
* 处理单个标记弹窗
*/
handleSingleMarkerPopup(markerData: MarkerData): string {
+ let gpsTypeName = ''
+ if (markerData.gpsType === 0) {
+ gpsTypeName = 'GPS'
+ } else if (markerData.gpsType === 1) {
+ gpsTypeName = 'WIFI'
+ } else if (markerData.gpsType === 2) {
+ gpsTypeName = '基站'
+ }
return `
@@ -54,10 +62,10 @@ export class PopupService {
信号:${markerData.sig||''}
时间:${markerData.timeStr ? markerData.timeStr : '-'}
- 坐标:${markerData.coordinates[0].toFixed(6)}, ${markerData.coordinates[1].toFixed(6)}/${markerData.gpsType===0?"GPS":"基站"}
+ 坐标:${markerData.coordinates[0].toFixed(6)}, ${markerData.coordinates[1].toFixed(6)}/${gpsTypeName}
`
- // gpsType:0表示GPS,550表示基站(或者非0就判定为基站)
+ // gpsType:新0 GPS、1 Wi-Fi、2 基站,旧0表示GPS,550表示基站(或者非0就判定为基站)
}
/**
diff --git a/web/src/views/gas/tdengine/original.vue b/web/src/views/gas/tdengine/original.vue
index f963a19..e22eec8 100644
--- a/web/src/views/gas/tdengine/original.vue
+++ b/web/src/views/gas/tdengine/original.vue
@@ -135,9 +135,30 @@ const getList = async () => {
try {
let payload = JSON.parse(item.payload)
var loc = payload.loc as number[]
-
- if (loc && loc.length == 3) {
- item.gpsType = loc[2] === 0 ? 'GPS' : '基站'
+ if (loc && loc.length == 3) {// 只有3个数值时,第三个数值,定位精度(单位米),用来判断定位方式不准确
+ item.gpsType = ''
+ switch (loc[2]) {
+ case 0:
+ item.gpsType = 'GPS'
+ break
+ default:
+ item.gpsType = '基站'
+ }
+ } else if (loc && loc.length == 4) {// 第4个数值,0表示GPS,1表示WIFI,2表示基站
+ item.gpsType = ''
+ switch (loc[3]) {
+ case 0:
+ item.gpsType = 'GPS'
+ break
+ case 1:
+ item.gpsType = 'WIFI'
+ break
+ case 2:
+ item.gpsType = '基站'
+ break
+ default:
+ item.gpsType = loc[2]
+ }
} else {
item.gpsType = '-'
}