|
@@ -20,16 +20,15 @@
|
|
|
{{ device.uwbKey }}
|
|
|
</span>
|
|
|
<span class="over-flow-hidden" style="width: 20%">
|
|
|
- <i
|
|
|
- class="el-icon-location"
|
|
|
- title="查看设备定位"
|
|
|
- @click="()=>showLocation(device)"
|
|
|
+ <svg-icon :icon-class="`${selectedFlag[device.deviceId]?'bd_signal':'bd_signal_off'}`"
|
|
|
+ title="查看设备定位"
|
|
|
+ @click="()=>showLocation(device)"
|
|
|
/>
|
|
|
- <i
|
|
|
- class="el-icon-circle-close"
|
|
|
- title="查看设备定位"
|
|
|
- @click="()=>play(device)"
|
|
|
- />
|
|
|
+ <!-- <i-->
|
|
|
+ <!-- class="el-icon-circle-close"-->
|
|
|
+ <!-- title="查看设备定位"-->
|
|
|
+ <!-- @click="()=>play(device)"-->
|
|
|
+ <!-- />-->
|
|
|
</span>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -77,6 +76,7 @@ export default {
|
|
|
locationMarkers: {},
|
|
|
selectedDevice: [],
|
|
|
playInterval: null,
|
|
|
+ selectedFlag: {},
|
|
|
};
|
|
|
},
|
|
|
// 组件卸载前清空图层信息
|
|
@@ -111,7 +111,7 @@ export default {
|
|
|
[longitude, latitude],
|
|
|
{
|
|
|
imgurl: position,
|
|
|
- iconSize: [60, 45],
|
|
|
+ iconSize: [50, 60],
|
|
|
symbol: {
|
|
|
'textName': 'm4',
|
|
|
'textSize': 14,
|
|
@@ -128,10 +128,19 @@ export default {
|
|
|
const exist = this.selectedDevice.find(item => item.deviceId === device.deviceId);
|
|
|
if (exist) {
|
|
|
this.selectedDevice = this.selectedDevice.filter(item => item.deviceId !== device.deviceId);
|
|
|
+ this.selectedFlag = {
|
|
|
+ ...this.selectedFlag,
|
|
|
+ [device.deviceId]: false,
|
|
|
+ };
|
|
|
return;
|
|
|
}
|
|
|
this.selectedDevice.push(device);
|
|
|
+ this.selectedFlag = {
|
|
|
+ ...this.selectedFlag,
|
|
|
+ [device.deviceId]: true,
|
|
|
+ };
|
|
|
this.selectedDevice = [...this.selectedDevice];
|
|
|
+ this.play();
|
|
|
},
|
|
|
onMessage(a) {
|
|
|
const data = JSON.parse(a.data);
|
|
@@ -148,6 +157,7 @@ export default {
|
|
|
this.locationMarkers[deviceId].moveMarker([longitude, latitude], 2000, false);
|
|
|
},
|
|
|
play() {
|
|
|
+ this.playInterval && clearInterval(this.playInterval);
|
|
|
const gps = [
|
|
|
[118.868474555524, 32.013913750075],
|
|
|
[118.868459917135, 32.0138560330253],
|