|
@@ -599,26 +599,25 @@ export default {
|
|
|
this.selectPaper(this.curPaperIndex);
|
|
|
},
|
|
|
// paper view action
|
|
|
- markChange(mark) {
|
|
|
- if (this.carouselType) {
|
|
|
- this.carouselPapers[this.curCarouselPaperIndex].mark = mark;
|
|
|
- } else {
|
|
|
- this.papers[this.curPaperIndex].mark = mark;
|
|
|
- }
|
|
|
+ markChange(curPaperOrTask) {
|
|
|
+ const dataList = this.carouselType ? this.carouselPapers : this.papers;
|
|
|
+ const row = dataList.find((item) => item.id === curPaperOrTask.id);
|
|
|
+ if (!row) return;
|
|
|
+ row.mark = curPaperOrTask.mark;
|
|
|
|
|
|
const spos = this.steps.otherStep.findIndex(
|
|
|
(item) => item.type === "markPaper"
|
|
|
);
|
|
|
if (spos === -1) return;
|
|
|
- if (mark) {
|
|
|
+ if (curPaperOrTask.mark) {
|
|
|
this.steps.otherStep[spos].count++;
|
|
|
} else {
|
|
|
this.steps.otherStep[spos].count--;
|
|
|
if (this.curStep.type === "markPaper") this.getList();
|
|
|
}
|
|
|
},
|
|
|
- async historyMarkChange(mark) {
|
|
|
- this.markChange(mark);
|
|
|
+ async historyMarkChange(curPaperOrTask) {
|
|
|
+ this.markChange(curPaperOrTask);
|
|
|
const data = await this.$refs.MarkerHistory.updatePapers();
|
|
|
this.carouselPapers = data || [];
|
|
|
},
|