From 05013f375e82f8860b86bf82ea03555c038d6fae Mon Sep 17 00:00:00 2001
From: lzhe <181968431@qq.com>
Date: 星期一, 01 四月 2024 00:04:44 +0800
Subject: [PATCH] 1

---
 src/views/console/system/menu.vue |   39 +++++++++++++++++++++++----------------
 1 files changed, 23 insertions(+), 16 deletions(-)

diff --git a/src/views/console/system/menu.vue b/src/views/console/system/menu.vue
index f561906..ed138c9 100644
--- a/src/views/console/system/menu.vue
+++ b/src/views/console/system/menu.vue
@@ -48,7 +48,7 @@
 				</div>
 			</div>
 			<div class="dict-table">
-				<el-table ref="multipleTableRef" :data="tableData" border style="width: 100%" class="multipleTableRef" @selection-change="handleSelectionChange">
+				<el-table ref="multipleTableRef" :data="tableData" border style="width: 100%" class="multipleTableRef" @selection-change="handleSelectionChange" row-key="id" lazy :load="tableLoad" :tree-props="{ children: 'children', hasChildren: 'hasChildren' }">
 					<el-table-column type="selection" width="55" />
 					<el-table-column prop="name" label="鑿滃崟鍚嶇О"></el-table-column>
 					<el-table-column prop="path" label="璺敱鍦板潃"></el-table-column>
@@ -76,20 +76,11 @@
 						</template>
 					</el-table-column>
 				</el-table>
-				<el-pagination
-					@size-change="handleSizeChange"
-					@current-change="handleCurrentChange"
-					:current-page="currentPage4"
-					:page-sizes="[100, 200, 300, 400]"
-					:page-size="100"
-					layout="total, sizes, prev, pager, next, jumper"
-					:total="400">
-				</el-pagination>
 			</div>
 		</div>
 	</div>
 	
-	<save-dialog v-if="dialog.save" ref="saveDialog" @success="handleSuccess" @closed="dialog.save=false"></save-dialog>
+	<save-dialog v-if="dialog.save" ref="saveDialog" :applicationList="applicationList" @success="handleSuccess" @closed="dialog.save=false"></save-dialog>
 </template>
 <script>
 	import saveDialog from './addMenu'
@@ -129,6 +120,18 @@
 			saveDialog
 		},
 		methods: {
+			handleSuccess() {
+
+			},
+			tableLoad(row,treeNode,resolve) {
+				this.searchData.parentId= row.id;
+				this.$HTTP.get("/api/blade-system/menu/lazy-list",this.searchData).then(res=> {
+					if(res.code == 200) {
+						resolve(res.data);
+					}
+				})
+
+			},
 			clearSearch() {
 				this.searchData= {
 					name: "",
@@ -145,11 +148,10 @@
 					}
 				})
 			},
-			searchBtn() {
-				this.searchData.parentId="";
+			searchBtn(parentId="0") {
+				this.searchData.parentId= parentId;
 				this.$HTTP.get("/api/blade-system/menu/lazy-list",this.searchData).then(res=> {
 					if(res.code == 200) {
-						console.log(res.data,111)
 						this.tableData = res.data;
 					}
 				})
@@ -172,8 +174,13 @@
 			},
 			table_edit(row){
 				this.dialog.save = true
-				this.$nextTick(() => {
-					this.$refs.saveDialog.open('edit').setData(row)
+				this.$HTTP.get("/api/blade-system/menu/detail?id="+row.id).then(res=> {
+					if(res.code == 200) {
+						this.dialog.save = true;
+						this.$nextTick(() => {
+							this.$refs.saveDialog.open('edit').setData(res.data);
+						})
+					}
 				})
 			},
 			//鏌ョ湅

--
Gitblit v1.9.3