修改部分bug
This commit is contained in:
@ -18,6 +18,7 @@ Page({
|
||||
isShowOrder: true,
|
||||
qrcode: "", // 设置二维码图片的路径
|
||||
userRole: "",
|
||||
title: '查看绩效',
|
||||
id: 0,
|
||||
},
|
||||
|
||||
@ -149,7 +150,9 @@ Page({
|
||||
userRole: result.userRole,
|
||||
id: result.id,
|
||||
})
|
||||
if (result.userRole !== 'user') this.setData({ isShowOrder: false });
|
||||
console.log(result.userRole)
|
||||
if (result.userRole !== 'user') this.setData({ isShowOrder: false});
|
||||
if (result.userRole === 'staff') this.setData({title: '客户订单'});
|
||||
}
|
||||
}
|
||||
})
|
||||
@ -198,22 +201,51 @@ Page({
|
||||
wx.navigateTo({
|
||||
url: `/pages/dashboardModule/supervisorPerformance/supervisorPerformance?role=${userRole}&id=${id}`,
|
||||
})
|
||||
} else if (userRole === 'staff') {
|
||||
wx.navigateTo({
|
||||
url: `/pages/dashboardModule/userOrderPerformance/userOrderPerformance?userId=${id}`,
|
||||
})
|
||||
} else {
|
||||
wx.navigateTo({
|
||||
url: `/pages/dashboardModule/staffPerformance/staffPerformance?role=${userRole}&id=${id}`,
|
||||
url: `/pages/dashboardModule/staffPerformance/staffPerformance?role=${userRole}&supId=${id}`,
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
// 跳转排名
|
||||
gotoRank(e) {
|
||||
// 跳转主管排名
|
||||
gotoSupervisorRank(e) {
|
||||
console.log(e);
|
||||
const userRole = e.currentTarget.dataset.userrole;
|
||||
const {userRole} = this.data
|
||||
console.log('========fds===>', userRole)
|
||||
if (userRole === 'staff' || userRole === 'user') {
|
||||
wx.showToast({
|
||||
title: '无权限',
|
||||
icon: 'error'
|
||||
})
|
||||
return ;
|
||||
}
|
||||
wx.navigateTo({
|
||||
url: `/pages/dashboardModule/performanceRanking/performanceRanking?role=${userRole}`,
|
||||
})
|
||||
},
|
||||
|
||||
// 跳转员工排名
|
||||
gotoStaffRank(e) {
|
||||
console.log(e);
|
||||
const {userRole} = this.data
|
||||
console.log('===========>', userRole)
|
||||
if (userRole === 'user') {
|
||||
wx.showToast({
|
||||
title: '无权限',
|
||||
icon: 'error'
|
||||
})
|
||||
return ;
|
||||
}
|
||||
wx.navigateTo({
|
||||
url: `/pages/dashboardModule/performanceRanking/performanceRanking?role=${userRole}`,
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
|
Reference in New Issue
Block a user