zhangjie 5 years ago
parent
commit
adf7cf9ddd

BIN
extra/database/client.rdb


+ 1 - 0
src/App.vue

@@ -1,5 +1,6 @@
 <template>
   <div id="app">
+    <move-bar></move-bar>
     <router-view />
   </div>
 </template>

+ 14 - 4
src/assets/styles/home.less

@@ -10,7 +10,7 @@
 .home-body {
   position: absolute;
   left: 0;
-  top: 70px;
+  top: 68px;
   right: 0;
   bottom: 0;
   overflow: auto;
@@ -26,8 +26,8 @@
 .home-header {
   position: absolute;
   width: 100%;
-  padding: 15px 20px;
-  height: 70px;
+  padding: 14px 20px;
+  height: 68px;
   line-height: 40px;
   top: 0;
   left: 0;
@@ -81,7 +81,7 @@
 .part-box {
   position: relative;
   width: 944px;
-  min-height: 492px;
+  min-height: 490px;
   margin: 0 auto 40px;
   border-radius: 40px;
   background-color: @backgroundLight;
@@ -97,6 +97,16 @@
     margin-right: 15px;
   }
 }
+/* move-bar */
+.move-bar {
+  position: fixed;
+  top: 0;
+  right: 150px;
+  left: 80px;
+  height: 50px;
+  cursor: move;
+  z-index: 999;
+}
 
 /* other */
 .img-contain {

+ 3 - 1
src/assets/styles/icons.less

@@ -1,7 +1,7 @@
 /* icon */
 .icon {
-  height: 16px;
   width: 16px;
+  height: 16px;
   display: inline-block;
   vertical-align: middle;
   background-size: 100% 100%;
@@ -13,6 +13,8 @@
       background-image: url(../images/icon-close-act.png);
     }
     &-max {
+      width: 10px;
+      height: 10px;
       background-image: url(../images/icon-max.png);
     }
     &-max-act {

+ 64 - 113
src/assets/styles/iview-custom.less

@@ -1,17 +1,3 @@
-// table
-.ivu-table {
-  color: @dark;
-  .ivu-table-header {
-    color: rgba(90, 153, 230, 1);
-  }
-  &.ivu-table-large {
-    td,
-    th {
-      height: 44px;
-      padding: 10px 0;
-    }
-  }
-}
 // btn
 .ivu-btn {
   border-radius: 10px;
@@ -33,12 +19,13 @@
     background: rgba(46, 50, 90, 1);
     box-shadow: 0px 0px 40px 0px rgba(4, 5, 17, 0.3);
     border-radius: 20px;
-    padding: 20px;
+    padding: 20px 15px;
   }
   .ivu-select-item {
     display: inline-block;
     vertical-align: top;
-    padding: 0 20px;
+    padding: 0 10px;
+    width: 64px;
     height: 36px;
     line-height: 32px;
     border-radius: 10px;
@@ -46,6 +33,7 @@
     color: @fontSub;
     margin: 0 5px 10px;
     background-color: transparent;
+    text-align: center;
 
     &:hover,
     &-selected {
@@ -109,18 +97,7 @@
     border-color: #212543;
   }
 }
-// input-number
-.ivu-input-number {
-  font-size: 14px;
-  border-radius: 10px;
-  .ivu-input-number-input {
-    padding: 0 16px;
-    border-radius: 10px;
-  }
-  .ivu-input-number-handler-wrap {
-    display: none;
-  }
-}
+
 // form -ok
 .ivu-form {
   .ivu-form-item-error-tip {
@@ -141,9 +118,12 @@
 .ivu-modal {
   box-shadow: 0px 0px 40px 0px rgba(4, 5, 17, 0.2);
   border-radius: 20px;
+  &-mask {
+    background-color: transparent;
+  }
 
   .ivu-modal-content {
-    background: rgba(46, 50, 90, 1) !important;
+    background: #2e325a !important;
   }
 
   .ivu-modal-header {
@@ -159,10 +139,6 @@
       font-size: 18px;
     }
   }
-  .ivu-modal-content {
-    border-radius: 20px;
-    background: rgba(245, 247, 251, 1);
-  }
   .ivu-modal-body {
     padding: 0 32px;
   }
@@ -175,97 +151,72 @@
       margin: 0 10px;
     }
   }
-}
-.ivu-modal-fullscreen {
-  min-width: 1024px;
-  .ivu-modal-header {
-    height: 64px;
 
-    .ivu-modal-header-inner {
-      line-height: 35px;
-      height: 35px;
-      color: #fff;
-      font-size: 20px;
-    }
-  }
-  .ivu-modal-header,
-  .ivu-modal-content {
-    border-radius: 0;
+  // modal-confirm
+  .ivu-modal-confirm {
+    padding: 60px 0 32px 15px;
+    text-align: right;
   }
-  .ivu-modal-body {
-    top: 64px;
-    padding: 20px 40px;
-  }
-}
-.modal-btn {
-  height: 44px;
-  font-size: 18px;
-  margin: 0 12px 0 0;
-  padding: 0 32px;
-  border-radius: 25px;
-}
-// message
-.ivu-message {
-  // top: 46% !important;
-  .ivu-message-notice-content {
-    background: rgba(245, 247, 251, 1);
+  .ivu-modal-confirm-body {
+    font-size: 18px;
+    color: @fontMain;
+    min-height: 76px;
+    position: relative;
+    line-height: 25px;
+    padding-top: 6px;
+    padding-bottom: 6px;
+    padding-left: 52px;
+    text-align: left;
 
-    border-radius: 10px;
-    font-size: 16px;
-    padding: 10px 30px;
+    &::before {
+      content: "";
+      position: absolute;
+      width: 36px;
+      height: 36px;
+      left: 0;
+      top: 0;
+      z-index: auto;
+      background-image: url(../images/icon-error-big.png);
+      background-repeat: no-repeat;
+      background-size: 100% 100%;
+    }
   }
-}
-
-// page
-.part-page {
-  text-align: center;
-  margin-top: 40px;
+  .ivu-modal-confirm-footer {
+    display: inline-block;
+    width: 180px;
+    overflow: hidden;
+    button {
+      width: 80px;
+      margin-left: 10px;
 
-  .ivu-page {
-    font-size: 14px;
-    li {
-      border: 1px solid @border-color-base;
-      background: rgba(235, 239, 247, 1);
-      border-radius: 10px;
-    }
-    li.ivu-page-item-active {
-      background: @primary-color;
-      box-shadow: 0px 5px 15px 0px rgba(92, 158, 238, 0.5);
-      a {
-        color: #fff !important;
+      &:nth-of-type(1) {
+        float: right;
+      }
+      &:nth-of-type(2) {
+        float: left;
       }
-    }
-    .ivu-page-options-elevator input {
-      height: 32px;
-      padding: 4px 8px;
     }
   }
-}
-
-// image-review
-.image-review {
-  .ivu-modal-content {
-    background: rgba(0, 0, 0, 0.3);
-  }
-  .ivu-modal-header {
-    height: 50px;
-    background: transparent;
-    color: #fff;
-    border: none;
-  }
-  .ivu-modal-close {
-    top: 0;
-    .ivu-icon {
-      font-size: 50px;
-    }
+  .ivu-btn-text {
+    border: 2px solid rgba(59, 66, 122, 1);
+    color: @fontSub;
+    background-color: transparent !important;
 
     &:hover {
-      .ivu-icon {
-        color: #fff;
-      }
+      color: @fontMain;
+      border-color: @fontMain;
     }
   }
-  .ivu-modal-body {
-    top: 50px;
+}
+
+// message
+.ivu-message {
+  .ivu-message-notice-content {
+    background: rgba(46, 50, 90, 1);
+    box-shadow: 0px 0px 40px 0px rgba(4, 5, 17, 0.2);
+    border-radius: 20px;
+    font-size: 16px;
+    padding: 10px 30px;
+    color: @fontMain;
   }
 }

+ 118 - 324
src/assets/styles/pages.less

@@ -118,9 +118,11 @@
 }
 /* code-area */
 .code-area {
+  min-height: 458px;
   &-cont {
     position: relative;
     width: 610px;
+    box-shadow: 0px 40px 40px 0px rgba(4, 5, 17, 0.3);
     &-disabled::before {
       content: "";
       display: block;
@@ -159,6 +161,7 @@
     left: 50%;
     transform: translate(-50%, -50%);
     overflow: hidden;
+    box-shadow: 0px 40px 40px 0px rgba(4, 5, 17, 0.3);
   }
   &-icon {
     margin: 20px auto 0;
@@ -387,24 +390,28 @@
 
 /* scan */
 .scan {
-  &-back {
-    position: fixed;
-    width: 220px;
-    height: 70px;
-    top: 0;
-    left: 0;
-    z-index: 200;
-  }
+  // &-back {
+  //   position: fixed;
+  //   width: 220px;
+  //   height: 70px;
+  //   padding: 20px 32px;
+  //   top: 0;
+  //   left: 0;
+  //   z-index: 999;
+  //   background-color: #202442;
+  // }
   &-task {
     position: fixed;
     width: 220px;
     left: 0;
-    top: 0;
+    top: 70px;
     bottom: 0;
     z-index: 200;
-    padding: 70px 20px 20px;
+    padding: 20px 20px 76px;
+    border-top-right-radius: 20px;
     overflow-y: auto;
     overflow-x: hidden;
+    background-color: #202442;
 
     .task-item {
       padding: 12px 10px 12px 58px;
@@ -412,6 +419,7 @@
       border-radius: 10px;
       background-color: @backgroundLight;
       position: relative;
+      margin-bottom: 10px;
 
       &-icon {
         position: absolute;
@@ -419,32 +427,43 @@
         left: 10px;
         width: 38px;
         height: 38px;
+        line-height: 38px;
+        text-align: center;
         background: rgba(53, 60, 112, 1);
         border-radius: 12px;
       }
       > p {
-        &:last-child {
+        &:nth-of-type(2) {
           line-height: 16px;
         }
       }
 
       &.task-over {
-        p:first-child {
+        p:nth-of-type(1) {
           color: @fontMain;
         }
       }
-
-      > span:first-child {
-        margin-right: 10px;
-      }
     }
     &-action {
       position: fixed;
+      width: 220px;
       left: 0;
       bottom: 0;
       background-color: #2d325a;
-      padding: 20px 15px;
+      padding: 20px 10px;
       text-align: center;
+      > button {
+        width: 85px;
+        padding: 0 5px;
+        &:first-child {
+          margin-right: 10px;
+          background: rgba(34, 192, 255, 1);
+
+          &:hover {
+            background: rgba(34, 192, 255, 0.9);
+          }
+        }
+      }
     }
   }
 
@@ -457,11 +476,11 @@
     z-index: 99;
     padding: 20px;
     border-top-left-radius: 20px;
-    background-color: @backgroundLight;
+    background-color: #202442;
     overflow-y: auto;
     overflow-x: hidden;
     .history-item {
-      margin-bottom: 20px;
+      margin-bottom: 16px;
 
       &-title {
         margin-top: 6px;
@@ -484,36 +503,28 @@
   }
 
   &-image {
-    margin: 0 240px;
-    padding: 20px 0;
+    margin: 0 260px;
+    padding-bottom: 18px;
   }
 
   &-main {
-    height: 500px;
+    height: 456px;
     background: @backgroundLight;
-    margin-bottom: 30px;
+    margin-bottom: 20px;
     position: relative;
   }
 
   /* scan-wariting */
   &-waiting {
     padding-top: 140px;
-    border: 2px dashed rgb(221, 222, 224);
+    border-radius: 20px;
     &-icon {
-      width: 240px;
-      height: 187px;
-      // background-image: url(../images/bg-camera.png);
+      width: 233px;
+      height: 229px;
+      background-image: url(../images/camera.png);
       background-repeat: no-repeat;
       background-size: 100% 100%;
-      box-shadow: 0px 15px 25px 0px rgba(81, 175, 235, 0.3);
-      margin: 0 auto 32px;
-    }
-    &-tips {
-      font-size: 20px;
-      font-weight: 500;
-      color: rgba(90, 153, 230, 1);
-      line-height: 28px;
-      text-align: center;
+      margin: 0 auto;
     }
   }
 
@@ -521,21 +532,6 @@
   &-picture {
     box-shadow: 0px 20px 30px 0px rgba(0, 0, 0, 0.1);
   }
-  // scan-progress
-  &-progress {
-    position: absolute;
-    width: 300px;
-    height: 22px;
-    line-height: 22px;
-    top: 34px;
-    right: 40px;
-    color: #fff;
-    font-size: 16px;
-    > span {
-      display: inline-block;
-      vertical-align: middle;
-    }
-  }
   // scan-info
   &-info {
     margin-top: 20px;
@@ -563,7 +559,7 @@
         width: 10px;
         height: 10px;
         border: 2px solid rgba(65, 205, 125, 1);
-        margin-right: 10px;
+        margin-right: 8px;
       }
     }
     &-upload {
@@ -583,281 +579,79 @@
     float: right;
   }
 }
+.line-scan {
+  .scan-image {
+    margin-left: 40px;
+  }
+  .scan-student {
+    position: absolute;
+    left: 50%;
+    bottom: 10px;
+    transform: translateX(-50%);
+    padding: 8px 20px;
+    background-color: #41cd7d;
+    color: @fontMain;
+    line-height: 20px;
+    border-radius: 10px;
+    opacity: 0.9;
+    z-index: 99;
 
-/* scan-input */
-.scan-input .ivu-modal-header {
-  display: none;
-}
-.scan-input .ivu-modal-footer {
-  padding: 0;
-}
-.scan-input .ivu-modal-body {
-  padding-bottom: 30px;
-}
-.scan-input-title {
-  color: @pink;
-  padding: 0 0 30px;
-  font-size: 24px;
-  text-align: center;
-  position: relative;
-  margin-bottom: 10px;
-}
-.scan-input-reset {
-  position: absolute;
-  bottom: 0;
-  right: 0;
-}
-.scan-input-main {
-  background: @backgroundLight;
-  position: relative;
-  margin-bottom: 20px;
-  min-height: 280px;
-}
-.scan-input-cont {
-  position: relative;
-  width: 420px;
-  min-height: 280px;
-}
-.scan-input-cont img {
-  display: block;
-  width: 100%;
-}
-
-.scan-input-preview {
-  width: 240px;
-}
-.scan-input-spin {
-  height: 240px;
-}
-.scan-input-spin-img {
-  width: 240px;
-  height: 180px;
-}
-.scan-input-form {
-  padding: 20px 20px 0;
-  text-align: center;
-}
-.scan-input-footer {
-  height: 88px;
-  padding: 19px;
-  background: rgba(230, 234, 242, 1);
-  text-align: center;
-  border-bottom-left-radius: 10px;
-  border-bottom-right-radius: 10px;
-}
-.scan-input-btn {
-  display: inline-block;
-  vertical-align: middle;
-  width: 240px;
-}
-.scan-input-btn:first-child {
-  margin-right: 20px;
-}
-
-/* hand-input */
-.hand-input .ivu-modal-header {
-  background: rgba(71, 195, 233, 1);
-}
-.hand-input-body {
-  width: 944px;
-  margin: 0 auto;
-}
-.hand-input-main {
-  background: @backgroundLight;
-  position: relative;
-  margin-bottom: 20px;
-  min-height: 280px;
-}
-.hand-input-cont {
-  width: 600px;
-  min-height: 400px;
-}
-.hand-input-cont img {
-  display: block;
-  width: 100%;
-}
-.hand-input-spin {
-  position: absolute;
-  width: 300px;
-  height: 200px;
-  background: #fff;
-  top: 50%;
-  right: 20px;
-  margin-top: -100px;
-  overflow: hidden;
-}
-.hand-input-form {
-  padding: 20px 20px 0;
-  text-align: center;
-  background: @backgroundLight;
-}
-
-/* progress-bar */
-.progress-bar {
-  position: relative;
-  height: 12px;
-  width: 200px;
-}
-.progress-line {
-  display: block;
-  height: 100%;
-  border-radius: 10px;
-  background: rgba(255, 255, 255, 0.2);
-  overflow: hidden;
-}
-.progress-rate {
-  display: inline-block;
-  vertical-align: top;
-  height: 100%;
-  background: linear-gradient(
-    90deg,
-    rgba(255, 255, 132, 1) 0%,
-    rgba(255, 209, 69, 1) 100%
-  );
-}
-.progress-num {
-  position: absolute;
-  bottom: -22px;
-  right: 0;
-  color: #fff;
-  font-size: 14px;
-}
-.progress-num i:first-child {
-  font-size: 16px;
-  color: rgba(255, 252, 111, 1);
-}
-
-/* scan-footer */
-.scan-footer {
-  position: relative;
-  height: 60px;
-}
-.scan-footer-nums {
-  position: absolute;
-  height: 20px;
-  top: 20px;
-  left: 0;
-  line-height: 20px;
-  color: @midDark;
-}
-.scan-footer-nums span {
-  margin-right: 5px;
-}
-.scan-footer-nums span i:last-child {
-  color: @dark;
-  margin-left: 5px;
-}
-.scan-fonter-task-btn {
-  position: absolute;
-  left: 50%;
-  top: 0;
-  height: 60px;
-  width: 200px;
-  margin-left: -100px;
-  box-shadow: 0px 10px 10px 0px rgba(237, 81, 90, 0.3);
-  border-radius: 30px;
-}
-.scan-fonter-task-btn .ivu-btn-large {
-  padding: 0 15px;
-}
-.scan-footer-btn {
-  position: absolute;
-  top: 10px;
-  right: 0;
-}
-.scan-footer-btn .ivu-btn {
-  background: rgba(92, 158, 238, 0.2);
-  color: rgba(90, 153, 230, 1);
-}
-
-/* input-append */
-.input-append {
-  position: relative;
-}
-.input-append .ivu-input {
-  padding-right: 40px;
-}
-
-.input-append-icon {
-  height: 100%;
-  width: 40px;
-  position: absolute;
-  top: 0;
-  right: 0;
-  z-index: auto;
-  font-size: 20px;
-  cursor: pointer;
-}
-.input-append-icon > i {
-  position: absolute;
-  display: block;
-  top: 50%;
-  left: 50%;
-  transform: translate(-50%, -50%);
+    span:first-child {
+      margin-right: 10px;
+    }
+  }
 }
 
-/* layout-container confirm */
-.layout-container {
-  position: fixed;
-  width: 100%;
-  height: 100%;
-  top: 0;
-  left: 0;
-  z-index: 9999;
-  background: rgba(0, 0, 0, 0.5);
-}
-.layout-content {
-  position: absolute;
-  width: 360px;
-  left: 50%;
-  top: 50%;
-  margin-top: -200px;
-  margin-left: -180px;
-  overflow: hidden;
-  text-align: center;
-  border-radius: 10px;
-  background: rgba(245, 247, 251, 1);
-  box-shadow: 0px 20px 30px 0px rgba(0, 0, 0, 0.1);
-}
-/* .layout-main {
-  border-radius: 10px;
-} */
-.layout-message {
-  padding: 60px 40px;
-  font-size: 18px;
-  color: rgba(119, 125, 138, 1);
-  line-height: 30px;
-  min-height: 170px;
-}
-.layout-message > span:first-child {
-  margin-right: 10px;
-  vertical-align: middle;
-}
-.layout-title {
-  height: 40px;
-  line-height: 40px;
-  overflow: hidden;
-  border-bottom: 1px solid #e0e0e0;
-}
-.layout-btns {
-  height: 44px;
-  font-size: 16px;
-}
-.layout-btns span {
-  display: block;
-  float: left;
-  width: 50%;
-  line-height: 44px;
-  cursor: pointer;
-  box-sizing: border-box;
-  background: rgba(235, 239, 247, 1);
-}
-.layout-btns span.btn-bold {
-  font-weight: bold;
-}
-.layout-btns span:last-child {
-  background: rgba(92, 158, 238, 1);
-  color: #fff;
+/* scan-exception-dialog */
+.scan-exception-dialog {
+  .exception-body {
+    position: relative;
+    width: 944px;
+    margin: 0 auto;
+    border-radius: 20px;
+    background-color: #2e325a;
+    padding: 0 30px 30px;
+  }
+  .exception-title {
+    position: relative;
+    font-size: 18px;
+    padding: 20px 0;
+    line-height: 24px;
+    > i {
+      margin-right: 10px;
+    }
+  }
+  .exception-code-area {
+    margin-bottom: 32px;
+  }
+  .exception-footer {
+    overflow: hidden;
+  }
+  .exception-form {
+    float: left;
+  }
+  .exception-actions {
+    float: right;
+    > button {
+      margin: 0 5px;
+      font-weight: 500;
+    }
+  }
+  // ivu
+  .ivu-modal-header {
+    display: none;
+  }
+  .ivu-modal-body {
+    top: 0 !important;
+    padding: 56px 40px;
+  }
+  .ivu-modal-content {
+    background: #25294a !important;
+  }
+  .ivu-icon-scan {
+    margin-top: 8px;
+    margin-right: 5px;
+  }
 }
 
 @keyframes zoomIn {

+ 12 - 4
src/background.js

@@ -1,6 +1,6 @@
 "use strict";
 
-import { app, protocol, BrowserWindow, dialog, Menu, ipcMain } from "electron";
+import { app, protocol, BrowserWindow, Menu, ipcMain } from "electron";
 import {
   createProtocol
   /* installVueDevtools */
@@ -19,11 +19,12 @@ protocol.registerSchemesAsPrivileged([
 function createWindow() {
   // Create the browser window.
   win = new BrowserWindow({
-    width: 800,
+    width: isDevelopment ? 1428 : 1024,
     height: 600,
-    minWidth: 800,
+    minWidth: 1024,
     minHeight: 600,
-    frame: process.env.NODE_ENV === "development",
+    frame: isDevelopment,
+    useContentSize: true,
     webPreferences: {
       nodeIntegration: true,
       webSecurity: false
@@ -52,6 +53,13 @@ ipcMain.on("close-window", () => {
 ipcMain.on("minimize-window", () => {
   win.minimize();
 });
+ipcMain.on("maximize-window", () => {
+  if (win.isMaximized()) {
+    win.unmaximize();
+  } else {
+    win.maximize();
+  }
+});
 
 // Quit when all windows are closed.
 app.on("window-all-closed", () => {

+ 49 - 0
src/components/MoveBar.vue

@@ -0,0 +1,49 @@
+<template>
+  <div class="move-bar"></div>
+</template>
+
+<script>
+const { BrowserWindow } = require("electron").remote;
+
+export default {
+  name: "move-bar",
+  data() {
+    return {
+      iniPos: [],
+      win: null
+    };
+  },
+  mounted() {
+    const _this = this;
+    let [_x, _y] = [0, 0];
+    let isMoving = false;
+
+    const moveHandle = function(e) {
+      if (!isMoving) return;
+      const left = Math.floor(_this.iniPos[0] + e.screenX - _x);
+      const top = Math.floor(_this.iniPos[1] + e.screenY - _y);
+      _this.win.setPosition(left, top);
+    };
+
+    const upHandle = function(e) {
+      isMoving = false;
+      document.removeEventListener("mousemove", moveHandle);
+      document.removeEventListener("mouseup", upHandle);
+    };
+
+    document.addEventListener("mousedown", function(e) {
+      if (_this.$el !== e.target) return;
+      isMoving = true;
+
+      _x = e.screenX;
+      _y = e.screenY;
+      _this.win = BrowserWindow.getFocusedWindow();
+      _this.iniPos = _this.win.getPosition();
+
+      document.addEventListener("mousemove", moveHandle);
+      document.addEventListener("mouseup", upHandle);
+    });
+  },
+  methods: {}
+};
+</script>

+ 0 - 1
src/mixins/authUnvalidMixin.js

@@ -8,7 +8,6 @@ export default {
     showToLoginModel(val) {
       if (val) {
         this.$Modal.confirm({
-          title: "操作警告",
           content: "身份验证失效,是否重新登陆?",
           onOk: () => {
             this.$store.commit("setShowToLoginModel", false);

+ 1 - 1
src/modules/client/api.js

@@ -29,5 +29,5 @@ export const saveCollectLog = datas => {
   return $post(`/api/marklog/saveCollectLog`, datas);
 };
 export const getLevelList = examId => {
-  return $get(`/api/exam/getLevel/${examId}`);
+  return $get(`/api/level/${examId}`);
 };

+ 43 - 42
src/modules/client/components/ScanExceptionDialog.vue

@@ -3,17 +3,20 @@
     class="scan-exception-dialog"
     v-model="modalIsShow"
     :mask-closable="false"
-    :closable="!curException.showAction"
+    :closable="false"
     fullscreen
     footer-hide
     @on-visible-change="visibleChange"
   >
-    <div class="exception-title" slot="header">
-      <h2>{{ curException.message }}</h2>
-    </div>
+    <div slot="header"></div>
 
-    <div class="home-main">
-      <div class="code-area-main exception-main">
+    <div class="exception-body">
+      <h2 class="exception-title" v-if="scanType === 'SCAN'">
+        <i class="icon ivu-icon-error-hollow"></i>
+        <span>{{ curException.message }}</span>
+      </h2>
+      <h2 class="exception-title" v-else>人工绑定</h2>
+      <div class="code-area exception-code-area">
         <div class="code-area-cont code-area-cont-disabled">
           <img :src="curImage.url" :alt="curImage.name" ref="editImage" />
         </div>
@@ -28,8 +31,9 @@
         </div>
       </div>
 
-      <div class="exception-form" v-if="curException.showAction">
+      <div class="exception-footer" v-if="curException.showAction">
         <Form
+          class="exception-form"
           ref="modalFormComp"
           :model="modalForm"
           :rules="rules"
@@ -37,31 +41,30 @@
           inline
         >
           <FormItem prop="examNumber">
-            <div class="input-append">
-              <Input
-                size="default"
-                key="1"
-                v-model.trim="modalForm.examNumber"
-                placeholder="请扫码输入"
-                style="width: 220px;"
-                autofocus
-                v-code-input.prevent="{ inputOver }"
-                v-if="scanType === 'SCAN'"
-              >
-                ></Input
-              >
-              <Input
-                size="default"
-                key="2"
-                v-model.trim="modalForm.examNumber"
-                placeholder="请在此输入考号"
-                style="width: 220px;"
-                @on-blur="checkStudent"
-                autofocus
-                v-else
-              >
-              </Input>
-            </div>
+            <Input
+              size="default"
+              key="1"
+              v-model.trim="modalForm.examNumber"
+              placeholder="请扫码输入"
+              suffix="scan icon"
+              style="width: 200px;"
+              autofocus
+              v-code-input.prevent="{ inputOver }"
+              v-if="scanType === 'SCAN'"
+            >
+              ></Input
+            >
+            <Input
+              size="default"
+              key="2"
+              v-model.trim="modalForm.examNumber"
+              placeholder="请在此输入考号"
+              style="width: 200px;"
+              @on-blur="checkStudent"
+              autofocus
+              v-else
+            >
+            </Input>
           </FormItem>
           <FormItem>
             <Input
@@ -75,19 +78,17 @@
           </FormItem>
         </Form>
         <div class="exception-actions" v-if="scanType === 'SCAN'">
-          <Button size="default" type="primary" @click="toHandInput"
-            >手工绑定</Button
-          >
-          <Button size="default" type="primary" @click="toRescan"
-            >重新采集</Button
-          >
-          <Button size="default" type="default" @click="toReset"
-            ><i class="icon-font icon-setting"></i>重新配置</Button
+          <Button icon="handle icon" @click="toHandInput">人工绑定</Button>
+          <Button @click="toRescan">重新扫描</Button>
+          <Button @click="toReset"
+            ><i class="icon-font icon-setting"></i>设置采集信息</Button
           >
         </div>
       </div>
-      <div class="exception-actions" v-else>
-        <Button size="default" type="primary" @click="toRescan">确定</Button>
+      <div class="exception-footer" style="text-align:center;" v-else>
+        <Button type="primary" style="width: 160px;" @click="toRescan"
+          >重新扫描</Button
+        >
       </div>
     </div>
   </Modal>

+ 6 - 9
src/modules/client/views/Camera.vue

@@ -14,7 +14,7 @@
           <Input
             size="large"
             v-model.trim="modalForm.camera"
-            placeholder="相机编码"
+            placeholder="请输入相机编号"
             key="1"
             autofocus
             v-if="canEdit"
@@ -23,7 +23,7 @@
           <Input
             size="large"
             v-model.trim="modalForm.camera"
-            placeholder="扫描相机编码"
+            placeholder="请扫码输入相机编号"
             :key="2"
             suffix="scan icon"
             autofocus
@@ -33,12 +33,7 @@
           </Input>
         </FormItem>
         <div class="camera-write">
-          <Button
-            :type="canEdit ? 'primary' : 'default'"
-            icon="handle icon"
-            @click="toHandInput"
-            >手工输入</Button
-          >
+          <Button icon="handle icon" @click="toHandInput">手工输入</Button>
         </div>
       </Form>
       <div class="camera-btn">
@@ -92,7 +87,9 @@ export default {
         ? "GroupScan"
         : "LineScan";
       const routerName = this.curSubject.collectConfig
-        ? scanRouter
+        ? this.clientConfig.paperStage
+          ? "CheckInfo"
+          : scanRouter
         : "ScanArea";
       this.$router.push({ name: routerName });
     }

+ 3 - 16
src/modules/client/views/CheckInfo.vue

@@ -19,8 +19,8 @@
             <Option
               v-for="(level, lindex) in levels"
               :key="lindex"
-              :value="level.name"
-              >{{ level.name }}档</Option
+              :value="level"
+              >{{ level }}档</Option
             >
           </Select>
         </FormItem>
@@ -80,20 +80,7 @@ export default {
           }
         ]
       },
-      levels: [
-        {
-          id: 1,
-          name: "A"
-        },
-        {
-          id: 2,
-          name: "B"
-        },
-        {
-          id: 3,
-          name: "C"
-        }
-      ]
+      levels: []
     };
   },
   computed: {

+ 48 - 43
src/modules/client/views/GroupScan.vue

@@ -1,46 +1,40 @@
 <template>
   <div class="group-scan scan">
-    <div
-      class="scan-task task-list"
-      id="task-list"
-      v-if="studentSerialList.length"
-    >
-      <div class="scan-back">
-        <Button @click="goback">返回</Button>
-      </div>
-      <div
-        v-for="(student, index) in studentSerialList"
-        :key="index"
-        :class="[
-          'task-item',
-          {
-            'task-current': student.isCurrent,
-            'task-over': student.isClient
-          }
-        ]"
-      >
-        <div class="task-item-icon">
-          <i
-            :class="[
-              'icon',
-              student.isClient ? 'ivu-icon-user-act' : 'ivu-icon-user-gray'
-            ]"
-          ></i>
-        </div>
-        <p>{{ student.name }}</p>
-        <p>{{ student.examNumber }}</p>
-      </div>
-      <div class="scan-task-action">
-        <Button type="primary" @click="scanOver" :disabled="holding"
-          >扫描完毕</Button
+    <div class="scan-task task-list" id="task-list">
+      <div class="scan-task-body" v-if="studentSerialList.length">
+        <div
+          v-for="(student, index) in studentSerialList"
+          :key="index"
+          :class="[
+            'task-item',
+            {
+              'task-current': student.isCurrent,
+              'task-over': student.isClient
+            }
+          ]"
         >
-        <Button type="primary" @click="allReScan">整包重扫</Button>
+          <div class="task-item-icon">
+            <i
+              :class="[
+                'icon',
+                student.isClient ? 'ivu-icon-user-act' : 'ivu-icon-user-gray'
+              ]"
+            ></i>
+          </div>
+          <p>{{ student.name }}</p>
+          <p>{{ student.examNumber }}</p>
+        </div>
+        <div class="scan-task-action">
+          <Button type="primary" @click="scanOver" :disabled="holding"
+            >扫描完毕</Button
+          >
+          <Button type="primary" @click="allReScan">整包重扫</Button>
+        </div>
       </div>
     </div>
     <div class="scan-image">
       <div class="scan-main scan-waiting" v-if="isWaiting">
         <p class="scan-waiting-icon"></p>
-        <p class="scan-waiting-tips">等待采集试卷</p>
       </div>
       <div class="scan-main scan-picture" v-else>
         <img class="img-contain" :src="curImage.url" :alt="curImage.name" />
@@ -170,8 +164,8 @@ export default {
       this.$Message.error("请先完成采集设置!");
       return;
     }
+
     this.getInitFile();
-    // this.test();
   },
   methods: {
     ...mapMutations("client", ["setScanNo", "setStartCountTime"]),
@@ -265,7 +259,7 @@ export default {
         // 未解析到考号异常
         this.curException = {
           showAction: true,
-          message: "该图片无法识别,请处理!",
+          message: "该图片无法识别,请立即处理!",
           collectConfig: this.getCurCollectConfig()
         };
         this.$refs.ScanExceptionDialog.open();
@@ -305,7 +299,7 @@ export default {
         } else {
           validInfo = {
             valid: false,
-            message: "无该考生,请处理!"
+            message: "无对应考号考生,请立即处理!"
           };
           return validInfo;
         }
@@ -320,7 +314,7 @@ export default {
       if (!this.curStudent) {
         validInfo = {
           valid: false,
-          message: "该考生不属于该考场,请处理!"
+          message: "该考生不属于该考场,请立即处理!"
         };
       } else {
         this.curStudent.isCurrent = true;
@@ -354,6 +348,7 @@ export default {
       }
       // 删除扫描文件,继续开始下一个任务
       fs.unlinkSync(this.curImage.url);
+      this.scrollTaskList();
       this.restartInitFile();
     },
     checkAllStudentIsClient() {
@@ -363,7 +358,7 @@ export default {
       if (this.holding) return;
       this.holding = true;
       if (!this.checkAllStudentIsClient()) {
-        this.$Message.error("当前整包试卷没有扫描完毕!");
+        this.$Modal.error({ content: "本考场未采集完毕,请检验!" });
         this.holding = false;
         return;
       }
@@ -397,13 +392,23 @@ export default {
       this.allReScan();
     },
     allReScan() {
-      this.students = [];
-      this.historyList = [];
-      this.restartInitFile();
+      this.$Modal.confirm({
+        content: "确定要整包重扫吗?",
+        onOk: () => {
+          this.students = [];
+          this.historyList = [];
+          this.restartInitFile();
+        }
+      });
     },
     getCurCollectConfig() {
       return this.curStudent.collectConfig || this.curSubject.collectConfig;
     },
+    scrollTaskList() {
+      if (this.curTaskScanCount < 6) return;
+      document.getElementById("task-list").scrollTop =
+        (this.curTaskScanCount - 6) * 71;
+    },
     // count
     async updateScanNo() {
       const scanNo = await db.getScanCount(this.startCountTime);

+ 14 - 24
src/modules/client/views/LineScan.vue

@@ -1,56 +1,46 @@
 <template>
   <div class="line-scan scan">
-    <div class="scan-task task-list">
-      <div
-        :class="[
-          'task-item',
-          {
-            'task-current': curStudent.isCurrent,
-            'task-over': curStudent.isClient
-          }
-        ]"
-      >
-        <span>{{ curStudent.name }}</span>
-        <span>{{ curStudent.examNumber }}</span>
-      </div>
-    </div>
     <div class="scan-image">
       <div class="scan-main scan-waiting" v-if="isWaiting">
         <p class="scan-waiting-icon"></p>
-        <p class="scan-waiting-tips">等待采集试卷</p>
       </div>
       <div class="scan-main scan-picture" v-else>
         <img class="img-contain" :src="curImage.url" :alt="curImage.name" />
+        <div class="scan-student" v-if="curStudent && curStudent.examNumber">
+          <span>{{ curStudent.name }}</span
+          ><span>{{ curStudent.examNumber }}</span>
+        </div>
       </div>
       <div class="scan-info">
-        <p>
+        <p class="scan-info-cont scan-info-scan">
           <span>已采集:</span>
           <span>{{ scanNo }}</span>
-          <span>,</span>
+        </p>
+        <p class="scan-info-cont scan-info-upload">
           <span>未上传:</span>
           <span>{{ unuploadNo }}</span>
         </p>
         <p>
-          <Button type="error" @click="resetStartCountTime">清零</Button>
+          <Button @click="resetStartCountTime">清零</Button>
         </p>
+        <div class="scan-reset-area">
+          <Button type="primary" @click="toResetArea">重新设置采集信息</Button>
+        </div>
       </div>
     </div>
     <div class="scan-history">
-      <div class="scan-reset-area">
-        <Button type="primary" @click="toResetArea">重新设置采集信息</Button>
-      </div>
       <div
         class="history-item"
         v-for="(task, tindex) in historyList"
         :key="tindex"
       >
+        <div class="history-item-body">
+          <img :src="task.formalImgPath" :alt="task.name" />
+        </div>
         <p class="history-item-title">
           <span>{{ task.name }}</span
           ><span>{{ task.examNumber }}</span>
         </p>
-        <div class="history-item-body">
-          <img :src="task.formalImgPath" :alt="task.name" />
-        </div>
       </div>
     </div>
 

+ 0 - 1
src/modules/example/views/DataManage.vue

@@ -200,7 +200,6 @@ export default {
     },
     toDelete(row) {
       this.$Modal.confirm({
-        title: "删除警告",
         content: "确定要删除当前学校吗?",
         onOk: () => {
           this.toDel(row.id);

+ 3 - 1
src/plugins/globalVuePlugins.js

@@ -3,10 +3,12 @@ import globalMixins from "./mixins";
 import CodeInput from "./codeInput";
 import ViewHeader from "@/components/ViewHeader.vue";
 import ViewFooter from "@/components/ViewFooter.vue";
+import MoveBar from "@/components/MoveBar.vue";
 
 const components = {
   ViewFooter,
-  ViewHeader
+  ViewHeader,
+  MoveBar
 };
 
 export default {

+ 6 - 2
src/views/Home.vue

@@ -8,6 +8,9 @@
         <span class="action-icon" title="最小化" @click="minWin"
           ><Icon type="md-remove" size="16"
         /></span>
+        <span class="action-icon" title="最大化" @click="maxWin"
+          ><Icon type="md-browsers" size="16"
+        /></span>
         <span class="action-icon" title="关闭" @click="close"
           ><Icon type="md-close" size="16"
         /></span>
@@ -80,7 +83,6 @@ export default {
       const backRouter = this.backRouters[curRouteName];
       if (curRouteName === "GroupScan" || curRouteName === "LineScan") {
         this.$Modal.confirm({
-          title: "操作警告",
           content: "当前正处于采集状态,确定要退出吗?",
           onOk: () => {
             this.$router.push({ name: backRouter });
@@ -93,9 +95,11 @@ export default {
     minWin() {
       ipcRenderer.send("minimize-window");
     },
+    maxWin() {
+      ipcRenderer.send("maximize-window");
+    },
     close() {
       this.$Modal.confirm({
-        title: "操作警告",
         content: "请确保当前窗口没有任务正在进行,确认要关闭当前窗口吗?",
         onOk: () => {
           ipcRenderer.send("close-window");

+ 8 - 4
src/views/Login.vue

@@ -5,6 +5,9 @@
         <span class="action-icon" title="最小化" @click="minWin"
           ><Icon type="md-remove" size="16"
         /></span>
+        <span class="action-icon" title="最大化" @click="maxWin"
+          ><Icon type="md-browsers" size="16"
+        /></span>
         <span class="action-icon" title="关闭" @click="close"
           ><Icon type="md-close" size="16"
         /></span>
@@ -81,6 +84,9 @@ export default {
     minWin() {
       ipcRenderer.send("minimize-window");
     },
+    maxWin() {
+      ipcRenderer.send("maximize-window");
+    },
     close() {
       ipcRenderer.send("close-window");
     },
@@ -110,10 +116,8 @@ export default {
       this.$ls.set("user", data);
       this.$store.commit("setUser", data);
       this.$store.commit("client/setClientConfig", {
-        imageEncrypt: !data.paramSetting.imageEncrypt,
-        // imageEncrypt: data.paramSetting.imageEncrypt,
-        packageScan: !data.paramSetting.packageScan,
-        // packageScan: data.paramSetting.packageScan,
+        imageEncrypt: data.paramSetting.imageEncrypt,
+        packageScan: data.paramSetting.packageScan,
         paperStage: !data.paramSetting.paperStage
       });
       this.$router.push({