zhangjie 4 tahun lalu
induk
melakukan
c6384d1dd7

+ 10 - 3
src/api.js

@@ -225,6 +225,9 @@ export const finishTryGradingTask = datas => {
 export const checkMissionStatus = ({ workId, subject }) => {
   return $get("/api/trial/checkMissionStatus", { workId, subject });
 };
+export const checkCanPublishTask = subjectId => {
+  return $get(`/api/marksubjects/${subjectId}/canLevel`);
+};
 // 分档任务发布
 export const createGradingTask = ({ subjectId, taskCount, questionId }) => {
   return $patch(
@@ -264,6 +267,9 @@ export const workLevelList = workId => {
 export const levelStatData = (subjectId, questionId) => {
   return $get(`/api/marksubjects/${subjectId}/stat/levels`, { questionId });
 };
+export const scoreStatData = (subjectId, questionId) => {
+  return $get(`/api/marksubjects/${subjectId}/stat/scores`, { questionId });
+};
 export const markerLevelStatData = (userId, questionId) => {
   return $get(`/api/markers/${userId}/stat/levels`, { questionId });
 };
@@ -300,9 +306,10 @@ export const markerDetail = userId => {
   return $get(`/api/markers/${userId}`);
 };
 // leader mark paper
-export const leaderGradingPaper = (paperId, datas) => {
-  // datas:{value: ,level:,range?}
-  return $patch(`/api/papers/${paperId}`, datas, "json");
+export const leaderGradingPaper = datas => {
+  // datas:{value: ,level:,range?, paperIds: '1,2'}
+  return $patch(`/api/papers/batch`, datas, "json");
+  // return $patch(`/api/papers/${paperId}`, datas, "json");
 };
 // review action history
 export const actionHistory = datas => {

+ 19 - 2
src/assets/styles/main.less

@@ -188,7 +188,8 @@
   &-act {
     img {
       // box-shadow: 0px 10px 20px 0px rgba(34, 192, 255, 0.5);
-      box-shadow: 0 0 20px rgba(34, 192, 255, 0.6);
+      // box-shadow: 0 0 20px rgba(34, 192, 255, 0.6);
+      box-shadow: -20px 0px 40px 0px rgba(224, 225, 235, 1);
     }
   }
 
@@ -238,7 +239,23 @@
     }
   }
   &-actions {
-    margin-top: 20px;
+    width: 30%;
+    border-radius: @box-border-radius-small;
+    background-color: @background-color;
+    height: 20px;
+    margin: 20px auto 0;
+    cursor: pointer;
+
+    &:hover {
+      background-color: shade(@background-color, 5%);
+    }
+    &.image-view-selected {
+      background-color: @sub-color;
+    }
+    &.image-view-disabled {
+      cursor: not-allowed;
+      background-color: @background-color;
+    }
   }
 }
 .image-view-list {

+ 7 - 15
src/assets/styles/mark.less

@@ -175,6 +175,13 @@
     z-index: 9;
   }
 }
+// modify-formal-grading-task
+.modify-formal-grading-task {
+  .tips-info {
+    margin-bottom: 15px;
+    text-align: center;
+  }
+}
 // modify-unformal-grading-task
 .modify-unformal-grading-task {
   .task-body {
@@ -335,21 +342,6 @@
       .image-view-list {
         margin: 0;
       }
-      .image-view-actions {
-        width: 30%;
-        border-radius: @box-border-radius-small;
-        background-color: @background-color;
-        height: 20px;
-        margin: 20px auto 0;
-        cursor: pointer;
-
-        &:hover {
-          background-color: shade(@background-color, 5%);
-        }
-        &.image-view-selected {
-          background-color: @sub-color;
-        }
-      }
       .part-page {
         position: absolute;
         bottom: 10px;

+ 0 - 1
src/components/SimpleImagePreview.vue

@@ -3,7 +3,6 @@
     :class="prefixCls"
     v-model="modalIsShow"
     title="图片预览"
-    :mask-closable="false"
     fullscreen
     footer-hide
     @on-visible-change="visibleChange"

+ 125 - 23
src/modules/grading/GradingDetail.vue

@@ -52,6 +52,7 @@
           'detail-action',
           { 'detail-action-fullscreen': isFullscreenMarking }
         ]"
+        v-show="!multipleGradingList.length"
       >
         <grade-action
           :cur-paper-or-task="curPaper"
@@ -63,6 +64,32 @@
           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">
@@ -78,6 +105,10 @@
             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="
@@ -107,6 +138,15 @@
                   @click="toReview(index)"
                 />
               </div>
+              <div
+                :class="[
+                  'image-view-actions',
+                  { 'image-view-selected': image.selected },
+                  { 'image-view-disabled': image.sample }
+                ]"
+                :title="image.sample ? '标准卷' : '选中批量操作'"
+                @click="selectMultiplePaper(image)"
+              ></div>
             </div>
           </div>
           <div class="part-page" v-if="total > size">
@@ -177,7 +217,8 @@ import {
   areaList,
   workLevelList,
   taskSnSearch,
-  subjectDetail
+  subjectDetail,
+  markHistoryList
 } from "@/api";
 import SimpleImagePreview from "@/components/SimpleImagePreview";
 import GradeStep from "./components/GradeStep";
@@ -211,8 +252,7 @@ export default {
     return {
       filter: {
         questionId: "",
-        sort: "secretNumber",
-        isSample: false
+        sort: "secretNumber"
       },
       typeFilter: {
         done: {
@@ -249,6 +289,9 @@ export default {
       carouselPapers: [],
       curCarouselPaperIndex: 0,
       isFullscreenMarking: false,
+      // multiple grading
+      multiplebtnClicked: false,
+      multipleGradingList: [],
       // export
       renderExportPage: false,
       renderChartData: {},
@@ -275,6 +318,9 @@ export default {
     IS_TEST() {
       return this.curSubject.test === 2;
     },
+    ACTION_CAN_BATCH() {
+      return this.curStep.type === "done" && this.IS_MARK_LEADER;
+    },
     imagePreviewClasses() {
       return this.IS_ADMIN
         ? "grading-detail-image-preview"
@@ -298,6 +344,7 @@ export default {
       this.getStepLevels();
     },
     async getList() {
+      this.multipleGradingList = [];
       const datas = {
         ...this.filter,
         ...this.typeFilter[this.curStep.type],
@@ -309,6 +356,7 @@ export default {
       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;
@@ -325,29 +373,34 @@ export default {
       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) {
-        const undo = { ...data[undoIndex] };
+        undo = { ...data[undoIndex] };
         data.splice(undoIndex, 1);
+      }
 
-        if (this.IS_MARK_LEADER && this.IS_TEST) {
-          otherStep.push({
-            name: "待评",
-            count: undo.count,
-            type: "undo"
-          });
-        }
-
+      if (this.IS_MARK_LEADER && this.IS_TEST) {
         otherStep.push({
-          name: "打回",
-          count: undo.rejected,
-          type: "reject"
-        });
-        otherStep.push({
-          name: "仲裁",
-          count: undo.arbitrated,
-          type: "arbitrate"
+          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,
@@ -394,15 +447,47 @@ export default {
       }
     },
     areaChange() {
+      this.getStepLevels();
       if (this.curStep.type === "analysis") {
         this.$nextTick(() => {
           this.$refs.GradeAnalysis.initData();
         });
       } else {
-        this.getStepLevels();
         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);
@@ -485,13 +570,30 @@ export default {
       this.markers = markers;
       this.$refs.ModifyLeaderGrading.open();
     },
-    leaderGradingSuccess(datas, paper) {
+    async leaderGradingSuccess(datas, paper) {
       if (datas.action === "sampling") {
         this.$refs.GradeStandardPaper.updateLevelPapers(datas.level);
       }
       this.getStepLevels();
       this.updateHistory();
-      this.toActionNextPaper();
+
+      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) {

+ 21 - 16
src/modules/grading/GradingOperation.vue

@@ -133,9 +133,10 @@
                   <div
                     :class="[
                       'image-view-actions',
-                      { 'image-view-selected': image.selected }
+                      { 'image-view-selected': image.selected },
+                      { 'image-view-disabled': image.sample }
                     ]"
-                    title="选中批量分档"
+                    :title="image.sample ? '标准卷' : '选中批量分档'"
                     @click="selectMultiplePaper(image)"
                   ></div>
                 </div>
@@ -225,8 +226,7 @@ export default {
         markerId: this.$ls.get("user").id,
         questionId: "",
         sort: "randomSeq,asc",
-        stage: "LEVEL",
-        isSample: false
+        stage: "LEVEL"
       },
       typeFilter: {
         done: {
@@ -322,21 +322,25 @@ export default {
       );
       const undoIndex = data.findIndex(item => item.id === null);
       let otherStep = [];
+      let undo = {
+        count: 0,
+        rejected: 0
+      };
       if (undoIndex !== -1) {
-        const undo = { ...data[undoIndex] };
+        undo = { ...data[undoIndex] };
         data.splice(undoIndex, 1);
-
-        otherStep.push({
-          name: "待评",
-          count: undo.count,
-          type: "undo"
-        });
-        otherStep.push({
-          name: "打回",
-          count: undo.rejected,
-          type: "reject"
-        });
       }
+
+      otherStep.push({
+        name: "待评",
+        count: undo.count,
+        type: "undo"
+      });
+      otherStep.push({
+        name: "打回",
+        count: undo.rejected,
+        type: "reject"
+      });
       let levelStep = data.map(item => {
         return {
           ...item,
@@ -402,6 +406,7 @@ export default {
     },
     // selectMultiplePaper
     selectMultiplePaper(paper) {
+      if (paper.sample) return;
       paper.selected = !paper.selected;
       this.multipleGradingList = this.papers.filter(paper => paper.selected);
     },

+ 1 - 1
src/modules/grading/components/GradeAction.vue

@@ -322,7 +322,7 @@ export default {
         this.$emit(
           "on-leader-level",
           {
-            paperId: this.curPaperOrTask.id,
+            paperIds: this.curPaperOrTask.id + "",
             curLevel: this.curPaperOrTask.level,
             selectedLevel: level.name
           },

+ 19 - 2
src/modules/grading/components/ModifyFormalGradingTask.vue

@@ -6,6 +6,9 @@
     :mask-closable="false"
     @on-visible-change="visibleChange"
   >
+    <p class="tips-info tips-error" v-if="!canPublish">
+      警告:当前批次还有未完成的任务,无法发布新任务!
+    </p>
     <Form
       ref="modalFormComp"
       class="modal-form"
@@ -55,7 +58,11 @@
       </FormItem>
     </Form>
     <div slot="footer">
-      <Button shape="circle" type="primary" :disabled="isSubmit" @click="submit"
+      <Button
+        shape="circle"
+        type="primary"
+        :disabled="isSubmit || !canPublish"
+        @click="submit"
         >发布</Button
       >
       <Button shape="circle" @click="cancel">取消</Button>
@@ -64,7 +71,12 @@
 </template>
 
 <script>
-import { checkMissionStatus, createGradingTask, areaStatProgress } from "@/api";
+import {
+  checkMissionStatus,
+  checkCanPublishTask,
+  createGradingTask,
+  areaStatProgress
+} from "@/api";
 import { numberValidator } from "@/plugins/formRules";
 
 const initModalForm = {
@@ -88,6 +100,7 @@ export default {
     return {
       modalIsShow: false,
       isSubmit: false,
+      canPublish: true,
       modalForm: { ...initModalForm },
       areas: [],
       rules: {
@@ -101,8 +114,12 @@ export default {
       if (visible) {
         this.$refs.modalFormComp.resetFields();
         this.getArea();
+        this.checkStatus();
       }
     },
+    async checkStatus() {
+      this.canPublish = await checkCanPublishTask(this.subjectId);
+    },
     async getArea() {
       const data = await areaStatProgress(this.subjectId);
       if (data.length > 1) {

+ 13 - 13
src/modules/grading/components/ModifyLeaderGrading.vue

@@ -9,7 +9,7 @@
     <div class="leader-grading">
       <div class="leader-level">
         <p>已选档位</p>
-        <h3>{{ LevelInfo.selectedLevel }}</h3>
+        <h3>{{ levelInfo.selectedLevel }}</h3>
       </div>
       <RadioGroup v-model="actionType">
         <div class="leader-aciton" v-if="standardVolume">
@@ -56,11 +56,11 @@ import { leaderGradingPaper } from "@/api";
 export default {
   name: "modify-leader-grading",
   props: {
-    LevelInfo: {
+    levelInfo: {
       type: Object,
       default() {
         return {
-          paperId: "",
+          paperIds: "",
           curLevel: "",
           selectedLevel: ""
         };
@@ -86,18 +86,20 @@ export default {
     };
   },
   methods: {
-    initData(val) {
+    initData() {
+      console.log(this.levelInfo);
+      const isMuliple = this.levelInfo.paperIds.includes(",");
       this.noneedLevelOrReject =
-        this.LevelInfo.curLevel === this.LevelInfo.selectedLevel;
+        this.levelInfo.curLevel === this.levelInfo.selectedLevel;
       const user = this.$ls.get("user");
-      this.standardVolume = user.standardVolume;
+      this.standardVolume = user.standardVolume && !isMuliple;
       this.levelCallback = user.levelCallback;
       this.oneClickLevel = user.oneClickLevel;
       // this.selectedMarkers = this.markers.map(item => item.id);
     },
     visibleChange(visible) {
       if (visible) {
-        this.initData(this.instance);
+        this.initData();
       } else {
         this.isSubmit = false;
         this.actionType = null;
@@ -120,8 +122,9 @@ export default {
       }
       const datas = {
         action: this.actionType,
-        level: this.LevelInfo.selectedLevel,
-        originLevel: this.LevelInfo.curLevel
+        level: this.levelInfo.selectedLevel,
+        originLevel: this.levelInfo.curLevel,
+        paperIds: this.levelInfo.paperIds
       };
       if (this.actionType === "reject")
         datas.range = this.selectedMarkers.join();
@@ -129,10 +132,7 @@ export default {
       if (this.isSubmit) return;
       this.isSubmit = true;
       let result = true;
-      const paper = await leaderGradingPaper(
-        this.LevelInfo.paperId,
-        datas
-      ).catch(() => {
+      const paper = await leaderGradingPaper(datas).catch(() => {
         result = false;
       });
       this.isSubmit = false;

+ 5 - 4
src/modules/main/StudentManage.vue

@@ -182,6 +182,7 @@
       :cascade-list="cascadeList"
       :instance="curStudent"
       @modified="getList"
+      @on-close="getAreaList"
       ref="ModifyStudent"
     ></modify-student>
   </div>
@@ -391,6 +392,10 @@ export default {
       this.rooms = curSchool ? curSchool.rooms : [];
       this.filter.examRoom = null;
     },
+    uploadSuccess() {
+      this.getList();
+      this.getAreaList();
+    },
     toAdd() {
       this.curStudent = { workId: this.filter.workId };
       this.$refs.ModifyStudent.open();
@@ -399,10 +404,6 @@ export default {
       this.curStudent = row;
       this.$refs.ModifyStudent.open();
     },
-    uploadSuccess() {
-      this.getList();
-      this.getAreaList();
-    },
     toDelete(row) {
       this.$Modal.confirm({
         width: 340,

+ 8 - 3
src/modules/main/components/ImageActionList.vue

@@ -62,7 +62,8 @@ export default {
   },
   data() {
     return {
-      curImageIndex: 0
+      curImageIndex: 0,
+      stepDeg: 0
     };
   },
   computed: {
@@ -82,16 +83,20 @@ export default {
   },
   methods: {
     toRotate(image) {
+      if (!image["stepDeg"]) image.stepDeg = 0;
       image.deg += 90;
       if (image.deg === 360) image.deg = 0;
+      image.stepDeg += 90;
+      if (image.stepDeg === 360) image.stepDeg = 0;
       image.styles = {
         transform: `rotate(${image.deg}deg)`
       };
     },
     async toSaveRotate(image) {
-      if (!image.deg) return;
+      if (!image.stepDeg) return;
 
-      await rotatePaper(image.id, image.deg);
+      await rotatePaper(image.id, image.stepDeg);
+      image.stepDeg = 0;
       this.$Message.success("保存成功!");
     },
     async toSignAbsent(image) {

+ 21 - 2
src/modules/main/components/ModifyStudent.vue

@@ -53,6 +53,9 @@
           v-model="modalForm.school"
           @on-change="schoolChange"
           placeholder="请选择学校"
+          filterable
+          allow-create
+          @on-create="createSchool"
         >
           <Option
             v-for="(item, index) in schools"
@@ -67,6 +70,10 @@
           size="large"
           v-model="modalForm.examRoom"
           placeholder="请选择考场"
+          filterable
+          allow-create
+          @on-create="createRoom"
+          :key="modalForm.school"
         >
           <Option
             v-for="(room, index) in rooms"
@@ -181,6 +188,8 @@ export default {
     visibleChange(visible) {
       if (visible) {
         this.initData(this.instance);
+      } else {
+        this.$emit("on-close");
       }
     },
     reviewInfo() {
@@ -197,7 +206,7 @@ export default {
       const curArea = this.cascadeList.find(
         item => item.areaCode === this.modalForm.areaCode
       );
-      this.schools = curArea.schools;
+      this.schools = curArea ? curArea.schools : [];
       this.modalForm.areaName = curArea.areaName;
       this.rooms = [];
       this.modalForm.examRoom = null;
@@ -210,8 +219,18 @@ export default {
       const curSchool = this.schools.find(
         item => item.school === this.modalForm.school
       );
-      this.rooms = curSchool.rooms;
+      this.rooms = curSchool ? curSchool.rooms : [];
       this.modalForm.examRoom = null;
+      // 后触发更改
+      // console.log("school change");
+    },
+    createSchool(val) {
+      this.schools.push({ school: val, rooms: [] });
+      // 先创建
+      // console.log("school create");
+    },
+    createRoom(val) {
+      this.rooms.push(val);
     },
     cancel() {
       this.modalIsShow = false;

+ 34 - 27
src/modules/mark/MarkDetail.vue

@@ -27,14 +27,13 @@
         </FormItem>
       </Form>
     </div>
-    <grade-step
+    <mark-step
       :steps="steps"
       :init-step="curStep"
-      :show-analysis="false"
       @on-change="stepChange"
-      ref="GradeStep"
+      ref="MarkStep"
       v-if="steps.levelStep"
-    ></grade-step>
+    ></mark-step>
     <div class="detail-body clear-float">
       <!-- detail-aciton -->
       <div
@@ -130,14 +129,14 @@
 import {
   paperList,
   changeLevelPaperList,
-  levelStatData,
+  scoreStatData,
   areaList,
   workLevelList,
   taskSnSearch,
   markStepChangeLevel
 } from "@/api";
 import SimpleImagePreview from "@/components/SimpleImagePreview";
-import GradeStep from "../grading/components/GradeStep";
+import MarkStep from "./components/MarkStep";
 import GradeHistoryPaper from "../grading/components/GradeHistoryPaper";
 import MarkAction from "./components/MarkAction";
 // 三种情况:
@@ -152,7 +151,7 @@ export default {
   name: "mark-detail",
   components: {
     SimpleImagePreview,
-    GradeStep,
+    MarkStep,
     GradeHistoryPaper,
     MarkAction
   },
@@ -160,9 +159,7 @@ export default {
     return {
       filter: {
         questionId: "",
-        sort: "score,desc",
-        level: "",
-        isSample: false
+        sort: "score,desc"
       },
       workId: this.$route.params.workId,
       subjectId: this.$route.params.subjectId,
@@ -240,16 +237,7 @@ export default {
     },
     async getList() {
       let data = [];
-      if (this.curStep.type === "done") {
-        const datas = {
-          ...this.filter,
-          level: this.curStep.name,
-          page: this.current - 1,
-          size: this.size
-        };
-
-        data = await paperList(datas);
-      } else {
+      if (this.curStep.type === "shift") {
         const datas = {
           workId: this.workId,
           subject: this.subject,
@@ -259,6 +247,16 @@ export default {
           size: this.size
         };
         data = await changeLevelPaperList(datas);
+      } else {
+        const datas = {
+          ...this.filter,
+          isScore: true,
+          page: this.current - 1,
+          size: this.size
+        };
+        if (this.curStep.type === "done") datas.level = this.curStep.name;
+
+        data = await paperList(datas);
       }
       this.papers = data.data.map(paper => {
         paper.title = this.IS_ADMIN ? paper.examNumber : `NO.${paper.sn}`;
@@ -272,18 +270,27 @@ export default {
       this.getList();
     },
     async getStepLevels() {
-      const data = await levelStatData(this.subjectId, this.filter.questionId);
+      const data = await scoreStatData(this.subjectId, this.filter.questionId);
       const undoIndex = data.findIndex(item => item.id === null);
       let otherStep = [];
+      let undo = {
+        count: 0,
+        shift: 0
+      };
       if (undoIndex !== -1) {
-        const undo = { ...data[undoIndex] };
+        undo = { ...data[undoIndex] };
         data.splice(undoIndex, 1);
-        otherStep.push({
-          name: "改档",
-          count: undo.shift,
-          type: "shift"
-        });
       }
+      otherStep.push({
+        name: "待评",
+        count: undo.count,
+        type: "undo"
+      });
+      otherStep.push({
+        name: "改档",
+        count: undo.shift,
+        type: "shift"
+      });
       let levelStep = data.map(item => {
         return {
           ...item,

+ 23 - 18
src/modules/mark/MarkOperation.vue

@@ -33,7 +33,7 @@
         <mark-step
           :steps="steps"
           :init-step="curStep"
-          :show-analysis="false"
+          :show-top-number="false"
           @on-change="stepChange"
           ref="MarkStep"
           v-if="steps.levelStep"
@@ -278,28 +278,32 @@ export default {
       );
       const undoIndex = data.findIndex(item => item.id === null);
       let otherStep = [];
+      let undo = {
+        count: 0,
+        shift: 0,
+        shiftScore: 0
+      };
       if (undoIndex !== -1) {
-        const undo = { ...data[undoIndex] };
+        undo = { ...data[undoIndex] };
         data.splice(undoIndex, 1);
+      }
+      otherStep.push({
+        name: "待评",
+        count: undo.count,
+        type: "undo"
+      });
 
+      if (this.changeStage) {
         otherStep.push({
-          name: "待评",
-          count: undo.count,
-          type: "undo"
+          name: "改档",
+          count: undo.shift,
+          type: "shift"
+        });
+        otherStep.push({
+          name: "改档打分",
+          count: undo.shiftScore,
+          type: "shiftScore"
         });
-
-        if (this.changeStage) {
-          otherStep.push({
-            name: "改档",
-            count: undo.shift,
-            type: "shift"
-          });
-          otherStep.push({
-            name: "改档打分",
-            count: undo.shiftScore,
-            type: "shiftScore"
-          });
-        }
       }
       let levelStep = data.map(item => {
         return {
@@ -309,6 +313,7 @@ export default {
         };
       });
       this.steps = { levelStep, otherStep };
+
       if (!this.curStep) {
         let curStep = {};
         if (undoIndex === -1) {

+ 3 - 1
src/modules/mark/components/MarkStep.vue

@@ -16,6 +16,7 @@
         ]"
         @click="selectStep(step)"
       >
+        <p v-if="showTopNumber"></p>
         <p class="step-name">{{ step.name }}</p>
         <p>{{ step.count }}</p>
       </div>
@@ -33,6 +34,7 @@
         ]"
         @click="selectStep(step)"
       >
+        <p v-if="showTopNumber">{{ step.gcount }}</p>
         <p class="step-name">{{ step.name }}</p>
         <p>{{ step.count }}</p>
       </div>
@@ -44,7 +46,7 @@
 export default {
   name: "mark-step",
   props: {
-    showAnalysis: {
+    showTopNumber: {
       type: Boolean,
       default: true
     },