From 2ba9c322ded96799321e021a0c4613079273592b Mon Sep 17 00:00:00 2001
From: 张含笑 <zhx18749296735@163.com>
Date: Wed, 28 Jan 2026 10:46:09 +0800
Subject: [PATCH] feat:调整参数
---
applications/task-work-order/src/views/orderView/orderDataManage/dataObjection/FormDiaLog.vue | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/applications/task-work-order/src/views/orderView/orderDataManage/dataObjection/FormDiaLog.vue b/applications/task-work-order/src/views/orderView/orderDataManage/dataObjection/FormDiaLog.vue
index c96e101..7e33905 100644
--- a/applications/task-work-order/src/views/orderView/orderDataManage/dataObjection/FormDiaLog.vue
+++ b/applications/task-work-order/src/views/orderView/orderDataManage/dataObjection/FormDiaLog.vue
@@ -235,6 +235,7 @@
import { pxToRem } from '@/utils/rem'
// 初始化表单数据
const initForm = () => ({
+ id:'',
title: '',
objectionType: '',
submitter: '',
@@ -315,9 +316,7 @@
// 文件移除
const handleFileRemove = (file, fileListVal) => {
- if (file.response && file.response.attachId) {
- uploadedFiles.value = uploadedFiles.value.filter(item => item.attachId !== file.response.attachId)
- }
+uploadedFiles.value = fileListVal
}
// 上传前验证
@@ -359,10 +358,16 @@
async function submitForm(objectionStatus) {
const isValid = await formRef.value?.validate().catch(() => false)
if (!isValid) return
+ if (uploadedFiles.value.length === 0) {
+ return ElMessage.warning('请上传附件')
+ }
submitting.value = true
+
try {
// 构建符合接口要求的提交数据
const submitData = {
+ // 编辑模式下传递id
+ ...(formData.value.id && { id: formData.value.id }),
title: formData.value.title,
objectionType: formData.value.objectionType,
submitter: formData.value.submitter,
@@ -482,7 +487,6 @@
.detail-container1 {
display: flex;
flex-direction: column;
-height: 100% !important;
}
.upload-container {
width: 100%;
--
Gitblit v1.9.3