update code
parent
682cf2a917
commit
201e885fec
|
@ -52,6 +52,9 @@ const findOne = (id) => {
|
|||
method: "get"
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
//获取算子详情
|
||||
const uploadProgramsFile = (data) => {
|
||||
return request({
|
||||
|
@ -69,5 +72,6 @@ export default {
|
|||
deletePrograms,
|
||||
deleteOperator,
|
||||
findOne,
|
||||
uploadProgramsFile
|
||||
uploadProgramsFile,
|
||||
|
||||
}
|
|
@ -126,6 +126,7 @@
|
|||
import choiceTaskDlg from './components/choiceTaskDlg.vue'
|
||||
import ReportApi from '@/api/report'
|
||||
import OperatorApi from '@/api/operator'
|
||||
import LogApi from '@/api/log'
|
||||
const router = useRouter();
|
||||
const info = reactive({
|
||||
tableData: [],
|
||||
|
@ -136,7 +137,8 @@ const info = reactive({
|
|||
lvl2: [],
|
||||
},
|
||||
choiceType: '',
|
||||
opId:null,
|
||||
optId:null,
|
||||
reportId:null,
|
||||
})
|
||||
|
||||
const loading=ref(false);
|
||||
|
@ -188,22 +190,24 @@ function doMakeReport(){
|
|||
};
|
||||
}
|
||||
ReportApi.addReport(postData).then(d=>{
|
||||
debugger
|
||||
//info.opId=d.data.op_id;
|
||||
//loadOpLog();
|
||||
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("生成报告失败!");
|
||||
}
|
||||
info.optId=d.data.data.operation_id;
|
||||
info.reportId=d.data.data.report_id;
|
||||
loadOptLog();
|
||||
});
|
||||
}
|
||||
const loadOpLog=()=>{
|
||||
OperatorApi.findOne(id).then(d=>{
|
||||
debugger
|
||||
const loadOptLog=()=>{
|
||||
LogApi.userOperation(info.optId).then(d=>{
|
||||
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