mirror of
http://112.124.100.131/ebiz-ai/ebiz-ai-knowledge-manage.git
synced 2025-12-09 10:56:50 +08:00
refactor(applicationManagement): 重构 employRecord 组件中的 iframe 加载方式
- 将 detailUrl 的设置逻辑从模拟 URL 改为根据路由参数动态生成 - 引入环境变量 VUE_APP_ADMIN,拆分出 IP 和端口信息 - 更新 iframe src 属性,使用新的动态生成的 URL
This commit is contained in:
@@ -10,11 +10,7 @@
|
||||
<!-- 使用iframe展示详情内容 -->
|
||||
<iframe
|
||||
v-if="detailUrl"
|
||||
:src="
|
||||
`${iframeSrc}/bpic_eli/risk_history.html?taCode=${
|
||||
$route.query.taCode
|
||||
}&noPT=true`
|
||||
"
|
||||
:src="detailUrl"
|
||||
frameborder="0"
|
||||
width="100%"
|
||||
height="800px"
|
||||
@@ -54,10 +50,17 @@ export default {
|
||||
// 获取路由参数
|
||||
this.recordId = this.$route.query.recordId || ''
|
||||
|
||||
// 将process.env.VUE_APP_ADMIN拆分城IP 跟端口
|
||||
const [http, ip, port] = process.env.VUE_APP_ADMIN.split(':')
|
||||
console.log(process.env.VUE_APP_ADMIN.split(':'))
|
||||
console.log(ip, port)
|
||||
|
||||
// 模拟设置详情URL,实际项目中应该根据recordId从API获取真实URL
|
||||
if (this.recordId) {
|
||||
if (this.$route.query.taCode) {
|
||||
// 示例URL,实际应根据recordId获取对应的详情页面URL
|
||||
this.detailUrl = `/riskCheckResult/detail?recordId=${this.recordId}`
|
||||
this.detailUrl = `${this.iframeSrc}/bpic_eli/risk_history.html?taCode=${
|
||||
this.$route.query.taCode
|
||||
}&ip=${http}:${ip}&port=${port}&noPT=true`
|
||||
}
|
||||
|
||||
// 模拟加载完成
|
||||
|
||||
Reference in New Issue
Block a user