From bc79e1fae76dffb3cbc3ddfa9ba23e66e150d098 Mon Sep 17 00:00:00 2001
From: zhang_nuo <zhang_12370@163.com>
Date: 星期五, 28 八月 2026 23:18:27 +0800
Subject: [PATCH] fix: 调整多个业务模块的页面展示与字段

---
 src/views/reportAnalysis/reportManagement/index.vue |   87 ++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 85 insertions(+), 2 deletions(-)

diff --git a/src/views/reportAnalysis/reportManagement/index.vue b/src/views/reportAnalysis/reportManagement/index.vue
index dc9d486..5704f43 100644
--- a/src/views/reportAnalysis/reportManagement/index.vue
+++ b/src/views/reportAnalysis/reportManagement/index.vue
@@ -273,6 +273,54 @@
         </el-col>
       </el-row>
     </div>
+    <div class=charts-container>
+      <el-row :gutter=20>
+        <el-col :span=24>
+          <el-card class=chart-card shadow=hover>
+            <template #header>
+              <div class=card-header>
+                <div class=chart-title-line></div>
+                <span>鎸変汉鍛�/鐝粍缁熻璐ㄩ噺鏁版嵁</span>
+              </div>
+            </template>
+            <el-row :gutter=20>
+              <el-col :span=12>
+                <div class=quality-rate-block>
+                  <div class=quality-rate-block-title>鎸変汉鍛樼粺璁�</div>
+                  <el-table :data=personGroupRateData.personList size=small border class=quality-rate-table>
+                    <el-table-column prop=dimensionName label=浜哄憳 min-width=120 />
+                    <el-table-column prop=totalCount label=鎬绘暟 min-width=80 />
+                    <el-table-column prop=qualifiedCount label=鍚堟牸鏁� min-width=90 />
+                    <el-table-column prop=unqualifiedCount label=涓嶅悎鏍兼暟 min-width=100 />
+                    <el-table-column prop=reworkCount label=杩斿伐鏁� min-width=90 />
+                    <el-table-column prop=scrapCount label=鎶ュ簾鏁� min-width=90 />
+                    <el-table-column label=鍚堟牸鐜� min-width=90><template #default="scope">{{ formatRateValue(scope.row.passRate) }}</template></el-table-column>
+                    <el-table-column label=杩斿伐鐜� min-width=90><template #default="scope">{{ formatRateValue(scope.row.reworkRate) }}</template></el-table-column>
+                    <el-table-column label=鎶ュ簾鐜� min-width=90><template #default="scope">{{ formatRateValue(scope.row.scrapRate) }}</template></el-table-column>
+                  </el-table>
+                </div>
+              </el-col>
+              <el-col :span=12>
+                <div class=quality-rate-block>
+                  <div class=quality-rate-block-title>鎸夌彮缁勭粺璁�</div>
+                  <el-table :data=personGroupRateData.groupList size=small border class=quality-rate-table>
+                    <el-table-column prop=dimensionName label=鐝粍 min-width=120 />
+                    <el-table-column prop=totalCount label=鎬绘暟 min-width=80 />
+                    <el-table-column prop=qualifiedCount label=鍚堟牸鏁� min-width=90 />
+                    <el-table-column prop=unqualifiedCount label=涓嶅悎鏍兼暟 min-width=100 />
+                    <el-table-column prop=reworkCount label=杩斿伐鏁� min-width=90 />
+                    <el-table-column prop=scrapCount label=鎶ュ簾鏁� min-width=90 />
+                    <el-table-column label=鍚堟牸鐜� min-width=90><template #default="scope">{{ formatRateValue(scope.row.passRate) }}</template></el-table-column>
+                    <el-table-column label=杩斿伐鐜� min-width=90><template #default="scope">{{ formatRateValue(scope.row.reworkRate) }}</template></el-table-column>
+                    <el-table-column label=鎶ュ簾鐜� min-width=90><template #default="scope">{{ formatRateValue(scope.row.scrapRate) }}</template></el-table-column>
+                  </el-table>
+                </div>
+              </el-col>
+            </el-row>
+          </el-card>
+        </el-col>
+      </el-row>
+    </div>
   </div>
 </template>
 
@@ -280,7 +328,7 @@
 import { ref, reactive, onMounted, nextTick } from "vue";
 import { ElMessage } from "element-plus";
 import * as echarts from "echarts";
-import { getInspectStatistics, getPassRateStatistics, getMonthlyPassRateStatistics, getYearlyPassRateStatistics, getMonthlyCompletionDetails, getTopParameters } from "@/api/reportAnalysis/qualityReport";
+import { getInspectStatistics, getPassRateStatistics, getMonthlyPassRateStatistics, getYearlyPassRateStatistics, getMonthlyCompletionDetails, getTopParameters, getPersonGroupRateStatistics } from "@/api/reportAnalysis/qualityReport";
 
 // 鍝嶅簲寮忔暟鎹�
 const filterForm = reactive({
@@ -294,6 +342,7 @@
 const yearlyPassRateData = ref([]);
 const monthlyCompletionDetailsData = ref([]);
 const topParametersData = ref({ totalCount: 0, list: [] });
+const personGroupRateData = ref({ personList: [], groupList: [] });
 const activeTab = ref("raw");
 
 const getParameterColor = (index) => {
@@ -321,6 +370,24 @@
   }
   return field === 'completionRate' || field === 'passRate' ? '0%' : 0;
 };
+const formatRateValue = value => {
+  return value || value === 0 ? Number(value).toFixed(2) + '%' : '0.00%';
+};
+
+const fetchPersonGroupRateStatisticsData = async () => {
+  try {
+    const res = await getPersonGroupRateStatistics();
+    if (res.code === 200 && res.data) {
+      personGroupRateData.value = {
+        personList: res.data.personList || [],
+        groupList: res.data.groupList || []
+      };
+    }
+  } catch (error) {
+    console.error("Failed to fetch person/group rate statistics:", error);
+  }
+};
+
 
 const fetchInspectStatisticsData = async () => {
   try {
@@ -426,6 +493,7 @@
 
 watch(activeTab, () => {
   fetchTopParametersData();
+  fetchPersonGroupRateStatisticsData();
 });
 
 
@@ -884,6 +952,7 @@
   fetchYearlyPassRateData();
   fetchMonthlyCompletionDetailsData();
   fetchTopParametersData();
+  fetchPersonGroupRateStatisticsData();
   nextTick(() => {
     initSampleChart();
     initEquipmentChart();
@@ -912,7 +981,6 @@
 <style scoped>
 .report-management {
   padding: 20px;
-  background-color: #f5f5f5;
   min-height: 100vh;
   /* height: 87vh;
   overflow: hidden; */
@@ -1038,6 +1106,21 @@
   border-radius: 3px;
 }
 
+.quality-rate-block {
+  min-height: 320px;
+}
+
+.quality-rate-block-title {
+  font-size: 15px;
+  font-weight: 600;
+  color: #303133;
+  margin-bottom: 12px;
+}
+
+.quality-rate-table {
+  width: 100%;
+}
+
 .chart-container {
   height: 250px;
   width: 100%;

--
Gitblit v1.9.3