<!-- 入厂审核 -->
|
<template>
|
<view class="home_index">
|
<view class="home_content">
|
<u-navbar
|
title="智慧工厂"
|
bgColor="transparent"
|
leftIconColor="transparent"
|
titleStyle="text-align:left;width:100%;margin-left:25rpx;color:#fff"
|
:autoBack="true">
|
</u-navbar>
|
<view class="home_top_bg"></view>
|
<view class="home_header">
|
<view class="home_header_left">
|
<u-image src="@/static/agvor.png" width="150rpx" height="150rpx"></u-image>
|
</view>
|
<view class="home_header_right">
|
<view class="home_header_right_item">
|
<view class="home_header_right_title">{{realName}}</view>
|
</view>
|
<view class="home_header_right_datas">
|
<view class="home_header_datas_text">岗位:</view>
|
<view class="home_header_datas_text">{{works}}</view>
|
</view>
|
<view class="home_header_right_last">
|
<view class="home_header_last_text">部门:</view>
|
<view class="home_header_last_text">{{departName}}</view>
|
</view>
|
</view>
|
</view>
|
<view class="home_main_btns">
|
<view class="users_btns" v-for="items in menuLists" :key="items.tagId">
|
<view class="users_title">{{items.tagName}}</view>
|
<view class="users_content">
|
<view class="users_menu" v-for="(userItem,userIndex) in items.menuList" :key="userIndex">
|
<view class="users_menu_icons" @click="btnClick(userItem)">
|
<u-image :src="`https://pipe.thhy-tj.com/${userItem.menuIcon}`" width="128rpx" height="128rpx"></u-image>
|
</view>
|
<view class="users_menu_text">{{userItem.menuName}}</view>
|
</view>
|
</view>
|
</view>
|
</view>
|
</view>
|
</view>
|
</template>
|
|
<script>
|
export default {
|
data(){
|
return{
|
menuLists:uni.getStorageSync('menus'),
|
realName:uni.getStorageSync('realName'),
|
userType:uni.getStorageSync('userType'),
|
works:'',//岗位
|
departName:'',//部门
|
}
|
},
|
onLoad() {
|
this.showUserInfo()
|
},
|
methods:{
|
//展示用户信息
|
showUserInfo(){
|
this.$api.system.labourHomeInfo({userType:this.userType}).then(res=>{
|
if(res.statusMsg === 'ok'){
|
this.works = res.data.posName
|
this.departName = res.data.departName === null?'':res.data.departName
|
}else{
|
uni.$u.toast(res.statusMsg);
|
}
|
})
|
},
|
//点击图标跳转
|
btnClick(val){
|
uni.navigateTo({
|
url: `${val.menuUrl}`
|
})
|
// case 'device1':钢筋管理
|
// uni.navigateTo({
|
// url: '../../robePages/goodDevices/rebarManage'
|
// })
|
// break;
|
}
|
}
|
}
|
</script>
|
|
<style scoped lang="scss">
|
.home_index{
|
background-color: #F8F8F8;
|
height: 100vh;
|
position: relative;
|
.home_content{
|
// height: calc(100vh - 110rpx);
|
.home_top_bg{
|
background: url('https://s1.ax1x.com/2022/09/14/vvBuYq.png') no-repeat;
|
background-size: 100% 100%;
|
height: 40vh;
|
position: absolute;
|
left: 0;
|
top: 0;
|
right: 0;
|
}
|
.home_header{
|
height: 20vh;
|
position: absolute;
|
top: 150rpx;
|
left:0rpx;
|
right: 0rpx;
|
margin: 0rpx 20rpx;
|
display: flex;
|
align-items: center;
|
|
.home_header_left{
|
width: 150rpx;
|
}
|
.home_header_right{
|
width: calc(100% - 150rpx);
|
margin-left: 40rpx;
|
margin-top: -20rpx;
|
|
.home_header_right_item{
|
display: flex;
|
justify-content: space-between;
|
|
.home_header_right_title{
|
color: #F3F8FF;
|
font-size: 16px;
|
}
|
}
|
.home_header_right_datas{
|
margin-top: 16px;
|
display: flex;
|
.home_header_datas_text{
|
flex: none;
|
color: #F3F8FF;
|
font-size: 16px;
|
}
|
}
|
.home_header_right_last{
|
margin-top: 16px;
|
display: flex;
|
.home_header_last_text{
|
flex: none;
|
color: #F3F8FF;
|
font-size: 16px;
|
}
|
}
|
}
|
}
|
.home_main_btns{
|
height: calc(100% - 25vh);
|
// height: 100%;
|
overflow-y: auto;
|
margin: 0rpx 20rpx;
|
// background-color: seagreen;
|
position: absolute;
|
top: 420rpx;
|
left:0rpx;
|
right: 0rpx;
|
|
.data_board_btns{
|
height: 25vh;
|
border-radius: 10rpx;
|
margin-bottom: 20rpx;
|
background-color: #FFFFFF;
|
.data_board_title{
|
height: 8vh;
|
display: flex;
|
align-items: center;
|
padding-left: 50rpx;
|
border-bottom: 1px solid #F6F6F6;
|
position: relative;
|
font-size: 17px;
|
&::before{
|
content: '';
|
position: absolute;
|
top: 43rpx;
|
left: 28rpx;
|
width: 8rpx;
|
height: 48rpx;
|
background-color: #1976FF;
|
}
|
}
|
.data_board_content{
|
display: flex;
|
align-items: center;
|
justify-content: space-around;
|
max-width: 100%;
|
height: calc(100% - 110rpx);
|
overflow: auto;
|
.data_board_menu{
|
max-width: calc(100%/4 - 45rpx);
|
padding-left: 20rpx;
|
display: flex;
|
justify-content: center;
|
align-items: center;
|
flex-direction: column;
|
.data_board_menu_icons{
|
width: 225rpx;
|
margin: 0 auto;
|
}
|
.data_board_menu_text{
|
width: 225rpx;
|
padding-top: 10rpx;
|
color: #404040;
|
font-size: 15px;
|
padding-left: 96rpx;
|
}
|
}
|
}
|
}
|
.users_btns{
|
// height: 40vh;
|
border-radius: 10rpx;
|
margin-bottom: 20rpx;
|
background-color: #FFFFFF;
|
&:nth-child(3){
|
.users_content{
|
.users_menu{
|
margin-left: -30px;
|
}
|
}
|
}
|
.users_title{
|
height: 8vh;
|
display: flex;
|
align-items: center;
|
padding-left: 50rpx;
|
border-bottom: 1px solid #F6F6F6;
|
position: relative;
|
font-size: 17px;
|
&::before{
|
content: '';
|
position: absolute;
|
top: 43rpx;
|
left: 28rpx;
|
width: 8rpx;
|
height: 48rpx;
|
background-color: #1976FF;
|
}
|
}
|
.users_content{
|
padding: 15px 0 0;
|
display: flex;
|
align-items: center;
|
justify-content: space-around;
|
max-width: 100%;
|
height: calc(100% - 110rpx);
|
flex-wrap: wrap;
|
overflow: auto;
|
&:after{
|
content: "";
|
flex:0 0 328rpx;
|
}
|
.users_menu{
|
max-width: calc(100%/4 - 45rpx);
|
padding-left: 20rpx;
|
display: flex;
|
justify-content: center;
|
align-items: center;
|
flex-direction: column;
|
margin-bottom: 15px;
|
.users_menu_icons{
|
width: 225rpx;
|
margin: 0 auto;
|
margin-left: 3px;
|
}
|
.users_menu_text{
|
width: 225rpx;
|
padding-top: 10rpx;
|
color: #404040;
|
font-size: 13px;
|
text-align: center;
|
// padding-left: 96rpx;
|
}
|
}
|
}
|
}
|
}
|
}
|
}
|
</style>
|