|
@@ -136,10 +136,11 @@ import {
|
|
|
getParamsSet,
|
|
|
markerTaskList,
|
|
|
markerChangeLevelPaperList,
|
|
|
- markerScoreStatData,
|
|
|
+ markerScoreTotalStatData,
|
|
|
workLevelList,
|
|
|
subjectDetail,
|
|
|
paperSelectLevelOrScore,
|
|
|
+ markerManualScorePaperList,
|
|
|
paperTaskPass
|
|
|
} from "@/api";
|
|
|
import SimpleImagePreview from "@/components/SimpleImagePreview";
|
|
@@ -187,7 +188,8 @@ export default {
|
|
|
shiftScore: {
|
|
|
isShift: false,
|
|
|
isShiftScore: true
|
|
|
- }
|
|
|
+ },
|
|
|
+ manualScore: {}
|
|
|
},
|
|
|
workId: this.$route.params.workId,
|
|
|
subjectId: this.$route.params.subjectId,
|
|
@@ -258,9 +260,15 @@ export default {
|
|
|
if (this.curStep.type === "done") {
|
|
|
datas.level = this.curStep.name;
|
|
|
}
|
|
|
- const requestAction = this.curStep.type.includes("shift")
|
|
|
- ? markerChangeLevelPaperList
|
|
|
- : markerTaskList;
|
|
|
+
|
|
|
+ let requestAction = null;
|
|
|
+ if (this.curStep.type.includes("shift")) {
|
|
|
+ requestAction = markerChangeLevelPaperList;
|
|
|
+ } else if (this.curStep.type === "manualScore") {
|
|
|
+ requestAction = markerManualScorePaperList;
|
|
|
+ } else {
|
|
|
+ requestAction = markerTaskList;
|
|
|
+ }
|
|
|
|
|
|
const data = await requestAction(datas);
|
|
|
this.papers = data.data.map(paper => {
|
|
@@ -276,7 +284,7 @@ export default {
|
|
|
this.selectPaper(this.curPaperIndex);
|
|
|
},
|
|
|
async getStepLevels() {
|
|
|
- const data = await markerScoreStatData(
|
|
|
+ const data = await markerScoreTotalStatData(
|
|
|
this.filter.markerId,
|
|
|
this.filter.questionId
|
|
|
);
|
|
@@ -309,13 +317,25 @@ export default {
|
|
|
type: "shiftScore"
|
|
|
});
|
|
|
}
|
|
|
- let levelStep = data.map(item => {
|
|
|
- return {
|
|
|
- ...item,
|
|
|
- name: item.id,
|
|
|
- type: "done"
|
|
|
- };
|
|
|
- });
|
|
|
+
|
|
|
+ let levelStep = data
|
|
|
+ .filter(item => item.id !== "manualScore")
|
|
|
+ .map(item => {
|
|
|
+ return {
|
|
|
+ ...item,
|
|
|
+ name: item.id,
|
|
|
+ type: "done"
|
|
|
+ };
|
|
|
+ });
|
|
|
+ const msInfo = data.find(item => item.id === "manualScore");
|
|
|
+ if (msInfo) {
|
|
|
+ levelStep.push({
|
|
|
+ count: msInfo.count,
|
|
|
+ name: "输分试卷",
|
|
|
+ type: "manualScore"
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
this.steps = { levelStep, otherStep };
|
|
|
|
|
|
if (!this.curStep) {
|
|
@@ -328,6 +348,26 @@ export default {
|
|
|
this.curStep = curStep;
|
|
|
}
|
|
|
},
|
|
|
+ updateStepLevel(curStep, curLevel, count = 1) {
|
|
|
+ if (curStep.type === "done") return;
|
|
|
+
|
|
|
+ const opos = this.steps.otherStep.findIndex(
|
|
|
+ item => item.type === curStep.type
|
|
|
+ );
|
|
|
+ this.steps.otherStep[opos].count -= count;
|
|
|
+
|
|
|
+ if (curStep.type === "shift") {
|
|
|
+ const spos = this.steps.otherStep.findIndex(
|
|
|
+ item => item.type === "shiftScore"
|
|
|
+ );
|
|
|
+ this.steps.otherStep[spos].count += count;
|
|
|
+ } else {
|
|
|
+ const pos = this.steps.levelStep.findIndex(
|
|
|
+ item => item.name === curLevel
|
|
|
+ );
|
|
|
+ this.steps.levelStep[pos].count += count;
|
|
|
+ }
|
|
|
+ },
|
|
|
async getWorkLevels() {
|
|
|
const data = await workLevelList(this.workId);
|
|
|
this.levels = data.map(item => {
|
|
@@ -346,6 +386,7 @@ export default {
|
|
|
this.curStep = step;
|
|
|
this.current = 1;
|
|
|
await this.getList();
|
|
|
+ this.getStepLevels();
|
|
|
if (this.papers.length) {
|
|
|
this.selectPaper(0);
|
|
|
} else {
|
|
@@ -357,6 +398,7 @@ export default {
|
|
|
this.filter.questionId = curArea.id;
|
|
|
await this.getStepLevels();
|
|
|
this.toPage(1);
|
|
|
+ this.updateHistory();
|
|
|
},
|
|
|
toReview(index) {
|
|
|
this.isFullscreenMarking = true;
|
|
@@ -435,19 +477,18 @@ export default {
|
|
|
selectedLevel,
|
|
|
"LEVEL"
|
|
|
);
|
|
|
- this.getStepLevels();
|
|
|
- this.updateHistory();
|
|
|
+ this.updateStepLevel(this.curStep, "shiftScore");
|
|
|
this.toActionNextPaper();
|
|
|
},
|
|
|
async scoreCurPaper(info) {
|
|
|
- await paperSelectLevelOrScore(
|
|
|
+ const paper = await paperSelectLevelOrScore(
|
|
|
this.curPaper.id, // is taskId
|
|
|
info.score,
|
|
|
"SCORE",
|
|
|
info.manualScore
|
|
|
);
|
|
|
this.getStepLevels();
|
|
|
- this.updateHistory();
|
|
|
+ this.updateCacheHistory([paper]);
|
|
|
this.toActionNextPaper();
|
|
|
},
|
|
|
async passCurPaper(level) {
|
|
@@ -457,6 +498,9 @@ export default {
|
|
|
updateHistory() {
|
|
|
this.$refs.GradeHistoryPaper.updatePapers();
|
|
|
},
|
|
|
+ updateCacheHistory(papers) {
|
|
|
+ this.$refs.GradeHistoryPaper.updateCachePapers(papers);
|
|
|
+ },
|
|
|
// paper carousel
|
|
|
toViewCarouselPaper(paperIndex, papers) {
|
|
|
this.isFullscreenMarking = true;
|