Browse Source

feat: 首页调整

zhangjie 10 months ago
parent
commit
0fb3c8331b

BIN
src/assets/images/bg-done-task.png


BIN
src/assets/images/bg-wait-task.png


BIN
src/assets/images/icon-done-task.png


BIN
src/assets/images/icon-guide.png


BIN
src/assets/images/icon-wait-task.png


+ 5 - 0
src/assets/styles/element-ui-costom.scss

@@ -534,6 +534,11 @@
       border: 1px solid #e1e3eb;
     }
   }
+  &__editor.el-input {
+    .el-input__inner {
+      height: 32px;
+    }
+  }
 }
 // el-message-box
 .el-message-box {

+ 129 - 217
src/assets/styles/home.scss

@@ -444,19 +444,19 @@
 
 // home-page
 .home-page {
-  width: 1200px;
-  margin: 0 auto;
+  margin: 0 -10px;
 
   .hp-top {
     display: flex;
     justify-content: space-between;
     align-items: stretch;
+    margin-bottom: 20px;
 
     &-left {
       flex-grow: 0;
       flex-shrink: 0;
-      width: 340px;
-      margin-right: 20px;
+      width: 152px;
+      margin-right: 16px;
     }
 
     &-right {
@@ -465,172 +465,171 @@
   }
 
   .tab-summary {
-    margin-bottom: 10px;
-    font-size: 0;
-
     &-item {
       position: relative;
-      display: inline-block;
-      width: 100%;
-      vertical-align: top;
-      margin-right: 10px;
-      border-radius: 12px;
-      padding: 16px 20px 16px;
+      height: 124px;
+      padding: 20px;
       color: #fff;
-      text-align: right;
-      background: #3a5ae5;
-
-      &.item-done {
-        background: #9877ff;
-      }
+      background-size: 100% 100%;
 
       &.item-wait {
-        cursor: pointer;
-        &:hover {
-          opacity: 0.8;
-        }
+        background-image: url(../images/bg-wait-task.png);
+        margin-bottom: 10px;
       }
-    }
-
-    &-rp {
-      display: block;
-      position: absolute;
-      width: 10px;
-      height: 10px;
-      background: #fe646a;
-      border: 2px solid #eff0f5;
-      top: -2px;
-      left: -2px;
-      border-radius: 50%;
-      z-index: 9;
-    }
 
-    &-icon {
-      display: block;
-      position: absolute;
-      top: 16px;
-      left: 16px;
-      z-index: auto;
+      &.item-done {
+        background-image: url(../images/bg-done-task.png);
+      }
     }
 
     &-title {
       font-size: 12px;
-      margin-bottom: 7px;
+      margin-bottom: 8px;
       opacity: 0.6;
+      height: 22px;
+      font-weight: 400;
+      font-size: 14px;
+      line-height: 22px;
+    }
+
+    &-content {
+      line-height: 36px;
     }
 
     &-cont {
-      height: 38px;
-      font-size: 32px;
-      font-weight: bold;
-      line-height: 38px;
+      display: inline-block;
+      vertical-align: middle;
+      font-weight: 500;
+      font-size: 28px;
+      margin-left: 8px;
+    }
+  }
+
+  .hp-task {
+    .tab-btns {
+      margin-bottom: 8px;
+    }
+    .part-box {
+      margin-bottom: 0;
     }
   }
 
   .tab-box {
-    border-radius: 12px;
+    border-radius: 8px;
     background-color: #fff;
-    margin-bottom: 20px;
     min-height: 100px;
     padding: 20px;
 
     &-title {
-      font-weight: bold;
+      height: 24px;
+      font-weight: 500;
       font-size: 16px;
-      line-height: 1;
-      color: #1f222f;
-      margin-bottom: 10px;
+      color: #262626;
+      line-height: 24px;
+      padding-left: 32px;
+
+      background-image: url(../images/icon-guide.png);
+      background-size: auto 100%;
+      background-repeat: no-repeat;
     }
   }
 
-  .shortcut-list {
-    font-size: 0;
-    margin-top: 20px;
+  .guide-map {
+    padding: 20px 0 0;
+    overflow-y: auto;
+    white-space: nowrap;
+    text-align: center;
   }
-
-  .shortcut-item {
-    display: inline-block;
-    vertical-align: top;
-    padding: 0 18px;
-    width: 180px;
-    border-radius: 8px;
+  .guide-box {
+    padding: 12px;
+    background: linear-gradient(180deg, #f8f9fb 0%, #eff0f5 100%);
+    border-radius: 6px;
     border: 1px solid #eff0f5;
-    height: 52px;
-    line-height: 50px;
-    margin: 10px;
-    text-align: left;
-    cursor: pointer;
 
-    &:hover {
-      opacity: 0.7;
+    .guide-title {
+      height: 22px;
+      font-weight: 500;
+      font-size: 14px;
+      color: #262626;
+      line-height: 22px;
+      margin-bottom: 6px;
     }
 
-    > * {
-      display: inline-block;
-      vertical-align: middle;
+    .guide-desc {
+      height: 20px;
+      font-weight: 400;
+      font-size: 12px;
+      color: #797a83;
+      line-height: 20px;
+      margin-bottom: 2px;
     }
-  }
 
-  .icon {
-    margin-right: 18px;
-  }
+    .guide-menus {
+      border-radius: 4px;
+      background-color: #fff;
+      overflow: hidden;
 
-  .shortcut-name {
-    font-size: 14px;
-    font-weight: 500;
-    color: #434656;
-  }
+      > li {
+        list-style: none;
+        padding: 6px 24px 6px 12px;
+        height: 34px;
+        font-weight: 400;
+        font-size: 14px;
+        color: #262626;
+        line-height: 22px;
+        position: relative;
+
+        &:not(:last-child) {
+          border-bottom: 1px solid #f2f2f1;
+        }
 
-  .tab-task {
-    min-height: 190px;
-  }
-  .tab-task-item {
-    display: flex;
-    justify-content: space-between;
-    align-items: center;
-    padding: 10px 0;
+        &::after {
+          content: "\e791";
+          font-family: element-icons !important;
+          font-style: normal;
+          font-weight: 400;
+          font-variant: normal;
+          text-transform: none;
+          line-height: 1;
+          display: block;
+          position: absolute;
+          top: 50%;
+          transform: translateY(-50%);
+          right: 8px;
+          color: #8c8c8c;
+          font-size: 12px;
+        }
 
-    &:not(:last-child) {
-      border-bottom: 1px solid #eff0f5;
-    }
+        &:hover {
+          color: $--color-primary;
+          cursor: pointer;
 
-    &-cont {
-      flex-grow: 2;
-      margin: 0 10px;
-      white-space: nowrap;
-      text-overflow: ellipsis;
-      overflow: hidden;
-      line-height: 24px;
-      cursor: pointer;
+          &::after {
+            color: $--color-primary;
+          }
+        }
 
-      &:hover {
-        opacity: 0.7;
+        &.is-disabled {
+          color: #8c8c8c;
+          cursor: not-allowed;
+          &::after {
+            color: #8c8c8c;
+          }
+        }
       }
-    }
 
-    &-type {
-      flex-shrink: 0;
-      flex-grow: 0;
-      font-size: 12px;
-      color: rgba(58, 90, 229, 1);
-      border-radius: 6px;
-      text-align: center;
-      width: 36px;
-      height: 24px;
-      line-height: 24px;
-      background: rgba(58, 90, 229, 0.1);
+      + .guide-desc {
+        margin-top: 6px;
+      }
     }
   }
-
-  .guide-map {
-    padding: 40px 0;
-    text-align: center;
-  }
-  .guide-item {
+  .guide-group {
     display: inline-block;
     vertical-align: middle;
     position: relative;
-    margin: 0 10px;
+    margin: 0 14px;
+    width: 200px;
+    text-align: left;
 
     &:not(:last-child):after {
       content: "";
@@ -646,103 +645,16 @@
       right: -20px;
       margin-top: -5px;
     }
-  }
 
-  .guide-spin {
-    width: 136px;
-    height: 136px;
-    background: #afb3c7;
-    border-radius: 68px;
-    display: table-cell;
-    vertical-align: middle;
-    text-align: center;
-    color: #1f222f;
-    font-size: 14px;
-    font-weight: bold;
-
-    &.spin-large {
-      width: 192px;
-      height: 192px;
-      border-radius: 96px;
-    }
-
-    &.spin-small {
-      width: 108px;
-      height: 108px;
-      border-radius: 54px;
-    }
-
-    &.spin-light {
-      background: #e1e3eb;
+    .guide-box:not(:last-child) {
+      margin-bottom: 16px;
     }
-  }
-  .island-item {
-    width: 282px;
-    background: #afb3c7;
-    border-radius: 20px;
-    padding: 30px;
-    border: 2px solid #fff;
-    position: relative;
-  }
-  .island-bottom {
-    background: #e1e3eb;
-    &::after {
-      content: "";
-      display: block;
-      position: absolute;
-      width: 40px;
-      border-width: 10px 20px;
-      border-style: solid;
-      border-color: transparent #e1e3eb transparent transparent;
-      top: -10px;
-      right: 50%;
-      z-index: 9;
+    &:first-child {
+      margin-left: 0;
     }
-  }
-  .island-top {
-    &::after {
-      content: "";
-      display: block;
-      position: absolute;
-      width: 40px;
-      border-width: 10px 20px;
-      border-style: solid;
-      border-color: transparent transparent transparent #afb3c7;
-      bottom: -10px;
-      left: 50%;
-      z-index: 9;
-    }
-
-    .island-btn {
-      width: 100%;
-    }
-  }
-  .island-title {
-    font-size: 14px;
-    font-weight: bold;
-    color: #1f222f;
-    line-height: 21px;
-    margin-bottom: 20px;
-    text-align: left;
-  }
-  .island-cont {
-    font-size: 0;
-  }
-  .island-btn {
-    display: inline-block;
-    vertical-align: top;
-    height: 40px;
-    background: #ffffff;
-    border-radius: 6px;
-    font-weight: 500;
-    color: #434656;
-    padding: 14px 20px;
-    font-size: 12px;
-    line-height: 1;
-    text-align: center;
-
-    & + .island-btn {
-      margin-left: 10px;
+    &:last-child {
+      margin-right: 0;
+      width: 220px;
     }
   }
 }

+ 159 - 159
src/assets/styles/icons.scss

@@ -1,159 +1,159 @@
-// icon
-.icon {
-  display: inline-block;
-  vertical-align: middle;
-  width: 16px;
-  height: 16px;
-  background-repeat: no-repeat;
-  background-size: 100% 100%;
-
-  // home
-  &-location {
-    background-image: url(../images/icon-location.png);
-    width: 10px;
-    height: 10px;
-  }
-  // navs
-  &-exam {
-    background-image: url(../images/icon-exam.png);
-  }
-  &-report {
-    background-image: url(../images/icon-report.png);
-  }
-  &-base {
-    width: 14px;
-    background-image: url(../images/icon-base.png);
-  }
-  &-customer {
-    background-image: url(../images/icon-customer.png);
-  }
-  &-workspace {
-    background-image: url(../images/icon-workspace.png);
-  }
-  &-book {
-    background-image: url(../images/icon-book.png);
-  }
-
-  &-account {
-    background-image: url(../images/icon-account.png);
-  }
-  &-logout {
-    background-image: url(../images/icon-logout.png);
-  }
-
-  // login
-  &-phone {
-    background-image: url(../images/icon-phone.png);
-    width: 14px;
-    height: 16px;
-  }
-  &-password {
-    background-image: url(../images/icon-password.png);
-    width: 14px;
-    height: 14px;
-  }
-  &-checkcode {
-    background-image: url(../images/icon-checkcode.png);
-    width: 14px;
-    height: 16px;
-  }
-  // other
-  &-error {
-    background-image: url(../images/icon-error.png);
-    width: 16px;
-    height: 16px;
-  }
-  &-search {
-    background-image: url(../images/icon-search.png);
-    width: 14px;
-    height: 14px;
-  }
-  &-download {
-    background-image: url(../images/icon-download.png);
-    width: 14px;
-    height: 14px;
-  }
-  &-close {
-    background-image: url(../images/icon-close.png);
-  }
-  &-close-act {
-    background-image: url(../images/icon-close-act.png);
-  }
-  &-files {
-    background-image: url(../images/icon-files.png);
-    width: 14px;
-    height: 12px;
-  }
-  &-files-act {
-    background-image: url(../images/icon-files-act.png);
-    width: 14px;
-    height: 12px;
-  }
-  // home-page
-
-  &-wait-task {
-    background-image: url(../images/icon-wait-task.png);
-    width: 16px;
-    height: 19px;
-  }
-  &-done-task {
-    background-image: url(../images/icon-done-task.png);
-    width: 16px;
-    height: 19px;
-  }
-  &-exam-task {
-    background-image: url(../images/icon-exam-task.png);
-    width: 16px;
-    height: 16px;
-  }
-  &-marker-login {
-    background-image: url(../images/icon-marker-login.png);
-    width: 18px;
-    height: 16px;
-  }
-  &-marker-leader-login {
-    background-image: url(../images/icon-marker-leader-login.png);
-    width: 18px;
-    height: 16px;
-  }
-  &-print-plan {
-    background-image: url(../images/icon-print-plan.png);
-    width: 16px;
-    height: 16px;
-  }
-  &-report-teacher {
-    background-image: url(../images/icon-report-teacher.png);
-    width: 16px;
-    height: 17px;
-  }
-  &-report-office-teacher {
-    background-image: url(../images/icon-report-office-teacher.png);
-    width: 18px;
-    height: 16px;
-  }
-  &-report-president {
-    background-image: url(../images/icon-report-president.png);
-    width: 18px;
-    height: 16px;
-  }
-  &-score-archive {
-    background-image: url(../images/icon-score-archive.png);
-    width: 16px;
-    height: 18px;
-  }
-  &-task-apply {
-    background-image: url(../images/icon-task-apply.png);
-    width: 18px;
-    height: 16px;
-  }
-  &-task-paper {
-    background-image: url(../images/icon-task-paper.png);
-    width: 18px;
-    height: 16px;
-  }
-  &-task-review {
-    background-image: url(../images/icon-task-review.png);
-    width: 18px;
-    height: 16px;
-  }
-}
+// icon
+.icon {
+  display: inline-block;
+  vertical-align: middle;
+  width: 16px;
+  height: 16px;
+  background-repeat: no-repeat;
+  background-size: 100% 100%;
+
+  // home
+  &-location {
+    background-image: url(../images/icon-location.png);
+    width: 10px;
+    height: 10px;
+  }
+  // navs
+  &-exam {
+    background-image: url(../images/icon-exam.png);
+  }
+  &-report {
+    background-image: url(../images/icon-report.png);
+  }
+  &-base {
+    width: 14px;
+    background-image: url(../images/icon-base.png);
+  }
+  &-customer {
+    background-image: url(../images/icon-customer.png);
+  }
+  &-workspace {
+    background-image: url(../images/icon-workspace.png);
+  }
+  &-book {
+    background-image: url(../images/icon-book.png);
+  }
+
+  &-account {
+    background-image: url(../images/icon-account.png);
+  }
+  &-logout {
+    background-image: url(../images/icon-logout.png);
+  }
+
+  // login
+  &-phone {
+    background-image: url(../images/icon-phone.png);
+    width: 14px;
+    height: 16px;
+  }
+  &-password {
+    background-image: url(../images/icon-password.png);
+    width: 14px;
+    height: 14px;
+  }
+  &-checkcode {
+    background-image: url(../images/icon-checkcode.png);
+    width: 14px;
+    height: 16px;
+  }
+  // other
+  &-error {
+    background-image: url(../images/icon-error.png);
+    width: 16px;
+    height: 16px;
+  }
+  &-search {
+    background-image: url(../images/icon-search.png);
+    width: 14px;
+    height: 14px;
+  }
+  &-download {
+    background-image: url(../images/icon-download.png);
+    width: 14px;
+    height: 14px;
+  }
+  &-close {
+    background-image: url(../images/icon-close.png);
+  }
+  &-close-act {
+    background-image: url(../images/icon-close-act.png);
+  }
+  &-files {
+    background-image: url(../images/icon-files.png);
+    width: 14px;
+    height: 12px;
+  }
+  &-files-act {
+    background-image: url(../images/icon-files-act.png);
+    width: 14px;
+    height: 12px;
+  }
+  // home-page
+
+  &-wait-task {
+    background-image: url(../images/icon-wait-task.png);
+    width: 24px;
+    height: 24px;
+  }
+  &-done-task {
+    background-image: url(../images/icon-done-task.png);
+    width: 24px;
+    height: 24px;
+  }
+  &-exam-task {
+    background-image: url(../images/icon-exam-task.png);
+    width: 16px;
+    height: 16px;
+  }
+  &-marker-login {
+    background-image: url(../images/icon-marker-login.png);
+    width: 18px;
+    height: 16px;
+  }
+  &-marker-leader-login {
+    background-image: url(../images/icon-marker-leader-login.png);
+    width: 18px;
+    height: 16px;
+  }
+  &-print-plan {
+    background-image: url(../images/icon-print-plan.png);
+    width: 16px;
+    height: 16px;
+  }
+  &-report-teacher {
+    background-image: url(../images/icon-report-teacher.png);
+    width: 16px;
+    height: 17px;
+  }
+  &-report-office-teacher {
+    background-image: url(../images/icon-report-office-teacher.png);
+    width: 18px;
+    height: 16px;
+  }
+  &-report-president {
+    background-image: url(../images/icon-report-president.png);
+    width: 18px;
+    height: 16px;
+  }
+  &-score-archive {
+    background-image: url(../images/icon-score-archive.png);
+    width: 16px;
+    height: 18px;
+  }
+  &-task-apply {
+    background-image: url(../images/icon-task-apply.png);
+    width: 18px;
+    height: 16px;
+  }
+  &-task-paper {
+    background-image: url(../images/icon-task-paper.png);
+    width: 18px;
+    height: 16px;
+  }
+  &-task-review {
+    background-image: url(../images/icon-task-review.png);
+    width: 18px;
+    height: 16px;
+  }
+}

+ 0 - 18
src/constants/staticMenu.js

@@ -8,22 +8,4 @@ export default [
     sequence: 1,
     enable: true,
   },
-  {
-    id: "9999011",
-    name: "我的工作台",
-    url: "work",
-    type: "MENU",
-    parentId: "999901",
-    sequence: 1,
-    enable: true,
-  },
-  {
-    id: "99990111",
-    name: "待办任务",
-    url: "WaitTask",
-    type: "MENU",
-    parentId: "9999011",
-    sequence: 1,
-    enable: true,
-  },
 ];

+ 4 - 1
src/modules/exam/api.js

@@ -11,7 +11,6 @@ export const questionTeatherQuery = (datas) => {
 };
 // 机构查询
 export const teachingRoomList = (datas) => {
-  // TODO:
   return $postParam("/api/admin/exam/task/room_query", datas);
 };
 
@@ -54,6 +53,10 @@ export const analysisTaskCount = () => {
 export const auditedTaskCount = () => {
   return $postParam("/api/admin/exam/task/review_list_audited_count", {});
 };
+// 评卷待办
+export const markTaskCount = () => {
+  return $postParam("/api/admin/mark/task/ready_count", {});
+};
 
 // exam-task-manage
 export const examTaskListPage = (datas) => {

+ 8 - 9
src/modules/exam/components/WaitTaskAnalysis.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="wait-task-analysis">
     <div class="part-box part-box-pad">
-      <el-table ref="TableList" :data="dataList">
+      <el-table ref="TableList" :data="dataList" height="127">
         <el-table-column
           type="index"
           label="序号"
@@ -36,13 +36,12 @@
       <div class="part-page">
         <el-pagination
           background
-          layout="total, sizes, prev, pager, next, jumper"
+          layout="total, prev, pager, next, jumper"
           :pager-count="5"
           :current-page="current"
           :total="total"
           :page-size="size"
           @current-change="toPage"
-          @size-change="pageSizeChange"
         >
         </el-pagination>
       </div>
@@ -52,7 +51,7 @@
     <modify-base-config
       ref="ModifyBaseConfig"
       :instance="curTask"
-      @closed="taskModified"
+      @closed="updateList"
     ></modify-base-config>
   </div>
 </template>
@@ -68,7 +67,7 @@ export default {
   data() {
     return {
       current: 1,
-      size: this.GLOBAL.pageSize,
+      size: 2,
       total: 0,
       dataList: [],
       curTask: {},
@@ -80,6 +79,10 @@ export default {
   methods: {
     ...mapMutations("exam", ["updateWaitTask"]),
     ...mapActions("exam", ["updateWaitTaskCount"]),
+    updateList() {
+      this.getList();
+      this.updateWaitTaskCount();
+    },
     async initData() {
       await this.getList();
 
@@ -109,10 +112,6 @@ export default {
       this.curTask = { ...task };
       this.$refs.ModifyBaseConfig.open();
     },
-    taskModified() {
-      this.getList();
-      this.updateWaitTaskCount();
-    },
   },
 };
 </script>

+ 8 - 9
src/modules/exam/components/WaitTaskFlow.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="wait-task-flow">
     <div class="part-box part-box-pad">
-      <el-table ref="TableList" :data="dataList">
+      <el-table ref="TableList" :data="dataList" height="127">
         <el-table-column
           type="index"
           label="序号"
@@ -49,13 +49,12 @@
       <div class="part-page">
         <el-pagination
           background
-          layout="total, sizes, prev, pager, next, jumper"
+          layout="total, prev, pager, next, jumper"
           :pager-count="5"
           :current-page="current"
           :total="total"
           :page-size="size"
           @current-change="toPage"
-          @size-change="pageSizeChange"
         >
         </el-pagination>
       </div>
@@ -65,7 +64,7 @@
     <modify-task-apply
       ref="ModifyTaskApply"
       :row-data="curTask"
-      @modified="taskModified"
+      @modified="updateList"
     ></modify-task-apply>
   </div>
 </template>
@@ -81,7 +80,7 @@ export default {
   data() {
     return {
       current: 1,
-      size: this.GLOBAL.pageSize,
+      size: 2,
       total: 0,
       dataList: [],
       curTask: {},
@@ -93,6 +92,10 @@ export default {
   methods: {
     ...mapMutations("exam", ["updateWaitTask"]),
     ...mapActions("exam", ["updateWaitTaskCount"]),
+    updateList() {
+      this.getList();
+      this.updateWaitTaskCount();
+    },
     async initData() {
       await this.getList();
 
@@ -122,10 +125,6 @@ export default {
       this.curTask = { ...task, source: "REVIEW" };
       this.$refs.ModifyTaskApply.open();
     },
-    taskModified() {
-      this.getList();
-      this.updateWaitTaskCount();
-    },
   },
 };
 </script>

+ 128 - 0
src/modules/exam/components/WaitTaskMark.vue

@@ -0,0 +1,128 @@
+<template>
+  <div class="wait-task-mark">
+    <div class="part-box part-box-pad">
+      <el-table ref="TableList" :data="dataList" height="127">
+        <el-table-column
+          type="index"
+          label="序号"
+          width="70"
+          :index="indexMethod"
+        ></el-table-column>
+        <el-table-column prop="courseName" label="课程(代码)" min-width="260">
+          <template slot-scope="scope">
+            {{ scope.row.courseName }}({{ scope.row.courseCode }})
+          </template>
+        </el-table-column>
+        <el-table-column
+          prop="openCollege"
+          label="开课学院"
+          min-width="160"
+        ></el-table-column>
+        <el-table-column
+          prop="paperNumber"
+          label="试卷编号"
+          width="160"
+        ></el-table-column>
+        <el-table-column
+          prop="groupQuestions"
+          label="评阅题目"
+          min-width="200"
+        ></el-table-column>
+        <el-table-column
+          prop="markedCount"
+          label="已评"
+          width="80"
+        ></el-table-column>
+        <el-table-column
+          prop="leftCount"
+          label="待评"
+          width="80"
+        ></el-table-column>
+        <el-table-column prop="percent" label="评卷进度" width="100">
+          <span slot-scope="scope"> {{ scope.row.percent || 0 }}%</span>
+        </el-table-column>
+        <el-table-column
+          class-name="action-column"
+          label="操作"
+          width="140"
+          fixed="right"
+        >
+          <template slot-scope="scope">
+            <el-button
+              class="btn-primary"
+              type="text"
+              @click="toMark(scope.row)"
+              >点击评卷</el-button
+            >
+          </template>
+        </el-table-column>
+      </el-table>
+      <div class="part-page">
+        <el-pagination
+          background
+          layout="total, prev, pager, next, jumper"
+          :pager-count="5"
+          :current-page="current"
+          :total="total"
+          :page-size="size"
+          @current-change="toPage"
+        >
+        </el-pagination>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import { mapActions, mapMutations } from "vuex";
+import markMinxin from "@/modules/mark/markMinxin";
+import { markTaskListPage } from "@/modules/mark/api";
+
+export default {
+  name: "wait-task-mark",
+  mixins: [markMinxin],
+  data() {
+    return {
+      current: 1,
+      size: 2,
+      total: 0,
+      dataList: [],
+      curTask: {},
+    };
+  },
+  mounted() {
+    window.addEventListener("focus", this.updateList);
+  },
+  beforeDestroy() {
+    window.removeEventListener("focus", this.updateList);
+  },
+  methods: {
+    ...mapMutations("exam", ["updateWaitTask"]),
+    ...mapActions("exam", ["updateWaitTaskCount"]),
+    updateList() {
+      this.getList();
+      this.updateWaitTaskCount();
+    },
+    async getList() {
+      const datas = {
+        pageNumber: this.current,
+        pageSize: this.size,
+      };
+      const data = await markTaskListPage(datas);
+      this.dataList = data.records;
+      this.total = data.total;
+      this.updateWaitTask({ mark: this.total });
+    },
+    toPage(page) {
+      this.current = page;
+      this.getList();
+    },
+    search() {
+      this.toPage(1);
+    },
+    toMark(row) {
+      this.toMarkMark(row);
+    },
+  },
+};
+</script>

+ 9 - 4
src/modules/exam/components/WaitTaskStmms.vue

@@ -1,7 +1,13 @@
 <template>
   <div class="wait-task-stmms">
     <div class="part-box part-box-pad">
-      <el-table ref="TableList" :data="dataList">
+      <el-table ref="TableList" :data="dataList" height="127">
+        <el-table-column
+          type="index"
+          label="序号"
+          width="70"
+          :index="indexMethod"
+        ></el-table-column>
         <el-table-column prop="courseName" label="课程(代码)" min-width="200">
           <span slot-scope="scope">
             {{ scope.row.courseName }}({{ scope.row.courseCode }})
@@ -37,13 +43,12 @@
       <div class="part-page">
         <el-pagination
           background
-          layout="total, sizes, prev, pager, next, jumper"
+          layout="total, prev, pager, next, jumper"
           :pager-count="5"
           :current-page="current"
           :total="total"
           :page-size="size"
           @current-change="toPage"
-          @size-change="pageSizeChange"
         >
         </el-pagination>
       </div>
@@ -70,7 +75,7 @@ export default {
   data() {
     return {
       current: 1,
-      size: this.GLOBAL.pageSize,
+      size: 2,
       total: 0,
       dataList: [],
       curTask: {},

+ 8 - 2
src/modules/exam/store.js

@@ -2,6 +2,7 @@ import {
   waitExamTaskCount,
   stmmsTaskCount,
   analysisTaskCount,
+  // markTaskCount,
   savePreviewLog,
 } from "./api";
 import { calcSum } from "@/plugins/utils";
@@ -12,6 +13,7 @@ const state = {
     flow: 0,
     stmms: 0,
     analysis: 0,
+    mark: 0,
   },
   waitTypes: [],
   // createExamAndPrintTask
@@ -92,15 +94,19 @@ const actions = {
         type: "analysis",
         func: analysisTaskCount,
       },
+      // {
+      //   type: "mark",
+      //   func: markTaskCount,
+      // },
     ];
-    let countAll = task
+    const countAll = task
       .filter((item) => state.waitTypes.includes(item.type))
       .map((item) => item.func());
     const counts = await Promise.all(countAll).catch(() => {});
 
     if (!counts) return;
 
-    let waitTask = {};
+    const waitTask = {};
     counts.forEach((count, index) => {
       waitTask[task[index].type] = count;
     });

+ 11 - 6
src/modules/exam/views/WaitTask.vue

@@ -17,20 +17,25 @@
 </template>
 
 <script>
-import WaitTaskFlow from "../components/WaitTaskFlow";
-import WaitTaskStmms from "../components/WaitTaskStmms";
-import WaitTaskAnalysis from "../components/WaitTaskAnalysis";
+import WaitTaskFlow from "../components/WaitTaskFlow.vue";
+import WaitTaskStmms from "../components/WaitTaskStmms.vue";
+import WaitTaskAnalysis from "../components/WaitTaskAnalysis.vue";
+import WaitTaskMark from "../components/WaitTaskMark.vue";
 import { mapState } from "vuex";
 
 const tabs = [
   {
-    name: "流程待办",
+    name: "电子交卷待办",
     val: "flow",
   },
   {
-    name: "阅卷待办",
+    name: "评卷任务设置待办",
     val: "stmms",
   },
+  {
+    name: "评卷待办",
+    val: "mark",
+  },
   {
     name: "教研待办",
     val: "analysis",
@@ -39,7 +44,7 @@ const tabs = [
 
 export default {
   name: "wait-task",
-  components: { WaitTaskFlow, WaitTaskStmms, WaitTaskAnalysis },
+  components: { WaitTaskFlow, WaitTaskStmms, WaitTaskAnalysis, WaitTaskMark },
   data() {
     return {
       curTab: "flow",

+ 3 - 0
src/views/Home.vue

@@ -351,6 +351,9 @@ export default {
         analysis: () => {
           return this.checkPrivilege("link", "window", "DataInitManage");
         },
+        mark: () => {
+          return this.checkPrivilege("button", "select", "MarkEntrance");
+        },
       };
       const waitTypes = Object.keys(filterFunc).filter((k) => filterFunc[k]());
       this.$store.commit("exam/setWaitTypes", waitTypes);

+ 106 - 156
src/views/HomePage.vue

@@ -1,93 +1,121 @@
 <template>
   <div class="home-page">
     <div class="hp-top">
-      <div v-if="hasWaitTaskPrivilege" class="hp-top-left">
-        <el-row class="tab-summary" type="flex" :gutter="10">
-          <el-col :span="12">
-            <div class="tab-summary-item item-wait" @click="toWaitTask">
-              <i class="tab-summary-icon icon icon-wait-task"></i>
-              <h4 class="tab-summary-title">待办任务</h4>
-              <p class="tab-summary-cont">{{ summary.waitTaskCount }}</p>
-            </div>
-          </el-col>
-          <el-col :span="12">
-            <div class="tab-summary-item item-done">
-              <i class="tab-summary-icon icon icon-done-task"></i>
-              <h4 class="tab-summary-title">已办任务</h4>
-              <p class="tab-summary-cont">{{ summary.doneTaskCount }}</p>
-            </div>
-          </el-col>
-        </el-row>
-        <div class="tab-box tab-task">
-          <h2 class="tab-box-title">待办任务</h2>
-          <div class="tab-box-body tab-task-list">
-            <div
-              v-for="item in waitTaskList"
-              :key="item.id"
-              class="tab-task-item"
-            >
-              <div :class="['tab-task-item-type', `type-${item.type}`]">
-                {{ typeNames[item.type] }}
-              </div>
-              <div
-                class="tab-task-item-cont"
-                :title="item.content"
-                @click="toDo(item)"
-              >
-                {{ item.content }}
-              </div>
-            </div>
+      <div class="hp-top-left">
+        <div class="tab-summary-item item-wait">
+          <h4 class="tab-summary-title">待办任务</h4>
+          <div class="tab-summary-content">
+            <i class="icon icon-wait-task"></i>
+            <span class="tab-summary-cont">{{ summary.waitTaskCount }}</span>
           </div>
         </div>
-      </div>
-      <div class="tab-box tab-shortcut hp-top-right">
-        <h2 class="tab-box-title">快捷入口</h2>
-        <div class="tab-box-body shortcut-list">
-          <div
-            v-for="(item, ind) in shortcutList"
-            :key="ind"
-            class="shortcut-item"
-            @click="toMenu(item)"
-          >
-            <i :class="['icon', item.icon]"></i>
-            <span class="shortcut-name">{{ item.name }}</span>
+
+        <div class="tab-summary-item item-done">
+          <h4 class="tab-summary-title">已办任务</h4>
+          <div class="tab-summary-content">
+            <i class="icon icon-done-task"></i>
+            <span class="tab-summary-cont">{{ summary.doneTaskCount }}</span>
           </div>
         </div>
       </div>
+      <div class="hp-top-right hp-task">
+        <wait-task></wait-task>
+      </div>
     </div>
 
     <div class="tab-box tab-guide">
-      <h2 class="tab-box-title">业务引导</h2>
+      <h2 class="tab-box-title">业务引导</h2>
       <div class="tab-box-body guide-map">
-        <div class="guide-item">
-          <div class="guide-spin">命题组卷</div>
-        </div>
-        <div class="guide-item">
-          <div class="guide-spin spin-large spin-light">试卷题卡线上审核</div>
+        <!-- 命题组卷 -->
+        <div class="guide-group">
+          <div class="guide-box">
+            <h4 class="guide-title">命题组卷</h4>
+            <ul class="guide-menus">
+              <li class="guide-menu is-disabled">试题录入</li>
+              <li class="guide-menu">组卷</li>
+              <li class="guide-menu">生成试卷</li>
+            </ul>
+          </div>
         </div>
-        <div class="guide-item guide-island">
-          <div class="island-item island-top">
-            <h4 class="island-title">线上考试</h4>
-            <div class="island-cont">
-              <div class="island-btn">AI防作弊考试 / 集中无纸化机考</div>
-            </div>
+        <!-- 电子交卷 -->
+        <div class="guide-group">
+          <div class="guide-box">
+            <h4 class="guide-title">电子交卷</h4>
+            <p class="guide-desc">提交命题任务</p>
+            <ul class="guide-menus">
+              <li class="guide-menu">选择/上传试卷</li>
+              <li class="guide-menu">选择通卡/设计答题卡</li>
+              <li class="guide-menu">选择审核人提交</li>
+            </ul>
           </div>
-          <div class="island-item island-bottom">
-            <h4 class="island-title">线下考试</h4>
-            <div class="island-cont">
-              <div class="island-btn">印刷+智能分拣</div>
-              <div class="island-btn">高速扫描</div>
-            </div>
+        </div>
+        <!-- 印刷&扫描 -->
+        <div class="guide-group">
+          <div class="guide-box">
+            <h4 class="guide-title">印刷&扫描</h4>
+            <ul class="guide-menus">
+              <li class="guide-menu">印刷</li>
+              <li class="guide-menu">答题卡扫描</li>
+            </ul>
           </div>
         </div>
-        <div class="guide-item">
-          <div class="guide-spin spin-small">阅卷</div>
+
+        <!-- 评卷管理 -->
+        <div class="guide-group">
+          <div class="guide-box">
+            <h4 class="guide-title">评卷管理</h4>
+            <ul class="guide-menus">
+              <li class="guide-menu">评卷参数设置</li>
+            </ul>
+            <p class="guide-desc">评卷过程管理</p>
+            <ul class="guide-menus">
+              <li class="guide-menu">评卷进度</li>
+              <li class="guide-menu">已评任务查看</li>
+            </ul>
+            <p class="guide-desc">成绩检查</p>
+            <ul class="guide-menus">
+              <li class="guide-menu">复核</li>
+            </ul>
+            <p class="guide-desc">结束评卷</p>
+            <ul class="guide-menus">
+              <li class="guide-menu">数据检查</li>
+              <li class="guide-menu">结束评卷</li>
+            </ul>
+          </div>
         </div>
-        <div class="guide-item">
-          <div class="guide-spin spin-light">教研分析</div>
+
+        <!-- 归档&成绩导出 -->
+        <div class="guide-group">
+          <div class="guide-box">
+            <h4 class="guide-title">归档&成绩导出</h4>
+            <ul class="guide-menus">
+              <li class="guide-menu">查看成绩</li>
+              <li class="guide-menu">查看成绩报告</li>
+              <li class="guide-menu">导出成绩</li>
+            </ul>
+          </div>
         </div>
-        <div class="guide-item">
-          <div class="guide-spin">归档管理</div>
+
+        <div class="guide-group">
+          <!-- 教研分析 -->
+          <div class="guide-box">
+            <h4 class="guide-title">教研分析</h4>
+            <ul class="guide-menus">
+              <li class="guide-menu">设置试卷蓝图数据</li>
+              <li class="guide-menu">查看报告</li>
+            </ul>
+          </div>
+          <!-- 达成度分析 -->
+          <div class="guide-box">
+            <h4 class="guide-title">达成度分析</h4>
+            <ul class="guide-menus">
+              <li class="guide-menu">设置培养方案</li>
+              <li class="guide-menu">设置课程目标</li>
+              <li class="guide-menu">设置课程考核方式权重</li>
+              <li class="guide-menu">导入平时成绩 / 期末成绩</li>
+              <li class="guide-menu">查看报告</li>
+            </ul>
+          </div>
         </div>
       </div>
     </div>
@@ -97,19 +125,17 @@
 <script>
 import { mapState, mapActions } from "vuex";
 import shortcutData from "../constants/shortcutData";
-import {
-  auditedTaskCount,
-  waitExamTaskListPage,
-  stmmsTaskListPage,
-  analysisTaskListPage,
-} from "../modules/exam/api";
+import { auditedTaskCount } from "../modules/exam/api";
 import { userSysRoles } from "../modules/stmms/api";
+import WaitTask from "../modules/exam/views/WaitTask.vue";
 
 export default {
   name: "home-page",
+  components: {
+    WaitTask,
+  },
   data() {
     return {
-      hasWaitTaskPrivilege: false,
       summary: {
         waitTaskCount: 0,
         doneTaskCount: 0,
@@ -178,75 +204,13 @@ export default {
       this.shortcutList = validShortcutData;
 
       // 代办任务判断
-      if (validRouters.includes("WaitTask")) {
-        this.hasWaitTaskPrivilege = true;
-        this.getWaitTaskData();
-      }
+      this.getWaitTaskData();
     },
     async getWaitTaskData() {
       const doneTaskCount = await auditedTaskCount();
       this.summary.doneTaskCount = doneTaskCount || 0;
       await this.updateWaitTaskCount();
       this.summary.waitTaskCount = this.waitTaskCount;
-
-      if (this.waitTypes.includes("flow")) await this.getFlowWaitTaskList();
-      if (this.waitTypes.includes("stmms")) await this.getStmmsWaitTaskList();
-      if (this.waitTypes.includes("analysis"))
-        await this.getAnalysisWaitTaskList();
-      this.getWaitTaskList();
-    },
-    getWaitTaskList() {
-      let waitTaskList = [];
-      const hasAllTypeTask = !this.taskList.some((item) => !item.length);
-      if (hasAllTypeTask) {
-        this.taskList.forEach((item) => {
-          waitTaskList.push(item[0]);
-        });
-        this.waitTaskList = waitTaskList;
-      } else {
-        this.taskList.forEach((item) => {
-          waitTaskList.push(...item);
-        });
-        this.waitTaskList = waitTaskList.slice(0, 3);
-      }
-    },
-    async getFlowWaitTaskList() {
-      const data = await waitExamTaskListPage(this.waitTaskFilter);
-      const dataList = data.records.map((item) => {
-        const flowTaskName = item.taskName
-          ? item.taskName.replace(/\(.+?\)/g, "")
-          : "";
-        let content = `试卷编号${item.paperNumber},${item.courseName}(${item.courseCode})`;
-        if (flowTaskName) content = `${flowTaskName},${content}`;
-        return {
-          ...item,
-          type: "flow",
-          content,
-        };
-      });
-      this.taskList[0] = dataList;
-    },
-    async getStmmsWaitTaskList() {
-      const data = await stmmsTaskListPage(this.waitTaskFilter);
-      const dataList = data.records.map((item) => {
-        return {
-          ...item,
-          type: "stmms",
-          content: `${item.courseName}(${item.courseCode}),试卷编号${item.paperNumber},${item.paperType}`,
-        };
-      });
-      this.taskList[1] = dataList;
-    },
-    async getAnalysisWaitTaskList() {
-      const data = await analysisTaskListPage(this.waitTaskFilter);
-      const dataList = data.records.map((item) => {
-        return {
-          ...item,
-          type: "analysis",
-          content: `${item.semesterName},${item.examName},${item.courseName}(${item.courseCode})`,
-        };
-      });
-      this.taskList[2] = dataList;
     },
     toMenu(item) {
       this.$router.push({
@@ -254,20 +218,6 @@ export default {
         query: item.params,
       });
     },
-    toDo(item) {
-      this.$ls.set(`wait_task_${item.type}`, item);
-      this.$router.push({
-        name: "WaitTask",
-        query: {
-          type: item.type,
-        },
-      });
-    },
-    toWaitTask() {
-      this.$router.push({
-        name: "WaitTask",
-      });
-    },
   },
 };
 </script>