|
|
@@ -5,7 +5,7 @@
|
|
5
|
5
|
<view class="filter-section">
|
|
6
|
6
|
<view class="filter-row">
|
|
7
|
7
|
<uni-data-picker
|
|
8
|
|
- v-if="curUserRoles.includes('test') || curUserRoles.includes('jingli') || curUserRoles.includes('xingzheng')"
|
|
|
8
|
+ v-if="curUserRoles.includes('test') || curUserRoles.includes('bumenjingli') || curUserRoles.includes('xingzheng')"
|
|
9
|
9
|
class="filter-select" :localdata="departments" :placeholder="'请选择'" @change="handleinspectDeptIdChange"
|
|
10
|
10
|
:clear-icon="false" />
|
|
11
|
11
|
<text v-if="dateRange.length > 0" class="days-count">共 {{ totalDays }} 天</text>
|
|
|
@@ -233,7 +233,7 @@ export default {
|
|
233
|
233
|
{ label: '按个人', value: 3 }
|
|
234
|
234
|
];
|
|
235
|
235
|
}
|
|
236
|
|
- if (this.getType == "MANAGER" || this.curUserRoles.includes('kezhang')) {
|
|
|
236
|
+ if (this.getType == "MANAGER" || this.curUserRoles.includes('banzuzhang')) {
|
|
237
|
237
|
return [
|
|
238
|
238
|
{ label: '按班组', value: 2 },
|
|
239
|
239
|
{ label: '按个人', value: 3 }
|
|
|
@@ -315,7 +315,7 @@ export default {
|
|
315
|
315
|
if (this.getType == "MANAGER") {
|
|
316
|
316
|
dept = { inspectDepartmentId: this.formData.inspectDeptId }
|
|
317
|
317
|
}
|
|
318
|
|
- if (this.curUserRoles.includes('kezhang')) {
|
|
|
318
|
+ if (this.curUserRoles.includes('banzuzhang')) {
|
|
319
|
319
|
const deptId = this.currentUser.userInfo.deptId;
|
|
320
|
320
|
dept = { inspectDepartmentId: deptId }
|
|
321
|
321
|
}
|
|
|
@@ -355,7 +355,7 @@ export default {
|
|
355
|
355
|
},
|
|
356
|
356
|
// 初始化数据
|
|
357
|
357
|
async initData() {
|
|
358
|
|
- if (this.curUserRoles.includes('kezhang')) {
|
|
|
358
|
+ if (this.curUserRoles.includes('banzuzhang')) {
|
|
359
|
359
|
this.defaultActive = 2
|
|
360
|
360
|
}
|
|
361
|
361
|
// 使用data()中设置的默认今天日期,不再重置dateRange
|
|
|
@@ -379,7 +379,7 @@ export default {
|
|
379
|
379
|
const deptId = this.currentUser.userInfo && this.currentUser.userInfo.deptId;
|
|
380
|
380
|
const subDeptTree = await getDeptList({ parentId: deptId });
|
|
381
|
381
|
// console.log(subDeptTree, "subDeptTree")
|
|
382
|
|
- let firstOption = this.curUserRoles.includes('test') ? [{ value: null, deptType: null, text: '全站' }] : this.curUserRoles.includes('jingli') || this.curUserRoles.includes('xingzheng') ? [{ value: deptId, deptType: 'BRIGADE', text: '本队' }] : [];
|
|
|
382
|
+ let firstOption = this.curUserRoles.includes('test') ? [{ value: null, deptType: null, text: '全站' }] : this.curUserRoles.includes('bumenjingli') || this.curUserRoles.includes('xingzheng') ? [{ value: deptId, deptType: 'BRIGADE', text: '本队' }] : [];
|
|
383
|
383
|
//如果是站长,则获取所有部门的大队,如果是经理或行政,则获取登陆角色部门下的主管
|
|
384
|
384
|
let otherOption = this.curUserRoles.includes('test') ? buildBrigadeOptions(deptTree.data || [], true) : buildManagerOptions(subDeptTree.data, true);
|
|
385
|
385
|
console.log(otherOption, "this.departments")
|