From 1daa22ed05c77e4a8c3069124a1849d5d6504f69 Mon Sep 17 00:00:00 2001
From: huminmin <mac@MacBook-Pro.local>
Date: 星期四, 30 七月 2026 17:57:00 +0800
Subject: [PATCH] 修改报工审批数据显示

---
 src/views/officeProcessAutomation/ApproveManage/approve-list/components/ApproveDetailPanel.vue |   76 +++++++++++++++++++++++++++++++++++--
 1 files changed, 71 insertions(+), 5 deletions(-)

diff --git a/src/views/officeProcessAutomation/ApproveManage/approve-list/components/ApproveDetailPanel.vue b/src/views/officeProcessAutomation/ApproveManage/approve-list/components/ApproveDetailPanel.vue
index b9eb42f..7c6cd47 100644
--- a/src/views/officeProcessAutomation/ApproveManage/approve-list/components/ApproveDetailPanel.vue
+++ b/src/views/officeProcessAutomation/ApproveManage/approve-list/components/ApproveDetailPanel.vue
@@ -19,9 +19,9 @@
             {{ approvalTypeLabel(row.approvalType) }}
           </span>
         </el-descriptions-item>
-        <el-descriptions-item label="鐢宠浜虹紪鍙�">{{ row.applicantNo || "鈥�" }}</el-descriptions-item>
-        <el-descriptions-item label="鐢宠浜哄悕绉�">{{ row.applicantName || "鈥�" }}</el-descriptions-item>
-        <el-descriptions-item label="鐢宠鎽樿">{{ row.summary || "鈥�" }}</el-descriptions-item>
+        <el-descriptions-item label="鍙戣捣浜虹紪鍙�">{{ row.applicantNo || "鈥�" }}</el-descriptions-item>
+        <el-descriptions-item label="鍙戣捣浜哄悕绉�">{{ row.applicantName || "鈥�" }}</el-descriptions-item>
+        <el-descriptions-item label="鎽樿">{{ row.summary || "鈥�" }}</el-descriptions-item>
         <el-descriptions-item v-if="row.rejectReason"
                               label="椹冲洖鍘熷洜"
                               :span="2">
@@ -36,7 +36,7 @@
     <div class="detail-block">
       <div class="detail-block-title">濉姤鍐呭</div>
       <!-- 榛樿琛ㄥ崟灞曠ず -->
-      <FormPayloadFields v-if="!isSpecialApprovalType"
+      <FormPayloadFields v-if="!isSpecialApprovalType && row.businessType !== 19"
                          :fields="formResolved.fields"
                          :form-payload="formResolved.formPayload"
                          readonly />
@@ -69,6 +69,39 @@
             </el-table>
           </div>
         </div>
+      </template>
+
+      <!-- 鎶ュ伐瀹℃壒璇︽儏 -->
+      <template v-else-if="row.businessType === 19">
+        <div v-if="formResolved.fields.length || reportParamList.length" class="report-detail">
+          <el-divider content-position="left">鎶ュ伐濉姤鍐呭</el-divider>
+          <el-descriptions v-if="formResolved.fields.length" :column="2" border>
+            <el-descriptions-item
+              v-for="field in visibleFormFields"
+              :key="field.key"
+              :label="field.label || field.key"
+            >
+              {{ formatFieldDisplayValue(field, formResolved.formPayload?.[field.key]) }}
+            </el-descriptions-item>
+          </el-descriptions>
+          <div v-if="reportParamList.length" class="report-param-block">
+            <el-divider content-position="left">鎶ュ伐鍙傛暟</el-divider>
+            <el-table :data="reportParamList" border size="small" style="width: 100%">
+              <el-table-column label="鍙傛暟鍚嶇О" prop="paramName" min-width="180" show-overflow-tooltip />
+              <el-table-column label="鍙傛暟鍊�" prop="inputValue" min-width="180" show-overflow-tooltip>
+                <template #default="scope">
+                  {{ scope.row.inputValue || '鈥�' }}
+                </template>
+              </el-table-column>
+              <el-table-column label="鍗曚綅" prop="unit" min-width="100" show-overflow-tooltip>
+                <template #default="scope">
+                  {{ scope.row.unit || '鈥�' }}
+                </template>
+              </el-table-column>
+            </el-table>
+          </div>
+        </div>
+        <el-empty v-else description="鏆傛棤鎶ュ伐濉姤鍐呭" />
       </template>
       
       <!-- 閲囪喘瀹℃壒璇︽儏 -->
@@ -188,6 +221,7 @@
     approvalStatusLabel,
     approvalStatusTagType,
     resolveInstanceFormFields,
+    formatFieldDisplayValue,
   } from "../approveListConstants.js";
   import FormPayloadFields from "./FormPayloadFields.vue";
 
@@ -197,6 +231,15 @@
   });
 
   const formResolved = computed(() => resolveInstanceFormFields(props.row));
+  const visibleFormFields = computed(() =>
+    (formResolved.value.fields || []).filter(field => {
+      const key = String(field?.key || "").toLowerCase();
+      const label = String(field?.label || "").trim();
+      if (["approvalstatus", "auditstatus", "status", "workhours", "schedulingnum"].includes(key)) return false;
+      if (["瀹℃壒鐘舵��", "瀹℃牳鐘舵��", "宸ユ椂", "鎺掍骇鏁伴噺"].includes(label)) return false;
+      return true;
+    })
+  );
 
 
   // 鏄惁涓虹壒娈婂鎵圭被鍨嬶紙閲囪喘銆佸彂璐с�佹姤浠凤級
@@ -207,6 +250,25 @@
   // 璇︽儏鏁版嵁锛堢洿鎺ヤ娇鐢ㄤ紶鍏ョ殑 detail-data 鍙傛暟锛�
   const detailData = computed(() => {
     return props.detailData || {};
+  });
+
+  const reportParamList = computed(() => {
+    const payload = formResolved.value?.formPayload || {};
+    const sources = [
+      payload.productionOperationParamList,
+      payload.reportParamList,
+      payload.paramList,
+      props.row?.productionOperationParamList,
+      props.row?.reportParamList,
+      props.row?.paramList,
+    ];
+    const list = sources.find(item => Array.isArray(item) && item.length) || [];
+    return list.map((param, index) => ({
+      id: param?.id ?? index,
+      paramName: param?.paramName || param?.parameterName || param?.name || `鍙傛暟${index + 1}`,
+      inputValue: param?.inputValue ?? param?.value ?? param?.paramValue ?? '',
+      unit: param?.unit || '',
+    }));
   });
 
   const attachmentList = computed(() => {
@@ -246,6 +308,10 @@
     color: var(--el-color-danger);
   }
 
+  .report-param-block {
+    margin-top: 20px;
+  }
+
   .attachment-list {
     display: grid;
     grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
@@ -283,4 +349,4 @@
     align-items: center;
     flex-shrink: 0;
   }
-</style>
\ No newline at end of file
+</style>

--
Gitblit v1.9.3