2024-06-19 00:20:35 +08:00
|
|
|
<template>
|
|
|
|
<div class="app-container model-detail">
|
|
|
|
<el-card>
|
|
|
|
<template #header>
|
|
|
|
<svg-icon icon-class="pause" style="width:20px;height:20px;" />
|
|
|
|
基本信息</template>
|
|
|
|
<table style="width:100%" class="tb-base-info">
|
|
|
|
<tr>
|
|
|
|
<td style="width: 50%;">
|
|
|
|
<span class="sp-title">模型名称:</span>
|
2024-07-07 00:09:42 +08:00
|
|
|
<span class="sp-text">{{modelInfo.info.model_name}}</span>
|
2024-06-19 00:20:35 +08:00
|
|
|
</td>
|
|
|
|
<td style="width: 50%;">
|
|
|
|
<span class="sp-title">模型类型:</span>
|
2024-07-07 00:09:42 +08:00
|
|
|
<span class="sp-text">{{modelInfo.info.modl_main_type_name}}
|
|
|
|
/{{modelInfo.info.modl_sub_type_name}}
|
|
|
|
</span>
|
2024-06-19 00:20:35 +08:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td style="width: 50%;">
|
|
|
|
<span class="sp-title">模型版本:</span>
|
2024-07-07 00:09:42 +08:00
|
|
|
<span class="sp-text">
|
|
|
|
{{modelInfo.info.model_version}}
|
|
|
|
</span>
|
2024-06-19 00:20:35 +08:00
|
|
|
</td>
|
|
|
|
<td style="width: 50%;">
|
|
|
|
<span class="sp-title">版本描述:</span>
|
2024-07-07 00:09:42 +08:00
|
|
|
<span class="sp-text">
|
|
|
|
{{modelInfo.info.model_desc}}
|
|
|
|
</span>
|
2024-06-19 00:20:35 +08:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td style="width: 50%;">
|
|
|
|
<span class="sp-title">模型网络:</span>
|
2024-07-07 00:09:42 +08:00
|
|
|
<span class="sp-text">
|
|
|
|
{{modelInfo.info.modl_net_type}}
|
|
|
|
</span>
|
2024-06-19 00:20:35 +08:00
|
|
|
</td>
|
|
|
|
<td style="width: 50%;">
|
|
|
|
<span class="sp-title">上传用户:</span>
|
2024-07-07 00:09:42 +08:00
|
|
|
<span class="sp-text"> {{modelInfo.info.user_name}}</span>
|
2024-06-19 00:20:35 +08:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td style="width: 50%;">
|
|
|
|
<span class="sp-title">算法框架:</span>
|
2024-07-07 00:09:42 +08:00
|
|
|
<span class="sp-text">
|
|
|
|
{{modelInfo.info.modl_framework}}
|
|
|
|
</span>
|
2024-06-19 00:20:35 +08:00
|
|
|
</td>
|
|
|
|
<td style="width: 50%;">
|
|
|
|
<span class="sp-title">上传时间:</span>
|
2024-07-07 00:09:42 +08:00
|
|
|
<span class="sp-text">
|
|
|
|
{{modelInfo.info.create_time}}
|
|
|
|
</span>
|
2024-06-19 00:20:35 +08:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td style="width: 50%;">
|
|
|
|
<span class="sp-title">文件格式:</span>
|
2024-07-07 00:09:42 +08:00
|
|
|
<span class="sp-text">
|
|
|
|
{{modelInfo.info.modl_file_type}}
|
|
|
|
</span>
|
2024-06-19 00:20:35 +08:00
|
|
|
</td>
|
|
|
|
<td style="width: 50%;">
|
|
|
|
<span class="sp-title">网络配置:</span>
|
|
|
|
<span class="sp-text sp-file">
|
|
|
|
<a style="line-height:24px;"ref="#"><el-icon><Document /></el-icon>查看配置文件</a>
|
|
|
|
</span>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
</el-card>
|
|
|
|
<el-card style="margin-top: 12px;">
|
|
|
|
<template #header>
|
|
|
|
<svg-icon icon-class="pause" style="width:20px;height:20px;" />可适配算子</template>
|
2024-07-07 00:09:42 +08:00
|
|
|
<el-button v-for="(it,idx) in modelInfo.opers" :key="idx">{{ it.oper_type_name }}</el-button>
|
|
|
|
|
2024-06-19 00:20:35 +08:00
|
|
|
</el-card>
|
2024-06-20 23:49:38 +08:00
|
|
|
<el-card style="margin-top: 12px;margin-bottom:60px;">
|
2024-06-19 00:20:35 +08:00
|
|
|
<template #header>
|
|
|
|
<svg-icon icon-class="pause" style="width:20px;height:20px;" />
|
|
|
|
模型结构</template>
|
|
|
|
<div style="position: relative;min-height:50vh;" class="scroll">
|
|
|
|
<iframe frameborder="0" scrolling="no" :src="url" style="width:100%;height:100%;position: absolute;top:0px;"></iframe>
|
|
|
|
</div>
|
|
|
|
</el-card>
|
2024-06-20 23:49:38 +08:00
|
|
|
<el-card class="card-footer">
|
|
|
|
<el-button type="primary" @click="doBack">返回</el-button>
|
|
|
|
</el-card>
|
2024-06-19 00:20:35 +08:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script setup>
|
2024-07-07 00:09:42 +08:00
|
|
|
import ModelApi from '@/api/models'
|
|
|
|
import request from 'axios'
|
2024-06-20 23:49:38 +08:00
|
|
|
const router = useRouter();
|
2024-06-21 00:42:29 +08:00
|
|
|
const route =useRoute()
|
2024-06-19 00:20:35 +08:00
|
|
|
let url=ref("")
|
2024-07-07 00:09:42 +08:00
|
|
|
let modelInfo=reactive({
|
|
|
|
info:{},
|
|
|
|
opers:[]
|
|
|
|
})
|
|
|
|
const initData=()=>{
|
|
|
|
let id=route.query.id;
|
|
|
|
let ajaxs=[];
|
|
|
|
ajaxs.push(ModelApi.findOne(id))
|
|
|
|
ajaxs.push(ModelApi.adaptOperators(id));
|
|
|
|
request.all(ajaxs).then(res=>{
|
|
|
|
modelInfo.info=res[0].data?.data||{};
|
|
|
|
modelInfo.opers=res[1].data?.data?.adapt_operator_list||[];
|
|
|
|
});
|
|
|
|
};
|
2024-06-19 00:20:35 +08:00
|
|
|
onMounted(()=>{
|
2024-07-07 00:09:42 +08:00
|
|
|
url.value="./onnx/onnx.html?url=/ai/siamRPN_192.onnx";
|
|
|
|
initData();
|
2024-06-19 00:20:35 +08:00
|
|
|
});
|
2024-06-20 23:49:38 +08:00
|
|
|
const doBack=()=>{
|
2024-06-21 00:42:29 +08:00
|
|
|
if(route.query.from=='simulation'){
|
2024-07-14 22:26:43 +08:00
|
|
|
router.push({path:"/simulationEvaluation/index"})
|
2024-06-21 00:42:29 +08:00
|
|
|
return;
|
|
|
|
}
|
2024-07-14 22:26:43 +08:00
|
|
|
router.push({path:"/modelMgr/index"})
|
2024-06-20 23:49:38 +08:00
|
|
|
}
|
2024-06-19 00:20:35 +08:00
|
|
|
</script>
|
|
|
|
<style scoped lang='scss'>
|
|
|
|
.model-detail{
|
|
|
|
:deep(.el-card__header){
|
|
|
|
padding:8px 4px;
|
|
|
|
display: flex;
|
|
|
|
align-items: center
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.sp-file{
|
|
|
|
color:#29d;
|
|
|
|
}
|
|
|
|
.tb-base-info{
|
|
|
|
line-height: 30px;
|
2024-07-07 00:09:42 +08:00
|
|
|
:deep(span){
|
|
|
|
font-size: 14px;
|
|
|
|
}
|
2024-06-19 00:20:35 +08:00
|
|
|
}
|
|
|
|
:deep(.svg-icon){
|
|
|
|
margin-right:8px;
|
|
|
|
}
|
2024-06-20 23:49:38 +08:00
|
|
|
.card-footer{
|
|
|
|
position: fixed;
|
|
|
|
width: calc(100% - 215px);
|
|
|
|
bottom: 0px;
|
|
|
|
:deep(.el-card__body){
|
|
|
|
padding:10px;
|
|
|
|
.el-pagination{
|
|
|
|
justify-content: end;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2024-06-19 00:20:35 +08:00
|
|
|
</style>
|