Commit 38d20b729e6ca8b8498b586c8c80063b734de8b6

Authored by ww
1 parent e42fbe00

fix: DEFECT-1253 修复地理位置显示名称为sn码

@@ -305,6 +305,7 @@ @@ -305,6 +305,7 @@
305 const markerList: MarkerList[] = []; 305 const markerList: MarkerList[] = [];
306 data.forEach((item) => { 306 data.forEach((item) => {
307 const { 307 const {
  308 + alias,
308 name, 309 name,
309 deviceState, 310 deviceState,
310 deviceInfo: { longitude, latitude }, 311 deviceInfo: { longitude, latitude },
@@ -313,7 +314,7 @@ @@ -313,7 +314,7 @@
313 const rivet = deviceState === 'INACTIVE' ? djx : deviceState === 'ONLINE' ? zx : lx; 314 const rivet = deviceState === 'INACTIVE' ? djx : deviceState === 'ONLINE' ? zx : lx;
314 const myIcon = new BMap.Icon(rivet, new BMap.Size(20, 30)); 315 const myIcon = new BMap.Icon(rivet, new BMap.Size(20, 30));
315 const marker = new BMap.Marker(point, { icon: myIcon }); 316 const marker = new BMap.Marker(point, { icon: myIcon });
316 - const label = new BMap.Label(name, { 317 + const label = new BMap.Label(alias || name, {
317 position: point, 318 position: point,
318 offset: new BMap.Size(-15, -45), 319 offset: new BMap.Size(-15, -45),
319 }); 320 });