From 5b73519a2c26fea97b4dfd7f56ee6c4e5ea27dde Mon Sep 17 00:00:00 2001
From: chenyao <1219716595@qq.com>
Date: Thu, 11 Sep 2025 15:55:37 +0800
Subject: [PATCH] Merge branch 'feature/v5.0/5.0.5' into feature/v6.0/6.0.1

---
 src/views/device/components/use-device-setting.js |   23 +++++++++--------------
 1 files changed, 9 insertions(+), 14 deletions(-)

diff --git a/src/views/device/components/use-device-setting.js b/src/views/device/components/use-device-setting.js
index c1d803f..a57cc92 100644
--- a/src/views/device/components/use-device-setting.js
+++ b/src/views/device/components/use-device-setting.js
@@ -50,22 +50,17 @@
   }
 
   // 设置设备属性
-  async function setDeviceProps(sn, body) {
+  async function setDeviceProps(sn, workspaceId, body) {
     try {
-      const { code, message: msg } = await putDeviceProps(sn, body);
-      console.log(code,messages)
-      if (code === 0) {
-        ElMessage({
-          message: '设备属性设置成功!',
-          type: 'success',
-        });
-      }
-      throw msg;
+       await putDeviceProps(sn, workspaceId, body).then(res => {
+         if (res.data.code === 0) {
+           ElMessage({
+             message: '设备属性设置成功!',
+             type: 'success',
+           });
+         }
+      });
     } catch (e) {
-      // ElMessage({
-      //   message: '设备属性设置失败',
-      //   type: 'error',
-      // });
       return false;
     }
   }

--
Gitblit v1.9.3