修改部分bug
This commit is contained in:
@ -135,7 +135,7 @@ Page({
|
||||
});
|
||||
}
|
||||
});
|
||||
} else if( role === 'supervisor' ) {
|
||||
} else if( role === 'supervisor' || role === 'staff') {
|
||||
wx.request({
|
||||
url: baseUrl + '/perform/rank/staff', // 替换为实际API地址
|
||||
method: 'POST',
|
||||
@ -175,6 +175,7 @@ Page({
|
||||
onLoad(options) {
|
||||
// 根据身份确定角色
|
||||
const role = options.role;
|
||||
if (role === 'staff') this.setData({selectedSortField: '推广人数'})
|
||||
console.log('角色---->',options.role);
|
||||
this.setData({ role });
|
||||
let showRole = '';
|
||||
@ -185,6 +186,8 @@ Page({
|
||||
case 'supervisor':
|
||||
showRole = '员工';
|
||||
break;
|
||||
case 'staff':
|
||||
showRole = '员工'
|
||||
}
|
||||
this.setData({ showRole });
|
||||
this.onSearch()
|
||||
|
@ -28,7 +28,7 @@
|
||||
<image class="image" src="./images/bottom.png"/>
|
||||
</view>
|
||||
</picker>
|
||||
<picker mode="selector" wx:if="{{ role === 'supervisor' }}" range="{{sortFieldsBySupervisor}}" bindchange="onSortFieldChange">
|
||||
<picker mode="selector" wx:if="{{ role === 'supervisor' || role === 'staff'}}" range="{{sortFieldsBySupervisor}}" bindchange="onSortFieldChange">
|
||||
<view class="flex-row justify-between section_2">
|
||||
<text class="font text_1">{{selectedSortField}}</text>
|
||||
<image class="image" src="./images/bottom.png"/>
|
||||
@ -71,7 +71,7 @@
|
||||
|
||||
<!-- 绩效数据 -->
|
||||
<view class="flex-row mt-14">
|
||||
<view class="flex-col justify-start items-center text-wrapper_5">
|
||||
<view class="flex-col justify-start items-center text-wrapper_5" wx:if="{{role === 'supervisor'}}">
|
||||
<text class="font_5 text_11">员工:{{item.empCount}}</text>
|
||||
</view>
|
||||
<view class="flex-col justify-start items-center text-wrapper_6 ml-8">
|
||||
|
Reference in New Issue
Block a user