From 5dccaa1ee711167b5ebbfb4c3a0cc462ec8f736a Mon Sep 17 00:00:00 2001 From: dj <1042039504@qq.com> Date: Sun, 20 Apr 2025 20:32:16 +0800 Subject: [PATCH] =?UTF-8?q?fix=20:=20=E6=A0=87=E7=AD=BE=E4=B8=8D=E5=8F=AF?= =?UTF-8?q?=E7=BC=96=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DetailComponent/ProjectAttachment.vue | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/components/DetailComponent/ProjectAttachment.vue b/src/components/DetailComponent/ProjectAttachment.vue index 2d77247..93a2512 100644 --- a/src/components/DetailComponent/ProjectAttachment.vue +++ b/src/components/DetailComponent/ProjectAttachment.vue @@ -32,7 +32,7 @@ - 编辑 @@ -75,6 +75,7 @@ const fileParam = ref({ }) const uploadState = ref(false) const tagNameShow = ref(false) +const isDefault = ref(false) const tagsOption = ref([]) const fileList = ref([]) const allFiles = ref([]) @@ -253,6 +254,12 @@ const getTagName = (name) => { return tagName } const handleTabClick = (item) => { + const defaultArray=tagsOption.value.filter(item1=>item1.tagId==item.props.name) + if(defaultArray&&defaultArray.length>0){ + isDefault.value=defaultArray[0].isDefault==1 + }else{ + isDefault.value=false + } tagNameShow.value = item.props.name == 'plus'; if (item.props.name == 'plus') { isEdit.value = false @@ -411,21 +418,25 @@ const getTagsOption = (flag) => { { tagId: 'd1', fileTag: '合同(专项任务书)', + isDefault: 1, isClose: 2 }, { tagId: 'd2', fileTag: '周报', + isDefault: 1, isClose: 2 }, { tagId: 'd3', fileTag: '阶段性验收', + isDefault: 1, isClose: 2 }, { tagId: 'd4', fileTag: '科研成果', + isDefault: 1, isClose: 2 } ]