@@ -30,7 +30,7 @@
-
+
编辑
@@ -204,6 +204,14 @@ const changeTag = async () => {
tagNameShow.value = false;
}
const tabRemove = async (val) => {
+ if(otherAttachmentList.value&&otherAttachmentList.value.length>0){
+ ElNotification({
+ title: '提示',
+ message: '该标签下存在文件,不能删除标签。如需删除标签,请先删除该标签下的所有文件。',
+ type: 'error'
+ })
+ return;
+ }
ElMessageBox.confirm(`确认删除名称为${getTagName(val)}的标签吗?`, '系统提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
@@ -222,8 +230,16 @@ const tabRemove = async (val) => {
})
}
const handleEditTag = () => {
- tagNameShow.value = true
fileParam.value.tagName = getTagName(activeName.value)
+ if(otherAttachmentList.value&&otherAttachmentList.value.length>0){
+ ElNotification({
+ title: '提示',
+ message: '该标签下存在文件,不能编辑标签。如需编辑标签,请先删除该标签下的所有文件。',
+ type: 'error'
+ })
+ return;
+ }
+ tagNameShow.value = true
isEdit.value = true
}
const getTagName = (name) => {
@@ -381,10 +397,10 @@ const getTagsOption = (flag) => {
list=otherAttachmentList.value
}
tagsOption.value.forEach((tag, index) => {
- const filterArray = list.filter(item => tag.fileTag == item.tag)
- console.log("🚀 ~ file:filterArray ", filterArray)
-
- tagsOption.value[index].isClose = filterArray.length > 0 ? 0 : 1
+ // const filterArray = list.filter(item => tag.fileTag == item.tag)
+ // console.log("🚀 ~ file:filterArray ", filterArray)
+ tagsOption.value[index].isClose =1
+ // tagsOption.value[index].isClose = filterArray.length > 0 ? 0 : 1
})
console.log("🚀 otherAttachmentList.value", allFiles.value)
console.log("🚀 ~ file:\tagsOption.value ", tagsOption.value)