Explorar el Código

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

将查获类型统计的最小值初始值从Infinity改为0,确保正确统计
更新巡检任务级别显示从"站级、科级、班组级"改为"大队级、质检科"
huoyi hace 4 semanas
padre
commit
497180fdd9
Se han modificado 1 ficheros con 6 adiciones y 8 borrados
  1. 6 8
      src/views/assistant/components/useReports.vue

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

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