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