1
This commit is contained in:
parent
9b9519176d
commit
070df2478b
@ -12,7 +12,7 @@
|
||||
<view class="userInfo" @click="showUserDetail">
|
||||
<text class="userName">{{ userInfo.nickname }}</text>
|
||||
<text class="userType">{{ userInfo.roleNames }}</text>
|
||||
<text class="userType" v-if="ifLeader || ifLeader=='true'">班组长</text>
|
||||
<text class="userType" v-if="ifLeader">班组长</text>
|
||||
</view>
|
||||
<view class="msg-box" @click="gotoMsg">
|
||||
<image mode="aspectFita" src="@/pages-home/static/msg.png" style="width: 48rpx;height: 48rpx"></image>
|
||||
@ -70,25 +70,35 @@
|
||||
<u-icon style="width: 20rpx" color="#999" name="arrow-right" size="12"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 总检角色和维修业务管理员 -->
|
||||
<view v-if="userInfo.roleCodes.includes('general_inspection') || userInfo.roleCodes.includes('weixiu')">
|
||||
<view class="body-top-tab">
|
||||
<view v-for="(item, index) in timePicker" @click="activeTab(index)" :key="index"
|
||||
:class="{ active: active === index }"
|
||||
class="body-top-tab-item">
|
||||
{{ item }}
|
||||
<view v-if="index === active" class="activeLine"></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="orderCount" >
|
||||
<view class="orderCountItem">
|
||||
<text class="label">维修中</text>
|
||||
<text class="value">{{ bossNum.workingNum }}</text>
|
||||
</view>
|
||||
<view class="line"></view>
|
||||
<view class="orderCountItem">
|
||||
<text class="label">已完成</text>
|
||||
<text class="value">{{ bossNum.doneNum }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 服务顾问角色 -->
|
||||
<view class="orderCount" v-if="userInfo.roleCodes.includes('service_advisor')" @click="serviceWork">
|
||||
<view class="orderCount" v-if="userInfo.roleCodes.includes('service_advisor') || userInfo.roleCodes.includes('weixiu')|| userInfo.roleCodes.includes('general_inspection')" @click="serviceWork">
|
||||
<view class="orderCountItem">
|
||||
<text class="label">待审批配件申请单</text>
|
||||
<text class="value">{{serviceNum}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- TODO 总检角色 -->
|
||||
<view class="orderCount" v-if="userInfo.roleCodes.includes('general_inspection') || userInfo.roleCodes.includes('weixiu')">
|
||||
<view class="orderCountItem">
|
||||
<text class="label">维修中</text>
|
||||
<text class="value">{{ bossNum.workingNum }}</text>
|
||||
</view>
|
||||
<view class="line"></view>
|
||||
<view class="orderCountItem">
|
||||
<text class="label">已完成</text>
|
||||
<text class="value">{{ bossNum.doneNum }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="todoListBox">
|
||||
<view class="title">
|
||||
待办工单
|
||||
@ -182,6 +192,9 @@ export default {
|
||||
avatar: undefined,
|
||||
nickname: ''
|
||||
},
|
||||
//时间可选项--总检、业务管理员用
|
||||
timePicker:['当日','累计'],
|
||||
active:0,
|
||||
menuList: [
|
||||
{
|
||||
title: '新建工单',
|
||||
@ -275,6 +288,11 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
activeTab(index) {
|
||||
this.active = index
|
||||
//刷新统计数据
|
||||
this.getBossTodo()
|
||||
},
|
||||
/**
|
||||
* 作废
|
||||
*/
|
||||
@ -563,9 +581,13 @@ export default {
|
||||
* 从总检的角度差维修中、已完成的工单数量
|
||||
*/
|
||||
getBossTodo(){
|
||||
let params={
|
||||
selectType:this.active==0?"today":"all"
|
||||
}
|
||||
request({
|
||||
url: '/admin-api/repair/tickets/getBossNum',
|
||||
method: 'get',
|
||||
params:params
|
||||
}).then((res) => {
|
||||
console.log(res)
|
||||
if (res.code == 200) {
|
||||
@ -932,7 +954,7 @@ export default {
|
||||
}
|
||||
}
|
||||
.orderCount {
|
||||
margin: 40rpx 32rpx;
|
||||
margin: 0 40rpx 32rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 8rpx 8rpx 8rpx 8rpx;
|
||||
padding: 40rpx;
|
||||
@ -1076,6 +1098,35 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
.body-top-tab {
|
||||
display: flex;
|
||||
font-size: 30rpx;
|
||||
margin: 0 32rpx;
|
||||
|
||||
.body-top-tab-item {
|
||||
flex: 1;
|
||||
width: 0;
|
||||
text-align: center;
|
||||
padding: 16rpx 20rpx;
|
||||
position: relative;
|
||||
|
||||
&.active {
|
||||
color: #0174F6;
|
||||
}
|
||||
|
||||
.activeLine {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
width: 96rpx;
|
||||
height: 6rpx;
|
||||
background: #0174F6;
|
||||
border-radius: 4rpx 4rpx 0rpx 0rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.repairShop {
|
||||
width: 686rpx;
|
||||
margin: 38rpx auto 0;
|
||||
|
@ -24,32 +24,52 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
// #ifdef APP
|
||||
//保活技术
|
||||
this.register()
|
||||
// #endif
|
||||
if(getToken()){
|
||||
onLoad() {
|
||||
// #ifdef APP
|
||||
//保活技术
|
||||
this.register()
|
||||
// #endif
|
||||
if (getToken()) {
|
||||
this.getNoReadNum()
|
||||
//跳转首页
|
||||
//判断是否是仓管,仓管需要跳单独的首页
|
||||
let userInfo = getUserInfo()
|
||||
if(userInfo.roleCodes.includes('repair_warehouse')){
|
||||
if (userInfo.roleCodes.includes('repair_warehouse')) {
|
||||
//仓管
|
||||
uni.navigateTo({
|
||||
url: '/pages-warehouse/home/home'
|
||||
})
|
||||
}else{
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: '/pages-home/home/home'
|
||||
})
|
||||
}
|
||||
}else{
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: '/pages/login/login'
|
||||
})
|
||||
}
|
||||
},
|
||||
}
|
||||
},
|
||||
onShow(){
|
||||
if (getToken()) {
|
||||
//判断是否是仓管,仓管需要跳单独的首页
|
||||
let userInfo = getUserInfo()
|
||||
if (userInfo.roleCodes.includes('repair_warehouse')) {
|
||||
//仓管
|
||||
uni.navigateTo({
|
||||
url: '/pages-warehouse/home/home'
|
||||
})
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: '/pages-home/home/home'
|
||||
})
|
||||
}
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: '/pages/login/login'
|
||||
})
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
register() { //注册
|
||||
console.log(keepAlivePlugin, 'keepAlive');
|
||||
|
@ -48,6 +48,8 @@
|
||||
loginApp
|
||||
} from '@/api/login';
|
||||
import {
|
||||
getToken,
|
||||
getUserInfo,
|
||||
setToken,
|
||||
setTenantId,
|
||||
getTenantId,
|
||||
@ -96,6 +98,22 @@
|
||||
},
|
||||
},
|
||||
mounted() {},
|
||||
onShow(){
|
||||
if (getToken()) {
|
||||
//判断是否是仓管,仓管需要跳单独的首页
|
||||
let userInfo = getUserInfo()
|
||||
if (userInfo.roleCodes.includes('repair_warehouse')) {
|
||||
//仓管
|
||||
uni.navigateTo({
|
||||
url: '/pages-warehouse/home/home'
|
||||
})
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: '/pages-home/home/home'
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
wxlogin() {
|
||||
uni.login({
|
||||
|
Loading…
Reference in New Issue
Block a user