From d8ebc63e3b4d7a4c2d9439c759605d8477bc61c7 Mon Sep 17 00:00:00 2001 From: buaixuexideshitongxue <2936013465@qq.com> Date: Tue, 30 Dec 2025 15:47:09 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B6=89=E8=AE=BF=E6=B6=89=E8=AF=89--=E5=8A=9E?= =?UTF-8?q?=E7=90=86=E5=88=9D=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/data/complaintCollection.ts | 15 + src/components/data/complaint_detail.vue | 394 ++++ src/components/data/complaintformdialog.vue | 129 +- src/components/negative/verify-sfss.vue | 2011 +++++++++++++++++++ src/components/police-select.vue | 15 +- src/views/data/ComplaintCollection.vue | 150 +- 6 files changed, 2658 insertions(+), 56 deletions(-) create mode 100644 src/components/data/complaint_detail.vue create mode 100644 src/components/negative/verify-sfss.vue diff --git a/src/api/data/complaintCollection.ts b/src/api/data/complaintCollection.ts index e65b9f5..a3197fa 100644 --- a/src/api/data/complaintCollection.ts +++ b/src/api/data/complaintCollection.ts @@ -28,4 +28,19 @@ export function updateComplaintCollection(body) { url: `/data/complaintCollection/updateComplaintCollection`, body }); +} + +export function addComplaintCollectionBlame(body) { + return request.post({ + url: `/data/complaintCollection/addComplaintCollectionBlame`, + body + }); +} + + +export function watchDetail(body) { + return request.post({ + url: `/data/complaintCollection/watchDetail`, + body + }); } \ No newline at end of file diff --git a/src/components/data/complaint_detail.vue b/src/components/data/complaint_detail.vue new file mode 100644 index 0000000..d421172 --- /dev/null +++ b/src/components/data/complaint_detail.vue @@ -0,0 +1,394 @@ + + + + + diff --git a/src/components/data/complaintformdialog.vue b/src/components/data/complaintformdialog.vue index b69a42a..f02289b 100644 --- a/src/components/data/complaintformdialog.vue +++ b/src/components/data/complaintformdialog.vue @@ -10,7 +10,8 @@ @@ -21,15 +22,34 @@ + + + + + + + + + @@ -38,9 +58,18 @@ + > + + @@ -62,14 +91,41 @@ - + + + - + + + + @@ -77,12 +133,25 @@ - + + + - + @@ -188,6 +259,19 @@ const visibleProxy = computed({ get: () => props.modelValue, set: (v) => emit("update:modelValue", v), }); +watch( + () => visibleProxy.value, + (v) => { + if (v) { + // 打开弹窗时,统一重置所有 “无” 勾选状态 + props.model.originIdSkip = false + props.model.responderNameSkip = false + props.model.responderIdCodeSkip = false + props.model.responderPhoneSkip = false + } + } +) + // 级联选择 -> 拆字段(和你现在 addForm 的 watch 一样) watch( @@ -200,8 +284,29 @@ watch( { deep: true } ); + +function fillFiledName() { + const code = props.model.businessTypeCode; + const hit = props.dict.businessType?.find( + (d) => String(d.dictValue) === String(code) + ); + props.model.businessTypeName = hit?.dictLabel || ""; +} + async function onSubmit() { + fillFiledName(); await formRef.value.validate(); emit("submit"); } + + diff --git a/src/components/negative/verify-sfss.vue b/src/components/negative/verify-sfss.vue new file mode 100644 index 0000000..ef7e087 --- /dev/null +++ b/src/components/negative/verify-sfss.vue @@ -0,0 +1,2011 @@ + + + + \ No newline at end of file diff --git a/src/components/police-select.vue b/src/components/police-select.vue index 1b35755..f2082d9 100644 --- a/src/components/police-select.vue +++ b/src/components/police-select.vue @@ -62,9 +62,18 @@ getPolices(); watch(value, (val) => { emit("update:modelValue", val); }); -watch(departId, () => { - getPolices(); -}); +// watch(departId, () => { +// getPolices(); +// }); +watch( + () => props.departId, + (val) => { + departId.value = val; + getPolices(); // 重新拉人 + }, + { immediate: true } +); + async function getPolices() { if (departId.value) { diff --git a/src/views/data/ComplaintCollection.vue b/src/views/data/ComplaintCollection.vue index e062a4b..37e4ffe 100644 --- a/src/views/data/ComplaintCollection.vue +++ b/src/views/data/ComplaintCollection.vue @@ -47,7 +47,7 @@ - + - + @@ -262,7 +262,7 @@ {{ getDictLabel(dict.yesNo, row.repeatt) }} - + @@ -277,12 +277,17 @@ {{ getDictLabel(dict.handleMethodType, row.handleMethod) }} - + + + + @@ -328,7 +333,7 @@ @submit="submitUpdate" /> - + - +
+ +
+
+ + + + + + + + + @@ -352,11 +375,12 @@ import {timeFormat} from "@/utils/util"; import feedback from "@/utils/feedback"; import useCatchStore from "@/stores/modules/catch"; import { - addComplaintCollection, + addComplaintCollection, addComplaintCollectionBlame, delComplaintCollection, getComplaintCollectionPage, updateComplaintCollection } from "@/api/data/complaintCollection.ts"; +import Complaint_detail from "@/components/data/complaint_detail.vue"; const route = useRoute() const catchStore = useCatchStore(); @@ -465,7 +489,7 @@ const addRules = { repeatt: [{required: true, message: '请选择是否重复件', trigger: 'change'}], // leadApproval: [{required: true, message: '请选择是否领导批示', trigger: 'change'}], // tags: [{required: true, message: '请选择标签', trigger: 'change'}], - handleMethod: [{required: true, message: '请选择办理方式', trigger: 'change'}], + // handleMethod: [{required: true, message: '请选择办理方式', trigger: 'change'}], } watch( () => addForm.value.sourcePath, @@ -528,6 +552,8 @@ const handleUpdate = async (row) => { // 多选字段 involveProblemIdList: splitToArray(r.involveProblemIdList ?? r.involveProblem), tags: splitToArray(r.tags ?? r.tag), + businessTypeName: r.businessTypeName ?? '', + businessTypeCode: r.businessTypeCode ?? '', }; updateShow.value = true } @@ -542,6 +568,7 @@ const submitUpdate = async () => { getList() } } + function splitToArray(val) { if (!val) return [] if (Array.isArray(val)) return val @@ -598,30 +625,34 @@ const localDict = { { id: 1, label: "局长信箱", - value: "data_mailbox", + value: "23", children: [ { label: "局长信箱", - value: "data_mailbox_jz", + value: "23_jz", }, { label: "厅长信箱", - value: "data_mailbox_tz", + value: "23_tz", }, ], }, { id: 2, label: "公安部信访", - value: "data_petition_complaint_21", + value: "22", children: [ { - label: "公安部信访子1", - value: "data_petition_complaint_21_1", + label: "公安部信访件", + value: "22_1", + }, + { + label: "省厅信访件", + value: "22_2", }, { - label: "公安部信访子2", - value: "data_petition_complaint_21_2", + label: "市局信访件", + value: "22_3", }, ], @@ -629,30 +660,38 @@ const localDict = { { id: 3, label: "国家信访", - value: "data_petition_complaint_22", + value: "21", children: [ { - label: "国家信访子1", - value: "data_petition_complaint_22_1", + label: "国家信访件", + value: "21_1", + }, + { + label: "省信访件", + value: "21_2", }, { - label: "国家信访子2", - value: "data_petition_complaint_22_2", + label: "市信访件", + value: "21_3", }, ], }, { id: 4, label: "12389投诉", - value: "data_case_verif", + value: "17", children: [ { - label: "12389投诉子1", - value: "data_case_verif1", + label: "公安部件", + value: "17_1", }, { - label: "12389投诉子2", - value: "data_case_verif2", + label: "省厅件", + value: "17_2", + }, + { + label: "市局件", + value: "17_3", }, ], }, @@ -662,12 +701,16 @@ const localDict = { value: "leader_explain", children: [ { - label: "领导交办子1", - value: "leader_explain1", + label: "市局领导交办", + value: "18", + }, + { + label: "支队领导交办", + value: "19", }, { - label: "领导交办子2", - value: "leader_explain2", + label: "上级领导交办", + value: "20", }, ], }, @@ -712,6 +755,9 @@ function getDictLabel(list, value) { // endregion // region 办理相关 +const negativeVerifySfssDailog = ref(false) +const submitLoading = ref(false) +const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms)); // 点击办理 const handleAction = async (row) => { negativeSfss.value.currentRow = JSON.parse(JSON.stringify(row)) @@ -721,25 +767,30 @@ const handleAction = async (row) => { const negativeVerifySfssRef = ref(); // 办理提交 const handleSubmit = async () => { + if (submitLoading.value) return + submitLoading.value = true + await nextTick(); try { - // ✅ 1. 调子组件校验 + 获取完整表单数据 // const formData = await negativeVerifySfssRef.value.validate(); const formData = negativeVerifySfssRef.value.getData() console.log(formData) - // ✅ 2. 调后台接口提交 - // await submitApi(formData); + await sleep(3000); + let res = await addComplaintCollectionBlame(formData); feedback.msgSuccess("提交成功"); - // dialogVisible.value = false; + negativeVerifySfssDailog.value = false; + getList(); } catch (err) { - // validate() 里你自己 throw new Error(...) 的会走到这里 feedback.notifyError("提交失败") + } finally { + submitLoading.value = false } } -const negativeVerifySfssDailog = ref(false) + + const negativeSfss = ref({ currentRow: {}, - problemSourcesCode: ProblemSources.GJXFPT, + // problemSourcesCode: ProblemSources.GJXFPT, // 涉及人员 blames: [], // 涉及领导 @@ -750,6 +801,16 @@ const negativeSfss = ref({ provide('negative', negativeSfss) // endregion + +// region 查看详情相关 +const detailShow = ref(false) +const activeId = ref("") +const handleWatchDetail = async (row) => { + activeId.value = row.id + detailShow.value = true +} +// endregion + @@ -787,4 +848,11 @@ p { margin-right: 0; } +.dialog-footer { + display: flex; + justify-content: flex-end; /* 右下角 */ + padding: 0 24px 16px; /* 👈 关键:不贴边 */ +} + + \ No newline at end of file