From 970c580b82f4aa46ecb57f121eb18e6e1d18ac31 Mon Sep 17 00:00:00 2001 From: guoapeng Date: Tue, 29 Jul 2025 19:34:57 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=9D=BF=E5=A4=B9=E5=8C=BA=E6=B8=A9?= =?UTF-8?q?=E5=BA=A6=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/Index/Index.vue | 39 +++++++++++++++++----- src/pages/Index/Settings/Device.vue | 15 +++++++++ .../Index/components/Consumables/SpttingPlates.vue | 8 ++--- 3 files changed, 50 insertions(+), 12 deletions(-) diff --git a/src/pages/Index/Index.vue b/src/pages/Index/Index.vue index d35b874..10f8faf 100644 --- a/src/pages/Index/Index.vue +++ b/src/pages/Index/Index.vue @@ -156,6 +156,12 @@ --> +
+ 温度: 高 + 温度: 低 + 温度: 好 +
+
{ + return systemStore.systemInfo?.plateBoxTemperature || 0 +}) +// 获取系统设置 +const fetchSettings = async () => { + try { + const res = await getSystemSettings() + if (res.success) { + systemStore.updateSystemInfo(res.data) + } + } catch (error) { + eMessage.error('获取系统设置失败') + } +} + // 获取当前的路由 const currentRoute = computed(() => router.currentRoute.value) console.log(currentRoute.value) @@ -918,6 +942,7 @@ onMounted(() => { getProjectList() getBloodTypeList() + fetchSettings() }) // onBeforeUnmount(() => { @@ -1286,17 +1311,13 @@ watchEffect(() => { width: 100%; height: 50px; display: flex; - justify-content: end; + justify-content: space-between; align-items: center; position: relative; bottom: 0; margin-top: auto; background: #f5f7fa; - > *:first-child { - margin-right: auto; - } - .user-logo, .time-logo { width: 36px; @@ -1520,5 +1541,7 @@ watchEffect(() => { width: 11rem; padding-top: 5px; } - +.el-tag { + font-size: 15px; +} diff --git a/src/pages/Index/Settings/Device.vue b/src/pages/Index/Settings/Device.vue index 1c83a65..288f2aa 100644 --- a/src/pages/Index/Settings/Device.vue +++ b/src/pages/Index/Settings/Device.vue @@ -316,6 +316,9 @@ const updateSetting = async (key: string, value: any) => { return } res = await setAllTemperature(value) + systemStore.updateSystemInfo({ + allTemperature: value + }) break case 'incubateBoxTemperature': if (!isIntegerInRange(value)) { @@ -323,6 +326,9 @@ const updateSetting = async (key: string, value: any) => { return } res = await setIncubateBoxTemperature(value) + systemStore.updateSystemInfo({ + incubateBoxTemperature: value + }) break case 'plateBoxTemperature': if (!isIntegerInRange(value)) { @@ -330,9 +336,15 @@ const updateSetting = async (key: string, value: any) => { return } res = await setPlateBoxTemperature(value) + systemStore.updateSystemInfo({ + plateBoxTemperature: value + }) break case 'DHCP': res = await setDHCP(value) + systemStore.updateSystemInfo({ + DHCP: value + }) break case 'localIP': const addr = value.trim() @@ -342,6 +354,9 @@ const updateSetting = async (key: string, value: any) => { } hideKeyboard() res = await setLocalIP(addr) + systemStore.updateSystemInfo({ + localIP: addr + }) break } diff --git a/src/pages/Index/components/Consumables/SpttingPlates.vue b/src/pages/Index/components/Consumables/SpttingPlates.vue index 37e6d80..176c7b9 100644 --- a/src/pages/Index/components/Consumables/SpttingPlates.vue +++ b/src/pages/Index/components/Consumables/SpttingPlates.vue @@ -6,10 +6,10 @@
反应板夹区
-
-
-
温度: {{ temperature }}°
-
+ + + +