diff --git a/src/components/common/Countdown.vue b/src/components/common/Countdown.vue index ff21d71..401d1a3 100644 --- a/src/components/common/Countdown.vue +++ b/src/components/common/Countdown.vue @@ -72,6 +72,9 @@ watch( seconds.value = '00' return } + else { + visible.value = true + } days.value = Math.floor(newVal / (1000 * 60 * 60 * 24)) diff --git a/src/layouts/default.vue b/src/layouts/default.vue index 3015213..c3e4acf 100644 --- a/src/layouts/default.vue +++ b/src/layouts/default.vue @@ -20,6 +20,10 @@ const { currentTime } = useServerTime() const systemStore = useSystemStore() const router = useRouter() +watch(() => currentTime.value, () => { + systemStore.currentTime = currentTime.value +}) + onMounted(async () => { if (!systemStore.systemStatus.selfTest && systemStore.systemStatus.currentUser?.username !== 'test') { isCheck.value = true diff --git a/src/stores/systemStore.ts b/src/stores/systemStore.ts index f415e3b..f575f49 100644 --- a/src/stores/systemStore.ts +++ b/src/stores/systemStore.ts @@ -66,6 +66,8 @@ export const useSystemStore = defineStore('system', { fanOpen: false, targetTemperature: 0, temperature: 0, + startHeatTime: 1749126403564, + targetTime: 1800, }, { moduleCode: 'heat_module_02', @@ -228,6 +230,7 @@ export const useSystemStore = defineStore('system', { streamVisible: false, systemList: [], systemLogList: [], + currentTime: '0000-00-00 00:00:00', }), actions: { insertLog(log: System.SystemLog) { diff --git a/src/types/system.d.ts b/src/types/system.d.ts index ca604c1..d609b42 100644 --- a/src/types/system.d.ts +++ b/src/types/system.d.ts @@ -9,6 +9,7 @@ declare namespace System { systemUser: SystemUser loginForm: LoginForm systemLogList: SystemLog[] + currentTime: string } interface SystemLog { cmdName: string