From abff6cff9aa8ce10c59e28986ba5f3d38a4b34e6 Mon Sep 17 00:00:00 2001 From: buaixuexideshitongxue <2936013465@qq.com> Date: Tue, 30 Dec 2025 20:35:00 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B6=89=E8=AE=BF=E6=B6=89=E8=AF=89--=E6=9E=9A?= =?UTF-8?q?=E4=B8=BE=E8=A7=84=E8=8C=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/negative/verify-sfss.vue | 89 ++++++++++++++----------- src/views/data/ComplaintCollection.vue | 8 +-- 2 files changed, 51 insertions(+), 46 deletions(-) diff --git a/src/components/negative/verify-sfss.vue b/src/components/negative/verify-sfss.vue index 7ae0eb9..0708ee9 100644 --- a/src/components/negative/verify-sfss.vue +++ b/src/components/negative/verify-sfss.vue @@ -136,7 +136,7 @@ }" > - @@ -1571,35 +1571,37 @@ import {getConfinementListAll} from "@/api/work/confinement"; import {timeFormat} from "@/utils/util"; //获取数据 const catchSotre = useCatchStore(); -const baseDict = catchSotre.getDicts([ - "isRectify", - "personType", - "superviseMeasures", - "subjectiveAspect", - "responsibilityType", - "handleResult", - "departHandleResult", - "protectRights", - "accountabilityTarget", - "leadResponsibilityType", - "resolveSituation", - "resolveStatus", - "checkStatus", - "sfssSourceTable", - "sfssTags", - // 如果模板里用到 businessType,建议也补上 - "businessType", -]) - -const dict = computed(() => ({ - ...baseDict, - ...(props.extraDict || {}), -})) + const props = defineProps<{ extraDict?: Record }>() - +const dict = reactive>({}) +watchEffect(() => { + const base = catchSotre.getDicts([ + "isRectify", + "personType", + "superviseMeasures", + "subjectiveAspect", + "responsibilityType", + "handleResult", + "departHandleResult", + "protectRights", + "accountabilityTarget", + "leadResponsibilityType", + "resolveSituation", + "resolveStatus", + "checkStatus", + "sfssSourceTable", + "sfssTags", + "businessType", + // 你缺哪个就补哪个,比如 yesNo、handleMethodType + "yesNo", + "handleMethodType", + ]) || {} + // ✅ props 传入的字典覆盖/补充 base + Object.assign(dict, base, props.extraDict || {}) +}) const negative = inject("negative"); const form = ref({ @@ -1806,23 +1808,30 @@ watch( } ); -function handleChangeCheckStatus(val, item) { - form.value.checkStatusName = dict.checkStatus.filter( - (item) => item.dictValue === val - )[0].dictLabel; - if (val) { - if (val === '1') { - form.value.checkStatus = '1'; - } else if (val === '2' || val === '3') { - form.value.checkStatus = '2'; - } else if (val === '4' || val === '5') { - form.value.checkStatus = '3'; - } - } else { - form.value.checkStatus = ''; +function handleChangeCheckStatus(val) { + // 兜底 + if (!val) { + form.value.checkStatusCode = '' + form.value.checkStatus = '' + form.value.checkStatusName = '' + return + } + // 1️⃣ 设置中文名 + const hit = dict.checkStatus?.find( + (item) => String(item.dictValue) === String(val) + ) + form.value.checkStatusName = hit?.dictLabel || '' + // 2️⃣ 设置后端需要的 checkStatus(你原来的业务规则) + if (val === '1') { + form.value.checkStatus = '1' + } else if (val === '2' || val === '3') { + form.value.checkStatus = '2' + } else if (val === '4' || val === '5') { + form.value.checkStatus = '3' } } + function handleChangePolice(police, item) { item.blameName = police.name; item.blameIdCode = police.idCode; diff --git a/src/views/data/ComplaintCollection.vue b/src/views/data/ComplaintCollection.vue index 20a375f..af74ef4 100644 --- a/src/views/data/ComplaintCollection.vue +++ b/src/views/data/ComplaintCollection.vue @@ -632,7 +632,8 @@ const storeDict = computed(() => "specialSupervision", "checkStatus", "sfssSourceTable", - "sfssTags" + "sfssTags", + "accountabilityTarget" ]) || {} ); @@ -743,11 +744,6 @@ const localDict = { {id: 1, dictLabel: "是", dictValue: "1"}, {id: 2, dictLabel: "否", dictValue: "0"}, ], - tagList: [ - {id: 1, dictLabel: "紧急", dictValue: "URGENT"}, - {id: 2, dictLabel: "一般", dictValue: "NORMAL"}, - {id: 3, dictLabel: "重复投诉", dictValue: "REPEAT"}, - ], handleMethodType: [ {id: 1, dictLabel: "自办", dictValue: "0"}, {id: 2, dictLabel: "下发", dictValue: "1"},