|
@@ -1,87 +1,101 @@
|
|
<template>
|
|
<template>
|
|
- <div class="grading-operation">
|
|
|
|
- <grade-step
|
|
|
|
- :steps="steps"
|
|
|
|
- @on-change="stepChange"
|
|
|
|
- ref="GradeStep"
|
|
|
|
- ></grade-step>
|
|
|
|
- <div class="detail-body" v-if="curStep.name !== 'analysis'">
|
|
|
|
- <div class="detail-filter">
|
|
|
|
- <Form ref="FilterForm" label-position="left" inline>
|
|
|
|
- <FormItem>
|
|
|
|
- <Select v-model="filter.questionId" placeholder="请选择考区">
|
|
|
|
- <Option
|
|
|
|
- v-for="area in areas"
|
|
|
|
- :key="area.id"
|
|
|
|
- :value="area.id"
|
|
|
|
- :label="area.areaName"
|
|
|
|
- ></Option>
|
|
|
|
- </Select>
|
|
|
|
- </FormItem>
|
|
|
|
- <FormItem>
|
|
|
|
- <Button type="primary" icon="ios-search" @click="toPage(1)"
|
|
|
|
- >查询</Button
|
|
|
|
- >
|
|
|
|
- </FormItem>
|
|
|
|
- </Form>
|
|
|
|
- </div>
|
|
|
|
- <!-- detail-papers -->
|
|
|
|
- <div :class="detailPapersClasses">
|
|
|
|
- <div class="detail-papers-carousel">
|
|
|
|
- <grade-standard-paper ref="GradeStandardPaper"></grade-standard-paper>
|
|
|
|
- <paper-carousel
|
|
|
|
- :papers="papers"
|
|
|
|
- v-if="!IS_ADMIN"
|
|
|
|
- ref="PaperCarousel"
|
|
|
|
- ></paper-carousel>
|
|
|
|
- </div>
|
|
|
|
- <div class="detail-papers-list">
|
|
|
|
- <div :class="imageViewClasses">
|
|
|
|
- <div
|
|
|
|
- class="image-view"
|
|
|
|
- v-for="(image, index) in papers"
|
|
|
|
- :key="index"
|
|
|
|
- >
|
|
|
|
- <h5 class="image-view-title">{{ image.title }}</h5>
|
|
|
|
- <div class="image-view-contain">
|
|
|
|
- <img
|
|
|
|
- :src="image.thumbSrc"
|
|
|
|
- :alt="image.title"
|
|
|
|
- @click="toReview(index)"
|
|
|
|
- />
|
|
|
|
|
|
+ <div class="grading-operation home">
|
|
|
|
+ <div class="home-header">
|
|
|
|
+ <view-header>
|
|
|
|
+ <h1 slot="logo">{{ curSubject.name }}</h1>
|
|
|
|
+ </view-header>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="home-body">
|
|
|
|
+ <div class="home-main home-main-nofooter grading-detail">
|
|
|
|
+ <grade-step
|
|
|
|
+ :steps="steps"
|
|
|
|
+ :init-step="curStep"
|
|
|
|
+ :show-analysis="false"
|
|
|
|
+ @on-change="stepChange"
|
|
|
|
+ ref="GradeStep"
|
|
|
|
+ v-if="steps.length"
|
|
|
|
+ ></grade-step>
|
|
|
|
+ <div class="detail-body">
|
|
|
|
+ <div class="detail-filter">
|
|
|
|
+ <Form ref="FilterForm" label-position="left" inline>
|
|
|
|
+ <FormItem>
|
|
|
|
+ <Select v-model="filter.questionId" placeholder="请选择考区">
|
|
|
|
+ <Option
|
|
|
|
+ v-for="area in areas"
|
|
|
|
+ :key="area.id"
|
|
|
|
+ :value="area.id"
|
|
|
|
+ :label="area.areaName"
|
|
|
|
+ ></Option>
|
|
|
|
+ </Select>
|
|
|
|
+ </FormItem>
|
|
|
|
+ <FormItem>
|
|
|
|
+ <Button type="primary" icon="ios-search" @click="toPage(1)"
|
|
|
|
+ >查询</Button
|
|
|
|
+ >
|
|
|
|
+ </FormItem>
|
|
|
|
+ </Form>
|
|
|
|
+ </div>
|
|
|
|
+ <!-- detail-papers -->
|
|
|
|
+ <div :class="detailPapersClasses">
|
|
|
|
+ <div class="detail-papers-carousel">
|
|
|
|
+ <grade-standard-paper
|
|
|
|
+ :levels="levels"
|
|
|
|
+ ref="GradeStandardPaper"
|
|
|
|
+ ></grade-standard-paper>
|
|
|
|
+ <paper-carousel
|
|
|
|
+ :papers="historyList"
|
|
|
|
+ ref="PaperCarousel"
|
|
|
|
+ ></paper-carousel>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="detail-papers-list">
|
|
|
|
+ <div :class="imageViewClasses">
|
|
|
|
+ <div
|
|
|
|
+ :class="[
|
|
|
|
+ 'image-view',
|
|
|
|
+ { 'image-view-act': curPaperIndex === index }
|
|
|
|
+ ]"
|
|
|
|
+ v-for="(image, index) in papers"
|
|
|
|
+ :key="index"
|
|
|
|
+ >
|
|
|
|
+ <h5 class="image-view-title">{{ image.title }}</h5>
|
|
|
|
+ <div class="image-view-contain">
|
|
|
|
+ <img
|
|
|
|
+ :src="image.thumbSrc"
|
|
|
|
+ :alt="image.title"
|
|
|
|
+ @click="toReview(index)"
|
|
|
|
+ />
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="part-page" v-if="total > size">
|
|
|
|
+ <Page
|
|
|
|
+ :current="current"
|
|
|
|
+ :total="total"
|
|
|
|
+ :page-size="size"
|
|
|
|
+ show-total
|
|
|
|
+ show-elevator
|
|
|
|
+ :page-size-opts="[4, 6, 8]"
|
|
|
|
+ @on-page-size-change="pageSizeChange"
|
|
|
|
+ @on-change="toPage"
|
|
|
|
+ ></Page>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <div class="part-page" v-if="total > size">
|
|
|
|
- <Page
|
|
|
|
- :current="current"
|
|
|
|
- :total="total"
|
|
|
|
- :page-size="size"
|
|
|
|
- show-total
|
|
|
|
- show-elevator
|
|
|
|
- :show-sizer="IS_MARKER"
|
|
|
|
- :page-size-opts="[4, 6, 8]"
|
|
|
|
- @on-page-size-change="pageSizeChange"
|
|
|
|
- @on-change="toPage"
|
|
|
|
- ></Page>
|
|
|
|
|
|
+ <!-- detail-aciton -->
|
|
|
|
+ <div class="detail-action">
|
|
|
|
+ <grade-action
|
|
|
|
+ :cur-paper="curPaper"
|
|
|
|
+ :levels="levels"
|
|
|
|
+ :step="curStep"
|
|
|
|
+ :user-role="curUserRoleType"
|
|
|
|
+ @on-select-level="gradeCurPaper"
|
|
|
|
+ @on-pass="passCurPaper"
|
|
|
|
+ ref="GradeAction"
|
|
|
|
+ v-if="curPaper.id && curStep.name"
|
|
|
|
+ ></grade-action>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <!-- detail-aciton -->
|
|
|
|
- <div class="detail-action">
|
|
|
|
- <grade-action
|
|
|
|
- :paper="curPaper"
|
|
|
|
- :levels="levels"
|
|
|
|
- :step="curStep"
|
|
|
|
- :user-role="curUserRoleType"
|
|
|
|
- @on-confirm="gradeCurPaper"
|
|
|
|
- ref="GradeAction"
|
|
|
|
- v-if="curPaper.id && curStep.name"
|
|
|
|
- ></grade-action>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- <div class="detail-body" v-else>
|
|
|
|
- <grade-analysis ref="GradeAnalysis"></grade-analysis>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<!-- image-preview -->
|
|
<!-- image-preview -->
|
|
@@ -89,8 +103,8 @@
|
|
class="grading-detail-image-preview"
|
|
class="grading-detail-image-preview"
|
|
:image-list="papers"
|
|
:image-list="papers"
|
|
:init-index="curPaperIndex"
|
|
:init-index="curPaperIndex"
|
|
- @on-prev="paperPrev"
|
|
|
|
- @on-next="paperNext"
|
|
|
|
|
|
+ @on-prev="selectPaper"
|
|
|
|
+ @on-next="selectPaper"
|
|
@on-page-prev="prevPage"
|
|
@on-page-prev="prevPage"
|
|
@on-page-next="nextPage"
|
|
@on-page-next="nextPage"
|
|
header-hide
|
|
header-hide
|
|
@@ -102,18 +116,19 @@
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import {
|
|
import {
|
|
- paperList,
|
|
|
|
markerPaperList,
|
|
markerPaperList,
|
|
- levelStatData,
|
|
|
|
|
|
+ markerLevelStatData,
|
|
areaList,
|
|
areaList,
|
|
- workLevelList
|
|
|
|
|
|
+ workLevelList,
|
|
|
|
+ subjectDetail,
|
|
|
|
+ paperSelectLevel,
|
|
|
|
+ paperPassLevel
|
|
} from "@/api";
|
|
} from "@/api";
|
|
import ImagePreview from "@/components/common/ImagePreview";
|
|
import ImagePreview from "@/components/common/ImagePreview";
|
|
import GradeStep from "./components/GradeStep";
|
|
import GradeStep from "./components/GradeStep";
|
|
import GradeStandardPaper from "./components/GradeStandardPaper";
|
|
import GradeStandardPaper from "./components/GradeStandardPaper";
|
|
import PaperCarousel from "./components/PaperCarousel";
|
|
import PaperCarousel from "./components/PaperCarousel";
|
|
import GradeAction from "./components/GradeAction";
|
|
import GradeAction from "./components/GradeAction";
|
|
-import GradeAnalysis from "./components/GradeAnalysis";
|
|
|
|
// 三种情况:
|
|
// 三种情况:
|
|
// 管理员(ADMIN),科组长(MARK_LEADER),评卷员(MARKER)
|
|
// 管理员(ADMIN),科组长(MARK_LEADER),评卷员(MARKER)
|
|
// 评卷员:标准卷,操作记录,试卷列表,操作盘(只分档)
|
|
// 评卷员:标准卷,操作记录,试卷列表,操作盘(只分档)
|
|
@@ -129,33 +144,44 @@ export default {
|
|
PaperCarousel,
|
|
PaperCarousel,
|
|
GradeStep,
|
|
GradeStep,
|
|
GradeStandardPaper,
|
|
GradeStandardPaper,
|
|
- GradeAction,
|
|
|
|
- GradeAnalysis
|
|
|
|
|
|
+ GradeAction
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
filter: {
|
|
filter: {
|
|
|
|
+ markerId: this.$ls.get("user").id,
|
|
questionId: "",
|
|
questionId: "",
|
|
- level: "",
|
|
|
|
- sort: "secretNumber",
|
|
|
|
|
|
+ sort: "randomSeq,asc",
|
|
|
|
+ stage: "LEVEL",
|
|
isSample: false
|
|
isSample: false
|
|
},
|
|
},
|
|
|
|
+ typeFilter: {
|
|
|
|
+ done: {
|
|
|
|
+ level: ""
|
|
|
|
+ },
|
|
|
|
+ undo: {},
|
|
|
|
+ reject: {
|
|
|
|
+ reject: true
|
|
|
|
+ }
|
|
|
|
+ },
|
|
workId: this.$route.params.workId,
|
|
workId: this.$route.params.workId,
|
|
subjectId: this.$route.params.subjectId,
|
|
subjectId: this.$route.params.subjectId,
|
|
subject: "",
|
|
subject: "",
|
|
|
|
+ curSubject: {},
|
|
curUserRoleType: "MARKER",
|
|
curUserRoleType: "MARKER",
|
|
current: 1,
|
|
current: 1,
|
|
size: 6,
|
|
size: 6,
|
|
total: 0,
|
|
total: 0,
|
|
totalPage: 1,
|
|
totalPage: 1,
|
|
- curStep: { type: "analysis", name: "analysis" },
|
|
|
|
|
|
+ curStep: { type: "undo", name: "待评" },
|
|
curStandardGradeId: "",
|
|
curStandardGradeId: "",
|
|
steps: [],
|
|
steps: [],
|
|
levels: [],
|
|
levels: [],
|
|
areas: [],
|
|
areas: [],
|
|
papers: [],
|
|
papers: [],
|
|
curPaper: {},
|
|
curPaper: {},
|
|
- curPaperIndex: 0
|
|
|
|
|
|
+ curPaperIndex: 0,
|
|
|
|
+ historyList: []
|
|
};
|
|
};
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
@@ -164,43 +190,36 @@ export default {
|
|
},
|
|
},
|
|
imageViewClasses() {
|
|
imageViewClasses() {
|
|
return ["image-view-list", `image-view-list-${this.size / 2}`];
|
|
return ["image-view-list", `image-view-list-${this.size / 2}`];
|
|
- },
|
|
|
|
- IS_ADMIN() {
|
|
|
|
- return this.curUserRoleType === "ADMIN";
|
|
|
|
- },
|
|
|
|
- IS_MARKER() {
|
|
|
|
- return this.curUserRoleType === "MARKER";
|
|
|
|
- },
|
|
|
|
- IS_MARK_LEADER() {
|
|
|
|
- return this.curUserRoleType === "MARK_LEADER";
|
|
|
|
}
|
|
}
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
this.subject = this.subjectId.split("-")[1];
|
|
this.subject = this.subjectId.split("-")[1];
|
|
- this.curUserRoleType = this.$ls.get("user", { role: "" }).role;
|
|
|
|
this.initData();
|
|
this.initData();
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
async initData() {
|
|
async initData() {
|
|
|
|
+ this.getSubjectDetail();
|
|
await this.getAreaList();
|
|
await this.getAreaList();
|
|
this.filter.questionId = this.areas[0].id;
|
|
this.filter.questionId = this.areas[0].id;
|
|
this.getStepLevels();
|
|
this.getStepLevels();
|
|
this.getWorkLevels();
|
|
this.getWorkLevels();
|
|
},
|
|
},
|
|
|
|
+ async getSubjectDetail() {
|
|
|
|
+ this.curSubject = await subjectDetail(this.subjectId);
|
|
|
|
+ },
|
|
async getList() {
|
|
async getList() {
|
|
const datas = {
|
|
const datas = {
|
|
...this.filter,
|
|
...this.filter,
|
|
|
|
+ ...this.typeFilter[this.curStep.type],
|
|
page: this.current - 1,
|
|
page: this.current - 1,
|
|
size: this.size
|
|
size: this.size
|
|
};
|
|
};
|
|
- let data = [];
|
|
|
|
- if (this.IS_MARKER) {
|
|
|
|
|
|
+ if (this.curStep.type === "done") {
|
|
|
|
+ datas.level = this.curStep.name;
|
|
datas.sort = "updatedOn,desc";
|
|
datas.sort = "updatedOn,desc";
|
|
- datas.markerId = this.$ls.get("user").id;
|
|
|
|
- data = await markerPaperList(datas);
|
|
|
|
- } else {
|
|
|
|
- data = await paperList(datas);
|
|
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ const data = await markerPaperList(datas);
|
|
this.papers = data.data.map(paper => {
|
|
this.papers = data.data.map(paper => {
|
|
paper.title = paper.examNumber;
|
|
paper.title = paper.examNumber;
|
|
return paper;
|
|
return paper;
|
|
@@ -212,7 +231,10 @@ export default {
|
|
this.getList();
|
|
this.getList();
|
|
},
|
|
},
|
|
async getStepLevels() {
|
|
async getStepLevels() {
|
|
- const data = await levelStatData(this.subjectId, this.filter.questionId);
|
|
|
|
|
|
+ const data = await markerLevelStatData(
|
|
|
|
+ this.filter.markerId,
|
|
|
|
+ this.filter.questionId
|
|
|
|
+ );
|
|
const undoIndex = data.findIndex(item => item.id === null);
|
|
const undoIndex = data.findIndex(item => item.id === null);
|
|
let otherStep = [];
|
|
let otherStep = [];
|
|
if (undoIndex !== -1) {
|
|
if (undoIndex !== -1) {
|
|
@@ -220,27 +242,31 @@ export default {
|
|
data.splice(undoIndex, 1);
|
|
data.splice(undoIndex, 1);
|
|
|
|
|
|
otherStep.push({
|
|
otherStep.push({
|
|
- name: "仲裁",
|
|
|
|
- count: undo.arbitrated,
|
|
|
|
- type: "arbitrate"
|
|
|
|
|
|
+ name: "待评",
|
|
|
|
+ count: undo.count,
|
|
|
|
+ type: "undo"
|
|
|
|
+ });
|
|
|
|
+ otherStep.push({
|
|
|
|
+ name: "打回",
|
|
|
|
+ count: undo.rejected,
|
|
|
|
+ type: "reject"
|
|
});
|
|
});
|
|
-
|
|
|
|
- if (this.IS_MARK_LEADER) {
|
|
|
|
- otherStep.push({
|
|
|
|
- name: "打回",
|
|
|
|
- count: undo.rejected,
|
|
|
|
- type: "reject"
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
}
|
|
}
|
|
let levelMenu = data.map(item => {
|
|
let levelMenu = data.map(item => {
|
|
return {
|
|
return {
|
|
...item,
|
|
...item,
|
|
name: item.id,
|
|
name: item.id,
|
|
- type: "level"
|
|
|
|
|
|
+ type: "done"
|
|
};
|
|
};
|
|
});
|
|
});
|
|
this.steps = [...levelMenu, ...otherStep];
|
|
this.steps = [...levelMenu, ...otherStep];
|
|
|
|
+ let curStep = {};
|
|
|
|
+ if (undoIndex === -1) {
|
|
|
|
+ curStep = this.steps[0];
|
|
|
|
+ } else {
|
|
|
|
+ curStep = this.steps[this.steps.length - 2];
|
|
|
|
+ }
|
|
|
|
+ this.curStep = curStep;
|
|
},
|
|
},
|
|
async getWorkLevels() {
|
|
async getWorkLevels() {
|
|
const data = await workLevelList(this.workId);
|
|
const data = await workLevelList(this.workId);
|
|
@@ -269,57 +295,60 @@ export default {
|
|
pageSizeChange(size) {
|
|
pageSizeChange(size) {
|
|
this.size = size;
|
|
this.size = size;
|
|
this.toPage(1);
|
|
this.toPage(1);
|
|
- this.initData();
|
|
|
|
|
|
+ this.getStepLevels();
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
this.$refs.GradeStandardPaper.$refs.Carousel.handleResize();
|
|
this.$refs.GradeStandardPaper.$refs.Carousel.handleResize();
|
|
this.$refs.PaperCarousel &&
|
|
this.$refs.PaperCarousel &&
|
|
this.$refs.PaperCarousel.$refs.Carousel.handleResize();
|
|
this.$refs.PaperCarousel.$refs.Carousel.handleResize();
|
|
});
|
|
});
|
|
},
|
|
},
|
|
- stepChange(step) {
|
|
|
|
|
|
+ async stepChange(step) {
|
|
this.curStep = step;
|
|
this.curStep = step;
|
|
- if (step.type === "level") this.filter.level = step.name;
|
|
|
|
- this.initData();
|
|
|
|
|
|
+ this.current = 1;
|
|
|
|
+ await this.getList();
|
|
|
|
+ if (this.papers.length) {
|
|
|
|
+ this.selectPaper(0);
|
|
|
|
+ }
|
|
},
|
|
},
|
|
- toReview(index) {
|
|
|
|
- this.curPaper = { ...this.papers[index] };
|
|
|
|
|
|
+ selectPaper(index) {
|
|
this.curPaperIndex = index;
|
|
this.curPaperIndex = index;
|
|
- this.$refs.ImagePreview.open();
|
|
|
|
- },
|
|
|
|
- paperPrev(index) {
|
|
|
|
this.curPaper = { ...this.papers[index] };
|
|
this.curPaper = { ...this.papers[index] };
|
|
- this.curPaperIndex = index;
|
|
|
|
},
|
|
},
|
|
- paperNext(index) {
|
|
|
|
- this.curPaper = { ...this.papers[index] };
|
|
|
|
- this.curPaperIndex = index;
|
|
|
|
|
|
+ toReview(index) {
|
|
|
|
+ this.selectPaper(index);
|
|
|
|
+ this.$refs.ImagePreview.open();
|
|
},
|
|
},
|
|
- prevPage() {
|
|
|
|
|
|
+ async prevPage() {
|
|
if (this.current === 1) {
|
|
if (this.current === 1) {
|
|
this.$Message.warning("当前已经是第一条数据了");
|
|
this.$Message.warning("当前已经是第一条数据了");
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
this.current--;
|
|
this.current--;
|
|
- this.getList();
|
|
|
|
|
|
+ await this.getList();
|
|
|
|
+ this.selectPaper(this.papers.length - 1);
|
|
|
|
+ this.$refs.ImagePreview.initData();
|
|
},
|
|
},
|
|
- nextPage() {
|
|
|
|
|
|
+ async nextPage() {
|
|
if (this.current === this.totalPage) {
|
|
if (this.current === this.totalPage) {
|
|
this.$Message.warning("当前已经是最后一条数据了");
|
|
this.$Message.warning("当前已经是最后一条数据了");
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
this.current++;
|
|
this.current++;
|
|
- this.getList();
|
|
|
|
|
|
+ await this.getList();
|
|
|
|
+ this.selectPaper(0);
|
|
|
|
+ this.$refs.ImagePreview.initData();
|
|
},
|
|
},
|
|
- gradeCurPaper(grade) {
|
|
|
|
- // TODO:to grade
|
|
|
|
-
|
|
|
|
|
|
+ async gradeCurPaper(level) {
|
|
|
|
+ await paperSelectLevel(this.curPaper.id, level.name, "LEVEL");
|
|
|
|
+ this.getStepLevels();
|
|
|
|
+ this.toNext();
|
|
|
|
+ },
|
|
|
|
+ async passCurPaper(level) {
|
|
|
|
+ await paperPassLevel(this.curPaper.id);
|
|
|
|
+ this.toNext();
|
|
|
|
+ },
|
|
|
|
+ toNext() {
|
|
this.$refs.ImagePreview.showNext();
|
|
this.$refs.ImagePreview.showNext();
|
|
- // if (this.curPaperIndex === this.size - 1) {
|
|
|
|
- // this.nextPage();
|
|
|
|
- // return;
|
|
|
|
- // } else {
|
|
|
|
- // this.paperNext(this.curPaperIndex + 1);
|
|
|
|
- // }
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
};
|