修改模型训练
This commit is contained in:
parent
b1fa56a7f3
commit
a2c4e64648
@ -9,6 +9,13 @@ export function searchAlgorithmsPage(queryParams:any){
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function trainAlgorithmsPage(queryParams:any){
|
||||||
|
return request({
|
||||||
|
url: '/train/list' ,
|
||||||
|
method: 'get',
|
||||||
|
params:queryParams
|
||||||
|
});
|
||||||
|
}
|
||||||
//新增项目
|
//新增项目
|
||||||
export function addAlgorithms(data:any){
|
export function addAlgorithms(data:any){
|
||||||
return request({
|
return request({
|
||||||
@ -20,7 +27,7 @@ export function addAlgorithms(data:any){
|
|||||||
//更新项目信息
|
//更新项目信息
|
||||||
export function updateAlgorithms (queryParams:any){
|
export function updateAlgorithms (queryParams:any){
|
||||||
return request({
|
return request({
|
||||||
url:'/list' ,
|
url:'/train' ,
|
||||||
method: 'PUT',
|
method: 'PUT',
|
||||||
data: queryParams
|
data: queryParams
|
||||||
});
|
});
|
||||||
@ -28,17 +35,18 @@ export function updateAlgorithms (queryParams:any){
|
|||||||
|
|
||||||
|
|
||||||
//单个删除项目
|
//单个删除项目
|
||||||
export function deleteAlgorithms (queryParams:any){
|
|
||||||
return request({
|
export function deleteAlgorithms (queryParams:any){
|
||||||
url:'/list/'+queryParams.id ,
|
return request({
|
||||||
method: 'delete'
|
url:'/train/'+queryParams.id ,
|
||||||
// params: queryParams
|
method: 'delete'
|
||||||
});
|
// params: queryParams
|
||||||
}
|
});
|
||||||
|
}
|
||||||
//多选删除项目
|
//多选删除项目
|
||||||
export function deleteBatchAlgorithms (queryParams:any){
|
export function deleteBatchAlgorithms (queryParams:any){
|
||||||
return request({
|
return request({
|
||||||
url:'/list',
|
url:'/train',
|
||||||
method: 'delete',
|
method: 'delete',
|
||||||
data: queryParams
|
data: queryParams
|
||||||
});
|
});
|
||||||
@ -1,4 +1,4 @@
|
|||||||
<script lang="ts">
|
queryParamsindex<script lang="ts">
|
||||||
export default {
|
export default {
|
||||||
name: "模型训练",
|
name: "模型训练",
|
||||||
};
|
};
|
||||||
@ -7,12 +7,15 @@ export default {
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { onMounted, ref, nextTick,reactive } from "vue";
|
import { onMounted, ref, nextTick,reactive } from "vue";
|
||||||
import { ElForm, ElMessage, ElMessageBox,FormRules } from "element-plus";
|
import { ElForm, ElMessage, ElMessageBox,FormRules } from "element-plus";
|
||||||
import { searchAlgorithmsPage,addAlgorithms,updateAlgorithms,deleteAlgorithms,deleteBatchAlgorithms} from "@/api/algorithm";
|
import { addAlgorithms,updateAlgorithms,deleteAlgorithms,deleteBatchAlgorithms,trainAlgorithmsPage} from "@/api/algorithml";
|
||||||
|
|
||||||
|
import { searchAlgorithmsPage } from "@/api/business/algorithm";
|
||||||
import { getDictItemById } from '@/api/dict';
|
import { getDictItemById } from '@/api/dict';
|
||||||
import Page from '@/components/Pagination/page.vue'
|
import Page from '@/components/Pagination/page.vue'
|
||||||
const apiUrl = import.meta.env.VITE_APP_BASE_API; // 基础路径
|
const apiUrl = import.meta.env.VITE_APP_BASE_API; // 基础路径
|
||||||
const fileList:any = ref([])
|
const fileList:any = ref([])
|
||||||
const isSwitch = ref(false);
|
const isSwitch = ref(false);
|
||||||
|
const textarea = ref('')
|
||||||
// 搜索框
|
// 搜索框
|
||||||
const queryParams:any = ref({
|
const queryParams:any = ref({
|
||||||
current: 1,
|
current: 1,
|
||||||
@ -21,12 +24,13 @@ const queryParams:any = ref({
|
|||||||
title: '',
|
title: '',
|
||||||
algorithmType: '',
|
algorithmType: '',
|
||||||
deviceType: '',
|
deviceType: '',
|
||||||
state: '',
|
states: '',
|
||||||
});
|
});
|
||||||
//新建训练任务
|
//新建训练任务
|
||||||
const rules = reactive<FormRules>({
|
const rules = reactive<FormRules>({
|
||||||
name: [{ required: true, message: "请输入训练任务名称", trigger: "blur" }],
|
taskName: [{ required: true, message: "请输入训练任务名称", trigger: "blur" }],
|
||||||
algorithmType: [{ required: true, message: "请选择算法类型", trigger: "change" }]
|
algorithmType: [{ required: true, message: "请选择算法类型", trigger: "change" }],
|
||||||
|
deviceType: [{ required: true, message: "请选择算法类型", trigger: "blur" }],
|
||||||
});
|
});
|
||||||
|
|
||||||
//分页 总条数
|
//分页 总条数
|
||||||
@ -38,15 +42,21 @@ const tableData= ref([]);
|
|||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
function gettableData() {
|
function gettableData() {
|
||||||
const params = {
|
const params = {
|
||||||
|
name: input.value,
|
||||||
current: queryParams.value.current,
|
current: queryParams.value.current,
|
||||||
size: queryParams.value.size,
|
size: queryParams.value.size,
|
||||||
title: queryParams.value.title
|
title: queryParams.value.title,
|
||||||
|
deviceType: queryParams.value.deviceType,
|
||||||
|
algorithmType: queryParams.value.algorithmType,
|
||||||
|
status: queryParams.value.status,
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
loading.value = true;
|
||||||
searchAlgorithmsPage(params).then((res:any) => {
|
trainAlgorithmsPage(params).then((res:any) => {
|
||||||
tableData.value = res.data.records;
|
tableData.value = res.data.records;
|
||||||
queryParams.value.total = res.data.total;
|
queryParams.value.total = res.data.total;
|
||||||
|
loading.value = false;
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -59,7 +69,7 @@ function getAlgorithmList() { // 获取算法列表
|
|||||||
};
|
};
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
searchAlgorithmsPage(params).then((result:any) => {
|
searchAlgorithmsPage(params).then((result:any) => {
|
||||||
algorithmData.value = result.data.records;
|
algorithmData.value = result.records;
|
||||||
|
|
||||||
}).catch((err:any) => {
|
}).catch((err:any) => {
|
||||||
});
|
});
|
||||||
@ -112,7 +122,8 @@ const info: any = ref({
|
|||||||
defaultHyperParams: "",
|
defaultHyperParams: "",
|
||||||
});
|
});
|
||||||
|
|
||||||
const dialogVisible = ref(false);
|
const dialogVisibles = ref(false);
|
||||||
|
const modelVisible= ref(false);
|
||||||
function addClick() {
|
function addClick() {
|
||||||
title.value = "新增训练任务";
|
title.value = "新增训练任务";
|
||||||
info.value = {
|
info.value = {
|
||||||
@ -120,7 +131,7 @@ function addClick() {
|
|||||||
description: "",
|
description: "",
|
||||||
version: "",
|
version: "",
|
||||||
principle: "",
|
principle: "",
|
||||||
status:1,
|
status:'',
|
||||||
algorithmType: "",
|
algorithmType: "",
|
||||||
inputParams: "",
|
inputParams: "",
|
||||||
outputParams: "",
|
outputParams: "",
|
||||||
@ -129,37 +140,46 @@ function addClick() {
|
|||||||
supportedDeviceTypes: "",
|
supportedDeviceTypes: "",
|
||||||
defaultHyperParams: "",
|
defaultHyperParams: "",
|
||||||
};
|
};
|
||||||
dialogVisible.value = true;
|
trainParamsData.value = []
|
||||||
|
fileList.value = []
|
||||||
|
isSwitch.value = false;
|
||||||
|
dialogVisibles.value = true;
|
||||||
}
|
}
|
||||||
//新建训练任务-确认按钮/修改按钮
|
//新建训练任务-确认按钮/修改按钮
|
||||||
function confirmClick(formEl: any) {
|
function confirmClick(formEl: any) {
|
||||||
formEl.validate((valid: any) => {
|
formEl.validate((valid: any) => {
|
||||||
|
|
||||||
|
if(fileList.value.length == 0){
|
||||||
|
return ElMessage({
|
||||||
|
type: "error",
|
||||||
|
message: "请上传数据源类型",
|
||||||
|
});
|
||||||
|
}
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if(isSwitch.value == true){
|
if(isSwitch.value == true){
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
isSwitch.value = true
|
isSwitch.value = true
|
||||||
// const data:any = {
|
|
||||||
// taskJson: JSON.stringify(info.value),
|
|
||||||
// }
|
|
||||||
|
|
||||||
const data = new FormData()
|
const data = new FormData()
|
||||||
info.value.trainParams = JSON.stringify(trainParamsData.value)
|
info.value.trainParams = JSON.stringify(trainParamsData.value)
|
||||||
|
|
||||||
|
|
||||||
data.append('task', JSON.stringify(info.value))
|
data.append('task', JSON.stringify(info.value))
|
||||||
// Add file if exists
|
// Add file if exists
|
||||||
if (fileList.value.length > 0) {
|
if (fileList.value.length > 0) {
|
||||||
data.append('file', fileList.value[0].raw)
|
data.append('file', fileList.value[0].raw)
|
||||||
}
|
}
|
||||||
dialogVisible.value = false
|
dialogVisibles.value = false
|
||||||
addAlgorithms(data).then((res: any) => {
|
addAlgorithms(data).then((res: any) => {
|
||||||
dialogVisible.value = false;
|
dialogVisibles.value = false;
|
||||||
ElMessage({
|
ElMessage({
|
||||||
message: "新增成功",
|
message: "新增成功",
|
||||||
type: "success",
|
type: "success",
|
||||||
})
|
})
|
||||||
gettableData();
|
gettableData();
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
dialogVisible.value = false;
|
dialogVisibles.value = false;
|
||||||
isSwitch.value = false;
|
isSwitch.value = false;
|
||||||
})
|
})
|
||||||
}else{
|
}else{
|
||||||
@ -169,12 +189,13 @@ function confirmClick(formEl: any) {
|
|||||||
}
|
}
|
||||||
//新建角色-取消按钮
|
//新建角色-取消按钮
|
||||||
function handleClose() {
|
function handleClose() {
|
||||||
dialogVisible.value = false;
|
dialogVisibles.value = false;
|
||||||
dialogViewVisible.value = false;
|
dialogViewVisible.value = false;
|
||||||
if (infoForm.value != null) infoForm.value.resetFields();
|
if (infoForm.value != null) infoForm.value.resetFields();
|
||||||
}
|
}
|
||||||
|
function handleClosed(){
|
||||||
|
modelVisible.value = false
|
||||||
|
}
|
||||||
//修改训练任务
|
//修改训练任务
|
||||||
function viewClick(row: any) {
|
function viewClick(row: any) {
|
||||||
title.value = "查看详情";
|
title.value = "查看详情";
|
||||||
@ -184,14 +205,15 @@ function viewClick(row: any) {
|
|||||||
|
|
||||||
//删除训练任务
|
//删除训练任务
|
||||||
function delAloneClick(row: any) {
|
function delAloneClick(row: any) {
|
||||||
ElMessageBox.confirm("确定删除此训练任务吗?", "删除提示", {
|
|
||||||
|
|
||||||
|
ElMessageBox.confirm("确定删除此训练任务吗?", "删除提示", {
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: "确定",
|
||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
type: "warning",
|
type: "warning",
|
||||||
})
|
}) .then(() => {
|
||||||
.then(() => {
|
|
||||||
let params = {
|
let params = {
|
||||||
id: row.algorithmId,
|
id: row.taskId
|
||||||
};
|
};
|
||||||
deleteAlgorithms(params).then(() => {
|
deleteAlgorithms(params).then(() => {
|
||||||
gettableData();
|
gettableData();
|
||||||
@ -201,8 +223,9 @@ function delAloneClick(row: any) {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
}
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// 多选删除?
|
// 多选删除?
|
||||||
function delClick(row:any) {
|
function delClick(row:any) {
|
||||||
@ -261,7 +284,8 @@ function changeStatus(row: any) {
|
|||||||
function releaseClick(row: any) {
|
function releaseClick(row: any) {
|
||||||
title.value = "发布模型";
|
title.value = "发布模型";
|
||||||
info.value = JSON.parse(JSON.stringify(row));
|
info.value = JSON.parse(JSON.stringify(row));
|
||||||
// dialogVisible.value = true;
|
modelVisible.value = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const isEchartsModel = ref(false) // 是否显示echarts模型
|
const isEchartsModel = ref(false) // 是否显示echarts模型
|
||||||
@ -296,11 +320,10 @@ function addTrainParams(){
|
|||||||
trainParamsData.value.push({
|
trainParamsData.value.push({
|
||||||
key:"",
|
key:"",
|
||||||
value:" "
|
value:" "
|
||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
function delTrainParams(index:any){
|
|
||||||
trainParamsData.value.splice(index,1)
|
|
||||||
}
|
|
||||||
function resetClick(){
|
function resetClick(){
|
||||||
queryParams.value = {
|
queryParams.value = {
|
||||||
current: 1,
|
current: 1,
|
||||||
@ -313,6 +336,12 @@ function resetClick(){
|
|||||||
}
|
}
|
||||||
gettableData()
|
gettableData()
|
||||||
}
|
}
|
||||||
|
function dellTrainParams(index:any){
|
||||||
|
trainParamsData.value.splice(index,1)
|
||||||
|
}
|
||||||
|
function confirmsClick(){
|
||||||
|
modelVisible.value=false
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@ -322,18 +351,18 @@ function resetClick(){
|
|||||||
style="display: flex;display: -webkit-flex; justify-content: space-between; -webkit-justify-content: space-between;margin-bottom: 10px">
|
style="display: flex;display: -webkit-flex; justify-content: space-between; -webkit-justify-content: space-between;margin-bottom: 10px">
|
||||||
<div style="display: flex;display: -webkit-flex;">
|
<div style="display: flex;display: -webkit-flex;">
|
||||||
<el-input v-model="input" placeholder="请输入训练任务名称" @keyup.enter="gettableData" style="width: 200px" clearable />
|
<el-input v-model="input" placeholder="请输入训练任务名称" @keyup.enter="gettableData" style="width: 200px" clearable />
|
||||||
<el-select style="width: 200px;margin-left: 10px;" clearable v-model="queryParams.algorithmType" placeholder="请选择算法类型">
|
<el-select style="width: 200px;margin-left: 10px;" clearable v-model="queryParams.algorithmType" placeholder="请选择算法类型" @change="gettableData">
|
||||||
<el-option v-for="item in algorithmData" :key="item.algorithmType" :label="item.algorithmType" :value="item.algorithmType" ></el-option>
|
<el-option v-for="item in algorithmData" :key="item.algorithmType" :label="item.algorithmType" :value="item.algorithmType" ></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
<el-select style="width: 200px;margin-left: 10px;" clearable v-model="queryParams.deviceType" placeholder="请选择设备类型">
|
<el-select style="width: 200px;margin-left: 10px;" clearable v-model="queryParams.deviceType" placeholder="请选择设备类型" @change="gettableData">
|
||||||
<el-option v-for="item in menuData" :key="item.itemCode" :label="item.dictName" :value="item.itemCode" ></el-option>
|
<el-option v-for="item in menuData" :key="item.itemCode" :label="item.dictName" :value="item.itemCode" ></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
<el-select style="width: 200px;margin-left: 10px;" clearable v-model="queryParams.state" placeholder="请选择状态">
|
<el-select style="width: 200px;margin-left: 10px;" clearable v-model="queryParams.status" placeholder="请选择状态" @change="gettableData">
|
||||||
<el-option v-for="item in statusData" :key="item.itemCode" :label="item.dictName" :value="item.itemCode" ></el-option>
|
<el-option v-for="item in statusData" :key="item.itemCode" :label="item.dictName" :value="item.itemCode" ></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
<el-button type="primary" style="margin-left: 10px" @click="gettableData">搜索</el-button>
|
|
||||||
</div>
|
</div>
|
||||||
<div style="display: flex;display: -webkit-flex;">
|
<div style="display: flex;display: -webkit-flex;">
|
||||||
|
<el-button type="primary" style="margin-left: 10px" @click="gettableData">查询</el-button>
|
||||||
<el-button type="primary" @click="resetClick">重置</el-button>
|
<el-button type="primary" @click="resetClick">重置</el-button>
|
||||||
<el-button type="primary" @click="addClick">新建训练任务</el-button>
|
<el-button type="primary" @click="addClick">新建训练任务</el-button>
|
||||||
|
|
||||||
@ -364,11 +393,11 @@ function resetClick(){
|
|||||||
<img src="@/assets/table/view.png" alt="" title="查看详情"
|
<img src="@/assets/table/view.png" alt="" title="查看详情"
|
||||||
@click="viewClick(scope.row)" style="cursor: pointer; ">
|
@click="viewClick(scope.row)" style="cursor: pointer; ">
|
||||||
|
|
||||||
<img src="@/assets/table/annotation.png" alt="" title="发布模型"
|
<img src="@/assets/table/annotation.png" alt="" title="发布模型" v-if="scope.row.status == 'Success'"
|
||||||
@click="releaseClick(scope.row)" style="cursor: pointer; ">
|
@click="releaseClick(scope.row)" style="cursor: pointer; ">
|
||||||
|
|
||||||
|
|
||||||
<img src="@/assets/table/del.png" alt="" title="删除"
|
<img v-if="scope.row.status == 'Success' ||scope.row.status == 'Failed' " src="@/assets/table/del.png" alt="" title="删除"
|
||||||
@click="delAloneClick(scope.row)" style="cursor: pointer; ">
|
@click="delAloneClick(scope.row)" style="cursor: pointer; ">
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
@ -377,21 +406,21 @@ function resetClick(){
|
|||||||
<Page :total="total" v-model:size="queryParams.size" v-model:current="queryParams.current" @pagination="gettableData()" ></Page>
|
<Page :total="total" v-model:size="queryParams.size" v-model:current="queryParams.current" @pagination="gettableData()" ></Page>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<el-dialog v-model="dialogVisible" :close-on-click-modal="false"
|
<el-dialog v-model="dialogVisibles" :close-on-click-modal="false"
|
||||||
:modal="false" draggable :before-close="handleClose" :title="title"
|
:modal="false" draggable :before-close="handleClose" :title="title"
|
||||||
append-to-body width="1145px" height="600px">
|
append-to-body width="1145px" height="600px">
|
||||||
<el-form ref="infoForm" :model="info" :rules="rules" label-width="100px"
|
<el-form ref="infoForm" :model="info" :rules="rules" label-width="100px"
|
||||||
style="margin-top: 20px;">
|
style="margin-top: 20px;">
|
||||||
<el-form-item label="训练名称" prop="name" style="width: 100%;" >
|
<el-form-item label="任务名称" prop="taskName" style="width: 100%;" >
|
||||||
<el-input v-model="info.name" style="width: 100%" placeholder="输入算法名称"></el-input>
|
<el-input v-model="info.taskName" style="width: 100%" placeholder="输入任务名称"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="设备类型" prop="deviceType" style="width: 100%;" >
|
<el-form-item label="设备类型" prop="deviceType" style="width: 100%;" >
|
||||||
<el-select v-model="info.deviceType">
|
<el-select v-model="info.deviceType" placeholder="请选择设备类型">
|
||||||
<el-option v-for="item in menuData" :key="item.itemCode" :label="item.dictName" :value="item.itemCode" ></el-option>
|
<el-option v-for="item in menuData" :key="item.itemCode" :label="item.dictName" :value="item.itemCode" ></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="算法类型" prop="algorithmType" style="width: 100%;" >
|
<el-form-item label="算法类型" prop="algorithmType" style="width: 100%;" >
|
||||||
<el-select v-model="info.algorithmType">
|
<el-select v-model="info.algorithmType" placeholder="请选择算法类型">
|
||||||
<el-option v-for="item in algorithmData" :key="item.algorithmType" :label="item.name" :value="item.algorithmType" ></el-option>
|
<el-option v-for="item in algorithmData" :key="item.algorithmType" :label="item.name" :value="item.algorithmType" ></el-option>
|
||||||
</el-select v-model="info.algorithmType">
|
</el-select v-model="info.algorithmType">
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -402,13 +431,13 @@ function resetClick(){
|
|||||||
</template>
|
</template>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="数据源类型" style="width: 100%;" >
|
<el-form-item label="参数配置" style="width: 100%;" >
|
||||||
<div style="display: flex;justify-content:space-between;">
|
<div style="display: flex;justify-content:space-between;">
|
||||||
<el-button type="primary" @click="addTrainParams">添加</el-button>
|
<el-button type="primary" @click="addTrainParams">添加</el-button>
|
||||||
<div style="display: flex;" v-for="(item,index) in trainParamsData" :key="index">
|
<div style="display: flex;" v-for="(item,index) in trainParamsData" :key="index">
|
||||||
<el-input v-model="item.key" style="width: 100%" placeholder="输入算法名称"></el-input>
|
<el-input v-model="item.key" style="width: 300px;margin-left: 10px;" placeholder="输入算法名称"></el-input>
|
||||||
<el-input v-model="item.value" style="width: 100%" placeholder="输入算法名称"></el-input>
|
<el-input v-model="item.value" style="width: 300px;margin: 0px 10px;" placeholder="输入算法名称"></el-input>
|
||||||
<el-button type="primary" @click="delTrainParams(index)">删除</el-button>
|
<el-button type="primary" @click="dellTrainParams(index)" text="删除">删除</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -421,24 +450,76 @@ function resetClick(){
|
|||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<el-dialog v-model="dialogViewVisible" :close-on-click-modal="false"
|
<el-dialog v-model="dialogViewVisible" :close-on-click-modal="false"
|
||||||
:modal="false" draggable :before-close="handleClose" :title="'模型详情'"
|
:modal="false" draggable :before-close="handleClose" :title="'查看详情'"
|
||||||
append-to-body width="1145px" height="600px">
|
append-to-body width="1145px" height="600px">
|
||||||
<div style=" width: calc(100%); height: calc(100vh - 200px);">
|
<div style=" width: calc(100%); height: calc(100vh - 200px);">
|
||||||
<div style="display: flex; margin-bottom: 20px; border-bottom: 1px solid #e5e5e5;padding-bottom: 5px;">
|
<div style="display: flex; margin-bottom: 20px; border-bottom: 1px solid #e5e5e5;padding-bottom: 5px;">
|
||||||
<div @click="changeShowResult(false)" class="adddevice_navigation_left" :class="{'adddevice_navigation_activeleft':!isEchartsModel}">基本信息</div>
|
<div @click="changeShowResult(false)" class="adddevice_navigation_left" :class="{'adddevice_navigation_activeleft':!isEchartsModel}">基本信息</div>
|
||||||
<div @click="changeShowResult(true)" class="adddevice_navigation_right" :class="{'adddevice_navigation_activeright':isEchartsModel}">指标与图表</div>
|
<div @click="changeShowResult(true)" class="adddevice_navigation_right" :class="{'adddevice_navigation_activeright':isEchartsModel}">/训练结果</div>
|
||||||
</div>
|
</div>
|
||||||
<el-form ref="infoForm" :model="info" :rules="rules" label-width="100px"
|
<el-form ref="infoForm" :model="info" :rules="rules" label-width="100px"
|
||||||
style="margin-top: 20px;" v-if="!isEchartsModel">
|
style="margin-top: 20px;" v-if="!isEchartsModel">
|
||||||
<el-form-item label="版本" style="width: 100%;" >
|
<el-form-item label="任务ID" style="width: 100%;" >
|
||||||
<el-input v-model="info.versionTag" style="width: 100%" placeholder="输入算法名称" :disabled="true"></el-input>
|
<el-input v-model="info.taskId" style="width: 100%" :disabled="true"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="任务名称" style="width: 100%;" >
|
||||||
|
<el-input v-model="info.taskName" style="width: 100%" :disabled="true"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="设法类型" style="width: 100%;" >
|
||||||
|
<el-input v-model="info.versionTag" style="width: 100%" prop="info.deviceType" :disabled="true"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="设备类型" style="width: 100%;" >
|
||||||
|
<el-select v-model="info.deviceType" placeholder="请选择设备类型" :disabled="true">
|
||||||
|
<el-option v-for="item in menuData" :key="item.itemCode" :label="item.dictName" :value="item.itemCode" ></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="训练参数" style="width: 100%;">
|
||||||
|
<el-input v-model="info.trainParams" style="width: 100%" :disabled="true"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="创建时间" style="width: 100%;" >
|
||||||
|
<el-input v-model="info.createdAt" style="width: 100%" :disabled="true" ></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="更新时间" style="width: 100%;" >
|
||||||
|
<el-input v-model="info.updatedAt" style="width: 100%" :disabled="true"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
</el-form>
|
</el-form>
|
||||||
<div v-else style="width: 100%; height: calc(100% - 50px);">
|
<div v-else style="width: 100%; height: calc(100% - 50px);">
|
||||||
<img :src="apiUrl +'/models/'+ info.metricsImagePath" alt="" style="width: 100%; height: 100%;object-fit:contain;">
|
<div v-if="info.status == 'Success'">
|
||||||
|
<img :src="apiUrl +'/models/'+ info.metricsImagePath" alt="" style="width: 100%; height: 100%;object-fit:contain;">
|
||||||
|
</div>
|
||||||
|
<div v-if="info.status == 'Failed'">
|
||||||
|
失败
|
||||||
|
</div>
|
||||||
|
<div v-if="info.status == 'Training'">
|
||||||
|
训练中
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
<el-dialog v-model="modelVisible" :close-on-click-modal="false"
|
||||||
|
:modal="false" draggable :before-close="handleClosed" :title="title"
|
||||||
|
append-to-body width="600px" height="600px">
|
||||||
|
<el-form ref="infoForm" :model="info" label-width="100px"
|
||||||
|
style="margin-top: 20px;">
|
||||||
|
<el-form-item label="任务名称" prop="taskName" >
|
||||||
|
<el-input v-model="info.taskName" style="width: 100%" placeholder="输入任务名称" disabled></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="算法类型" prop="algorithmType" >
|
||||||
|
<el-select v-model="info.algorithmType" placeholder="请选择算法类型" style="width: 100%;" disabled>
|
||||||
|
<el-option v-for="item in algorithmData" :key="item.algorithmType" :label="item.name" :value="item.algorithmType" ></el-option>
|
||||||
|
</el-select v-model="info.algorithmType">
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="设备类型" prop="deviceType" >
|
||||||
|
<el-select v-model="info.deviceType" placeholder="请选择设备类型" style="width: 100%;" disabled>
|
||||||
|
<el-option v-for="item in menuData" :key="item.itemCode" :label="item.dictName" :value="item.itemCode" ></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="版本号" >
|
||||||
|
<el-input v-model="textarea" style="width: 100%" :rows="2" type="textarea" disabled />
|
||||||
|
</el-form-item>
|
||||||
|
<el-button type="primary" style="margin-left: 60px;" @click="confirmsClick">确定</el-button>
|
||||||
|
</el-form>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@ -27,7 +27,7 @@ export default ({ mode }: ConfigEnv): UserConfig => {
|
|||||||
// 线上API地址
|
// 线上API地址
|
||||||
// target: 'http://192.168.1.166:8090/',
|
// target: 'http://192.168.1.166:8090/',
|
||||||
// 本地API地址
|
// 本地API地址
|
||||||
target: 'http://localhost:8090',
|
target: 'http://192.168.1.38:8090',
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
rewrite: path =>
|
rewrite: path =>
|
||||||
path.replace(new RegExp('^' + env.VITE_APP_BASE_API), '')
|
path.replace(new RegExp('^' + env.VITE_APP_BASE_API), '')
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user