Browse Source

fix(useReports): 修正查获类型统计初始值并更新巡检任务级别显示

将查获类型统计的最小值初始值从Infinity改为0,确保正确统计
更新巡检任务级别显示从"站级、科级、班组级"改为"大队级、质检科"
huoyi 4 weeks ago
parent
commit
497180fdd9
1 changed files with 6 additions and 8 deletions
  1. 6 8
      src/views/assistant/components/useReports.vue

+ 6 - 8
src/views/assistant/components/useReports.vue

@@ -82,9 +82,9 @@
82 82
                 查获<span class="dynamic-text">{{(reportData?.seizureModule?.seizureTypeList || []).reduce((max, item) =>
83 83
                   item?.total > max?.total ? item : max, { total: 0 })?.total || '--'}}</span>个,
84 84
                 其次为<span class="dynamic-text">{{(reportData?.seizureModule?.seizureTypeList || []).reduce((min, item) =>
85
-                  item?.total < min?.total ? item : min, { name: '--', total: Infinity })?.name || '--'}}</span>,
85
+                  item?.total < min?.total ? item : min, { name: '--', total: 0 })?.name || '--'}}</span>,
86 86
                     查获<span class="dynamic-text">{{(reportData?.seizureModule?.seizureTypeList || []).reduce((min,
87
-                      item) => item?.total < min?.total ? item : min, { total: Infinity })?.total || '--'}}</span>个。
87
+                      item) => item?.total < min?.total ? item : min, { total: 0 })?.total || '--'}}</span>个。
88 88
               </p>
89 89
               <p>查获部位:<span class="dynamic-text">{{ reportData?.seizureModule?.seizurePartList[0]?.scaleDesc || '--'
90 90
               }}</span>以上集中在<span class="dynamic-text">{{ reportData?.seizureModule?.seizurePartList[0]?.name ||
@@ -120,12 +120,10 @@
120 120
             <div class="detail-content">
121 121
               <p>结合系统试运行进度,本阶段已正式启动<span class="dynamic-text">{{
122 122
                 reportData?.checkModule?.checkTaskTypeList.map((item => `${item.name}(${item.remark})`)).join("、") ||
123
-                '--'}}</span>巡检任务。目前已发布站级任务<span class="dynamic-text">{{
124
-                    reportData?.checkModule?.checkTaskTypeList.find((item => item.name == '站级'))?.total || '--'
125
-                  }}</span>个,科级任务<span class="dynamic-text">{{
126
-                    reportData?.checkModule?.checkTaskTypeList.find((item => item.name == '科级'))?.total || '--'
127
-                  }}</span>个,班组级任务<span class="dynamic-text">{{
128
-                    reportData?.checkModule?.checkTaskTypeList.find((item => item.name == '班组级'))?.total || '--'
123
+                '--'}}</span>巡检任务。目前已发布大队级任务<span class="dynamic-text">{{
124
+                    reportData?.checkModule?.checkTaskTypeList.find((item => item.name == '大队级'))?.total || '--'
125
+                  }}</span>个,质检科任务<span class="dynamic-text">{{
126
+                    reportData?.checkModule?.checkTaskTypeList.find((item => item.name == '质检科'))?.total || '--'
129 127
                   }}</span>个,共提交检查单<span class="dynamic-text">{{
130 128
                     reportData?.checkModule?.totalCheckForm || '--' }}</span>份,共发现问题<span class="dynamic-text">{{
131 129
                     reportData?.checkModule?.totalProblemItem || '--' }}</span>项。其中发现<span class="dynamic-text">{{