hi-ucs/front/src/views/detailsAll/components/Algorithm/AlgorithmOnTrial.vue

70 lines
1.8 KiB
Vue
Raw Normal View History

2022-06-14 09:32:49 +08:00
<!--
* @Author: hisense.liangjunhua
* @Date: 2022-06-09 09:29:29
2022-07-05 20:46:50 +08:00
* @LastEditors: hisense.wuhongjian
2022-07-13 18:00:26 +08:00
* @LastEditTime: 2022-07-13 16:34:26
2022-06-14 09:32:49 +08:00
* @Description: 算法详情 算法试用
-->
<template>
<div class="algorithm-on-trial" v-if="flag">
<detals-title title="算法试用" type="PROBATION"></detals-title>
<div class="main">
<div class="iframe-box">
<iframe :src="onTrial" width="100%" height="440"></iframe>
</div>
</div>
</div>
</template>
<script setup>
import DetalsTitle from '@/views/detailsAll/components/DetalsTitle.vue'
import { ref, defineProps, watch } from 'vue'
const props = defineProps({
dataList: { type: Object, default: null },
})
const flag = ref(true)
const onTrial = ref('')
if (props.dataList.infoList) {
let obj = props.dataList.infoList.filter(
2022-07-05 20:46:50 +08:00
(item) => item.attrType === '试用地址' && item.attrValue
2022-06-14 09:32:49 +08:00
)[0]
if (!obj) {
flag.value = false
} else {
2022-07-13 18:00:26 +08:00
// 修正数据传输导致的转义字符问题
onTrial.value = obj.attrValue.replace(/amp;/g, '')
2022-06-14 09:32:49 +08:00
}
}
watch(
() => props.dataList,
(val) => {
if (val) {
2022-07-05 20:46:50 +08:00
let obj = val.infoList.filter((item) => item.attrType === '试用地址' && item.attrValue)[0]
2022-06-14 09:32:49 +08:00
if (!obj) {
flag.value = false
} else {
2022-07-13 18:00:26 +08:00
// 修正数据传输导致的转义字符问题
onTrial.value = obj.attrValue.replace(/amp;/g, '')
2022-06-14 09:32:49 +08:00
}
}
}
)
</script>
<style lang="less" scoped>
.algorithm-on-trial {
padding: 80px 300px 60px;
.main {
margin-top: 40px;
iframe {
border: none;
}
.iframe-box {
width: 100%;
height: 440px;
margin-top: 10px;
display: flex;
justify-content: center;
}
}
}
</style>