update code
parent
2826f4189e
commit
8edf6d6bb4
|
@ -236,6 +236,24 @@ const doPrev = () => {
|
||||||
state.value = 0;
|
state.value = 0;
|
||||||
info.logs = [];
|
info.logs = [];
|
||||||
info.optIds = [];
|
info.optIds = [];
|
||||||
|
}else if(active.value==3){
|
||||||
|
setTimeout(()=>{
|
||||||
|
if(info.parameters){
|
||||||
|
step3.value.returnData(info.parameters);
|
||||||
|
}
|
||||||
|
},400);
|
||||||
|
}else if(active.value==2){
|
||||||
|
setTimeout(()=>{
|
||||||
|
if(modelInfo){
|
||||||
|
step2.value.returnData(modelInfo);
|
||||||
|
}
|
||||||
|
},400);
|
||||||
|
}else if(active.value==1){
|
||||||
|
setTimeout(()=>{
|
||||||
|
if(info.taskInfo){
|
||||||
|
step1.value.returnData(info.taskInfo);
|
||||||
|
}
|
||||||
|
},400);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const doNext = () => {
|
const doNext = () => {
|
||||||
|
|
|
@ -67,6 +67,11 @@ const initData=()=>{
|
||||||
info.taskTypes=d.data.data.infr_task_type_list
|
info.taskTypes=d.data.data.infr_task_type_list
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
const returnData=(d)=>{
|
||||||
|
upForm.taskName=d.taskName
|
||||||
|
upForm.taskDesc=d.taskDesc
|
||||||
|
upForm.taskType=d.taskType
|
||||||
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
initData();
|
initData();
|
||||||
});
|
});
|
||||||
|
@ -74,7 +79,8 @@ onMounted(() => {
|
||||||
|
|
||||||
defineExpose({
|
defineExpose({
|
||||||
checkForm,
|
checkForm,
|
||||||
getFormData
|
getFormData,
|
||||||
|
returnData
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<el-card style="margin-top:12px" class="simulation-add-add-step2">
|
<el-card style="margin-top:12px" class="simulation-add-add-step2">
|
||||||
<template #header>模型列表</template>
|
<template #header>模型列表</template>
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="info.data" stripe @row-click="doRowClick">
|
<el-table v-loading="loading" :data="info.data" stripe @row-click="doRowClick">
|
||||||
<el-table-column align="center" width="55" label="选择">
|
<el-table-column align="center" width="55" label="选择">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
|
@ -71,13 +70,17 @@ const checkForm = () => {
|
||||||
return null;
|
return null;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const returnData=d=>{
|
||||||
|
modelSelection.value=""+d.id;
|
||||||
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
handleQuery();
|
handleQuery();
|
||||||
});
|
});
|
||||||
|
|
||||||
defineExpose({
|
defineExpose({
|
||||||
checkForm
|
checkForm,
|
||||||
|
returnData
|
||||||
})
|
})
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -71,11 +71,11 @@ function handleFileChange(file) {
|
||||||
type: "warning",
|
type: "warning",
|
||||||
}).then(function () {
|
}).then(function () {
|
||||||
info.jsonData = JSON.parse(res);
|
info.jsonData = JSON.parse(res);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
info.jsonData = JSON.parse(res);
|
info.jsonData = JSON.parse(res);
|
||||||
}
|
}
|
||||||
info.file=file;
|
info.file = file;
|
||||||
uploadRef.value.clearFiles();
|
uploadRef.value.clearFiles();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -98,8 +98,8 @@ function isJSON(str, showMsg) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function updateJson(val){
|
function updateJson(val) {
|
||||||
info.jsonData=val;
|
info.jsonData = val;
|
||||||
}
|
}
|
||||||
// 文件读取
|
// 文件读取
|
||||||
function uploadFile(file) {
|
function uploadFile(file) {
|
||||||
|
@ -118,16 +118,25 @@ function handleFileRemove() {
|
||||||
}
|
}
|
||||||
function handleFileExceed() {
|
function handleFileExceed() {
|
||||||
}
|
}
|
||||||
function checkForm(){
|
function checkForm() {
|
||||||
if(info.file){
|
if (info.file) {
|
||||||
return info.jsonData
|
return info.jsonData
|
||||||
}else{
|
} else {
|
||||||
ElMessage.error("请选择推理参数文件!");
|
ElMessage.error("请选择推理参数文件!");
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const returnData = (d) => {
|
||||||
|
if(d && isJSON(d,false)){
|
||||||
|
info.jsonData=JSON.parse(d);
|
||||||
|
info.file=true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
defineExpose({
|
defineExpose({
|
||||||
checkForm
|
checkForm,
|
||||||
|
returnData
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|
|
@ -159,6 +159,7 @@ const updateState = (s) => {
|
||||||
const updateLogs = (logs) => {
|
const updateLogs = (logs) => {
|
||||||
info.logs = logs;
|
info.logs = logs;
|
||||||
};
|
};
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
handleQuery();
|
handleQuery();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue