2024-02-20 16:29:38 +08:00
|
|
|
|
<template>
|
2024-02-23 18:03:59 +08:00
|
|
|
|
<view class="home_content">
|
|
|
|
|
|
<view class="zd-row header">
|
|
|
|
|
|
<view class="zd-col-8 home_title">首页</view>
|
2024-02-26 18:11:25 +08:00
|
|
|
|
<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>
|
2024-02-20 16:29:38 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
2024-02-26 18:11:25 +08:00
|
|
|
|
<view class="welcome_text_wraper">
|
|
|
|
|
|
<view class="welcome_text">{{userName}}, 欢迎进入诺力三期平板系统!</view>
|
2024-02-20 16:29:38 +08:00
|
|
|
|
</view>
|
2024-02-26 18:11:25 +08:00
|
|
|
|
<view class="zd_wrapper">
|
|
|
|
|
|
<view class="zd-row menu-wrap">
|
|
|
|
|
|
<view class="menu-item" v-for="(e, i) in menuList" :key="i" @tap="toPage(e)">
|
2024-05-29 09:41:09 +08:00
|
|
|
|
<!-- <view class="menu_name_bg" :class="'bg_texture_' + i"> -->
|
|
|
|
|
|
<view class="menu_name_bg" :class="'bg_texture_' + e.ywlx">
|
2024-02-26 18:11:25 +08:00
|
|
|
|
<view class="menu-name">{{e.name}}</view>
|
2024-03-01 15:39:56 +08:00
|
|
|
|
<view v-show="Number(e.counts) > 0" class="bill_count">{{e.counts}}</view>
|
2024-02-20 16:29:38 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
2024-02-26 18:11:25 +08:00
|
|
|
|
<view class="left_bg"></view>
|
|
|
|
|
|
<view class="left_bg right_bg"></view>
|
2024-02-20 16:29:38 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
2024-05-09 10:58:57 +08:00
|
|
|
|
import {getBillsCount} from '@/utils/getData2.js'
|
2024-02-20 16:29:38 +08:00
|
|
|
|
export default {
|
|
|
|
|
|
data() {
|
|
|
|
|
|
return {
|
2024-03-07 10:17:05 +08:00
|
|
|
|
intervalId: null,
|
2024-06-07 10:08:09 +08:00
|
|
|
|
// interTime: this.$store.getters.setTime,
|
|
|
|
|
|
interTime: 60000,
|
2024-06-05 18:44:15 +08:00
|
|
|
|
userName: this.$store.getters.userInfo !== '' ? JSON.parse(this.$store.getters.userInfo).person_name : '',
|
2024-02-26 18:11:25 +08:00
|
|
|
|
menuList: []
|
2024-02-20 16:29:38 +08:00
|
|
|
|
};
|
|
|
|
|
|
},
|
2024-07-09 10:57:24 +08:00
|
|
|
|
onLoad () {
|
2024-02-23 18:03:59 +08:00
|
|
|
|
this._getBillsCount()
|
2024-05-09 10:58:57 +08:00
|
|
|
|
this.intervalId = setInterval(() => {
|
|
|
|
|
|
this._getBillsCount()
|
|
|
|
|
|
}, this.interTime)
|
2024-03-07 10:17:05 +08:00
|
|
|
|
},
|
2024-04-29 16:46:44 +08:00
|
|
|
|
beforeDestroy () {
|
2024-05-09 10:58:57 +08:00
|
|
|
|
clearInterval(this.intervalId)
|
2024-04-29 16:46:44 +08:00
|
|
|
|
this.intervalId = null
|
|
|
|
|
|
},
|
|
|
|
|
|
destroyed () {
|
2024-05-09 10:58:57 +08:00
|
|
|
|
clearInterval(this.intervalId)
|
2024-04-29 16:46:44 +08:00
|
|
|
|
this.intervalId = null
|
2024-02-20 16:29:38 +08:00
|
|
|
|
},
|
|
|
|
|
|
methods: {
|
2024-05-09 10:58:57 +08:00
|
|
|
|
async _getBillsCount () {
|
|
|
|
|
|
let res = await getBillsCount()
|
|
|
|
|
|
if (res.code === 1) {
|
|
|
|
|
|
this.menuList = [...res.result]
|
|
|
|
|
|
} else {
|
|
|
|
|
|
uni.showToast({
|
|
|
|
|
|
title: res.desc,
|
|
|
|
|
|
icon: 'none'
|
|
|
|
|
|
})
|
|
|
|
|
|
}
|
2024-02-20 16:29:38 +08:00
|
|
|
|
},
|
2024-02-26 18:11:25 +08:00
|
|
|
|
toPage (e) {
|
|
|
|
|
|
let url = ''
|
2024-05-29 09:41:09 +08:00
|
|
|
|
if (e.ywlx === 'DB') {
|
|
|
|
|
|
url = '/pages/management/alloc-maintenance'
|
|
|
|
|
|
} else if (e.ywlx === 'SH') {
|
|
|
|
|
|
url = '/pages/management/receive-confirm'
|
|
|
|
|
|
} else {
|
2024-10-24 16:51:49 +08:00
|
|
|
|
url = '/pages/management/in-storage_new?id=' + e.djlx + '&name=' + e.name + '&type=' + e.ywlx
|
2024-05-29 09:41:09 +08:00
|
|
|
|
}
|
2024-05-09 10:58:57 +08:00
|
|
|
|
uni.redirectTo({
|
2024-02-20 16:29:38 +08:00
|
|
|
|
url: url
|
2024-02-26 18:11:25 +08:00
|
|
|
|
})
|
2024-02-20 16:29:38 +08:00
|
|
|
|
},
|
|
|
|
|
|
Quit () {
|
2024-05-09 10:58:57 +08:00
|
|
|
|
this.$store.dispatch('delUserInfo', '')
|
|
|
|
|
|
uni.redirectTo({
|
|
|
|
|
|
url: '/pages/login/login'
|
|
|
|
|
|
})
|
2024-02-20 16:29:38 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style lang="stylus">
|
|
|
|
|
|
@import '../../common/style/mixin.styl';
|
2024-02-23 18:03:59 +08:00
|
|
|
|
.home_content
|
|
|
|
|
|
position relative
|
|
|
|
|
|
_wh(100%, 100%)
|
|
|
|
|
|
_bis(,'../../static/images/home_bg.jpg', 100%, 100%,bottom)
|
2024-02-20 16:29:38 +08:00
|
|
|
|
.header
|
2024-03-04 15:15:15 +08:00
|
|
|
|
height 60px
|
|
|
|
|
|
padding 0 15px
|
2024-02-26 18:11:25 +08:00
|
|
|
|
align-items flex-start
|
|
|
|
|
|
justify-content flex-end
|
2024-02-23 18:03:59 +08:00
|
|
|
|
_bis(,'../../static/images/header_bg.png', 100%, 100%,bottom)
|
|
|
|
|
|
.home_title
|
2024-03-04 15:15:15 +08:00
|
|
|
|
_font(25px,35px,#F6F9FE,,center)
|
2024-02-23 18:03:59 +08:00
|
|
|
|
font-family: YouSheBiaoTiHei;
|
2024-02-26 18:11:25 +08:00
|
|
|
|
.home_userinfo
|
2024-03-04 15:15:15 +08:00
|
|
|
|
height 35px
|
2024-02-26 18:11:25 +08:00
|
|
|
|
.user_icon
|
2024-03-04 15:15:15 +08:00
|
|
|
|
_wh(25px, 25px)
|
|
|
|
|
|
margin-right 5px
|
2024-02-26 18:11:25 +08:00
|
|
|
|
_bis(,'../../static/images/user_icon.png', 100%, 100%,center)
|
|
|
|
|
|
.user_name
|
2024-03-04 15:15:15 +08:00
|
|
|
|
_font(17px,17px,#fff,,center)
|
|
|
|
|
|
padding-right 5px
|
|
|
|
|
|
margin 9px 10px 9px 0
|
|
|
|
|
|
border-right 1px solid #AECAF5
|
2024-02-26 18:11:25 +08:00
|
|
|
|
.exit_text
|
2024-03-04 15:15:15 +08:00
|
|
|
|
height 30px
|
|
|
|
|
|
_font(14px,30px,#fff,,center)
|
|
|
|
|
|
padding 0 10px
|
|
|
|
|
|
margin 2.5px 0
|
2024-02-26 18:11:25 +08:00
|
|
|
|
_bis(,'../../static/images/state-item_bg.png', 100%, 100%,center)
|
|
|
|
|
|
.welcome_text_wraper
|
2024-03-04 15:15:15 +08:00
|
|
|
|
height 70px
|
|
|
|
|
|
margin 0 50px
|
2024-02-26 18:11:25 +08:00
|
|
|
|
.welcome_text
|
2024-03-04 15:15:15 +08:00
|
|
|
|
_font(26px, 70px, #F6F9FE,,)
|
|
|
|
|
|
padding-left 20px
|
2024-02-26 18:11:25 +08:00
|
|
|
|
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;
|
2024-02-20 16:29:38 +08:00
|
|
|
|
.zd_wrapper
|
2024-03-04 15:15:15 +08:00
|
|
|
|
_wh(calc(100% - 100px),calc(100% - 180px)) /** 120rpx + 200rpx + 130rpx */
|
2024-05-29 09:41:09 +08:00
|
|
|
|
margin 0px 50px 0 50px
|
2024-02-26 18:11:25 +08:00
|
|
|
|
_bis(,'../../static/images/bg-task-r2.png', 100%, 100%,center)
|
2024-02-20 16:29:38 +08:00
|
|
|
|
.menu-wrap
|
2024-02-26 18:11:25 +08:00
|
|
|
|
flex-wrap wrap
|
|
|
|
|
|
justify-content flex-start
|
|
|
|
|
|
align-content center
|
2024-02-20 16:29:38 +08:00
|
|
|
|
height 100%
|
|
|
|
|
|
.menu-item
|
2024-02-26 18:11:25 +08:00
|
|
|
|
width 20%
|
2024-05-29 09:41:09 +08:00
|
|
|
|
margin 10px 0
|
2024-02-26 18:11:25 +08:00
|
|
|
|
.menu_name_bg
|
|
|
|
|
|
position relative
|
2024-05-29 09:41:09 +08:00
|
|
|
|
_wh(100px, 80px)
|
2024-02-20 16:29:38 +08:00
|
|
|
|
margin 0 auto
|
2024-05-29 09:41:09 +08:00
|
|
|
|
border-radius 10px
|
2024-03-04 15:15:15 +08:00
|
|
|
|
background-image: radial-gradient( ellipse farthest-corner at 11px 11px , #afafb9, #afafb9 50%, #ffffff 50%);
|
|
|
|
|
|
background-size: 11px 11px;
|
2024-02-26 18:11:25 +08:00
|
|
|
|
.bg_texture_1, .bg_texture_7
|
2024-03-04 15:15:15 +08:00
|
|
|
|
background: repeating-linear-gradient( -45deg, #afafb9, #afafb9 5px, #ffffff 5px, #ffffff 8px );
|
2024-02-26 18:11:25 +08:00
|
|
|
|
.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);
|
2024-03-04 15:15:15 +08:00
|
|
|
|
background-position: 0 0, 11px 11px;
|
|
|
|
|
|
background-size: 22px 22px;
|
2024-02-26 18:11:25 +08:00
|
|
|
|
.menu-name
|
|
|
|
|
|
background-color rgba(0, 239, 48, 0.8)
|
2024-05-29 09:41:09 +08:00
|
|
|
|
.bg_texture_2, .bg_texture_5, .bg_texture_9
|
2024-03-04 15:15:15 +08:00
|
|
|
|
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) 13.5px 13.5px, linear-gradient(#afafb9 2px, transparent 2px) 0 -2px, linear-gradient(90deg, #afafb9 2px, #ffffff 2px) -2px 0;
|
|
|
|
|
|
background-size: 27.5px 27.5px, 27.5px 27.5px, 13.75px 13.75px, 13.75px 13.75px;
|
2024-02-26 18:11:25 +08:00
|
|
|
|
.menu-name
|
|
|
|
|
|
background-color rgba(255, 189, 45, 0.8)
|
|
|
|
|
|
.bg_texture_4
|
|
|
|
|
|
.menu-name
|
|
|
|
|
|
background-color rgba(255, 139, 69, 0.8)
|
2024-05-29 09:41:09 +08:00
|
|
|
|
.bg_texture_DB
|
|
|
|
|
|
background: repeating-linear-gradient( -45deg, #afafb9, #afafb9 5px, #ffffff 5px, #ffffff 8px );
|
|
|
|
|
|
.menu-name
|
|
|
|
|
|
background-color rgba(49, 95, 255, 0.8)
|
|
|
|
|
|
.bg_texture_IN
|
|
|
|
|
|
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, 11px 11px;
|
|
|
|
|
|
background-size: 22px 22px;
|
|
|
|
|
|
.menu-name
|
|
|
|
|
|
background-color rgba(0, 239, 48, 0.8)
|
|
|
|
|
|
.bg_texture_SH
|
|
|
|
|
|
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) 13.5px 13.5px, linear-gradient(#afafb9 2px, transparent 2px) 0 -2px, linear-gradient(90deg, #afafb9 2px, #ffffff 2px) -2px 0;
|
|
|
|
|
|
background-size: 27.5px 27.5px, 27.5px 27.5px, 13.75px 13.75px, 13.75px 13.75px;
|
|
|
|
|
|
.menu-name
|
|
|
|
|
|
background-color rgba(255, 189, 45, 0.8)
|
2024-02-26 18:11:25 +08:00
|
|
|
|
.menu-name
|
|
|
|
|
|
display flex
|
|
|
|
|
|
justify-content center
|
|
|
|
|
|
align-items center
|
2024-05-29 09:41:09 +08:00
|
|
|
|
_wh(100px, 80px)
|
2024-03-04 15:15:15 +08:00
|
|
|
|
padding 10px
|
2024-05-29 09:41:09 +08:00
|
|
|
|
border-radius 10px
|
|
|
|
|
|
_font(18px, 25px, #fff,bold,center)
|
2024-02-26 18:11:25 +08:00
|
|
|
|
background-color rgba(0,166,255,0.8)
|
|
|
|
|
|
.bill_count
|
|
|
|
|
|
position absolute
|
2024-03-04 15:15:15 +08:00
|
|
|
|
top -10px
|
|
|
|
|
|
right -10px
|
|
|
|
|
|
_wh(30px, 30px)
|
2024-02-26 18:11:25 +08:00
|
|
|
|
background-color $red
|
2024-02-20 16:29:38 +08:00
|
|
|
|
border-radius 50%
|
2024-05-29 15:18:32 +08:00
|
|
|
|
_font(16px, 30px, #fff,bold,center)
|
2024-03-04 15:15:15 +08:00
|
|
|
|
box-shadow 3px 3px 1px 1px rgba(0,0,0,.3)
|
2024-02-26 18:11:25 +08:00
|
|
|
|
.left_bg
|
|
|
|
|
|
position absolute
|
|
|
|
|
|
left 0
|
|
|
|
|
|
top 0
|
2024-03-04 15:15:15 +08:00
|
|
|
|
_wh(25px, 100%)
|
2024-02-26 18:11:25 +08:00
|
|
|
|
_bis(,'../../static/images/hud_left.png', 100%, ,center)
|
|
|
|
|
|
.right_bg
|
|
|
|
|
|
left auto
|
|
|
|
|
|
right 0
|
|
|
|
|
|
background-image url('../../static/images/hud_right.png')
|
2024-02-20 16:29:38 +08:00
|
|
|
|
</style>
|