导航页

This commit is contained in:
2024-03-01 18:01:59 +08:00
parent 54db87ba01
commit 6fe63bdfbe
5 changed files with 376 additions and 44 deletions

View File

@@ -41,3 +41,103 @@ input[type="button"], input[type="submit"], input[type="search"], input[type="re
text-overflow: ellipsis;
white-space: nowrap;
}
.flexcol {
flex-direction: column;
}
.flexstart {
align-items: flex-start !important;
}
.jcflexstart {
justify-content: flex-start !important;
}
.zd-row {
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
}
.zd-col-24 {
width: 100%;
}
.zd-col-23 {
width: 95.83333%
}
.zd-col-22 {
width: 91.66667%
}
.zd-col-21 {
width: 87.5%
}
.zd-col-20 {
width: 83.33333%
}
.zd-col-19 {
width: 79.16667%
}
.zd-col-18 {
width: 75%
}
.zd-col-17 {
width: 70.83333%
}
.zd-col-16 {
width: 66.66667%
}
.zd-col-15 {
width: 62.5%
}
.zd-col-14 {
width: 58.33333%
}
.zd-col-13 {
width: 54.16667%
}
.zd-col-12 {
width: 50%;
}
.zd-col-11 {
width: 45.83333%
}
.zd-col-10 {
width: 41.66667%
}
.zd-col-9 {
width: 37.5%
}
.zd-col-8 {
width: 33.33333%
}
.zd-col-7 {
width: 29.16667%
}
.zd-col-6 {
width: 25%
}
.zd-col-5 {
width: 20.83333%
}
.zd-col-4 {
width: 16.66667%
}
.zd-col-3 {
width: 12.5%
}
.zd-col-2 {
width: 8.33333%
}
.zd-col-1 {
width: 4.16667%
}
.mgb10 {
margin-bottom: 10rpx;
}
.pdl20 {
padding-left: 20rpx;
}
.pdr20 {
padding-right: 20rpx;
}
.pdr10 {
padding-right: 10rpx;
}

View File

@@ -12,16 +12,19 @@
<view class="exit-text">退出</view>
</view>
</view>
<view class="zd_home_wrapper">
<view class="menus_wrap" v-for="(e, i) in menuList" :key="e.id">
<view class="fir_menu_wrap">
<view class="fir_menu_tip"></view>
<view class="fir_menu_title">{{e.name}}</view>
<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>
</view>
<view class="sec_menu_wrap">
<view class="sec_menu-item" v-for="(el, i) in e.sonTree" :key="el.menu_id" @tap="toPage(el)">
<image class="menu-img" :src="require('../../static/image/menu/' + el.icon + '.png')" alt="">
<view class="menu-name">{{el.name}}</view>
</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>
</view>
</view>
</view>
@@ -35,7 +38,58 @@
data() {
return {
userName: '',
index: 1,
activeArr: [],
menuList: [
{id: 1, name: '仓储管理', icon: 'RF01', sonTreen: [{
id: 'sec1', name: '半成品库管理',sonTreen: [
{id: 'thi1', name: '半成品入库', path: '/pages/modules/SemifinishedInStore'},
{id: 'thi2', name: '半成品出库', path: '/pages/modules/SemifinishedOutStore'},
{id: 'thi3', name: '空箱出库', path: '/pages/modules/EmptyOutStore'}
]
}]},
{id: 2, name: '振动清洗管理', icon: 'RF02', sonTreen: [{
id: 'sec1', name: '缓存线管理',sonTreen: [
{id: 'thi1', name: '缓存线叫料', path: '/pages/modules/SemifinishedInStore'},
{id: 'thi1', name: '缓存线盘点', path: '/pages/modules/SemifinishedInStore'}
]
}, {
id: 'sec1', name: '清洗管理',sonTreen: [
{id: 'thi1', name: '清洗上料', path: '/pages/modules/SemifinishedInStore'},
{id: 'thi2', name: '清洗下料', path: '/pages/modules/SemifinishedInStore'}
]
}]},
{id: 3, name: '激光下料清洗管理', icon: 'RF03', sonTreen: [{
id: 'sec1', name: '清洗管理',sonTreen: [
{id: 'thi1', name: '清洗上料', path: '/pages/modules/SemifinishedInStore'},
{id: 'thi2', name: '清洗下料', path: '/pages/modules/SemifinishedInStore'}
]
}]},
{id: 4, name: '发黑清洗管理', icon: 'RF04', sonTreen: [{
id: 'sec1', name: '清洗管理',sonTreen: [
{id: 'thi1', name: '清洗上料', path: '/pages/modules/SemifinishedInStore'},
{id: 'thi2', name: '清洗下料', path: '/pages/modules/SemifinishedInStore'}
]
}, {
id: 'sec2', name: '退货管理',sonTreen: [
{id: 'thi1', name: '退货缓存区', path: '/pages/modules/SemifinishedInStore'},
{id: 'thi2', name: '退货中物料', path: '/pages/modules/SemifinishedInStore'}
]
}]},
{id: 5, name: '环保清洗管理', icon: 'RF01', sonTreen: [{
id: 'sec1', name: '缓存区管理',sonTreen: [
{id: 'thi1', name: '缓存线叫料', path: '/pages/modules/SemifinishedInStore'},
{id: 'thi2', name: '缓存线盘点', path: '/pages/modules/SemifinishedInStore'}
]
}, {
id: 'sec2', name: '清洗管理',sonTreen: [
{id: 'thi1', name: '清洗叫料', path: '/pages/modules/SemifinishedInStore'},
{id: 'thi2', name: '清洗上料', path: '/pages/modules/SemifinishedInStore'},
{id: 'thi3', name: '清洗物料列表', path: '/pages/modules/SemifinishedInStore'}
]
}]}
],
menuList1: [
{id: '1', name: '仓储管理', sonTree: [
{menu_id: '1', icon: 'RF01', name: '半成品入库', path: '/pages/modules/SemifinishedInStore'},
{menu_id: '2', icon: 'RF02', name: '半成品出库', path: '/pages/modules/SemifinishedOutStore'},
@@ -52,6 +106,7 @@
if (this.$store.getters.userInfo) {
this.userName = JSON.parse(this.$store.getters.userInfo).username
}
this.activeArr = this.menuList[0].sonTreen
},
methods: {
async _authority () {
@@ -59,6 +114,9 @@
this.menuList = [...res.sonTree]
},
toMenu (e) {
this.activeArr = [...e.sonTreen]
},
toPage (e) {
let url = e.path
uni.redirectTo({
@@ -66,10 +124,11 @@
})
},
Quit () {
this.$store.dispatch('delUserInfo')
uni.redirectTo({
url: '/pages/login/login'
})
console.log(this.activeArr)
// this.$store.dispatch('delUserInfo')
// uni.redirectTo({
// url: '/pages/login/login'
// })
}
}
}
@@ -84,7 +143,7 @@
padding 0 24rpx
height 100%
padding-top calc(var(--status-bar-height) + 86rpx)
background linear-gradient(to bottom, #f8e6db 0%, #f6f6f6 30%, #f6f6f6 100%)
background linear-gradient(to bottom, #fae2ca 0%, #fff5ea 20%, #fdfdfd 100%)
.header
position fixed
left 0
@@ -92,7 +151,7 @@
padding-top var(--status-bar-height)
z-index 100
_wh(100%, calc(var(--status-bar-height) + 86rpx))
background-color #f8e6db
// background-color #f8e6db
_font(36rpx,86rpx,#333,,center)
.userInfo-wrap
_fj()
@@ -125,35 +184,49 @@
_wh(100%, calc(100% - 238rpx))
background-color #fff
border-radius: 12rpx;
padding: 14rpx;
margin-bottom: 24rpx;
margin-bottom: 24rpx
.fir_menus_wrap
height 100%
background-color #dedede
.sec_menus_wrap
height 100%
background-color #fff
padding 0 40rpx
overflow-y auto
.menus_wrap
.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
width 100%
margin-bottom 24rpx
.fir_menu_wrap
_wh(100%, 98rpx)
.fir_menu_title
_font(36rpx, 98rpx, #333, bold,)
.sec_menu_wrap
_fj(flex-start,flex-start,,wrap)
align-content: flex-start
.sec_menu-item
_fj()
flex-direction column
_wh(30%, auto)
margin-bottom 40rpx
_font(26rpx, 60rpx,#e74f1a,,center)
&:nth-child(3n+2)
margin-left 5%
margin-right 5%
::v-deep .menu-img
_wh(100%, auto)
img
position relative
opacity 1
_wh(55%, auto)
margin 0 auto 0.2rpx
.menu-name
_font(28rpx, 38rpx, #444,,center)
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
</style>

159
pages/home/home_back.vue Normal file
View File

@@ -0,0 +1,159 @@
<template>
<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>
</view>
</view>
<view class="zd_home_wrapper">
<view class="menus_wrap" v-for="(e, i) in menuList" :key="e.id">
<view class="fir_menu_wrap">
<view class="fir_menu_tip"></view>
<view class="fir_menu_title">{{e.name}}</view>
</view>
<view class="sec_menu_wrap">
<view class="sec_menu-item" v-for="(el, i) in e.sonTree" :key="el.menu_id" @tap="toPage(el)">
<image class="menu-img" :src="require('../../static/image/menu/' + el.icon + '.png')" alt="">
<view class="menu-name">{{el.name}}</view>
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
userName: '',
menuList: [
{id: '1', name: '仓储管理', sonTree: [
{menu_id: '1', icon: 'RF01', name: '半成品入库', path: '/pages/modules/SemifinishedInStore'},
{menu_id: '2', icon: 'RF02', name: '半成品出库', path: '/pages/modules/SemifinishedOutStore'},
{menu_id: '3', icon: 'RF03', name: '空箱出库', path: '/pages/modules/EmptyOutStore'},
{menu_id: '4', icon: 'RF04', name: '出入库顺序表', path: '/pages/modules/SequenceTable'}
]}
],
show: false,
secM: []
};
},
created () {
this.$store.dispatch('setPublicObj', '')
if (this.$store.getters.userInfo) {
this.userName = JSON.parse(this.$store.getters.userInfo).username
}
},
methods: {
async _authority () {
let res = await authority()
this.menuList = [...res.sonTree]
},
toPage (e) {
let url = e.path
uni.redirectTo({
url: url
})
},
Quit () {
this.$store.dispatch('delUserInfo')
uni.redirectTo({
url: '/pages/login/login'
})
}
}
}
</script>
<style lang="stylus">
@import '../../common/style/mixin.styl';
.home_wraper
_wh(100%, 100%)
overflow hidden
.zd_content
padding 0 24rpx
height 100%
padding-top calc(var(--status-bar-height) + 86rpx)
background linear-gradient(to bottom, #f8e6db 0%, #f6f6f6 30%, #f6f6f6 100%)
.header
position fixed
left 0
top 0
padding-top var(--status-bar-height)
z-index 100
_wh(100%, calc(var(--status-bar-height) + 86rpx))
background-color #f8e6db
_font(36rpx,86rpx,#333,,center)
.userInfo-wrap
_fj()
_wh(100%,190rpx)
padding 0 30rpx
background-color $red
_bis('../../static/image/info_bg.png',auto,100%,right,bottom)
border-radius 12rpx
margin-bottom 24rpx
.userInfo
_fj(,flex-start,column)
.p1
_font(34rpx,1,#fff)
padding-bottom 18rpx
.p2
_font(32rpx,1,#fff)
.exit
_fj()
height 50rpx
padding 0 20rpx
border 1px solid #FF967C
border-radius 20rpx
.icon-exit
_wh(22rpx, 22rpx)
_bis('../../static/image/exit.png',22rpx)
.exit-text
_font(32rpx,50rpx,#fff,,right)
padding-left 10rpx
.zd_home_wrapper
_wh(100%, calc(100% - 238rpx))
background-color #fff
border-radius: 12rpx;
padding: 14rpx;
margin-bottom: 24rpx;
overflow-y auto
.menus_wrap
width 100%
margin-bottom 24rpx
.fir_menu_wrap
_wh(100%, 98rpx)
.fir_menu_title
_font(36rpx, 98rpx, #333, bold,)
.sec_menu_wrap
_fj(flex-start,flex-start,,wrap)
align-content: flex-start
.sec_menu-item
_fj()
flex-direction column
_wh(30%, auto)
margin-bottom 40rpx
_font(26rpx, 60rpx,#e74f1a,,center)
&:nth-child(3n+2)
margin-left 5%
margin-right 5%
::v-deep .menu-img
_wh(100%, auto)
img
position relative
opacity 1
_wh(55%, auto)
margin 0 auto 0.2rpx
.menu-name
_font(28rpx, 38rpx, #444,,center)
</style>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 166 KiB

After

Width:  |  Height:  |  Size: 155 KiB