|
@@ -2,8 +2,8 @@
|
|
|
<div class="track-point-overlay">
|
|
|
<template v-if="ShipMapStore.trackHoverData">
|
|
|
<div class="name">
|
|
|
- <template v-if="ShipMapStore.trackHoverData[ShipMapStore.trackKeys.targetName]">
|
|
|
- {{ShipMapStore.trackHoverData[ShipMapStore.trackKeys.targetName]}}
|
|
|
+ <template v-if="ShipMapStore.trackHoverData[ShipMapStore.trackKeys.targetName] || ShipMapStore.trackHoverData[ShipMapStore.trackKeys.targetNameEn]">
|
|
|
+ {{ShipMapStore.trackHoverData[ShipMapStore.trackKeys.targetName] || ShipMapStore.trackHoverData[ShipMapStore.trackKeys.targetNameEn]}}
|
|
|
</template>
|
|
|
<template v-else>
|
|
|
船名号未知
|
|
@@ -102,10 +102,10 @@ const formatDataCpt = computed(() => {
|
|
|
if (ShipMapStore.trackHoverData) {
|
|
|
const s = ShipMapStore.trackHoverData[ShipMapStore.trackKeys.targetSourceJson]
|
|
|
obj.source = getShipSourceNew(s)
|
|
|
- const {RadarbeidouNumber, faultRadarNum, faultmmsiNum} = filterShipNum(s)
|
|
|
- obj.radar = faultRadarNum
|
|
|
- obj.beidou = RadarbeidouNumber
|
|
|
- obj.mmsi = faultmmsiNum
|
|
|
+ const {radar, beidou, mmsi} = ShipMapStore.targetSourceFormat(s)
|
|
|
+ obj.radar = radar
|
|
|
+ obj.beidou = beidou
|
|
|
+ obj.mmsi = mmsi
|
|
|
}
|
|
|
return obj
|
|
|
})
|
|
@@ -127,28 +127,6 @@ const getShipSourceNew = (data) => {
|
|
|
return text
|
|
|
})
|
|
|
}
|
|
|
-const filterShipNum = (data) => {
|
|
|
- const beidou = []
|
|
|
- const Rardar = []
|
|
|
- const mmsi = []
|
|
|
-
|
|
|
- data.map(s => {
|
|
|
- if (!!s && s.trackDeviceNo != 0 && extractArr.some(
|
|
|
- x => x === s.type
|
|
|
- )) {
|
|
|
- mmsi.push(s.trackDeviceNo ?? '')
|
|
|
- } else if (!!s && s.trackDeviceNo != 0 && s.type == 'BEIDOU') {
|
|
|
- beidou.push(s.trackDeviceNo ?? '')
|
|
|
- } else {
|
|
|
- !!s && s.trackId != 0 && Rardar.push(s.trackId ?? '')
|
|
|
- }
|
|
|
- })
|
|
|
- return {
|
|
|
- RadarbeidouNumber: beidou,
|
|
|
- faultRadarNum: Rardar,
|
|
|
- faultmmsiNum: mmsi,
|
|
|
- }
|
|
|
-}
|
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|