From b28a825dd4dee120f70398308c04cf97fa0688d8 Mon Sep 17 00:00:00 2001
From: lzhe <181968431@qq.com>
Date: 星期一, 01 四月 2024 23:35:53 +0800
Subject: [PATCH] 1

---
 src/views/console/system/menu.vue |   38 ++++++++++++++++++++++++++++++++------
 1 files changed, 32 insertions(+), 6 deletions(-)

diff --git a/src/views/console/system/menu.vue b/src/views/console/system/menu.vue
index 4fd6ad5..ea69a17 100644
--- a/src/views/console/system/menu.vue
+++ b/src/views/console/system/menu.vue
@@ -72,7 +72,7 @@
 							<el-button text type="primary" size="small" @click="table_show(scope.row, scope.$index)">鏌ョ湅</el-button>
 							<el-button type="text" size="small" @click="table_edit(scope.row, scope.$index)">缂栬緫</el-button>
 							<el-button text type="primary" size="small" @click="table_del(scope.row, scope.$index)">鍒犻櫎</el-button>
-							<el-button text type="primary" size="small" @click="addPerson(scope.row, scope.$index)">鏂板瀛愰」</el-button>
+							<el-button text type="primary" size="small" @click="table_edit(scope.row, scope.$index,'fixed')">鏂板瀛愰」</el-button>
 						</template>
 					</el-table-column>
 				</el-table>
@@ -88,6 +88,7 @@
 		name: "allocation",
 		data(){
 			return {
+				selection: [],
 				applicationList: [],
 				searchData: {
 					name: "",
@@ -123,7 +124,7 @@
 		methods: {
 			handleSuccess(formAddMenu) {
 				this.searchData.parentId = formAddMenu.parentId;
-				this.searchBtn();
+				this.searchClearBtn();
 			},
 			tableLoad(row,treeNode,resolve) {
 				this.searchData.parentId= row.id;
@@ -177,7 +178,7 @@
 					this.$HTTP.post("/api/blade-system/menu/remove?ids="+row.id).then(res=> {
 						if(res.code == 200) {
 							that.$message.success("鎿嶄綔鎴愬姛");
-							that.searchBtn();
+							that.searchclick();
 						}
 					})
 				}).catch(() => {
@@ -191,12 +192,15 @@
 					this.$refs.saveDialog.open()
 				})
 			},
-			table_edit(row){
+			table_edit(row,index,fixed){
 				this.dialog.save = true
 				this.$HTTP.get("/api/blade-system/menu/detail?id="+row.id).then(res=> {
 					if(res.code == 200) {
 						this.dialog.save = true;
 						this.$nextTick(() => {
+							if(fixed) {  //鍒ゆ柇鏂板瀛愰」
+								res.data.fixed = "fixed";
+							}
 							this.$refs.saveDialog.open('edit').setData(res.data);
 						})
 					}
@@ -209,8 +213,30 @@
 					this.$refs.saveDialog.open('show').setData(row)
 				})
 			},
-			handleSelectionChange() {},
-			delPerson() {},
+			handleSelectionChange(selection) {
+				this.selection = selection;
+			},
+			delPerson() {
+				if(this.selection.length == 0) {
+					this.$message({
+			          message: '璇烽�夋嫨鑷冲皯涓�鏉℃暟鎹�',
+			          type: 'warning'
+			        });
+			        return;
+				}
+				var selStr = "";
+				this.selection.map(item=> {
+					selStr += item.id + ","
+				})
+				selStr = selStr.replace(/,$/, '');
+				var that = this;
+				this.$HTTP.post("/api/blade-system/menu/remove?ids="+selStr).then(res=> {
+					if(res.code == 200) {
+						that.$message.success("鎿嶄綔鎴愬姛");
+						that.searchclick();
+					}
+				})
+			},
 			changeDepartment() {
 				this.departmentVisible = true;
 			},

--
Gitblit v1.9.3