diff --git a/src/render/stores/nmea.ts b/src/render/stores/nmea.ts index ffcf7a2..6caa9c1 100644 --- a/src/render/stores/nmea.ts +++ b/src/render/stores/nmea.ts @@ -38,6 +38,9 @@ export const useNMEAStore = defineStore('nmea', { // INS: null, // TIM: null, handled: false, + handled1: false, + handled2: false, + handled3: false, }), getters: { dateTime () { @@ -120,6 +123,9 @@ export const useNMEAStore = defineStore('nmea', { // 监听最后一条语句,并设置handled为true if (result.sentence === 'TXT') { this.handled = true + this.handled1 = true + this.handled2 = true + this.handled3 = true } }) }, diff --git a/src/render/views/BDDataAnalysisPlatform/MapView.vue b/src/render/views/BDDataAnalysisPlatform/MapView.vue index 60ea92a..27dd598 100644 --- a/src/render/views/BDDataAnalysisPlatform/MapView.vue +++ b/src/render/views/BDDataAnalysisPlatform/MapView.vue @@ -18,11 +18,12 @@ onMounted(() => { window.ipcRenderer.send('COM_READY') }) -watch(() => nmea.handled, (value) => { +watch(() => nmea.handled3, (value) => { if (!value || !nmea.longitude || !nmea.latitude) return position.value = lonlat2Position( nmea.longitude, nmea.latitude ) mapRef.value.setZoomAndCenter(16, position.value) + nmea.handled3 = false }) diff --git a/src/render/views/BDDataAnalysisPlatform/PlanisphereView/index.vue b/src/render/views/BDDataAnalysisPlatform/PlanisphereView/index.vue index 21b249b..1c97ed4 100644 --- a/src/render/views/BDDataAnalysisPlatform/PlanisphereView/index.vue +++ b/src/render/views/BDDataAnalysisPlatform/PlanisphereView/index.vue @@ -27,7 +27,7 @@ onMounted(() => { }) const nmea = useNMEAStore() -watch(() => nmea.handled, (value) => { +watch(() => nmea.handled1, (value) => { if (!value) return const satellites = nmea.satellites('BD') @@ -38,5 +38,6 @@ watch(() => nmea.handled, (value) => { }) option.series[0].data = data + nmea.handled1 = false }) diff --git a/src/render/views/BDDataAnalysisPlatform/SNRView/index.vue b/src/render/views/BDDataAnalysisPlatform/SNRView/index.vue index 68a36f4..87b63f1 100644 --- a/src/render/views/BDDataAnalysisPlatform/SNRView/index.vue +++ b/src/render/views/BDDataAnalysisPlatform/SNRView/index.vue @@ -27,7 +27,7 @@ onMounted(() => { }) const nmea = useNMEAStore() -watch(() => nmea.handled, (value) => { +watch(() => nmea.handled2, (value) => { if (!value) return const xAxisData = [] @@ -43,5 +43,6 @@ watch(() => nmea.handled, (value) => { option.xAxis.data = xAxisData option.series[0].data = seriesData + nmea.handled2 = false }) diff --git a/src/render/views/VoltageMonitoring/SelectDeviceView/index.vue b/src/render/views/VoltageMonitoring/SelectDeviceView/index.vue index 789625f..3983ac4 100644 --- a/src/render/views/VoltageMonitoring/SelectDeviceView/index.vue +++ b/src/render/views/VoltageMonitoring/SelectDeviceView/index.vue @@ -39,7 +39,7 @@ const onBtnClick = async () => { const decoder = new TextDecoder() const parser = new LineBreakParser() const onSerialPortData = (value: Uint8Array) => { - debugger + // debugger const result: Array = parser.parse(decoder.decode(value)) if (result.length === 0) return