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