导航页样式,入库页样式,分页

This commit is contained in:
2024-02-26 18:11:25 +08:00
parent 9df8b4b10f
commit 4530466278
18 changed files with 392 additions and 280 deletions

View File

@@ -1,85 +1,59 @@
<template>
<view class="home_content">
<view class="zd-row header">
<view class="zd-col-8 home_title"></view>
<view class="zd-col-8 home_title">首页</view>
<view class="zd-col-8 home_title">首页</view>
<view class="zd-col-8 zd-row jcflexend home_userinfo">
<view class="user_icon"></view>
<view class="user_name">{{userName}}</view>
<view class="exit_text" @tap="Quit">退出</view>
</view>
</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 class="welcome_text_wraper">
<view class="welcome_text">{{userName}}, 欢迎进入诺力三期平板系统</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/images/' + e.path + '.png')" alt="">
<view class="menu-name">{{e.name}}</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-row menu-wrap">
<view class="menu-item" v-for="(e, i) in menuList" :key="i" @tap="toPage(e)">
<view class="menu_name_bg" :class="'bg_texture_' + i">
<view class="menu-name">{{e.name}}</view>
<view class="bill_count">{{e.counts}}</view>
</view>
</view>
</view>
<view class="cancel">
<view class="iconfont cancel_icon" @tap="show = false"></view>
</view>
</view>
<view class="left_bg"></view>
<view class="left_bg right_bg"></view>
</view>
</template>
<script>
import {authority, getBillsCount} from '@/utils/getData2.js'
import {getBillsCount} from '@/utils/getData2.js'
export default {
data() {
return {
userName: this.$store.getters.userInfo !== '' ? JSON.parse(this.$store.getters.userInfo).username : '',
menuList: [],
show: false,
secM: []
menuList: []
};
},
created () {
this._authority()
this._getBillsCount()
},
methods: {
async _authority () {
let res = await authority()
this.menuList = [...res.sonTree]
},
async _getBillsCount () {
let res = await getBillsCount()
console.log(res)
this.menuList = [...res]
},
toPage1 (e) {
if (e.sonTree.length > 0) {
this.show = true
this.secM = e.sonTree
toPage (e) {
let url = ''
if (e.ywlx === 'OUT') {
url = '/pages/management/out-storage?id=' + e.djlx
} else {
let url = e.router
uni.redirectTo({
url: url
})
url = '/pages/management/in-storage?id=' + e.djlx
}
},
toPage2 (e) {
let url = e.path
uni.redirectTo({
url: url
})
})
},
Quit () {
this.$store.dispatch('delUserInfo')
@@ -97,105 +71,105 @@
position relative
_wh(100%, 100%)
_bis(,'../../static/images/home_bg.jpg', 100%, 100%,bottom)
.zd_content
padding-top 0
.header
height 120rpx
padding 0 30rpx 50rpx 30rpx
padding 0 30rpx
align-items flex-start
justify-content flex-end
_bis(,'../../static/images/header_bg.png', 100%, 100%,bottom)
.home_title
_font(50rpx,60rpx,#fff,,center)
_font(50rpx,70rpx,#F6F9FE,,center)
font-family: YouSheBiaoTiHei;
.userInfo-wrap
_fj()
_wh(calc(100% - 30px),80px)
padding 0 15px
_bis($red,'../../static/images/info_bg.png',auto,100%,right,bottom)
border-radius 12px
margin 0 auto 15px auto
.userInfo
_fj(,flex-start,column)
.p1
_font(16px,1,#fff)
padding-bottom 8px
.p2
_font(13px,1,#fff)
.exit
_fj()
height 22px
padding 0 7px
border 1px solid #FF967C
border-radius 10px
.icon-exit
_wh(10px, 10px)
_bis(,'../../static/images/exit.png',11px)
.exit-text
_font(12px,22px,#fff,,right)
padding-left 5px
.home_userinfo
height 70rpx
.user_icon
_wh(50rpx, 50rpx)
margin-right 10rpx
_bis(,'../../static/images/user_icon.png', 100%, 100%,center)
.user_name
_font(34rpx,34rpx,#fff,,center)
padding-right 10rpx
margin 18rpx 20rpx 18rpx 0
border-right 1rpx solid #AECAF5
.exit_text
height 60rpx
_font(28rpx,60rpx,#fff,,center)
padding 0 20rpx
margin 5rpx 0
_bis(,'../../static/images/state-item_bg.png', 100%, 100%,center)
.welcome_text_wraper
height 140rpx
margin 30rpx 100rpx
.welcome_text
_font(26px, 140rpx, #F6F9FE,,)
padding-left 40rpx
font-family: YouSheBiaoTiHei
background: linear-gradient(180deg, rgba(255,255,255,1) 0%, rgba(49,190,255,0.9) 0%, rgba(239,252,254,1) 40%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
.zd_wrapper
_wh(calc(100% - 30px),calc(100% - 152px)) /** 42+80+15+15 */
padding 15px 5%
background-color #fff
border-radius 12px
margin 0 auto 15px auto
_wh(calc(100% - 200rpx),calc(100% - 450rpx)) /** 120rpx + 200rpx + 130rpx */
margin 40rpx 100rpx 0rpx 100rpx
_bis(,'../../static/images/bg-task-r2.png', 100%, 100%,center)
.menu-wrap
_fj(flex-start,center,,wrap)
flex-wrap wrap
justify-content flex-start
align-content center
height 100%
.menu-item
_fj()
flex-direction column
_wh(30%, auto)
margin-bottom 20px
_font(13px, 30px,#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)
max-width 90px
margin 0 auto 0.1px
width 20%
margin-bottom 100rpx
.menu_name_bg
position relative
_wh(200rpx, 200rpx)
margin 0 auto
border-radius 40rpx
background-image: radial-gradient( ellipse farthest-corner at 22rpx 22rpx , #afafb9, #afafb9 50%, #ffffff 50%);
background-size: 22rpx 22rpx;
.bg_texture_1, .bg_texture_7
background: repeating-linear-gradient( -45deg, #afafb9, #afafb9 10rpx, #ffffff 10rpx, #ffffff 16rpx );
.menu-name
background-color rgba(49, 95, 255, 0.8)
.bg_texture_3, .bg_texture_6
background-image: repeating-linear-gradient(45deg, #afafb9 25%, transparent 25%, transparent 75%, #afafb9 75%, #afafb9), repeating-linear-gradient(45deg, #afafb9 25%, #ffffff 25%, #ffffff 75%, #afafb9 75%, #afafb9);
background-position: 0 0, 22rpx 22rpx;
background-size: 44rpx 22rpx;
.menu-name
background-color rgba(0, 239, 48, 0.8)
.bg_texture_2, .bg_texture_5
background: radial-gradient(circle, transparent 20%, #ffffff 20%, #ffffff 80%, transparent 80%, transparent), radial-gradient(circle, transparent 20%, #ffffff 20%, #ffffff 80%, transparent 80%, transparent) 27.5rpx 27.5rpx, linear-gradient(#afafb9 4rpx, transparent 4rpx) 0 -4rpx, linear-gradient(90deg, #afafb9 4rpx, #ffffff 4rpx) -4rpx 0;
background-size: 55rpx 55rpx, 55rpx 55rpx, 27.5rpx 27.5rpx, 27.5rpx 27.5rpx;
.menu-name
background-color rgba(255, 189, 45, 0.8)
.bg_texture_4
.menu-name
background-color rgba(255, 139, 69, 0.8)
.menu-name
_font(14px, 18px, #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(calc(100% - 30px), calc(100% - 50px))
padding 0 12px
margin 0 auto
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(80px, 80px)
display flex
justify-content center
align-items center
_wh(200rpx, 200rpx)
padding 20rpx
border-radius 40rpx
_font(40rpx, 50rpx, #fff,bold,center)
background-color rgba(0,166,255,0.8)
.bill_count
position absolute
top -20rpx
right -20rpx
_wh(60rpx, 60rpx)
background-color $red
border-radius 50%
background-color $yellow
margin 0 auto
.menu-name_inner
color #fff
padding 0 10px
.cancel
_wh(100%, 50px)
padding 0 12px
overflow hidden
background-color rgba(255, 255, 255, .3)
box-shadow 0 0.5px 2px 0 rgba(160,160,160,0.9)
_font(40rpx, 60rpx, #fff,bold,center)
box-shadow 6rpx 6rpx 2rpx 2rpx rgba(0,0,0,.3)
.left_bg
position absolute
left 0
top 0
_wh(50rpx, 100%)
_bis(,'../../static/images/hud_left.png', 100%, ,center)
.right_bg
left auto
right 0
background-image url('../../static/images/hud_right.png')
</style>