修改 试运行 查看流程 报告回显
This commit is contained in:
@@ -7,9 +7,9 @@
|
||||
<el-descriptions-item label="接入母线">
|
||||
{{ detailData.connectedBus }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="终端编号">
|
||||
<!-- <el-descriptions-item label="终端编号">
|
||||
{{ detailData.monitoringTerminalCode }}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions-item> -->
|
||||
<el-descriptions-item label="终端名称">
|
||||
{{ detailData.monitoringTerminalName }}
|
||||
</el-descriptions-item>
|
||||
@@ -20,10 +20,18 @@
|
||||
{{ detailData.reason }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="监测点在线率">
|
||||
{{ detailData.onlineRate * 100 + '%' }}
|
||||
{{ detailData.onlineRate ? detailData.onlineRate * 100 + '%' : '/' }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="监测点数据完整性">
|
||||
{{ detailData.integrityRate * 100 + '%' }}
|
||||
{{ detailData.integrityRate ? detailData.integrityRate * 100 + '%' : '/' }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="试运行报告">
|
||||
<el-icon class="elView" v-if="detailData?.reportName">
|
||||
<View @click="openFile(detailData?.reportName)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="detailData?.reportUrl">
|
||||
{{ detailData?.reportName }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
@@ -32,8 +40,10 @@
|
||||
import { onMounted, ref, reactive } from 'vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
import { propTypes } from '@/utils/propTypes'
|
||||
import { Link, View } from '@element-plus/icons-vue'
|
||||
import { getMointorPointTempLinedebugDetail } from '@/api/supervision-boot/jointDebugList/index'
|
||||
import { getRunTestById } from '@/api/supervision-boot/lineRunTest'
|
||||
import { getFileNameAndFilePath } from '@/api/system-boot/file'
|
||||
defineOptions({ name: 'BpmUserReportDetail' })
|
||||
const { query } = useRoute() // 查询参数
|
||||
const props = defineProps({
|
||||
@@ -49,13 +59,22 @@ const getInfo = async () => {
|
||||
try {
|
||||
await getRunTestById(props.id).then(res => {
|
||||
detailData.value = res.data
|
||||
if (res.data.testRunReport.length > 0 && res.data.testRunReport != null) {
|
||||
getFileNameAndFilePath({ filePath: res.data.testRunReport }).then(report => {
|
||||
detailData.value.reportUrl = report.data.url
|
||||
detailData.value.reportName = report.data.fileName
|
||||
console.log('🚀 ~ getFileNameAndFilePath ~ detailData.value:', detailData.value)
|
||||
})
|
||||
}
|
||||
})
|
||||
} finally {
|
||||
detailLoading.value = false
|
||||
}
|
||||
}
|
||||
defineExpose({ open: getInfo }) // 提供 open 方法,用于打开弹窗
|
||||
|
||||
const openFile = (name: any) => {
|
||||
window.open(window.location.origin + '/#/previewFile?' + name)
|
||||
}
|
||||
/** 初始化 **/
|
||||
onMounted(() => {
|
||||
getInfo()
|
||||
@@ -72,6 +91,7 @@ onMounted(() => {
|
||||
// position: absolute !important;
|
||||
// top: 20px !important;
|
||||
}
|
||||
|
||||
.elView {
|
||||
cursor: pointer;
|
||||
margin-right: 10px;
|
||||
|
||||
Reference in New Issue
Block a user