| | |
| | | </navigator> |
| | | </view> |
| | | <view class="cu-tabbar-height"></view> |
| | | <view style="height: 50rpx;"></view> |
| | | </scroll-view> |
| | | </view> |
| | | </template> |
| | |
| | | url: `/phyz/checkLocDetl/checkLocDetl` |
| | | }, |
| | | { |
| | | title: '移库(半成品)', |
| | | title: '库位盘点', |
| | | name: 'checkLocDetl', |
| | | color: 'blue', |
| | | // cuIcon: 'pullup', |
| | | url: `/phyz/checkLocDetl/checkLocDetl2` |
| | | }, |
| | | { |
| | | title: '移库', |
| | | name: 'locMove', |
| | | color: 'blue', |
| | | // cuIcon: 'pullup', |
| | |
| | | }, |
| | | |
| | | ], |
| | | 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.menu = uni.getStorageSync('menu'); |
| | | this.getAuth2(option.id) |
| | | this.backGroundRepeat() |
| | | }, |
| | | methods: { |
| | |
| | | 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) { |
| | |
| | | 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, |