|
@@ -1,695 +0,0 @@
|
|
-<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-step
|
|
|
|
- :steps="steps"
|
|
|
|
- :show-count="showPaperRelateCount"
|
|
|
|
- @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"
|
|
|
|
- :user-role="curUserRoleType"
|
|
|
|
- @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>
|
|
|
|
- <!-- detail-papers -->
|
|
|
|
- <div :class="detailPapersClasses">
|
|
|
|
- <div class="detail-papers-carousel">
|
|
|
|
- <grade-standard-paper
|
|
|
|
- :levels="levels"
|
|
|
|
- :question-id="filter.questionId"
|
|
|
|
- @on-paper-click="
|
|
|
|
- (index, papers) => {
|
|
|
|
- toViewCarouselPaper(index, papers, 'sample');
|
|
|
|
- }
|
|
|
|
- "
|
|
|
|
- @on-paper-change="standardPaperChange"
|
|
|
|
- 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="
|
|
|
|
- (index, papers) => {
|
|
|
|
- toViewCarouselPaper(index, papers, 'history');
|
|
|
|
- }
|
|
|
|
- "
|
|
|
|
- v-if="filter.questionId && !IS_ADMIN"
|
|
|
|
- ref="GradeHistoryPaper"
|
|
|
|
- ></grade-history-paper>
|
|
|
|
- </div>
|
|
|
|
- <div class="detail-papers-list" v-if="papers.length">
|
|
|
|
- <div :class="imageViewClasses">
|
|
|
|
- <div
|
|
|
|
- :class="[
|
|
|
|
- 'image-view',
|
|
|
|
- { 'image-view-act': curPaperIndex === index || image.selected }
|
|
|
|
- ]"
|
|
|
|
- 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>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- <div
|
|
|
|
- :class="[
|
|
|
|
- 'part-page',
|
|
|
|
- { 'part-page-simple': !showPaperRelateCount }
|
|
|
|
- ]"
|
|
|
|
- v-if="total > size"
|
|
|
|
- >
|
|
|
|
- <Page
|
|
|
|
- :current="current"
|
|
|
|
- :total="total"
|
|
|
|
- :page-size="size"
|
|
|
|
- :show-total="!!showPaperRelateCount"
|
|
|
|
- show-elevator
|
|
|
|
- @on-change="toPage"
|
|
|
|
- ></Page>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- <div class="detail-papers-list" v-else>
|
|
|
|
- <p class="detail-papers-none">暂无数据</p>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- <div class="detail-analysis" v-else>
|
|
|
|
- <grade-analysis
|
|
|
|
- :question-id="filter.questionId"
|
|
|
|
- :subject-id="subjectId"
|
|
|
|
- :show-count="showPaperRelateCount"
|
|
|
|
- ref="GradeAnalysis"
|
|
|
|
- v-if="filter.questionId && subjectId"
|
|
|
|
- ></grade-analysis>
|
|
|
|
- </div>
|
|
|
|
-
|
|
|
|
- <!-- image-preview -->
|
|
|
|
- <simple-image-preview
|
|
|
|
- :class="imagePreviewClasses"
|
|
|
|
- :cur-image="curPaper"
|
|
|
|
- @on-prev="toPrevPaper"
|
|
|
|
- @on-next="toNextPaper"
|
|
|
|
- @on-close="isFullscreenMarking = false"
|
|
|
|
- ref="SimpleImagePreview"
|
|
|
|
- ></simple-image-preview>
|
|
|
|
- <!-- carousel paper review -->
|
|
|
|
- <simple-image-preview
|
|
|
|
- :class="imagePreviewClasses"
|
|
|
|
- :cur-image="curPaper"
|
|
|
|
- @on-prev="toCarousePaper('prev')"
|
|
|
|
- @on-next="toCarousePaper('next')"
|
|
|
|
- @on-close="carouseImagePreviewClose"
|
|
|
|
- ref="CarouselPapersPreview"
|
|
|
|
- ></simple-image-preview>
|
|
|
|
- <!-- modify-leader-grading -->
|
|
|
|
- <modify-leader-grading
|
|
|
|
- :level-info="levelInfo"
|
|
|
|
- :markers="markers"
|
|
|
|
- @modified="leaderGradingSuccess"
|
|
|
|
- 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>
|
|
|
|
-
|
|
|
|
-<script>
|
|
|
|
-import {
|
|
|
|
- paperList,
|
|
|
|
- levelStatData,
|
|
|
|
- areaList,
|
|
|
|
- workLevelList,
|
|
|
|
- taskSnSearch,
|
|
|
|
- subjectDetail,
|
|
|
|
- markHistoryList,
|
|
|
|
- getParamsSet
|
|
|
|
-} from "@/api";
|
|
|
|
-import SimpleImagePreview from "@/components/SimpleImagePreview";
|
|
|
|
-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)
|
|
|
|
-// 管理员:标准卷,试卷列表,操作盘
|
|
|
|
-// 科组长:标准卷,操作记录,试卷列表,操作盘(定档,标准卷,打回)
|
|
|
|
-
|
|
|
|
-// TIP:不考虑评卷员的情况
|
|
|
|
-// 评卷员:标准卷,操作记录,试卷列表,操作盘(只分档)
|
|
|
|
-
|
|
|
|
-export default {
|
|
|
|
- name: "grading-detail",
|
|
|
|
- components: {
|
|
|
|
- SimpleImagePreview,
|
|
|
|
- GradeStep,
|
|
|
|
- GradeHistoryPaper,
|
|
|
|
- GradeStandardPaper,
|
|
|
|
- GradeAction,
|
|
|
|
- GradeAnalysis,
|
|
|
|
- ModifyLeaderGrading,
|
|
|
|
- GradeAnalysisExport
|
|
|
|
- },
|
|
|
|
- data() {
|
|
|
|
- return {
|
|
|
|
- filter: {
|
|
|
|
- questionId: "",
|
|
|
|
- sort: "secretNumber"
|
|
|
|
- },
|
|
|
|
- typeFilter: {
|
|
|
|
- done: {
|
|
|
|
- level: ""
|
|
|
|
- },
|
|
|
|
- reject: {
|
|
|
|
- reject: true
|
|
|
|
- },
|
|
|
|
- arbitrate: {
|
|
|
|
- arbi: true
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- workId: this.$route.params.workId,
|
|
|
|
- subjectId: this.$route.params.subjectId,
|
|
|
|
- subject: "",
|
|
|
|
- curSubject: {},
|
|
|
|
- curUserRoleType: "MARKER",
|
|
|
|
- current: 1,
|
|
|
|
- size: 6,
|
|
|
|
- total: 0,
|
|
|
|
- totalPage: 1,
|
|
|
|
- curStep: { type: "analysis", name: "analysis" },
|
|
|
|
- steps: {},
|
|
|
|
- levels: [],
|
|
|
|
- areas: [],
|
|
|
|
- papers: [],
|
|
|
|
- curPaper: {},
|
|
|
|
- curPaperIndex: 0,
|
|
|
|
- paramsSet: {},
|
|
|
|
- // leader-grade
|
|
|
|
- levelInfo: {},
|
|
|
|
- markers: [],
|
|
|
|
- // carousel paper review,
|
|
|
|
- carouselType: "",
|
|
|
|
- carouselPapers: [],
|
|
|
|
- curCarouselPaperIndex: 0,
|
|
|
|
- isFullscreenMarking: false,
|
|
|
|
- // multiple grading
|
|
|
|
- multiplebtnClicked: false,
|
|
|
|
- multipleGradingList: [],
|
|
|
|
- // export
|
|
|
|
- renderExportPage: false,
|
|
|
|
- renderChartData: {},
|
|
|
|
- renderPageInfo: {},
|
|
|
|
- isDownload: false
|
|
|
|
- };
|
|
|
|
- },
|
|
|
|
- computed: {
|
|
|
|
- compClasses() {
|
|
|
|
- return ["grading-detail", { "grading-operation": this.IS_MARK_LEADER }];
|
|
|
|
- },
|
|
|
|
- detailPapersClasses() {
|
|
|
|
- return ["detail-papers", `detail-papers-col-${1 + this.size / 2}`];
|
|
|
|
- },
|
|
|
|
- imageViewClasses() {
|
|
|
|
- return ["image-view-list", `image-view-list-${this.size / 2}`];
|
|
|
|
- },
|
|
|
|
- showPaperRelateCount() {
|
|
|
|
- return this.IS_ADMIN || !!this.paramsSet["showPaperCount"];
|
|
|
|
- },
|
|
|
|
- IS_ADMIN() {
|
|
|
|
- return (
|
|
|
|
- this.curUserRoleType === "ADMIN" ||
|
|
|
|
- this.curUserRoleType === "SUPER_ADMIN"
|
|
|
|
- );
|
|
|
|
- },
|
|
|
|
- IS_MARK_LEADER() {
|
|
|
|
- return this.curUserRoleType === "MARK_LEADER";
|
|
|
|
- },
|
|
|
|
- IS_TEST() {
|
|
|
|
- return this.curSubject.test === 2;
|
|
|
|
- },
|
|
|
|
- ACTION_CAN_BATCH() {
|
|
|
|
- return (
|
|
|
|
- this.curStep.type === "done" &&
|
|
|
|
- this.IS_MARK_LEADER &&
|
|
|
|
- !this.paramsSet.paperStage
|
|
|
|
- );
|
|
|
|
- },
|
|
|
|
- imagePreviewClasses() {
|
|
|
|
- return this.IS_ADMIN
|
|
|
|
- ? "grading-detail-image-preview"
|
|
|
|
- : "grading-operation-image-preview";
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- mounted() {
|
|
|
|
- this.subject = this.subjectId.split("-")[1];
|
|
|
|
- this.curUserRoleType = this.$ls.get("user", { role: "" }).role;
|
|
|
|
- this.initData();
|
|
|
|
- },
|
|
|
|
- methods: {
|
|
|
|
- async initData() {
|
|
|
|
- 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);
|
|
|
|
- },
|
|
|
|
- async getList() {
|
|
|
|
- this.multipleGradingList = [];
|
|
|
|
- const datas = {
|
|
|
|
- ...this.filter,
|
|
|
|
- ...this.typeFilter[this.curStep.type],
|
|
|
|
- page: this.current - 1,
|
|
|
|
- size: this.size
|
|
|
|
- };
|
|
|
|
- if (this.curStep.type === "done") datas.level = this.curStep.name;
|
|
|
|
-
|
|
|
|
- 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;
|
|
|
|
- this.totalPage = data.pageCount;
|
|
|
|
- },
|
|
|
|
- async toPage(page) {
|
|
|
|
- this.current = page;
|
|
|
|
- await this.getList();
|
|
|
|
- this.selectPaper(this.curPaperIndex);
|
|
|
|
- },
|
|
|
|
- async getSubjectDetail() {
|
|
|
|
- this.curSubject = await subjectDetail(this.subjectId);
|
|
|
|
- },
|
|
|
|
- async getStepLevels() {
|
|
|
|
- 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) {
|
|
|
|
- undo = { ...data[undoIndex] };
|
|
|
|
- data.splice(undoIndex, 1);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- 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 => {
|
|
|
|
- return {
|
|
|
|
- ...item,
|
|
|
|
- name: item.id,
|
|
|
|
- type: "done"
|
|
|
|
- };
|
|
|
|
- });
|
|
|
|
- this.steps = { levelStep, otherStep };
|
|
|
|
- },
|
|
|
|
- async getWorkLevels() {
|
|
|
|
- const data = await workLevelList(this.workId);
|
|
|
|
- this.levels = data.map(item => {
|
|
|
|
- return {
|
|
|
|
- id: item.id,
|
|
|
|
- name: item.code,
|
|
|
|
- minScore: item.minScore,
|
|
|
|
- maxScore: item.maxScore
|
|
|
|
- };
|
|
|
|
- });
|
|
|
|
- },
|
|
|
|
- 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();
|
|
|
|
- if (this.papers.length) {
|
|
|
|
- this.selectPaper(0);
|
|
|
|
- } else {
|
|
|
|
- this.curPaper = {};
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- areaChange() {
|
|
|
|
- this.getStepLevels();
|
|
|
|
- if (this.curStep.type === "analysis") {
|
|
|
|
- this.$nextTick(() => {
|
|
|
|
- this.$refs.GradeAnalysis.initData();
|
|
|
|
- });
|
|
|
|
- } else {
|
|
|
|
- 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);
|
|
|
|
- this.$refs.SimpleImagePreview.open();
|
|
|
|
- },
|
|
|
|
- selectPaper(index) {
|
|
|
|
- let nindex = index;
|
|
|
|
- if (!this.papers.length) {
|
|
|
|
- nindex = 0;
|
|
|
|
- } else if (index > this.papers.length - 1) {
|
|
|
|
- nindex = this.papers.length - 1;
|
|
|
|
- } else if (index < 0) {
|
|
|
|
- nindex = 0;
|
|
|
|
- }
|
|
|
|
- this.curPaperIndex = nindex;
|
|
|
|
- this.curPaper = this.papers[nindex] ? { ...this.papers[nindex] } : {};
|
|
|
|
- },
|
|
|
|
- async toPrevPaper() {
|
|
|
|
- if (this.curPaperIndex === 0) {
|
|
|
|
- if (this.current > 1) {
|
|
|
|
- this.current--;
|
|
|
|
- this.curPaperIndex = this.size - 1;
|
|
|
|
- await this.getList();
|
|
|
|
- } else {
|
|
|
|
- this.$Message.warning("当前已经是第一条数据了");
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- } else {
|
|
|
|
- this.curPaperIndex--;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- this.selectPaper(this.curPaperIndex);
|
|
|
|
- },
|
|
|
|
- async toNextPaper() {
|
|
|
|
- if (this.curPaperIndex === this.papers.length - 1) {
|
|
|
|
- if (this.current === this.totalPage) {
|
|
|
|
- this.$Message.warning("当前已经是最后一条数据了");
|
|
|
|
- return;
|
|
|
|
- } else {
|
|
|
|
- this.current++;
|
|
|
|
- this.curPaperIndex = 0;
|
|
|
|
- await this.getList();
|
|
|
|
- }
|
|
|
|
- } else {
|
|
|
|
- this.curPaperIndex++;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- this.selectPaper(this.curPaperIndex);
|
|
|
|
- },
|
|
|
|
- async toActionNextPaper() {
|
|
|
|
- if (this.current > 1 && this.papers.length === 1) {
|
|
|
|
- this.current--;
|
|
|
|
- this.curPaperIndex = this.size;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- await this.getList();
|
|
|
|
- if (!this.papers.length) this.$refs.SimpleImagePreview.cancel();
|
|
|
|
- this.selectPaper(this.curPaperIndex);
|
|
|
|
- },
|
|
|
|
- updateHistory() {
|
|
|
|
- this.$refs.GradeHistoryPaper.updatePapers();
|
|
|
|
- },
|
|
|
|
- async serachPaperByCode(params) {
|
|
|
|
- const data = await taskSnSearch(
|
|
|
|
- params.codeType,
|
|
|
|
- params.code,
|
|
|
|
- this.filter.questionId
|
|
|
|
- );
|
|
|
|
- if (!data) {
|
|
|
|
- this.$Message.error("没有查找到结果!");
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- data.title = this.IS_ADMIN ? data.examNumber : `NO.${data.sn}`;
|
|
|
|
- this.papers = [data];
|
|
|
|
- this.total = 1;
|
|
|
|
- this.selectPaper(0);
|
|
|
|
- },
|
|
|
|
- leaderSelectLevel(levelInfo, markers) {
|
|
|
|
- this.levelInfo = levelInfo;
|
|
|
|
- this.markers = markers;
|
|
|
|
- this.$refs.ModifyLeaderGrading.open();
|
|
|
|
- },
|
|
|
|
- async leaderGradingSuccess(datas, paper) {
|
|
|
|
- if (datas.action === "sampling") {
|
|
|
|
- this.$refs.GradeStandardPaper.updateLevelPapers(datas.level);
|
|
|
|
- }
|
|
|
|
- this.getStepLevels();
|
|
|
|
- this.updateHistory();
|
|
|
|
-
|
|
|
|
- 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) {
|
|
|
|
- this.carouselType = type;
|
|
|
|
- this.isFullscreenMarking = true;
|
|
|
|
- this.carouselPapers = papers;
|
|
|
|
- this.selectCarouselPaper(paperIndex);
|
|
|
|
- this.$nextTick(() => {
|
|
|
|
- this.$refs.CarouselPapersPreview.open();
|
|
|
|
- });
|
|
|
|
- },
|
|
|
|
- selectCarouselPaper(index) {
|
|
|
|
- this.curCarouselPaperIndex = index;
|
|
|
|
- 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 (
|
|
|
|
- type === "next" &&
|
|
|
|
- this.curCarouselPaperIndex < this.carouselPapers.length - 1
|
|
|
|
- ) {
|
|
|
|
- this.curCarouselPaperIndex++;
|
|
|
|
- }
|
|
|
|
- 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 = "";
|
|
|
|
- this.selectPaper(this.curPaperIndex);
|
|
|
|
- },
|
|
|
|
- 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;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-};
|
|
|
|
-</script>
|
|
|