feat(applicationManagement): 添加风筛记录详情页面

- 新增 employRecord/detail.vue 文件实现风筛记录详情页面
- 使用 iframe 嵌入详情内容,并提供加载和无数据提示
- 添加返回上一页功能
- 优化页面样式,包括头部和加载状态显示
This commit is contained in:
陈昱达
2025-07-24 15:39:13 +08:00
parent fc3dffdd5a
commit 53401fb821

View File

@@ -0,0 +1,108 @@
<template>
<div class="render-container employ-record-detail">
<div class="header flex align-items-c">
<BackButton></BackButton>
<div class="ml10 fs14 fw600">风筛记录详情</div>
<!-- <el-page-header @back="goBack" content="风筛记录详情"> </el-page-header>-->
</div>
<div class="iframe-container">
<!-- 使用iframe展示详情内容 -->
<iframe
v-if="detailUrl"
:src="detailUrl"
frameborder="0"
width="100%"
height="800px"
>
</iframe>
<!-- 加载提示 -->
<div v-if="loading" class="loading">
<i class="el-icon-loading"></i>
<p>正在加载详情内容...</p>
</div>
<!-- 无数据提示 -->
<div v-if="!detailUrl && !loading" class="no-data">
<p>暂无详情内容</p>
</div>
</div>
</div>
</template>
<script>
import { getResultHtml } from '@/api/riskCheck'
export default {
name: 'EmployRecordDetail',
data() {
return {
// 详情页面URL
detailUrl: getResultHtml({ taCode: this.$route.query.taCode }),
// 加载状态
loading: true,
// 记录ID
recordId: ''
}
},
created() {
// 获取路由参数
this.recordId = this.$route.query.recordId || ''
// 模拟设置详情URL实际项目中应该根据recordId从API获取真实URL
if (this.recordId) {
// 示例URL实际应根据recordId获取对应的详情页面URL
this.detailUrl = `/riskCheckResult/detail?recordId=${this.recordId}`
}
// 模拟加载完成
setTimeout(() => {
this.loading = false
}, 500)
},
methods: {
// 返回上一页
goBack() {
this.$router.go(-1)
}
}
}
</script>
<style lang="scss" scoped>
.employ-record-detail {
padding: 20px;
background-color: #fff;
.header {
margin-bottom: 20px;
padding-bottom: 10px;
border-bottom: 1px solid #ebeef5;
}
.iframe-container {
position: relative;
.loading {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
text-align: center;
color: #909399;
.el-icon-loading {
font-size: 30px;
margin-bottom: 10px;
}
}
.no-data {
text-align: center;
color: #909399;
padding: 50px 0;
}
}
}
</style>