3 Commits c3dc9c8b63 ... eae483a5ab

Author SHA1 Message Date
  huoyi eae483a5ab Merge branch 'needNew-0723' into dev 1 week ago
  huoyi 64da64c36e refactor: 统一替换角色标识banzuzhang为xiaozuzhang 1 week ago
  huoyi 3248984d75 debug(employeeProfile): add console log for schooling result 1 week ago

+ 1 - 1
src/views/attendance/postRecord/index.vue

@@ -334,7 +334,7 @@ const handleTeamChange = async (newTeamId) => {
334 334
     try {
335 335
       const response = await selectUserListByCondition({
336 336
         deptId: newTeamId, roleKeyList: [
337
-          "banzuzhang","SecurityCheck"
337
+          "xiaozuzhang","SecurityCheck"
338 338
         ],
339 339
       })
340 340
       // 获取团队成员的用户ID列表

+ 4 - 4
src/views/dataBigScreen/dashboard/components/pageItems/HomePageSystemStatus.vue

@@ -74,7 +74,7 @@ const dutySectionMaster = ref('')
74 74
 const fetchDutySectionMaster = async () => {
75 75
   try {
76 76
     // 调用接口获取今日上岗用户列表
77
-    const response = await selectUserListByRoleKey(['kezhang']) // 假设角色标识为'kezhang'
77
+    const response = await selectUserListByRoleKey(['banzuzhang']) // 假设角色标识为'banzuzhang'
78 78
 
79 79
     const userList = response.data || []
80 80
 
@@ -105,19 +105,19 @@ const currentUser = computed(() => {
105 105
 
106 106
 // 计算属性:是否为班组视图
107 107
 const isTeamView = computed(() => {
108
-  return role.value.includes('banzuzhang') ? false : role.value.includes('banzuzhang')
108
+  return role.value.includes('xiaozuzhang') ? false : role.value.includes('xiaozuzhang')
109 109
 })
110 110
 
111 111
 // 计算属性:是否为个人视图
112 112
 const isIndividualView = computed(() => {
113
-  return role.value.includes('banzuzhang') ? false : role.value.includes('SecurityCheck')
113
+  return role.value.includes('xiaozuzhang') ? false : role.value.includes('SecurityCheck')
114 114
 })
115 115
 
116 116
 // 计算属性:出勤信息数组
117 117
 const attendanceItems = computed(() => {
118 118
 
119 119
   let res = {}
120
-  if (role.value.includes('kezhang') || role.value.includes('test') || role.value.includes('zhijianke') || role.value.includes('admin')) {
120
+  if (role.value.includes('banzuzhang') || role.value.includes('test') || role.value.includes('zhijianke') || role.value.includes('admin')) {
121 121
     res = attendanceStats.value.stationLeaderStats || {}
122 122
     return [
123 123
       { id: 1, label: `在岗大队`, value: res?.dutyDeptName, unit: '' },

+ 20 - 20
src/views/dataBigScreen/dashboard/components/pageView/HomePage.vue

@@ -78,7 +78,7 @@ const sortStates = ref({
78 78
 
79 79
 // 角色判断逻辑(移植自home-new页面)
80 80
 const isTeamView = computed(() => {
81
-  return userRole.includes('banzuzhang')
81
+  return userRole.includes('xiaozuzhang')
82 82
 })
83 83
 
84 84
 const isIndividualView = computed(() => {
@@ -86,14 +86,14 @@ const isIndividualView = computed(() => {
86 86
 })
87 87
 
88 88
 // 判断是否为科长角色
89
-const isKezhang = computed(() => {
90
-  return userRole.includes('kezhang')
89
+const isbanzuzhang = computed(() => {
90
+  return userRole.includes('banzuzhang')
91 91
 })
92 92
 
93 93
 // 判断是否为测试角色
94 94
 const isTestRole = computed(() => {
95 95
 
96
-  return userRole.includes('test') || userRole.includes('zhijianke') || userRole.includes('kezhang') || userRole.includes('admin')
96
+  return userRole.includes('test') || userRole.includes('zhijianke') || userRole.includes('banzuzhang') || userRole.includes('admin')
97 97
 })
98 98
 
99 99
 // TypeDetail组件数据(移植自home-new页面)
@@ -102,7 +102,7 @@ const typeDetailData = computed(() => {
102 102
     {
103 103
       title: '查获上报',
104 104
       linkText: isTestRole.value ? "" : seizePendingCount.value ? `${seizePendingCount.value}条数据待处理` : '',
105
-      // link: isTeamView.value || isKezhang.value ? '/pages/myToDoList/index' : '/pages/voiceSubmissionDraft/index',
105
+      // link: isTeamView.value || isbanzuzhang.value ? '/pages/myToDoList/index' : '/pages/voiceSubmissionDraft/index',
106 106
       statTitle: '查获数量',
107 107
       dividerIndex: 0,
108 108
       dataItems: getSeizeDataItems(),
@@ -154,7 +154,7 @@ const seizePendingCount = computed(() => {
154 154
     const { securityCheckerData } = seizeData.value;
155 155
     const { pendingCount } = securityCheckerData || {};
156 156
     return pendingCount;
157
-  } else if (userRole.includes('kezhang')) {
157
+  } else if (userRole.includes('banzuzhang')) {
158 158
     const { sectionMasterData } = seizeData.value;
159 159
     const { pendingCount } = sectionMasterData || {};
160 160
     return pendingCount;
@@ -372,15 +372,15 @@ const getInspectionDataItems = () => {
372 372
       { label: '本站平均数', value: ((stationPassRate || 0) * 100).toFixed(2) + '%', isImage: false, color: stationPassRate < personalPassRate ? '#00AE41' : '#F96060' }
373 373
     ];
374 374
   } else if (isTeamView.value) {
375
-    // banzuzhang角色:班组、本科平均数、本站平均数
375
+    // xiaozuzhang角色:班组、本科平均数、本站平均数
376 376
     return [
377 377
       { label: '班组', value: ((teamPassRate || 0) * 100).toFixed(2) + '%', isImage: false },
378 378
       { label: '本科平均数', value: ((departmentPassRate || 0) * 100).toFixed(2) + '%', isImage: false, color: departmentPassRate < teamPassRate ? '#00AE41' : '#F96060' },
379 379
       { label: '本站平均数', value: ((stationPassRate || 0) * 100).toFixed(2) + '%', isImage: false, color: stationPassRate < teamPassRate ? '#00AE41' : '#F96060' }
380 380
     ];
381 381
   } else
382
-    // if (isKezhang.value) {
383
-    //   // kezhang角色:全科、本站平均数、前三名班组(isImage: true)
382
+    // if (isbanzuzhang.value) {
383
+    //   // banzuzhang角色:全科、本站平均数、前三名班组(isImage: true)
384 384
     //   return [
385 385
     //     { label: '全科', value: ((departmentPassRate || 0) * 100).toFixed(2) + '%', isImage: false },
386 386
     //     { label: '本站平均数', value: ((stationPassRate || 0) * 100).toFixed(2) + '%', isImage: false, color: stationPassRate < departmentPassRate ? '#00AE41' : '#F96060' },
@@ -418,15 +418,15 @@ const getQuestionDataItems = () => {
418 418
       { label: '本站平均数', value: (siteAvgAccuracy || 0) + '%', isImage: false, color: siteAvgAccuracy < personalAccuracy ? '#00AE41' : '#F96060' }
419 419
     ];
420 420
   } else if (isTeamView.value) {
421
-    // banzuzhang角色:班组、本科平均数、本站平均数
421
+    // xiaozuzhang角色:班组、本科平均数、本站平均数
422 422
     return [
423 423
       { label: '班组', value: (teamAvgAccuracy || 0) + '%', isImage: false },
424 424
       { label: '本科平均数', value: (deptAvgAccuracy || 0) + '%', isImage: false, color: deptAvgAccuracy < teamAvgAccuracy ? '#00AE41' : '#F96060' },
425 425
       { label: '本站平均数', value: (siteAvgAccuracy || 0) + '%', isImage: false, color: siteAvgAccuracy < teamAvgAccuracy ? '#00AE41' : '#F96060' }
426 426
     ];
427 427
   } else
428
-    // if (isKezhang.value) {
429
-    //   // kezhang角色:全科、本站平均数、前三名班组(isImage: true)
428
+    // if (isbanzuzhang.value) {
429
+    //   // banzuzhang角色:全科、本站平均数、前三名班组(isImage: true)
430 430
     //   return [
431 431
     //     { label: '全科', value: (deptAvgAccuracy || 0) + '%', isImage: false, },
432 432
     //     { label: '本站平均数', value: (siteAvgAccuracy || 0) + '%', isImage: false, color: siteAvgAccuracy < deptAvgAccuracy ? '#00AE41' : '#F96060' },
@@ -467,22 +467,22 @@ const getSeizeDataItems = () => {
467 467
       { label: '本站平均数', value: (stationAverage && stationAverage.toFixed(2)) || 0, isImage: false, color: stationAverage < selfSeizureCount ? '#00AE41' : '#F96060' }
468 468
     ];
469 469
   } else if (isTeamView.value) {
470
-    // banzuzhang角色:从teamLeaderData解构
470
+    // xiaozuzhang角色:从teamLeaderData解构
471 471
     const { teamLeaderData } = seizeData.value;
472 472
     const { departmentAverage, stationAverage, teamAverage } = teamLeaderData || {};
473
-    // banzuzhang角色:班组、本科平均数、本站平均数
473
+    // xiaozuzhang角色:班组、本科平均数、本站平均数
474 474
     return [
475 475
       { label: '班组', value: teamAverage || 0, isImage: false },
476 476
       { label: '本科平均数', value: departmentAverage || 0, isImage: false, color: departmentAverage < teamAverage ? '#00AE41' : '#F96060' },
477 477
       { label: '本站平均数', value: (stationAverage && stationAverage.toFixed(2)) || 0, isImage: false, color: stationAverage < teamAverage ? '#00AE41' : '#F96060' }
478 478
     ];
479 479
   } else
480
-    // if (isKezhang.value) {
481
-    //   // kezhang角色:从securityCheckerData解构
480
+    // if (isbanzuzhang.value) {
481
+    //   // banzuzhang角色:从securityCheckerData解构
482 482
     //   const { sectionMasterData } = seizeData.value;
483 483
     //   const { stationAverage, topThreeTeams, departmentAverage } = sectionMasterData || {}
484 484
 
485
-    //   // kezhang角色:全科、本站平均数、前三名班组(isImage: true)
485
+    //   // banzuzhang角色:全科、本站平均数、前三名班组(isImage: true)
486 486
     //   return [
487 487
     //     { label: '全科', value: departmentAverage || 0, isImage: false },
488 488
     //     { label: '本站平均数', value: stationAverage?.toFixed(2) || 0, isImage: false, color: stationAverage?.toFixed(2) < departmentAverage ? '#00AE41' : '#F96060' },
@@ -531,7 +531,7 @@ const getRankList = () => {
531 531
       { label: '科级排名', current: departmentRanking || 0, total: departmentTotal || 0, percentage: departmentTotal ? ((departmentRanking || 0) / departmentTotal) * 100 : 0 },
532 532
       { label: '站级排名', current: stationRanking || 0, total: stationTotal || 0, percentage: stationTotal ? ((stationRanking || 0) / stationTotal) * 100 : 0, type: 'station' }
533 533
     ];
534
-  } else if (isKezhang.value) {
534
+  } else if (isbanzuzhang.value) {
535 535
     return [
536 536
       { label: '站级排名', current: stationRanking || 0, total: stationTotal || 0, percentage: stationTotal ? ((stationRanking || 0) / stationTotal) * 100 : 0, type: 'station' }
537 537
     ];
@@ -558,7 +558,7 @@ const getQuestionRankList = () => {
558 558
       { label: '科级排名', current: deptRanking?.rank || 0, total: deptRanking?.total || 0, percentage: deptRanking?.total ? ((deptRanking.rank || 0) / deptRanking.total) * 100 : 0 },
559 559
       { label: '站级排名', current: siteRanking?.rank || 0, total: siteRanking?.total || 0, percentage: siteRanking?.total ? ((siteRanking.rank || 0) / siteRanking.total) * 100 : 0, type: 'station' }
560 560
     ];
561
-  } else if (isKezhang.value) {
561
+  } else if (isbanzuzhang.value) {
562 562
     const { deptInSiteRanking } = accuracyStatistics.value;
563 563
     return [
564 564
       { label: '站级排名', current: deptInSiteRanking?.rank || 0, total: deptInSiteRanking?.total || 0, percentage: deptInSiteRanking?.total ? ((deptInSiteRanking?.rank || 0) / deptInSiteRanking?.total) * 100 : 0, type: 'station' }
@@ -588,7 +588,7 @@ const getSeizeRankList = () => {
588 588
       { label: '科级排名', current: departmentRanking?.currentRank || 0, total: departmentRanking?.totalItems || 0, percentage: departmentRanking?.totalItems ? ((departmentRanking.currentRank || 0) / departmentRanking.totalItems) * 100 : 0 },
589 589
       { label: '站级排名', current: stationRanking?.currentRank || 0, total: stationRanking?.totalItems || 0, percentage: stationRanking?.totalItems ? ((stationRanking.currentRank || 0) / stationRanking.totalItems) * 100 : 0, type: 'station' }
590 590
     ];
591
-  } else if (isKezhang.value) {
591
+  } else if (isbanzuzhang.value) {
592 592
     const { sectionMasterData } = seizeData.value;
593 593
     const { stationRanking } = sectionMasterData || {};
594 594
     // 科长、SecurityCheck角色:显示班组、科级和站级排名

+ 2 - 0
src/views/portraitManagement/employeeProfile/index.vue

@@ -323,6 +323,8 @@ const displayQualificationLevels = computed(() => {
323 323
 
324 324
 const getSchooling = (schooling) => {
325 325
   const result = (sys_user_schooling.value || []).find(item => item.value === schooling) || { label: schooling }
326
+  console.log(result)
327
+  
326 328
   return result.label || '-'
327 329
 }
328 330