From 199afc3ca3c4c5adcfab397c2a5249e8ed1de355 Mon Sep 17 00:00:00 2001 From: buaixuexideshitongxue <2936013465@qq.com> Date: Tue, 24 Mar 2026 18:25:52 +0800 Subject: [PATCH] =?UTF-8?q?fix--=E6=89=80=E6=9C=89=E8=BE=93=E5=85=A5?= =?UTF-8?q?=E6=A1=86=E5=8A=A0=E4=B8=8A=E6=8F=90=E7=A4=BA=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/warning/components/detail.vue | 279 +++++++++++++------ src/views/warning/edit.vue | 345 +++++++++++++++++++----- 2 files changed, 489 insertions(+), 135 deletions(-) diff --git a/src/views/warning/components/detail.vue b/src/views/warning/components/detail.vue index 20f90e1..8e5e3bd 100644 --- a/src/views/warning/components/detail.vue +++ b/src/views/warning/components/detail.vue @@ -303,6 +303,20 @@ const isDisabled = ref(true) const isAuditButton = ref(false) const datePicker = ref() const serviceTime = ref([]) + +const getTooltipContent = (value, placeholder = "") => { + if (Array.isArray(value)) { + return value.length ? value.join(" - ") : placeholder; + } + return value === null || value === undefined || value === "" ? placeholder : value; +}; + +const isTooltipDisabled = (value, placeholder = "") => { + if (Array.isArray(value)) { + return value.length === 0 && !placeholder; + } + return (value === null || value === undefined || value === "") && !placeholder; +}; //获取详情 const getDetailFun = async (val) => { @@ -644,7 +658,10 @@ watch(() => formData.value.project.auditUnitId, (val) => { - + @@ -669,7 +686,10 @@ watch(() => formData.value.project.auditUnitId, (val) => { - + @@ -677,17 +697,32 @@ watch(() => formData.value.project.auditUnitId, (val) => { - + + + - + + + - + + + @@ -702,27 +737,49 @@ watch(() => formData.value.project.auditUnitId, (val) => { - + +
+ +
+
- + + +
- + + + - + + + @@ -739,13 +796,20 @@ watch(() => formData.value.project.auditUnitId, (val) => { - + +
+ +
+
@@ -760,70 +824,116 @@ watch(() => formData.value.project.auditUnitId, (val) => { - + +
+ +
+
- + +
+ +
+
- + + + - + +
+ +
+
- + +
+ +
+
- + + + - + - + + +
@@ -831,40 +941,59 @@ watch(() => formData.value.project.auditUnitId, (val) => { - +
+ +
- + + + - + + + - + +
+ +
+
diff --git a/src/views/warning/edit.vue b/src/views/warning/edit.vue index f589686..2b04461 100644 --- a/src/views/warning/edit.vue +++ b/src/views/warning/edit.vue @@ -394,6 +394,20 @@ const ensureSupervisionTime = () => { } }; +const getTooltipContent = (value, placeholder = "") => { + if (Array.isArray(value)) { + return value.length ? value.join(" - ") : placeholder; + } + return value === null || value === undefined || value === "" ? placeholder : value; +}; + +const isTooltipDisabled = (value, placeholder = "") => { + if (Array.isArray(value)) { + return value.length === 0 && !placeholder; + } + return (value === null || value === undefined || value === "") && !placeholder; +}; +