zhang_li 9 months ago
parent
commit
e9d4d77f99
  1. 16
      src/pages/index.vue

16
src/pages/index.vue

@ -32,10 +32,10 @@
</view> </view>
</view> </view>
<view class="box"> <view class="box">
<view class=""> <view class="" v-if="menus1&&menus1.length>0">
<view class="title">采购入库</view> <view class="title">采购入库</view>
<u-row gutter="16" style="padding:0px 20rpx ;"> <u-row gutter="16" style="padding:0px 20rpx ;">
<block v-for="(item,index) in menus" :key="index" > <block v-for="(item,index) in menus1" :key="index" >
<u-col span="3" v-if="item.path == 'purchaseIn'"> <u-col span="3" v-if="item.path == 'purchaseIn'">
<view class="icon-item" @click="open('/pages/inLocation/index')"> <view class="icon-item" @click="open('/pages/inLocation/index')">
<image src="../static/images/icon1.png" mode=""></image> <image src="../static/images/icon1.png" mode=""></image>
@ -53,10 +53,10 @@
</view> </view>
<view class=""> <view class="" v-if="menus2&&menus2.length>0">
<view class="title">出库</view> <view class="title">出库</view>
<u-row gutter="16"> <u-row gutter="16">
<block v-for="(item,index) in menus" :key="index" > <block v-for="(item,index) in menus2" :key="index" >
<u-col span="3" v-if="item.path == 'itemOut'"> <u-col span="3" v-if="item.path == 'itemOut'">
<view class="icon-item" @click="open('/pages/outLocation/index')"> <view class="icon-item" @click="open('/pages/outLocation/index')">
<image src="../static/images/icon2.png" mode=""></image> <image src="../static/images/icon2.png" mode=""></image>
@ -88,7 +88,9 @@
return { return {
bgOpacity: 0, bgOpacity: 0,
token: '', token: '',
menus:[] menus:[],
menus1:[],
menus2:[],
} }
}, },
@ -120,7 +122,9 @@
if (getAccessToken()) { if (getAccessToken()) {
this.$store.dispatch('GetPermissionInfo').then(res => { this.$store.dispatch('GetPermissionInfo').then(res => {
this.menus = res.menus.filter(item=>item.path == '/pda')[0].children this.menus = res.menus.filter(item=>item.path == '/pda')[0].children
console.log(this.menus) this.menus1 = this.menus.filter(item=>item.path !== 'itemOut')
this.menus2 = this.menus.filter(item=>item.path === 'itemOut')
console.log(this.menus2)
}) })
} }

Loading…
Cancel
Save