From e9060cf8f241536a896d69d0044769bd3b0e8d49 Mon Sep 17 00:00:00 2001
From: yangyin <1850366751@qq.com>
Date: 星期五, 25 十月 2024 09:25:49 +0800
Subject: [PATCH] Merge branch 'test' of http://47.103.154.90:83/r/WI/Web.Admin.V1.0 into test

---
 src/views/project/yw/systemManage/userMgr/UserMgr.vue |   44 ++++++++------------------------------------
 1 files changed, 8 insertions(+), 36 deletions(-)

diff --git a/src/views/project/yw/systemManage/userMgr/UserMgr.vue b/src/views/project/yw/systemManage/userMgr/UserMgr.vue
index 650edc9..a81a862 100644
--- a/src/views/project/yw/systemManage/userMgr/UserMgr.vue
+++ b/src/views/project/yw/systemManage/userMgr/UserMgr.vue
@@ -7,8 +7,7 @@
 				</el-form-item>
 
 				<el-form-item>
-					<el-button icon="ele-Refresh" @click="resetQuery">閲嶇疆 </el-button>
-					<el-button icon="ele-Plus" @click="openOptDlg()"> 娣诲姞 </el-button>
+					<el-button icon="ele-Plus" @click="openOptDlg()" type="primary"> 娣诲姞 </el-button>
 				</el-form-item>
 			</el-form>
 		</template>
@@ -53,7 +52,10 @@
 									></i>
 								</el-tooltip>
 								<el-tooltip effect="dark" content="淇敼瑙掕壊" placement="top">
-									<i class="ywifont ywicon-jiaose !text-[15px] text-blue-400 cursor-pointer font-bold" @click="openOptRoleDlg(scope.row)"></i>
+									<i
+										class="ywifont ywicon-jiaose !text-[15px] text-blue-400 cursor-pointer font-bold"
+										@click="openOptRoleDlg(scope.row)"
+									></i>
 								</el-tooltip>
 								<el-tooltip effect="dark" content="鍒犻櫎" placement="top">
 									<i class="ywifont ywicon-shanchu !text-[17px] text-red-400 cursor-pointer" @click="deleteCurrentRow(scope.row)"></i>
@@ -167,7 +169,7 @@
 };
 
 const insertOpt = (newData) => {
-	tableData.value.unshift({ ...newData });
+	tableData.value.push({ ...newData });
 };
 //#endregion
 
@@ -180,6 +182,8 @@
 		const res = await userApi.deleteUserInfoByPost({
 			user_id: row.user_id,
 		});
+		const foundIndex = tableData.value.findIndex((item) => item === row);
+		foundIndex > -1 && tableData.value.splice(foundIndex, 1);
 		ElMessage.success('鍒犻櫎鐢ㄦ埛鎴愬姛');
 	});
 };
@@ -223,38 +227,6 @@
 
 //#endregion
 
-//#region ====================== 鏀瑰彉鍙戝竷鐘舵�� ======================
-// const publishStatusChange = async (published: SupervisorPublished, id, index) => {
-// 	const res = await updatePublishStatus(
-// 		{
-// 			id: id,
-// 			publish: published,
-// 		},
-// 		{
-// 			loading: false,
-// 		}
-// 	);
-// 	const origin = published === SupervisorPublished.Y ? SupervisorPublished.N : SupervisorPublished.Y;
-// 	const final = res.publish ?? origin;
-// 	if (final === origin) {
-// 		ElMessage.warning('鎿嶄綔澶辫触' + (res.fail_msg ? `锛�${res.fail_msg}` : ''));
-// 		return;
-// 	}
-
-// 	tableData.value[index].published = final;
-
-// 	published === SupervisorPublished.Y ? ElMessage.success('鍙戝竷鎴愬姛') : ElMessage.info('宸插彇娑堝彂甯�');
-// };
-//#endregion
-
-//#region ====================== 鏇存柊鍙戝竷鐘舵�� ======================
-// useUpdateData({
-// 	event: 'supervisor.publish',
-// 	updateFun({ id, published }) {
-// 		updatePublishedById(id, published);
-// 	},
-// });
-//#endregion
 
 const roleList = ref([]);
 const roleMap = computed(() => getItemMap(roleList.value, 'id'));

--
Gitblit v1.9.3