From 7a91ec6de8512f3827d48b2881e5536d776cce7d Mon Sep 17 00:00:00 2001 From: zch Date: Mon, 21 Jul 2025 16:13:45 +0800 Subject: [PATCH] =?UTF-8?q?refactor(dms):=20=E4=BF=AE=E6=94=B9=E4=BA=BA?= =?UTF-8?q?=E5=91=98=E7=9B=B8=E5=85=B3=E5=AD=97=E6=AE=B5=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将"执行人员"改为"负责人员",涉及多个组件和页面 - 调整相关表单和表格列的标签 - 修改验证规则中的错误消息 --- .../dmsBillsInspectInstanceActivity/index.vue | 104 +++++++++--------- src/views/dms/dmsPlanInspect/copy.vue | 12 +- src/views/dms/dmsPlanInspect/index.vue | 4 +- src/views/dms/dmsPlanLube/index.vue | 30 ++--- src/views/dms/dmsRecordInspect/index.vue | 12 +- 5 files changed, 81 insertions(+), 81 deletions(-) diff --git a/src/views/dms/dmsBillsInspectInstanceActivity/index.vue b/src/views/dms/dmsBillsInspectInstanceActivity/index.vue index aabb025..0aa706c 100644 --- a/src/views/dms/dmsBillsInspectInstanceActivity/index.vue +++ b/src/views/dms/dmsBillsInspectInstanceActivity/index.vue @@ -4,30 +4,30 @@
- 暂存 - 提交 - {{ currentStepName }} - 流程进度 @@ -65,14 +65,14 @@

{{ currentStepTitle }}

- - + @@ -85,18 +85,18 @@ - - + + - + - @@ -105,11 +105,11 @@
- - +
@@ -167,7 +167,7 @@ const form = reactive>({ ...initFor const rules = reactive({ inspectRouteId: [{ required: true, message: "巡检线路不能为空", trigger: "blur" }], deviceAmount: [{ required: true, message: "设备总数不能为空", trigger: "blur" }], - performer: [{ required: true, message: "执行人员不能为空", trigger: "blur" }], + performer: [{ required: true, message: "负责人员不能为空", trigger: "blur" }], processHandleResolution: [{ required: false, message: "处理意见不能为空", trigger: "blur" }] }); @@ -204,19 +204,19 @@ const submitButtonShow = computed(() => { onMounted(async () => { routeParams.value = route.query; loading.value = true; - + try { // 获取工单信息 await loadWorkOrderInfo(); - + // 获取当前任务信息 if (routeParams.value.type === 'approval') { await loadCurrentTask(); } - + // 初始化表单数据 initializeFormData(); - + } catch (error) { console.error('初始化失败:', error); proxy?.$modal.msgError('加载数据失败'); @@ -232,10 +232,10 @@ const loadWorkOrderInfo = async () => { proxy?.$modal.msgError('缺少工单ID参数'); return; } - + const res = await getDmsBillsInspectInstance(businessId); workOrder.value = res.data; - + // 设置状态显示文本 if (inspect_status.value && workOrder.value.inspectStatus !== undefined) { const statusItem = inspect_status.value.find((item: any) => String(item.value) === String(workOrder.value.inspectStatus)); @@ -250,21 +250,21 @@ const loadCurrentTask = async () => { try { const businessId = routeParams.value.id; const taskId = routeParams.value.taskId; - + // 通过taskId或businessId获取当前任务 const taskRes = await pageByTaskWait({ pageNum: 1, pageSize: 10, flowCode: 'Inspect01' // 巡检流程代码 }); - - const tasks = taskRes.rows.filter(task => + + const tasks = taskRes.rows.filter(task => task.businessId === businessId || task.id === taskId ); - + if (tasks.length > 0) { currentTask.value = tasks[0]; - + // 动态设置处理意见校验规则 if (needProcessResolution.value) { rules.processHandleResolution = [ @@ -289,7 +289,7 @@ const initializeFormData = () => { // 新增:提交表单方法 const submitForm = async (status: string) => { if (!processFormRef.value) return; - + try { const valid = await processFormRef.value.validate(); if (valid) { @@ -305,7 +305,7 @@ const submitForm = async (status: string) => { processHandleResolution: form.processHandleResolution || '', handleTime: getCurrentDateTime() }); - + proxy?.$modal.msgSuccess('暂存成功'); goBack(); } else { @@ -320,7 +320,7 @@ const submitForm = async (status: string) => { processHandleResolution: form.processHandleResolution || '' } }; - + // 启动工作流或继续处理 if (routeParams.value.taskId) { submitVerifyRef.value?.openDialog(routeParams.value.taskId); @@ -342,7 +342,7 @@ const submitForm = async (status: string) => { // 审批处理 const approvalVerifyOpen = async () => { if (!processFormRef.value) return; - + try { const valid = await processFormRef.value.validate(); if (valid) { @@ -356,7 +356,7 @@ const approvalVerifyOpen = async () => { processHandleResolution: form.processHandleResolution || '' } }; - + // 直接使用传入的taskId进行审批 submitVerifyRef.value?.openDialog(routeParams.value.taskId); } @@ -382,9 +382,9 @@ const submitCallback = async () => { processHandleResolution: form.processHandleResolution || '', handleTime: getCurrentDateTime() }); - + proxy?.$modal.msgSuccess(`${currentStepName.value}完成`); - + // 关闭页面返回 goBack(); } catch (error) { diff --git a/src/views/dms/dmsPlanInspect/copy.vue b/src/views/dms/dmsPlanInspect/copy.vue index 1a85043..027640b 100644 --- a/src/views/dms/dmsPlanInspect/copy.vue +++ b/src/views/dms/dmsPlanInspect/copy.vue @@ -41,8 +41,8 @@ - - + + --> @@ -97,7 +97,7 @@ - + - +