From e9ae77e42ca35e30de229663a72ca899aaf9046e Mon Sep 17 00:00:00 2001
From: zhang <zc857179121@qq.com>
Date: 星期五, 30 五月 2025 14:28:54 +0800
Subject: [PATCH] 123

---
 pages/home/wrkMastManage.vue |   69 ++++++++++++++++++++++++----------
 1 files changed, 49 insertions(+), 20 deletions(-)

diff --git a/pages/home/wrkMastManage.vue b/pages/home/wrkMastManage.vue
index b5b3a56..8607849 100644
--- a/pages/home/wrkMastManage.vue
+++ b/pages/home/wrkMastManage.vue
@@ -11,6 +11,7 @@
 				</navigator>
 			</view>
 			<view class="cu-tabbar-height"></view>
+			<view style="height: 50rpx;"></view>
 		</scroll-view>
 	</view>
 </template>
@@ -25,13 +26,20 @@
 				elements: [],
 				project: 'tzsk',
 				elements2: [
-					// {
-					// 	title: '宸ヤ綔妗f煡璇㈢淮鎶�',
-					// 	name: 'wrkMast',
-					// 	color: 'blue',
-					// 	// cuIcon: 'pullup',
-					// 	url: `/phyz/wrkMast/wrkMast`
-					// },
+					{
+						title: '宸ヤ綔妗f煡璇㈢淮鎶�',
+						name: 'wrkMast',
+						color: 'blue',
+						// cuIcon: 'pullup',
+						url: `/phyz/wrkMast/wrkMast`
+					},
+					{
+						title: '璋冩嫧浠诲姟绠$悊',
+						name: 'wrkMast-DB',
+						color: 'blue',
+						// cuIcon: 'pullup',
+						url: `/phyz/wrkMast/DBList`
+					},
 					// {
 					// 	title: '宸ヤ綔鍘嗗彶妗g淮鎶�',
 					// 	name: 'wrkMastLog',
@@ -54,14 +62,23 @@
 					// 	url: `/phyz/wrkMast/waitPakinLog`
 					// },
 				],
+				menu: [],
 				colorList: ['cyan','blue','purple','mauve','pink','brown','red','orange','yellow','olive','olive','grey' ]
 			};
 		},
-		onShow() {
+		// onShow() {
+		// 	this.baseUrl = uni.getStorageSync('baseUrl');
+		// 	this.token = uni.getStorageSync('token');
+		// 	this.project = uni.getStorageSync('project')
+		// 	// this.getAuth()
+		// 	this.backGroundRepeat()
+		// },
+		onLoad(option) {
 			this.baseUrl = uni.getStorageSync('baseUrl');
 			this.token = uni.getStorageSync('token');
-			this.project = uni.getStorageSync('project')
-			this.getAuth()
+			this.project = uni.getStorageSync('project');
+			this.menu = uni.getStorageSync('menu');
+			this.getAuth2(option.id)
 			this.backGroundRepeat()
 		},
 		methods: {
@@ -76,11 +93,30 @@
 					i++
 				}
 			},
-			getAuth() {
+			getAuth2(id) {
+				let secMenu = []
+				for (let k of this.menu) {
+					if (id == k.id) {
+						secMenu = k.children
+					}
+				}
+				for (let i in secMenu) {
+					this.getIcon(secMenu[i].title)
+					this.elements.unshift({
+						title: secMenu[i].name,
+						name: secMenu[i].title,
+						color: this.colorList[i],
+						cuIcon: this.icon,
+						id: secMenu[i].id,
+						url: `${secMenu[i].code}`
+					})
+				}
+			},
+			getAuth(id) {
 				let that = this
 				uni.request({
 					url: that.baseUrl + '/menu/pda/auth',
-					data: {},
+					data: {level:2 ,id: id},
 					header: { 'token': uni.getStorageSync('token') },
 					method: 'POST',
 					success(res) {
@@ -106,16 +142,9 @@
 									name: res.data[i].title,
 									color: that.colorList[i],
 									cuIcon: that.icon,
-									url: `/${that.project}${res.data[i].action}`
+									url: `${res.data[i].code}`
 								})
 							}
-							that.elements.push({
-								title: '閫�鍑虹櫥褰�',
-								name: 'logOut',
-								color: 'grey',
-								cuIcon: 'exit',
-								url: '/login/logOut'
-							})
 						} else if (res.code === 403) {
 							uni.showToast({
 								title: res.msg,

--
Gitblit v1.9.1