Browse Source

fix: 在部门类型检查中添加MANAGER并修复图表更新参数

添加MANAGER到部门类型检查列表,确保正确处理该类型部门的ID
修复图表更新函数调用,添加缺失的第二个参数
huoyi 3 days ago
parent
commit
6d36a1ce3b
1 changed files with 3 additions and 3 deletions
  1. 3 3
      src/views/assistant/components/dutyOrganization.vue

+ 3 - 3
src/views/assistant/components/dutyOrganization.vue

@@ -317,7 +317,7 @@ const fetchDutyOrganizationData = async (queryParams) => {
317 317
     const { deptType = "", id } = selectedDept ? selectedDept : { deptType: "", id: "" }
318 318
     delete processedParams.deptId
319 319
     let calculateParams = {
320
-      ...(['TEAMS', 'DEPARTMENT', 'BRIGADE'].includes(deptType) ? { deptId: id } : {}),
320
+      ...(['TEAMS', 'DEPARTMENT', 'BRIGADE','MANAGER'].includes(deptType) ? { deptId: id } : {}),
321 321
       ...(deptType == 'USER' ? { userId: id } : {})
322 322
     }
323 323
     // 获取出勤人次分析数据
@@ -877,13 +877,13 @@ const updateAttendanceBarOtherChart = () => {
877 877
     attendanceBarOtherOptions.series[0].data = allData
878 878
     attendanceBarOtherOptions.legend.show = !!isStationType.value
879 879
     // 重新设置图表选项
880
-    setAttendanceOption(attendanceBarOtherOptions)
880
+    setAttendanceOption(attendanceBarOtherOptions,true)
881 881
   } else {
882 882
     // 无数据时清空图表
883 883
     attendanceBarOtherOptions.xAxis.data = []
884 884
     attendanceBarOtherOptions.series[0].data = []
885 885
     attendanceBarOtherOptions.legend.show = !!isStationType.value
886
-    setAttendanceOption(attendanceBarOtherOptions)
886
+    setAttendanceOption(attendanceBarOtherOptions,true)
887 887
   }
888 888
 }
889 889