|
|
@@ -33,11 +33,11 @@
|
|
33
|
33
|
</view>
|
|
34
|
34
|
|
|
35
|
35
|
<view class="search-selector">
|
|
36
|
|
- <view class="search-select-trigger" :class="{ 'search-select-trigger-disabled': isSecurityCheck }"
|
|
37
|
|
- @click="!isSecurityCheck && (showEmployeePicker = true)">
|
|
|
36
|
+ <view class="search-select-trigger" :class="{ 'search-select-trigger-disabled': isSecurityCheck || routeUserId }"
|
|
|
37
|
+ @click="!isSecurityCheck && !routeUserId && (showEmployeePicker = true)">
|
|
38
|
38
|
<u-icon name="list" color="#A78BFA" size="16"></u-icon>
|
|
39
|
39
|
<text class="search-name-text">{{ selectedEmployeeName || '请选择员工' }}</text>
|
|
40
|
|
- <u-icon v-if="!isSecurityCheck" name="arrow-down" color="#A78BFA" size="14"></u-icon>
|
|
|
40
|
+ <u-icon v-if="!isSecurityCheck && !routeUserId" name="arrow-down" color="#A78BFA" size="14"></u-icon>
|
|
41
|
41
|
</view>
|
|
42
|
42
|
</view>
|
|
43
|
43
|
|
|
|
@@ -379,6 +379,9 @@ export default {
|
|
379
|
379
|
expandedDeptIds: [],
|
|
380
|
380
|
isSecurityCheck: false,
|
|
381
|
381
|
userInfo: null,
|
|
|
382
|
+ // 路由跳转参数
|
|
|
383
|
+ routeUserId: null,
|
|
|
384
|
+ routeUserName: '',
|
|
382
|
385
|
// 雷达图tooltip相关
|
|
383
|
386
|
activeDimName: null,
|
|
384
|
387
|
radarTooltipPosition: { x: 0, y: 0 },
|
|
|
@@ -463,6 +466,13 @@ export default {
|
|
463
|
466
|
return s.toFixed(2)
|
|
464
|
467
|
}
|
|
465
|
468
|
},
|
|
|
469
|
+ // uni-app 页面生命周期:接收路由参数
|
|
|
470
|
+ onLoad(options) {
|
|
|
471
|
+ if (options.userId) {
|
|
|
472
|
+ this.routeUserId = options.userId
|
|
|
473
|
+ this.routeUserName = decodeURIComponent(options.userName || '')
|
|
|
474
|
+ }
|
|
|
475
|
+ },
|
|
466
|
476
|
mounted() {
|
|
467
|
477
|
this.updateTime()
|
|
468
|
478
|
this.timer = setInterval(() => {
|
|
|
@@ -470,7 +480,19 @@ export default {
|
|
470
|
480
|
}, 1000)
|
|
471
|
481
|
// 默认计算时间范围(近一年)
|
|
472
|
482
|
this.onTimeTagClick(this.selectedTimeTag)
|
|
473
|
|
- this.fetchEmployeeList()
|
|
|
483
|
+
|
|
|
484
|
+ if (this.routeUserId) {
|
|
|
485
|
+ // 来自组织架构跳转,直接加载指定人员
|
|
|
486
|
+ this.selectedEmployeeId = this.routeUserId
|
|
|
487
|
+ this.selectedEmployeeName = this.routeUserName
|
|
|
488
|
+ this.searchKeyword = this.routeUserName
|
|
|
489
|
+ this.employeeLoading = false
|
|
|
490
|
+ this.$nextTick(() => {
|
|
|
491
|
+ this.fetchEmployeePortrait()
|
|
|
492
|
+ })
|
|
|
493
|
+ } else {
|
|
|
494
|
+ this.fetchEmployeeList()
|
|
|
495
|
+ }
|
|
474
|
496
|
},
|
|
475
|
497
|
beforeDestroy() {
|
|
476
|
498
|
if (this.timer) {
|