Files
hht-tongbo/pages/home/home.vue

172 lines
5.0 KiB
Vue
Raw Normal View History

2022-10-10 10:19:18 +08:00
<template>
2022-10-15 15:29:58 +08:00
<view class="zd_content">
2022-10-10 10:19:18 +08:00
<view class="header">首页</view>
<view class="userInfo-wrap">
<view class="userInfo">
<text class="p1">{{$store.getters.userName}}</text>
2022-10-12 17:12:45 +08:00
<text class="p2">欢迎进入铜箔手持系统</text>
2022-10-10 10:19:18 +08:00
</view>
<view class="exit" @tap="Quit">
<view class="icon-exit"></view>
<view class="exit-text">退出</view>
</view>
</view>
2022-10-15 15:29:58 +08:00
<view class="zd_wrapper">
2022-10-11 17:03:44 +08:00
<view class="menu-wrap">
2022-11-28 11:20:38 +08:00
<view class="menu-item" v-for="(e, i) in menuList" :key="i" @tap="toPage1(e)">
2022-11-29 18:36:32 +08:00
<image class="menu-img" :src="require('../../static/image/menu/' + e.path + '.png')" alt="">
2022-11-28 11:20:38 +08:00
<view class="menu-name">{{e.name}}</view>
</view>
</view>
</view>
<view v-if="show === true" class="sec_menu_wraper">
<view class="sec_menu_w">
2022-11-28 14:59:47 +08:00
<view class="menu-item" v-for="(e, i) in secM" :key="i" @click="toPage2(e)">
2022-11-28 11:20:38 +08:00
<view class="sec_menu-col_inner">
<view class="menu-name menu-name_inner">{{e.name}}</view>
</view>
</view>
</view>
<view class="cancel">
<view class="iconfont cancel_icon" @tap="show = false"></view>
2022-10-11 17:03:44 +08:00
</view>
2022-10-10 10:19:18 +08:00
</view>
</view>
</template>
<script>
2022-11-28 11:20:38 +08:00
import {authority} from '@/utils/getData2.js'
2022-10-10 10:19:18 +08:00
export default {
data() {
return {
2023-02-13 13:45:07 +08:00
menu: [{url: '/pages/ProductManage/SboProdProgress', name: '生箔生产进度'}, {url: '/pages/ProductManage/SboProcess', name: '生箔工序'}, {url: '/pages/ProductManage/BakeProcess', name: '烘烤工序'}, {url: '/pages/ProductManage/ManmadeBake', name: '人工烘烤'}, {url: '/pages/ProductManage/PointManage', name: '点位管理'}, {url: '/pages/ProductManage/EmptyPipeInStore', name: '空管入库'}, {url: '/pages/ProductManage/EmptyPipeOutStore', name: '空管出库'}, {url: '/pages/ProductManage/ZjCasing', name: '空轴套管'}, {url: '/pages/ProductManage/ZjDelivery', name: '空轴配送'}, {url: '/pages/ProductManage/ZjInStore', name: '空轴进站'}, {url: '/pages/ProductManage/ZjOutStore', name: '子卷出站'}, {url: '/pages/WarehouseManage/SemifinishedInStore', name: '半成品入库'}, {url: '/pages/WarehouseManage/CheckList', name: '盘点管理'}, {url: '/pages/WarehouseManage/SemifinishedOutStore', name: '半成品出库'}, {url: '/pages/WarehouseManage/ReturngoodsInStore', name: '退货入库'}, {url: '/pages/WarehouseManage/ScrapInStore', name: '报废入库'}, {url: '/pages/WarehouseManage/InStoreConfirm', name: '生产入库'}, {url: '/pages/WarehouseManage/ProdDeliveryConfirm', name: '生产区发货确认'}, {url: '/pages/WarehouseManage/XuniDelivery', name: '虚拟区发货'}, {url: '/pages/WarehouseManage/EmptyInStore', name: '空载具入库'}, {url: '/pages/WarehouseManage/EmptyOutStore', name: '空载具出库'}, {url: '/pages/WarehouseManage/CustomerLabelPrint', name: '客户标签打印'}],
2022-12-08 16:49:33 +08:00
menuList: [],
show: false,
2022-11-28 11:20:38 +08:00
secM: []
2022-10-10 10:19:18 +08:00
};
},
2022-12-08 16:49:33 +08:00
created () {
this._authority()
2022-10-10 19:58:07 +08:00
},
2022-10-10 10:19:18 +08:00
methods: {
2022-11-28 11:20:38 +08:00
async _authority () {
let res = await authority()
this.menuList = [...res.sonTree]
},
toPage1 (e) {
2022-12-08 16:49:33 +08:00
if (e.sonTree.length > 0) {
this.show = true
this.secM = e.sonTree
2022-11-28 11:20:38 +08:00
}
2022-10-10 19:58:07 +08:00
},
2022-11-28 11:20:38 +08:00
toPage2 (e) {
let url = e.path
2022-10-10 16:26:19 +08:00
uni.redirectTo({
url: url
2022-11-28 11:20:38 +08:00
})
2022-10-12 17:12:45 +08:00
},
Quit () {
this.$store.dispatch('delUserInfo')
2022-10-10 10:19:18 +08:00
uni.redirectTo({
url: '/pages/login/login'
2022-10-12 17:12:45 +08:00
})
2022-10-10 10:19:18 +08:00
}
}
}
</script>
<style lang="stylus">
@import '../../common/style/mixin.styl';
2022-10-15 15:29:58 +08:00
.zd_content
2022-10-11 17:03:44 +08:00
padding-top 0
2022-10-10 10:19:18 +08:00
.header
height 86rpx
_font(36rpx,86rpx,#333,,center)
.userInfo-wrap
_fj()
_wh(100%,160rpx)
padding 0 30rpx
2022-10-12 17:12:45 +08:00
background-color $red
2022-10-10 10:19:18 +08:00
_bis('../../static/image/info_bg.png',auto,100%,right,bottom)
2022-10-11 17:03:44 +08:00
border-radius 12rpx
margin-bottom 20rpx
2022-10-10 10:19:18 +08:00
.userInfo
_fj(,flex-start,column)
.p1
2022-10-12 17:12:45 +08:00
_font(34rpx,1,#fff)
2022-10-10 10:19:18 +08:00
padding-bottom 18rpx
2022-10-12 17:12:45 +08:00
.p2
2022-10-10 10:19:18 +08:00
_font(26rpx,1,#fff)
.exit
_fj()
2022-10-12 17:12:45 +08:00
height 47rpx
padding 0 15rpx
border 1px solid #FF967C
2022-10-10 10:19:18 +08:00
border-radius 20rpx
.icon-exit
2022-10-12 17:12:45 +08:00
_wh(22rpx, 22rpx)
2022-10-10 10:19:18 +08:00
_bis('../../static/image/exit.png',22rpx)
2022-10-12 17:12:45 +08:00
.exit-text
2022-10-10 10:19:18 +08:00
_font(24rpx,47rpx,#fff,,right)
padding-left 10rpx
.menu-wrap
_fj(flex-start,flex-start,,wrap)
align-content: flex-start
.menu-item
2022-11-28 11:20:38 +08:00
_fj()
flex-direction column
_wh(30%, auto)
2022-10-10 10:19:18 +08:00
margin-bottom 40rpx
_font(26rpx, 60rpx,#e74f1a,,center)
&:nth-child(3n+2)
margin-left 5%
margin-right 5%
2022-11-29 18:36:32 +08:00
::v-deep .menu-img
_wh(100%, auto)
2022-11-28 11:20:38 +08:00
img
2022-11-29 18:36:32 +08:00
position relative
opacity 1
2022-11-28 11:20:38 +08:00
_wh(55%, auto)
margin 0 auto 0.2rpx
.menu-name
_font(28rpx, 38rpx, #444,,center)
.sec_menu_wraper
2022-12-08 16:49:33 +08:00
position fixed
top 0
left 0
_wh(100%, 100%)
background-color rgba(0, 0, 0, .9)
z-index 2017
2022-11-28 11:20:38 +08:00
flex-direction column
.sec_menu_w
_fj()
2022-12-08 16:49:33 +08:00
_wh(100%, calc(100% - 100rpx))
padding 0 24rpx
flex-wrap wrap
align-content center
&::after
content ''
display block
2022-11-28 11:20:38 +08:00
_wh(30%,0)
.sec_menu-col
2022-12-08 16:49:33 +08:00
background-color transparent
border none
2022-11-28 11:20:38 +08:00
height auto
.sec_menu-col_inner
_fj(center)
2022-12-08 16:49:33 +08:00
_wh(160rpx, 160rpx)
border-radius 50%
background-color $yellow
2022-11-28 11:20:38 +08:00
margin 0 auto
.menu-name_inner
color #fff
padding 0 20rpx
.cancel
2022-12-08 16:49:33 +08:00
_wh(100%, 100rpx)
padding 0 24rpx
overflow hidden
background-color rgba(255, 255, 255, .3)
2022-11-28 11:20:38 +08:00
box-shadow 0 1rpx 4rpx 0 rgba(160,160,160,0.9)
2022-10-10 10:19:18 +08:00
</style>