From 4c390d209b45d516fbe2f7552d26048687c83972 Mon Sep 17 00:00:00 2001
From: chenyao <1219716595@qq.com>
Date: Wed, 05 Aug 2026 14:29:25 +0800
Subject: [PATCH] feat:tab切换太快的时候内容不对应
---
applications/task-work-order/src/views/orderView/orderDataManage/dataObjection/FormDiaLog.vue | 33 +++++++++++++++++++++++----------
1 files changed, 23 insertions(+), 10 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 0ef053d..b8998d6 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
@@ -88,7 +88,7 @@
:model="formData"
:rules="rules"
:disabled="dialogReadonly"
- label-width="180px"
+ :label-width="pxToRem(144)"
>
<el-row>
<el-col :span="12">
@@ -163,7 +163,7 @@
class="upload-demo"
>
<template #trigger>
- <el-button type="primary">选择文件</el-button>
+ <el-button class="gd-upload-btn" type="primary">选择文件</el-button>
</template>
<template #tip>
<div class="el-upload__tip">支持上传 (.zip/.rar/.7z/.tar/.gz)格式</div>
@@ -270,6 +270,7 @@
import { putFileAttachApi } from '@/views/orderView/orderDataManage/supplyAdd/supplyAddApi'
import { pxToRem } from '@/utils/rem'
import { useStore } from 'vuex'
+
const store = useStore()
const permission = computed(() => store.state.user.permission);
// const requesterProvider = computed(() => store.state.user.userInfo?.role_id === '2014158512610869250')
@@ -331,13 +332,13 @@
// 表单校验规则
const rules = {
- title: fieldRules(true),
+ title: fieldRules(true,50),
objectionType: fieldRules(true),
- submitter: fieldRules(true),
- submitterContact: fieldRules(true),
- catalogResourceName: fieldRules(true),
- objectionDesc: fieldRules(true),
- objectionBasis: fieldRules(true),
+ submitter: fieldRules(true,50),
+ submitterContact: fieldRules(true,50),
+ catalogResourceName: fieldRules(true,50),
+ objectionDesc: fieldRules(true,200),
+ objectionBasis: fieldRules(true,200),
attachId: fieldRules(true)
}
@@ -447,7 +448,7 @@
objectionDesc: formData.value.objectionDesc,
objectionBasis: formData.value.objectionBasis,
areaCode: formData.value.areaCode || '',
- handleUnit: formData.value.handleUnit || '',
+ handleUnit: applyFormData.value.applyTargetDeptId || formData.value.handleUnit || '',
// 构建附件列表 - 使用当前已上传的文件(包括回显的)
...(uploadedFiles.value.length > 0 && {
attachmentList: uploadedFiles.value.map(file => ({
@@ -486,6 +487,17 @@
showApplyDialog.value = true
}
+// 根据部门 id 在部门树里递归查找对应的中文名称(title)
+function findDeptTitleById(tree, id) {
+ if (!Array.isArray(tree) || id === '' || id == null) return ''
+ for (const node of tree) {
+ if (node.id === id) return node[treeProps.label]
+ const found = findDeptTitleById(node[treeProps.children], id)
+ if (found) return found
+ }
+ return ''
+}
+
// 申请提交
async function handleApplySubmit() {
const isValid = await applyFormRef.value?.validate().catch(() => false)
@@ -511,7 +523,8 @@
objectionDesc: applyData.objectionDesc,
objectionBasis: applyData.objectionBasis,
areaCode: applyData.areaCode || '',
- handleUnit: applyData.handleUnit || '',
+ // 处理单位存部门中文名称,而不是 id
+ handleUnit: findDeptTitleById(deptTree.value, applyFormData.value.applyTargetDeptId) || applyData.handleUnit || '',
// 构建附件列表 - 使用当前已上传的文件(包括回显的)
...(uploadedFiles.value.length > 0 && {
attachmentList: uploadedFiles.value.map(file => ({
--
Gitblit v1.9.3