From 69a6a1318765ae537c243d7c543b8c7ed8cfdcd0 Mon Sep 17 00:00:00 2001 From: whycq <913841844@qq.com> Date: 星期一, 17 二月 2025 14:39:26 +0800 Subject: [PATCH] # --- pages/home/orderManage.vue | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 files changed, 54 insertions(+), 4 deletions(-) diff --git a/pages/home/orderManage.vue b/pages/home/orderManage.vue index 01069e6..a7a74ce 100644 --- a/pages/home/orderManage.vue +++ b/pages/home/orderManage.vue @@ -2,16 +2,18 @@ <view> <scroll-view scroll-y class="page"> <view class="nav-list"> - <navigator hover-class='none' :url="'/pages' + item.url" class="nav-li" navigateTo + <!-- :url="'/pages' + item.url + '?param=' + item.param" navigateTo--> + <view hover-class='none' class="nav-li" @click="toOrder(item)" :class="'bg-'+item.color" :style="[{animation: 'show ' + ((index+1)*0.2+1) + 's 1'}]" v-for="(item,index) in elements" :key="index"> <view class="nav-title">{{item.title}}</view> <view class="nav-name">{{item.name}}</view> <text :class="'cuIcon-' + item.cuIcon"></text> - </navigator> + </view> </view> <view class="cu-tabbar-height"></view> </scroll-view> + <view style="height: 50rpx;"></view> </view> </template> @@ -73,6 +75,13 @@ url: `/phyz/bcp/bcpOrder` }, { + title: '鍗婃垚鍝佸叆搴撳崟_鍚稿', + name: 'bcpOrder', + color: 'blue', + // cuIcon: 'pullup', + url: `/phyz/bcp/bcpOrder_xs` + }, + { title: '鍗婃垚鍝佽皟鎷ㄥ崟', name: 'bcpDbOrder', color: 'blue', @@ -85,6 +94,14 @@ color: 'blue', // cuIcon: 'pullup', url: `/phyz/orderOut/bcpOrderOutSelect` + }, + { + title: '鍗婃垚鍝佸嚭搴撳崟_浜屽巶', + name: 'bcpOutOrder', + color: 'blue', + // cuIcon: 'pullup', + url: `/phyz/orderOut/bcpOrderOutSelect_2`, + param: {orderType: [1,2,3]} }, { title: '鍗婃垚鍝佸姞宸ュ崟', @@ -116,6 +133,7 @@ }, ], + menu: [], colorList: ['cyan','blue','purple','mauve','pink','brown','red','orange','yellow','olive','olive','grey' ] }; }, @@ -129,8 +147,9 @@ onLoad(option) { this.baseUrl = uni.getStorageSync('baseUrl'); this.token = uni.getStorageSync('token'); - this.project = uni.getStorageSync('project') - this.getAuth(option.id) + this.project = uni.getStorageSync('project'); + this.menu = uni.getStorageSync('menu'); + this.getAuth2(option.id) this.backGroundRepeat() }, methods: { @@ -145,6 +164,37 @@ i++ } }, + toOrder(item) { + console.log(item); + uni.navigateTo({ + url: `/pages${item.url}`, + success(res) { + res.eventChannel.emit('param', { + param: item.param + }) + } + }) + }, + 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, + param: secMenu[i].param, + url: `${secMenu[i].code}` + }) + } + }, getAuth(id) { let that = this uni.request({ -- Gitblit v1.9.1