Files
hht-hl-three-uni/pages/home/home.vue

220 lines
6.7 KiB
Vue
Raw Normal View History

2023-08-29 15:11:11 +08:00
<template>
2024-01-16 18:20:39 +08:00
<view class="home_wraper">
<view class="zd_content">
<view class="header">首页</view>
<view class="userInfo-wrap">
<view class="userInfo">
<text v-if="userName !== ''" class="p1">{{userName}}</text>
<text class="p2">欢迎进入海亮三线LMS系统</text>
</view>
<view class="exit" @tap="Quit">
<view class="icon-exit"></view>
<view class="exit-text">退出</view>
2023-08-29 15:11:11 +08:00
</view>
</view>
2024-03-01 18:01:59 +08:00
<view class="zd-row zd_home_wrapper">
<view class="zd-col-12 fir_menus_wrap">
<view class="fir-menu_item" v-for="e in menuList" :key="e.id" :class="{'fir_menu_active': index === e.id}">
<view class="zd-row fir-menu_name" :style="{'background-image': 'url(../../static/image/menu/' + e.icon +'.png)'}" @tap="toMenu(e)">{{e.name}}</view>
2024-01-16 18:20:39 +08:00
</view>
2024-03-01 18:01:59 +08:00
</view>
<view class="zd-col-12 sec_menus_wrap">
<view class="sec_menu_item" v-for="e in activeArr" :key="e.id">
<view class="sec_menu_name">{{e.name}}</view>
<view class="thi_menus_wrap">
<view class="thi_menu_item" v-for="el in e.sonTreen" :key="el.id">
<view class="thi_menu_name" @click="toPage(el)">{{el.name}}</view>
</view>
2024-01-16 18:20:39 +08:00
</view>
2023-08-29 15:11:11 +08:00
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
2023-09-12 13:33:43 +08:00
userName: '',
2024-03-04 09:19:42 +08:00
index: '',
2024-03-01 18:01:59 +08:00
activeArr: [],
2023-09-08 13:15:03 +08:00
menuList: [
2024-03-04 09:19:42 +08:00
{id: '1', name: '仓储管理', icon: 'RF01', sonTreen: [{
id: '0101', name: '半成品库管理',sonTreen: [
{id: '010101', name: '半成品入库', path: '/pages/modules/SemifinishedInStore'},
{id: '010102', name: '半成品出库', path: '/pages/modules/SemifinishedOutStore'},
{id: '010103', name: '空箱出库', path: '/pages/modules/EmptyOutStore'},
{id: '010104', name: '出入库顺序表', path: '/pages/modules/SequenceTable'}
2024-03-01 18:01:59 +08:00
]
}]},
2024-03-04 09:19:42 +08:00
{id: '2', name: '振动清洗管理', icon: 'RF02', sonTreen: [{
id: '0201', name: '缓存线管理',sonTreen: [
{id: '020101', name: '缓存线叫料', path: '/pages/modules/SemifinishedInStore'},
{id: '020102', name: '缓存线盘点', path: '/pages/modules/SemifinishedInStore'}
2024-03-01 18:01:59 +08:00
]
}, {
2024-03-04 09:19:42 +08:00
id: '0202', name: '清洗管理',sonTreen: [
{id: '020201', name: '清洗上料', path: '/pages/modules/SemifinishedInStore'},
{id: '020202', name: '清洗下料', path: '/pages/modules/SemifinishedInStore'}
2024-03-01 18:01:59 +08:00
]
}]},
2024-03-04 09:19:42 +08:00
{id: '3', name: '激光下料清洗管理', icon: 'RF03', sonTreen: [{
id: '0301', name: '清洗管理',sonTreen: [
{id: '030101', name: '清洗上料', path: '/pages/modules/SemifinishedInStore'},
{id: '030102', name: '清洗下料', path: '/pages/modules/SemifinishedInStore'}
2024-03-01 18:01:59 +08:00
]
}]},
2024-03-04 09:19:42 +08:00
{id: '4', name: '发黑清洗管理', icon: 'RF04', sonTreen: [{
id: '0401', name: '清洗管理',sonTreen: [
{id: '040101', name: '清洗上料', path: '/pages/modules/SemifinishedInStore'},
{id: '040102', name: '清洗下料', path: '/pages/modules/SemifinishedInStore'}
2024-03-01 18:01:59 +08:00
]
}, {
2024-03-04 09:19:42 +08:00
id: '0402', name: '退货管理',sonTreen: [
{id: '040201', name: '退货缓存区', path: '/pages/modules/SemifinishedInStore'},
{id: '040202', name: '退货中物料', path: '/pages/modules/SemifinishedInStore'}
2024-03-01 18:01:59 +08:00
]
}]},
2024-03-04 09:19:42 +08:00
{id: '5', name: '环保清洗管理', icon: 'RF05', sonTreen: [{
id: '0501', name: '缓存区管理',sonTreen: [
{id: '050101', name: '缓存线叫料', path: '/pages/modules/SemifinishedInStore'},
{id: '050102', name: '缓存线盘点', path: '/pages/modules/SemifinishedInStore'}
2024-03-01 18:01:59 +08:00
]
}, {
2024-03-04 09:19:42 +08:00
id: '0502', name: '清洗管理',sonTreen: [
{id: '050201', name: '清洗叫料', path: '/pages/modules/SemifinishedInStore'},
{id: '050202', name: '清洗上料', path: '/pages/modules/SemifinishedInStore'},
{id: '050203', name: '清洗物料列表', path: '/pages/modules/SemifinishedInStore'}
2024-03-01 18:01:59 +08:00
]
}]}
2024-03-04 09:19:42 +08:00
]
2023-08-29 15:11:11 +08:00
};
},
created () {
2023-09-08 13:15:03 +08:00
this.$store.dispatch('setPublicObj', '')
2023-09-12 13:33:43 +08:00
if (this.$store.getters.userInfo) {
this.userName = JSON.parse(this.$store.getters.userInfo).username
}
2024-03-04 09:19:42 +08:00
this.index = this.menuList[0].id
2024-03-01 18:01:59 +08:00
this.activeArr = this.menuList[0].sonTreen
2023-08-29 15:11:11 +08:00
},
methods: {
2024-03-01 18:01:59 +08:00
toMenu (e) {
2024-03-04 09:19:42 +08:00
this.index = e.id
2024-03-01 18:01:59 +08:00
this.activeArr = [...e.sonTreen]
},
2024-01-16 18:20:39 +08:00
toPage (e) {
2023-08-29 15:11:11 +08:00
let url = e.path
uni.redirectTo({
url: url
})
},
Quit () {
2024-03-18 13:21:31 +08:00
this.$store.dispatch('delUserInfo', '')
2024-03-04 09:19:42 +08:00
uni.redirectTo({
url: '/pages/login/login'
})
2023-08-29 15:11:11 +08:00
}
}
}
</script>
<style lang="stylus">
@import '../../common/style/mixin.styl';
2024-01-16 18:20:39 +08:00
.home_wraper
_wh(100%, 100%)
2024-01-17 09:16:51 +08:00
overflow hidden
2023-08-29 15:11:11 +08:00
.zd_content
2024-01-16 18:20:39 +08:00
padding 0 24rpx
height 100%
padding-top calc(var(--status-bar-height) + 86rpx)
2024-03-01 18:01:59 +08:00
background linear-gradient(to bottom, #fae2ca 0%, #fff5ea 20%, #fdfdfd 100%)
2023-08-29 15:11:11 +08:00
.header
2024-01-16 18:20:39 +08:00
position fixed
left 0
top 0
padding-top var(--status-bar-height)
z-index 100
_wh(100%, calc(var(--status-bar-height) + 86rpx))
2024-03-01 18:01:59 +08:00
// background-color #f8e6db
2023-08-29 15:11:11 +08:00
_font(36rpx,86rpx,#333,,center)
.userInfo-wrap
_fj()
2024-01-17 09:16:51 +08:00
_wh(100%,190rpx)
2023-08-29 15:11:11 +08:00
padding 0 30rpx
background-color $red
_bis('../../static/image/info_bg.png',auto,100%,right,bottom)
border-radius 12rpx
2024-01-16 18:20:39 +08:00
margin-bottom 24rpx
2023-08-29 15:11:11 +08:00
.userInfo
_fj(,flex-start,column)
.p1
_font(34rpx,1,#fff)
padding-bottom 18rpx
.p2
2024-01-17 09:16:51 +08:00
_font(32rpx,1,#fff)
2023-08-29 15:11:11 +08:00
.exit
_fj()
2024-01-17 09:16:51 +08:00
height 50rpx
padding 0 20rpx
2023-08-29 15:11:11 +08:00
border 1px solid #FF967C
border-radius 20rpx
.icon-exit
_wh(22rpx, 22rpx)
_bis('../../static/image/exit.png',22rpx)
.exit-text
2024-01-17 09:16:51 +08:00
_font(32rpx,50rpx,#fff,,right)
2023-08-29 15:11:11 +08:00
padding-left 10rpx
2024-01-16 18:20:39 +08:00
.zd_home_wrapper
2024-01-17 09:16:51 +08:00
_wh(100%, calc(100% - 238rpx))
2024-01-16 18:20:39 +08:00
background-color #fff
border-radius: 12rpx;
2024-03-01 18:01:59 +08:00
margin-bottom: 24rpx
.fir_menus_wrap
height 100%
background-color #dedede
.sec_menus_wrap
height 100%
background-color #fff
padding 0 40rpx
2024-01-16 18:20:39 +08:00
overflow-y auto
2024-03-01 18:01:59 +08:00
.fir-menu_item
_wh(100%, 90rpx)
padding 0 20rpx
.fir-menu_name
height 90rpx
_font(28rpx, 30rpx, #666,,)
_bis('../../static/image/menu/RF01.png', 50rpx,,left,)
padding-left 70rpx
.sec_menu_item
2024-01-16 18:20:39 +08:00
width 100%
2024-03-01 18:01:59 +08:00
padding 20rpx 0 0 0
.sec_menu_name
width max-content
height 70rpx
_font(26rpx, 70rpx, #333,700,)
background linear-gradient(to right, #fbfef1 0%, #fff2a9 100%)
transform: skew(-10deg)
border-top-right-radius: 10px;
border-bottom-right-radius: 10px;
padding 0 40rpx 0 10rpx
margin-bottom 20rpx
.sec_menu_item
&:nth-child(1) .sec_menu_name
background linear-gradient(to right, #fbfef1 0%, #f5dc51 100%)
&:nth-child(2) .sec_menu_name
background linear-gradient(to right, #fefcff 0%, #80c5e5 100%)
&:nth-child(3) .sec_menu_name
background linear-gradient(to right, #fefbf6 0%, #e6c096 100%)
.thi_menu_name
height 60rpx
_font(28rpx, 60rpx, #333,,)
.fir_menu_active
background-color #fff
.fir-menu_name
color #000
font-weight: 700
2023-08-29 15:11:11 +08:00
</style>