From d71fde29b661900f67bfe5f8edc81626d910082f Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期三, 27 十二月 2023 09:11:31 +0800
Subject: [PATCH] Mr.Shi

---
 admin/src/views/business/deviceRole.vue |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/admin/src/views/business/deviceRole.vue b/admin/src/views/business/deviceRole.vue
index 221feb0..13129b7 100644
--- a/admin/src/views/business/deviceRole.vue
+++ b/admin/src/views/business/deviceRole.vue
@@ -28,7 +28,7 @@
                 <el-table-column prop="isDefault" label="鏄惁榛樿" min-width="100px">
                     <template slot-scope="{row}">
                         <el-switch
-                            @change="changeIsDefault"
+                            @change="changeIsDefault($event, row.id)"
                             v-model="row.isDefault"
                             active-color="#13ce66"
                             inactive-color="#ff4949"
@@ -91,8 +91,8 @@
     this.search()
   },
   methods: {
-    changeIsDefault (r) {
-      updateStatusById({ isDefault: r, type: 2 })
+    changeIsDefault (r, id) {
+      updateStatusById({ isDefault: r, type: 2, id })
         .finally(() => {
           this.search()
         })

--
Gitblit v1.9.3