|
@@ -4,8 +4,10 @@
|
|
|
@area-change="areaChange"
|
|
|
@step-change="stepChange"
|
|
|
@page-set-change="pageSetChange"
|
|
|
+ @to-progress="toProgress"
|
|
|
@to-history="toHistory"
|
|
|
@to-standard="toStandard"
|
|
|
+ @to-statistics="toStatistics"
|
|
|
></marker-header>
|
|
|
|
|
|
<div
|
|
@@ -19,8 +21,8 @@
|
|
|
:cur-paper-or-task="curPaper"
|
|
|
:levels="levels"
|
|
|
:params-set="paramsSet"
|
|
|
- @on-select-level="gradeCurPaper"
|
|
|
- @on-pass="passCurPaper"
|
|
|
+ @on-leader-level="leaderSelectLevel"
|
|
|
+ @on-code-search="serachPaperByCode"
|
|
|
ref="GradeAction"
|
|
|
v-if="curPaper.id"
|
|
|
></grade-action>
|
|
@@ -29,7 +31,7 @@
|
|
|
<div class="marker-action" v-show="multipleGradingList.length">
|
|
|
<div class="grade-action">
|
|
|
<div class="action-paper-state">
|
|
|
- <p class="paper-state-cont">批量分档</p>
|
|
|
+ <p class="paper-state-cont">批量操作</p>
|
|
|
</div>
|
|
|
<div class="action-paper-info">
|
|
|
<p><span>任务密号:</span><span>--</span></p>
|
|
@@ -79,6 +81,13 @@
|
|
|
<div v-else class="marker-image-none">暂无数据</div>
|
|
|
</div>
|
|
|
|
|
|
+ <!-- LeaderStatistics -->
|
|
|
+ <leader-statistics
|
|
|
+ :question-id="filter.questionId"
|
|
|
+ ref="LeaderStatistics"
|
|
|
+ ></leader-statistics>
|
|
|
+ <!-- LeaderProgress -->
|
|
|
+ <leader-progress ref="LeaderProgress"></leader-progress>
|
|
|
<!-- MarkerHistory -->
|
|
|
<marker-history
|
|
|
:question-id="filter.questionId"
|
|
@@ -101,6 +110,13 @@
|
|
|
ref="MarkerStandard"
|
|
|
v-if="levels.length && filter.questionId && paramsSet.showSample"
|
|
|
></marker-standard>
|
|
|
+ <!-- modify-leader-grading -->
|
|
|
+ <modify-leader-grading
|
|
|
+ :level-info="levelInfo"
|
|
|
+ :markers="markers"
|
|
|
+ @modified="leaderGradingSuccess"
|
|
|
+ ref="ModifyLeaderGrading"
|
|
|
+ ></modify-leader-grading>
|
|
|
<!-- image-preview -->
|
|
|
<simple-image-preview
|
|
|
class="grading-operation-image-preview"
|
|
@@ -110,7 +126,6 @@
|
|
|
@on-close="isFullscreenMarking = false"
|
|
|
ref="SimpleImagePreview"
|
|
|
></simple-image-preview>
|
|
|
-
|
|
|
<!-- carousel paper review -->
|
|
|
<simple-image-preview
|
|
|
class="grading-operation-image-preview"
|
|
@@ -125,21 +140,25 @@
|
|
|
|
|
|
<script>
|
|
|
import { mapState, mapMutations } from "vuex";
|
|
|
-import MarkerHeader from "./MarkerHeader";
|
|
|
-import MarkerImageView from "./MarkerImageView";
|
|
|
-import MarkerHistory from "./MarkerHistory";
|
|
|
-import MarkerStandard from "./MarkerStandard";
|
|
|
+import MarkerHeader from "../marker/MarkerHeader";
|
|
|
+import MarkerImageView from "../marker/MarkerImageView";
|
|
|
+import MarkerHistory from "../marker/MarkerHistory";
|
|
|
+import MarkerStandard from "../marker/MarkerStandard";
|
|
|
+import LeaderProgress from "./LeaderProgress";
|
|
|
+import LeaderStatistics from "./LeaderStatistics";
|
|
|
import GradeAction from "../components/GradeAction";
|
|
|
import SimpleImagePreview from "@/components/SimpleImagePreview";
|
|
|
+import ModifyLeaderGrading from "../components/ModifyLeaderGrading";
|
|
|
|
|
|
import {
|
|
|
- markerTaskList,
|
|
|
- markerLevelTotalStatData,
|
|
|
+ paperList,
|
|
|
+ levelStatData,
|
|
|
workLevelList,
|
|
|
- paperSelectLevelOrScore,
|
|
|
- paperSelectLevelBatch,
|
|
|
- paperTaskPass,
|
|
|
- getParamsSet
|
|
|
+ taskSnSearch,
|
|
|
+ subjectDetail,
|
|
|
+ markHistoryList,
|
|
|
+ getParamsSet,
|
|
|
+ leaderGradingPaper
|
|
|
} from "@/api";
|
|
|
|
|
|
export default {
|
|
@@ -149,58 +168,62 @@ export default {
|
|
|
MarkerImageView,
|
|
|
MarkerHistory,
|
|
|
MarkerStandard,
|
|
|
+ LeaderProgress,
|
|
|
+ LeaderStatistics,
|
|
|
GradeAction,
|
|
|
- SimpleImagePreview
|
|
|
+ SimpleImagePreview,
|
|
|
+ ModifyLeaderGrading
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
filter: {
|
|
|
- markerId: this.$ls.get("user").id,
|
|
|
questionId: "",
|
|
|
- sort: "randomSeq,asc",
|
|
|
- stage: "LEVEL"
|
|
|
+ sort: "secretNumber"
|
|
|
},
|
|
|
typeFilter: {
|
|
|
done: {
|
|
|
level: ""
|
|
|
},
|
|
|
- undo: {},
|
|
|
reject: {
|
|
|
reject: true
|
|
|
+ },
|
|
|
+ arbitrate: {
|
|
|
+ arbi: true
|
|
|
}
|
|
|
},
|
|
|
workId: this.$route.params.workId,
|
|
|
subjectId: this.$route.params.subjectId,
|
|
|
- subject: "",
|
|
|
- workSubject: {},
|
|
|
- curStandardGradeId: "",
|
|
|
levels: [],
|
|
|
- curArea: {},
|
|
|
papers: [],
|
|
|
curPaper: {},
|
|
|
curPaperIndex: 0,
|
|
|
- // multiple grading
|
|
|
- multiplebtnClicked: false,
|
|
|
- multipleGradingList: [],
|
|
|
+ // leader-grade
|
|
|
+ levelInfo: {},
|
|
|
+ markers: [],
|
|
|
// carousel paper review,
|
|
|
carouselType: "",
|
|
|
carouselPapers: [],
|
|
|
curCarouselPaperIndex: 0,
|
|
|
- isFullscreenMarking: false
|
|
|
+ isFullscreenMarking: false,
|
|
|
+ // multiple grading
|
|
|
+ multiplebtnClicked: false,
|
|
|
+ multipleGradingList: []
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
- ...mapState("marker", ["paramsSet", "page", "steps", "curStep"]),
|
|
|
+ ...mapState("marker", [
|
|
|
+ "paramsSet",
|
|
|
+ "page",
|
|
|
+ "steps",
|
|
|
+ "curStep",
|
|
|
+ "curArea",
|
|
|
+ "curSubject"
|
|
|
+ ]),
|
|
|
markerImageListClasses() {
|
|
|
return ["marker-image-list", `marker-image-list-${this.page.size}`];
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
- this.subject = this.subjectId.split("-")[1];
|
|
|
- this.workSubject = {
|
|
|
- workId: this.workId,
|
|
|
- subject: this.subject
|
|
|
- };
|
|
|
this.initData();
|
|
|
},
|
|
|
methods: {
|
|
@@ -208,36 +231,41 @@ export default {
|
|
|
"setParamSet",
|
|
|
"setPage",
|
|
|
"setSteps",
|
|
|
- "setCurStep"
|
|
|
+ "setCurStep",
|
|
|
+ "setCurArea",
|
|
|
+ "setCurSubject",
|
|
|
+ "clearState"
|
|
|
]),
|
|
|
async initData() {
|
|
|
await this.getParamsSetInfo();
|
|
|
+ await this.getSubjectDetail();
|
|
|
await this.getWorkLevels();
|
|
|
},
|
|
|
async getParamsSetInfo() {
|
|
|
const data = await getParamsSet(this.workId);
|
|
|
this.setParamSet(data || {});
|
|
|
},
|
|
|
+ async getSubjectDetail() {
|
|
|
+ const curSubject = await subjectDetail(this.subjectId);
|
|
|
+ this.setCurSubject(curSubject || {});
|
|
|
+ },
|
|
|
async getList() {
|
|
|
this.multipleGradingList = [];
|
|
|
const datas = {
|
|
|
...this.filter,
|
|
|
...this.typeFilter[this.curStep.type],
|
|
|
- workId: this.workId,
|
|
|
page: this.page.current - 1,
|
|
|
size: this.page.size
|
|
|
};
|
|
|
- if (this.curStep.type === "done") {
|
|
|
- datas.level = this.curStep.name;
|
|
|
- datas.sort = "updatedOn,desc";
|
|
|
- }
|
|
|
+ if (this.curStep.type === "done") datas.level = this.curStep.name;
|
|
|
|
|
|
- const data = await markerTaskList(datas);
|
|
|
+ const data = await paperList(datas);
|
|
|
this.papers = data.data.map(paper => {
|
|
|
paper.title = `NO.${paper.sn}`;
|
|
|
paper.selected = false;
|
|
|
return paper;
|
|
|
});
|
|
|
+
|
|
|
this.setPage({
|
|
|
total: data.totalCount,
|
|
|
totalPage: data.pageCount
|
|
@@ -251,34 +279,38 @@ export default {
|
|
|
this.selectPaper(this.curPaperIndex);
|
|
|
},
|
|
|
async getStepLevels() {
|
|
|
- const data = await markerLevelTotalStatData(
|
|
|
- this.filter.markerId,
|
|
|
- this.filter.questionId
|
|
|
- );
|
|
|
+ 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
|
|
|
+ rejected: 0,
|
|
|
+ arbitrated: 0
|
|
|
};
|
|
|
if (undoIndex !== -1) {
|
|
|
undo = { ...data[undoIndex] };
|
|
|
data.splice(undoIndex, 1);
|
|
|
}
|
|
|
|
|
|
- otherStep.push({
|
|
|
- name: "待评",
|
|
|
- count: undo.count,
|
|
|
- type: "undo"
|
|
|
- });
|
|
|
+ if (this.IS_MARK_LEADER && this.IS_TEST) {
|
|
|
+ otherStep.push({
|
|
|
+ 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 => {
|
|
|
- // 评卷员不展示kdpt
|
|
|
- item.kdpt = null;
|
|
|
return {
|
|
|
...item,
|
|
|
name: item.id,
|
|
@@ -288,13 +320,7 @@ export default {
|
|
|
this.setSteps({ levelStep, otherStep });
|
|
|
|
|
|
if (!this.curStep.name) {
|
|
|
- let curStep = {};
|
|
|
- if (undoIndex === -1) {
|
|
|
- curStep = levelStep[0];
|
|
|
- } else {
|
|
|
- curStep = otherStep[0];
|
|
|
- }
|
|
|
- this.setCurStep(curStep);
|
|
|
+ this.setCurStep(levelStep[0]);
|
|
|
} else {
|
|
|
const curStep = [...levelStep, ...otherStep].find(
|
|
|
item => item.name === this.curStep.name
|
|
@@ -302,32 +328,6 @@ export default {
|
|
|
this.setCurStep(curStep);
|
|
|
}
|
|
|
},
|
|
|
- updateStepLevel(curStep, curLevel, count) {
|
|
|
- if (curStep.type === "done") {
|
|
|
- const lpos = this.steps.levelStep.findIndex(
|
|
|
- item => item.name === curStep.name
|
|
|
- );
|
|
|
- this.steps.levelStep[lpos].count -= count;
|
|
|
- } else {
|
|
|
- const opos = this.steps.otherStep.findIndex(
|
|
|
- item => item.type === curStep.type
|
|
|
- );
|
|
|
- this.steps.otherStep[opos].count -= count;
|
|
|
- }
|
|
|
-
|
|
|
- const pos = this.steps.levelStep.findIndex(
|
|
|
- item => item.name === curLevel
|
|
|
- );
|
|
|
- this.steps.levelStep[pos].count += count;
|
|
|
-
|
|
|
- this.steps.levelStep.forEach(item => {
|
|
|
- item.percent =
|
|
|
- item.finalKdTotal && item.count
|
|
|
- ? ((100 * item.count) / item.finalKdTotal).toFixed(3)
|
|
|
- : 0;
|
|
|
- });
|
|
|
- this.setSteps(this.steps);
|
|
|
- },
|
|
|
async getWorkLevels() {
|
|
|
const data = await workLevelList(this.workId);
|
|
|
this.levels = data.map(item => {
|
|
@@ -348,7 +348,7 @@ export default {
|
|
|
this.setPage({ current: 1 });
|
|
|
this.isFullscreenMarking = false;
|
|
|
await this.getList();
|
|
|
- this.getStepLevels();
|
|
|
+ // this.getStepLevels();
|
|
|
if (this.papers.length) {
|
|
|
this.selectPaper(0);
|
|
|
} else {
|
|
@@ -356,7 +356,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
async areaChange(curArea) {
|
|
|
- this.curArea = curArea;
|
|
|
+ this.setCurArea(curArea);
|
|
|
this.filter.questionId = curArea.id;
|
|
|
await this.getStepLevels();
|
|
|
this.toPage(1);
|
|
@@ -367,41 +367,32 @@ export default {
|
|
|
const curPaper = this.papers.find(p => p.id === paper.id);
|
|
|
curPaper.selected = paper.selected;
|
|
|
this.multipleGradingList = this.papers.filter(paper => paper.selected);
|
|
|
- console.log(this.multipleGradingList);
|
|
|
},
|
|
|
async multipleSelectLevel(level) {
|
|
|
if (!this.multipleGradingList.length) return;
|
|
|
if (this.multiplebtnClicked) return;
|
|
|
+
|
|
|
this.multiplebtnClicked = true;
|
|
|
- const multipleGradingListCount = this.multipleGradingList.length;
|
|
|
|
|
|
- let result = true;
|
|
|
- await paperSelectLevelBatch(
|
|
|
- this.multipleGradingList.map(item => item.id).join(), // is taskId
|
|
|
- level.name,
|
|
|
+ const data = await markHistoryList(
|
|
|
+ this.multipleGradingList[0].id,
|
|
|
"LEVEL"
|
|
|
- ).catch(() => {
|
|
|
- result = false;
|
|
|
- });
|
|
|
-
|
|
|
+ ).catch(() => {});
|
|
|
this.multiplebtnClicked = false;
|
|
|
- if (!result) return;
|
|
|
-
|
|
|
- this.multipleGradingList = [];
|
|
|
- // this.getStepLevels();
|
|
|
- this.updateStepLevel(this.curStep, level.name, multipleGradingListCount);
|
|
|
+ if (!data) return;
|
|
|
|
|
|
- // update paper list
|
|
|
- if (
|
|
|
- this.current > 1 &&
|
|
|
- this.current === this.pageCount &&
|
|
|
- this.papers.length === multipleGradingListCount
|
|
|
- ) {
|
|
|
- this.current--;
|
|
|
- }
|
|
|
-
|
|
|
- await this.getList();
|
|
|
- this.selectPaper(this.curPaperIndex);
|
|
|
+ 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();
|
|
|
},
|
|
|
// paper view action
|
|
|
toReview(index) {
|
|
@@ -424,9 +415,9 @@ export default {
|
|
|
},
|
|
|
async toPrevPaper() {
|
|
|
if (this.curPaperIndex === 0) {
|
|
|
- if (this.current > 1) {
|
|
|
- this.current--;
|
|
|
- this.curPaperIndex = this.size - 1;
|
|
|
+ if (this.page.current > 1) {
|
|
|
+ this.setPage({ current: this.page.current - 1 });
|
|
|
+ this.curPaperIndex = this.page.size - 1;
|
|
|
await this.getList();
|
|
|
} else {
|
|
|
this.$Message.warning("当前已经是第一条数据了");
|
|
@@ -440,11 +431,11 @@ export default {
|
|
|
},
|
|
|
async toNextPaper() {
|
|
|
if (this.curPaperIndex === this.papers.length - 1) {
|
|
|
- if (this.current === this.totalPage) {
|
|
|
+ if (this.page.current === this.page.totalPage) {
|
|
|
this.$Message.warning("当前已经是最后一条数据了");
|
|
|
return;
|
|
|
} else {
|
|
|
- this.current++;
|
|
|
+ this.setPage({ current: this.page.current + 1 });
|
|
|
this.curPaperIndex = 0;
|
|
|
await this.getList();
|
|
|
}
|
|
@@ -455,28 +446,79 @@ export default {
|
|
|
this.selectPaper(this.curPaperIndex);
|
|
|
},
|
|
|
async toActionNextPaper() {
|
|
|
- if (this.current > 1 && this.papers.length === 1) {
|
|
|
- this.current--;
|
|
|
- this.curPaperIndex = this.size;
|
|
|
+ if (this.page.current > 1 && this.papers.length === 1) {
|
|
|
+ this.setPage({ current: this.page.current - 1 });
|
|
|
+ this.curPaperIndex = this.page.size;
|
|
|
}
|
|
|
|
|
|
await this.getList();
|
|
|
if (!this.papers.length) this.$refs.SimpleImagePreview.cancel();
|
|
|
this.selectPaper(this.curPaperIndex);
|
|
|
},
|
|
|
- async gradeCurPaper(level) {
|
|
|
- const paper = await paperSelectLevelOrScore(
|
|
|
- this.curPaper.id, // is taskId
|
|
|
- level.name,
|
|
|
- "LEVEL"
|
|
|
+ async serachPaperByCode(params) {
|
|
|
+ const data = await taskSnSearch(
|
|
|
+ params.codeType,
|
|
|
+ params.code,
|
|
|
+ this.filter.questionId
|
|
|
);
|
|
|
- if (!paper) return;
|
|
|
- this.updateStepLevel(this.curStep, level.name, 1);
|
|
|
- this.toActionNextPaper();
|
|
|
+ if (!data) {
|
|
|
+ this.$Message.error("没有查找到结果!");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ data.title = `NO.${data.sn}`;
|
|
|
+ this.papers = [data];
|
|
|
+ this.setPage({ current: 1, total: 1, totalPage: 1 });
|
|
|
+ this.selectPaper(0);
|
|
|
},
|
|
|
- async passCurPaper() {
|
|
|
- await paperTaskPass(this.curPaper.id);
|
|
|
- this.toActionNextPaper();
|
|
|
+ async leaderSelectLevel(levelInfo, markers) {
|
|
|
+ // 唯一权限时,直接操作
|
|
|
+ if (levelInfo.markLeaderOnlyRight && !this.paramsSet.leaderConfirm) {
|
|
|
+ const datas = {
|
|
|
+ action: levelInfo.markLeaderOnlyRight.action,
|
|
|
+ level: levelInfo.selectedLevel,
|
|
|
+ originLevel: levelInfo.curLevel,
|
|
|
+ paperIds: levelInfo.paperIds
|
|
|
+ };
|
|
|
+ if (datas.action === "reject") {
|
|
|
+ datas.range = markers.map(item => item.id).join();
|
|
|
+ }
|
|
|
+ let result = true;
|
|
|
+ const paper = await leaderGradingPaper(datas).catch(() => {
|
|
|
+ result = false;
|
|
|
+ });
|
|
|
+ if (!result) return;
|
|
|
+
|
|
|
+ this.leaderGradingSuccess(datas, paper);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ this.levelInfo = levelInfo;
|
|
|
+ this.markers = markers;
|
|
|
+ this.$refs.ModifyLeaderGrading.open();
|
|
|
+ },
|
|
|
+ async leaderGradingSuccess(datas, paper) {
|
|
|
+ if (datas.action === "sampling" && this.$refs.MarkerStandard) {
|
|
|
+ this.$refs.MarkerStandard.updateLevelPapers(datas.level);
|
|
|
+ }
|
|
|
+ this.getStepLevels();
|
|
|
+
|
|
|
+ if (this.multipleGradingList && this.multipleGradingList.length) {
|
|
|
+ // 批量处理逻辑
|
|
|
+ if (
|
|
|
+ this.page.current > 1 &&
|
|
|
+ this.page.current === this.page.totalPage &&
|
|
|
+ this.papers.length === this.multipleGradingList.length
|
|
|
+ ) {
|
|
|
+ this.setPage({ current: this.page.current - 1 });
|
|
|
+ }
|
|
|
+
|
|
|
+ this.multipleGradingList = [];
|
|
|
+ await this.getList();
|
|
|
+ this.selectPaper(this.curPaperIndex);
|
|
|
+ } else {
|
|
|
+ // 单张处理逻辑
|
|
|
+ this.toActionNextPaper();
|
|
|
+ }
|
|
|
},
|
|
|
// paper carousel
|
|
|
toViewCarouselPaper(paperIndex, papers, type) {
|
|
@@ -493,10 +535,6 @@ export default {
|
|
|
this.curPaper = { ...this.carouselPapers[index] };
|
|
|
},
|
|
|
toCarousePaper(type) {
|
|
|
- // if (this.carouselType === "sample") {
|
|
|
- // this.toSampleCarousePaper(type);
|
|
|
- // return;
|
|
|
- // }
|
|
|
if (type === "prev" && this.curCarouselPaperIndex > 0) {
|
|
|
this.curCarouselPaperIndex--;
|
|
|
} else if (
|
|
@@ -507,13 +545,6 @@ export default {
|
|
|
}
|
|
|
this.selectCarouselPaper(this.curCarouselPaperIndex);
|
|
|
},
|
|
|
- toSampleCarousePaper(type) {
|
|
|
- if (type === "prev") {
|
|
|
- this.$refs.GradeStandardPaper.$refs.PaperCarousel.handleLeft();
|
|
|
- } else if (type === "next") {
|
|
|
- this.$refs.GradeStandardPaper.$refs.PaperCarousel.handleRight();
|
|
|
- }
|
|
|
- },
|
|
|
carouseImagePreviewClose() {
|
|
|
this.isFullscreenMarking = false;
|
|
|
this.carouselType = "";
|
|
@@ -525,7 +556,16 @@ export default {
|
|
|
},
|
|
|
toStandard() {
|
|
|
this.$refs.MarkerStandard.open();
|
|
|
+ },
|
|
|
+ toProgress() {
|
|
|
+ this.$refs.LeaderProgress.open();
|
|
|
+ },
|
|
|
+ toStatistics() {
|
|
|
+ this.$refs.LeaderStatistics.open();
|
|
|
}
|
|
|
+ },
|
|
|
+ beforeDestroy() {
|
|
|
+ this.clearState();
|
|
|
}
|
|
|
};
|
|
|
</script>
|