From 6bf060fe129e8a0673fafa2c9040b59f87a3ef3c Mon Sep 17 00:00:00 2001 From: buaixuexideshitongxue <2936013465@qq.com> Date: Tue, 31 Mar 2026 10:34:59 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E9=A1=B5=E9=9D=A2ui?= =?UTF-8?q?=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/data/complaintformdialog.vue | 195 ++++++++++++++++---- src/views/data/ComplaintCollection.vue | 44 ++++- 2 files changed, 199 insertions(+), 40 deletions(-) diff --git a/src/components/data/complaintformdialog.vue b/src/components/data/complaintformdialog.vue index fbf48ad..072099a 100644 --- a/src/components/data/complaintformdialog.vue +++ b/src/components/data/complaintformdialog.vue @@ -2,8 +2,8 @@ @@ -15,8 +15,11 @@ style="min-height: 66vh" :rules="rules" > - - + +

投诉信息

+
+ + +
+ + + +

办理单位

+
+ + + + +
+

如主办层级 为 市局主办, 则由督察支队办理;

+

如主办层级为 二级机构主办,则由督察部门办理,可进一步下发;

+

如主办层级为 三级机构主办,则由所队办理。

+
+
+ +
+
+ + +
+ 关联问题涉及单位 +
+
+

问题涉及单位 指与该问题相关的单位;

+

指定办理单位 指将问题分派给哪个单位办理。

+
+
+
+ + +

办理时限

+
+ + + +
+ + +

审批流程

+
+ + + {{ item.dictLabel }}{{ item.remark ? `(${item.remark})` : "" }} + + + 二级审批(所队一>二级机构) + +
+

三级审核 问题提交办结时,需经过"所队—>二级机构—>市局"三级审核,通过后方可办结;

+

二级审核 问题提交办结时,仅需经过"所队—>二级机构"两级审核,通过后即可办结;

+
+
+
@@ -292,11 +352,21 @@ import dayjs from "dayjs"; import feedback from "@/utils/feedback.ts"; import Complaint_detail from "@/components/data/complaint_detail.vue"; import DuplicateDrawerWithDetail from "@/views/data/DuplicateDrawerWithDetail.vue"; +import useUserStore from "@/stores/modules/user.ts"; +import {secondList, listByFirstHost} from "@/api/system/depart"; + +const HostLevel = { + FIRST: '1', + SECOND: '2', + THREE: '3' +}; + +const userStore = useUserStore(); const props = defineProps({ - modelValue: Boolean, // 控制弹窗显示 - mode: { type: String, default: "add" }, // add | edit - model: { type: Object, required: true }, // addForm / updateForm + modelValue: Boolean, + mode: { type: String, default: "add" }, + model: { type: Object, required: true }, dict: { type: Object, required: true }, rules: { type: Object, required: true }, }); @@ -309,11 +379,11 @@ 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 @@ -326,12 +396,61 @@ watch( duplicateCount.value = 0 duplicateCache.value = [] duplicateList.value = [] + + getDeparts() } } -) +); + +watch( + () => props.model.hostLevel, + () => { + getDeparts(); + } +); +const departs = ref([]); +const departLoading = ref(false); +async function getDeparts() { + if (!props.model.hostLevel) return; + departLoading.value = true; + try { + if (props.model.hostLevel === HostLevel.FIRST) { + departs.value = await listByFirstHost(); + } else if (props.model.hostLevel === HostLevel.SECOND) { + departs.value = await secondList(); + } else { + departs.value = []; + } + } catch (e) { + console.error(e); + } finally { + departLoading.value = false; + } +} + +function handleSelectDepart(row) { + props.model.departName = row.shortName; +} + +function handleLinkDepart() { + if (props.model.hostLevel === HostLevel.SECOND) { + feedback.msgWarning("当前选择二级机构主办,指定办理单位请选择二级机构!"); + return; + } + props.model.departId = props.model.secondDepartId; + props.model.departName = props.model.secondDepartName; +} + +function handleChangeHostLevel(val) { + if (val === HostLevel.FIRST) { + props.model.departId = ""; + } + if (val === HostLevel.SECOND) { + props.model.approvalFlow = "3"; + } +} -// 级联选择 -> 拆字段(和你现在 addForm 的 watch 一样) watch( () => props.model.sourcePath, (path) => { @@ -353,7 +472,6 @@ function fillFiledName() { async function onSubmit() { fillFiledName(); - // await formRef.value.validate(); emit("submit"); } @@ -365,9 +483,8 @@ const onCheckDuplicate = async () => { duplicateDrawerVisible.value = true } -// region 自动查重相关 -const duplicateCount = ref(0) // 只存数量 -const duplicateCache = ref([]) // 缓存完整列表 +const duplicateCount = ref(0) +const duplicateCache = ref([]) const autoDuplicateLoading = ref(false) const duplicateHintVisible = ref(false) @@ -400,19 +517,14 @@ const onAutoCheckDuplicate = async () => { duplicateCount.value = list.length duplicateCache.value = list } catch (e) { - // 静默失败(也可以在这里把提示变成“查重失败”) } finally { autoDuplicateLoading.value = false } } - - -// endregion - - diff --git a/src/views/data/ComplaintCollection.vue b/src/views/data/ComplaintCollection.vue index 7d7058c..29d24d3 100644 --- a/src/views/data/ComplaintCollection.vue +++ b/src/views/data/ComplaintCollection.vue @@ -529,6 +529,17 @@ const createEmptyAddForm = () => ({ tags: [], handleMethod: '', thingFiles: [], + // 办理单位相关字段 + hostLevel: '3', + departId: '', + departName: '', + // 办理时限相关字段 + timeLimit: '', + maxSignDuration: null, + maxHandleDuration: null, + maxExtensionDuration: null, + // 审批流程 + approvalFlow: '', }); const addShow = ref(false); const addForm = ref(createEmptyAddForm()); @@ -562,18 +573,15 @@ const addRules = { sourcePath: [ {required: true, message: "请选择来源(一级/二级)", trigger: "change"}, ], - // originId: [{required: true, message: '请输入编号', trigger: 'blur'}], discoveryTime: [{required: true, message: '请选择受理时间', trigger: 'change'}], - // responderName: [{required: true, message: '请输入来件人姓名', trigger: 'blur'}], - // responderIdCode: [{required: true, message: '请输入身份证号码', trigger: 'blur'}], - // responderPhone: [{required: true, message: '请输入联系电话', trigger: 'blur'}], secondDepartId: [{required: true, message: '请选择被投诉二级机构', trigger: 'change'}], thingDesc: [{required: true, message: '请输入来件内容', trigger: 'blur'}], involveProblemIdList: [{required: true, message: '请选择涉嫌问题', trigger: 'change'}], repeatt: [{required: true, message: '请选择是否重复件', trigger: 'change'}], - // leadApproval: [{required: true, message: '请选择是否领导批示', trigger: 'change'}], - // tags: [{required: true, message: '请选择标签', trigger: 'change'}], - // handleMethod: [{required: true, message: '请选择办理方式', trigger: 'change'}], + hostLevel: [{required: true, message: '请选择主办层级', trigger: 'change'}], + departId: [{required: true, message: '请选择办理单位', trigger: 'change'}], + timeLimit: [{required: true, message: '请选择办理时限', trigger: 'change'}], + approvalFlow: [{required: true, message: '请选择审批流程', trigger: 'change'}], } watch( () => addForm.value.sourcePath, @@ -609,6 +617,17 @@ const updateForm = ref({ involveProblemIdList: [], tags: [], thingFiles: [], + // 办理单位相关字段 + hostLevel: '3', + departId: '', + departName: '', + // 办理时限相关字段 + timeLimit: '', + maxSignDuration: null, + maxHandleDuration: null, + maxExtensionDuration: null, + // 审批流程 + approvalFlow: '', }) function normalizeThingFiles(val) { @@ -670,6 +689,17 @@ const handleUpdate = async (row) => { percent: 100, uid: f.uid || `${f.filePath}-${Math.random()}`, })), + // 办理单位相关字段 + hostLevel: r.hostLevel ?? '3', + departId: r.departId ?? '', + departName: r.departName ?? '', + // 办理时限相关字段 + timeLimit: r.timeLimit ?? '', + maxSignDuration: r.maxSignDuration ?? null, + maxHandleDuration: r.maxHandleDuration ?? null, + maxExtensionDuration: r.maxExtensionDuration ?? null, + // 审批流程 + approvalFlow: r.approvalFlow ?? '', }; updateShow.value = true }