taiji_caozhaorui 2 周之前
父节点
当前提交
a60a0085df
共有 1 个文件被更改,包括 18 次插入16 次删除
  1. 18 16
      src/views/manage/center/tenant/detail.vue

+ 18 - 16
src/views/manage/center/tenant/detail.vue

@@ -336,26 +336,28 @@ const onSwitch = (row) => {
       title: '停用确认',
       content: `请确认是否停用管理员账号${row.username}?`,
       onSubmit: () => {
-        // pluginUpdateStatus({ ids: [row.id], status: '1' })
-        //   .then(() => {
-        //     ElMessage.success('停用成功!')
-        //   })
-        //   .catch(() => {})
-        //   .finally(() => {
-        //     row.status = '1'
-        //   })
+        row.status = 1
+        tenantsEdit({ id: state.form.id, userTenants: state.form.userTenants })
+          .then(() => {
+            ElMessage.success('停用成功!')
+          })
+          .catch(() => {})
+          .finally(() => {
+            row.status = '1'
+          })
       },
       onCancel: () => {},
     })
   } else {
-    // pluginUpdateStatus({ ids: [row.id], status: 0 })
-    //   .then(() => {
-    //     ElMessage.success('启用成功!')
-    //   })
-    //   .catch(() => {})
-    //   .finally(() => {
-    // row.status = '0'
-    //   })
+    row.status = 0
+    tenantsEdit({ id: state.form.id, userTenants: state.form.userTenants })
+      .then(() => {
+        ElMessage.success('启用成功!')
+      })
+      .catch(() => {})
+      .finally(() => {
+        row.status = '0'
+      })
   }
 }
 </script>