From 9278cad97f96a9e1eb634c45b90dc14511d24a2c Mon Sep 17 00:00:00 2001
From: liding <756868258@qq.com>
Date: 星期二, 03 十一月 2026 17:47:31 +0800
Subject: [PATCH] refactor(inspection): 统一检验值批注识别与格式化逻辑
---
src/views/business/inspectionView/index.vue | 18 ++++++++++--------
1 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/src/views/business/inspectionView/index.vue b/src/views/business/inspectionView/index.vue
index 342e7e1..6b8caf7 100644
--- a/src/views/business/inspectionView/index.vue
+++ b/src/views/business/inspectionView/index.vue
@@ -250,14 +250,14 @@
</template>
<template v-else-if="
n.v.ps != undefined &&
- n.v.ps.value === '璁$畻鍊�' &&
+ isInspectionValueAnnotation(n.v.ps.value, '璁$畻鍊�') &&
state == 1
"><span :style="`font-family:${n.v.ff} !important;`">{{
n.v.v
}}</span></template>
<template v-else-if="
n.v.ps != undefined &&
- n.v.ps.value === '鏈�缁堝��' &&
+ isInspectionValueAnnotation(n.v.ps.value, '鏈�缁堝��') &&
state == 1
">
<span :style="`font-family:${n.v.ff} !important;`">{{
@@ -489,6 +489,7 @@
</template>
<script>
+import { parseInspectionValueAnnotation, formatInspectionValue, isInspectionValueAnnotation } from "@/utils/inspectionValueFormat";
// Vue3 娌℃湁 this.$createElement锛堜笅闈㈢敤 h 閫� VNode 褰� $msgbox 鐨� message锛�
import { h } from 'vue'
import { readDetectionTimeRange, isCompleteDetectionTimeRange, toDetectionTimePayload } from '@/utils/detectionTimeRange'
@@ -846,6 +847,7 @@
this.stopWorker();
},
methods: {
+ isInspectionValueAnnotation,
syncRouteContext() {
const { sonLaboratory, orderId, state, inspectorList, typeSource } = this.$route.query;
const orderChanged = this.id !== orderId;
@@ -1779,8 +1781,8 @@
b.v.ps != undefined &&
typeof b.v.ps.value === "string" &&
(b.v.ps.value.includes("妫�楠屽��") ||
- b.v.ps.value === "璁$畻鍊�" ||
- b.v.ps.value === "鏈�缁堝��" ||
+ isInspectionValueAnnotation(b.v.ps.value, "璁$畻鍊�") ||
+ isInspectionValueAnnotation(b.v.ps.value, "鏈�缁堝��") ||
b.v.ps.value === "璁惧鍚嶇О")
) {
b.v["v"] = "";
@@ -1845,12 +1847,12 @@
if (value === undefined || value === null) {
return;
}
- cell.v.v = value;
+ cell.v.v = formatInspectionValue(value, parseInspectionValueAnnotation(cell.v.ps && cell.v.ps.value));
if (typeof item === "object" && item.u) {
cell.u = item.u;
}
this.param[a.templateId][key] = {
- v: value,
+ v: cell.v.v,
u: typeof item === "object" ? item.u : cell.u,
};
});
@@ -2233,8 +2235,8 @@
cell.v.ps != undefined &&
typeof cell.v.ps.value === "string" &&
(cell.v.ps.value.includes("妫�楠屽��") ||
- cell.v.ps.value === "璁$畻鍊�" ||
- cell.v.ps.value === "鏈�缁堝��" ||
+ isInspectionValueAnnotation(cell.v.ps.value, "璁$畻鍊�") ||
+ isInspectionValueAnnotation(cell.v.ps.value, "鏈�缁堝��") ||
cell.v.ps.value === "璁惧鍚嶇О");
const isExportResult = resultHeader && exportRows.has(cell.r) && cell.c === resultHeader.c;
if (!isEditable && !isExportResult) {
--
Gitblit v1.9.3