1
This commit is contained in:
parent
e99df47c2e
commit
9b9519176d
@ -98,6 +98,12 @@ export default {
|
||||
default: () => {
|
||||
return {}
|
||||
}
|
||||
},
|
||||
userInfo: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {}
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@ -122,14 +128,11 @@ export default {
|
||||
roleCanJd:false,
|
||||
//当前用户是否可以进行施工、施工过程、结束施工操作---
|
||||
roleCanSg:false,
|
||||
//当前用户
|
||||
userInfo:{},
|
||||
ifLeader:false,
|
||||
}
|
||||
},
|
||||
mounted(){
|
||||
this.ifLeader = getStrData('ifLeader')
|
||||
this.userInfo = getUserInfo()
|
||||
if(this.userInfo.roleCodes.includes("service_advisor") || this.userInfo.roleCodes.includes("general_inspection") || (this.userInfo.roleCodes.includes("repair_staff") && getStrData("ifLeader"))){
|
||||
//服务顾问、总检可以派工,维修班组长需要判断是否可以派工
|
||||
this.roleCanPg = true
|
||||
|
@ -3,13 +3,16 @@
|
||||
<!--<VNavigationBar style="position: relative;z-index: 99;" leftTitle="true" backgroundColor="rgba(0,0,0,0)" title-color="#fff" title=" "></VNavigationBar>-->
|
||||
<view class="bodyTopBg"></view>
|
||||
<view class="body">
|
||||
<view style="text-align: left;margin: 0 32rpx" >
|
||||
<text class="company-text">{{ companyInfo.simpleName || companyInfo.corpName }}</text>
|
||||
</view>
|
||||
<view class="userInfoBox" >
|
||||
<image @click="showUserDetail" style="width: 104rpx;height: 104rpx;border-radius: 50%;" v-if="''==userInfo.avatar || null == userInfo.avatar" :src="defaultAvatar" mode="scaleToFill" @error="avatarErr"></image>
|
||||
<image @click="showUserDetail" style="width: 104rpx;height: 104rpx;border-radius: 50%;" v-else :src="imgUrlPrex+userInfo.avatar" mode="scaleToFill" @error="avatarErr"></image>
|
||||
<view class="userInfo" @click="showUserDetail">
|
||||
<text class="userName">{{ userInfo.nickname }}</text>
|
||||
<text class="userType">{{ userInfo.roleNames }}</text>
|
||||
<text class="userType" v-if="ifLeader">班组长</text>
|
||||
<text class="userType" v-if="ifLeader || ifLeader=='true'">班组长</text>
|
||||
</view>
|
||||
<view class="msg-box" @click="gotoMsg">
|
||||
<image mode="aspectFita" src="@/pages-home/static/msg.png" style="width: 48rpx;height: 48rpx"></image>
|
||||
@ -97,7 +100,7 @@
|
||||
<view class="todoList">
|
||||
<scroll-view scroll-y="true" style="height: 100%" class="itemContent" @scrolltolower="onReachBottomCus"
|
||||
refresher-enabled @refresherrefresh="onRefresherrefresh" :refresher-triggered="isTriggered">
|
||||
<order-card v-for="(item, index) in orderList" :key="index" :order="item" @childEvent="onRefresherrefresh" @doVoid="doVoidReq" @getOrder="openFile" @startWork="startWork" @addProj="addProj"></order-card>
|
||||
<order-card :userInfo="userInfo" v-for="(item, index) in orderList" :key="index" :order="item" @childEvent="onRefresherrefresh" @doVoid="doVoidReq" @getOrder="openFile" @startWork="startWork" @addProj="addProj"></order-card>
|
||||
<view style="text-align: center" v-if="orderList.length==0">
|
||||
<image class="" src="@/static/images/nothing.png" ></image>
|
||||
</view>
|
||||
@ -231,6 +234,8 @@ export default {
|
||||
//告知客户的内容
|
||||
tellCusText:"",
|
||||
ifLeader:false,
|
||||
//企业信息
|
||||
companyInfo:{},
|
||||
}
|
||||
},
|
||||
onLoad(){
|
||||
@ -239,6 +244,7 @@ export default {
|
||||
url: '/pages/login/login'
|
||||
})
|
||||
}else{
|
||||
this.companyInfo = getJSONData("companyInfo")
|
||||
if(!this.$msgSocket){
|
||||
this.$startMsgSocket(getTenantId(),getStrData("userId"))
|
||||
}
|
||||
@ -751,6 +757,12 @@ export default {
|
||||
overflow: auto;
|
||||
padding-bottom: 30rpx;
|
||||
}
|
||||
.company-text {
|
||||
font-size: 30rpx;
|
||||
font-weight: bold;
|
||||
display: inline-block;
|
||||
padding: 8rpx 16rpx;
|
||||
}
|
||||
|
||||
.userInfoBox {
|
||||
margin: 0 32rpx 40rpx;
|
||||
|
@ -85,7 +85,7 @@
|
||||
<view v-if="ticketWares.length==0 && active!=3" style="text-align: center">
|
||||
<image class="" src="@/static/images/nothing.png"></image>
|
||||
</view>
|
||||
<order-card v-if="active==3" v-for="(item, index) in orderList" :key="index" :order="item" @childEvent="onRefresherrefresh" @doVoid="doVoidReq" @getOrder="openFile" @startWork="startWork" @addProj="addProj"></order-card>
|
||||
<order-card :userInfo="userInfo" v-if="active==3" v-for="(item, index) in orderList" :key="index" :order="item" @childEvent="onRefresherrefresh" @doVoid="doVoidReq" @getOrder="openFile" @startWork="startWork" @addProj="addProj"></order-card>
|
||||
<view style="text-align: center" v-if="orderList.length==0 && active==3">
|
||||
<image class="" src="@/static/images/nothing.png" ></image>
|
||||
</view>
|
||||
|
@ -163,6 +163,8 @@
|
||||
setToken(res.data.loginResult.accessToken)
|
||||
setUserInfo(res.data.userinfo)
|
||||
setStrData("userId",res.data.userinfo.id)
|
||||
//查租户下维修企业信息
|
||||
this.getCompanyInfo()
|
||||
this.getNoReadNum()
|
||||
if(res.data.userinfo.roleCodes.includes("repair_staff")){
|
||||
//维修工角色,需要再查一下是否是班组长
|
||||
@ -320,6 +322,18 @@
|
||||
}
|
||||
})
|
||||
},
|
||||
async getCompanyInfo(){
|
||||
await request({
|
||||
url: "/admin-api/base/company/getCompanyByTenantId",
|
||||
method: "GET",
|
||||
params:{tenantId:getTenantId(),systemCode:"weixiu"}
|
||||
}).then((res) => {
|
||||
if(res.code==200){
|
||||
setJSONData("companyInfo",res.data)
|
||||
console.log(res.data,"企业信息")
|
||||
}
|
||||
})
|
||||
},
|
||||
dianyidain() {
|
||||
if(!this.ifPlay){
|
||||
console.log('执行了,dianyidain');
|
||||
|
Loading…
Reference in New Issue
Block a user