소스 검색

功能修改完成

zhangjie 4 년 전
부모
커밋
5d9a8396c3

+ 1 - 1
src/App.vue

@@ -13,7 +13,7 @@ export default {
   data() {
   data() {
     return {
     return {
       // unactiveTime: 5 * 1000,
       // unactiveTime: 5 * 1000,
-      unactiveTime: 5 * 60 * 1000,
+      unactiveTime: 5000 * 60 * 1000,
       timeIsOut: false
       timeIsOut: false
     };
     };
   },
   },

+ 20 - 0
src/api.js

@@ -86,6 +86,9 @@ export const updateStudent = datas => {
 export const deleteStudent = studentId => {
 export const deleteStudent = studentId => {
   return $del(`/api/students/${studentId}`, {});
   return $del(`/api/students/${studentId}`, {});
 };
 };
+export const absentStudentSubject = datas => {
+  return $post(`/api/students/missing`, datas);
+};
 export const areaSchoolRoomCascadeList = workId => {
 export const areaSchoolRoomCascadeList = workId => {
   // 考区-学校-考场 联动查询
   // 考区-学校-考场 联动查询
   return $get(`/api/students/select/${workId}`);
   return $get(`/api/students/select/${workId}`);
@@ -293,6 +296,9 @@ export const scoreStatData = (subjectId, questionId) => {
 export const markerLevelStatData = (userId, questionId) => {
 export const markerLevelStatData = (userId, questionId) => {
   return $get(`/api/markers/${userId}/stat/levels`, { questionId });
   return $get(`/api/markers/${userId}/stat/levels`, { questionId });
 };
 };
+export const markerLevelTotalStatData = (userId, questionId) => {
+  return $get(`/api/markers/${userId}/stat/totalLevels`, { questionId });
+};
 // area
 // area
 export const areaList = ({ workId, subject }) => {
 export const areaList = ({ workId, subject }) => {
   return $get("/api/questions", { workId, subject });
   return $get("/api/questions", { workId, subject });
@@ -302,6 +308,10 @@ export const paperList = datas => {
   // ?questionId=64&level=A&page=0&size=6&sort=secretNumber&isSample=true
   // ?questionId=64&level=A&page=0&size=6&sort=secretNumber&isSample=true
   return $get("/api/papers", datas);
   return $get("/api/papers", datas);
 };
 };
+export const paperManualScoreList = datas => {
+  // ?questionId=64&workId=73&page=0&size=6
+  return $get("/api/papers/manualScore", datas);
+};
 export const markerTaskList = datas => {
 export const markerTaskList = datas => {
   // ?stage=LEVEL&markerId=49&size=6&page=0&sort=updatedOn,desc&questionId=73&isSample=false&level=C
   // ?stage=LEVEL&markerId=49&size=6&page=0&sort=updatedOn,desc&questionId=73&isSample=false&level=C
   return $get("/api/marktasks", datas);
   return $get("/api/marktasks", datas);
@@ -344,6 +354,9 @@ export const leaderGradingPaper = datas => {
 export const actionHistory = datas => {
 export const actionHistory = datas => {
   return $get("/api/marktasks/reviewPaper", datas);
   return $get("/api/marktasks/reviewPaper", datas);
 };
 };
+export const actionLeaderHistory = datas => {
+  return $get("/api/marktasks/kzzReviewPaper", datas);
+};
 // sn search
 // sn search
 export const taskSnSearch = (type, code, questionId) => {
 export const taskSnSearch = (type, code, questionId) => {
   if (type === "task") {
   if (type === "task") {
@@ -392,11 +405,18 @@ export const markTaskInfo = (subjectId, questionId) => {
 export const markerScoreStatData = (userId, questionId) => {
 export const markerScoreStatData = (userId, questionId) => {
   return $get(`/api/markers/${userId}/stat/scores`, { questionId });
   return $get(`/api/markers/${userId}/stat/scores`, { questionId });
 };
 };
+export const markerScoreTotalStatData = (userId, questionId) => {
+  return $get(`/api/markers/${userId}/stat/totalScores`, { questionId });
+};
 // mark-operation
 // mark-operation
 export const markerChangeLevelPaperList = datas => {
 export const markerChangeLevelPaperList = datas => {
   // ?markerId=49&size=6&page=0&isShift=true&isShiftScore=false&questionId=10
   // ?markerId=49&size=6&page=0&isShift=true&isShiftScore=false&questionId=10
   return $get(`/api/marktasks/shift`, datas);
   return $get(`/api/marktasks/shift`, datas);
 };
 };
+export const markerManualScorePaperList = datas => {
+  // ?markerId=49&workId=22&questionId=10&size=6&page=0
+  return $get(`/api/marktasks/manualScore`, datas);
+};
 
 
 // inspection -------------------------->
 // inspection -------------------------->
 // inspection-log
 // inspection-log

+ 0 - 3
src/assets/styles/adaptive.less

@@ -95,9 +95,6 @@
     }
     }
   }
   }
   .grading-detail {
   .grading-detail {
-    .grade-filter {
-      top: 65px;
-    }
     .detail-papers {
     .detail-papers {
       padding: 0 15px;
       padding: 0 15px;
     }
     }

+ 6 - 0
src/assets/styles/base.less

@@ -399,6 +399,12 @@ h3.account-title {
     color: fade(@primary-color, 80%);
     color: fade(@primary-color, 80%);
   }
   }
 }
 }
+.color-text-hover {
+  color: @dark-color-light;
+  &:hover {
+    color: @dark-color;
+  }
+}
 .color-error-hover {
 .color-error-hover {
   color: @error-color;
   color: @error-color;
 
 

+ 2 - 2
src/assets/styles/iview.less

@@ -19,8 +19,8 @@
 @btn-height-large: 50px;
 @btn-height-large: 50px;
 @btn-height-small: 32px;
 @btn-height-small: 32px;
 
 
-@btn-border-radius: 10px;
-@btn-border-radius-small: 10px;
+@btn-border-radius: 8px;
+@btn-border-radius-small: 4px;
 
 
 @btn-padding-small: 0 11px;
 @btn-padding-small: 0 11px;
 
 

+ 1 - 0
src/main.js

@@ -79,6 +79,7 @@ axios.interceptors.request.use(
     if (user) {
     if (user) {
       config.headers["userId"] = user.id;
       config.headers["userId"] = user.id;
       config.headers["workId"] = user.workId;
       config.headers["workId"] = user.workId;
+      config.headers["Authorization"] = user.token;
     }
     }
 
 
     // 设置延迟时效
     // 设置延迟时效

+ 39 - 8
src/modules/grading/GradingOperation.vue

@@ -183,7 +183,7 @@
 <script>
 <script>
 import {
 import {
   markerTaskList,
   markerTaskList,
-  markerLevelStatData,
+  markerLevelTotalStatData,
   workLevelList,
   workLevelList,
   paperSelectLevelOrScore,
   paperSelectLevelOrScore,
   paperSelectLevelBatch,
   paperSelectLevelBatch,
@@ -316,7 +316,7 @@ export default {
       this.selectPaper(this.curPaperIndex);
       this.selectPaper(this.curPaperIndex);
     },
     },
     async getStepLevels() {
     async getStepLevels() {
-      const data = await markerLevelStatData(
+      const data = await markerLevelTotalStatData(
         this.filter.markerId,
         this.filter.markerId,
         this.filter.questionId
         this.filter.questionId
       );
       );
@@ -362,6 +362,31 @@ export default {
         this.curStep = curStep;
         this.curStep = curStep;
       }
       }
     },
     },
+    updateStepLevel(curStep, curLevel, count) {
+      if (curStep.type === "done") {
+        const lpos = this.steps.levelStep.findIndex(
+          item => item.name === curStep.name
+        );
+        this.steps.levelStep[lpos].count -= count;
+      } else {
+        const opos = this.steps.otherStep.findIndex(
+          item => item.type === curStep.type
+        );
+        this.steps.otherStep[opos].count -= count;
+      }
+
+      const pos = this.steps.levelStep.findIndex(
+        item => item.name === curLevel
+      );
+      this.steps.levelStep[pos].count += count;
+
+      this.steps.levelStep.forEach(item => {
+        item.percent =
+          item.finalKdTotal && item.count
+            ? ((100 * item.count) / item.finalKdTotal).toFixed(3)
+            : 0;
+      });
+    },
     async getWorkLevels() {
     async getWorkLevels() {
       const data = await workLevelList(this.workId);
       const data = await workLevelList(this.workId);
       this.levels = data.map(item => {
       this.levels = data.map(item => {
@@ -383,6 +408,7 @@ export default {
       this.current = 1;
       this.current = 1;
       this.isFullscreenMarking = false;
       this.isFullscreenMarking = false;
       await this.getList();
       await this.getList();
+      this.getStepLevels();
       if (this.papers.length) {
       if (this.papers.length) {
         this.selectPaper(0);
         this.selectPaper(0);
       } else {
       } else {
@@ -394,6 +420,7 @@ export default {
       this.filter.questionId = curArea.id;
       this.filter.questionId = curArea.id;
       await this.getStepLevels();
       await this.getStepLevels();
       this.toPage(1);
       this.toPage(1);
+      this.updateHistory();
     },
     },
     // selectMultiplePaper
     // selectMultiplePaper
     selectMultiplePaper(paper) {
     selectMultiplePaper(paper) {
@@ -408,7 +435,7 @@ export default {
       const multipleGradingListCount = this.multipleGradingList.length;
       const multipleGradingListCount = this.multipleGradingList.length;
 
 
       let result = true;
       let result = true;
-      await paperSelectLevelBatch(
+      const papers = await paperSelectLevelBatch(
         this.multipleGradingList.map(item => item.id).join(), // is taskId
         this.multipleGradingList.map(item => item.id).join(), // is taskId
         level.name,
         level.name,
         "LEVEL"
         "LEVEL"
@@ -420,8 +447,9 @@ export default {
       if (!result) return;
       if (!result) return;
 
 
       this.multipleGradingList = [];
       this.multipleGradingList = [];
-      this.getStepLevels();
-      this.updateHistory();
+      // this.getStepLevels();
+      this.updateStepLevel(this.curStep, level.name, multipleGradingListCount);
+      this.updateHistory(papers);
 
 
       // update paper list
       // update paper list
       if (
       if (
@@ -497,13 +525,13 @@ export default {
       this.selectPaper(this.curPaperIndex);
       this.selectPaper(this.curPaperIndex);
     },
     },
     async gradeCurPaper(level) {
     async gradeCurPaper(level) {
-      await paperSelectLevelOrScore(
+      const paper = await paperSelectLevelOrScore(
         this.curPaper.id, // is taskId
         this.curPaper.id, // is taskId
         level.name,
         level.name,
         "LEVEL"
         "LEVEL"
       );
       );
-      this.getStepLevels();
-      this.updateHistory();
+      this.updateStepLevel(this.curStep, level.name, 1);
+      this.updateCacheHistory([paper]);
       this.toActionNextPaper();
       this.toActionNextPaper();
     },
     },
     async passCurPaper() {
     async passCurPaper() {
@@ -513,6 +541,9 @@ export default {
     updateHistory() {
     updateHistory() {
       this.$refs.GradeHistoryPaper.updatePapers();
       this.$refs.GradeHistoryPaper.updatePapers();
     },
     },
+    updateCacheHistory(papers) {
+      this.$refs.GradeHistoryPaper.updateCachePapers(papers);
+    },
     // paper carousel
     // paper carousel
     toViewCarouselPaper(paperIndex, papers, type) {
     toViewCarouselPaper(paperIndex, papers, type) {
       this.carouselType = type;
       this.carouselType = type;

+ 6 - 2
src/modules/grading/GradingProgress.vue

@@ -277,12 +277,16 @@ export default {
     },
     },
     toExportStandard() {
     toExportStandard() {
       window.open(
       window.open(
-        `${this.GLOBAL.domain}/api/export/paper/${this.curSubject.workId}/${this.curSubject.subject}/sample`
+        this.urlAddAuthor(
+          `${this.GLOBAL.domain}/api/export/paper/${this.curSubject.workId}/${this.curSubject.subject}/sample`
+        )
       );
       );
     },
     },
     toExportGrading() {
     toExportGrading() {
       window.open(
       window.open(
-        `${this.GLOBAL.domain}/api/export/paper/${this.curSubject.workId}/${this.curSubject.subject}/oneClick`
+        this.urlAddAuthor(
+          `${this.GLOBAL.domain}/api/export/paper/${this.curSubject.workId}/${this.curSubject.subject}/oneClick`
+        )
       );
       );
     }
     }
   }
   }

+ 3 - 1
src/modules/grading/GradingUserManage.vue

@@ -199,7 +199,9 @@ export default {
     },
     },
     toExport() {
     toExport() {
       window.open(
       window.open(
-        `${this.GLOBAL.domain}/api/export/users?workId=${this.workId}&subject=${this.subject}`
+        this.urlAddAuthor(
+          `${this.GLOBAL.domain}/api/export/users?workId=${this.workId}&subject=${this.subject}`
+        )
       );
       );
     }
     }
   }
   }

+ 54 - 8
src/modules/grading/components/GradeHistoryPaper.vue

@@ -13,9 +13,17 @@
 </template>
 </template>
 
 
 <script>
 <script>
-import { actionHistory } from "@/api";
+import { actionHistory, actionLeaderHistory } from "@/api";
 import PaperCarousel from "@/components/PaperCarousel";
 import PaperCarousel from "@/components/PaperCarousel";
 
 
+// 后台规则:
+// - 按操作时间倒叙排雷
+// - 管理员没有历史
+// - 科组长所有操作都不记录历史。(修改:科组长需要记录一键定档操作)
+// - 评卷员确认改档不记录历史,待评、回评、改档打分记录历史
+// 前端规则:
+// - 按操作时间新增记录。
+// - 已保存记录中存在相同试卷的,则将当前记录调到最前。
 export default {
 export default {
   name: "grade-history-paper",
   name: "grade-history-paper",
   components: { PaperCarousel },
   components: { PaperCarousel },
@@ -30,13 +38,18 @@ export default {
   },
   },
   data() {
   data() {
     return {
     return {
+      workId: "",
+      subject: "",
+      subjectId: this.$route.params.subjectId,
       userId: "",
       userId: "",
       curPaper: {},
       curPaper: {},
-      papers: []
+      papers: [],
+      IS_MARK_LEADER: false
     };
     };
   },
   },
   computed: {
   computed: {
     title() {
     title() {
+      if (this.IS_MARK_LEADER) return `一键定档  ${this.curPaper.level}`;
       return this.curPaper.result ? `已评  ${this.curPaper.result}` : "";
       return this.curPaper.result ? `已评  ${this.curPaper.result}` : "";
       // return this.curPaper.sn ? `NO.${this.curPaper.sn}` : "";
       // return this.curPaper.sn ? `NO.${this.curPaper.sn}` : "";
     }
     }
@@ -49,23 +62,56 @@ export default {
   },
   },
   mounted() {
   mounted() {
     this.userId = this.$ls.get("user", { id: "" }).id;
     this.userId = this.$ls.get("user", { id: "" }).id;
+    const curUserRoleType = this.$ls.get("user", { role: "" }).role;
+    this.IS_MARK_LEADER = curUserRoleType === "MARK_LEADER";
+    const subjectId = this.subjectId.split("-");
+    this.workId = subjectId[0];
+    this.subject = subjectId[1];
     this.updatePapers();
     this.updatePapers();
   },
   },
   methods: {
   methods: {
     async updatePapers() {
     async updatePapers() {
-      const datas = {
-        markerId: this.userId,
-        stage: this.stage,
-        questionId: this.questionId
-      };
+      let data = [];
+      if (this.IS_MARK_LEADER) {
+        const datas = {
+          workId: this.workId,
+          subject: this.subject,
+          questionId: this.questionId
+        };
+
+        data = await actionLeaderHistory(datas);
+      } else {
+        const datas = {
+          markerId: this.userId,
+          stage: this.stage,
+          questionId: this.questionId
+        };
+
+        data = await actionHistory(datas);
+      }
 
 
-      const data = await actionHistory(datas);
       this.papers = data.reverse();
       this.papers = data.reverse();
       this.$nextTick(() => {
       this.$nextTick(() => {
         const index = this.papers.length ? this.papers.length - 1 : 0;
         const index = this.papers.length ? this.papers.length - 1 : 0;
         this.$refs.PaperCarousel.setCurPaper(index);
         this.$refs.PaperCarousel.setCurPaper(index);
       });
       });
     },
     },
+    updateCachePapers(papers) {
+      papers.forEach(paper => {
+        const paperIndex = this.papers.findIndex(
+          item => item.paperId === paper.paperId
+        );
+        if (paperIndex !== -1) {
+          this.papers.splice(paperIndex, 1);
+        }
+      });
+      this.papers = [...this.papers, ...papers].slice(-5);
+
+      this.$nextTick(() => {
+        const index = this.papers.length ? this.papers.length - 1 : 0;
+        this.$refs.PaperCarousel.setCurPaper(index);
+      });
+    },
     setCurPaper(paper) {
     setCurPaper(paper) {
       this.curPaper = paper;
       this.curPaper = paper;
     },
     },

+ 5 - 0
src/modules/grading/components/ModifyUnformalGradingTask.vue

@@ -12,6 +12,7 @@
         :btn-content="uploadBtnName"
         :btn-content="uploadBtnName"
         :upload-url="uploadUrl"
         :upload-url="uploadUrl"
         :upload-data="uploadData"
         :upload-data="uploadData"
+        :headers="headers"
         :format="['xls', 'xlsx']"
         :format="['xls', 'xlsx']"
         :auto-upload="false"
         :auto-upload="false"
         @upload-success="uploadSuccess"
         @upload-success="uploadSuccess"
@@ -74,6 +75,10 @@ export default {
       modalIsShow: false,
       modalIsShow: false,
       isSubmit: false,
       isSubmit: false,
       uploadData: {},
       uploadData: {},
+      headers: {
+        workId: this.$route.params.workId,
+        userId: this.$ls.get("user", { id: "" }).id
+      },
       uploadBtnName: "导入考生数据",
       uploadBtnName: "导入考生数据",
       uploadUrl: this.GLOBAL.domain + "/api/import/students/batchAllForTrial",
       uploadUrl: this.GLOBAL.domain + "/api/import/students/batchAllForTrial",
       uploadFileIsSuccess: false,
       uploadFileIsSuccess: false,

+ 3 - 1
src/modules/inspection/InspectionActionLogs.vue

@@ -240,7 +240,9 @@ export default {
         return;
         return;
       }
       }
       window.open(
       window.open(
-        `${this.GLOBAL.domain}/api/export/log/oper?${qsParams(this.filter)}`
+        this.urlAddAuthor(
+          `${this.GLOBAL.domain}/api/export/log/oper?${qsParams(this.filter)}`
+        )
       );
       );
     }
     }
   }
   }

+ 5 - 1
src/modules/inspection/InspectionCollectLogs.vue

@@ -225,7 +225,11 @@ export default {
         return;
         return;
       }
       }
       window.open(
       window.open(
-        `${this.GLOBAL.domain}/api/export/log/collect?${qsParams(this.filter)}`
+        this.urlAddAuthor(
+          `${this.GLOBAL.domain}/api/export/log/collect?${qsParams(
+            this.filter
+          )}`
+        )
       );
       );
     }
     }
   }
   }

+ 1 - 1
src/modules/main/ExamPaperView.vue

@@ -49,7 +49,7 @@ export default {
       });
       });
     },
     },
     downloadPaper(subject) {
     downloadPaper(subject) {
-      if (subject.url) window.open(subject.url);
+      if (subject.url) window.open(this.urlAddAuthor(subject.url));
     }
     }
   }
   }
 };
 };

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

@@ -201,7 +201,8 @@ import {
   subjectList,
   subjectList,
   studentPageList,
   studentPageList,
   deleteStudent,
   deleteStudent,
-  areaSchoolRoomCascadeList
+  areaSchoolRoomCascadeList,
+  absentStudentSubject
 } from "@/api";
 } from "@/api";
 import ImportFile from "@/components/common/ImportFile";
 import ImportFile from "@/components/common/ImportFile";
 import ModifyStudent from "./components/ModifyStudent";
 import ModifyStudent from "./components/ModifyStudent";
@@ -315,7 +316,9 @@ export default {
       ],
       ],
       // upload
       // upload
       headers: {
       headers: {
-        Authorization: "token"
+        Authorization: this.$ls.get("user", { token: "" }).token,
+        workId: this.$route.params.workId,
+        userId: this.$ls.get("user", { id: "" }).id
       },
       },
       uploadData: {
       uploadData: {
         workId: this.$route.params.workId
         workId: this.$route.params.workId
@@ -361,8 +364,16 @@ export default {
         student.canDelete = !student.uploadStatus.includes("1");
         student.canDelete = !student.uploadStatus.includes("1");
         student.uploadStatus.split(",").map(status => {
         student.uploadStatus.split(",").map(status => {
           const [subject, hasScan] = status.split(":");
           const [subject, hasScan] = status.split(":");
-          student[subject] = hasScan;
+          student[subject] = {
+            hasScan: hasScan * 1,
+            manual: student[`${subject.toLowerCase()}Missing`]
+          };
         });
         });
+        // student.manualStatus = "SC:1,SM:0,SX:1";
+        // student.manualStatus.split(",").map(status => {
+        //   const [subject, manual] = status.split(":");
+        //   student[subject].manual = manual * 1;
+        // });
         student.workId = this.filter.workId;
         student.workId = this.filter.workId;
         student.relateExamNumber =
         student.relateExamNumber =
           student.relateExamNumber === student.examNumber
           student.relateExamNumber === student.examNumber
@@ -386,7 +397,45 @@ export default {
         const column = {
         const column = {
           title: item.name,
           title: item.name,
           key: item.subject,
           key: item.subject,
-          minWidth: 80
+          minWidth: 140,
+          render: (h, param) => {
+            const hasScan = param.row[item.subject].hasScan;
+            const isManual = param.row[item.subject].manual;
+            const btnCls = `ivu-btn ivu-btn-text ivu-btn-small ${
+              isManual ? "color-error-hover" : "color-text-hover"
+            }`;
+
+            return h("div", [
+              h(
+                "span",
+                {
+                  attrs: {
+                    class: hasScan ? "" : "color-error",
+                    style: "display:inline-block;vertical-align: middle;"
+                  }
+                },
+                hasScan ? "已上传" : "未上传"
+              ),
+              h(
+                "Button",
+                {
+                  props: {
+                    type: "text",
+                    size: "small"
+                  },
+                  attrs: {
+                    class: btnCls
+                  },
+                  on: {
+                    click: () => {
+                      this.toManual(param.row, item.subject);
+                    }
+                  }
+                },
+                "缺考"
+              )
+            ]);
+          }
         };
         };
         this.columns.splice(this.columns.length - 1, 0, column);
         this.columns.splice(this.columns.length - 1, 0, column);
       });
       });
@@ -395,6 +444,15 @@ export default {
         name: "全部"
         name: "全部"
       });
       });
     },
     },
+    async toManual(row, subject) {
+      console.log(row);
+      await absentStudentSubject({
+        studentId: row.id,
+        subject,
+        isManual: !row[subject].manual
+      });
+      row[subject].manual = !row[subject].manual;
+    },
     areaChange() {
     areaChange() {
       const curArea = this.cascadeList.find(
       const curArea = this.cascadeList.find(
         item => item.areaCode === this.filter.areaCode
         item => item.areaCode === this.filter.areaCode
@@ -445,7 +503,9 @@ export default {
       const sqDatas = qs.stringify(this.filter, {
       const sqDatas = qs.stringify(this.filter, {
         arrayFormat: "brackets"
         arrayFormat: "brackets"
       });
       });
-      window.open(`${this.GLOBAL.domain}/api/export/student?${sqDatas}`);
+      window.open(
+        this.urlAddAuthor(`${this.GLOBAL.domain}/api/export/student?${sqDatas}`)
+      );
     }
     }
   }
   }
 };
 };

+ 7 - 5
src/modules/main/WorkOverview.vue

@@ -116,13 +116,15 @@ export default {
       },
       },
       // upload
       // upload
       headers: {
       headers: {
-        Authorization: "token"
+        Authorization: this.$ls.get("user", { token: "" }).token,
+        workId: this.$route.params.workId,
+        userId: this.$ls.get("user", { id: "" }).id
       },
       },
       uploadData: {
       uploadData: {
         workId: this.$route.params.workId,
         workId: this.$route.params.workId,
-        subjectId: ""
+        subject: ""
       },
       },
-      uploadUrl: "/api/import/students",
+      uploadUrl: "/api/import/students/missingStudent",
       downloadManualTemplateUrl: "/templates/考生缺考表-模板.xlsx",
       downloadManualTemplateUrl: "/templates/考生缺考表-模板.xlsx",
       downloadManualTemplateFilename: "考生缺考表-模板.xlsx"
       downloadManualTemplateFilename: "考生缺考表-模板.xlsx"
     };
     };
@@ -149,10 +151,10 @@ export default {
       this.overviewInfo = data;
       this.overviewInfo = data;
     },
     },
     download(url) {
     download(url) {
-      window.open(url);
+      window.open(this.urlAddAuthor(url));
     },
     },
     toUploadManual(subject) {
     toUploadManual(subject) {
-      this.uploadData.subjectId = subject.subjectId;
+      this.uploadData.subject = subject.subject;
       this.$refs.ImportManual.open();
       this.$refs.ImportManual.open();
     },
     },
     uploadSuccess() {
     uploadSuccess() {

+ 33 - 8
src/modules/mark/MarkDetail.vue

@@ -121,6 +121,7 @@
 import {
 import {
   paperList,
   paperList,
   changeLevelPaperList,
   changeLevelPaperList,
+  paperManualScoreList,
   scoreStatData,
   scoreStatData,
   workLevelList,
   workLevelList,
   taskSnSearch,
   taskSnSearch,
@@ -250,6 +251,14 @@ export default {
           size: this.size
           size: this.size
         };
         };
         data = await changeLevelPaperList(datas);
         data = await changeLevelPaperList(datas);
+      } else if (this.curStep.type === "manualScore") {
+        const datas = {
+          workId: this.workId,
+          questionId: this.filter.questionId,
+          page: this.current - 1,
+          size: this.size
+        };
+        data = await paperManualScoreList(datas);
       } else {
       } else {
         const datas = {
         const datas = {
           ...this.filter,
           ...this.filter,
@@ -295,13 +304,26 @@ export default {
         count: undo.shift,
         count: undo.shift,
         type: "shift"
         type: "shift"
       });
       });
-      let levelStep = data.map(item => {
-        return {
-          ...item,
-          name: item.id,
-          type: "done"
-        };
-      });
+      let levelStep = data
+        .filter(item => item.id !== "manualScore")
+        .map(item => {
+          return {
+            ...item,
+            name: item.id,
+            type: "done"
+          };
+        });
+      if (this.IS_MARK_LEADER) {
+        const msInfo = data.find(item => item.id === "manualScore");
+        if (msInfo) {
+          levelStep.push({
+            count: msInfo.count,
+            name: "输分试卷",
+            type: "manualScore"
+          });
+        }
+      }
+
       this.steps = { levelStep, otherStep };
       this.steps = { levelStep, otherStep };
       if (!this.curStep.type) {
       if (!this.curStep.type) {
         this.curStep = levelStep[0];
         this.curStep = levelStep[0];
@@ -317,6 +339,7 @@ export default {
       });
       });
     },
     },
     async stepChange(step) {
     async stepChange(step) {
+      console.log(step);
       this.applyChangeLevelStatus = 1;
       this.applyChangeLevelStatus = 1;
       this.curStep = step;
       this.curStep = step;
       this.current = 1;
       this.current = 1;
@@ -340,7 +363,9 @@ export default {
     },
     },
     toExport() {
     toExport() {
       window.open(
       window.open(
-        `${this.GLOBAL.domain}/api/export/paper/${this.workId}/${this.subject}/changeLevel`
+        this.urlAddAuthor(
+          `${this.GLOBAL.domain}/api/export/paper/${this.workId}/${this.subject}/changeLevel`
+        )
       );
       );
     },
     },
     selectPaper(index) {
     selectPaper(index) {

+ 61 - 17
src/modules/mark/MarkOperation.vue

@@ -136,10 +136,11 @@ import {
   getParamsSet,
   getParamsSet,
   markerTaskList,
   markerTaskList,
   markerChangeLevelPaperList,
   markerChangeLevelPaperList,
-  markerScoreStatData,
+  markerScoreTotalStatData,
   workLevelList,
   workLevelList,
   subjectDetail,
   subjectDetail,
   paperSelectLevelOrScore,
   paperSelectLevelOrScore,
+  markerManualScorePaperList,
   paperTaskPass
   paperTaskPass
 } from "@/api";
 } from "@/api";
 import SimpleImagePreview from "@/components/SimpleImagePreview";
 import SimpleImagePreview from "@/components/SimpleImagePreview";
@@ -187,7 +188,8 @@ export default {
         shiftScore: {
         shiftScore: {
           isShift: false,
           isShift: false,
           isShiftScore: true
           isShiftScore: true
-        }
+        },
+        manualScore: {}
       },
       },
       workId: this.$route.params.workId,
       workId: this.$route.params.workId,
       subjectId: this.$route.params.subjectId,
       subjectId: this.$route.params.subjectId,
@@ -258,9 +260,15 @@ export default {
       if (this.curStep.type === "done") {
       if (this.curStep.type === "done") {
         datas.level = this.curStep.name;
         datas.level = this.curStep.name;
       }
       }
-      const requestAction = this.curStep.type.includes("shift")
-        ? markerChangeLevelPaperList
-        : markerTaskList;
+
+      let requestAction = null;
+      if (this.curStep.type.includes("shift")) {
+        requestAction = markerChangeLevelPaperList;
+      } else if (this.curStep.type === "manualScore") {
+        requestAction = markerManualScorePaperList;
+      } else {
+        requestAction = markerTaskList;
+      }
 
 
       const data = await requestAction(datas);
       const data = await requestAction(datas);
       this.papers = data.data.map(paper => {
       this.papers = data.data.map(paper => {
@@ -276,7 +284,7 @@ export default {
       this.selectPaper(this.curPaperIndex);
       this.selectPaper(this.curPaperIndex);
     },
     },
     async getStepLevels() {
     async getStepLevels() {
-      const data = await markerScoreStatData(
+      const data = await markerScoreTotalStatData(
         this.filter.markerId,
         this.filter.markerId,
         this.filter.questionId
         this.filter.questionId
       );
       );
@@ -309,13 +317,25 @@ export default {
           type: "shiftScore"
           type: "shiftScore"
         });
         });
       }
       }
-      let levelStep = data.map(item => {
-        return {
-          ...item,
-          name: item.id,
-          type: "done"
-        };
-      });
+
+      let levelStep = data
+        .filter(item => item.id !== "manualScore")
+        .map(item => {
+          return {
+            ...item,
+            name: item.id,
+            type: "done"
+          };
+        });
+      const msInfo = data.find(item => item.id === "manualScore");
+      if (msInfo) {
+        levelStep.push({
+          count: msInfo.count,
+          name: "输分试卷",
+          type: "manualScore"
+        });
+      }
+
       this.steps = { levelStep, otherStep };
       this.steps = { levelStep, otherStep };
 
 
       if (!this.curStep) {
       if (!this.curStep) {
@@ -328,6 +348,26 @@ export default {
         this.curStep = curStep;
         this.curStep = curStep;
       }
       }
     },
     },
+    updateStepLevel(curStep, curLevel, count = 1) {
+      if (curStep.type === "done") return;
+
+      const opos = this.steps.otherStep.findIndex(
+        item => item.type === curStep.type
+      );
+      this.steps.otherStep[opos].count -= count;
+
+      if (curStep.type === "shift") {
+        const spos = this.steps.otherStep.findIndex(
+          item => item.type === "shiftScore"
+        );
+        this.steps.otherStep[spos].count += count;
+      } else {
+        const pos = this.steps.levelStep.findIndex(
+          item => item.name === curLevel
+        );
+        this.steps.levelStep[pos].count += count;
+      }
+    },
     async getWorkLevels() {
     async getWorkLevels() {
       const data = await workLevelList(this.workId);
       const data = await workLevelList(this.workId);
       this.levels = data.map(item => {
       this.levels = data.map(item => {
@@ -346,6 +386,7 @@ export default {
       this.curStep = step;
       this.curStep = step;
       this.current = 1;
       this.current = 1;
       await this.getList();
       await this.getList();
+      this.getStepLevels();
       if (this.papers.length) {
       if (this.papers.length) {
         this.selectPaper(0);
         this.selectPaper(0);
       } else {
       } else {
@@ -357,6 +398,7 @@ export default {
       this.filter.questionId = curArea.id;
       this.filter.questionId = curArea.id;
       await this.getStepLevels();
       await this.getStepLevels();
       this.toPage(1);
       this.toPage(1);
+      this.updateHistory();
     },
     },
     toReview(index) {
     toReview(index) {
       this.isFullscreenMarking = true;
       this.isFullscreenMarking = true;
@@ -435,19 +477,18 @@ export default {
         selectedLevel,
         selectedLevel,
         "LEVEL"
         "LEVEL"
       );
       );
-      this.getStepLevels();
-      this.updateHistory();
+      this.updateStepLevel(this.curStep, "shiftScore");
       this.toActionNextPaper();
       this.toActionNextPaper();
     },
     },
     async scoreCurPaper(info) {
     async scoreCurPaper(info) {
-      await paperSelectLevelOrScore(
+      const paper = await paperSelectLevelOrScore(
         this.curPaper.id, // is taskId
         this.curPaper.id, // is taskId
         info.score,
         info.score,
         "SCORE",
         "SCORE",
         info.manualScore
         info.manualScore
       );
       );
       this.getStepLevels();
       this.getStepLevels();
-      this.updateHistory();
+      this.updateCacheHistory([paper]);
       this.toActionNextPaper();
       this.toActionNextPaper();
     },
     },
     async passCurPaper(level) {
     async passCurPaper(level) {
@@ -457,6 +498,9 @@ export default {
     updateHistory() {
     updateHistory() {
       this.$refs.GradeHistoryPaper.updatePapers();
       this.$refs.GradeHistoryPaper.updatePapers();
     },
     },
+    updateCacheHistory(papers) {
+      this.$refs.GradeHistoryPaper.updateCachePapers(papers);
+    },
     // paper carousel
     // paper carousel
     toViewCarouselPaper(paperIndex, papers) {
     toViewCarouselPaper(paperIndex, papers) {
       this.isFullscreenMarking = true;
       this.isFullscreenMarking = true;

+ 48 - 47
src/modules/mark/components/MarkAction.vue

@@ -1,52 +1,5 @@
 <template>
 <template>
   <div class="mark-action grade-action">
   <div class="mark-action grade-action">
-    <!-- 查询 -->
-    <div class="action-search" v-if="rights.search">
-      <Select
-        class="search-select"
-        v-model="filter.codeType"
-        placeholder="密号类型"
-      >
-        <Option
-          v-for="item in codeTypes"
-          :key="item.key"
-          :value="item.key"
-          :label="item.val"
-        ></Option>
-      </Select>
-      <Input
-        class="search-input"
-        v-model.trim="filter.code"
-        placeholder="输入密号"
-        clearable
-      >
-      </Input>
-      <Button size="small" type="primary" class="search-btn" @click="searchCode"
-        >查询</Button
-      >
-    </div>
-    <!-- 改档处理状态查询 -->
-    <div class="action-grade-change-search" v-if="rights.gradeChangeSearch">
-      <Select
-        v-model="applyChangeLevelStatus"
-        placeholder="类型"
-        style="width: 100px"
-      >
-        <Option
-          v-for="(val, key) in CHANGE_LEVEL_STATUS"
-          :key="key"
-          :value="key * 1"
-          :label="val"
-        ></Option>
-      </Select>
-      <Button
-        size="small"
-        type="primary"
-        class="search-btn"
-        @click="searchGradeChange"
-        >查询</Button
-      >
-    </div>
     <!-- 头部信息 ------ -->
     <!-- 头部信息 ------ -->
     <!-- 试卷状态 -->
     <!-- 试卷状态 -->
     <!-- 状态:已评,待评,改档,改档打分 -->
     <!-- 状态:已评,待评,改档,改档打分 -->
@@ -198,6 +151,54 @@
         </div>
         </div>
       </div>
       </div>
     </div>
     </div>
+
+    <!-- 查询 -->
+    <div class="action-search" v-if="rights.search">
+      <Select
+        class="search-select"
+        v-model="filter.codeType"
+        placeholder="密号类型"
+      >
+        <Option
+          v-for="item in codeTypes"
+          :key="item.key"
+          :value="item.key"
+          :label="item.val"
+        ></Option>
+      </Select>
+      <Input
+        class="search-input"
+        v-model.trim="filter.code"
+        placeholder="输入密号"
+        clearable
+      >
+      </Input>
+      <Button size="small" type="primary" class="search-btn" @click="searchCode"
+        >查询</Button
+      >
+    </div>
+    <!-- 改档处理状态查询 -->
+    <div class="action-search" v-if="rights.gradeChangeSearch">
+      <Select
+        class="search-input"
+        v-model="applyChangeLevelStatus"
+        placeholder="类型"
+      >
+        <Option
+          v-for="(val, key) in CHANGE_LEVEL_STATUS"
+          :key="key"
+          :value="key * 1"
+          :label="val"
+        ></Option>
+      </Select>
+      <Button
+        size="small"
+        type="primary"
+        class="search-btn"
+        @click="searchGradeChange"
+        >查询</Button
+      >
+    </div>
   </div>
   </div>
 </template>
 </template>
 
 

+ 3 - 4
src/plugins/axios.js

@@ -14,14 +14,13 @@ let unauthMsgBoxIsShow = false;
 const errorCallback = error => {
 const errorCallback = error => {
   let content = "";
   let content = "";
   if (error.response) {
   if (error.response) {
-    content =
-      (error.response.data && error.response.data.message) || "服务错误";
-
+    content = error.response.data && error.response.data.message;
     if (error.response.status === 401) {
     if (error.response.status === 401) {
       if (unauthMsgBoxIsShow) return error;
       if (unauthMsgBoxIsShow) return error;
       unauthMsgBoxIsShow = true;
       unauthMsgBoxIsShow = true;
+      content = content || "身份验证失效,请重新登录!";
       ViewUI.Modal.error({
       ViewUI.Modal.error({
-        content: "身份验证失效,请重新登录!",
+        content,
         onOk: () => {
         onOk: () => {
           unauthMsgBoxIsShow = false;
           unauthMsgBoxIsShow = false;
           Vue.ls.clear();
           Vue.ls.clear();

+ 7 - 0
src/plugins/mixins.js

@@ -6,6 +6,13 @@ export default {
         page = page > 1 ? page - 1 : 1;
         page = page > 1 ? page - 1 : 1;
       }
       }
       this.toPage && this.toPage(page);
       this.toPage && this.toPage(page);
+    },
+    urlAddAuthor(url) {
+      const user = this.$ls.get("user", {});
+      const authorQuery = `Authorization=${user.token}&userId=${user.id}`;
+      return url.indexOf("?") !== -1
+        ? `${url}&${authorQuery}`
+        : `${url}?${authorQuery}`;
     }
     }
   }
   }
 };
 };