zhangjie 5 tahun lalu
induk
melakukan
83b2cdb924
34 mengubah file dengan 1152 tambahan dan 738 penghapusan
  1. 20 12
      src/api.js
  2. TEMPAT SAMPAH
      src/assets/images/icon-change-act.png
  3. TEMPAT SAMPAH
      src/assets/images/icon-change.png
  4. TEMPAT SAMPAH
      src/assets/images/icon-logs-act.png
  5. TEMPAT SAMPAH
      src/assets/images/icon-logs.png
  6. 7 0
      src/assets/styles/base.less
  7. 2 0
      src/assets/styles/home.less
  8. 12 0
      src/assets/styles/icons.less
  9. 1 1
      src/assets/styles/iview.less
  10. 97 19
      src/assets/styles/main.less
  11. 112 23
      src/assets/styles/mark.less
  12. 9 5
      src/constants/authority.js
  13. 17 82
      src/modules/grading-set/UploadPaper.vue
  14. 36 10
      src/modules/grading/Grading.vue
  15. 14 5
      src/modules/grading/GradingDetail.vue
  16. 19 6
      src/modules/grading/GradingOperation.vue
  17. 16 9
      src/modules/grading/GradingProgress.vue
  18. 10 6
      src/modules/grading/components/GradeAction.vue
  19. 3 1
      src/modules/grading/components/GradeHistoryPaper.vue
  20. 15 8
      src/modules/grading/components/ModifyLeaderGrading.vue
  21. 21 16
      src/modules/inspection/Inspection.vue
  22. 42 40
      src/modules/inspection/InspectionActionLogs.vue
  23. 44 41
      src/modules/inspection/InspectionCollectLogs.vue
  24. 122 93
      src/modules/inspection/InspectionGrading.vue
  25. 29 27
      src/modules/main/ExamPaperView.vue
  26. 1 1
      src/modules/main/StudentManage.vue
  27. 0 1
      src/modules/main/components/ImageActionList.vue
  28. 74 47
      src/modules/mark/MarkDetail.vue
  29. 47 12
      src/modules/mark/MarkHome.vue
  30. 88 55
      src/modules/mark/MarkOperation.vue
  31. 99 73
      src/modules/mark/MarkTaskManage.vue
  32. 78 47
      src/modules/mark/components/MarkAction.vue
  33. 116 97
      src/modules/quality/Quality.vue
  34. 1 1
      src/routers/mark.js

+ 20 - 12
src/api.js

@@ -127,11 +127,6 @@ export const updateLevelParams = datas => {
 };
 // update-paper
 // grading-rule-set
-export const updatePaperDetail = () => {
-  // TODO:获取试卷上传状态
-  return Promise.resolve({});
-  // return $get(`/api/admin/works/${workId}`, {});
-};
 
 // mark-set -------------------------->
 // mark-rule-set
@@ -157,6 +152,10 @@ export const callbackReport = datas => {
 export const studentScoreList = datas => {
   return $get(`/api/papers/studentScore`, datas);
 };
+// exam-paper-view
+export const uploadPaperList = workId => {
+  return $get(`/api/papers/${workId}/listUploadPaper`);
+};
 
 // grading -------------------------->
 // grading-user-manage
@@ -213,17 +212,26 @@ export const finishTryGradingTask = datas => {
 export const checkMissionStatus = ({ workId, subject }) => {
   return $get("/api/trial/checkMissionStatus", { workId, subject });
 };
-// 分档任务和打分任务发布时都使用这个接口
-export const createGradingTask = ({
-  subjectId,
-  taskCount,
-  questionId,
-  taskList
-}) => {
+// 分档任务发布
+export const createGradingTask = ({ subjectId, taskCount, questionId }) => {
   return $patch(
     `/api/marksubjects/${subjectId}`,
     {
       taskCount,
+      questionId
+    },
+    "json"
+  );
+};
+// 进入打分阶段,和上面掉的同一个接口,分开是为了便于区分
+export const gotoScoreStep = subjectId => {
+  return $patch(`/api/marksubjects/${subjectId}`, {}, "json");
+};
+// 打分任务发布
+export const publishScoreTask = ({ subjectId, questionId, taskList }) => {
+  return $post(
+    `/api/marksubjects/${subjectId}/publishScore`,
+    {
       questionId,
       taskList
     },

TEMPAT SAMPAH
src/assets/images/icon-change-act.png


TEMPAT SAMPAH
src/assets/images/icon-change.png


TEMPAT SAMPAH
src/assets/images/icon-logs-act.png


TEMPAT SAMPAH
src/assets/images/icon-logs.png


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

@@ -218,6 +218,13 @@ body {
       font-weight: 600;
     }
   }
+  &.table-width {
+    td,
+    th {
+      padding-left: 18px;
+      padding-right: 18px;
+    }
+  }
 }
 .table .td-th {
   font-weight: 600;

+ 2 - 0
src/assets/styles/home.less

@@ -74,6 +74,8 @@
   }
   .head-nav {
     margin: 0 150px 0 190px;
+    padding: 15px;
+    line-height: 34px;
   }
   .head-user {
     float: right;

+ 12 - 0
src/assets/styles/icons.less

@@ -99,6 +99,18 @@
     &-view-act {
       background-image: url(../images/icon-view-act.png);
     }
+    &-logs {
+      background-image: url(../images/icon-logs.png);
+    }
+    &-logs-act {
+      background-image: url(../images/icon-logs-act.png);
+    }
+    &-change {
+      background-image: url(../images/icon-change.png);
+    }
+    &-change-act {
+      background-image: url(../images/icon-change-act.png);
+    }
 
     &-arrow-left {
       background-image: url(../images/icon-arrow-left.png);

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

@@ -26,7 +26,7 @@
 
 @btn-font-size: 14px;
 
-@btn-disable-bg: #fff;
+@btn-disable-bg: #f9f9f9;
 @btn-disable-color: #bdc2d1;
 
 // input

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

@@ -182,7 +182,6 @@
   padding: 10px;
   width: 310px;
   text-align: center;
-  margin-bottom: 20px;
   &-act {
     img {
       box-shadow: 0px 10px 20px 0px rgba(34, 192, 255, 0.5);
@@ -453,36 +452,115 @@
 
 // inspection-grading
 .check-grade {
-  margin-right: 300px;
+  &-body {
+    padding: 20px;
+    margin-right: 300px;
+  }
+  &-list {
+    min-height: 500px;
+    .image-view-list {
+      margin: 0;
+    }
+  }
   &-action {
-    position: fixed;
-    width: 300px;
-    top: 50px;
-    right: 0;
-    bottom: 0;
-    background-color: #fff;
-    padding: 50px 15px;
-    text-align: center;
-    .paper-info {
-      margin-bottom: 100px;
+    float: right;
+    width: 280px;
+    padding: 32px;
+    min-height: 540px;
+    background-color: @white;
+    border-radius: @box-border-radius;
+    overflow-x: hidden;
+    overflow-y: auto;
+
+    &-fullscreen {
+      position: fixed;
+      width: 290px;
+      top: 64px;
+      right: 0;
+      bottom: 0;
+      border-radius: 0;
+      min-height: auto;
+      z-index: 98;
     }
+  }
+  .action-paper-info {
+    font-size: 16px;
+    line-height: 30px;
+    margin-bottom: 32px;
+    color: @dark-color-light;
+    line-height: 25px;
+    text-align: left;
 
     p {
-      font-size: 16px;
+      margin-bottom: 4px;
+    }
+
+    span:last-child {
+      color: @dark-color;
+      font-size: 18px;
+    }
+  }
+
+  .action-grade-info {
+    margin-bottom: 32px;
+    background-color: #e7eaf1;
+    color: @dark-color-light;
+    padding: 20px;
+    font-size: 20px;
+    border-radius: @box-border-radius;
+    line-height: 28px;
+
+    > p:first-child {
       margin-bottom: 10px;
+    }
+  }
+  .action-grade-result {
+    text-align: center;
+    padding: 16px;
+    line-height: 28px;
+    font-size: 20px;
+    font-weight: 600;
+    background: rgba(247, 247, 250, 1);
+    border-radius: 20px;
+    color: rgba(194, 199, 213, 1);
+    border-radius: @box-border-radius;
 
-      &:nth-of-type(3),
-      &:nth-of-type(4) {
-        font-size: 24px;
-      }
+    &-error {
+      background: rgba(255, 112, 129, 0.1);
+      color: @error-color;
     }
   }
 
   &-image-preview {
     .ivu-modal-mask,
     .ivu-modal-wrap {
-      top: 50px;
-      right: 300px;
+      left: 0;
+      bottom: 0;
+      top: 64px;
+      right: 290px;
+    }
+  }
+}
+
+// exam-paper-view
+.exam-paper-view {
+  .exam-paper-item {
+    padding: 20px;
+    overflow: hidden;
+    background-color: @white;
+    border-radius: @box-border-radius;
+    margin: 5px 0;
+  }
+  .exam-paper-area {
+    float: left;
+    font-size: 20px;
+    font-weight: 600;
+    line-height: 36px;
+  }
+  .exam-paper-subjects {
+    float: right;
+    button {
+      width: 80px;
     }
   }
 }

+ 112 - 23
src/assets/styles/mark.less

@@ -293,7 +293,6 @@
     right: 0;
     bottom: 0;
     z-index: 98;
-    background-color: @white;
     border-radius: 0;
     min-height: auto;
     overflow-y: auto;
@@ -314,6 +313,7 @@
     &-list {
       display: inline-block;
       vertical-align: top;
+      width: 100%;
       font-size: 14px;
       min-height: 500px;
       .image-view-list {
@@ -374,6 +374,8 @@
     }
   }
 }
+// mark-detail
+
 // grading-operation
 .grading-operation {
   .detail-action-fullscreen {
@@ -500,14 +502,47 @@
       font-size: 18px;
     }
   }
+  .action-grade-change {
+    margin-bottom: 32px;
+    background-color: #e7eaf1;
+    color: @dark-color-light;
+    padding: 20px;
+    font-size: 20px;
+    border-radius: @box-border-radius;
+    line-height: 28px;
+
+    > p:first-child {
+      margin-bottom: 10px;
+    }
+  }
+  .action-grade-change-status {
+    text-align: center;
+    padding: 16px;
+    line-height: 28px;
+    font-size: 20px;
+    font-weight: 600;
+    background: rgba(247, 247, 250, 1);
+    border-radius: 20px;
+    color: rgba(194, 199, 213, 1);
+    border-radius: @box-border-radius;
+
+    &-error {
+      background: rgba(255, 112, 129, 0.1);
+      color: @error-color;
+    }
+  }
 
   .action-grade-info {
-    margin-bottom: 32px;
+    margin-bottom: 20px;
     background-color: @success-color;
     color: @white;
     padding: 9px;
     border-radius: @box-border-radius;
 
+    + .action-mark-info {
+      margin-top: -10px;
+    }
+
     .grade-info-name {
       display: inline-block;
       vertical-align: middle;
@@ -518,6 +553,9 @@
       border-radius: 50%;
       color: #fff;
     }
+    .grade-info-none {
+      font-size: 40px;
+    }
     .grade-info-range {
       display: inline-block;
       vertical-align: middle;
@@ -552,7 +590,8 @@
       cursor: pointer;
 
       &:hover {
-        color: @primary-color;
+        background-color: @info-color;
+        color: @white;
       }
     }
 
@@ -609,21 +648,30 @@
     font-size: 30px;
   }
   .action-mark-list {
-    .action-grade-list-item {
-      padding: 5px;
-      width: 20%;
-      > p {
-        margin: 0 auto;
-        width: 40px;
-        height: 40px;
-        line-height: 40px;
-        border-radius: 50%;
-        background-color: #e0e0e0;
-        cursor: pointer;
-        &:hover {
-          background-color: @main-color;
-          color: #fff;
-        }
+    font-size: 0;
+    margin: -2px -2px 32px;
+  }
+  .action-mark-item {
+    display: inline-block;
+    vertical-align: top;
+    padding: 2px;
+    width: 20%;
+
+    &-content {
+      width: 40px;
+      height: 40px;
+      padding: 5px 2px;
+      font-size: 16px;
+      line-height: 30px;
+      color: @dark-color-light;
+      background: @background-color;
+      border-radius: @box-border-radius;
+      text-align: center;
+      cursor: pointer;
+
+      &:hover {
+        background-color: @info-color;
+        color: @white;
       }
     }
   }
@@ -637,13 +685,54 @@
   }
 }
 
-// mark-task
+// leader-grading
+.leader-grading {
+  text-align: center;
+  padding-bottom: 40px;
+  color: @dark-color-light;
+  .leader-level {
+    h3 {
+      padding: 10px;
+      width: 150px;
+      font-size: 28px;
+      background-color: @background-color;
+      color: @dark-color;
+      font-weight: 600;
+      border-radius: @box-border-radius;
+      margin: 5px auto 20px;
+    }
+  }
+  .leader-aciton {
+    display: inline-block;
+    vertical-align: top;
+    margin: 0 10px;
+    color: @dark-color;
+  }
+  .leader-markers {
+    margin-top: 20px;
+    background-color: @background-color;
+    border-radius: @box-border-radius;
+    padding: 20px;
+    .ivu-checkbox-wrapper {
+      margin-right: 20px;
+    }
+  }
+}
+// .mark-task-manage
 .mark-task {
-  &-action {
-    text-align: center;
+  &-total {
+    display: inline-block;
+    vertical-align: middle;
+    font-weight: 600;
+    margin-right: 20px;
+    span {
+      display: inline-block;
+      vertical-align: middle;
+      line-height: 36px;
+    }
 
-    > span {
-      margin-right: 15px;
+    span:last-child {
+      font-size: 18px;
     }
   }
 }

+ 9 - 5
src/constants/authority.js

@@ -137,7 +137,7 @@ export const mark = [
     icon: "ivu-icon-score-detail"
   },
   {
-    name: "ExamPaperView",
+    name: "MarkExamPaperView",
     title: "查看试卷",
     icon: "ivu-icon-view"
   }
@@ -146,18 +146,22 @@ export const mark = [
 export const inspection = [
   {
     name: "InspectionActionLogs",
-    title: "操作日志"
+    title: "操作日志",
+    icon: "ivu-icon-logs"
   },
   {
     name: "InspectionCollectLogs",
-    title: "采集日志"
+    title: "采集日志",
+    icon: "ivu-icon-recode"
   },
   {
     name: "InspectionGrading",
-    title: "改档处理"
+    title: "改档处理",
+    icon: "ivu-icon-change"
   },
   {
     name: "InspectionScore",
-    title: "成绩查询"
+    title: "成绩查询",
+    icon: "ivu-icon-score"
   }
 ];

+ 17 - 82
src/modules/grading-set/UploadPaper.vue

@@ -1,14 +1,14 @@
 <template>
   <div class="upload-paper">
-    <table class="table">
+    <table class="table table-width">
       <tr>
         <th>考区</th>
         <th v-for="(subject, index) in subjects" :key="index">
-          {{ subject.name }}
+          {{ subject.subjectName }}
         </th>
       </tr>
       <tr v-for="(area, index) in papers" :key="index">
-        <td>{{ area.name }}</td>
+        <td>{{ area.questionName }}</td>
         <td v-for="(subject, index) in area.subjects" :key="index">
           <upload-button
             :btn-type="subject.paperUrl ? 'primary' : 'default'"
@@ -30,7 +30,7 @@
 
 <script>
 import UploadButton from "@/components/UploadButton";
-import { updatePaperDetail } from "@/api";
+import { uploadPaperList } from "@/api";
 
 export default {
   name: "upload-paper",
@@ -38,91 +38,26 @@ export default {
   data() {
     return {
       workId: this.$route.params.workId,
-      papers: [
-        {
-          id: "1",
-          name: "考区01",
-          subjects: [
-            {
-              id: "34-SC",
-              name: "色彩",
-              subject: "SC",
-              uploadUrl: "http://sdf",
-              paperUrl: "http"
-            },
-            {
-              id: "34-SM",
-              name: "素描",
-              subject: "SM",
-              uploadUrl: "http://sdf",
-              paperUrl: ""
-            },
-            {
-              id: "34-SX",
-              name: "速写",
-              subject: "SX",
-              uploadUrl: "http://sdf",
-              paperUrl: ""
-            }
-          ]
-        },
-        {
-          id: "2",
-          name: "考区02",
-          subjects: [
-            {
-              id: "34-SC",
-              name: "色彩",
-              subject: "SC",
-              uploadUrl: "http://sdf",
-              paperUrl: ""
-            },
-            {
-              id: "34-SM",
-              name: "素描",
-              subject: "SM",
-              uploadUrl: "http://sdf",
-              paperUrl: ""
-            },
-            {
-              id: "34-SX",
-              name: "速写",
-              subject: "SX",
-              uploadUrl: "http://sdf",
-              paperUrl: ""
-            }
-          ]
-        }
-      ],
-      subjects: [
-        {
-          id: "34-SC",
-          name: "色彩",
-          subject: "SC"
-        },
-        {
-          id: "34-SM",
-          name: "素描",
-          subject: "SM"
-        },
-        {
-          id: "34-SX",
-          name: "速写",
-          subject: "SX"
-        }
-      ]
+      papers: [],
+      subjects: []
     };
   },
+  mounted() {
+    this.getData();
+  },
   methods: {
     async getData() {
-      const data = await updatePaperDetail(this.workId);
+      const data = await uploadPaperList(this.workId);
       this.papers = data.map(area => {
-        area.subjects = area.subjects.map(subject => {
-          subject.uploadUrl = ``;
-          return subject;
-        });
+        area.subjects = area.subjects
+          .filter(item => item.enable)
+          .map(subject => {
+            subject.uploadUrl = `${this.GLOBAL.domain}/api/papers/${this.workId}/${area.questionId}/${subject.subject}/uploadPaperFile`;
+            return subject;
+          });
         return area;
       });
+      this.subjects = this.papers[0].subjects;
     },
     uploadSuccess(response, subject) {
       subject.paperUrl = response.data.url;

+ 36 - 10
src/modules/grading/Grading.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="grading home">
-    <view-header>
+    <view-header key="1" v-if="IS_ADMIN">
       <div class="grading-subnav" slot="navSub">
         <div class="grading-title">
           <h1>{{ curSubject.name }}</h1>
@@ -28,6 +28,27 @@
         </div>
       </div>
     </view-header>
+    <view-header key="2" v-else>
+      <div class="home-navs" slot="navTop">
+        <ul>
+          <li
+            :class="{ act: curNav.name === nav.name }"
+            v-for="(nav, index) in navs"
+            :key="index"
+            @click="switchNav(nav)"
+          >
+            <i
+              :class="[
+                'icon',
+                curNav.name === nav.name ? `${nav.icon}-act` : nav.icon
+              ]"
+              v-if="nav.icon"
+            ></i>
+            <span class="nav-item-cont">{{ nav.title }}</span>
+          </li>
+        </ul>
+      </div>
+    </view-header>
 
     <div class="home-body">
       <div class="home-main">
@@ -55,6 +76,7 @@ export default {
       curNav: {},
       curSubject: { name: "" },
       SUBJECT_STAGE,
+      IS_ADMIN: true,
       IS_SCORE: false,
       stepName: "",
       stepProgress: ""
@@ -68,17 +90,22 @@ export default {
     }
   },
   mounted() {
+    const curUserRoleType = this.$ls.get("user", { role: "" }).role;
+    this.IS_ADMIN = curUserRoleType === "ADMIN";
     this.initData();
   },
   methods: {
     async initData() {
-      this.curSubject = await subjectDetail(this.subjectId);
-      this.IS_SCORE = this.curSubject.stage === "SCORE";
-      this.getProgressDetail();
-      this.stepName =
-        this.curSubject.test === 2
-          ? "试评"
-          : this.SUBJECT_STAGE[this.curSubject.stage];
+      if (this.IS_ADMIN) {
+        this.curSubject = await subjectDetail(this.subjectId);
+        this.IS_SCORE = this.curSubject.stage === "SCORE";
+        this.getProgressDetail();
+        this.stepName =
+          this.curSubject.test === 2
+            ? "试评"
+            : this.SUBJECT_STAGE[this.curSubject.stage];
+      }
+
       this.buildNavs();
       this.actSubNav();
     },
@@ -90,9 +117,8 @@ export default {
       this.stepProgress = data.totalProgress.progress.toFixed(2) + "%";
     },
     buildNavs() {
-      const user = this.$ls.get("user", {});
       this.navs = [...grading];
-      if (user.role === "ADMIN") {
+      if (this.IS_ADMIN) {
         this.navs.pop();
         this.navs = [...main.slice(0, 2), ...this.navs];
         if (this.curSubject.stage === "LEVEL") {

+ 14 - 5
src/modules/grading/GradingDetail.vue

@@ -71,6 +71,7 @@
             :question-id="filter.questionId"
             @on-paper-click="toViewCarouselPaper"
             v-if="filter.questionId && !IS_ADMIN"
+            ref="GradeHistoryPaper"
           ></grade-history-paper>
         </div>
         <div class="detail-papers-list" v-if="papers.length">
@@ -370,17 +371,20 @@ export default {
       this.current--;
       await this.getList();
       this.selectPaper(this.papers.length - 1);
-      this.$refs.ImagePreview.initData();
+      if (this.papers.length) this.$refs.ImagePreview.initData();
     },
     async nextPage() {
       if (this.current === this.totalPage) {
-        this.$Message.warning("当前已经是最后一条数据了");
-        return;
+        if (this.current > 1) {
+          this.current--;
+        } else {
+          this.$Message.warning("当前已经是最后一条数据了");
+        }
       }
       // 下一页时,继续获取当前页数据。
       await this.getList();
       this.selectPaper(0);
-      this.$refs.ImagePreview.initData();
+      if (this.papers.length) this.$refs.ImagePreview.initData();
     },
     toNext() {
       this.$refs.ImagePreview.showNext();
@@ -407,14 +411,19 @@ export default {
       this.markers = markers;
       this.$refs.ModifyLeaderGrading.open();
     },
-    leaderGradingSuccess(datas) {
+    leaderGradingSuccess(datas, paper) {
       if (datas.action === "sampling") {
         // todo:设定标准卷之后
       }
+      this.updatePaperList(paper);
       this.getStepLevels();
       this.updateHistory();
       this.toNext();
     },
+    updatePaperList(data) {
+      const index = this.papers.findIndex(item => item.id === data.id);
+      this.papers[index] = Object.assign(this.papers[index], data);
+    },
     // paper carousel
     toViewCarouselPaper(paperIndex, papers) {
       this.isFullscreenMarking = true;

+ 19 - 6
src/modules/grading/GradingOperation.vue

@@ -71,6 +71,7 @@
                 :question-id="filter.questionId"
                 @on-paper-click="toViewCarouselPaper"
                 v-if="filter.questionId"
+                ref="GradeHistoryPaper"
               ></grade-history-paper>
             </div>
             <div class="detail-papers-list" v-if="papers.length">
@@ -232,7 +233,7 @@ export default {
   },
   methods: {
     async initData() {
-      this.getSubjectDetail();
+      // this.getSubjectDetail();
       this.getWorkLevels();
 
       await this.getAreaList();
@@ -371,24 +372,36 @@ export default {
       this.current--;
       await this.getList();
       this.selectPaper(this.papers.length - 1);
-      this.$refs.ImagePreview.initData();
+      if (this.papers.length) this.$refs.ImagePreview.initData();
     },
     async nextPage() {
       if (this.current === this.totalPage) {
-        this.$Message.warning("当前已经是最后一条数据了");
-        return;
+        if (this.current > 1) {
+          this.current--;
+        } else {
+          this.$Message.warning("当前已经是最后一条数据了");
+        }
       }
       // 下一页时,继续获取当前页数据。
       await this.getList();
       this.selectPaper(0);
-      this.$refs.ImagePreview.initData();
+      if (this.papers.length) this.$refs.ImagePreview.initData();
     },
     async gradeCurPaper(level) {
-      await paperSelectLevelOrScore(this.curPaper.id, level.name, "LEVEL");
+      const data = await paperSelectLevelOrScore(
+        this.curPaper.id,
+        level.name,
+        "LEVEL"
+      );
+      this.updatePaperList(data);
       this.getStepLevels();
       this.updateHistory();
       this.toNext();
     },
+    updatePaperList(data) {
+      const index = this.papers.findIndex(item => item.id === data.id);
+      this.papers[index] = Object.assign(this.papers[index], data);
+    },
     async passCurPaper(level) {
       await paperPassLevel(this.curPaper.id);
       this.toNext();

+ 16 - 9
src/modules/grading/GradingProgress.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="grading-progress">
-    <div class="part-box-head" v-if="IS_ADMIN">
+    <div class="part-box-head" v-if="IS_ADMIN && !IS_SCORE">
       <div class="part-box-head-right">
         <Button
           type="success"
@@ -23,7 +23,7 @@
           <Icon type="arrow-right-long icon" style="margin-left:8px;" />
         </Button>
       </div>
-      <div class="part-box-head-left" v-if="curSubject.stage !== 'INIT'">
+      <div class="part-box-head-left" v-if="IS_LEVEL">
         <Button shape="circle" icon="upload icon" @click="toExportStandard"
           >导出标准卷信息</Button
         >
@@ -100,7 +100,7 @@
     <!-- modify-formal-grading-task -->
     <modify-formal-grading-task
       :subject-id="subjectId"
-      @confirm="getData"
+      @modified="getData"
       ref="ModifyFormalGradingTask"
     ></modify-formal-grading-task>
   </div>
@@ -110,7 +110,7 @@
 import ProgressLine from "./components/ProgressLine";
 import ModifyUnformalGradingTask from "./components/ModifyUnformalGradingTask";
 import ModifyFormalGradingTask from "./components/ModifyFormalGradingTask";
-import { gradingProgressDetail, subjectDetail } from "@/api";
+import { gradingProgressDetail, subjectDetail, gotoScoreStep } from "@/api";
 import { SUBJECT_STAGE } from "@/constants/enumerate";
 
 export default {
@@ -139,7 +139,7 @@ export default {
           this.curSubject.test !== 2 &&
           !this.curSubject.formal) ||
         (this.curSubject.stage == "LEVEL" &&
-          this.stepProgress !== 100 &&
+          this.totalProgress.progress !== 100 &&
           this.curSubject.test === 0 &&
           this.curSubject.formal)
       );
@@ -154,7 +154,8 @@ export default {
     },
     showMarkBtn() {
       return (
-        (this.curSubject.stage == "LEVEL" && this.stepProgress === 100) ||
+        (this.curSubject.stage == "LEVEL" &&
+          this.totalProgress.progress === 100) ||
         (this.curSubject.stage == "SCORE" && !this.curSubject.allLevel)
       );
     },
@@ -221,10 +222,16 @@ export default {
     },
     toMark() {
       this.$Modal.confirm({
-        title: "操作警告",
         content: "确定要进入打分阶段吗?",
-        onOk: () => {
-          console.log("ok");
+        onOk: async () => {
+          await gotoScoreStep(this.subjectId);
+          this.$router.replace({
+            name: "Mark",
+            params: {
+              workId: this.curSubject.workId,
+              subjectId: this.subjectId
+            }
+          });
         }
       });
     },

+ 10 - 6
src/modules/grading/components/GradeAction.vue

@@ -206,7 +206,7 @@ export default {
         undo: "待评",
         done: "已评",
         reject: "打回",
-        arbitrate: "仲裁",
+        arbitrate: "仲裁",
         sample: "标准卷"
       },
       stepType: "",
@@ -257,15 +257,19 @@ export default {
       roleRights.map(key => {
         this.rights[key] = true;
       });
-      if (this.curPaper.level) {
-        this.curLevel = this.levels.find(
-          level => level.name === this.curPaper.level
-        );
-      }
+      this.getCurLevel();
       if (this.rights.gradeHis) {
         this.getMarkHistory();
       }
     },
+    getCurLevel() {
+      const levelName = this.curPaper.rejected
+        ? this.curPaper.redoLevel
+        : this.curPaper.level;
+      if (levelName) {
+        this.curLevel = this.levels.find(item => item.name === levelName);
+      }
+    },
     async getMarkHistory() {
       const data = await markHistoryList(this.curPaper.id, "LEVEL");
       this.gradingHistory = data.map(item => {

+ 3 - 1
src/modules/grading/components/GradeHistoryPaper.vue

@@ -60,7 +60,9 @@ export default {
       };
 
       this.papers = await actionHistory(datas);
-      this.$refs.PaperCarousel.initIndex();
+      this.$nextTick(() => {
+        this.$refs.PaperCarousel.initIndex();
+      });
     },
     setCurPaper(paper) {
       this.curPaper = paper;

+ 15 - 8
src/modules/grading/components/ModifyLeaderGrading.vue

@@ -8,24 +8,25 @@
   >
     <div class="leader-grading">
       <div class="leader-level">
+        <p>已选档位</p>
         <h3>{{ LevelInfo.selectedLevel }}</h3>
       </div>
       <RadioGroup v-model="actionType">
         <div class="leader-aciton" v-if="standardVolume">
-          <Radio label="sampling">设为标准卷</Radio>
+          <Radio size="large" label="sampling">设为标准卷</Radio>
         </div>
         <div class="leader-aciton" v-if="oneClickLevel">
-          <Radio label="leveling" :disabled="noneedLevelOrReject"
+          <Radio size="large" label="leveling" :disabled="noneedLevelOrReject"
             >一键定档</Radio
           >
         </div>
         <div class="leader-aciton" v-if="levelCallback">
-          <Radio label="reject" :disabled="noneedLevelOrReject"
+          <Radio size="large" label="reject" :disabled="noneedLevelOrReject"
             >建议档位打回</Radio
           >
         </div>
       </RadioGroup>
-      <div class="leader-markers">
+      <div class="leader-markers" v-if="actionType === 'reject'">
         <CheckboxGroup v-model="selectedMarkers">
           <Checkbox
             v-for="(marker, index) in markers"
@@ -38,8 +39,10 @@
     </div>
 
     <div slot="footer">
-      <Button type="text" @click="cancel">取消</Button>
-      <Button type="primary" :disabled="isSubmit" @click="submit">确认</Button>
+      <Button shape="circle" type="primary" :disabled="isSubmit" @click="submit"
+        >确认</Button
+      >
+      <Button shape="circle" @click="cancel">取消</Button>
     </div>
   </Modal>
 </template>
@@ -87,6 +90,7 @@ export default {
       this.standardVolume = user.standardVolume;
       this.levelCallback = user.levelCallback;
       this.oneClickLevel = user.oneClickLevel;
+      this.selectedMarkers = this.markers.map(item => item.id);
     },
     visibleChange(visible) {
       if (visible) {
@@ -118,7 +122,10 @@ export default {
       if (this.isSubmit) return;
       this.isSubmit = true;
       let result = true;
-      await leaderGradingPaper(this.LevelInfo.curPaperId, datas).catch(() => {
+      const paper = await leaderGradingPaper(
+        this.LevelInfo.curPaperId,
+        datas
+      ).catch(() => {
         result = false;
       });
       this.isSubmit = false;
@@ -126,7 +133,7 @@ export default {
       if (!result) return;
 
       this.$Message.success("操作成功!");
-      this.$emit("modified", datas);
+      this.$emit("modified", datas, paper);
       this.cancel();
     }
   }

+ 21 - 16
src/modules/inspection/Inspection.vue

@@ -1,21 +1,26 @@
 <template>
   <div class="inspection home">
-    <div class="home-header">
-      <view-header>
-        <div class="home-navs" slot="info">
-          <ul>
-            <li
-              :class="{ act: curNav.name === nav.name }"
-              v-for="(nav, index) in navs"
-              :key="index"
-              @click="switchNav(nav)"
-            >
-              <span class="nav-item-cont">{{ nav.title }}</span>
-            </li>
-          </ul>
-        </div>
-      </view-header>
-    </div>
+    <view-header>
+      <div class="home-navs" slot="navTop">
+        <ul>
+          <li
+            :class="{ act: curNav.name === nav.name }"
+            v-for="(nav, index) in navs"
+            :key="index"
+            @click="switchNav(nav)"
+          >
+            <i
+              :class="[
+                'icon',
+                curNav.name === nav.name ? `${nav.icon}-act` : nav.icon
+              ]"
+              v-if="nav.icon"
+            ></i>
+            <span class="nav-item-cont">{{ nav.title }}</span>
+          </li>
+        </ul>
+      </div>
+    </view-header>
 
     <div class="home-body">
       <div class="home-main">

+ 42 - 40
src/modules/inspection/InspectionActionLogs.vue

@@ -1,19 +1,12 @@
 <template>
   <div class="inspection-action-logs">
-    <div class="part-box-head">
-      <div class="part-box-head-right">
-        <Button type="primary" icon="md-download" @click="exportLogs"
-          >导出操作日志</Button
-        >
-      </div>
-    </div>
-    <div class="part-box">
+    <div class="part-box part-box-filter">
       <Form ref="FilterForm" label-position="left" inline>
-        <FormItem label="工作文件夹:">
+        <FormItem>
           <Select
             v-model="filter.workId"
             @on-change="workChange"
-            placeholder="请选择工作文件夹"
+            placeholder="工作文件夹"
             style="width: 150px"
           >
             <Option
@@ -24,8 +17,8 @@
             ></Option>
           </Select>
         </FormItem>
-        <FormItem label="科目:">
-          <Select v-model="filter.subject" placeholder="请选择科目">
+        <FormItem>
+          <Select v-model="filter.subject" placeholder="科目">
             <Option
               v-for="subject in subjects"
               :key="subject.id"
@@ -34,24 +27,24 @@
             ></Option>
           </Select>
         </FormItem>
-        <FormItem label="考号:">
+        <FormItem>
           <Input
             v-model.trim="filter.examNumber"
-            placeholder="输入考号"
+            placeholder="输入考号"
             clearable
           ></Input>
         </FormItem>
-        <FormItem label="姓名:">
+        <FormItem>
           <Input
             v-model.trim="filter.name"
-            placeholder="输入姓名"
+            placeholder="输入姓名"
             clearable
           ></Input>
         </FormItem>
-        <FormItem label="操作:">
+        <FormItem>
           <Select
             v-model="filter.operType"
-            placeholder="请选择操作"
+            placeholder="操作类型"
             clearable
             style="width: 130px"
           >
@@ -63,41 +56,49 @@
             ></Option>
           </Select>
         </FormItem>
-        <FormItem label="查询时间:">
+        <FormItem>
           <DatePicker
             v-model="searchTime"
             type="datetimerange"
             @on-change="searchTimeChange"
-            placeholder="请选择查询时间段"
+            placeholder="查询时间段"
             style="width: 400px"
             transfer
           ></DatePicker>
         </FormItem>
         <FormItem>
-          <Button type="primary" icon="ios-search" @click="toPage(1)"
+          <Button
+            class="btn-form-search"
+            size="small"
+            type="primary"
+            @click="toPage(1)"
             >查询</Button
           >
         </FormItem>
       </Form>
+    </div>
+    <div class="part-box-head">
+      <Button shape="circle" icon="upload icon" @click="exportLogs"
+        >导出操作日志</Button
+      >
+    </div>
+    <Table
+      ref="TableList"
+      :columns="columns"
+      :data="dataList"
+      disabled-hover
+      border
+    ></Table>
 
-      <Table
-        ref="TableList"
-        :columns="columns"
-        :data="dataList"
-        disabled-hover
-        border
-      ></Table>
-
-      <div class="part-page">
-        <Page
-          :current="current"
-          :total="total"
-          :page-size="size"
-          show-total
-          show-elevator
-          @on-change="toPage"
-        ></Page>
-      </div>
+    <div class="part-page">
+      <Page
+        :current="current"
+        :total="total"
+        :page-size="size"
+        show-total
+        show-elevator
+        @on-change="toPage"
+      ></Page>
     </div>
   </div>
 </template>
@@ -171,7 +172,8 @@ export default {
         },
         {
           title: "操作时间",
-          key: "createTime"
+          key: "createTime",
+          width: 200
         }
       ]
     };

+ 44 - 41
src/modules/inspection/InspectionCollectLogs.vue

@@ -1,18 +1,11 @@
 <template>
   <div class="inspection-collect-logs">
-    <div class="part-box-head">
-      <div class="part-box-head-right">
-        <Button type="primary" icon="md-download" @click="exportLogs"
-          >导出操作日志</Button
-        >
-      </div>
-    </div>
-    <div class="part-box">
+    <div class="part-box part-box-filter">
       <Form ref="FilterForm" label-position="left" inline>
-        <FormItem label="工作文件夹:">
+        <FormItem>
           <Select
             v-model="filter.workId"
-            placeholder="请选择工作文件夹"
+            placeholder="工作文件夹"
             style="width: 150px"
             @on-change="workChange"
           >
@@ -24,8 +17,8 @@
             ></Option>
           </Select>
         </FormItem>
-        <FormItem label="科目:">
-          <Select v-model="filter.subject" placeholder="请选择科目">
+        <FormItem>
+          <Select v-model="filter.subject" placeholder="科目">
             <Option
               v-for="subject in subjects"
               :key="subject.id"
@@ -34,24 +27,24 @@
             ></Option>
           </Select>
         </FormItem>
-        <FormItem label="考号:">
+        <FormItem>
           <Input
             v-model.trim="filter.examNumber"
-            placeholder="输入考号"
+            placeholder="输入考号"
             clearable
           ></Input>
         </FormItem>
-        <FormItem label="姓名:">
+        <FormItem>
           <Input
             v-model.trim="filter.name"
-            placeholder="输入姓名"
+            placeholder="输入姓名"
             clearable
           ></Input>
         </FormItem>
-        <FormItem label="采集账号:">
+        <FormItem>
           <Select
             v-model="filter.createUserId"
-            placeholder="请选择操作"
+            placeholder="采集账号"
             clearable
             style="width: 130px"
           >
@@ -63,41 +56,49 @@
             ></Option>
           </Select>
         </FormItem>
-        <FormItem label="查询时间:">
+        <FormItem>
           <DatePicker
             v-model="searchTime"
             type="datetimerange"
-            placeholder="请选择查询时间段"
+            placeholder="查询时间段"
             style="width: 400px"
             @on-change="searchTimeChange"
             transfer
           ></DatePicker>
         </FormItem>
         <FormItem>
-          <Button type="primary" icon="ios-search" @click="toPage(1)"
+          <Button
+            type="primary"
+            class="btn-form-search"
+            size="small"
+            @click="toPage(1)"
             >查询</Button
           >
         </FormItem>
       </Form>
+    </div>
+    <div class="part-box-head">
+      <Button shape="circle" icon="upload icon" @click="exportLogs"
+        >导出操作日志</Button
+      >
+    </div>
+    <Table
+      ref="TableList"
+      :columns="columns"
+      :data="dataList"
+      disabled-hover
+      border
+    ></Table>
 
-      <Table
-        ref="TableList"
-        :columns="columns"
-        :data="dataList"
-        disabled-hover
-        border
-      ></Table>
-
-      <div class="part-page">
-        <Page
-          :current="current"
-          :total="total"
-          :page-size="size"
-          show-total
-          show-elevator
-          @on-change="toPage"
-        ></Page>
-      </div>
+    <div class="part-page">
+      <Page
+        :current="current"
+        :total="total"
+        :page-size="size"
+        show-total
+        show-elevator
+        @on-change="toPage"
+      ></Page>
     </div>
   </div>
 </template>
@@ -155,7 +156,8 @@ export default {
         },
         {
           title: "上传时间",
-          key: "createTime"
+          key: "createTime",
+          width: 200
         },
 
         {
@@ -164,7 +166,8 @@ export default {
         },
         {
           title: "登录时间",
-          key: "loginTime"
+          key: "loginTime",
+          width: 200
         }
       ]
     };

+ 122 - 93
src/modules/inspection/InspectionGrading.vue

@@ -1,103 +1,132 @@
 <template>
   <div class="inspection-grading">
-    <Form ref="FilterForm" label-position="left" inline>
-      <FormItem>
-        <Select
-          v-model="filter.workId"
-          @on-change="workChange"
-          placeholder="请选择工作文件夹"
-          style="width: 150px"
-        >
-          <Option
-            v-for="(work, windex) in works"
-            :key="windex"
-            :value="work.id"
-            :label="work.name"
-          ></Option>
-        </Select>
-      </FormItem>
-      <FormItem>
-        <Select
-          v-model="filter.subject"
-          @on-change="subjectChange"
-          placeholder="请选择科目"
-        >
-          <Option
-            v-for="subject in subjects"
-            :key="subject.id"
-            :value="subject.subject"
-            :label="subject.name"
-          ></Option>
-        </Select>
-      </FormItem>
-      <FormItem>
-        <Select v-model="filter.questionId" placeholder="请选择考区">
-          <Option
-            v-for="area in areas"
-            :key="area.id"
-            :value="area.id"
-            :label="area.areaName"
-          ></Option>
-        </Select>
-      </FormItem>
-      <FormItem>
-        <Select
-          v-model="filter.status"
-          placeholder="请选择类型"
-          clearable
-          style="width: 120px"
-        >
-          <Option
-            v-for="(val, key) in CHANGE_LEVEL_STATUS"
-            :key="key"
-            :value="key * 1"
-            :label="val"
-          ></Option>
-        </Select>
-      </FormItem>
-      <FormItem>
-        <Button type="primary" icon="ios-search" @click="toPage(1)"
-          >查询</Button
-        >
-      </FormItem>
-    </Form>
+    <div class="part-box part-box-filter">
+      <Form ref="FilterForm" label-position="left" inline>
+        <FormItem>
+          <Select
+            v-model="filter.workId"
+            @on-change="workChange"
+            placeholder="工作文件夹"
+            style="width: 150px"
+          >
+            <Option
+              v-for="(work, windex) in works"
+              :key="windex"
+              :value="work.id"
+              :label="work.name"
+            ></Option>
+          </Select>
+        </FormItem>
+        <FormItem>
+          <Select
+            v-model="filter.subject"
+            @on-change="subjectChange"
+            placeholder="科目"
+          >
+            <Option
+              v-for="subject in subjects"
+              :key="subject.id"
+              :value="subject.subject"
+              :label="subject.name"
+            ></Option>
+          </Select>
+        </FormItem>
+        <FormItem>
+          <Select v-model="filter.questionId" placeholder="考区">
+            <Option
+              v-for="area in areas"
+              :key="area.id"
+              :value="area.id"
+              :label="area.areaName"
+            ></Option>
+          </Select>
+        </FormItem>
+        <FormItem>
+          <Select
+            v-model="filter.status"
+            placeholder="类型"
+            clearable
+            style="width: 120px"
+          >
+            <Option
+              v-for="(val, key) in CHANGE_LEVEL_STATUS"
+              :key="key"
+              :value="key * 1"
+              :label="val"
+            ></Option>
+          </Select>
+        </FormItem>
+        <FormItem>
+          <Button
+            type="primary"
+            class="btn-form-search"
+            size="small"
+            @click="toPage(1)"
+            >查询</Button
+          >
+        </FormItem>
+      </Form>
+    </div>
 
     <div class="check-grade">
-      <div class="check-grade-list image-view-list image-view-list-4">
-        <div class="image-view" 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>
-      </div>
-      <div class="part-page" v-if="total > size">
-        <Page
-          :current="current"
-          :total="total"
-          :page-size="size"
-          show-total
-          show-elevator
-          @on-change="toPage"
-        ></Page>
-      </div>
       <div class="check-grade-action" v-if="curPaper.id">
-        <div class="paper-info">
-          <p>{{ curPaper.examNumber }}</p>
-          <p>NO.{{ curPaper.sn }}</p>
-          <p>原档位:{{ curPaper.originLevel }}</p>
-          <p>申请档位:{{ curPaper.redoLevel }}</p>
+        <div class="action-paper-info">
+          <p>
+            <span>试卷考号:</span><span>{{ curPaper.examNumber }}</span>
+          </p>
+          <p>
+            <span>试卷密号:</span><span>NO.{{ curPaper.sn }}</span>
+          </p>
+        </div>
+        <div class="action-grade-info">
+          <p>
+            <span>原始档位:</span><span>{{ curPaper.originLevel }}</span>
+          </p>
+          <p>
+            <span>申请档位:</span><span>{{ curPaper.redoLevel }}</span>
+          </p>
+        </div>
+        <div
+          :class="[
+            'action-grade-result',
+            { 'action-grade-result-error': curPaper.auditStatus === 0 }
+          ]"
+          v-if="curPaper.auditStatus === null"
+        >
+          <p>{{ curPaper.auditStatus === 1 ? "同意改档" : "不同意改档" }}</p>
         </div>
-        <div class="check-grade-result" v-if="curPaper.auditStatus">
-          <p>{{ curPaper.auditStatus === 1 ? "已同意" : "未同意" }}</p>
+        <div class="action-grade-btn" v-else>
+          <Button shape="circle" type="primary" @click="confirm(1)"
+            >同意改档</Button
+          >
+          <Button shape="circle" type="error" @click="confirm(0)"
+            >不同意改档</Button
+          >
+        </div>
+      </div>
+
+      <div class="check-grade-body">
+        <div class="check-grade-list image-view-list image-view-list-4">
+          <div class="image-view" 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>
         </div>
-        <div class="check-grade-btn" v-else>
-          <Button type="primary" @click="confirm(1)">同意改档</Button>
-          <Button type="error" @click="confirm(0)">不同意改档</Button>
+        <div class="part-page" v-if="total > size">
+          <Page
+            :current="current"
+            :total="total"
+            :page-size="size"
+            show-total
+            show-elevator
+            @on-change="toPage"
+          ></Page>
         </div>
       </div>
     </div>

+ 29 - 27
src/modules/main/ExamPaperView.vue

@@ -1,29 +1,28 @@
 <template>
   <div class="exam-paper-view">
-    <table class="table">
-      <tr>
-        <th>考区</th>
-        <th v-for="(subject, index) in subjects" :key="index">
-          {{ subject.name }}
-        </th>
-      </tr>
-      <tr v-for="(area, index) in papers" :key="index">
-        <td>{{ area.name }}</td>
-        <td v-for="(subject, index) in area.subjects" :key="index">
-          <div
-            :class="subject.paperUrl ? 'primary' : 'default'"
-            @click="downloadPaper(subject)"
-          >
-            {{ subject.name }}
-          </div>
-        </td>
-      </tr>
-    </table>
+    <div
+      class="exam-paper-item"
+      v-for="item in dataList"
+      :key="item.questionId"
+    >
+      <h2 class="exam-paper-area">{{ item.questionName }}</h2>
+      <div class="exam-paper-subjects">
+        <Button
+          v-for="subject in item.subjects"
+          :key="subject.subject"
+          :type="subject.url ? 'primary' : 'default'"
+          shape="circle"
+          @click="downloadPaper(subject)"
+        >
+          {{ subject.subjectName }}
+        </Button>
+      </div>
+    </div>
   </div>
 </template>
 
 <script>
-import { updatePaperDetail } from "@/api";
+import { uploadPaperList } from "@/api";
 
 export default {
   name: "exam-paper-view",
@@ -31,23 +30,26 @@ export default {
     return {
       workId: this.$route.params.workId,
       subjectId: this.$route.params.subjectId,
-      papers: [],
-      subjects: []
+      subject: "",
+      dataList: []
     };
   },
+  mounted() {
+    this.subject = this.subjectId.split("-")[1];
+    this.getData();
+  },
   methods: {
     async getData() {
-      const data = await updatePaperDetail(this.workId);
-      this.papers = data.map(area => {
+      const data = await uploadPaperList(this.workId);
+      this.dataList = data.map(area => {
         area.subjects = area.subjects.filter(
-          subject => subject.id === this.subjectId
+          subject => subject.subject === this.subject
         );
         return area;
       });
-      this.subjects = this.papers[0].subjects;
     },
     downloadPaper(subject) {
-      if (subject.paperUrl) window.open(subject.paperUrl);
+      if (subject.url) window.open(subject.url);
     }
   }
 };

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

@@ -110,7 +110,7 @@
         <FormItem>
           <Button
             size="small"
-            class="border-radius-small btn-form-search"
+            class="btn-form-search"
             type="primary"
             @click="toPage(1)"
             >查询</Button

+ 0 - 1
src/modules/main/components/ImageActionList.vue

@@ -27,7 +27,6 @@
           <Button
             :type="image.missing ? 'error' : 'default'"
             size="small"
-            ghost
             @click="toSignAbsent(image)"
             v-if="canAbsent"
             >缺考</Button

+ 74 - 47
src/modules/mark/MarkDetail.vue

@@ -1,35 +1,58 @@
 <template>
   <div class="mark-detail grading-detail">
+    <div class="part-box-head">
+      <Form ref="FilterForm" label-position="left" inline>
+        <FormItem>
+          <Select
+            v-model="filter.questionId"
+            @on-change="areaChange"
+            placeholder="请选择考区"
+          >
+            <Option
+              v-for="area in areas"
+              :key="area.id"
+              :value="area.id"
+              :label="area.areaName"
+            ></Option>
+          </Select>
+        </FormItem>
+        <FormItem>
+          <Button
+            size="small"
+            class="btn-form-search"
+            type="primary"
+            @click="toPage(1)"
+            >查询</Button
+          >
+        </FormItem>
+      </Form>
+    </div>
     <grade-step
+      :steps="steps"
       :init-step="curStep"
       :show-analysis="false"
       @on-change="stepChange"
       ref="GradeStep"
-      v-if="steps.length"
+      v-if="steps.levelStep"
     ></grade-step>
-    <div class="detail-body">
-      <div class="detail-filter">
-        <Form ref="FilterForm" label-position="left" inline>
-          <FormItem>
-            <Select
-              v-model="filter.questionId"
-              @on-change="areaChange"
-              placeholder="请选择考区"
-            >
-              <Option
-                v-for="area in areas"
-                :key="area.id"
-                :value="area.id"
-                :label="area.areaName"
-              ></Option>
-            </Select>
-          </FormItem>
-          <FormItem>
-            <Button type="primary" icon="ios-search" @click="toPage(1)"
-              >查询</Button
-            >
-          </FormItem>
-        </Form>
+    <div class="detail-body clear-float">
+      <!-- detail-aciton -->
+      <div
+        :class="[
+          'detail-action',
+          { 'detail-action-fullscreen': isFullscreenMarking }
+        ]"
+      >
+        <mark-action
+          :cur-paper="curPaper"
+          :levels="levels"
+          :user-role="curUserRoleType"
+          @on-leader-level="leaderSelectLevel"
+          @on-code-search="serachPaperByCode"
+          @on-grade-change-search="searchGradeChangeList"
+          v-if="curPaper.id"
+          ref="GradeAction"
+        ></mark-action>
       </div>
       <!-- detail-papers -->
       <div :class="detailPapersClasses">
@@ -42,7 +65,7 @@
             ref="GradeHistoryPaper"
           ></grade-history-paper>
         </div>
-        <div class="detail-papers-list">
+        <div class="detail-papers-list" v-if="papers.length">
           <div :class="imageViewClasses">
             <div
               :class="[
@@ -73,18 +96,9 @@
             ></Page>
           </div>
         </div>
-      </div>
-      <!-- detail-aciton -->
-      <div class="detail-action">
-        <mark-action
-          :cur-paper="curPaper"
-          :levels="levels"
-          :user-role="curUserRoleType"
-          @on-leader-level="leaderSelectLevel"
-          @on-code-search="serachPaperByCode"
-          @on-grade-change-search="searchGradeChangeList"
-          v-if="curPaper.id"
-        ></mark-action>
+        <div class="detail-papers-list" v-else>
+          <p class="detail-papers-none">暂无数据</p>
+        </div>
       </div>
     </div>
 
@@ -96,6 +110,7 @@
       @on-paper-change="selectPaper"
       @on-page-prev="prevPage"
       @on-page-next="nextPage"
+      @on-close="imagePreviewClose"
       header-hide
       ref="ImagePreview"
       v-if="papers.length"
@@ -106,6 +121,7 @@
       :image-list="carouselPapers"
       :init-index="curCarouselPaperIndex"
       @on-paper-change="selectCarouselPaper"
+      @on-close="imagePreviewClose"
       loop
       header-hide
       ref="CarouselPapersPreview"
@@ -171,7 +187,8 @@ export default {
       curPaperIndex: 0,
       // carousel paper review,
       carouselPapers: [],
-      curCarouselPaperIndex: 0
+      curCarouselPaperIndex: 0,
+      isFullscreenMarking: false
     };
   },
   computed: {
@@ -217,7 +234,7 @@ export default {
     },
     async getList() {
       let data = [];
-      if (this.step.type === "done") {
+      if (this.curStep.type === "done") {
         const datas = {
           ...this.filter,
           level: this.curStep.name,
@@ -262,15 +279,15 @@ export default {
           type: "shift"
         });
       }
-      let levelMenu = data.map(item => {
+      let levelStep = data.map(item => {
         return {
           ...item,
           name: item.id,
           type: "done"
         };
       });
-      this.steps = [...levelMenu, ...otherStep];
-      if (!this.curStep) this.curStep = this.steps[0];
+      this.steps = { levelStep, otherStep };
+      if (!this.curStep) this.curStep = levelStep[0];
     },
     async getWorkLevels() {
       const data = await workLevelList(this.workId);
@@ -315,9 +332,13 @@ export default {
       this.curPaper = { ...this.papers[index] };
     },
     toReview(index) {
+      this.isFullscreenMarking = true;
       this.selectPaper(index);
       this.$refs.ImagePreview.open();
     },
+    imagePreviewClose() {
+      this.isFullscreenMarking = false;
+    },
     async prevPage() {
       if (this.current === 1) {
         this.$Message.warning("当前已经是第一条数据了");
@@ -326,17 +347,20 @@ export default {
       this.current--;
       await this.getList();
       this.selectPaper(this.papers.length - 1);
-      this.$refs.ImagePreview.initData();
+      if (this.papers.length) this.$refs.ImagePreview.initData();
     },
     async nextPage() {
       if (this.current === this.totalPage) {
-        this.$Message.warning("当前已经是最后一条数据了");
-        return;
+        if (this.current > 1) {
+          this.current--;
+        } else {
+          this.$Message.warning("当前已经是最后一条数据了");
+        }
       }
       // 下一页时,继续获取当前页数据。
       await this.getList();
       this.selectPaper(0);
-      this.$refs.ImagePreview.initData();
+      if (this.papers.length) this.$refs.ImagePreview.initData();
     },
     toNext() {
       this.$refs.ImagePreview.showNext();
@@ -382,9 +406,12 @@ export default {
     },
     // paper carousel
     toViewCarouselPaper(paperIndex, papers) {
+      this.isFullscreenMarking = true;
       this.curCarouselPaperIndex = paperIndex;
       this.carouselPapers = papers;
-      this.$refs.CarouselPapersPreview.open();
+      this.$nextTick(() => {
+        this.$refs.CarouselPapersPreview.open();
+      });
     },
     selectCarouselPaper(index) {
       this.curCarouselPaperIndex = index;

+ 47 - 12
src/modules/mark/MarkHome.vue

@@ -1,9 +1,12 @@
 <template>
   <div class="mark-home home">
-    <div class="home-header">
-      <view-header>
-        <h1 slot="logo">{{ curSubject.name }}</h1>
-        <div class="home-navs" slot="info">
+    <view-header key="1" v-if="IS_ADMIN">
+      <div class="grading-subnav" slot="navSub">
+        <div class="grading-title">
+          <h1>{{ curSubject.name }}</h1>
+          <span>当前阶段:打分阶段</span>
+        </div>
+        <div class="home-navs">
           <ul>
             <li
               :class="{ act: curNav.name === nav.name }"
@@ -11,12 +14,40 @@
               :key="index"
               @click="switchNav(nav)"
             >
+              <i
+                :class="[
+                  'icon',
+                  curNav.name === nav.name ? `${nav.icon}-act` : nav.icon
+                ]"
+                v-if="nav.icon"
+              ></i>
               <span class="nav-item-cont">{{ nav.title }}</span>
             </li>
           </ul>
         </div>
-      </view-header>
-    </div>
+      </div>
+    </view-header>
+    <view-header key="2" v-else>
+      <div class="home-navs" slot="navTop">
+        <ul>
+          <li
+            :class="{ act: curNav.name === nav.name }"
+            v-for="(nav, index) in navs"
+            :key="index"
+            @click="switchNav(nav)"
+          >
+            <i
+              :class="[
+                'icon',
+                curNav.name === nav.name ? `${nav.icon}-act` : nav.icon
+              ]"
+              v-if="nav.icon"
+            ></i>
+            <span class="nav-item-cont">{{ nav.title }}</span>
+          </li>
+        </ul>
+      </div>
+    </view-header>
 
     <div class="home-body">
       <div class="home-main">
@@ -29,9 +60,10 @@
 </template>
 
 <script>
-import { mark } from "@/constants/authority";
-import menuMixins from "@/components/homeMenuMixins";
 import { subjectDetail } from "@/api";
+import { mark, main } from "@/constants/authority";
+import menuMixins from "@/components/homeMenuMixins";
+import { SUBJECT_STAGE } from "@/constants/enumerate";
 
 export default {
   name: "mark-home",
@@ -41,7 +73,9 @@ export default {
       subjectId: this.$route.params.subjectId,
       navs: [],
       curNav: {},
-      curSubject: { name: "素描" }
+      curSubject: { name: "" },
+      SUBJECT_STAGE,
+      IS_ADMIN: true
     };
   },
   watch: {
@@ -52,6 +86,8 @@ export default {
     }
   },
   mounted() {
+    const curUserRoleType = this.$ls.get("user", { role: "" }).role;
+    this.IS_ADMIN = curUserRoleType === "ADMIN";
     this.initData();
   },
   methods: {
@@ -61,11 +97,10 @@ export default {
       this.actSubNav();
     },
     buildNavs() {
-      const user = this.$ls.get("user", {});
       this.navs = [...mark];
-      if (user.role === "ADMIN") {
+      if (this.IS_ADMIN) {
         this.navs.pop();
-        this.navs.unshift({ title: "总览", name: "WorkOverview" });
+        this.navs = [...main.slice(0, 2), ...this.navs];
       } else {
         this.navs.splice(1, 1);
       }

+ 88 - 55
src/modules/mark/MarkOperation.vue

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

+ 99 - 73
src/modules/mark/MarkTaskManage.vue

@@ -1,76 +1,93 @@
 <template>
   <div class="mark-task-manage">
-    <div class="part-box-head mark-task-head">
-      <Select
-        v-model="questionId"
-        placeholder="请选择考区"
-        @on-change="areaChange"
-        style="width: 140px;margin-right: 10px;"
-      >
-        <Option
-          v-for="area in areas"
-          :key="area.id"
-          :value="area.id"
-          :label="area.areaName"
-        ></Option>
-      </Select>
-      <Button type="primary" icon="md-search" @click="getData">查询</Button>
-    </div>
-    <div class="part-box mark-task-body">
-      <table class="table">
-        <tr>
-          <th>档位</th>
-          <th>总数量</th>
-          <th>已评</th>
-          <th>未评</th>
-          <th>排序规则</th>
-          <th>是否显示档内序号</th>
-          <th>本次任务数</th>
-        </tr>
-        <tr v-for="(task, tindex) in taskList" :key="tindex">
-          <td>{{ task.level }}</td>
-          <td>{{ task.totalCount }}</td>
-          <td>{{ task.successCount }}</td>
-          <td>{{ task.waitCount }}</td>
-          <td>
-            <Select v-model="task.sortRule" @on-change="sortRuleChange(task)">
-              <Option
-                v-for="(val, key) in SORT_ORDER_TYPE"
-                :key="key"
-                :value="key * 1"
-                :label="val"
-              ></Option>
-            </Select>
-          </td>
-          <td>
-            <Select v-model="task.displayNumber">
-              <Option
-                v-for="(val, key) in BOOLEAN_TYPE"
-                :key="key"
-                :value="key * 1"
-                :label="val"
-              ></Option>
-            </Select>
-          </td>
-          <td>
-            <InputNumber
-              v-model="task.taskCount"
-              :min="0"
-              :max="task.waitCount"
-              :precision="0"
-              :disabled="!task.waitCount"
-            ></InputNumber>
-          </td>
-        </tr>
-      </table>
-
-      <div class="mark-task-action">
-        <span>已选任务数量:{{ curTaskCount }}</span>
-        <Button type="primary" @click="submit" :disabled="isSubmit"
+    <div class="part-box part-box-head">
+      <div class="part-box-head-left">
+        <Select
+          v-model="questionId"
+          placeholder="选择考区"
+          @on-change="areaChange"
+          style="width: 200px;margin-right: 10px;"
+        >
+          <Option
+            v-for="area in areas"
+            :key="area.id"
+            :value="area.id"
+            :label="area.areaName"
+          ></Option>
+        </Select>
+        <Button
+          class="btn-form-search"
+          size="small"
+          type="primary"
+          @click="getData"
+          >查询</Button
+        >
+      </div>
+      <div class="part-box-head-right">
+        <p class="mark-task-total">
+          <span>已选任务数量:</span>
+          <span>{{ curTaskCount }}</span>
+        </p>
+        <Button
+          shape="circle"
+          type="success"
+          icon="upload-white icon"
+          @click="submit"
+          :disabled="isSubmit || !canSubmitTask"
           >发布评卷任务</Button
         >
       </div>
     </div>
+    <table class="table table-width">
+      <tr>
+        <th>档位</th>
+        <th>总数量</th>
+        <th>已评</th>
+        <th>未评</th>
+        <th>排序规则</th>
+        <th>是否显示档内序号</th>
+        <th>本次任务数</th>
+      </tr>
+      <tr v-for="(task, tindex) in taskList" :key="tindex">
+        <td>{{ task.code }}</td>
+        <td>{{ task.totalCount }}</td>
+        <td>{{ task.successCount }}</td>
+        <td>{{ task.waitCount }}</td>
+        <td>
+          <Select v-model="task.sortRule" @on-change="sortRuleChange(task)">
+            <Option
+              v-for="(val, key) in SORT_ORDER_TYPE"
+              :key="key"
+              :value="key * 1"
+              :label="val"
+            ></Option>
+          </Select>
+        </td>
+        <td>
+          <Select v-model="task.displayNumber">
+            <Option
+              v-for="(val, key) in BOOLEAN_TYPE"
+              :key="key"
+              :value="key * 1"
+              :label="val"
+            ></Option>
+          </Select>
+        </td>
+        <td>
+          <InputNumber
+            v-model="task.taskCount"
+            :min="0"
+            :max="task.waitCount"
+            :precision="0"
+            :disabled="!task.waitCount"
+          ></InputNumber>
+        </td>
+      </tr>
+    </table>
+
+    <p class="tips-info tips-error" v-if="!canSubmitTask">
+      警告:当前考区还有未完成的任务,无法发布新任务!
+    </p>
   </div>
 </template>
 
@@ -79,7 +96,7 @@ import {
   areaList,
   markTaskInfo,
   checkMarkTaskCanSubmit,
-  createGradingTask
+  publishScoreTask
 } from "@/api";
 import { calcSum } from "@/plugins/utils";
 import { SORT_ORDER_TYPE, BOOLEAN_TYPE } from "@/constants/enumerate";
@@ -143,7 +160,10 @@ export default {
       const data = await markTaskInfo(this.subjectId, this.questionId);
       this.taskList = data.map(item => {
         return {
-          ...item,
+          code: item.code,
+          totalCount: item.totalCount,
+          successCount: item.successCount,
+          waitCount: item.waitCount,
           displayNumber: 0,
           sortRule: 0,
           taskCount: 0
@@ -154,20 +174,26 @@ export default {
       if (!task.sortRule) task.displayNumber = 0;
     },
     async submit() {
+      if (!this.canSubmitTask) {
+        this.$Message.error("当前考区还有未完成的任务,无法发布新任务!");
+        return;
+      }
       if (!this.curTaskCount) {
         this.$Message.error("请设置任务数量!");
         return;
       }
       if (this.isSubmit) return;
       this.isSubmit = true;
-      const data = await createGradingTask({
+      let result = true;
+      await publishScoreTask({
         subjectId: this.subjectId,
-        taskCount: this.curTaskCount,
         questionId: this.questionId,
         taskList: this.taskList
-      }).catch(() => {});
+      }).catch(() => {
+        result = false;
+      });
       this.isSubmit = false;
-      if (!data) return;
+      if (!result) return;
       this.$Message.success("任务创建成功!");
       this.areaChange();
     }

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

@@ -2,22 +2,27 @@
   <div class="mark-action grade-action">
     <!-- 查询 -->
     <div class="action-search" v-if="rights.search">
-      <Input v-model.trim="filter.code" placeholder="请输入号码">
-        <Select
-          v-model="filter.codeType"
-          placeholder="类型"
-          slot="prepend"
-          style="width: 100px"
-        >
-          <Option
-            v-for="(val, key) in CODE_TYPE"
-            :key="key"
-            :value="key"
-            :label="val"
-          ></Option>
-        </Select>
-        <Button icon="ios-search" slot="append" @click="searchCode"></Button>
+      <Select
+        class="search-select"
+        v-model="filter.codeType"
+        placeholder="密号类型"
+      >
+        <Option
+          v-for="(val, key) in CODE_TYPE"
+          :key="key"
+          :value="key"
+          :label="val"
+        ></Option>
+      </Select>
+      <Input
+        class="search-input"
+        v-model.trim="filter.code"
+        placeholder="输入密号"
+      >
       </Input>
+      <Button size="small" type="primary" class="search-btn" @click="searchCode"
+        >查询</Button
+      >
     </div>
     <!-- 改档处理状态查询 -->
     <div class="action-grade-change-search" v-if="rights.gradeChangeSearch">
@@ -33,7 +38,11 @@
           :label="val"
         ></Option>
       </Select>
-      <Button icon="ios-search" slot="append" @click="searchGradeChange"
+      <Button
+        size="small"
+        type="primary"
+        class="search-btn"
+        @click="searchGradeChange"
         >查询</Button
       >
     </div>
@@ -41,56 +50,78 @@
     <!-- 试卷状态 -->
     <!-- 状态:已评,待评,改档,改档打分 -->
     <div class="action-paper-state">
-      <p class="paper-state-cont">{{ step.typeName }}</p>
+      <p class="paper-state-cont">{{ stepLabel }}</p>
     </div>
     <!-- 试卷信息 -->
     <div class="action-paper-info">
-      <p v-if="IS_ADMIN">{{ curPaper.examNumber }}</p>
-      <p>No.{{ curPaper.sn }}</p>
+      <p v-if="IS_ADMIN">
+        <span>试卷考号:</span><span>{{ curPaper.examNumber }}</span>
+      </p>
+      <p>
+        <span>试卷密号:</span><span>NO.{{ curPaper.sn }}</span>
+      </p>
     </div>
     <!-- 改档信息 -->
     <div class="action-grade-change" v-if="rights.gradeChange">
-      <p>原档位:{{ curPaper.originLevel }}</p>
-      <p>申请档位:{{ curPaper.redoLevel }}</p>
+      <p>
+        <span>原始档位:</span><span>{{ curPaper.originLevel }}</span>
+      </p>
+      <p>
+        <span>申请档位:</span><span>{{ curPaper.redoLevel }}</span>
+      </p>
     </div>
-    <div class="action-grade-change-status" v-if="rights.gradeChange">
-      <p>已同意</p>
+    <div
+      :class="[
+        'action-grade-change-status',
+        { 'action-grade-change-status-error': curPaper.auditStatus === 0 }
+      ]"
+      v-if="rights.gradeChange"
+    >
+      <p>{{ curPaper.auditStatus === 1 ? "同意改档" : "不同意改档" }}</p>
     </div>
+
     <!-- 档位信息 -->
     <!-- 已评/待评(已评档位),改档打分(已评档位) -->
     <div class="action-grade-info" v-if="rights.gradeInfo">
       <h3 class="grade-info-name">{{ curLevel.name }}</h3>
-      <p class="grade-info-range">
-        <span>{{ curLevel.minScore }}</span>
-        <span>~</span>
-        <span>{{ curLevel.maxScore }}</span>
-      </p>
+      <div class="grade-info-range">
+        <p>分数范围</p>
+        <p>
+          <span>{{ curLevel.minScore }}</span>
+          <span>~</span>
+          <span>{{ curLevel.maxScore }}</span>
+        </p>
+      </div>
     </div>
     <!-- 打分信息 -->
-    <div class="action-mark-info" v-if="rights.markInfo">
-      <p>{{ curPaper.score }}</p>
+    <div class="action-grade-info action-mark-info" v-if="rights.markInfo">
+      <p class="grade-info-name" v-if="curPaper.score !== null">
+        {{ curPaper.score }}
+      </p>
+      <p class="grade-info-name grade-info-none" v-else>未打分</p>
     </div>
     <!-- 选择分数 / 档位 -->
     <div class="action-grade-list" v-if="rights.gradeList && IS_MARK_LEADER">
       <div
-        class="action-grade-list-item"
+        class="action-grade-item"
         v-for="(level, index) in levels"
         :key="index"
       >
-        <p @click="selectLevel(level)">{{ level.name }}</p>
-        <p>{{ level.range[0] }}~{{ level.range[1] }}</p>
+        <div class="action-grade-item-content" @click="selectLevel(level)">
+          <p>{{ level.name }}</p>
+          <p>{{ level.minScore }}~{{ level.maxScore }}</p>
+        </div>
       </div>
     </div>
-    <div
-      class="action-grade-list action-mark-list"
-      v-if="rights.gradeList && !IS_MARK_LEADER"
-    >
+    <div class="action-mark-list" v-if="rights.gradeList && !IS_MARK_LEADER">
       <div
-        class="action-grade-list-item"
+        class="action-mark-item"
         v-for="(score, index) in scores"
         :key="index"
       >
-        <p @click="selectScore(score)">{{ score }}</p>
+        <div class="action-mark-item-content">
+          <p @click="selectScore(score)">{{ score }}</p>
+        </div>
       </div>
     </div>
     <!-- <div class="action-grade-pass" v-if="rights.gradeList && IS_MARKER">
@@ -100,9 +131,9 @@
     <!-- 评卷记录 -->
     <div class="action-grade-history" v-if="rights.markHis">
       <h3>评卷记录</h3>
-      <div class="action-grade-list grade-history-list">
+      <div class="grade-history-list">
         <div
-          class="action-grade-list-item"
+          class="grade-history-item"
           v-for="(his, hindex) in gradingHistory"
           :key="hindex"
         >
@@ -237,8 +268,8 @@ export default {
       stepDict: {
         undo: "待评",
         done: "已评",
-        level: "改档",
-        levelScore: "改档打分"
+        shift: "改档",
+        shiftScore: "改档打分"
       },
       stepType: "",
       stepLabel: "",
@@ -271,16 +302,16 @@ export default {
       const paper = this.curPaper;
       if (paper.level) return "done";
       // TODO:
-      // if (paper.arbitrated) return "arbitrate";
-      // if (paper.rejected) return "reject";
-      // if (!paper.rejected && !paper.arbitrated && !paper.level) return "undo";
+      if (paper.arbitrated) return "arbitrate";
+      if (paper.rejected) return "reject";
+      if (!paper.rejected && !paper.arbitrated && !paper.level) return "undo";
       return;
     },
     rebuildRight() {
       this.stepType = this.getStepType();
       this.stepLabel = this.stepDict[this.stepType];
       this.rights = { ...initRights };
-      const roleRights = this.roleRight[this.userRole][this.step.type] || [];
+      const roleRights = this.roleRight[this.userRole][this.stepType] || [];
       roleRights.map(key => {
         this.rights[key] = true;
       });

+ 116 - 97
src/modules/quality/Quality.vue

@@ -1,106 +1,116 @@
 <template>
   <div class="quality home">
-    <div class="home-header">
-      <view-header> </view-header>
-    </div>
+    <view-header> </view-header>
 
     <div class="home-body">
       <div class="home-main">
-        <Form ref="FilterForm" label-position="left" inline>
-          <FormItem label="工作文件夹:">
-            <Select
-              v-model="filter.workId"
-              @on-change="workChange"
-              placeholder="请选择工作文件夹"
-              style="width: 150px"
-            >
-              <Option
-                v-for="(work, windex) in works"
-                :key="windex"
-                :value="work.id"
-                :label="work.name"
-              ></Option>
-            </Select>
-          </FormItem>
-          <FormItem label="科目:">
-            <Select
-              v-model="filter.subject"
-              @on-change="subjectChange"
-              placeholder="请选择科目"
-            >
-              <Option
-                v-for="subject in subjects"
-                :key="subject.id"
-                :value="subject.subject"
-                :label="subject.name"
-              ></Option>
-            </Select>
-          </FormItem>
-          <FormItem label="考区:">
-            <Select v-model="filter.areaCode" placeholder="请选择考区">
-              <Option
-                v-for="area in areas"
-                :key="area.id"
-                :value="area.areaCode"
-                :label="area.areaName"
-              ></Option>
-            </Select>
-          </FormItem>
-          <FormItem label="起始编号:">
-            <InputNumber
-              v-model="filter.startNumber"
-              :precision="0"
-              :min="1"
-              placeholder="请输入数字"
-              clearable
-            ></InputNumber>
-          </FormItem>
-          <FormItem label="终止编号:">
-            <InputNumber
-              v-model="filter.endNumber"
-              :min="filter.startNumber"
-              :precision="0"
-              placeholder="请输入数字"
-              clearable
-            ></InputNumber>
-          </FormItem>
-          <FormItem label="类型:">
-            <Select v-model="paperType" @on-change="typeChange" clearable>
-              <Option
-                v-for="(val, key) in CAFA_EXCEPTION_TYPE"
-                :key="key"
-                :value="key"
-                :label="val"
-              ></Option>
-            </Select>
-          </FormItem>
-          <FormItem label="姓名:">
-            <Input
-              v-model.trim="filter.name"
-              placeholder="请输入姓名"
-              clearable
-            ></Input>
-          </FormItem>
-          <FormItem label="排序:">
-            <Select v-model="filter.sort">
-              <Option
-                v-for="(val, key) in SORT_RULE_TYPE"
-                :key="key"
-                :value="key"
-                :label="val"
-              ></Option>
-            </Select>
-          </FormItem>
-          <FormItem>
-            <Button type="primary" icon="ios-search" @click="toPage(1)"
-              >查询</Button
-            >
-          </FormItem>
-        </Form>
+        <div class="part-box part-box-filter">
+          <Form ref="FilterForm" label-position="left" inline>
+            <FormItem>
+              <Select
+                v-model="filter.workId"
+                @on-change="workChange"
+                placeholder="工作文件夹"
+                style="width: 150px"
+              >
+                <Option
+                  v-for="(work, windex) in works"
+                  :key="windex"
+                  :value="work.id"
+                  :label="work.name"
+                ></Option>
+              </Select>
+            </FormItem>
+            <FormItem>
+              <Select
+                v-model="filter.subject"
+                @on-change="subjectChange"
+                placeholder="科目"
+              >
+                <Option
+                  v-for="subject in subjects"
+                  :key="subject.id"
+                  :value="subject.subject"
+                  :label="subject.name"
+                ></Option>
+              </Select>
+            </FormItem>
+            <FormItem>
+              <Select v-model="filter.areaCode" placeholder="考区">
+                <Option
+                  v-for="area in areas"
+                  :key="area.id"
+                  :value="area.areaCode"
+                  :label="area.areaName"
+                ></Option>
+              </Select>
+            </FormItem>
+            <FormItem>
+              <InputNumber
+                v-model="filter.startNumber"
+                :precision="0"
+                :min="1"
+                placeholder="输入起始编号"
+                clearable
+              ></InputNumber>
+            </FormItem>
+            <FormItem>
+              <InputNumber
+                v-model="filter.endNumber"
+                :min="filter.startNumber"
+                :precision="0"
+                placeholder="输入终止编号"
+                clearable
+              ></InputNumber>
+            </FormItem>
+            <FormItem>
+              <Select
+                v-model="paperType"
+                @on-change="typeChange"
+                placeholder="类型"
+                clearable
+              >
+                <Option
+                  v-for="(val, key) in CAFA_EXCEPTION_TYPE"
+                  :key="key"
+                  :value="key"
+                  :label="val"
+                ></Option>
+              </Select>
+            </FormItem>
+            <FormItem>
+              <Input
+                v-model.trim="filter.name"
+                placeholder="输入姓名"
+                clearable
+              ></Input>
+            </FormItem>
+            <FormItem>
+              <Select v-model="filter.sort" placeholder="排序方式">
+                <Option
+                  v-for="(val, key) in SORT_RULE_TYPE"
+                  :key="key"
+                  :value="key"
+                  :label="val"
+                ></Option>
+              </Select>
+            </FormItem>
+            <FormItem>
+              <Button
+                class="btn-form-search"
+                size="small"
+                type="primary"
+                @click="toPage(1)"
+                >查询</Button
+              >
+            </FormItem>
+          </Form>
+        </div>
+
         <image-action-list
           :data="papers"
-          :column-number="6"
-          :actions="['rotate', 'absent']"
+          :column-number="4"
+          :actions="imageListActions"
           ref="ImageActionList"
         ></image-action-list>
 
@@ -114,6 +124,8 @@
             @on-change="toPage"
           ></Page>
         </div>
+
+        <view-footer></view-footer>
       </div>
     </div>
   </div>
@@ -141,10 +153,11 @@ export default {
         sort: "1"
       },
       paperType: "0",
+      selectPaperType: "0",
       SORT_RULE_TYPE,
       CAFA_EXCEPTION_TYPE,
       current: 1,
-      size: 12,
+      size: 8,
       total: 0,
       papers: [],
       curPaper: {},
@@ -153,6 +166,11 @@ export default {
       areas: []
     };
   },
+  computed: {
+    imageListActions() {
+      return this.selectPaperType === "1" ? [] : ["rotate", "absent"];
+    }
+  },
   mounted() {
     this.initData();
   },
@@ -201,6 +219,7 @@ export default {
         };
       });
       this.total = data.totalCount;
+      this.selectPaperType = this.paperType;
     },
     toPage(page) {
       this.current = page;

+ 1 - 1
src/routers/mark.js

@@ -36,7 +36,7 @@ const markRoutes = [
   },
   {
     path: "exam-paper-view",
-    name: "ExamPaperView",
+    name: "MarkExamPaperView",
     component: ExamPaperView,
     meta: {
       title: "试卷查看"