|
@ -34,7 +34,28 @@ |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
<view class="box"> |
|
|
<view class="box"> |
|
|
<view class=""> |
|
|
<view class="" v-for="(item,index) in meaus" :key='index'> |
|
|
|
|
|
<view class="title">{{item.name}}</view> |
|
|
|
|
|
<u-row gutter="16" style="padding:0px 20rpx ;"> |
|
|
|
|
|
<u-col span="3" v-for="(cur,key) in item.children" :key='key'> |
|
|
|
|
|
<view class="icon-item" @click="open(cur.path)"> |
|
|
|
|
|
<!-- 扫码图标 --> |
|
|
|
|
|
<image src="../static/images/icon8.png" mode="" v-if="cur.componentName == 'scanCodeMeau'"></image> |
|
|
|
|
|
<!-- 采购入库图标 --> |
|
|
|
|
|
<image src="../static/images/icon1.png" mode="" v-else-if="cur.componentName == 'inLocation'"></image> |
|
|
|
|
|
<!-- 备件归还图标 --> |
|
|
|
|
|
<image src="../static/images/icon3.png" mode="" v-else-if="cur.componentName == 'sparePartsReturn'"></image> |
|
|
|
|
|
<!-- 采购出库图标 --> |
|
|
|
|
|
<image src="../static/images/icon2.png" mode="" v-else-if="cur.componentName == 'outLocation'"></image> |
|
|
|
|
|
<view>{{cur.name}}</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
</u-col> |
|
|
|
|
|
</u-row> |
|
|
|
|
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- <view class=""> |
|
|
<view class="title">扫码</view> |
|
|
<view class="title">扫码</view> |
|
|
<u-row gutter="16" style="padding:0px 20rpx ;"> |
|
|
<u-row gutter="16" style="padding:0px 20rpx ;"> |
|
|
<u-col span="3"> |
|
|
<u-col span="3"> |
|
@ -44,8 +65,8 @@ |
|
|
</view> |
|
|
</view> |
|
|
</u-col> |
|
|
</u-col> |
|
|
</u-row> |
|
|
</u-row> |
|
|
</view> |
|
|
</view> --> |
|
|
<view class="" v-if="menus1&&menus1.length>0"> |
|
|
<!-- <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 menus1" :key="index"> |
|
|
<block v-for="(item,index) in menus1" :key="index"> |
|
@ -77,7 +98,7 @@ |
|
|
</u-col> |
|
|
</u-col> |
|
|
</block> |
|
|
</block> |
|
|
</u-row> |
|
|
</u-row> |
|
|
</view> |
|
|
</view> --> |
|
|
</view> |
|
|
</view> |
|
|
<view class="btn" @click="handleLogout" v-if="getAccessToken()">退出登录</view> |
|
|
<view class="btn" @click="handleLogout" v-if="getAccessToken()">退出登录</view> |
|
|
</view> |
|
|
</view> |
|
@ -102,14 +123,14 @@ |
|
|
// 获取自定义的store |
|
|
// 获取自定义的store |
|
|
const store = useCountStore() |
|
|
const store = useCountStore() |
|
|
const bgOpacity = ref(0) |
|
|
const bgOpacity = ref(0) |
|
|
const menus1 = ref([]) |
|
|
const meaus = ref([]) |
|
|
const menus2 = ref([]) |
|
|
// const menus2 = ref([]) |
|
|
function open(url) { |
|
|
function open(url) { |
|
|
if (!getAccessToken()) { |
|
|
if (!getAccessToken()) { |
|
|
proxy.$tab.navigateTo('/pages/login') |
|
|
proxy.$tab.navigateTo('/pages/login') |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
proxy.$tab.navigateTo(url) |
|
|
proxy.$tab.navigateTo("/" + url) |
|
|
} |
|
|
} |
|
|
function handleLogout() { |
|
|
function handleLogout() { |
|
|
proxy.$modal.confirm('确定注销并退出系统吗?').then(() => { |
|
|
proxy.$modal.confirm('确定注销并退出系统吗?').then(() => { |
|
@ -123,8 +144,10 @@ |
|
|
} |
|
|
} |
|
|
onLoad(async () => { |
|
|
onLoad(async () => { |
|
|
await proxy.$onLaunched; |
|
|
await proxy.$onLaunched; |
|
|
menus1.value = store.menus1 |
|
|
// menus1.value = store.menus1 |
|
|
menus2.value = store.menus2 |
|
|
// menus2.value = store.menus2 |
|
|
|
|
|
meaus.value = store.meaus |
|
|
|
|
|
console.log(meaus.value ) |
|
|
}) |
|
|
}) |
|
|
onPageScroll((e) => { |
|
|
onPageScroll((e) => { |
|
|
if (e.scrollTop > 0) { |
|
|
if (e.scrollTop > 0) { |
|
|