fix : 标签不可编辑

This commit is contained in:
dj
2025-04-20 20:32:16 +08:00
parent 8aefca0c82
commit 5dccaa1ee7

View File

@@ -32,7 +32,7 @@
<!-- <el-button color="#DED0B2" @click="handleUpload">上传附件</el-button>-->
<file-upload v-if="!isLineBtn&&uploadState&&activeName!='plus'&&activeName!='all'" @getFile="getFile"/>
<el-button color="#DED0B2" @click="handleEditTag" v-if="activeName!='all'&&activeName!='plus'&&uploadState"
<el-button color="#DED0B2" @click="handleEditTag" v-if="activeName!='all'&&activeName!='plus'&&uploadState&&!isDefault"
style="margin-left: 10px;">编辑
</el-button>
</div>
@@ -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
}
]