|
@@ -52,6 +52,7 @@
|
|
|
'detail-action',
|
|
|
{ 'detail-action-fullscreen': isFullscreenMarking }
|
|
|
]"
|
|
|
+ v-show="!multipleGradingList.length"
|
|
|
>
|
|
|
<grade-action
|
|
|
:cur-paper-or-task="curPaper"
|
|
@@ -63,6 +64,32 @@
|
|
|
v-if="curPaper.id"
|
|
|
></grade-action>
|
|
|
</div>
|
|
|
+ <!-- multiple grading action -->
|
|
|
+ <div class="detail-action" v-show="multipleGradingList.length">
|
|
|
+ <div class="grade-action">
|
|
|
+ <div class="action-paper-state">
|
|
|
+ <p class="paper-state-cont">批量操作</p>
|
|
|
+ </div>
|
|
|
+ <div class="action-grade-list">
|
|
|
+ <div
|
|
|
+ class="action-grade-item"
|
|
|
+ v-for="(level, index) in levels"
|
|
|
+ :key="index"
|
|
|
+ >
|
|
|
+ <div
|
|
|
+ :class="[
|
|
|
+ 'action-grade-item-content',
|
|
|
+ { 'action-item-content-disabled': multiplebtnClicked }
|
|
|
+ ]"
|
|
|
+ @click="multipleSelectLevel(level)"
|
|
|
+ >
|
|
|
+ <p>{{ level.name }}</p>
|
|
|
+ <p>{{ level.minScore }}~{{ level.maxScore }}</p>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
<!-- detail-papers -->
|
|
|
<div :class="detailPapersClasses">
|
|
|
<div class="detail-papers-carousel">
|
|
@@ -78,6 +105,10 @@
|
|
|
v-if="levels.length && filter.questionId"
|
|
|
ref="GradeStandardPaper"
|
|
|
></grade-standard-paper>
|
|
|
+ <div
|
|
|
+ class="detail-papers-carousel-split"
|
|
|
+ v-if="ACTION_CAN_BATCH"
|
|
|
+ ></div>
|
|
|
<grade-history-paper
|
|
|
:question-id="filter.questionId"
|
|
|
@on-paper-click="
|
|
@@ -107,6 +138,15 @@
|
|
|
@click="toReview(index)"
|
|
|
/>
|
|
|
</div>
|
|
|
+ <div
|
|
|
+ :class="[
|
|
|
+ 'image-view-actions',
|
|
|
+ { 'image-view-selected': image.selected },
|
|
|
+ { 'image-view-disabled': image.sample }
|
|
|
+ ]"
|
|
|
+ :title="image.sample ? '标准卷' : '选中批量操作'"
|
|
|
+ @click="selectMultiplePaper(image)"
|
|
|
+ ></div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="part-page" v-if="total > size">
|
|
@@ -177,7 +217,8 @@ import {
|
|
|
areaList,
|
|
|
workLevelList,
|
|
|
taskSnSearch,
|
|
|
- subjectDetail
|
|
|
+ subjectDetail,
|
|
|
+ markHistoryList
|
|
|
} from "@/api";
|
|
|
import SimpleImagePreview from "@/components/SimpleImagePreview";
|
|
|
import GradeStep from "./components/GradeStep";
|
|
@@ -211,8 +252,7 @@ export default {
|
|
|
return {
|
|
|
filter: {
|
|
|
questionId: "",
|
|
|
- sort: "secretNumber",
|
|
|
- isSample: false
|
|
|
+ sort: "secretNumber"
|
|
|
},
|
|
|
typeFilter: {
|
|
|
done: {
|
|
@@ -249,6 +289,9 @@ export default {
|
|
|
carouselPapers: [],
|
|
|
curCarouselPaperIndex: 0,
|
|
|
isFullscreenMarking: false,
|
|
|
+ // multiple grading
|
|
|
+ multiplebtnClicked: false,
|
|
|
+ multipleGradingList: [],
|
|
|
// export
|
|
|
renderExportPage: false,
|
|
|
renderChartData: {},
|
|
@@ -275,6 +318,9 @@ export default {
|
|
|
IS_TEST() {
|
|
|
return this.curSubject.test === 2;
|
|
|
},
|
|
|
+ ACTION_CAN_BATCH() {
|
|
|
+ return this.curStep.type === "done" && this.IS_MARK_LEADER;
|
|
|
+ },
|
|
|
imagePreviewClasses() {
|
|
|
return this.IS_ADMIN
|
|
|
? "grading-detail-image-preview"
|
|
@@ -298,6 +344,7 @@ export default {
|
|
|
this.getStepLevels();
|
|
|
},
|
|
|
async getList() {
|
|
|
+ this.multipleGradingList = [];
|
|
|
const datas = {
|
|
|
...this.filter,
|
|
|
...this.typeFilter[this.curStep.type],
|
|
@@ -309,6 +356,7 @@ export default {
|
|
|
const data = await paperList(datas);
|
|
|
this.papers = data.data.map(paper => {
|
|
|
paper.title = this.IS_ADMIN ? paper.examNumber : `NO.${paper.sn}`;
|
|
|
+ paper.selected = false;
|
|
|
return paper;
|
|
|
});
|
|
|
this.total = data.totalCount;
|
|
@@ -325,29 +373,34 @@ export default {
|
|
|
const data = await levelStatData(this.subjectId, this.filter.questionId);
|
|
|
const undoIndex = data.findIndex(item => item.id === null);
|
|
|
let otherStep = [];
|
|
|
+ let undo = {
|
|
|
+ count: 0,
|
|
|
+ rejected: 0,
|
|
|
+ arbitrated: 0
|
|
|
+ };
|
|
|
if (undoIndex !== -1) {
|
|
|
- const undo = { ...data[undoIndex] };
|
|
|
+ undo = { ...data[undoIndex] };
|
|
|
data.splice(undoIndex, 1);
|
|
|
+ }
|
|
|
|
|
|
- if (this.IS_MARK_LEADER && this.IS_TEST) {
|
|
|
- otherStep.push({
|
|
|
- name: "待评",
|
|
|
- count: undo.count,
|
|
|
- type: "undo"
|
|
|
- });
|
|
|
- }
|
|
|
-
|
|
|
+ if (this.IS_MARK_LEADER && this.IS_TEST) {
|
|
|
otherStep.push({
|
|
|
- name: "打回",
|
|
|
- count: undo.rejected,
|
|
|
- type: "reject"
|
|
|
- });
|
|
|
- otherStep.push({
|
|
|
- name: "仲裁",
|
|
|
- count: undo.arbitrated,
|
|
|
- type: "arbitrate"
|
|
|
+ name: "待评",
|
|
|
+ count: undo.count,
|
|
|
+ type: "undo"
|
|
|
});
|
|
|
}
|
|
|
+ otherStep.push({
|
|
|
+ name: "打回",
|
|
|
+ count: undo.rejected,
|
|
|
+ type: "reject"
|
|
|
+ });
|
|
|
+ otherStep.push({
|
|
|
+ name: "仲裁",
|
|
|
+ count: undo.arbitrated,
|
|
|
+ type: "arbitrate"
|
|
|
+ });
|
|
|
+
|
|
|
let levelStep = data.map(item => {
|
|
|
return {
|
|
|
...item,
|
|
@@ -394,15 +447,47 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
areaChange() {
|
|
|
+ this.getStepLevels();
|
|
|
if (this.curStep.type === "analysis") {
|
|
|
this.$nextTick(() => {
|
|
|
this.$refs.GradeAnalysis.initData();
|
|
|
});
|
|
|
} else {
|
|
|
- this.getStepLevels();
|
|
|
this.toPage(1);
|
|
|
}
|
|
|
},
|
|
|
+ // selectMultiplePaper
|
|
|
+ selectMultiplePaper(paper) {
|
|
|
+ if (paper.sample) return;
|
|
|
+ paper.selected = !paper.selected;
|
|
|
+ this.multipleGradingList = this.papers.filter(paper => paper.selected);
|
|
|
+ },
|
|
|
+ async multipleSelectLevel(level) {
|
|
|
+ if (!this.multipleGradingList.length) return;
|
|
|
+ if (this.multiplebtnClicked) return;
|
|
|
+ this.multiplebtnClicked = true;
|
|
|
+
|
|
|
+ const data = await markHistoryList(
|
|
|
+ this.multipleGradingList[0].id,
|
|
|
+ "LEVEL"
|
|
|
+ ).catch(() => {});
|
|
|
+ this.multiplebtnClicked = false;
|
|
|
+ if (!data) return;
|
|
|
+
|
|
|
+ this.markers = data.map(item => {
|
|
|
+ return {
|
|
|
+ id: item.markerId,
|
|
|
+ name: item.marker
|
|
|
+ };
|
|
|
+ });
|
|
|
+ this.levelInfo = {
|
|
|
+ paperIds: this.multipleGradingList.map(item => item.id).join(),
|
|
|
+ curLevel: this.curStep.name,
|
|
|
+ selectedLevel: level.name
|
|
|
+ };
|
|
|
+ this.$refs.ModifyLeaderGrading.open();
|
|
|
+ },
|
|
|
+ // to review
|
|
|
toReview(index) {
|
|
|
this.isFullscreenMarking = true;
|
|
|
this.selectPaper(index);
|
|
@@ -485,13 +570,30 @@ export default {
|
|
|
this.markers = markers;
|
|
|
this.$refs.ModifyLeaderGrading.open();
|
|
|
},
|
|
|
- leaderGradingSuccess(datas, paper) {
|
|
|
+ async leaderGradingSuccess(datas, paper) {
|
|
|
if (datas.action === "sampling") {
|
|
|
this.$refs.GradeStandardPaper.updateLevelPapers(datas.level);
|
|
|
}
|
|
|
this.getStepLevels();
|
|
|
this.updateHistory();
|
|
|
- this.toActionNextPaper();
|
|
|
+
|
|
|
+ if (this.multipleGradingList && this.multipleGradingList.length) {
|
|
|
+ // 批量处理逻辑
|
|
|
+ if (
|
|
|
+ this.current > 1 &&
|
|
|
+ this.current === this.pageCount &&
|
|
|
+ this.papers.length === this.multipleGradingList.length
|
|
|
+ ) {
|
|
|
+ this.current--;
|
|
|
+ }
|
|
|
+
|
|
|
+ this.multipleGradingList = [];
|
|
|
+ await this.getList();
|
|
|
+ this.selectPaper(this.curPaperIndex);
|
|
|
+ } else {
|
|
|
+ // 单张处理逻辑
|
|
|
+ this.toActionNextPaper();
|
|
|
+ }
|
|
|
},
|
|
|
// paper carousel
|
|
|
toViewCarouselPaper(paperIndex, papers, type) {
|