Explorar el Código

fix: 修复条件显示和图表配置问题

修复质量控制面板在 brigade 类型下显示问题
调整考勤柱状图图例显示逻辑
更新数据看板查询表单默认 deptId
优化导出功能中组件可见性判断
huoyi hace 1 semana
padre
commit
93ee38cdcc

+ 5 - 3
src/views/assistant/components/dataBoard.vue

@@ -104,6 +104,7 @@ const currentYear = new Date().getFullYear()
104 104
 
105 105
 // 查询表单数据
106 106
 const queryForm = ref({
107
+  deptId: 100,
107 108
   dateRangeQueryType: 'YEAR',
108 109
   year: currentYear,
109 110
   quarter: '',
@@ -112,6 +113,7 @@ const queryForm = ref({
112 113
 
113 114
 // 当前查询参数(只有点击查询按钮时才更新)
114 115
 const currentQueryParams = ref({
116
+  deptId: null,
115 117
   dateRangeQueryType: 'YEAR',
116 118
   year: currentYear,
117 119
   quarter: '',
@@ -279,10 +281,10 @@ const handleExport = async () => {
279 281
     for (let i = 0; i < sectionTitles.length; i++) {
280 282
       const sectionTitle = sectionTitles[i];
281 283
       const sectionName = sectionTitle.textContent;
282
-      
284
+
283 285
       // 检查组件是否显示(通过检查父组件的显示状态)
284 286
       const componentContainer = sectionTitle.closest('.duty-organization, .quality-control, .risk-hazard, .qa-analysis');
285
-      const isComponentVisible = componentContainer && 
287
+      const isComponentVisible = componentContainer &&
286 288
         window.getComputedStyle(componentContainer).display !== 'none' &&
287 289
         componentContainer.offsetHeight > 0 &&
288 290
         componentContainer.offsetWidth > 0;
@@ -323,7 +325,7 @@ const handleExport = async () => {
323 325
           const isPanelVisible = window.getComputedStyle(panelItem).display !== 'none' &&
324 326
             panelItem.offsetHeight > 0 &&
325 327
             panelItem.offsetWidth > 0;
326
-          
328
+
327 329
           if (isPanelVisible) {
328 330
             componentPanelItems.push(panelItem);
329 331
           }

+ 5 - 2
src/views/assistant/components/dutyOrganization.vue

@@ -342,7 +342,7 @@ const fetchDutyOrganizationData = async (queryParams) => {
342 342
     if (isStationType.value) {
343 343
       //获取资质等级分布柱状图数据
344 344
       const barResponse = await getQualificationBarChart({ ...processedParams, ...calculateParams })
345
-     
345
+
346 346
       qualificationBarData.value = barResponse.data?.brigades || []
347 347
 
348 348
     } else if (isTeamsType.value) {
@@ -556,7 +556,8 @@ const attendanceBarOptions = {
556 556
   },
557 557
   legend: {
558 558
     data: ['安检一大队', '安检二大队', '安检三大队', '安检综合大队', '全站'],
559
-    top: 0
559
+    top: 0,
560
+    show: true,
560 561
   },
561 562
   grid: {
562 563
     left: '3%',
@@ -814,6 +815,7 @@ const updateAttendanceBarChart = () => {
814 815
     attendanceBarOptions.series[2].data = dept2Data
815 816
     attendanceBarOptions.series[3].data = dept3Data
816 817
     attendanceBarOptions.series[4].data = dept4Data
818
+    attendanceBarOptions.legend.show = !!isStationType.value
817 819
 
818 820
     // 重新设置图表选项
819 821
     setAttendanceOption(attendanceBarOptions)
@@ -826,6 +828,7 @@ const updateAttendanceBarChart = () => {
826 828
     attendanceBarOptions.series[1].data = []
827 829
     attendanceBarOptions.series[2].data = []
828 830
     attendanceBarOptions.series[3].data = []
831
+    attendanceBarOptions.legend.show = !!isStationType.value
829 832
     setAttendanceOption(attendanceBarOptions)
830 833
   }
831 834
 }

+ 1 - 1
src/views/assistant/components/qualityControl.vue

@@ -8,7 +8,7 @@
8 8
     <!-- 四个横向均分的内容区域 -->
9 9
     <div class="four-panel-layout">
10 10
       <!-- 第一个:任务计划安排统计 -->
11
-      <div class="panel-item" v-show="!isTeamType && !isUserType">
11
+      <div class="panel-item" v-show="!isTeamType && !isUserType && !isBrigadeType">
12 12
         <div class="panel-header">
13 13
           <h3>任务计划安排统计</h3>
14 14
         </div>