From 0300d7d8ce3d8ddd9fdb9f799928273bde0d179d Mon Sep 17 00:00:00 2001
From: buaixuexideshitongxue <2936013465@qq.com>
Date: Fri, 30 Jan 2026 16:03:08 +0800
Subject: [PATCH] =?UTF-8?q?fix--=E9=97=AE=E9=A2=98=E9=80=80=E5=9B=9E?=
=?UTF-8?q?=E5=90=8E=E9=87=8D=E6=96=B0=E4=B8=8B=E5=8F=91=E4=B8=8D=E8=83=BD?=
=?UTF-8?q?=E9=80=89=E6=8B=A9=E6=96=B0=E7=9A=84=E9=83=A8=E9=97=A8=E6=B6=89?=
=?UTF-8?q?=E5=8F=8A=E4=BA=BA=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/negative/distribute.vue | 90 +++++++++++++++++++++-----
1 file changed, 73 insertions(+), 17 deletions(-)
diff --git a/src/components/negative/distribute.vue b/src/components/negative/distribute.vue
index d26182e..a10af9e 100644
--- a/src/components/negative/distribute.vue
+++ b/src/components/negative/distribute.vue
@@ -22,22 +22,53 @@
+
+
+
+
+
+
+
请根据问题信息的内容,再次确认涉及单位是否正确
+
+
+
+
-
-
-
-
请根据问题信息的内容,再次确认涉及单位是否正确
-
-
+
+
+ (form.involveDepartName =
+ row.shortName)
+ "
+ />
+ 关联问题办理单位
+
+
@@ -67,6 +98,7 @@ import useCatchStore from "@/stores/modules/catch";
import { secondList, listChildren, departTree, listByFirstHost } from "@/api/system/depart";
import { FlowNodeEnum } from "@/enums/flowEnums";
import { HostLevel } from "@/enums/dictEnums";
+import feedback from "@/utils/feedback";
const dict = useCatchStore().getDicts([
"hostLevel",
@@ -152,9 +184,22 @@ const rules = {
};
function handleSelectDepart(val: string) {
- form.value.departName = departs.value.filter(
- (item) => item.id === val
- )[0].shortName;
+ // form.value.departName = departs.value.filter(
+ // (item) => item.id === val
+ // )[0].shortName;
+ const node = findDepartById(departs.value, val)
+ form.value.departName = node?.shortName ?? ''
+}
+
+function findDepartById(list: any[], id: string): any | null {
+ for (const item of list) {
+ if (String(item.id) === String(id)) return item
+ if (item.children?.length) {
+ const found = findDepartById(item.children, id)
+ if (found) return found
+ }
+ }
+ return null
}
async function validate() {
@@ -164,6 +209,17 @@ async function validate() {
}
}
+function handleLinkDepart() {
+ if (!form.value.departId) {
+ feedback.msgWarning(
+ "请先选择办理单位!"
+ );
+ return;
+ }
+ form.value.involveDepartId = form.value.departId;
+ form.value.involveDepartName = form.value.departName;
+}
+
defineExpose({
validate,
});