From 5d44f9e23124f05b0906efd754ba7f8fac1f7cdd Mon Sep 17 00:00:00 2001
From: Ai3_刘小龙 <wisty0317@163.com>
Date: 星期三, 20 十二月 2023 14:26:49 +0800
Subject: [PATCH] update src/views/system/dept/index.vue. append-to-body

---
 src/views/system/user/index.vue |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue
index 79ae8f8..a952954 100644
--- a/src/views/system/user/index.vue
+++ b/src/views/system/user/index.vue
@@ -306,9 +306,8 @@
 import { globalHeaders } from '@/utils/request';
 
 const router = useRouter();
-const { proxy } = getCurrentInstance() as ComponentInternalInstance;
+const { proxy } = getCurrentInstance();
 const { sys_normal_disable, sys_user_sex } = toRefs<any>(proxy?.useDict('sys_normal_disable', 'sys_user_sex'));
-
 const userList = ref<UserVO[]>();
 const loading = ref(true);
 const showSearch = ref(true);
@@ -373,7 +372,8 @@
   postIds: [],
   roleIds: []
 };
-const data = reactive<PageData<UserForm, UserQuery>>({
+
+const initData: PageData<UserForm, UserQuery> = {
   form: { ...initFormData },
   queryParams: {
     pageNum: 1,
@@ -381,7 +381,8 @@
     userName: '',
     phonenumber: '',
     status: '',
-    deptId: ''
+    deptId: '',
+    roleId: ''
   },
   rules: {
     userName: [
@@ -418,7 +419,8 @@
       }
     ]
   }
-});
+};
+const data = reactive<PageData<UserForm, UserQuery>>(initData);
 
 const { queryParams, form, rules } = toRefs<PageData<UserForm, UserQuery>>(data);
 
@@ -512,7 +514,7 @@
       inputErrorMessage: '鐢ㄦ埛瀵嗙爜闀垮害蹇呴』浠嬩簬 5 鍜� 20 涔嬮棿'
     })
   );
-  if (!err) {
+  if (!err && res) {
     await api.resetUserPwd(row.userId, res.value);
     proxy?.$modal.msgSuccess('淇敼鎴愬姛锛屾柊瀵嗙爜鏄細' + res.value);
   }

--
Gitblit v1.9.3