修改 冀北 现场问题

This commit is contained in:
GGJ
2024-08-21 16:05:06 +08:00
parent a6ab528220
commit ed4d982cbe
10 changed files with 193 additions and 101 deletions

View File

@@ -60,10 +60,12 @@
<a :href="detailData.testReport" target="_blank">{{ detailData.testReportName }}</a>
</el-descriptions-item>
<el-descriptions-item :span="2" label="其他报告">
<el-icon class="elView" v-if="detailData?.otherReportName">
<View @click="openFile(detailData?.otherReportName)" />
</el-icon>
<a :href="detailData.otherReport" target="_blank">{{ detailData.otherReportName }}</a>
<div v-for="item in detailData.otherReports">
<el-icon class="elView">
<View @click="openFile(item.fileName)" />
</el-icon>
<a :href="item.url" target="_blank">{{ item.fileName }}</a>
</div>
</el-descriptions-item>
<!-- <el-descriptions-item label="流程状态" >
@@ -110,14 +112,22 @@ const getInfo = async () => {
}
const getFileData = async () => {
detailData.value.otherReports = []
await getFileNameAndFilePath({ filePath: detailData.value.testReport }).then(res => {
detailData.value.testReport = res.data.url
detailData.value.testReportName = res.data.fileName
})
await getFileNameAndFilePath({ filePath: detailData.value.otherReport }).then(res => {
detailData.value.otherReport = res.data.url
detailData.value.otherReportName = res.data.fileName
})
if (detailData.value.otherReport != null) {
for (let i = 0; i < detailData.value.otherReport.split(',').length - 1; i++) {
await getFileNameAndFilePath({
filePath: '/supervision/' + detailData.value.otherReport.split(',')[i]
}).then(res => {
detailData.value.otherReports.push(res.data)
})
}
}
await getFileNameAndFilePath({ filePath: detailData.value.supervisionReport }).then(res => {
detailData.value.supervisionReport = res.data.url
detailData.value.supervisionReportName = res.data.fileName