From c25842a0e5cb8d1c4b9ee80e38dbfc4192b95adb Mon Sep 17 00:00:00 2001
From: LiuHao <liuhaoai545@gmail>
Date: 星期一, 17 四月 2023 20:50:00 +0800
Subject: [PATCH] remove console.log

---
 src/views/system/user/index.vue |   19 +++++++++----------
 1 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue
index c911bd9..07aa5a9 100644
--- a/src/views/system/user/index.vue
+++ b/src/views/system/user/index.vue
@@ -56,13 +56,13 @@
           <template #header>
             <el-row :gutter="10">
               <el-col :span="1.5">
-                <el-button type="primary" plain @click="handleAdd()" v-has-permi="['sys:user:add']" icon="Plus">鏂板</el-button>
+                <el-button type="primary" plain @click="handleAdd()" v-has-permi="['system:user:add']" icon="Plus">鏂板</el-button>
               </el-col>
               <el-col :span="1.5">
-                <el-button type="success" plain @click="handleUpdate()" :disabled="single" v-has-permi="['sys:user:add']" icon="Edit">淇敼</el-button>
+                <el-button type="success" plain @click="handleUpdate()" :disabled="single" v-has-permi="['system:user:add']" icon="Edit">淇敼</el-button>
               </el-col>
               <el-col :span="1.5">
-                <el-button type="danger" plain @click="handleDelete()" :disabled="multiple" v-has-permi="['sys:user:delete']" icon="Delete">
+                <el-button type="danger" plain @click="handleDelete()" :disabled="multiple" v-has-permi="['system:user:delete']" icon="Delete">
                   鍒犻櫎
                 </el-button>
               </el-col>
@@ -303,7 +303,7 @@
 import { DeptVO } from "@/api/system/dept/types";
 import { RoleVO } from "@/api/system/role/types";
 import { PostVO } from "@/api/system/post/types";
-import { DateModelType, ElTree, ElUpload, UploadFile, UploadFiles, ElForm } from 'element-plus';
+import { DateModelType, ElTree, ElUpload, UploadFile, ElForm } from 'element-plus';
 import { to } from "await-to-js";
 const router = useRouter();
 const { proxy } = getCurrentInstance() as ComponentInternalInstance
@@ -457,14 +457,13 @@
 /** 鐢ㄦ埛鐘舵�佷慨鏀�  */
 const handleStatusChange = async (row: UserVO) => {
     let text = row.status === "0" ? "鍚敤" : "鍋滅敤"
-    const [err] = await to(proxy?.$modal.confirm('纭瑕�"' + text + '""' + row.userName + '"鐢ㄦ埛鍚�?') as any)
-    if(err) {
-        row.status = row.status === "0" ? "1" : "0";
-    } else {
+    try {
+        await proxy?.$modal.confirm('纭瑕�"' + text + '""' + row.userName + '"鐢ㄦ埛鍚�?');
         await changeUserStatus(row.userId, row.status);
         proxy?.$modal.msgSuccess(text + "鎴愬姛");
+    } catch (err) {
+        row.status = row.status === "0" ? "1" : "0";
     }
-
 }
 /** 璺宠浆瑙掕壊鍒嗛厤 */
 const handleAuthRole = (row: UserVO) => {
@@ -516,7 +515,7 @@
     upload.isUploading = true;
 }
 /** 鏂囦欢涓婁紶鎴愬姛澶勭悊 */
-const handleFileSuccess = (response: any, file: UploadFile, fileList: UploadFiles) => {
+const handleFileSuccess = (response: any, file: UploadFile) => {
     upload.open = false;
     upload.isUploading = false;
     uploadRef.value.handleRemove(file);

--
Gitblit v1.9.3