|
@@ -76,8 +76,9 @@
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
<div style="display: flex; align-items: center; gap: 5px;">
|
|
<div style="display: flex; align-items: center; gap: 5px;">
|
|
<Icon v-if="scope.row.fileType==='content'" icon="fa:folder-open" color="orange"/>
|
|
<Icon v-if="scope.row.fileType==='content'" icon="fa:folder-open" color="orange"/>
|
|
|
|
+ <Icon v-else-if="scope.row.fileType==='device'" icon="fa:folder-open" color="blue"/>
|
|
<Icon v-else-if="scope.row.fileType==='pic'||scope.row.fileClassify==='jpg'||scope.row.fileClassify==='png'" icon="ep:picture-filled" color="#2183D1"/>
|
|
<Icon v-else-if="scope.row.fileType==='pic'||scope.row.fileClassify==='jpg'||scope.row.fileClassify==='png'" icon="ep:picture-filled" color="#2183D1"/>
|
|
- <Icon v-else-if="scope.row.fileType==='file'&&scope.row.fileClassify==='pdf'" icon="fa-solid:file-pdf" color="#E20012"/>
|
|
|
|
|
|
+ <Icon v-else-if="scope.row.fileType==='file'&&(scope.row.fileClassify==='pdf'||scope.row.fileClassify==='PDF')" icon="fa-solid:file-pdf" color="#E20012"/>
|
|
<Icon v-else-if="scope.row.fileType==='file'&&(scope.row.fileClassify==='doc'||scope.row.fileClassify==='docx')" icon="fa:file-word-o" color="blue"/>
|
|
<Icon v-else-if="scope.row.fileType==='file'&&(scope.row.fileClassify==='doc'||scope.row.fileClassify==='docx')" icon="fa:file-word-o" color="blue"/>
|
|
<Icon v-else-if="scope.row.fileType==='file'&&(scope.row.fileClassify==='xls'||scope.row.fileClassify==='xlsx')" icon="fa-solid:file-excel" color="#107C41"/>
|
|
<Icon v-else-if="scope.row.fileType==='file'&&(scope.row.fileClassify==='xls'||scope.row.fileClassify==='xlsx')" icon="fa-solid:file-excel" color="#107C41"/>
|
|
<Icon v-else-if="scope.row.fileType==='file'&&(scope.row.fileClassify==='txt')" icon="fa:file-text-o" />
|
|
<Icon v-else-if="scope.row.fileType==='file'&&(scope.row.fileClassify==='txt')" icon="fa:file-text-o" />
|
|
@@ -236,6 +237,7 @@ const formData = ref({
|
|
})
|
|
})
|
|
const handleDownload = async (url) => {
|
|
const handleDownload = async (url) => {
|
|
try {
|
|
try {
|
|
|
|
+ formLoading.value = true
|
|
const response = await fetch(url)
|
|
const response = await fetch(url)
|
|
const blob = await response.blob()
|
|
const blob = await response.blob()
|
|
const downloadUrl = window.URL.createObjectURL(blob)
|
|
const downloadUrl = window.URL.createObjectURL(blob)
|
|
@@ -246,6 +248,7 @@ const handleDownload = async (url) => {
|
|
link.click()
|
|
link.click()
|
|
|
|
|
|
URL.revokeObjectURL(downloadUrl)
|
|
URL.revokeObjectURL(downloadUrl)
|
|
|
|
+ formLoading.value = false
|
|
} catch (error) {
|
|
} catch (error) {
|
|
console.error('下载失败:', error)
|
|
console.error('下载失败:', error)
|
|
}
|
|
}
|
|
@@ -446,6 +449,7 @@ const getList = async () => {
|
|
formLoading.value = true
|
|
formLoading.value = true
|
|
try {
|
|
try {
|
|
const data = await IotInfoApi.IotInfoApi.getChildContentFile(queryParams)
|
|
const data = await IotInfoApi.IotInfoApi.getChildContentFile(queryParams)
|
|
|
|
+ debugger
|
|
list.value = data
|
|
list.value = data
|
|
} finally {
|
|
} finally {
|
|
formLoading.value = false
|
|
formLoading.value = false
|