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