update code
parent
682cf2a917
commit
201e885fec
|
@ -52,6 +52,9 @@ const findOne = (id) => {
|
||||||
method: "get"
|
method: "get"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//获取算子详情
|
//获取算子详情
|
||||||
const uploadProgramsFile = (data) => {
|
const uploadProgramsFile = (data) => {
|
||||||
return request({
|
return request({
|
||||||
|
@ -69,5 +72,6 @@ export default {
|
||||||
deletePrograms,
|
deletePrograms,
|
||||||
deleteOperator,
|
deleteOperator,
|
||||||
findOne,
|
findOne,
|
||||||
uploadProgramsFile
|
uploadProgramsFile,
|
||||||
|
|
||||||
}
|
}
|
|
@ -126,6 +126,7 @@
|
||||||
import choiceTaskDlg from './components/choiceTaskDlg.vue'
|
import choiceTaskDlg from './components/choiceTaskDlg.vue'
|
||||||
import ReportApi from '@/api/report'
|
import ReportApi from '@/api/report'
|
||||||
import OperatorApi from '@/api/operator'
|
import OperatorApi from '@/api/operator'
|
||||||
|
import LogApi from '@/api/log'
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const info = reactive({
|
const info = reactive({
|
||||||
tableData: [],
|
tableData: [],
|
||||||
|
@ -136,7 +137,8 @@ const info = reactive({
|
||||||
lvl2: [],
|
lvl2: [],
|
||||||
},
|
},
|
||||||
choiceType: '',
|
choiceType: '',
|
||||||
opId:null,
|
optId:null,
|
||||||
|
reportId:null,
|
||||||
})
|
})
|
||||||
|
|
||||||
const loading=ref(false);
|
const loading=ref(false);
|
||||||
|
@ -188,22 +190,24 @@ function doMakeReport(){
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
ReportApi.addReport(postData).then(d=>{
|
ReportApi.addReport(postData).then(d=>{
|
||||||
debugger
|
info.optId=d.data.data.operation_id;
|
||||||
//info.opId=d.data.op_id;
|
info.reportId=d.data.data.report_id;
|
||||||
//loadOpLog();
|
loadOptLog();
|
||||||
loading.value = false;
|
|
||||||
let reportId=d.data?.data?.report_id||'';
|
|
||||||
if(reportId){
|
|
||||||
router.push({ path: "/simulationEvaluation/reportDesc", query: { id:reportId} });
|
|
||||||
ElMessage.success("生成报告成功!");
|
|
||||||
}else{
|
|
||||||
ElMessage.error("生成报告失败!");
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
const loadOpLog=()=>{
|
const loadOptLog=()=>{
|
||||||
OperatorApi.findOne(id).then(d=>{
|
LogApi.userOperation(info.optId).then(d=>{
|
||||||
debugger
|
if(!d.data.data.operation_finished){
|
||||||
|
setTimeout(loadOptLog,3000);
|
||||||
|
}else{
|
||||||
|
loading.value = false;
|
||||||
|
if(d.data.data.operation_success){
|
||||||
|
router.push({ path: "/simulationEvaluation/reportDesc", query: { id:info.reportId} });
|
||||||
|
ElMessage.success("生成报告成功!");
|
||||||
|
}else{
|
||||||
|
ElMessage.error("生成报告失败!");
|
||||||
|
}
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
//删除已选择
|
//删除已选择
|
||||||
|
|
Loading…
Reference in New Issue