4个页面

This commit is contained in:
2024-03-29 16:08:33 +08:00
parent f15cc674f3
commit 77a24ae774
42 changed files with 1280 additions and 2359 deletions

View File

@@ -1,35 +1,27 @@
<template>
<view class="zd_content">
<view class="header">首页</view>
<view class="userInfo-wrap">
<view class="userInfo">
<text class="p1">{{userName}}</text>
<text class="p2">欢迎进入华弘手持系统</text>
</view>
<view class="exit" @tap="Quit">
<view class="icon-exit"></view>
<view class="exit-text">退出</view>
</view>
</view>
<view class="zd_wrapper">
<view class="menu-wrap">
<view class="menu-item" v-for="(e, i) in menuList" :key="i" @tap="toPage1(e)">
<image class="menu-img" :src="require('../../static/image/menu/' + e.icon + '.png')" alt="">
<view class="menu-name">{{e.name}}</view>
<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">欢迎进入华弘手持系统</text>
</view>
<view class="exit" @tap="Quit">
<view class="icon-exit"></view>
<view class="exit-text">退出</view>
</view>
</view>
</view>
<view v-if="show === true" class="sec_menu_wraper">
<view class="sec_menu_w">
<view class="menu-item" v-for="(e, i) in secM" :key="i" @click="toPage2(e)">
<view class="sec_menu-col_inner">
<view class="menu-name menu-name_inner">{{e.name}}</view>
<view class="zd_home_wrapper">
<view class="menus_wrap">
<view class="fir_menu_wrap">
<view class="fir_menu-item" v-for="e in menuList" :key="e.id" @tap="toPage(e)">
<image class="menu-img" :src="require('../../static/image/menu/' + e.icon + '.png')" alt="">
<view class="menu-name">{{e.title}}</view>
</view>
</view>
</view>
</view>
<view class="cancel">
<view class="iconfont cancel_icon" @tap="show = false"></view>
</view>
</view>
</view>
</template>
@@ -39,36 +31,11 @@
data() {
return {
userName: '',
// menuList: [
// {menu_id: '1', icon: 'RF01', name: '设备点检', path: '/pages/modules/equip-inspection', sonTree: []},
// {menu_id: '2', icon: 'RF02', name: '设备操作', path: '/pages/modules/equip-operate', sonTree: []},
// {menu_id: '3', icon: 'RF03', name: '人工分拣', path: '', sonTree: [
// {menu_id: '1', name: '分拣排产', path: '/pages/modules/sort-schedue'},
// {menu_id: '2', name: '剩料入库', path: '/pages/modules/surplus-mater-instore'},
// {menu_id: '3', name: '托盘绑定', path: '/pages/modules/pallet-bind'},
// {menu_id: '4', name: '包装入库', path: '/pages/modules/package-instore'},
// ]},
// {menu_id: '4', icon: 'RF05', name: '人工组盘', path: '/pages/modules/man-group', sonTree: []},
// {menu_id: '5', icon: 'RF06', name: '混碾搬运', path: '/pages/modules/hunnian-carry', sonTree: []},
// {menu_id: '6', icon: 'RF07', name: '强制静置', path: '/pages/modules/forced-rest', sonTree: []}
// ],
menuList: [
{menu_id: '1', icon: 'RF06', name: '混碾搬运', path: '/pages/modules/hunnian-carry', sonTree: []},
{menu_id: '2', icon: 'RF07', name: '强制静置', path: '/pages/modules/forced-rest', sonTree: []},
{menu_id: '3', icon: 'RF01', name: '设备点检', path: '/pages/modules/equip-inspection', sonTree: []},
{menu_id: '4', icon: 'RF05', name: '人工组盘', path: '/pages/modules/man-group', sonTree: []},
{menu_id: '5', icon: 'RF09', name: '人工分拣', path: '', sonTree: [
{menu_id: '1', name: '分拣排产', path: '/pages/modules/sort-schedue'},
{menu_id: '2', name: '剩料入库', path: '/pages/modules/surplus-mater-instore'},
{menu_id: '3', name: '托盘绑定', path: '/pages/modules/pallet-bind'},
{menu_id: '4', name: '包装入库', path: '/pages/modules/package-instore'},
{menu_id: '5', name: '呼叫满料', path: '/pages/modules/call-full-mater'},
{menu_id: '6', name: '呼叫木盘', path: '/pages/modules/call-mupan'},
{menu_id: '7', name: '空盘入库', path: '/pages/modules/empty-instore'}
]},
{menu_id: '6', icon: 'RF10', name: '压机搬运', path: '/pages/modules/press-carry', sonTree: []},
{menu_id: '7', icon: 'RF08', name: '货架盘点', path: '/pages/modules/shelf-check', sonTree: []},
{menu_id: '8', icon: 'RF02', name: '混碾操作', path: '/pages/modules/hunnian-operate', sonTree: []}
{id: 1, title: '混碾搬运', icon: 'RF01', path: '/pages/manage/hn-carry'},
{id: 2, title: '压机搬运', icon: 'RF02', path: '/pages/manage/press-carry'},
{id: 3, title: '物料报废', icon: 'RF03', path: '/pages/manage/mater-scrap'},
{id: 4, title: '人工分拣', icon: 'RF04', path: '/pages/manage/man-sort'}
],
show: false,
secM: []
@@ -80,19 +47,13 @@
}
},
methods: {
toPage1 (e) {
if (e.sonTree.length > 0) {
this.show = true
this.secM = e.sonTree
} else {
let url = e.path
uni.redirectTo({
url: url
})
}
async _authority () {
let res = await authority()
this.menuList = [...res.sonTree]
},
toPage2 (e) {
let url = e.path
toPage (e) {
let url = e.path + '?title=' + e.title
uni.redirectTo({
url: url
})
@@ -109,19 +70,32 @@
<style lang="stylus">
@import '../../common/style/mixin.styl';
.home_wraper
_wh(100%, 100%)
overflow hidden
.zd_content
padding-top 0
padding 0 24rpx
height 100%
top 0
padding-top calc(var(--status-bar-height) + 86rpx)
// background linear-gradient(to bottom, #fae2ca 0%, #fff5ea 20%, #fdfdfd 100%)
background linear-gradient(to bottom, #f5f6fb 0%, #fff 100%)
.header
height 86rpx
position fixed
left 0
top 0
padding-top var(--status-bar-height)
z-index 100
_wh(100%, calc(var(--status-bar-height) + 86rpx))
_font(36rpx,86rpx,#333,,center)
.userInfo-wrap
_fj()
_wh(100%,160rpx)
_wh(100%,190rpx)
padding 0 30rpx
background-color $red
_bis('../../static/image/info_bg.png',auto,100%,right,bottom)
border-radius 12rpx
margin-bottom 20rpx
margin-bottom 24rpx
.userInfo
_fj(,flex-start,column)
.p1
@@ -131,20 +105,31 @@
_font(26rpx,1,#fff)
.exit
_fj()
height 47rpx
padding 0 15rpx
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(24rpx,47rpx,#fff,,right)
_font(32rpx,50rpx,#fff,,right)
padding-left 10rpx
.menu-wrap
.zd_home_wrapper
_wh(100%, calc(100% - 238rpx))
margin-bottom 24rpx
background-color #fff
border-radius: 12rpx;
padding: 14rpx;
margin-bottom 24rpx
box-shadow: 0 4rpx 10rpx 4rpx rgba(0,0,0,.1)
overflow-y scroll
.menus_wrap
width 100%
.fir_menu_wrap
_fj(flex-start,flex-start,,wrap)
align-content: flex-start
.menu-item
.fir_menu-item
_fj()
flex-direction column
_wh(30%, auto)
@@ -162,41 +147,4 @@
margin 0 auto 0.2rpx
.menu-name
_font(28rpx, 38rpx, #444,,center)
.sec_menu_wraper
position fixed
top 0
left 0
_wh(100%, 100%)
background-color rgba(0, 0, 0, .9)
z-index 2017
flex-direction column
.sec_menu_w
_fj()
_wh(100%, calc(100% - 100rpx))
padding 0 24rpx
flex-wrap wrap
align-content center
&::after
content ''
display block
_wh(30%,0)
.sec_menu-col
background-color transparent
border none
height auto
.sec_menu-col_inner
_fj(center)
_wh(160rpx, 160rpx)
border-radius 50%
background-color $yellow
margin 0 auto
.menu-name_inner
color #fff
padding 0 20rpx
.cancel
_wh(100%, 100rpx)
padding 0 24rpx
overflow hidden
background-color rgba(255, 255, 255, .3)
box-shadow 0 1rpx 4rpx 0 rgba(160,160,160,0.9)
</style>