diff --git a/src/components/device/device-card/ndm-alarm-host/alarm-host-card.vue b/src/components/device/device-card/ndm-alarm-host/alarm-host-card.vue index a8d357f..5719a42 100644 --- a/src/components/device/device-card/ndm-alarm-host/alarm-host-card.vue +++ b/src/components/device/device-card/ndm-alarm-host/alarm-host-card.vue @@ -21,10 +21,10 @@ const { debugModeEnabled } = storeToRefs(settingStore); const { ndmDevice, station } = toRefs(props); const showPageHeader = computed(() => { - return !!route.query['from']; + return !!route.query['fromPage']; }); const onBack = () => { - router.push({ path: `${route.query['from']}` }); + router.push({ path: `${route.query['fromPage']}` }); }; const activeTabName = ref('当前诊断'); diff --git a/src/components/device/device-card/ndm-camera/camera-card.vue b/src/components/device/device-card/ndm-camera/camera-card.vue index c0bf10f..0f87619 100644 --- a/src/components/device/device-card/ndm-camera/camera-card.vue +++ b/src/components/device/device-card/ndm-camera/camera-card.vue @@ -21,10 +21,10 @@ const { debugModeEnabled } = storeToRefs(settingStore); const { ndmDevice, station } = toRefs(props); const showPageHeader = computed(() => { - return !!route.query['from']; + return !!route.query['fromPage']; }); const onBack = () => { - router.push({ path: `${route.query['from']}` }); + router.push({ path: `${route.query['fromPage']}` }); }; const activeTabName = ref('当前诊断'); diff --git a/src/components/device/device-card/ndm-decoder/decoder-card.vue b/src/components/device/device-card/ndm-decoder/decoder-card.vue index 5fe4b34..9d5bd75 100644 --- a/src/components/device/device-card/ndm-decoder/decoder-card.vue +++ b/src/components/device/device-card/ndm-decoder/decoder-card.vue @@ -21,10 +21,10 @@ const { debugModeEnabled } = storeToRefs(settingStore); const { ndmDevice, station } = toRefs(props); const showPageHeader = computed(() => { - return !!route.query['from']; + return !!route.query['fromPage']; }); const onBack = () => { - router.push({ path: `${route.query['from']}` }); + router.push({ path: `${route.query['fromPage']}` }); }; const activeTabName = ref('当前诊断'); diff --git a/src/components/device/device-card/ndm-keyboard/keyboard-card.vue b/src/components/device/device-card/ndm-keyboard/keyboard-card.vue index 2f17410..737efb4 100644 --- a/src/components/device/device-card/ndm-keyboard/keyboard-card.vue +++ b/src/components/device/device-card/ndm-keyboard/keyboard-card.vue @@ -21,10 +21,10 @@ const { debugModeEnabled } = storeToRefs(settingStore); const { ndmDevice, station } = toRefs(props); const showPageHeader = computed(() => { - return !!route.query['from']; + return !!route.query['fromPage']; }); const onBack = () => { - router.push({ path: `${route.query['from']}` }); + router.push({ path: `${route.query['fromPage']}` }); }; const activeTabName = ref('当前诊断'); diff --git a/src/components/device/device-card/ndm-nvr/nvr-card.vue b/src/components/device/device-card/ndm-nvr/nvr-card.vue index 2cc200e..54ed2b1 100644 --- a/src/components/device/device-card/ndm-nvr/nvr-card.vue +++ b/src/components/device/device-card/ndm-nvr/nvr-card.vue @@ -21,10 +21,10 @@ const { debugModeEnabled } = storeToRefs(settingStore); const { ndmDevice, station } = toRefs(props); const showPageHeader = computed(() => { - return !!route.query['from']; + return !!route.query['fromPage']; }); const onBack = () => { - router.push({ path: `${route.query['from']}` }); + router.push({ path: `${route.query['fromPage']}` }); }; const activeTabName = ref('当前诊断'); diff --git a/src/components/device/device-card/ndm-security-box/security-box-card.vue b/src/components/device/device-card/ndm-security-box/security-box-card.vue index ba81f4b..8ecbc9b 100644 --- a/src/components/device/device-card/ndm-security-box/security-box-card.vue +++ b/src/components/device/device-card/ndm-security-box/security-box-card.vue @@ -21,10 +21,10 @@ const { debugModeEnabled } = storeToRefs(settingStore); const { ndmDevice, station } = toRefs(props); const showPageHeader = computed(() => { - return !!route.query['from']; + return !!route.query['fromPage']; }); const onBack = () => { - router.push({ path: `${route.query['from']}` }); + router.push({ path: `${route.query['fromPage']}` }); }; const activeTabName = ref('当前诊断'); diff --git a/src/components/device/device-card/ndm-server/server-card.vue b/src/components/device/device-card/ndm-server/server-card.vue index 1afa360..96affcf 100644 --- a/src/components/device/device-card/ndm-server/server-card.vue +++ b/src/components/device/device-card/ndm-server/server-card.vue @@ -21,10 +21,10 @@ const { debugModeEnabled } = storeToRefs(settingStore); const { ndmDevice, station } = toRefs(props); const showPageHeader = computed(() => { - return !!route.query['from']; + return !!route.query['fromPage']; }); const onBack = () => { - router.push({ path: `${route.query['from']}` }); + router.push({ path: `${route.query['fromPage']}` }); }; const activeTabName = ref('当前诊断'); diff --git a/src/components/device/device-card/ndm-switch/switch-card.vue b/src/components/device/device-card/ndm-switch/switch-card.vue index 5d34a54..5448162 100644 --- a/src/components/device/device-card/ndm-switch/switch-card.vue +++ b/src/components/device/device-card/ndm-switch/switch-card.vue @@ -21,10 +21,10 @@ const { debugModeEnabled } = storeToRefs(settingStore); const { ndmDevice, station } = toRefs(props); const showPageHeader = computed(() => { - return !!route.query['from']; + return !!route.query['fromPage']; }); const onBack = () => { - router.push({ path: `${route.query['from']}` }); + router.push({ path: `${route.query['fromPage']}` }); }; const activeTabName = ref('当前诊断'); diff --git a/src/composables/device/use-device-selection.ts b/src/composables/device/use-device-selection.ts index 6751666..dd1319b 100644 --- a/src/composables/device/use-device-selection.ts +++ b/src/composables/device/use-device-selection.ts @@ -58,16 +58,16 @@ export const useDeviceSelection = () => { stationCode, deviceType, deviceDbId, - from: route.path, + fromPage: route.path, }, }); }; const syncToRoute = () => { const query = { ...route.query }; - // 当选中的设备发生变化时,删除from参数 + // 当选中的设备发生变化时,删除fromPage参数 if (selectedDevice.value?.id && route.query.deviceDbId !== selectedDevice.value.id) { - delete query['from']; + delete query['fromPage']; } if (selectedStationCode.value) { query['stationCode'] = selectedStationCode.value;