|
@@ -1,43 +1,60 @@
|
|
|
<template>
|
|
|
<div class="mark-operation home">
|
|
|
- <div class="home-header">
|
|
|
- <view-header>
|
|
|
- <h1 slot="logo">{{ curSubject.name }}</h1>
|
|
|
- </view-header>
|
|
|
- </div>
|
|
|
+ <view-header> </view-header>
|
|
|
<div class="home-body">
|
|
|
- <div class="home-main home-main-nofooter grading-detail">
|
|
|
+ <div class="home-main grading-detail">
|
|
|
+ <div class="part-box-head grading-head">
|
|
|
+ <Form ref="FilterForm" label-position="left" inline>
|
|
|
+ <FormItem>
|
|
|
+ <Select
|
|
|
+ v-model="filter.questionId"
|
|
|
+ @on-change="areaChange"
|
|
|
+ placeholder="选择考区"
|
|
|
+ >
|
|
|
+ <Option
|
|
|
+ v-for="area in areas"
|
|
|
+ :key="area.id"
|
|
|
+ :value="area.id"
|
|
|
+ :label="area.areaName"
|
|
|
+ ></Option>
|
|
|
+ </Select>
|
|
|
+ </FormItem>
|
|
|
+ <FormItem>
|
|
|
+ <Button
|
|
|
+ size="small"
|
|
|
+ class="btn-form-search"
|
|
|
+ type="primary"
|
|
|
+ @click="toPage(1)"
|
|
|
+ >查询</Button
|
|
|
+ >
|
|
|
+ </FormItem>
|
|
|
+ </Form>
|
|
|
+ </div>
|
|
|
<grade-step
|
|
|
:steps="steps"
|
|
|
:init-step="curStep"
|
|
|
:show-analysis="false"
|
|
|
@on-change="stepChange"
|
|
|
ref="GradeStep"
|
|
|
- v-if="steps.length"
|
|
|
+ v-if="steps.levelStep"
|
|
|
></grade-step>
|
|
|
- <div class="detail-body">
|
|
|
- <div class="detail-filter">
|
|
|
- <Form ref="FilterForm" label-position="left" inline>
|
|
|
- <FormItem>
|
|
|
- <Select
|
|
|
- v-model="filter.questionId"
|
|
|
- @on-change="areaChange"
|
|
|
- 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 class="detail-body clear-float">
|
|
|
+ <!-- detail-aciton -->
|
|
|
+ <div
|
|
|
+ :class="[
|
|
|
+ 'detail-action',
|
|
|
+ { 'detail-action-fullscreen': isFullscreenMarking }
|
|
|
+ ]"
|
|
|
+ >
|
|
|
+ <mark-action
|
|
|
+ :cur-paper="curPaper"
|
|
|
+ :levels="levels"
|
|
|
+ :user-role="curUserRoleType"
|
|
|
+ @on-select-score="scoreCurPaper"
|
|
|
+ @on-pass="passCurPaper"
|
|
|
+ ref="GradeAction"
|
|
|
+ v-if="curPaper.id"
|
|
|
+ ></mark-action>
|
|
|
</div>
|
|
|
<!-- detail-papers -->
|
|
|
<div :class="detailPapersClasses">
|
|
@@ -50,7 +67,7 @@
|
|
|
ref="GradeHistoryPaper"
|
|
|
></grade-history-paper>
|
|
|
</div>
|
|
|
- <div class="detail-papers-list">
|
|
|
+ <div class="detail-papers-list" v-if="papers.length">
|
|
|
<div :class="imageViewClasses">
|
|
|
<div
|
|
|
:class="[
|
|
@@ -83,19 +100,13 @@
|
|
|
></Page>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <!-- detail-aciton -->
|
|
|
- <div class="detail-action">
|
|
|
- <mark-action
|
|
|
- :cur-paper="curPaper"
|
|
|
- :levels="levels"
|
|
|
- :user-role="curUserRoleType"
|
|
|
- @on-select-score="scoreCurPaper"
|
|
|
- @on-pass="passCurPaper"
|
|
|
- v-if="curPaper.id"
|
|
|
- ></mark-action>
|
|
|
+ <div class="detail-papers-list" v-else>
|
|
|
+ <p class="detail-papers-none">暂无数据</p>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+
|
|
|
+ <view-footer></view-footer>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
@@ -107,6 +118,7 @@
|
|
|
@on-paper-change="selectPaper"
|
|
|
@on-page-prev="prevPage"
|
|
|
@on-page-next="nextPage"
|
|
|
+ @on-close="imagePreviewClose"
|
|
|
header-hide
|
|
|
ref="ImagePreview"
|
|
|
v-if="papers.length"
|
|
@@ -118,6 +130,7 @@
|
|
|
:image-list="carouselPapers"
|
|
|
:init-index="curCarouselPaperIndex"
|
|
|
@on-paper-change="selectCarouselPaper"
|
|
|
+ @on-close="imagePreviewClose"
|
|
|
loop
|
|
|
header-hide
|
|
|
ref="CarouselPapersPreview"
|
|
@@ -183,7 +196,8 @@ export default {
|
|
|
curPaperIndex: 0,
|
|
|
// carousel paper review,
|
|
|
carouselPapers: [],
|
|
|
- curCarouselPaperIndex: 0
|
|
|
+ curCarouselPaperIndex: 0,
|
|
|
+ isFullscreenMarking: false
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
@@ -200,7 +214,7 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
async initData() {
|
|
|
- this.getSubjectDetail();
|
|
|
+ // this.getSubjectDetail();
|
|
|
this.getWorkLevels();
|
|
|
|
|
|
await this.getAreaList();
|
|
@@ -224,7 +238,7 @@ export default {
|
|
|
|
|
|
const data = await markerPaperList(datas);
|
|
|
this.papers = data.data.map(paper => {
|
|
|
- paper.title = paper.examNumber;
|
|
|
+ paper.title = `NO.${paper.sn}`;
|
|
|
return paper;
|
|
|
});
|
|
|
this.total = data.totalCount;
|
|
@@ -261,20 +275,20 @@ export default {
|
|
|
type: "shiftScore"
|
|
|
});
|
|
|
}
|
|
|
- let levelMenu = data.map(item => {
|
|
|
+ let levelStep = data.map(item => {
|
|
|
return {
|
|
|
...item,
|
|
|
name: item.id,
|
|
|
type: "done"
|
|
|
};
|
|
|
});
|
|
|
- this.steps = [...levelMenu, ...otherStep];
|
|
|
+ this.steps = { levelStep, otherStep };
|
|
|
if (!this.curStep) {
|
|
|
let curStep = {};
|
|
|
if (undoIndex === -1) {
|
|
|
- curStep = this.steps[0];
|
|
|
+ curStep = levelStep[0];
|
|
|
} else {
|
|
|
- curStep = this.steps[this.steps.length - 3];
|
|
|
+ curStep = otherStep[0];
|
|
|
}
|
|
|
this.curStep = curStep;
|
|
|
}
|
|
@@ -327,9 +341,13 @@ export default {
|
|
|
this.curPaper = { ...this.papers[index] };
|
|
|
},
|
|
|
toReview(index) {
|
|
|
+ this.isFullscreenMarking = true;
|
|
|
this.selectPaper(index);
|
|
|
this.$refs.ImagePreview.open();
|
|
|
},
|
|
|
+ imagePreviewClose() {
|
|
|
+ this.isFullscreenMarking = false;
|
|
|
+ },
|
|
|
async prevPage() {
|
|
|
if (this.current === 1) {
|
|
|
this.$Message.warning("当前已经是第一条数据了");
|
|
@@ -338,24 +356,36 @@ export default {
|
|
|
this.current--;
|
|
|
await this.getList();
|
|
|
this.selectPaper(this.papers.length - 1);
|
|
|
- this.$refs.ImagePreview.initData();
|
|
|
+ if (this.papers.length) this.$refs.ImagePreview.initData();
|
|
|
},
|
|
|
async nextPage() {
|
|
|
if (this.current === this.totalPage) {
|
|
|
- this.$Message.warning("当前已经是最后一条数据了");
|
|
|
- return;
|
|
|
+ if (this.current > 1) {
|
|
|
+ this.current--;
|
|
|
+ } else {
|
|
|
+ this.$Message.warning("当前已经是最后一条数据了");
|
|
|
+ }
|
|
|
}
|
|
|
// 下一页时,继续获取当前页数据。
|
|
|
await this.getList();
|
|
|
this.selectPaper(0);
|
|
|
- this.$refs.ImagePreview.initData();
|
|
|
+ if (this.papers.length) this.$refs.ImagePreview.initData();
|
|
|
},
|
|
|
async scoreCurPaper(score) {
|
|
|
- await paperSelectLevelOrScore(this.curPaper.id, score, "SCORE");
|
|
|
+ const data = await paperSelectLevelOrScore(
|
|
|
+ this.curPaper.id,
|
|
|
+ score,
|
|
|
+ "SCORE"
|
|
|
+ );
|
|
|
+ this.updatePaperList(data);
|
|
|
this.getStepLevels();
|
|
|
this.updateHistory();
|
|
|
this.toNext();
|
|
|
},
|
|
|
+ updatePaperList(data) {
|
|
|
+ const index = this.papers.findIndex(item => item.id === data.id);
|
|
|
+ this.papers[index] = Object.assign(this.papers[index], data);
|
|
|
+ },
|
|
|
async passCurPaper(level) {
|
|
|
await paperPassLevel(this.curPaper.id);
|
|
|
this.toNext();
|
|
@@ -368,9 +398,12 @@ export default {
|
|
|
},
|
|
|
// paper carousel
|
|
|
toViewCarouselPaper(paperIndex, papers) {
|
|
|
+ this.isFullscreenMarking = true;
|
|
|
this.curCarouselPaperIndex = paperIndex;
|
|
|
this.carouselPapers = papers;
|
|
|
- this.$refs.CarouselPapersPreview.open();
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.CarouselPapersPreview.open();
|
|
|
+ });
|
|
|
},
|
|
|
selectCarouselPaper(index) {
|
|
|
this.curCarouselPaperIndex = index;
|