|
@@ -62,7 +62,11 @@ import MarkParamStructure from "./MarkParamStructure.vue";
|
|
import MarkParamGroup from "./MarkParamGroup.vue";
|
|
import MarkParamGroup from "./MarkParamGroup.vue";
|
|
import MarkParamClass from "./MarkParamClass.vue";
|
|
import MarkParamClass from "./MarkParamClass.vue";
|
|
import MarkParamObjectiveAnswer from "./MarkParamObjectiveAnswer.vue";
|
|
import MarkParamObjectiveAnswer from "./MarkParamObjectiveAnswer.vue";
|
|
-import { markStructureList, markSubjectiveList } from "../../api";
|
|
+import {
|
|
|
|
+ markStructureList,
|
|
|
|
+ markSubjectiveList,
|
|
|
|
+ markParamStepStatus,
|
|
|
|
+} from "../../api";
|
|
|
|
|
|
const steps = [
|
|
const steps = [
|
|
{
|
|
{
|
|
@@ -151,6 +155,22 @@ export default {
|
|
examId: this.instance.examId,
|
|
examId: this.instance.examId,
|
|
paperNumber: this.instance.paperNumber,
|
|
paperNumber: this.instance.paperNumber,
|
|
};
|
|
};
|
|
|
|
+ // check step status
|
|
|
|
+ const stepRes = await markParamStepStatus(params);
|
|
|
|
+ const stepMap = {
|
|
|
|
+ subjectiveStruct: 0,
|
|
|
|
+ subjectiveMarker: 1,
|
|
|
|
+ subjectiveMarkerClass: 2,
|
|
|
|
+ objectiveAnswer: 3,
|
|
|
|
+ };
|
|
|
|
+ const finishedSteps = Object.keys(stepMap)
|
|
|
|
+ .filter((key) => stepRes[key])
|
|
|
|
+ .map((key) => stepMap[key]);
|
|
|
|
+ this.curStepIndex = Math.max(...finishedSteps);
|
|
|
|
+ if (this.curStepIndex !== this.lastStep) {
|
|
|
|
+ this.curStepIndex++;
|
|
|
|
+ }
|
|
|
|
+ this.initSteps();
|
|
|
|
|
|
// structure
|
|
// structure
|
|
const structRes = await markStructureList(params);
|
|
const structRes = await markStructureList(params);
|
|
@@ -169,22 +189,14 @@ export default {
|
|
this.setPaperStructureInfo(questions || []);
|
|
this.setPaperStructureInfo(questions || []);
|
|
this.setStructureCanEdit(structRes.canCreate);
|
|
this.setStructureCanEdit(structRes.canCreate);
|
|
this.questionSubmit = structRes.questionSubmit;
|
|
this.questionSubmit = structRes.questionSubmit;
|
|
- if (questions && questions.length) {
|
|
+
|
|
- // TODO:这里的判断需要调整
|
|
|
|
- this.curStepIndex = 1;
|
|
|
|
- }
|
|
|
|
// group
|
|
// group
|
|
const subjectRes = await markSubjectiveList(params);
|
|
const subjectRes = await markSubjectiveList(params);
|
|
this.setSubjectiveTaskList(subjectRes.questions || []);
|
|
this.setSubjectiveTaskList(subjectRes.questions || []);
|
|
this.setOpenMergeMarker(!!subjectRes.mergeMarker);
|
|
this.setOpenMergeMarker(!!subjectRes.mergeMarker);
|
|
this.setOpenDoubleMark(!!subjectRes.doubleMark);
|
|
this.setOpenDoubleMark(!!subjectRes.doubleMark);
|
|
this.setOpenClassMark(!!subjectRes.classMark);
|
|
this.setOpenClassMark(!!subjectRes.classMark);
|
|
- if (subjectRes.questionsList && subjectRes.questionsList.length) {
|
|
|
|
- // TODO:这里的判断需要调整
|
|
|
|
- this.curStepIndex = 2;
|
|
|
|
- }
|
|
|
|
|
|
|
|
- this.initSteps();
|
|
|
|
this.dataReady = true;
|
|
this.dataReady = true;
|
|
},
|
|
},
|
|
initSteps() {
|
|
initSteps() {
|