update code
parent
1ad9710a4d
commit
0e162d8302
|
@ -142,13 +142,13 @@ class MenuAPI {
|
|||
alwaysShow: false,
|
||||
},
|
||||
},{
|
||||
path: "compile",
|
||||
component: "simulationEvaluation/compile",
|
||||
name: "simulationEvaluationCompile",
|
||||
path: "addTask",
|
||||
component: "simulationEvaluation/addTask",
|
||||
name: "simulationEvaluationAddTask",
|
||||
meta: {
|
||||
title: "编译部署",
|
||||
title: "新建推理任务",
|
||||
icon: "user",
|
||||
hidden: true,
|
||||
hidden: false,
|
||||
roles: ["ADMIN", "GUEST"],
|
||||
keepAlive: true,
|
||||
alwaysShow: false,
|
||||
|
|
|
@ -0,0 +1,69 @@
|
|||
<template>
|
||||
<el-card style="margin-top:12px" class="simulation-add-add-step1">
|
||||
<template #header>推理信息</template>
|
||||
<el-form ref="myForm" :model="upForm" :rules="formRules" label-width="120">
|
||||
<el-form-item label="任务各称" prop="taskName">
|
||||
<el-input v-model="upForm.taskName" placeholder="请输入推理任务名称" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="任务说明" prop="taskDesc">
|
||||
<el-input v-model="upForm.taskDesc" type="textarea" style="width:100%;" :rows="4"
|
||||
placeholder="请输入推理任务说明" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="任务类型" prop="taskType">
|
||||
<el-select v-model="upForm.taskType" placeholder="请选择" style="width: 48%">
|
||||
<el-option v-for="(it, idx) in taskTypes" :label="it.text" :value="it.id" :key="idx" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
const myForm = ref(ElForm)
|
||||
let upForm = reactive({
|
||||
taskName: '',
|
||||
taskDesc: "",
|
||||
taskType: ""
|
||||
})
|
||||
const formRules = computed(() => {
|
||||
return {
|
||||
taskName: [
|
||||
{
|
||||
required: true,
|
||||
trigger: "blur",
|
||||
message: "任务名称必填",
|
||||
},
|
||||
],
|
||||
taskType: [
|
||||
{
|
||||
required: true,
|
||||
trigger: "blur",
|
||||
message: "请选择任务类型",
|
||||
}
|
||||
]
|
||||
};
|
||||
});
|
||||
const checkForm = () => {
|
||||
return new Promise(resolve => {
|
||||
myForm.value.validate(b => {
|
||||
resolve(b);
|
||||
});
|
||||
});
|
||||
|
||||
};
|
||||
const getFormData=()=>{
|
||||
return upForm;
|
||||
}
|
||||
const taskTypes = reactive([{ id: 1, text: '推理任务类型' }, { id: 2, text: '推理任务类型2' }, { id: 3, text: '推理任务类型3' },])
|
||||
|
||||
defineExpose({
|
||||
checkForm,
|
||||
getFormData
|
||||
})
|
||||
|
||||
|
||||
</script>
|
||||
<style lang='scss'></style>
|
|
@ -0,0 +1,118 @@
|
|||
<template>
|
||||
<el-card style="margin-top:12px" class="simulation-add-add-step2">
|
||||
<template #header>模型列表</template>
|
||||
|
||||
<el-table v-loading="loading" :data="tableData" stripe @row-click="doRowClick">
|
||||
<el-table-column align="center" width="55" label="选择">
|
||||
<template #default="scope">
|
||||
<el-radio v-model="modelSelection" :label="scope.row.id + ''"
|
||||
@change="handleChange(scope.row)"> </el-radio>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="模型名称" align="left" prop="name" />
|
||||
<el-table-column label="模型类型" align="left" prop="modelType" />
|
||||
<el-table-column label="模型说明" align="left" prop="netName" width="120" />
|
||||
|
||||
<el-table-column label="版本" align="left" prop="ver" />
|
||||
<el-table-column label="互联名称" align="left" prop="netName" width="120" />
|
||||
<el-table-column label="互联说明" align="left" prop="desc" />
|
||||
<el-table-column label="互联创建时间" width="120" align="left" prop="upTime" />
|
||||
|
||||
</el-table>
|
||||
<pagination v-if="total > 0" v-model:total="total" v-model:page="queryParams.pageNum"
|
||||
v-model:limit="queryParams.pageSize" @pagination="handleQuery" />
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
|
||||
const modelSelection = ref("")//单选id
|
||||
const queryParams = reactive({
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
});
|
||||
const total=ref(100)
|
||||
|
||||
const handleChange = (row) => {
|
||||
modelSelection.value = row.id + "";
|
||||
}
|
||||
const doRowClick=(row,col,sel)=>{
|
||||
modelSelection.value=row.id+"";
|
||||
}
|
||||
/** 查询 */
|
||||
function handleQuery(a) {
|
||||
queryParams.pageSize=a.limit;
|
||||
ElMessage.success("查询成功");
|
||||
loading.value = false;
|
||||
|
||||
}
|
||||
const tableData = [
|
||||
{
|
||||
id: "1",
|
||||
name: "模型名称模型名称模型名称查看1",
|
||||
modelType: "图像分类",
|
||||
ver: "1.0",
|
||||
netName: '我的互联名称',
|
||||
desc: '进行10种类型 的目标分类模型查看',
|
||||
upTime: "2024-02-02",
|
||||
upUser: 'USER',
|
||||
state: '1'
|
||||
},
|
||||
{
|
||||
id: "2",
|
||||
name: "模型名称模型名称模型名称查看2",
|
||||
modelType: "图像分类",
|
||||
ver: "1.0",
|
||||
netName: '我的互联名称',
|
||||
desc: '进行10种类型 的目标分类模型查看',
|
||||
upTime: "2024-02-02",
|
||||
upUser: 'USER',
|
||||
state: '1'
|
||||
},
|
||||
{
|
||||
id: "3",
|
||||
name: "模型名称模型名称模型名称查看3",
|
||||
modelType: "图像分类",
|
||||
ver: "1.0",
|
||||
netName: '我的互联名称',
|
||||
desc: '进行人员检测的模型',
|
||||
upTime: "2024-02-02",
|
||||
upUser: 'USER',
|
||||
state: '1'
|
||||
},
|
||||
{
|
||||
id: "4",
|
||||
name: "模型名称模型名称模型名称查看4",
|
||||
modelType: "图像分类",
|
||||
ver: "1.0",
|
||||
netName: '我的互联名称',
|
||||
desc: '进行10种类型 的目标分类模型查看',
|
||||
upTime: "2024-02-02",
|
||||
upUser: 'USER',
|
||||
state: '0'
|
||||
},
|
||||
{
|
||||
id: "5",
|
||||
name: "模型名称模型名称模型名称查看5",
|
||||
modelType: "图像分类",
|
||||
ver: "1.0",
|
||||
netName: '我的互联名称',
|
||||
desc: '进行人员检测的模型',
|
||||
upTime: "2024-02-02",
|
||||
upUser: 'USER',
|
||||
state: '0'
|
||||
}
|
||||
];
|
||||
const checkForm=()=>{
|
||||
if(modelSelection.value){
|
||||
let tmps=tableData.filter(d=>d.id==modelSelection.value);
|
||||
return tmps.length>0?tmps[0]:null;
|
||||
}
|
||||
return null;
|
||||
};
|
||||
defineExpose({
|
||||
checkForm
|
||||
})
|
||||
|
||||
</script>
|
||||
<style lang='scss'></style>
|
|
@ -0,0 +1,109 @@
|
|||
<template>
|
||||
<el-card style="margin-top:12px" class="simulation-add-add-step31">
|
||||
<template #header>已选择模型</template>
|
||||
<el-row class="model-info">
|
||||
<el-col :span="8">
|
||||
<span>模型名称:</span>
|
||||
<span>{{ modelInfo.name }}</span>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<span>模型类型:</span>
|
||||
<span>{{ modelInfo.modelType }}</span>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<span>互联名称:</span>
|
||||
<span>{{ modelInfo.netName }}</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
<el-card style="margin-top:12px;position: relative;" class="simulation-add-add-step32">
|
||||
<template #header>
|
||||
<span>设备选择</span>
|
||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true" style="flex-grow: 1;text-align: right;position: absolute;top:4px;right:0px;">
|
||||
<el-form-item label="" prop="keywords">
|
||||
<el-input v-model="queryParams.keywords" placeholder="请输入设备名称" clearable style="width: 250px" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="handleQuery"><i-ep-search />搜索</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
<el-table v-loading="loading" :data="tableData" stripe @row-click="doRowClick">
|
||||
<el-table-column align="center" width="55" label="选择">
|
||||
<template #default="scope">
|
||||
<el-radio v-model="devSelection" :label="scope.row.id + ''"
|
||||
@change="handleChange(scope.row)"> </el-radio>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="设备名称" align="left" prop="devName" />
|
||||
<el-table-column label="AI芯片信息" align="left" prop="aiChip" />
|
||||
<el-table-column label="部模型名称" align="left" prop="modelName" width="120" />
|
||||
|
||||
<el-table-column label="横型类型" align="left" modelType="ver" />
|
||||
<el-table-column label="互联名称" align="left" prop="netName" width="120" />
|
||||
<el-table-column label="部署时间" width="120" align="left" prop="pubTime" />
|
||||
<el-table-column label="设备状态" fixed="right" align="center" width="270">
|
||||
<template #default="scope">
|
||||
<span :class="'dev-state state-'+scope.row.state">{{ scope.row.state==0?'空闲':scope.row.state==2?'完成':'推理中' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
<pagination v-if="total > 0" v-model:total="total" v-model:page="queryParams.pageNum"
|
||||
v-model:limit="queryParams.pageSize" @pagination="handleQuery" />
|
||||
</el-card>
|
||||
|
||||
<div style="margin-top:12px;font-size:12px;font-weight: bold;margin-left:8px;">编译结果</div>
|
||||
<el-card style="" class="simulation-add-add-step33">
|
||||
<el-input v-model="result" type="textarea" style="width:100%;" :rows="4"
|
||||
placeholder="请输入" />
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
const devSelection = ref("")//单选id
|
||||
let result=ref("")
|
||||
const handleChange = (row) => {
|
||||
devSelection.value = row.id + "";
|
||||
}
|
||||
const doRowClick=(row,col,sel)=>{
|
||||
devSelection.value=row.id+"";
|
||||
}
|
||||
const queryFormRef=ref()
|
||||
const queryParams = reactive({
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
keywords:''
|
||||
});
|
||||
const total=ref(100)
|
||||
|
||||
const props = defineProps({
|
||||
modelInfo: {
|
||||
type: Object,
|
||||
require: true,
|
||||
default: null
|
||||
}
|
||||
})
|
||||
/** 查询 */
|
||||
function handleQuery(a) {
|
||||
queryParams.pageSize=a.limit;
|
||||
ElMessage.success("查询成功");
|
||||
loading.value = false;
|
||||
|
||||
}
|
||||
|
||||
let tableData=reactive([
|
||||
{id:"1",devName:"Atlas200智能模组",aiChip:'进行人员检订的模型',modelName:'模型各称模型各称模型各称',modelType:'VIT',netName:'我的互联各称',pubTime:'2024-06-09 18:32:13',state:0},
|
||||
{id:"2",devName:"FPGA报卡",aiChip:'进行人员检订的模型',modelName:'模型各称模型各称模型各称',modelType:'VIT',netName:'我的互联各称',pubTime:'2024-06-09 18:32:13',state:1},
|
||||
{id:"3",devName:"RTX4090显卡",aiChip:'进行人员检订的模型',modelName:'模型各称模型各称模型各称',modelType:'VIT',netName:'我的互联各称',pubTime:'2024-06-09 18:32:13',state:2},
|
||||
{id:"4",devName:"RTX4080显卡",aiChip:'进行人员检订的模型',modelName:'模型各称模型各称模型各称',modelType:'VIT',netName:'我的互联各称',pubTime:'2024-06-09 18:32:13',state:0},
|
||||
{id:"5",devName:"RTX4070显卡",aiChip:'进行人员检订的模型',modelName:'模型各称模型各称模型各称',modelType:'VIT',netName:'我的互联各称',pubTime:'2024-06-09 18:32:13',state:1},
|
||||
])
|
||||
</script>
|
||||
<style lang='scss' scoped>
|
||||
.model-info{
|
||||
font-size: 12px;
|
||||
color:#666;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,10 @@
|
|||
<template>
|
||||
<el-card style="margin-top:12px" class="simulation-add-add-step4">
|
||||
<template #header>数据集列表</template>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
</script>
|
||||
<style lang='scss'>
|
||||
</style>
|
|
@ -0,0 +1,131 @@
|
|||
<template>
|
||||
<div class="app-container simulation-add-task">
|
||||
<el-card class="card-step">
|
||||
<el-steps style="width: 900px;max-width: 900px;" :space="200" :active="active" finish-status="success">
|
||||
<el-step title="Step1" :class="active == 0 ? 'active' : ''" description="评估基本信息填写" />
|
||||
<el-step title="Step2" :class="active == 1 ? 'active' : ''" description="选择模型" />
|
||||
<el-step title="Step3" :class="active == 2 ? 'active' : ''" description="选择设备" />
|
||||
<el-step title="Step4" :class="active == 3 ? 'active' : ''" description="评估数据集选择" />
|
||||
</el-steps>
|
||||
</el-card>
|
||||
<div style="margin-bottom:100px;" class="card-content">
|
||||
<addStep1 ref="step1" v-if="active == 1" />
|
||||
<addStep2 ref="step2" v-if="active == 2"/>
|
||||
<addStep3 ref="step3" v-if="active == 3" :modelInfo="modelInfo"/>
|
||||
<addStep4 v-if="active == 4" />
|
||||
</div>
|
||||
<el-card class="card-footer">
|
||||
<el-button type="primary" v-if="active == 3" @click="doCompile">编译部署</el-button>
|
||||
<el-button type="primary" v-if="active == 4" @click="doStart">开始</el-button>
|
||||
<el-button type="primary" v-if="active > 0 && active <= 4" @click="doPrev">上一步</el-button>
|
||||
<el-button @click="doNext" v-if="active < 4">下一步</el-button>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import addStep1 from './addStep1.vue'
|
||||
import addStep2 from './addStep2.vue'
|
||||
import addStep3 from './addStep3.vue'
|
||||
import addStep4 from './addStep4.vue'
|
||||
const active = ref(1)
|
||||
const step1=ref()
|
||||
const step2=ref()
|
||||
let taskInfo=reactive({});
|
||||
let modelInfo=reactive({});
|
||||
|
||||
const doStart = () => {
|
||||
|
||||
}
|
||||
const doCompile = () => {
|
||||
|
||||
}
|
||||
const doPrev = () => {
|
||||
active.value--;
|
||||
}
|
||||
const doNext = () => {
|
||||
if(active.value==1){
|
||||
step1.value.checkForm().then(d=>{
|
||||
if(d){
|
||||
taskInfo=step1.value.getFormData();
|
||||
active.value++;
|
||||
}
|
||||
});
|
||||
}else if(active.value==2){
|
||||
let tmp=step2.value.checkForm();
|
||||
if(tmp){
|
||||
modelInfo=tmp;
|
||||
active.value++;
|
||||
}else{
|
||||
ElMessage.error("请选择模型!");
|
||||
}
|
||||
}else{
|
||||
active.value++;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang='scss'>
|
||||
.simulation-add-task {
|
||||
.card-step {
|
||||
.el-card__body {
|
||||
padding-left: 100px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
|
||||
.el-steps {
|
||||
flex-grow: 1;
|
||||
margin-left: 100px;
|
||||
|
||||
.el-step {
|
||||
&.active {}
|
||||
|
||||
.el-step__main {
|
||||
position: relative;
|
||||
|
||||
.el-step__title {
|
||||
display: inline-block;
|
||||
width: 150px;
|
||||
text-align: center;
|
||||
padding: 0px;
|
||||
position: relative;
|
||||
left: -65px;
|
||||
}
|
||||
|
||||
.el-step__description {
|
||||
display: inline-block;
|
||||
width: 150px;
|
||||
text-align: center;
|
||||
padding: 0px;
|
||||
position: relative;
|
||||
left: -65px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.card-content {
|
||||
.el-card__header {
|
||||
padding: 8px 12px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
.card-footer {
|
||||
position: fixed;
|
||||
width: calc(100% - 215px);
|
||||
bottom: 0px;
|
||||
|
||||
:deep(.el-card__body) {
|
||||
padding: 10px;
|
||||
|
||||
.el-pagination {
|
||||
justify-content: end;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -71,8 +71,7 @@ watch(dateTimeRange, (newVal) => {
|
|||
const tableData = [
|
||||
{
|
||||
id:"1",
|
||||
name: "模型名称模型名称模型名称查看",
|
||||
netName: "VIT",
|
||||
name: "模型名称模型名称模型名称查看",
|
||||
modelType: "图像分类",
|
||||
ver: "1.0",
|
||||
netName:'我的互联名称',
|
||||
|
@ -83,8 +82,7 @@ const tableData = [
|
|||
},
|
||||
{
|
||||
id:"2",
|
||||
name: "模型名称模型名称模型名称查看",
|
||||
netName: "Mobile-VIT",
|
||||
name: "模型名称模型名称模型名称查看",
|
||||
modelType: "图像分类",
|
||||
ver: "1.0",
|
||||
netName:'我的互联名称',
|
||||
|
@ -95,8 +93,7 @@ const tableData = [
|
|||
},
|
||||
{
|
||||
id:"3",
|
||||
name: "模型名称模型名称模型名称查看",
|
||||
netName: "VIT",
|
||||
name: "模型名称模型名称模型名称查看",
|
||||
modelType: "图像分类",
|
||||
ver: "1.0",
|
||||
netName:'我的互联名称',
|
||||
|
@ -107,8 +104,7 @@ const tableData = [
|
|||
},
|
||||
{
|
||||
id:"4",
|
||||
name: "模型名称模型名称模型名称查看",
|
||||
netName: "Mobile-VIT",
|
||||
name: "模型名称模型名称模型名称查看",
|
||||
modelType: "图像分类",
|
||||
ver: "1.0",
|
||||
netName:'我的互联名称',
|
||||
|
@ -119,8 +115,7 @@ const tableData = [
|
|||
},
|
||||
{
|
||||
id:"5",
|
||||
name: "模型名称模型名称模型名称查看",
|
||||
netName: "VIT",
|
||||
name: "模型名称模型名称模型名称查看",
|
||||
modelType: "图像分类",
|
||||
ver: "1.0",
|
||||
netName:'我的互联名称',
|
||||
|
|
Loading…
Reference in New Issue