Browse Source

feat: 评测作业是否已经合格

TIANYONG 5 months ago
parent
commit
e1558ff462
1 changed files with 4 additions and 0 deletions
  1. 4 0
      src/page-instrument/custom-plugins/work-index/index.tsx

+ 4 - 0
src/page-instrument/custom-plugins/work-index/index.tsx

@@ -49,6 +49,10 @@ export default defineComponent({
 			if (res?.code === 200) {
 				data.trainingType = res.data.trainingType;
 				data.worke = res.data;
+				// 评测作业是否已经合格
+				if (data.trainingType === 'EVALUATION' && JSON.parse(res.data?.trainingContent)) {
+					state.isWorkDone = res.data.trainingTimes >= JSON.parse(res.data.trainingContent).trainingTimes
+				}
 				setModelType();
 			}
 		};