|
@@ -1,95 +1,18 @@
|
|
|
<template>
|
|
|
<div :class="compClasses">
|
|
|
- <div class="part-box-head grading-head">
|
|
|
- <div class="part-box-head-left">
|
|
|
- <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>
|
|
|
- <div class="part-box-head-right" v-if="curStep.name === 'analysis'">
|
|
|
- <Button
|
|
|
- shape="circle"
|
|
|
- type="success"
|
|
|
- icon="upload-white icon"
|
|
|
- @click="toExport"
|
|
|
- :load="isDownload"
|
|
|
- >导出表格</Button
|
|
|
- >
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ <grade-filter
|
|
|
+ ref="GradeFilter"
|
|
|
+ :data="workSubject"
|
|
|
+ @change="areaChange"
|
|
|
+ ></grade-filter>
|
|
|
<grade-step
|
|
|
:steps="steps"
|
|
|
+ :init-step="curStep"
|
|
|
@on-change="stepChange"
|
|
|
ref="GradeStep"
|
|
|
v-if="steps.levelStep"
|
|
|
></grade-step>
|
|
|
- <div class="detail-body clear-float" v-if="curStep.name !== 'analysis'">
|
|
|
- <!-- detail-aciton -->
|
|
|
- <div
|
|
|
- :class="[
|
|
|
- 'detail-action',
|
|
|
- { 'detail-action-fullscreen': isFullscreenMarking }
|
|
|
- ]"
|
|
|
- v-show="!multipleGradingList.length"
|
|
|
- >
|
|
|
- <grade-action
|
|
|
- :cur-paper-or-task="curPaper"
|
|
|
- :levels="levels"
|
|
|
- :params-set="paramsSet"
|
|
|
- @on-leader-level="leaderSelectLevel"
|
|
|
- @on-code-search="serachPaperByCode"
|
|
|
- ref="GradeAction"
|
|
|
- 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>
|
|
|
+ <div class="detail-body">
|
|
|
<!-- detail-papers -->
|
|
|
<div :class="detailPapersClasses">
|
|
|
<div class="detail-papers-carousel">
|
|
@@ -105,10 +28,6 @@
|
|
|
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="
|
|
@@ -130,24 +49,26 @@
|
|
|
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 class="image-view-actions" v-if="ACTION_CAN_BATCH">
|
|
|
- <div
|
|
|
- :class="[
|
|
|
- 'image-view-multibar',
|
|
|
- { 'image-view-selected': image.selected },
|
|
|
- { 'image-view-disabled': image.sample }
|
|
|
- ]"
|
|
|
- :title="image.sample ? '标准卷' : '选中批量操作'"
|
|
|
- @click="selectMultiplePaper(image)"
|
|
|
- ></div>
|
|
|
+ <div class="image-view-container">
|
|
|
+ <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 class="image-view-actions" v-if="ACTION_CAN_BATCH">
|
|
|
+ <div
|
|
|
+ :class="[
|
|
|
+ 'image-view-multibar',
|
|
|
+ { 'image-view-selected': image.selected },
|
|
|
+ { 'image-view-disabled': image.sample }
|
|
|
+ ]"
|
|
|
+ :title="image.sample ? '标准卷' : '选中批量操作'"
|
|
|
+ @click="selectMultiplePaper(image)"
|
|
|
+ ></div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -166,14 +87,52 @@
|
|
|
<p class="detail-papers-none">暂无数据</p>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div class="detail-analysis" v-else>
|
|
|
- <grade-analysis
|
|
|
- :question-id="filter.questionId"
|
|
|
- :subject-id="subjectId"
|
|
|
- ref="GradeAnalysis"
|
|
|
- v-if="filter.questionId && subjectId"
|
|
|
- ></grade-analysis>
|
|
|
+ <!-- detail-aciton -->
|
|
|
+ <div
|
|
|
+ :class="[
|
|
|
+ 'detail-action',
|
|
|
+ { 'detail-action-fullscreen': isFullscreenMarking }
|
|
|
+ ]"
|
|
|
+ v-show="!multipleGradingList.length"
|
|
|
+ >
|
|
|
+ <grade-action
|
|
|
+ :cur-paper-or-task="curPaper"
|
|
|
+ :levels="levels"
|
|
|
+ :params-set="paramsSet"
|
|
|
+ @on-leader-level="leaderSelectLevel"
|
|
|
+ @on-code-search="serachPaperByCode"
|
|
|
+ ref="GradeAction"
|
|
|
+ v-if="curPaper.id"
|
|
|
+ ></grade-action>
|
|
|
+ </div>
|
|
|
+ <!-- 占位 -->
|
|
|
+ <div class="detail-action" v-if="isFullscreenMarking"></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>
|
|
|
</div>
|
|
|
|
|
|
<!-- image-preview -->
|
|
@@ -202,14 +161,6 @@
|
|
|
@canceled="leaderGradingCancel"
|
|
|
ref="ModifyLeaderGrading"
|
|
|
></modify-leader-grading>
|
|
|
- <!-- grade-analysis-export -->
|
|
|
- <grade-analysis-export
|
|
|
- ref="GradeAnalysisExport"
|
|
|
- :chart-data="renderChartData"
|
|
|
- :page-info="renderPageInfo"
|
|
|
- @on-exported="exportOver"
|
|
|
- v-if="renderExportPage"
|
|
|
- ></grade-analysis-export>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -217,7 +168,6 @@
|
|
|
import {
|
|
|
paperList,
|
|
|
levelStatData,
|
|
|
- areaList,
|
|
|
workLevelList,
|
|
|
taskSnSearch,
|
|
|
subjectDetail,
|
|
@@ -226,13 +176,12 @@ import {
|
|
|
leaderGradingPaper
|
|
|
} from "@/api";
|
|
|
import SimpleImagePreview from "@/components/SimpleImagePreview";
|
|
|
+import GradeFilter from "./components/GradeFilter";
|
|
|
import GradeStep from "./components/GradeStep";
|
|
|
import GradeStandardPaper from "./components/GradeStandardPaper";
|
|
|
import GradeHistoryPaper from "./components/GradeHistoryPaper";
|
|
|
import GradeAction from "./components/GradeAction";
|
|
|
-import GradeAnalysis from "./components/GradeAnalysis";
|
|
|
import ModifyLeaderGrading from "./components/ModifyLeaderGrading";
|
|
|
-import GradeAnalysisExport from "./components/GradeAnalysisExport";
|
|
|
// 三种情况:
|
|
|
// 管理员(ADMIN),科组长(MARK_LEADER),评卷员(MARKER)
|
|
|
// 管理员:标准卷,试卷列表,操作盘
|
|
@@ -245,13 +194,12 @@ export default {
|
|
|
name: "grading-detail",
|
|
|
components: {
|
|
|
SimpleImagePreview,
|
|
|
+ GradeFilter,
|
|
|
GradeStep,
|
|
|
GradeHistoryPaper,
|
|
|
GradeStandardPaper,
|
|
|
GradeAction,
|
|
|
- GradeAnalysis,
|
|
|
- ModifyLeaderGrading,
|
|
|
- GradeAnalysisExport
|
|
|
+ ModifyLeaderGrading
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
@@ -273,16 +221,17 @@ export default {
|
|
|
workId: this.$route.params.workId,
|
|
|
subjectId: this.$route.params.subjectId,
|
|
|
subject: "",
|
|
|
+ workSubject: {},
|
|
|
curSubject: {},
|
|
|
curUserRoleType: "MARKER",
|
|
|
current: 1,
|
|
|
size: 6,
|
|
|
total: 0,
|
|
|
totalPage: 1,
|
|
|
- curStep: { type: "analysis", name: "analysis" },
|
|
|
+ curStep: { type: "", name: "" },
|
|
|
steps: {},
|
|
|
levels: [],
|
|
|
- areas: [],
|
|
|
+ curArea: {},
|
|
|
papers: [],
|
|
|
curPaper: {},
|
|
|
curPaperIndex: 0,
|
|
@@ -297,17 +246,16 @@ export default {
|
|
|
isFullscreenMarking: false,
|
|
|
// multiple grading
|
|
|
multiplebtnClicked: false,
|
|
|
- multipleGradingList: [],
|
|
|
- // export
|
|
|
- renderExportPage: false,
|
|
|
- renderChartData: {},
|
|
|
- renderPageInfo: {},
|
|
|
- isDownload: false
|
|
|
+ multipleGradingList: []
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
compClasses() {
|
|
|
- return ["grading-detail", { "grading-operation": this.IS_MARK_LEADER }];
|
|
|
+ return [
|
|
|
+ "page-container-flex",
|
|
|
+ "grading-detail",
|
|
|
+ { "grading-operation": this.IS_MARK_LEADER }
|
|
|
+ ];
|
|
|
},
|
|
|
detailPapersClasses() {
|
|
|
return ["detail-papers", `detail-papers-col-${1 + this.size / 2}`];
|
|
@@ -337,22 +285,21 @@ export default {
|
|
|
: "grading-operation-image-preview";
|
|
|
}
|
|
|
},
|
|
|
- mounted() {
|
|
|
+ created() {
|
|
|
this.subject = this.subjectId.split("-")[1];
|
|
|
+ this.workSubject = {
|
|
|
+ workId: this.workId,
|
|
|
+ subject: this.subject
|
|
|
+ };
|
|
|
this.curUserRoleType = this.$ls.get("user", { role: "" }).role;
|
|
|
this.initData();
|
|
|
},
|
|
|
methods: {
|
|
|
async initData() {
|
|
|
- this.getParamsSetInfo();
|
|
|
+ await this.getParamsSetInfo();
|
|
|
await this.getSubjectDetail();
|
|
|
// 获取档位列表
|
|
|
this.getWorkLevels();
|
|
|
- // 获取考区列表,一个考区对应一个questionId
|
|
|
- await this.getAreaList();
|
|
|
- this.filter.questionId = this.areas[0].id;
|
|
|
- // 获取顶部档位导航
|
|
|
- this.getStepLevels();
|
|
|
},
|
|
|
async getParamsSetInfo() {
|
|
|
this.paramsSet = await getParamsSet(this.workId);
|
|
@@ -425,6 +372,10 @@ export default {
|
|
|
};
|
|
|
});
|
|
|
this.steps = { levelStep, otherStep };
|
|
|
+
|
|
|
+ if (!this.curStep.type) {
|
|
|
+ this.curStep = levelStep[0];
|
|
|
+ }
|
|
|
},
|
|
|
async getWorkLevels() {
|
|
|
const data = await workLevelList(this.workId);
|
|
@@ -437,22 +388,8 @@ export default {
|
|
|
};
|
|
|
});
|
|
|
},
|
|
|
- async getAreaList() {
|
|
|
- const data = await areaList({
|
|
|
- workId: this.workId,
|
|
|
- subject: this.subject
|
|
|
- });
|
|
|
- this.areas = data.map(item => {
|
|
|
- return {
|
|
|
- id: item.id,
|
|
|
- areaName: item.areaName,
|
|
|
- areaCode: item.areaCode
|
|
|
- };
|
|
|
- });
|
|
|
- },
|
|
|
async stepChange(step) {
|
|
|
this.curStep = step;
|
|
|
- if (step.type === "analysis") return;
|
|
|
|
|
|
this.current = 1;
|
|
|
await this.getList();
|
|
@@ -462,15 +399,11 @@ export default {
|
|
|
this.curPaper = {};
|
|
|
}
|
|
|
},
|
|
|
- areaChange() {
|
|
|
- this.getStepLevels();
|
|
|
- if (this.curStep.type === "analysis") {
|
|
|
- this.$nextTick(() => {
|
|
|
- this.$refs.GradeAnalysis.initData();
|
|
|
- });
|
|
|
- } else {
|
|
|
- this.toPage(1);
|
|
|
- }
|
|
|
+ async areaChange(curArea) {
|
|
|
+ this.curArea = curArea;
|
|
|
+ this.filter.questionId = curArea.id;
|
|
|
+ await this.getStepLevels();
|
|
|
+ this.toPage(1);
|
|
|
},
|
|
|
// selectMultiplePaper
|
|
|
selectMultiplePaper(paper) {
|
|
@@ -680,29 +613,6 @@ export default {
|
|
|
standardPaperChange(curPaper) {
|
|
|
if (!this.isFullscreenMarking) return;
|
|
|
this.curPaper = { ...curPaper };
|
|
|
- },
|
|
|
- // export
|
|
|
- toExport() {
|
|
|
- this.isDownload = true;
|
|
|
- const curArea = this.areas.find(
|
|
|
- item => item.id === this.filter.questionId
|
|
|
- );
|
|
|
- this.renderPageInfo = {
|
|
|
- subjectName: this.$parent.curSubject.name,
|
|
|
- areaName: curArea.areaName
|
|
|
- };
|
|
|
- this.renderChartData = {
|
|
|
- levelData: this.$refs.GradeAnalysis.levelData,
|
|
|
- lineChartData: this.$refs.GradeAnalysis.lineChartData
|
|
|
- };
|
|
|
- this.renderExportPage = true;
|
|
|
- },
|
|
|
- exportOver(result) {
|
|
|
- if (!result) {
|
|
|
- this.$Message.error("导出失败,请重新尝试!");
|
|
|
- }
|
|
|
- this.renderExportPage = false;
|
|
|
- this.isDownload = false;
|
|
|
}
|
|
|
}
|
|
|
};
|