From 3b208cab33978ad88171008b273262de5e0a50bf Mon Sep 17 00:00:00 2001
From: haoxuan <haoxuan>
Date: 星期六, 18 十一月 2023 14:35:27 +0800
Subject: [PATCH] 修改

---
 src/stores/devices.ts |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/src/stores/devices.ts b/src/stores/devices.ts
index a23d468..e0f81ef 100644
--- a/src/stores/devices.ts
+++ b/src/stores/devices.ts
@@ -7,10 +7,15 @@
 
 export const useDevicesStore = defineStore('device', () => {
   const deviceInfo = computed(() => {
-    if (deviceInfo?.value) {
-      deviceRes.value.data.currentDeviceID = 'wwwwwwww222222'
-    }
     return deviceRes?.value?.data as Devices
+  })
+
+  // 褰撳墠璁惧鍦ㄧ己灏戝伐鑹哄弬鏁扮殑鏃跺�欐槸鍚﹀厑璁镐笅鍙戠敓浜�
+  const currentDeviceAllowNoParams = computed(() => {
+    const currentDeviceInfo = deviceInfo.value.deviceList?.find((ele) => {
+      return ele.deviceID === deviceInfo.value.currentDeviceID
+    })
+    return !currentDeviceInfo?.needSetProcessParams
   })
 
   /**
@@ -31,5 +36,5 @@
     startDevicePolling()
   }
 
-  return { deviceInfo, startPollingDevice }
+  return { deviceInfo, startPollingDevice, currentDeviceAllowNoParams }
 })

--
Gitblit v1.8.0