Forráskód Böngészése

升级npm dependencies

Michael Wang 4 éve
szülő
commit
2c0022c762
66 módosított fájl, 1316 hozzáadás és 853 törlés
  1. 3 7
      .env.development
  2. 30 30
      package.json
  3. 2 2
      postbuild.js
  4. 21 13
      src/components/FaceRecognition/FaceRecognition.vue
  5. 10 5
      src/components/MainLayout/MainLayout.vue
  6. 19 8
      src/components/MainLayout/SiteMessagePopup.vue
  7. 1 1
      src/features/Login/DevTools.vue
  8. 4 4
      src/features/Login/HiddenRequest.js
  9. 41 30
      src/features/Login/Login.vue
  10. 13 3
      src/features/Login/VerifyCode.vue
  11. 9 4
      src/features/OfflineExam/OfflineExamHome.vue
  12. 4 4
      src/features/OfflineExam/OfflineExamList.vue
  13. 5 5
      src/features/OfflineExam/OfflineExamUpload.vue
  14. 10 10
      src/features/OfflineExam/OfflineExamUploadCug.vue
  15. 1 1
      src/features/OfflineExam/imageToPdf.js
  16. 15 15
      src/features/OnlineExam/CheckComputer.vue
  17. 1 1
      src/features/OnlineExam/Examing/ArrowNavView.vue
  18. 4 4
      src/features/OnlineExam/Examing/BooleanQuestionView.vue
  19. 14 12
      src/features/OnlineExam/Examing/ExamPaper.vue
  20. 15 13
      src/features/OnlineExam/Examing/ExamingEnd.vue
  21. 38 21
      src/features/OnlineExam/Examing/ExamingHome.vue
  22. 14 11
      src/features/OnlineExam/Examing/FaceId.vue
  23. 21 17
      src/features/OnlineExam/Examing/FaceMotion/FaceMotion.vue
  24. 6 6
      src/features/OnlineExam/Examing/FaceTracking.vue
  25. 2 2
      src/features/OnlineExam/Examing/FillBlankQuestionView.vue
  26. 10 10
      src/features/OnlineExam/Examing/MultipleQuestionView.vue
  27. 4 4
      src/features/OnlineExam/Examing/OverallProgress.vue
  28. 4 4
      src/features/OnlineExam/Examing/QuestionAudio.vue
  29. 4 4
      src/features/OnlineExam/Examing/QuestionContainer.vue
  30. 9 7
      src/features/OnlineExam/Examing/QuestionFilters.vue
  31. 2 2
      src/features/OnlineExam/Examing/QuestionNavView.vue
  32. 5 5
      src/features/OnlineExam/Examing/QuestionView.vue
  33. 10 10
      src/features/OnlineExam/Examing/QuestionViewSingle.vue
  34. 1 1
      src/features/OnlineExam/Examing/RemainTime.vue
  35. 9 9
      src/features/OnlineExam/Examing/SingleQuestionView.vue
  36. 20 14
      src/features/OnlineExam/Examing/TextQuestionView.vue
  37. 3 3
      src/features/OnlineExam/Examing/UploadPhotos.vue
  38. 3 3
      src/features/OnlineExam/Examing/ws.js
  39. 18 4
      src/features/OnlineExam/OnlineExamFaceCheckModal.vue
  40. 17 10
      src/features/OnlineExam/OnlineExamHome.vue
  41. 20 13
      src/features/OnlineExam/OnlineExamList.vue
  42. 5 5
      src/features/OnlineExam/OnlineExamOverview.vue
  43. 6 4
      src/features/OnlineExam/OnlineExamResultList.vue
  44. 8 4
      src/features/OnlineExam/PhoneVerifyForDD.vue
  45. 10 5
      src/features/OnlinePractice/OnlinePracticeHome.vue
  46. 7 4
      src/features/OnlinePractice/OnlinePracticeList.vue
  47. 20 6
      src/features/OnlinePractice/OnlinePracticeRecordDetail.vue
  48. 22 11
      src/features/OnlinePractice/OnlinePracticeRecordList.vue
  49. 10 5
      src/features/Password/Password.vue
  50. 31 12
      src/features/SiteMessage/SiteMessageDetail.vue
  51. 17 10
      src/features/SiteMessage/SiteMessageHome.vue
  52. 5 6
      src/main.js
  53. 3 3
      src/mixins/mixins.js
  54. 5 5
      src/store.js
  55. 5 5
      src/utils/axios.js
  56. 3 3
      src/utils/axiosCache.js
  57. 4 4
      src/utils/axiosProgress.js
  58. 4 4
      src/utils/axiosRetry.js
  59. 3 3
      src/utils/electronLog.js
  60. 2 6
      src/utils/logger.js
  61. 4 4
      src/utils/monitors.js
  62. 2 2
      src/utils/nativeExe.js
  63. 1 1
      tests/vue/child.vue
  64. 2 2
      tests/vue/myinput.vue
  65. 7 3
      vue.config.js
  66. 688 404
      yarn.lock

+ 3 - 7
.env.development

@@ -8,14 +8,10 @@ VUE_APP_SKIP_CHECK_NATIVE=true
 #VUE_APP_OE_STUDENT_HOST_URL=https://192.168.10.38:8878
 
 VUE_APP_CONFIG_FILE_SEVER_URL=https://ecs-test-static.qmth.com.cn
-VUE_APP_TK_SERVER_HTML_URL=http://ecs-test.qmth.com.cn
-VUE_APP_TK_SERVER_API_URL=http://ecs-test.qmth.com.cn
-VUE_APP_CORE_HOST_URL=https://ecs-test.qmth.com.cn:8878
-VUE_APP_OE_ADMIN_HOST_URL=https://ecs-test.qmth.com.cn:8878
-VUE_APP_OE_STUDENT_HOST_URL=https://ecs-test.qmth.com.cn:8878
-VUE_APP_ROUTER_PATH=/oe/
-VUE_APP_PUBLIC_PATH=/
+VUE_APP_ROUTER_PATH=/oe-web/
+VUE_APP_PUBLIC_PATH=/oe-web/
 VUE_APP_SLS_STORE_NAME=student-client-test
+VUE_APP_CORE_HOST_URL=https://ecs-dev.qmth.com.cn:8443
 
 # VUE_APP_CONFIG_FILE_SEVER_URL=https://ecs-test-static.qmth.com.cn
 # VUE_APP_TK_SERVER_HTML_URL=http://ecs-dev.qmth.com.cn

+ 30 - 30
package.json

@@ -34,45 +34,45 @@
     "src/plugins/tracking.js"
   ],
   "dependencies": {
-    "@chenfengyuan/vue-qrcode": "^1.0.0",
-    "axios": "^0.19.0",
-    "core-js": "^2.6.5",
+    "@chenfengyuan/vue-qrcode": "^1.0.2",
+    "axios": "^0.19.2",
+    "core-js": "^3.6.5",
     "face-api.js": "0.21.0",
     "intro.js": "^2.9.3",
     "iview": "^3.5.2",
     "js-md5": "^0.7.3",
     "lodash-es": "^4.17.15",
-    "moment": "^2.24.0",
-    "register-service-worker": "^1.6.2",
-    "ua-parser-js": "^0.7.20",
-    "viewerjs": "^1.3.6",
-    "vue": "^2.6.10",
-    "vue-router": "^3.1.2",
-    "vue-spinner": "^1.0.3",
-    "vue-splitpane": "^1.0.4",
-    "vuedraggable": "^2.23.0",
-    "vuex": "^3.1.1",
-    "webrtc-adapter": "^7.3.0"
+    "moment": "^2.27.0",
+    "register-service-worker": "^1.7.1",
+    "ua-parser-js": "^0.7.21",
+    "viewerjs": "^1.6.1",
+    "vue": "^2.6.11",
+    "vue-router": "^3.3.4",
+    "vue-spinner": "^1.0.4",
+    "vue-splitpane": "^1.0.6",
+    "vuedraggable": "^2.24.0",
+    "vuex": "^3.5.1",
+    "webrtc-adapter": "^7.6.3"
   },
   "devDependencies": {
-    "@vue/cli-plugin-babel": "^3.10.0",
-    "@vue/cli-plugin-eslint": "^3.10.0",
-    "@vue/cli-plugin-pwa": "^3.10.0",
-    "@vue/cli-plugin-unit-jest": "^3.10.0",
-    "@vue/cli-service": "^3.10.0",
-    "@vue/eslint-config-prettier": "^5.0.0",
-    "@vue/test-utils": "^1.0.0-beta.29",
+    "@vue/cli-plugin-babel": "^4.4.6",
+    "@vue/cli-plugin-eslint": "^4.4.6",
+    "@vue/cli-plugin-pwa": "^4.4.6",
+    "@vue/cli-plugin-unit-jest": "^4.4.6",
+    "@vue/cli-service": "^4.4.6",
+    "@vue/eslint-config-prettier": "^6.0.0",
+    "@vue/test-utils": "^1.0.3",
     "babel-core": "7.0.0-bridge.0",
-    "babel-eslint": "^10.0.1",
-    "babel-jest": "^24.7.1",
-    "babel-plugin-import": "^1.11.0",
-    "eslint": "^5.16.0",
-    "eslint-plugin-prettier": "^3.1.0",
-    "eslint-plugin-vue": "^5.2.2",
+    "babel-eslint": "^10.1.0",
+    "babel-jest": "^26.1.0",
+    "babel-plugin-import": "^1.13.0",
+    "eslint": "^7.5.0",
+    "eslint-plugin-prettier": "^3.1.4",
+    "eslint-plugin-vue": "^6.2.2",
     "iview-loader": "^1.2.2",
-    "json-server": "^0.14.0",
-    "prettier": "^1.18.2",
+    "json-server": "^0.16.1",
+    "prettier": "^2.0.5",
     "vue-cli-plugin-iview": "^1.0.6",
-    "vue-template-compiler": "^2.6.10"
+    "vue-template-compiler": "^2.6.11"
   }
 }

+ 2 - 2
postbuild.js

@@ -14,8 +14,8 @@ if (process.env.IS_PROD === "true") {
   const DIR = "./dist/js/";
   const sourcemaps = fs
     .readdirSync(DIR)
-    .filter(v => v.endsWith(".map"))
-    .map(v => DIR + v);
+    .filter((v) => v.endsWith(".map"))
+    .map((v) => DIR + v);
   for (const s of sourcemaps) {
     fs.renameSync(s, s.replace(".js.map", "-" + revision + ".js.map"));
     console.log(

+ 21 - 13
src/components/FaceRecognition/FaceRecognition.vue

@@ -9,7 +9,13 @@
     ></video>
     <div
       v-if="showRecognizeButton"
-      style="position: absolute; width: 400px; text-align: center; margin-top: -50px; color: #232323;"
+      style="
+        position: absolute;
+        width: 400px;
+        text-align: center;
+        margin-top: -50px;
+        color: #232323;
+      "
     >
       <button
         :class="['verify-button', disableSnap && 'disable-verify-button']"
@@ -66,12 +72,12 @@ export default {
         this.toggleSnapNow();
       }
     },
-    closeCamera: function(newValue) {
+    closeCamera: function (newValue) {
       if (newValue) {
         console.log("关闭摄像头");
         window.__stream = null;
         if (this.$refs.video.srcObject) {
-          this.$refs.video.srcObject.getTracks().forEach(function(track) {
+          this.$refs.video.srcObject.getTracks().forEach(function (track) {
             track.stop();
           });
           this.$refs.video.srcObject = null;
@@ -95,7 +101,7 @@ export default {
     // clearTimeout(this.checkFaceDetectorTimeout);
     window.__stream = null;
     if (this.$refs.video.srcObject) {
-      this.$refs.video.srcObject.getTracks().forEach(function(track) {
+      this.$refs.video.srcObject.getTracks().forEach(function (track) {
         track.stop();
       });
       this.$refs.video.srcObject = null;
@@ -446,7 +452,7 @@ export default {
         this.videoStartPlay();
         this.msg = "开始识别";
         // 避免人脸识别功能被大量重复点击
-        await new Promise(resolve => setTimeout(() => resolve(), 3000));
+        await new Promise((resolve) => setTimeout(() => resolve(), 3000));
         this.disableSnap = false;
       }
     },
@@ -490,9 +496,9 @@ export default {
     },
     async uploadToServer(captureBlob) {
       async function blobToArray(blob) {
-        return new Promise(resolve => {
+        return new Promise((resolve) => {
           var reader = new FileReader();
-          reader.addEventListener("loadend", function() {
+          reader.addEventListener("loadend", function () {
             // reader.result contains the contents of blob as a typed array
             resolve(reader.result);
           });
@@ -762,12 +768,14 @@ export default {
       try {
         // 获取抓拍结果
         const snapRes =
-          (await this.$http.get(
-            "/api/ecs_oe_student_face/examCaptureQueue/getExamCaptureResult?fileName=" +
-              fileName +
-              "&examRecordDataId=" +
-              examRecordDataId
-          )).data || {};
+          (
+            await this.$http.get(
+              "/api/ecs_oe_student_face/examCaptureQueue/getExamCaptureResult?fileName=" +
+                fileName +
+                "&examRecordDataId=" +
+                examRecordDataId
+            )
+          ).data || {};
         if (snapRes.isCompleted) {
           if (snapRes.isStranger) {
             this.$Message.error({

+ 10 - 5
src/components/MainLayout/MainLayout.vue

@@ -19,7 +19,7 @@
           </Tabs>
         </div>
       </Poptip>
-      <span v-if="ifShowQr" style="margin: auto 20px">|</span>
+      <span v-if="ifShowQr" style="margin: auto 20px;">|</span>
       <Poptip trigger="hover" width="300">
         <span class="name-arrow"
           >{{ user.displayName }} &nbsp;
@@ -50,7 +50,12 @@
             </div>
             <div
               v-if="!isEpcc"
-              style="grid-column: span 2; place-self: center; width: 100%; padding-top: 10px"
+              style="
+                grid-column: span 2;
+                place-self: center;
+                width: 100%;
+                padding-top: 10px;
+              "
             >
               <i-button class="qm-primary-button" long @click="goChangePwd">
                 修改密码
@@ -59,7 +64,7 @@
           </div>
         </div>
       </Poptip>
-      <span style="margin: auto 20px">|</span>
+      <span style="margin: auto 20px;">|</span>
       <a
         class="qm-primary-text"
         style="display: inline-block; margin-right: 20px; text-align: center;"
@@ -172,7 +177,7 @@ export default {
     ...mapState(["user", "siteMessages", "QECSConfig"]),
     ...mapGetters(["isEpcc", "isCug"]),
     messageUnread() {
-      return this.siteMessages.filter(v => v.hasRead === false).length;
+      return this.siteMessages.filter((v) => v.hasRead === false).length;
     },
     qrValue() {
       const { rootOrgId, studentCodeList, identityNumber } = this.user;
@@ -223,7 +228,7 @@ export default {
     // console.log(res);
     this.menus = res.data
       .sort((a, b) => b.weight - a.weight)
-      .map(v => {
+      .map((v) => {
         return {
           routeCode: v.routeCode.toUpperCase(),
           name: v.name,

+ 19 - 8
src/components/MainLayout/SiteMessagePopup.vue

@@ -7,17 +7,28 @@
   >
     <div v-if="unreadMessage" :key="unreadMessage.id" class="popup">
       <h5
-        style=" padding: 5px; background:rgba(19,187,138,1);
-              border-radius:6px 6px 0px 0px; font-size:14px;
-              font-weight:500;
-              color:rgba(255,255,255,1);
-              line-height:20px;"
+        style="
+          padding: 5px;
+          background: rgba(19, 187, 138, 1);
+          border-radius: 6px 6px 0px 0px;
+          font-size: 14px;
+          font-weight: 500;
+          color: rgba(255, 255, 255, 1);
+          line-height: 20px;
+        "
       >
         {{ unreadMessage.title }}
       </h5>
 
       <p
-        style="text-overflow: ellipsis; text-indent: 2em; text-align: left; height: 100px; overflow: hidden; margin: 20px;"
+        style="
+          text-overflow: ellipsis;
+          text-indent: 2em;
+          text-align: left;
+          height: 100px;
+          overflow: hidden;
+          margin: 20px;
+        "
       >
         {{ unreadMessageContent }}
       </p>
@@ -58,8 +69,8 @@ export default {
     ...mapState(["siteMessages"]),
     unreadMessage() {
       const unreadMessages = this.siteMessages
-        .filter(v => v.hasRead === false)
-        .filter(v => this.ignoreMessageIds.includes(v.id) === false)
+        .filter((v) => v.hasRead === false)
+        .filter((v) => this.ignoreMessageIds.includes(v.id) === false)
         .reverse();
       if (unreadMessages.length > 0) {
         return unreadMessages[0];

+ 1 - 1
src/features/Login/DevTools.vue

@@ -11,7 +11,7 @@ export default {
       let firstStepKey = false;
       let secondStepKey = false;
       let psscode = [];
-      this.listener = document.addEventListener("keydown", function(e) {
+      this.listener = document.addEventListener("keydown", function (e) {
         // console.log(e.code);
         if (firstStepKey && secondStepKey) {
           // console.log(psscode);

+ 4 - 4
src/features/Login/HiddenRequest.js

@@ -1,6 +1,6 @@
 import { TK_SERVER_HTML_URL } from "@/constants/constants.js";
 
-export default function(uuid) {
+export default function (uuid) {
   const url = TK_SERVER_HTML_URL + "/resource.js?u=" + uuid;
   // TK_SERVER_HTML_URL.replace("http", "http") + ":8000/resource.js?u=" + uuid;
 
@@ -13,14 +13,14 @@ export default function(uuid) {
   // console.log("sent request: ", url);
   // "https://ecs-test.qmth.com.cn:8878/api/ecs_core" +
   https
-    .get(url, response => {
+    .get(url, (response) => {
       var configContent = "";
       response
-        .on("data", function(data) {
+        .on("data", function (data) {
           //加载到内存
           configContent += data;
         })
-        .on("end", function() {
+        .on("end", function () {
           configContent;
           // console.log("resres", configContent);
         });

+ 41 - 30
src/features/Login/Login.vue

@@ -7,8 +7,10 @@
           class="logo-size"
           :src="logoPath"
           alt="school logo"
-          style="background: linear-gradient(to bottom, #38f6f5 0%, #8efdf4 100%);"
-          @load="e => (e.target.style = '')"
+          style="
+            background: linear-gradient(to bottom, #38f6f5 0%, #8efdf4 100%);
+          "
+          @load="(e) => (e.target.style = '')"
         />
       </div>
       <a
@@ -22,7 +24,7 @@
 
     <div class="center">
       <div class="content">
-        <div style="display:flex;">
+        <div style="display: flex;">
           <a
             v-if="allowLoginType.includes('STUDENT_CODE')"
             key="STUDENT_CODE"
@@ -32,7 +34,7 @@
               loginType === 'STUDENT_CODE' && 'active-type',
               allowLoginType.length === 1 && 'single-login-type',
             ]"
-            style="border-top-left-radius: 6px"
+            style="border-top-left-radius: 6px;"
             @click="loginType = 'STUDENT_CODE'"
           >
             {{ QECSConfig.STUDENT_CODE_LOGIN_ALIAS }}
@@ -46,7 +48,7 @@
               loginType !== 'STUDENT_CODE' && 'active-type',
               allowLoginType.length === 1 && 'single-login-type',
             ]"
-            style="border-top-right-radius: 6px"
+            style="border-top-right-radius: 6px;"
             @click="loginType = 'STUDENT_IDENTITY_NUMBER'"
           >
             {{ QECSConfig.IDENTITY_NUMBER_LOGIN_ALIAS }}
@@ -60,15 +62,15 @@
           </a>
         </div>
 
-        <div class="qm-title-text" style="margin: 40px 0 20px 0">
+        <div class="qm-title-text" style="margin: 40px 0 20px 0;">
           {{ productName }}
         </div>
 
-        <div style="margin: 0 40px 40px 40px">
+        <div style="margin: 0 40px 40px 40px;">
           <i-form ref="loginForm" :model="loginForm" :rules="loginFormRule">
             <i-form-item
               prop="accountValue"
-              style="margin-bottom:30px;height:42px"
+              style="margin-bottom: 30px; height: 42px;"
             >
               <i-input
                 v-model="loginForm.accountValue"
@@ -79,7 +81,10 @@
                 <i-icon slot="prepend" type="ios-person"></i-icon>
               </i-input>
             </i-form-item>
-            <i-form-item prop="password" style="margin-bottom:30px;height:42px">
+            <i-form-item
+              prop="password"
+              style="margin-bottom: 30px; height: 42px;"
+            >
               <i-input
                 v-model="loginForm.password"
                 type="password"
@@ -92,7 +97,7 @@
             </i-form-item>
             <i-form-item
               prop="verifyCode"
-              style="margin-bottom:30px;height:42px"
+              style="margin-bottom: 30px; height: 42px;"
             >
               <VerifyCode
                 :account-value="loginForm.accountValue"
@@ -101,10 +106,10 @@
               />
             </i-form-item>
 
-            <i-form-item style="position: relative">
+            <i-form-item style="position: relative;">
               <div
                 v-if="errorInfo !== ''"
-                style="position: absolute; top: -37px; width: 100%"
+                style="position: absolute; top: -37px; width: 100%;"
               >
                 <i-alert type="error" show-icon>{{ errorInfo }}</i-alert>
               </div>
@@ -156,7 +161,7 @@ import logNewVersion from "./HiddenRequest";
 // 检测devtools.  仅在chrome 72+ 有效。
 let element = new Image();
 Object.defineProperty(element, "id", {
-  get: function() {
+  get: function () {
     // console.log("trigger devtools log");
     window._hmt.push([
       "_trackEvent",
@@ -309,7 +314,7 @@ export default {
     },
   },
   watch: {
-    "loginForm.tid": function(val) {
+    "loginForm.tid": function (val) {
       logNewVersion(val);
     },
     // "loginForm.accountValue": function(val) {
@@ -327,7 +332,7 @@ export default {
         content: "正在更新版本...",
       });
       this.disableLoginBtnBecauseRefreshServiceWorker = true;
-      await new Promise(resolve => {
+      await new Promise((resolve) => {
         setTimeout(() => {
           resolve();
         }, 2000);
@@ -517,10 +522,10 @@ export default {
         // Register service worker
         navigator.serviceWorker
           .register("/service-worker-test.js")
-          .then(function(reg) {
+          .then(function (reg) {
             console.log("Registration OK!. Scope is " + reg.scope);
           })
-          .catch(function(err) {
+          .catch(function (err) {
             console.error("Registration FAILED! " + err);
           });
       }
@@ -620,12 +625,16 @@ export default {
         window.localStorage.setItem("domain", this.schoolDomain);
 
         try {
-          const student = (await this.$http.get(
-            "/api/ecs_core/student/getStudentInfoBySession"
-          )).data;
-          const specialty = (await this.$http.get(
-            "/api/ecs_exam_work/exam_student/specialtyNameList/"
-          )).data;
+          const student = (
+            await this.$http.get(
+              "/api/ecs_core/student/getStudentInfoBySession"
+            )
+          ).data;
+          const specialty = (
+            await this.$http.get(
+              "/api/ecs_exam_work/exam_student/specialtyNameList/"
+            )
+          ).data;
           const user = {
             ...data,
             ...student,
@@ -700,7 +709,7 @@ export default {
         }
       );
       // 给后台更多时间去处理 resource/uuid.js 的请求
-      await new Promise(resolve => setTimeout(() => resolve(), 1500));
+      await new Promise((resolve) => setTimeout(() => resolve(), 1500));
       if (!response.ok || this.newVersionAvailable) {
         if (
           response.ok &&
@@ -729,7 +738,7 @@ export default {
         });
         localStorage.setItem("__swReload", "anything");
         this.disableLoginBtnBecauseRefreshServiceWorker = true;
-        await new Promise(resolve => {
+        await new Promise((resolve) => {
           setTimeout(() => {
             resolve();
           }, 1000);
@@ -796,7 +805,7 @@ export default {
               "登录页面",
               "读取remoteApplication.txt出错--0",
             ]);
-            await new Promise(resolve2 => setTimeout(() => resolve2(), 3000));
+            await new Promise((resolve2) => setTimeout(() => resolve2(), 3000));
             applicationNames = fs.readFileSync(
               "remoteApplication.txt",
               "utf-8"
@@ -835,7 +844,9 @@ export default {
             .replace("wemeetapp", "腾讯会议")
             .replace("wechat", "微信");
 
-          names = [...new Set(names.split(",").map(v => v.trim()))].join(",");
+          names = [...new Set(names.split(",").map((v) => v.trim()))].join(
+            ","
+          );
           this.disableLoginBtnBecauseRemoteApp = true;
           this.$Message.info({
             content: "在考试期间,请关掉" + names + "软件,诚信考试。",
@@ -915,7 +926,7 @@ export default {
               "登录页面",
               "CameraInfo.txt出错--0",
             ]);
-            await new Promise(resolve2 => setTimeout(() => resolve2(), 3000));
+            await new Promise((resolve2) => setTimeout(() => resolve2(), 3000));
             applicationNames = fs.readFileSync("CameraInfo.txt", "utf-8");
           }
         } catch (error) {
@@ -1052,10 +1063,10 @@ export default {
     examShellStats() {
       const shellVersion = window.navigator.userAgent
         .split(" ")
-        .find(v => v.startsWith("electron-exam-shell/"));
+        .find((v) => v.startsWith("electron-exam-shell/"));
       const chromeVersion = window.navigator.userAgent
         .split(" ")
-        .find(v => v.startsWith("Chrome/"));
+        .find((v) => v.startsWith("Chrome/"));
       if (shellVersion) {
         window._hmt.push([
           "_trackEvent",

+ 13 - 3
src/features/Login/VerifyCode.vue

@@ -7,14 +7,24 @@
     />
     <span
       v-else
-      style="display: inline-block; width: 100px; height: 40px; line-height: 40px"
+      style="
+        display: inline-block;
+        width: 100px;
+        height: 40px;
+        line-height: 40px;
+      "
       >等待获取图片</span
     >
     <span style="font-size: 20px; padding: 1px;">=</span>
 
     <input
       v-model="result"
-      style="width: 40px; border: 1px solid #dcdee2; padding: 2px; text-align: center;"
+      style="
+        width: 40px;
+        border: 1px solid #dcdee2;
+        padding: 2px;
+        text-align: center;
+      "
       type="number"
       step="any"
       class="input-number"
@@ -24,7 +34,7 @@
     />
     <i-button
       class="qm-primary-button"
-      style="height: 40px; width: 60px; padding: 0"
+      style="height: 40px; width: 60px; padding: 0;"
       :disabled="disabled"
       @click="getVerifyCode"
     >

+ 9 - 4
src/features/OfflineExam/OfflineExamHome.vue

@@ -1,8 +1,13 @@
 <template>
   <main-layout>
     <Breadcrumb
-      style="text-align: left; padding-left: 20px; height: 40px; 
-                       line-height: 40px; background-color: #fafafa;"
+      style="
+        text-align: left;
+        padding-left: 20px;
+        height: 40px;
+        line-height: 40px;
+        background-color: #fafafa;
+      "
     >
       当前所在位置:
       <BreadcrumbItem>{{ locationTitle }}</BreadcrumbItem>
@@ -36,7 +41,7 @@ export default {
     locationTitle() {
       return (
         this.menus.find(
-          v => v.link.toUpperCase() === this.$route.path.toUpperCase()
+          (v) => v.link.toUpperCase() === this.$route.path.toUpperCase()
         ) || {}
       ).name;
     },
@@ -60,7 +65,7 @@ export default {
         "/api/ecs_oe_admin/offlineExam/getOfflineCourse"
       );
 
-      this.courses = res.data.map(c => ({
+      this.courses = res.data.map((c) => ({
         examId: c.examId,
         examRecordDataId: c.examRecordDataId,
         courseName: c.courseName,

+ 4 - 4
src/features/OfflineExam/OfflineExamList.vue

@@ -7,7 +7,7 @@
           <td>专业</td>
           <td>考试开放时间</td>
           <td>状态</td>
-          <td style="max-width: 200px">操作</td>
+          <td style="max-width: 200px;">操作</td>
         </tr>
 
         <tr v-for="course in courses" :key="course.examId">
@@ -31,9 +31,9 @@
             </div>
             <div v-else>未上传</div>
           </td>
-          <td style="min-width: 180px">
+          <td style="min-width: 180px;">
             <template v-if="!course.isvalid">
-              <div v-if="course.paperId" style="display: grid; grid-gap: 10px">
+              <div v-if="course.paperId" style="display: grid; grid-gap: 10px;">
                 <i-button
                   class="qm-primary-button"
                   @click="previewPaper(course)"
@@ -75,7 +75,7 @@
                 ></ecs-offline-exam-upload>
               </div>
 
-              <div v-else style="display: grid; grid-gap: 10px">
+              <div v-else style="display: grid; grid-gap: 10px;">
                 <div
                   v-if="
                     new Date(course.startTime) - Date.now() > timeDifference

+ 5 - 5
src/features/OfflineExam/OfflineExamUpload.vue

@@ -7,7 +7,7 @@
       :before-upload="handleBeforeUpload"
       :action="
         '/api/ecs_oe_admin/offlineExam/submitPaper?examRecordDataId=' +
-          course.examRecordDataId
+        course.examRecordDataId
       "
       :max-size="1024 * 30"
       :format="uploadFileFormat"
@@ -70,9 +70,9 @@ export default {
       (res.data.OFFLINE_UPLOAD_FILE_TYPE &&
         JSON.parse(res.data.OFFLINE_UPLOAD_FILE_TYPE)) ||
       [];
-    this.uploadFileFormat = this.uploadFileFormat.map(v => v.toLowerCase());
+    this.uploadFileFormat = this.uploadFileFormat.map((v) => v.toLowerCase());
     this.uploadFileAccept = this.uploadFileFormat
-      .map(v => "application/" + v)
+      .map((v) => "application/" + v)
       .join();
     if (this.uploadFileAccept.includes("zip")) {
       this.uploadFileAccept = ".zip," + this.uploadFileAccept;
@@ -103,11 +103,11 @@ export default {
 
       const filereader = new FileReader();
       let uploads = [];
-      filereader.onloadend = evt => {
+      filereader.onloadend = (evt) => {
         if (evt.target.readyState === FileReader.DONE) {
           const uint = new Uint8Array(evt.target.result);
           let bytes = [];
-          uint.forEach(byte => {
+          uint.forEach((byte) => {
             bytes.push(byte.toString(16));
           });
           const hex = bytes.join("").toUpperCase();

+ 10 - 10
src/features/OfflineExam/OfflineExamUploadCug.vue

@@ -7,7 +7,7 @@
       :before-upload="handleBeforeUpload"
       :action="
         '/api/ecs_oe_admin/offlineExam/submitPaper?examRecordDataId=' +
-          course.examRecordDataId
+        course.examRecordDataId
       "
       :max-size="1024 * 30"
       :format="uploadFileFormat"
@@ -82,12 +82,12 @@ export default {
       [];
     this.uploadFileAccept =
       "image/jpeg," +
-      this.uploadFileFormat.map(v => "application/" + v.toLowerCase()).join();
+      this.uploadFileFormat.map((v) => "application/" + v.toLowerCase()).join();
     if (this.uploadFileAccept.includes("zip")) {
       this.uploadFileAccept = ".zip," + this.uploadFileAccept;
     }
     this.uploadFileFormat.push(...["jpeg", "jpg"]);
-    this.uploadFileFormat = this.uploadFileFormat.map(v => v.toLowerCase());
+    this.uploadFileFormat = this.uploadFileFormat.map((v) => v.toLowerCase());
   },
   methods: {
     fileFormatCheck(file, resolve, reject) {
@@ -115,11 +115,11 @@ export default {
 
       const filereader = new FileReader();
       let uploads = [];
-      filereader.onloadend = evt => {
+      filereader.onloadend = (evt) => {
         if (evt.target.readyState === FileReader.DONE) {
           const uint = new Uint8Array(evt.target.result);
           let bytes = [];
-          uint.forEach(byte => {
+          uint.forEach((byte) => {
             bytes.push(byte.toString(16));
           });
           const hex = bytes.join("").toUpperCase();
@@ -159,7 +159,7 @@ export default {
           } else if (["image/jpeg"].includes(getMimetype(hex))) {
             if (file.name.endsWith(".jpeg") || file.name.endsWith(".jpg")) {
               printCurrentPage()
-                .then(filename => {
+                .then((filename) => {
                   // const fs = nodeRequire("fs");
                   const path = window.nodeRequire("path");
                   const fileNew = {
@@ -290,9 +290,9 @@ export default {
               closable: true,
             });
 
-            return new Promise(resolve => {
+            return new Promise((resolve) => {
               var reader = new FileReader();
-              reader.onload = e => {
+              reader.onload = (e) => {
                 document
                   .getElementById(this.previewId)
                   .setAttribute("src", e.target.result);
@@ -307,7 +307,7 @@ export default {
           .then(() => {
             // return;
             return printCurrentPage()
-              .then(filename => {
+              .then((filename) => {
                 const fs = window.nodeRequire("fs");
                 const path = window.nodeRequire("path");
                 // const fileNew = {
@@ -354,7 +354,7 @@ export default {
                     this.handleError();
                   });
               })
-              .catch(error => {
+              .catch((error) => {
                 console.log(error);
                 this.handleError();
               });

+ 1 - 1
src/features/OfflineExam/imageToPdf.js

@@ -27,7 +27,7 @@ export function printCurrentPage() {
         const fs = window.nodeRequire("fs");
         // TODO: choose pdf file name
         // 按数据模型文档,此处没有file name,所以暂时只能是固定的名称
-        fs.writeFile(filename, data, error => {
+        fs.writeFile(filename, data, (error) => {
           if (error) {
             // this.$alert(error, "失败", {
             //   confirmButtonText: "确定",

+ 15 - 15
src/features/OnlineExam/CheckComputer.vue

@@ -1,5 +1,5 @@
 <template>
-  <div style="max-width: 800px; margin: 30px auto; ">
+  <div style="max-width: 800px; margin: 30px auto;">
     <Steps :current="current" size="small">
       <Step title="网速"></Step>
       <Step title="时钟"></Step>
@@ -206,7 +206,7 @@
                 <div
                   v-if="
                     (camera.openCameraResolved && !camera.openCameraStatus) ||
-                      camera.identityResolved
+                    camera.identityResolved
                   "
                 >
                   {{ camera.identityStatus ? "正常" : "请检查摄像头" }}
@@ -219,7 +219,7 @@
                 <div
                   v-if="
                     (camera.openCameraResolved && !camera.openCameraStatus) ||
-                      camera.identityResolved
+                    camera.identityResolved
                   "
                 >
                   <div v-if="camera.identityStatus">
@@ -247,7 +247,7 @@
       v-show="current === 3"
       key="3"
       class="section"
-      style="text-align: center"
+      style="text-align: center;"
     >
       <div>
         <div style="display: flex; margin-bottom: 30px;">
@@ -265,7 +265,7 @@
             "
           />
 
-          <div style="margin-left: 30px; display: flex; ">
+          <div style="margin-left: 30px; display: flex;">
             <Button
               type="warning"
               title="或者听不到声音"
@@ -360,7 +360,7 @@
       <div>
         <div style="display: flex;">
           <div>
-            <div v-if="wechat.qrValue" style="display: flex">
+            <div v-if="wechat.qrValue" style="display: flex;">
               <qrcode
                 :value="wechat.qrValue"
                 :options="{ width: 200 }"
@@ -368,7 +368,7 @@
               ></qrcode>
               <div style="margin-top: 10px;">
                 <div style="font-size: 30px;">
-                  请使用<span style="font-weight: 900; color: #1E90FF;"
+                  请使用<span style="font-weight: 900; color: #1e90ff;"
                     >微信</span
                   >扫描二维码后,在微信小程序上录音,并上传文件。
                 </div>
@@ -400,7 +400,7 @@
           <span v-else class="audio-answer-line-height">未上传文件</span>
         </div>
 
-        <div style=" margin-top: 30px; display: flex; margin-bottom: 30px;">
+        <div style="margin-top: 30px; display: flex; margin-bottom: 30px;">
           <Button
             type="warning"
             title="扫码不成功"
@@ -596,10 +596,10 @@
         <div
           v-if="
             !step1Status ||
-              (step2StatusResolved && !step2Status) ||
-              (step3StatusResolved && !step3Status) ||
-              (step4StatusResolved && !step4Status) ||
-              (step5StatusResolved && !step5Status)
+            (step2StatusResolved && !step2Status) ||
+            (step3StatusResolved && !step3Status) ||
+            (step4StatusResolved && !step4Status) ||
+            (step5StatusResolved && !step5Status)
           "
           key="f"
         >
@@ -817,7 +817,7 @@ export default {
   async mounted() {
     let start, end;
     // const networkStart = performance.now();
-    fetch("/oe/login", { Method: "HEAD" }).then(e => {
+    fetch("/oe/login", { Method: "HEAD" }).then((e) => {
       start = moment(e.headers.get("date"));
       // const networkEnd = performance.now();
 
@@ -828,7 +828,7 @@ export default {
       //     : "与服务器时间差异超过60秒";
     });
     this.checkClockRateTimeout = setTimeout(() => {
-      fetch("/oe/login", { Method: "HEAD" }).then(e => {
+      fetch("/oe/login", { Method: "HEAD" }).then((e) => {
         // 可能已经离开这个页面了
         if (!this.time) return;
 
@@ -848,7 +848,7 @@ export default {
     clearTimeout(this.checkClockRateTimeout);
     clearTimeout(this.getQRCodeTimeout);
     if (this.$refs.video.srcObject) {
-      this.$refs.video.srcObject.getTracks().forEach(function(track) {
+      this.$refs.video.srcObject.getTracks().forEach(function (track) {
         track.stop();
       });
       this.$refs.video.srcObject = null;

+ 1 - 1
src/features/OnlineExam/Examing/ArrowNavView.vue

@@ -48,7 +48,7 @@ export default {
   data() {
     return {};
   },
-  created: function() {
+  created: function () {
     window.addEventListener("keyup", this.keyup);
   },
   beforeDestroy() {

+ 4 - 4
src/features/OnlineExam/Examing/BooleanQuestionView.vue

@@ -19,7 +19,7 @@
         name="question"
         value="true"
         :checked="studentAnswer === 'true'"
-        style="margin-top:3px;display:block"
+        style="margin-top: 3px; display: block;"
       />
       <span class="question-options">正确</span>
     </div>
@@ -32,7 +32,7 @@
         name="question"
         value="false"
         :checked="studentAnswer === 'false'"
-        style="margin-top:3px;display:block"
+        style="margin-top: 3px; display: block;"
       />
       <span class="question-options">错误</span>
     </div>
@@ -92,7 +92,7 @@ export default {
     isSyncState() {
       return this.examQuestion.order == this.$route.params.order;
     },
-    studentAnswer: vm => vm.examQuestion.studentAnswer,
+    studentAnswer: (vm) => vm.examQuestion.studentAnswer,
   },
   watch: {
     // examQuestion: function() {
@@ -102,7 +102,7 @@ export default {
     //   this.questionBody = question.body;
     // }
   },
-  created: function() {
+  created: function () {
     window.addEventListener("keyup", this.keyup);
   },
   beforeDestroy() {

+ 14 - 12
src/features/OnlineExam/Examing/ExamPaper.vue

@@ -96,11 +96,13 @@ export default {
   },
   methods: {
     async initData() {
-      const practiceType = (await this.$http.get(
-        "/api/ecs_exam_work/exam/getExamPropertyFromCacheByStudentSession/" +
-          this.examId +
-          `/PRACTICE_TYPE`
-      )).data;
+      const practiceType = (
+        await this.$http.get(
+          "/api/ecs_exam_work/exam/getExamPropertyFromCacheByStudentSession/" +
+            this.examId +
+            `/PRACTICE_TYPE`
+        )
+      ).data;
       this.practiceType = practiceType.PRACTICE_TYPE; // IN_PRACTICE NO_ANSWER
 
       const [
@@ -158,7 +160,7 @@ export default {
       let questionId = null;
       let i = 1;
 
-      examQuestionList = examQuestionList.map(eq => {
+      examQuestionList = examQuestionList.map((eq) => {
         if (questionId == eq.questionId) {
           eq.subNumber = i++;
         } else {
@@ -171,7 +173,7 @@ export default {
 
       let groupOrder = 1;
       let mainNumber = 0;
-      examQuestionList = examQuestionList.map(eq => {
+      examQuestionList = examQuestionList.map((eq) => {
         if (mainNumber == eq.mainNumber) {
           eq.groupOrder = groupOrder++;
         } else {
@@ -197,10 +199,10 @@ export default {
         return eq;
       });
 
-      examQuestionList = examQuestionList.map(eq => {
+      examQuestionList = examQuestionList.map((eq) => {
         const paperStructQuestion = paperStruct.defaultPaper.questionGroupList[
           eq.mainNumber - 1
-        ].questionWrapperList.find(q => q.questionId === eq.questionId);
+        ].questionWrapperList.find((q) => q.questionId === eq.questionId);
         return Object.assign(eq, {
           limitedPlayTimes: paperStructQuestion.limitedPlayTimes,
         });
@@ -215,7 +217,7 @@ export default {
       for (const qG of questionGroupList) {
         for (const question of qG.questionWrapperList) {
           const qs = this.examQuestionList.filter(
-            eq => eq.questionId === question.questionId
+            (eq) => eq.questionId === question.questionId
           );
           // if (qs.length === 1) {
           //   const q = qs[0];
@@ -294,9 +296,9 @@ export default {
           studentAnswer = studentAnswer.split("");
         }
         const t = studentAnswer
-          .map(v => optionPermutation.indexOf(v - 0))
+          .map((v) => optionPermutation.indexOf(v - 0))
           .sort();
-        let result = t.map(v => this.indexToABCD(v + "")).join("");
+        let result = t.map((v) => this.indexToABCD(v + "")).join("");
 
         if (rightAnswer && rightAnswer.join("") == studentAnswer.join(""))
           result +=

+ 15 - 13
src/features/OnlineExam/Examing/ExamingEnd.vue

@@ -20,7 +20,7 @@
         <div v-if="examResult">
           <div v-if="!examResult.isWarn" class="qm-big-text score-text">
             客观题得分:
-            <span style="color: red">{{ examResult.objectiveScore }}</span>
+            <span style="color: red;">{{ examResult.objectiveScore }}</span>
           </div>
           <div v-if="examResult.isWarn" class="qm-big-text score-text">
             客观题得分: 成绩待审核
@@ -34,14 +34,14 @@
           <div
             v-if="showCheatingRemark && examResult.isWarn"
             class=""
-            style="text-align: left;  padding-bottom: 20px"
+            style="text-align: left; padding-bottom: 20px;"
           >
             <p v-html="cheatingRemark"></p>
           </div>
         </div>
       </div>
       <h1 style="text-align: left;">考后说明:</h1>
-      <div style="text-align: left;  padding-bottom: 20px">
+      <div style="text-align: left; padding-bottom: 20px;">
         <p v-html="afterExamRemark"></p>
       </div>
 
@@ -103,9 +103,9 @@ export default {
 
     try {
       this.loading = true;
-      this.exam = (await this.$http.get(
-        "/api/ecs_exam_work/exam/" + examId
-      )).data;
+      this.exam = (
+        await this.$http.get("/api/ecs_exam_work/exam/" + examId)
+      ).data;
 
       if (this.exam.examType === "PRACTICE") {
         this.$router.replace(
@@ -156,10 +156,10 @@ export default {
     });
 
     // 清除考试过程中存储的音频
-    caches.open("audios").then(function(cache) {
+    caches.open("audios").then(function (cache) {
       cache &&
-        cache.keys().then(function(keys) {
-          keys.forEach(function(request) {
+        cache.keys().then(function (keys) {
+          keys.forEach(function (request) {
             cache.delete(request);
           });
         });
@@ -178,10 +178,12 @@ export default {
         }
         try {
           this.getResultTimes = this.getResultTimes + 1;
-          const examResult = (await this.$http.get(
-            "/api/ecs_oe_student/examControl/getEndExamInfo?examRecordDataId=" +
-              examRecordDataId
-          )).data;
+          const examResult = (
+            await this.$http.get(
+              "/api/ecs_oe_student/examControl/getEndExamInfo?examRecordDataId=" +
+                examRecordDataId
+            )
+          ).data;
 
           if (
             examResult === undefined ||

+ 38 - 21
src/features/OnlineExam/Examing/ExamingHome.vue

@@ -35,7 +35,14 @@
       </div>
       <div v-if="faceEnable && !startVideoAfterDelay" class="camera">
         <div
-          style="width: 400px; height: 300px; border: 1px solid lightgrey; display: flex; align-items: center; justify-content: center;"
+          style="
+            width: 400px;
+            height: 300px;
+            border: 1px solid lightgrey;
+            display: flex;
+            align-items: center;
+            justify-content: center;
+          "
         >
           <div>
             正在打开摄像头...
@@ -66,7 +73,15 @@
     <FaceTracking v-if="faceEnable && startVideoAfterDelay && PRODUCTION" />
     <div
       v-if="disableExamingBecauseRemoteApp"
-      style="top:0;left:0;width:100vw;height:100vh;background-color: rgba(77,77,77,0.75);z-index:100;position:absolute;"
+      style="
+        top: 0;
+        left: 0;
+        width: 100vw;
+        height: 100vh;
+        background-color: rgba(77, 77, 77, 0.75);
+        z-index: 100;
+        position: absolute;
+      "
     >
       <h3 style="margin-top: 80px;">
         请关闭远程桌面软件再进行考试!
@@ -136,14 +151,14 @@ export default {
       "questionAnswerFileUrl",
       "uploadModalVisible",
     ]),
-    previousQuestionOrder: vm => {
+    previousQuestionOrder: (vm) => {
       if (vm.examQuestion().order > 1) {
         return vm.examQuestion().order - 1;
       } else {
         return null;
       }
     },
-    nextQuestionOrder: vm => {
+    nextQuestionOrder: (vm) => {
       if (vm.examQuestion().order < vm.examQuestionList.length) {
         return vm.examQuestion().order + 1;
       } else {
@@ -152,7 +167,7 @@ export default {
     },
   },
   watch: {
-    $route: function() {
+    $route: function () {
       this.examQuestion();
     },
     shouldSubmitPaper() {
@@ -548,7 +563,7 @@ export default {
       let questionId = null;
       let i = 1;
 
-      examQuestionList = examQuestionList.map(eq => {
+      examQuestionList = examQuestionList.map((eq) => {
         if (questionId == eq.questionId) {
           eq.subNumber = i++;
         } else {
@@ -561,7 +576,7 @@ export default {
 
       let groupOrder = 1;
       let mainNumber = 0;
-      examQuestionList = examQuestionList.map(eq => {
+      examQuestionList = examQuestionList.map((eq) => {
         if (mainNumber == eq.mainNumber) {
           eq.groupOrder = groupOrder++;
         } else {
@@ -587,10 +602,10 @@ export default {
         return eq;
       });
 
-      examQuestionList = examQuestionList.map(eq => {
+      examQuestionList = examQuestionList.map((eq) => {
         const paperStructQuestion = paperStruct.defaultPaper.questionGroupList[
           eq.mainNumber - 1
-        ].questionWrapperList.find(q => q.questionId === eq.questionId);
+        ].questionWrapperList.find((q) => q.questionId === eq.questionId);
         return Object.assign(eq, {
           limitedPlayTimes: paperStructQuestion.limitedPlayTimes,
         });
@@ -615,7 +630,7 @@ export default {
         openWS({ examRecordDataId });
       }
     },
-    updateQuestion: async function(next) {
+    updateQuestion: async function (next) {
       // 初始化套题的答案,为回填部分选项做准备
       // for (let q of this.examQuestionList) {
       //   if (q.subQuestionList.length > 0) {
@@ -651,7 +666,7 @@ export default {
           } catch (error) {
             console.log(error);
             if (!error.response) {
-              await new Promise(resolve => setTimeout(resolve, 1000));
+              await new Promise((resolve) => setTimeout(resolve, 1000));
               continue; // 网络不通
             } else {
               break;
@@ -669,7 +684,7 @@ export default {
       if (faceVerifyMinute) {
         // 第二次开启活检时肯定有 this.remainTime 了。注意断点续考时没有这项检查
         this.$nextTick(async () => {
-          await new Promise(r =>
+          await new Promise((r) =>
             setTimeout(() => {
               r();
             }, 10 * 1000)
@@ -744,9 +759,9 @@ export default {
     },
     async answerAllQuestions(ignoreDirty) {
       const answers = this.examQuestionList
-        .filter(eq => (ignoreDirty ? true : eq.dirty))
-        .filter(eq => eq.getQuestionContent)
-        .map(eq => {
+        .filter((eq) => (ignoreDirty ? true : eq.dirty))
+        .filter((eq) => eq.getQuestionContent)
+        .map((eq) => {
           return Object.assign(
             {
               order: eq.order,
@@ -816,12 +831,12 @@ export default {
       }
 
       const answered = this.examQuestionList.filter(
-        q => q.studentAnswer !== null
+        (q) => q.studentAnswer !== null
       ).length;
       const unanswered = this.examQuestionList.filter(
-        q => q.studentAnswer === null
+        (q) => q.studentAnswer === null
       ).length;
-      const signed = this.examQuestionList.filter(q => q.isSign).length;
+      const signed = this.examQuestionList.filter((q) => q.isSign).length;
       const showConfirmTime = Date.now();
       this.$Modal.confirm({
         title: "确认交卷",
@@ -937,7 +952,7 @@ export default {
       return (
         this.examQuestionList &&
         this.examQuestionList.find(
-          eq => eq.order == this.$route.params.order // number == string
+          (eq) => eq.order == this.$route.params.order // number == string
         )
       );
     },
@@ -967,7 +982,7 @@ export default {
               "答题页面",
               "读取remoteApplication.txt出错--0",
             ]);
-            await new Promise(resolve2 => setTimeout(() => resolve2(), 3000));
+            await new Promise((resolve2) => setTimeout(() => resolve2(), 3000));
             applicationNames = fs.readFileSync(
               "remoteApplication.txt",
               "utf-8"
@@ -1006,7 +1021,9 @@ export default {
             .replace("wemeetapp", "腾讯会议")
             .replace("wechat", "微信");
 
-          names = [...new Set(names.split(",").map(v => v.trim()))].join(",");
+          names = [...new Set(names.split(",").map((v) => v.trim()))].join(
+            ","
+          );
           this.disableExamingBecauseRemoteApp = true;
           this.$Message.info({
             content: "在考试期间,请关掉" + names + "软件,诚信考试。",

+ 14 - 11
src/features/OnlineExam/Examing/FaceId.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="row" style="margin: 0;">
-    <div class="col-md-12 text-center" style="padding:8px;">
+    <div class="col-md-12 text-center" style="padding: 8px;">
       <div style="font-size: 30px;">
         <span>指定动作检测</span>
         <span v-if="showIframe">({{ timeCount }})</span>
@@ -15,17 +15,20 @@
     </div>
     <div
       id="faceIdDiv"
-      style="position: relative;
-						 height:710px; background-color: #6e6f72 !important;
-  					 background-image: radial-gradient(circle at 50% 0,#a9a9a9,#34363c);"
+      style="
+        position: relative;
+        height: 710px;
+        background-color: #6e6f72 !important;
+        background-image: radial-gradient(circle at 50% 0, #a9a9a9, #34363c);
+      "
     >
       <div
         v-show="!showIframe"
         width="100%"
         height="200px"
-        style="text-align: center;line-height:100px;margin-top:5px;"
+        style="text-align: center; line-height: 100px; margin-top: 5px;"
       >
-        <div style="color:white;font-weight: bold;font-size:20px;">
+        <div style="color: white; font-weight: bold; font-size: 20px;">
           {{ redoBtnMsg }}
         </div>
         <button
@@ -42,7 +45,7 @@
         v-show="showIframe"
         id="myFrame"
         :preload="electronDir + 'manipulateFaceID.js'"
-        style="position:absolute;width:100%;height:710px;"
+        style="position: absolute; width: 100%; height: 710px;"
       ></webview>
       <!-- <iframe
         src="https://www.baidu.com"
@@ -148,7 +151,7 @@ export default {
             "/api/ecs_oe_student/examFaceLivenessVerify/getFaceVerifyResult/" +
               this.faceVerifyId
           )
-          .then(response => {
+          .then((response) => {
             window._hmt.push([
               "_trackEvent",
               "活体检测弹出框",
@@ -187,7 +190,7 @@ export default {
           "/api/ecs_oe_student/examFaceLivenessVerify/faceLivenessVerifyTimeOut/" +
             this.examRecordId
         )
-        .then(response => {
+        .then((response) => {
           if (response.status == 200) {
             var receivedMsg = response.data;
             faceTestEndCalled = true;
@@ -233,7 +236,7 @@ export default {
           action: "websocket已连接",
         });
       };
-      this.ws.onmessage = response => {
+      this.ws.onmessage = (response) => {
         console.log("faceid websocket response: ", response);
         if (response.data.indexOf("verifyResult") > -1) {
           window._hmt.push([
@@ -582,7 +585,7 @@ export default {
           // iframe.openDevTools();
         });
 
-        iframe.addEventListener("ipc-message", event => {
+        iframe.addEventListener("ipc-message", (event) => {
           // console.log(event.channel);
           clearTimeout(this.iframeDomReadyTimeout);
           const iframeLoadMsg = event.channel;

+ 21 - 17
src/features/OnlineExam/Examing/FaceMotion/FaceMotion.vue

@@ -1,6 +1,10 @@
 <template>
   <div class="page-container">
-    <div id="video-container" style="position: relative" class="page-container">
+    <div
+      id="video-container"
+      style="position: relative;"
+      class="page-container"
+    >
       <div v-if="shouldShowSections" class="instruction-tips above-video">
         <div
           class="instruction-animation"
@@ -12,10 +16,10 @@
           }"
           data-intro="停留的时间:每一次停留时长可能不一样。"
         >
-          请将脸部移入此区域,停留<span style="color: blue">{{
+          请将脸部移入此区域,停留<span style="color: blue;">{{
             currentStep.stay
           }}</span
-          >秒,并保持<span style="color: blue">{{
+          >秒,并保持<span style="color: blue;">{{
             shouldDetectExpression ? (currentStep.happy ? "笑容" : "严肃") : ""
           }}</span>
         </div>
@@ -33,7 +37,7 @@
             请调整脸部与摄像头的距离
           </div>
           <div v-else>
-            保持<span style="color: blue">{{
+            保持<span style="color: blue;">{{
               shouldDetectExpression
                 ? currentStep.happy
                   ? "笑容"
@@ -48,7 +52,7 @@
       <div
         v-if="isDetecting"
         class="instruction-total above-video"
-        style="z-index: 3"
+        style="z-index: 3;"
       >
         <div class="total-text" data-intro="请在规定的时间内完成。">
           {{ instructions.total >= 0 ? instructions.total : 0 }}
@@ -229,16 +233,16 @@ export default {
       return this.isDetecting;
     },
     currentStep() {
-      return this.instructions.steps.find(v => !v.finished) || {};
+      return this.instructions.steps.find((v) => !v.finished) || {};
     },
     corFinalResult() {
       const idx = this.finalResult.verifySteps.findIndex(
-        v => v.stepId === this.currentStep.stepId
+        (v) => v.stepId === this.currentStep.stepId
       );
       return this.finalResult.verifySteps[idx];
     },
     instructionsFinished() {
-      return this.instructions.steps.every(v => v.finished);
+      return this.instructions.steps.every((v) => v.finished);
     },
     reverseSection() {
       return [3, 2, 1][this.currentStep.section - 1] - 1;
@@ -370,7 +374,7 @@ export default {
       this.totalDetectTimes = 0;
       const steps = this.faceBiopsyInfo.verifySteps
         // .filter(s => ["HAPPY", "SERIOUS"].includes(s.action))
-        .map(s => {
+        .map((s) => {
           return {
             section: 0,
             stay: s.stay,
@@ -671,7 +675,7 @@ export default {
           const message = box.area > 60000 ? "请远离摄像头" : "请靠近摄像头";
           this.tipHandler =
             this.tipHandler ||
-            throttle(message => {
+            throttle((message) => {
               this.$Message.warning({ content: message, duration: 1 });
             }, 1500);
           this.tipHandler(message);
@@ -857,7 +861,7 @@ export default {
           break;
         }
         console.log("waitingForInputSize", i);
-        await new Promise(resolve => setTimeout(() => resolve(), 3000));
+        await new Promise((resolve) => setTimeout(() => resolve(), 3000));
       }
       console.log("window.__inputSize", window.__inputSize);
     },
@@ -870,7 +874,7 @@ export default {
       const videoEl = document.getElementById("inputVideo");
       const options = getFaceDetectorOptions();
       console.log("increaseTestSpeed ---");
-      await new Promise(resolve => {
+      await new Promise((resolve) => {
         const interval = setInterval(() => {
           if (
             videoEl &&
@@ -896,7 +900,7 @@ export default {
           .detectSingleFace(videoEl, options)
           .withFaceLandmarks()
           .withFaceExpressions(),
-        new Promise(resolve =>
+        new Promise((resolve) =>
           setTimeout(resolve, 20 * 1000, "detectionTimeout")
         ),
       ]);
@@ -996,9 +1000,9 @@ export default {
     },
     async uploadToServer(captureBlob) {
       async function blobToArray(blob) {
-        return new Promise(resolve => {
+        return new Promise((resolve) => {
           var reader = new FileReader();
-          reader.addEventListener("loadend", function() {
+          reader.addEventListener("loadend", function () {
             // reader.result contains the contents of blob as a typed array
             resolve(reader.result);
           });
@@ -1079,14 +1083,14 @@ export default {
         throw new Error("同步照片比较失败!");
       }
     },
-    closeCamera: function() {
+    closeCamera: function () {
       console.log("关闭摄像头");
       if (window.__stream) {
         return;
       }
       const video = document.getElementById("inputVideo");
       if (video && video.srcObject) {
-        video.srcObject.getTracks().forEach(function(track) {
+        video.srcObject.getTracks().forEach(function (track) {
           track.stop();
         });
         video.srcObject = null;

+ 6 - 6
src/features/OnlineExam/Examing/FaceTracking.vue

@@ -85,7 +85,7 @@ async function detectTest() {
     });
     const result = await Promise.race([
       faceapi.detectAllFaces(videoEl, options),
-      new Promise(resolve => setTimeout(resolve, 10 * 1000)),
+      new Promise((resolve) => setTimeout(resolve, 10 * 1000)),
     ]);
     const detectEndTime = performance.now();
     if (
@@ -121,10 +121,10 @@ async function detectTest() {
 
   for (let idx = 0; idx < inputSizeList.length; idx++) {
     for (let n = 0; n < detectTimes; n++) {
-      await new Promise(resolve => setTimeout(resolve, 3 * 1000));
+      await new Promise((resolve) => setTimeout(resolve, 3 * 1000));
       if (__isDoingFaceLiveness) {
         console.log("正在活检,暂停实时人脸");
-        await new Promise(resolve => setTimeout(resolve, 120 * 1000));
+        await new Promise((resolve) => setTimeout(resolve, 120 * 1000));
       }
       const inputSize = inputSizeList[idx];
       const videoEl = document.getElementById("video");
@@ -141,7 +141,7 @@ async function detectTest() {
         }
         const result = await Promise.race([
           faceapi.detectAllFaces(videoEl, options),
-          new Promise(resolve => setTimeout(resolve, 10 * 1000)),
+          new Promise((resolve) => setTimeout(resolve, 10 * 1000)),
         ]);
         const detectEndTime = performance.now();
         if (detectStartTime - detectEndTime > 0.2 * 1000) {
@@ -216,7 +216,7 @@ export default {
     ...mapState(["isDoingFaceLiveness"]),
   },
   watch: {
-    isDoingFaceLiveness: function(val) {
+    isDoingFaceLiveness: function (val) {
       __isDoingFaceLiveness = val;
     },
   },
@@ -398,7 +398,7 @@ export default {
         !videoEl.classList.contains("video-warning")
       ) {
         videoEl.classList.add("video-warning");
-        this.warningTimeout = setTimeout(function() {
+        this.warningTimeout = setTimeout(function () {
           videoEl.classList.remove("video-warning");
         }, 3000);
       }

+ 2 - 2
src/features/OnlineExam/Examing/FillBlankQuestionView.vue

@@ -154,12 +154,12 @@ export default {
           "</span>"
       );
     },
-    inputAnswer: function() {
+    inputAnswer: function () {
       const questionNumber = this.question.body.split(/_{5,}/).length - 1;
       let ans = "";
       document
         .querySelectorAll(".option input")
-        .forEach(e => (ans += e.value + "##"));
+        .forEach((e) => (ans += e.value + "##"));
       this.studentAnswer = ans.slice(0, -2);
       const answers = this.studentAnswer
         .replace(/</gi, "&lt;")

+ 10 - 10
src/features/OnlineExam/Examing/MultipleQuestionView.vue

@@ -26,7 +26,7 @@
           name="question"
           value="option.oldIndex"
           :checked="studentAnswer && studentAnswer.includes(option.oldIndex)"
-          style="margin-top: 4px"
+          style="margin-top: 4px;"
         />
         <span style="padding: 0 10px;">{{ optionName[index] }}: </span>
         <div v-if="option.value" class="question-options">
@@ -112,8 +112,8 @@ export default {
       return (
         this.examQuestion.studentAnswer &&
         this.newQuestionOptions
-          .filter(v => this.examQuestion.studentAnswer.includes(v.oldIndex))
-          .map(v => v.name)
+          .filter((v) => this.examQuestion.studentAnswer.includes(v.oldIndex))
+          .map((v) => v.name)
           .join("")
       );
     },
@@ -121,18 +121,18 @@ export default {
       return (
         this.question.rightAnswer &&
         this.newQuestionOptions
-          .filter(v => this.question.rightAnswer.includes(v.oldIndex))
-          .map(v => v.name)
+          .filter((v) => this.question.rightAnswer.includes(v.oldIndex))
+          .map((v) => v.name)
           .join("")
       );
     },
   },
   watch: {
-    examQuestion: function() {
+    examQuestion: function () {
       this.studentAnswer = this.examQuestion.studentAnswer || "";
     },
   },
-  created: function() {
+  created: function () {
     window.addEventListener("keyup", this.keyup);
   },
   beforeDestroy() {
@@ -154,14 +154,14 @@ export default {
       ) {
         if (
           optionName
-            .map(v => "Key" + v)
+            .map((v) => "Key" + v)
             .slice(0, this.question.questionOptionList.length)
             .includes(e.code)
         ) {
           window._hmt.push(["_trackEvent", "答题页面", "快捷键", "ABCDE"]);
           const selectedOldIndex =
             "" +
-            this.newQuestionOptions.find(v => v.name == e.code[3]).oldIndex;
+            this.newQuestionOptions.find((v) => v.name == e.code[3]).oldIndex;
           if (this.studentAnswer.includes(selectedOldIndex)) {
             this.studentAnswer = this.studentAnswer.replace(
               selectedOldIndex,
@@ -177,7 +177,7 @@ export default {
         }
       }
     },
-    toggleAnswer: function(selectedOldIndex) {
+    toggleAnswer: function (selectedOldIndex) {
       if (this.studentAnswer.includes(selectedOldIndex)) {
         this.studentAnswer = this.studentAnswer.replace(selectedOldIndex, "");
       } else {

+ 4 - 4
src/features/OnlineExam/Examing/OverallProgress.vue

@@ -5,7 +5,7 @@
       :stroke-width="20"
       status="active"
       hide-info
-      style="color: black"
+      style="color: black;"
     >
     </i-progress>
     <span>{{ progress }}</span>
@@ -30,13 +30,13 @@ export default {
     progressNum() {
       return (
         100 *
-        (this.examQuestionList.filter(q => q.studentAnswer !== null).length /
+        (this.examQuestionList.filter((q) => q.studentAnswer !== null).length /
           this.examQuestionList.length)
       );
     },
-    progress: function() {
+    progress: function () {
       return `${
-        this.examQuestionList.filter(q => q.studentAnswer !== null).length
+        this.examQuestionList.filter((q) => q.studentAnswer !== null).length
       } / ${this.examQuestionList.length}`;
     },
   },

+ 4 - 4
src/features/OnlineExam/Examing/QuestionAudio.vue

@@ -1,5 +1,5 @@
 <template>
-  <span style="display: inline-flex; align-items: center; ">
+  <span style="display: inline-flex; align-items: center;">
     <span v-show="shouldShowAudio" @click="play">
       <Button
         v-if="!playing"
@@ -80,7 +80,7 @@ export default {
       this.context = new AudioContext();
       this.buffer;
 
-      const loadDogSound = url => {
+      const loadDogSound = (url) => {
         var request = new XMLHttpRequest();
         request.open("GET", url, true);
         request.responseType = "arraybuffer";
@@ -89,7 +89,7 @@ export default {
         request.onload = () => {
           this.context.decodeAudioData(
             request.response,
-            buffer => {
+            (buffer) => {
               this.buffer = buffer;
               this.duration = Math.floor(this.buffer.duration);
               this.downloadPercent = 100;
@@ -100,7 +100,7 @@ export default {
             }
           );
         };
-        request.onprogress = e => {
+        request.onprogress = (e) => {
           // console.log(e);
           // console.log(e.loaded / e.total);
           this.downloadPercent = Number((e.loaded / e.total) * 100).toFixed(2);

+ 4 - 4
src/features/OnlineExam/Examing/QuestionContainer.vue

@@ -24,7 +24,7 @@
           </span>
           <div
             v-if="audioInPlay.has(item.getAttribute('data-name'))"
-            style="position: absolute;top: 0;right: 0;bottom: 0;left: 0;"
+            style="position: absolute; top: 0; right: 0; bottom: 0; left: 0;"
           ></div>
         </div>
       </template>
@@ -35,8 +35,8 @@
       <template
         v-else-if="
           item.childNodes &&
-            item.querySelector &&
-            item.querySelector('.audio-placeholder')
+          item.querySelector &&
+          item.querySelector('.audio-placeholder')
         "
       >
         <QuestionContainer
@@ -88,7 +88,7 @@ export default {
     getAudioPlayedTimes(name) {
       return Math.max(
         this.examQuestion.limitedPlayTimes -
-          (this.allAudioPlayTimes.find(a => a.name === name) || { times: 0 })
+          (this.allAudioPlayTimes.find((a) => a.name === name) || { times: 0 })
             .times,
         0
       );

+ 9 - 7
src/features/OnlineExam/Examing/QuestionFilters.vue

@@ -46,17 +46,19 @@ export default {
   },
   computed: {
     ...mapState(["questionFilterType"]),
-    all: function() {
+    all: function () {
       return this.examQuestionList.length;
     },
-    answered: function() {
-      return this.examQuestionList.filter(q => q.studentAnswer !== null).length;
+    answered: function () {
+      return this.examQuestionList.filter((q) => q.studentAnswer !== null)
+        .length;
     },
-    signed: function() {
-      return this.examQuestionList.filter(q => q.isSign).length;
+    signed: function () {
+      return this.examQuestionList.filter((q) => q.isSign).length;
     },
-    unanswered: function() {
-      return this.examQuestionList.filter(q => q.studentAnswer === null).length;
+    unanswered: function () {
+      return this.examQuestionList.filter((q) => q.studentAnswer === null)
+        .length;
     },
   },
   methods: {

+ 2 - 2
src/features/OnlineExam/Examing/QuestionNavView.vue

@@ -60,7 +60,7 @@ export default {
     toChineseNumber(num) {
       return toChineseNumber(num);
     },
-    getQuestionNum: function(section, index) {
+    getQuestionNum: function (section, index) {
       if (
         !this.paperStruct ||
         !this.examQuestionList ||
@@ -120,7 +120,7 @@ export default {
       };
     },
     sectionQuestions(section) {
-      return this.examQuestionList.filter(q => q.mainNumber === section + 1);
+      return this.examQuestionList.filter((q) => q.mainNumber === section + 1);
     },
   },
 };

+ 5 - 5
src/features/OnlineExam/Examing/QuestionView.vue

@@ -24,7 +24,7 @@
             :key="examQuestion.questionId"
             :question-body="parentQuestionBody"
             :exam-question="examQuestion"
-            style="margin-bottom: 20px"
+            style="margin-bottom: 20px;"
           ></question-body>
           <!-- <div class="hr" /> -->
         </div>
@@ -82,7 +82,7 @@ export default {
     ...mapState(["examQuestionList"]),
   },
   watch: {
-    $route: function(to, from) {
+    $route: function (to, from) {
       this.updateQuestion(to, from);
     },
   },
@@ -148,7 +148,7 @@ export default {
         getQuestionContent: true,
       });
 
-      const transferWellNumberAndTrustInBody = function(repQuestion) {
+      const transferWellNumberAndTrustInBody = function (repQuestion) {
         //将题干中的三个#替换为下划线
         if (repQuestion.body) {
           repQuestion.body = repQuestion.body
@@ -158,13 +158,13 @@ export default {
           // var baseIndex = examQuestion.orders - 1;
           repQuestion.body = repQuestion.body
             .toString()
-            .replace(/##(\d+)##/g, function(a, b) {
+            .replace(/##(\d+)##/g, function (a, b) {
               return "__" + parseInt(b) + "__";
             });
         }
         // console.log(repQuestion);
       };
-      const initQuestion = function(repQuestion) {
+      const initQuestion = function (repQuestion) {
         if (
           repQuestion.questionType === "SINGLE_CHOICE" ||
           repQuestion.questionType === "MULTIPLE_CHOICE"

+ 10 - 10
src/features/OnlineExam/Examing/QuestionViewSingle.vue

@@ -9,8 +9,8 @@
       <template
         v-if="
           question &&
-            question.questionType === 'SINGLE_CHOICE' &&
-            examQuestion.questionType === 'SINGLE_CHOICE'
+          question.questionType === 'SINGLE_CHOICE' &&
+          examQuestion.questionType === 'SINGLE_CHOICE'
         "
       >
         <single-question-view
@@ -22,8 +22,8 @@
       <template
         v-if="
           question &&
-            question.questionType === 'MULTIPLE_CHOICE' &&
-            examQuestion.questionType === 'MULTIPLE_CHOICE'
+          question.questionType === 'MULTIPLE_CHOICE' &&
+          examQuestion.questionType === 'MULTIPLE_CHOICE'
         "
       >
         <multiple-question-view
@@ -35,8 +35,8 @@
       <template
         v-if="
           question &&
-            question.questionType === 'TRUE_OR_FALSE' &&
-            examQuestion.questionType === 'TRUE_OR_FALSE'
+          question.questionType === 'TRUE_OR_FALSE' &&
+          examQuestion.questionType === 'TRUE_OR_FALSE'
         "
       >
         <boolean-question-view
@@ -48,8 +48,8 @@
       <template
         v-if="
           question &&
-            question.questionType === 'FILL_UP' &&
-            examQuestion.questionType === 'FILL_UP'
+          question.questionType === 'FILL_UP' &&
+          examQuestion.questionType === 'FILL_UP'
         "
       >
         <fill-blank-question-view
@@ -61,8 +61,8 @@
       <template
         v-if="
           question &&
-            question.questionType === 'ESSAY' &&
-            examQuestion.questionType === 'ESSAY'
+          question.questionType === 'ESSAY' &&
+          examQuestion.questionType === 'ESSAY'
         "
       >
         <text-question-view

+ 1 - 1
src/features/OnlineExam/Examing/RemainTime.vue

@@ -25,7 +25,7 @@ export default {
     };
   },
   computed: {
-    remainTimeFormatted: function() {
+    remainTimeFormatted: function () {
       return this.remainTime
         ? moment.utc(this.remainTime).format("HH:mm:ss")
         : "计算中";

+ 9 - 9
src/features/OnlineExam/Examing/SingleQuestionView.vue

@@ -31,7 +31,7 @@
             name="question"
             :value="option.oldIndex"
             :checked="studentAnswer === option.oldIndex"
-            style="margin-top:3px;display:block"
+            style="margin-top: 3px; display: block;"
           />
         </div>
         <span style="padding: 0 10px;">{{ optionName[index] }}: </span>
@@ -118,8 +118,8 @@ export default {
       return (
         this.examQuestion.studentAnswer &&
         this.newQuestionOptions
-          .filter(v => this.examQuestion.studentAnswer.includes(v.oldIndex))
-          .map(v => v.name)
+          .filter((v) => this.examQuestion.studentAnswer.includes(v.oldIndex))
+          .map((v) => v.name)
           .join("")
       );
     },
@@ -127,21 +127,21 @@ export default {
       return (
         this.question.rightAnswer &&
         this.newQuestionOptions
-          .filter(v => this.question.rightAnswer.includes(v.oldIndex))
-          .map(v => v.name)
+          .filter((v) => this.question.rightAnswer.includes(v.oldIndex))
+          .map((v) => v.name)
           .join("")
       );
     },
   },
   watch: {
-    examQuestion: function(examQuestion) {
+    examQuestion: function (examQuestion) {
       this.studentAnswer = examQuestion.studentAnswer;
     },
     question(question) {
       this.questionBody = question.body;
     },
   },
-  created: function() {
+  created: function () {
     window.addEventListener("keyup", this.keyup);
   },
   beforeDestroy() {
@@ -163,13 +163,13 @@ export default {
       ) {
         if (
           optionName
-            .map(v => "Key" + v)
+            .map((v) => "Key" + v)
             .slice(0, this.question.questionOptionList.length)
             .includes(e.code)
         ) {
           window._hmt.push(["_trackEvent", "答题页面", "快捷键", "ABCDE"]);
           this.studentAnswer = this.newQuestionOptions.find(
-            v => v.name == e.code[3]
+            (v) => v.name == e.code[3]
           ).oldIndex;
         }
       }

+ 20 - 14
src/features/OnlineExam/Examing/TextQuestionView.vue

@@ -56,21 +56,26 @@
           :contenteditable="true"
           class="stu-answer"
           @keydown="disableCtrl"
-          @input="$event => textInput($event)"
-          @blur="$event => textInput($event)"
+          @input="($event) => textInput($event)"
+          @blur="($event) => textInput($event)"
           v-html="originalStudentAnswer"
         ></div>
         <div
-          style="margin-top: -25px; margin-bottom: 25px; width: 100%; max-width: 500px;"
+          style="
+            margin-top: -25px;
+            margin-bottom: 25px;
+            width: 100%;
+            max-width: 500px;
+          "
         >
-          <div style="float: right; margin-right: 10px; ">
+          <div style="float: right; margin-right: 10px;">
             {{ answerWordCount }}
           </div>
         </div>
       </div>
       <div v-if="shouldFetchQrCode && isAudioAnswerType">
         <div>
-          <div v-if="qrValue" style="display: flex">
+          <div v-if="qrValue" style="display: flex;">
             <qrcode
               :value="qrValue"
               :options="{ width: 200 }"
@@ -78,7 +83,7 @@
             ></qrcode>
             <div style="margin-top: 10px;">
               <div>
-                请使用<span style="font-weight: 900; color: #1E90FF;">微信</span
+                请使用<span style="font-weight: 900; color: #1e90ff;">微信</span
                 >扫描二维码后,在微信小程序上{{
                   isAudioAnswerType ? "录音" : "拍照"
                 }},并上传文件。
@@ -94,7 +99,7 @@
 
         <div
           class="audio-answer audio-answer-line-height"
-          style="margin-top: 20px ;"
+          style="margin-top: 20px;"
         >
           <span class="audio-answer-line-height">答案:</span>
           <audio
@@ -111,7 +116,7 @@
       <div v-if="canAttachPhotos" style="padding-top: 1px;">
         <UploadPhotos
           :default-list="
-            photoAnswers.map(v => {
+            photoAnswers.map((v) => {
               return v;
             })
           "
@@ -221,20 +226,21 @@ export default {
         ele.innerHTML = this.studentAnswer;
         const imgs = ele.querySelectorAll(".photo-answer");
         // if()
-        return [...imgs].map(e =>
+        return [...imgs].map((e) =>
           e.src.replace("?x-oss-process=image/resize,m_lfit,h_200,w_200", "")
         );
       },
       set(pSrcs) {
         let imageStr = pSrcs.map(
-          v =>
-            `<a href='${v}' target='_blank' ><img class='photo-answer' src='${v +
-              "?x-oss-process=image/resize,m_lfit,h_200,w_200"}' /></a>`
+          (v) =>
+            `<a href='${v}' target='_blank' ><img class='photo-answer' src='${
+              v + "?x-oss-process=image/resize,m_lfit,h_200,w_200"
+            }' /></a>`
         );
         const ele = document.createElement("div");
         ele.innerHTML = this.studentAnswer || "";
         const pEle = ele.querySelectorAll(".photo-answers-block");
-        if (pEle) [...pEle].forEach(v => v.remove());
+        if (pEle) [...pEle].forEach((v) => v.remove());
         // console.log(ele.innerHTML);
 
         if (!ele.innerHTML && pSrcs.length === 0) {
@@ -416,7 +422,7 @@ export default {
       //   "this.photoAnswers.filter(v => v !== url)",
       //   this.photoAnswers.filter(v => v !== url)
       // );
-      this.photoAnswers = this.photoAnswers.filter(v => v !== url);
+      this.photoAnswers = this.photoAnswers.filter((v) => v !== url);
       // console.log(this.photoAnswers);
     },
     photosReseted(urls) {

+ 3 - 3
src/features/OnlineExam/Examing/UploadPhotos.vue

@@ -50,7 +50,7 @@
       width="660"
     >
       <div>
-        <div v-if="qrValue" style="display: flex">
+        <div v-if="qrValue" style="display: flex;">
           <qrcode
             :value="qrValue"
             :options="{ width: 200 }"
@@ -61,7 +61,7 @@
           ></qrcode>
           <div style="font-size: 24px; margin-top: 10px;">
             <div>
-              请使用<span style="font-weight: 900; color: #1E90FF;">微信</span
+              请使用<span style="font-weight: 900; color: #1e90ff;">微信</span
               >扫描二维码后,在微信小程序上拍照,并上传文件。<br />
               上传期间,请勿关闭二维码。
             </div>
@@ -104,7 +104,7 @@
         <div v-if="totalList.length > 6">
           * 图片上传最多只支持6张
         </div>
-        <div style="display: flex; justify-content: center">
+        <div style="display: flex; justify-content: center;">
           <Button type="primary" size="large" @click="modalCloseClicked">
             确认
           </Button>

+ 3 - 3
src/features/OnlineExam/Examing/ws.js

@@ -23,14 +23,14 @@ export function openWS({ examRecordDataId }) {
       `?key=${store.state.user.key}&token=${store.state.user.token}`
   );
 
-  ws.onopen = event => {
+  ws.onopen = (event) => {
     console.log("open ws", event);
     createLog({ type: "微信小程序websocket", action: "连接成功" });
     reconnectNumber = 0;
 
     ws.onmessage = processWSMessage;
 
-    ws.onclose = event => {
+    ws.onclose = (event) => {
       console.log("ws closed by server");
       createLog({
         type: "微信小程序websocket",
@@ -79,7 +79,7 @@ export function openWS({ examRecordDataId }) {
     heartbeat();
   };
 
-  ws.onerror = event => {
+  ws.onerror = (event) => {
     createLog({
       type: "微信小程序websocket",
       action: "onerror",

+ 18 - 4
src/features/OnlineExam/OnlineExamFaceCheckModal.vue

@@ -8,7 +8,11 @@
   >
     <div
       slot="header"
-      style="display: flex; justify-content: space-between; align-items: center;"
+      style="
+        display: flex;
+        justify-content: space-between;
+        align-items: center;
+      "
     >
       <div class="qm-title-text">人脸识别</div>
       <Icon
@@ -19,7 +23,12 @@
       />
     </div>
     <div
-      style="display: grid; grid-template-columns: 200px 400px 1fr; grid-gap: 5px; position: relative"
+      style="
+        display: grid;
+        grid-template-columns: 200px 400px 1fr;
+        grid-gap: 5px;
+        position: relative;
+      "
     >
       <div class="avatar" :style="{ backgroundImage: `url('${userPhoto}')` }">
         <!-- <img :src="userPhoto" width="200px" height="300px" alt="底照" /> -->
@@ -28,7 +37,12 @@
           style="text-align: center; margin-top: 260px; color: white;"
         >
           <span
-            style="background-color: rgba(0, 0, 0, 0.5); display: inline-block; padding: 6px 16px; border-radius: 6px;"
+            style="
+              background-color: rgba(0, 0, 0, 0.5);
+              display: inline-block;
+              padding: 6px 16px;
+              border-radius: 6px;
+            "
           >
             {{ userPhoto ? "我的底照" : "无底照" }}
           </span>
@@ -46,7 +60,7 @@
         </FaceRecognition>
       </div>
       <div class="verify-desc qm-primary-text">
-        <h4 class="qm-big-text" style="font-weight: bold">操作提示:</h4>
+        <h4 class="qm-big-text" style="font-weight: bold;">操作提示:</h4>
         <p>1.请先确保摄像头设备已连接并能正常工作;</p>
         <p>2.请保持光源充足,不要逆光操作;</p>
         <p>

+ 17 - 10
src/features/OnlineExam/OnlineExamHome.vue

@@ -1,8 +1,13 @@
 <template>
   <main-layout>
     <Breadcrumb
-      style="text-align: left; padding-left: 20px; height: 40px; line-height: 40px; 
-                       background-color: #fafafa;"
+      style="
+        text-align: left;
+        padding-left: 20px;
+        height: 40px;
+        line-height: 40px;
+        background-color: #fafafa;
+      "
     >
       当前所在位置:
       <BreadcrumbItem>{{ locationTitle }}</BreadcrumbItem>
@@ -46,13 +51,13 @@ export default {
     locationTitle() {
       return (
         this.menus.find(
-          v => v.link.toUpperCase() === this.$route.path.toUpperCase()
+          (v) => v.link.toUpperCase() === this.$route.path.toUpperCase()
         ) || {}
       ).name;
     },
   },
   beforeRouteEnter(to, from, next) {
-    next(vm => {
+    next((vm) => {
       vm.previousUrl = from.path;
       if (
         from.path.includes("/online-homework") ||
@@ -162,7 +167,7 @@ export default {
         }
         examListRes = await this.$http.get(url);
         if (examListRes.status === 503) {
-          await new Promise(resolve => setTimeout(() => resolve(), 2000));
+          await new Promise((resolve) => setTimeout(() => resolve(), 2000));
           continue;
         } else if (examListRes.status === 200) {
           break;
@@ -186,11 +191,13 @@ export default {
       }
 
       try {
-        const noticeRes = (await this.$http.get(
-          "/api/ecs_exam_work/notice/getUserNoticeList?" +
-            this.user.id +
-            this.siteMessagesTimeStamp
-        )).data;
+        const noticeRes = (
+          await this.$http.get(
+            "/api/ecs_exam_work/notice/getUserNoticeList?" +
+              this.user.id +
+              this.siteMessagesTimeStamp
+          )
+        ).data;
         // const noticeRes = [
         //   {
         //     content: "<div>公告<img src='./svgs/sms-read.svg' /></div>",

+ 20 - 13
src/features/OnlineExam/OnlineExamList.vue

@@ -8,7 +8,7 @@
           <td v-if="!isEpcc" key="zy">专业</td>
           <td>考试开放时间</td>
           <td>剩余考试次数</td>
-          <td style="max-width: 200px">操作</td>
+          <td style="max-width: 200px;">操作</td>
         </tr>
 
         <tr v-for="course in courses" :key="course.examId + course.courseId">
@@ -21,10 +21,13 @@
             {{ course.endTime }}
           </td>
           <td>{{ course.allowExamCount }}</td>
-          <td style="min-width: 180px">
+          <td style="min-width: 180px;">
             <div
-              style="display: grid; grid-template-columns: repeat( auto-fit, minmax(100px, 1fr) ); 
-                        grid-gap: 10px"
+              style="
+                display: grid;
+                grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
+                grid-gap: 10px;
+              "
             >
               <i-button
                 class="qm-primary-button qm-primary-button-padding-fix"
@@ -52,7 +55,7 @@
               >
                 <i-button
                   class="qm-primary-button qm-primary-button-padding-fix"
-                  style="width: 100%"
+                  style="width: 100%;"
                   :disabled="!course.isObjScoreView"
                 >
                   客观分
@@ -294,9 +297,11 @@ export default {
       this.spinShow = true;
       this.processingMessage = "正在检测IP合法性...";
       try {
-        const ipLimit = (await this.$http.get(
-          "/api/ecs_exam_work/exam/ipLimit/" + course.examId
-        )).data;
+        const ipLimit = (
+          await this.$http.get(
+            "/api/ecs_exam_work/exam/ipLimit/" + course.examId
+          )
+        ).data;
         // sleep function: await new Promise(resolve => setTimeout(() => resolve(), 3000));
         if (ipLimit.limited) {
           window._hmt.push(["_trackEvent", "在线考试列表页面", "IP受限"]);
@@ -329,7 +334,7 @@ export default {
               `/CHECK_ENVIRONMENT`
           );
           if (checkEnv.data.CHECK_ENVIRONMENT === "true") {
-            const skipCheck = await new Promise(resolve => {
+            const skipCheck = await new Promise((resolve) => {
               this.$Modal.confirm({
                 title: "进行环境检测",
                 content:
@@ -398,10 +403,12 @@ export default {
           this.processingMessage = "正在检测底照是否满足活体检测标准...";
           let checkBasePhoto;
           try {
-            checkBasePhoto = (await this.$http.get(
-              "/api/ecs_oe_student/examFaceLivenessVerify/checkFaceLiveness" +
-                `?${this.user.token}` // 考生采用相同的机器考试,使用不同的请求的缓存
-            )).data;
+            checkBasePhoto = (
+              await this.$http.get(
+                "/api/ecs_oe_student/examFaceLivenessVerify/checkFaceLiveness" +
+                  `?${this.user.token}` // 考生采用相同的机器考试,使用不同的请求的缓存
+              )
+            ).data;
             this.spinShow = false;
             if (!checkBasePhoto.success) {
               this.$Message.error(

+ 5 - 5
src/features/OnlineExam/OnlineExamOverview.vue

@@ -2,7 +2,7 @@
   <div v-if="startInfo && paperStruct" id="exam-overview" class="container">
     <div class="instructions">
       <h1 class="">考试说明</h1>
-      <div style="text-align: left;  padding-bottom: 20px">
+      <div style="text-align: left; padding-bottom: 20px;">
         <p v-html="beforeExamRemark"></p>
         <!-- <p>{{"测试".repeat(500)}}</p> -->
       </div>
@@ -39,7 +39,7 @@
         </li>
       </ul>
       <div>
-        <img style="width:100%; padding-top: 40px;" src="./good-wish.png" />
+        <img style="width: 100%; padding-top: 40px;" src="./good-wish.png" />
       </div>
     </div>
   </div>
@@ -65,7 +65,7 @@ export default {
     };
   },
   computed: {
-    remainTimeFormatted: function() {
+    remainTimeFormatted: function () {
       return moment.utc(this.remainTime * 1000).format("HH:mm:ss");
     },
   },
@@ -102,7 +102,7 @@ export default {
 
       this.paperTotalScore =
         this.paperStruct.defaultPaper.questionGroupList
-          .map(q => q.groupScore)
+          .map((q) => q.groupScore)
           .reduce((p, c) => p + c * 1000, 0) / 1000;
     } catch (e) {
       window._hmt.push([
@@ -121,7 +121,7 @@ export default {
     clearInterval(this.intervalId);
   },
   methods: {
-    goToPaper: function() {
+    goToPaper: function () {
       this.$router.replace(
         `/online-exam/exam/${this.$route.params.examId}/examRecordData/${this.examRecordDataId}/order/1`
       );

+ 6 - 4
src/features/OnlineExam/OnlineExamResultList.vue

@@ -44,10 +44,12 @@ export default {
     async popperShow() {
       if (this.popperShow) {
         try {
-          const results = (await this.$http.get(
-            "/api/ecs_oe_admin/exam/score/queryObjectiveScoreList?examStudentId=" +
-              this.examStudentId
-          )).data;
+          const results = (
+            await this.$http.get(
+              "/api/ecs_oe_admin/exam/score/queryObjectiveScoreList?examStudentId=" +
+                this.examStudentId
+            )
+          ).data;
           this.results = (results || [])
             .sort((a, b) => b.examOrder - a.examOrder)
             .slice(0, 10);

+ 8 - 4
src/features/OnlineExam/PhoneVerifyForDD.vue

@@ -7,7 +7,11 @@
     :footer-hide="true"
   >
     <div
-      style="display: grid; grid-template-rows: 40px 40px 40px; font-size: 20px"
+      style="
+        display: grid;
+        grid-template-rows: 40px 40px 40px;
+        font-size: 20px;
+      "
     >
       <p>
         预留手机号: &nbsp;&nbsp;{{
@@ -25,14 +29,14 @@
       </p>
       <div>
         <i-button
-          style="margin: 0; margin-right: 5px"
+          style="margin: 0; margin-right: 5px;"
           class="qm-primary-button"
           :disabled="remainTime > 0"
           @click="getCode"
           >{{ btnText }} {{ remainTime > 0 ? "(" + remainTime + "秒)" : "" }}
         </i-button>
         <i-button
-          style="margin: 0; margin-right: 5px"
+          style="margin: 0; margin-right: 5px;"
           class="qm-primary-button"
           :disabled="!code"
           @click="verify"
@@ -40,7 +44,7 @@
           验证
         </i-button>
         <i-button
-          style="margin: 0; margin-right: 5px"
+          style="margin: 0; margin-right: 5px;"
           class="qm-primary-button"
           @click="() => logout('?LogoutReason=验证预留手机号')"
         >

+ 10 - 5
src/features/OnlinePractice/OnlinePracticeHome.vue

@@ -1,8 +1,13 @@
 <template>
   <main-layout>
     <Breadcrumb
-      style="text-align: left; padding-left: 20px; height: 40px; line-height: 40px; 
-                       background-color: #fafafa;"
+      style="
+        text-align: left;
+        padding-left: 20px;
+        height: 40px;
+        line-height: 40px;
+        background-color: #fafafa;
+      "
     >
       当前所在位置:
       <BreadcrumbItem>{{ locationTitle }}</BreadcrumbItem>
@@ -13,7 +18,7 @@
         选择考试批次:
         <Select
           v-model="examId"
-          style="width:200px"
+          style="width: 200px;"
           filterable
           @on-change="fetchList"
         >
@@ -56,7 +61,7 @@ export default {
     locationTitle() {
       return (
         this.menus.find(
-          v => v.link.toUpperCase() === this.$route.path.toUpperCase()
+          (v) => v.link.toUpperCase() === this.$route.path.toUpperCase()
         ) || {}
       ).name;
     },
@@ -78,7 +83,7 @@ export default {
         "/api/ecs_exam_work/exam/queryByNameLike?name=&examTypes=PRACTICE&studentId=" +
           this.user.id
       );
-      this.examList = (res.data || []).filter(e => e.enable);
+      this.examList = (res.data || []).filter((e) => e.enable);
       if (this.$route.query.examId === undefined && this.examList[0]) {
         const examId = this.examList[0].id;
         // this.$router.replace({ query: { examId } });

+ 7 - 4
src/features/OnlinePractice/OnlinePracticeList.vue

@@ -9,7 +9,7 @@
           <td>最近正确率</td>
           <td>平均正确率</td>
           <td>最高正确率</td>
-          <td style="max-width: 200px">操作</td>
+          <td style="max-width: 200px;">操作</td>
         </tr>
 
         <tr v-for="course in courses" :key="course.courseId">
@@ -23,10 +23,13 @@
           <td>{{ course.recentObjectiveAccuracy }}%</td>
           <td>{{ course.aveObjectiveAccuracy }}%</td>
           <td>{{ course.maxObjectiveAccuracy }}%</td>
-          <td style="min-width: 180px">
+          <td style="min-width: 180px;">
             <div
-              style="display: grid; grid-template-columns: repeat( auto-fit, minmax(100px, 1fr) ); 
-                        grid-gap: 10px"
+              style="
+                display: grid;
+                grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
+                grid-gap: 10px;
+              "
             >
               <i-button
                 class="qm-primary-button qm-primary-button-padding-fix"

+ 20 - 6
src/features/OnlinePractice/OnlinePracticeRecordDetail.vue

@@ -1,8 +1,13 @@
 <template>
   <main-layout>
     <Breadcrumb
-      style="text-align: left; padding-left: 20px; height: 40px; line-height: 40px;
-                       background-color: #fafafa;"
+      style="
+        text-align: left;
+        padding-left: 20px;
+        height: 40px;
+        line-height: 40px;
+        background-color: #fafafa;
+      "
     >
       当前所在位置:
       <BreadcrumbItem :to="{ name: 'OnlinePracticeHome' }">
@@ -19,7 +24,12 @@
       </div>
 
       <div
-        style="display: grid; grid-template-columns: repeat(4, 1fr); margin-bottom: 20px; text-align: left"
+        style="
+          display: grid;
+          grid-template-columns: repeat(4, 1fr);
+          margin-bottom: 20px;
+          text-align: left;
+        "
       >
         <div>
           答题正确率: <span>{{ examRecordResult.objectiveAccuracy }}%</span>
@@ -65,8 +75,12 @@
     </div>
 
     <div
-      style="margin: 20px; display: grid; grid-template-columns: repeat( auto-fit, minmax(100px, 1fr) ); 
-                grid-gap: 20px"
+      style="
+        margin: 20px;
+        display: grid;
+        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
+        grid-gap: 20px;
+      "
     >
       <i-button
         class="qm-primary-button"
@@ -112,7 +126,7 @@ export default {
     locationTitle() {
       return (
         this.menus.find(
-          v =>
+          (v) =>
             v.link.toUpperCase() ===
             this.$route.path.match(/\/[^/]*/)[0].toUpperCase()
         ) || {}

+ 22 - 11
src/features/OnlinePractice/OnlinePracticeRecordList.vue

@@ -1,8 +1,13 @@
 <template>
   <main-layout>
     <Breadcrumb
-      style="text-align: left; padding-left: 20px; height: 40px; line-height: 40px;
-                       background-color: #fafafa;"
+      style="
+        text-align: left;
+        padding-left: 20px;
+        height: 40px;
+        line-height: 40px;
+        background-color: #fafafa;
+      "
     >
       当前所在位置:
       <BreadcrumbItem :to="{ name: 'OnlinePracticeHome' }">
@@ -13,7 +18,12 @@
 
     <div class="home">
       <div
-        style="display: grid; grid-template-columns: repeat(4, 1fr); margin-bottom: 20px; text-align: left"
+        style="
+          display: grid;
+          grid-template-columns: repeat(4, 1fr);
+          margin-bottom: 20px;
+          text-align: left;
+        "
       >
         <div>
           批次: <span>{{ examName }}</span>
@@ -42,7 +52,7 @@
               <td>错误</td>
               <td>未答</td>
               <td>正确率</td>
-              <td style="max-width: 200px">操作</td>
+              <td style="max-width: 200px;">操作</td>
             </tr>
 
             <tr v-for="record in recordList" :key="record.examId">
@@ -55,7 +65,7 @@
               <td>{{ record.failQuestionNum }}</td>
               <td>{{ record.notAnsweredCount }}</td>
               <td>{{ record.objectiveAccuracy }}%</td>
-              <td style="min-width: 120px">
+              <td style="min-width: 120px;">
                 <i-button
                   class="qm-primary-button"
                   @click="() => enterPracticeRecordDetail(record)"
@@ -87,7 +97,7 @@ export default {
     locationTitle() {
       return (
         this.menus.find(
-          v =>
+          (v) =>
             v.link.toUpperCase() ===
             this.$route.path.match(/\/[^/]*/)[0].toUpperCase()
         ) || {}
@@ -103,17 +113,18 @@ export default {
       if (this.recordList.length === 0) {
         return 0;
       }
-      return Math.max(...this.recordList.map(v => v.objectiveAccuracy)).toFixed(
-        2
-      );
+      return Math.max(
+        ...this.recordList.map((v) => v.objectiveAccuracy)
+      ).toFixed(2);
     },
     aveAccuracy() {
       if (this.recordList.length === 0) {
         return 0;
       }
       return (
-        this.recordList.map(v => v.objectiveAccuracy).reduce((a, b) => a + b) /
-        this.recordList.length
+        this.recordList
+          .map((v) => v.objectiveAccuracy)
+          .reduce((a, b) => a + b) / this.recordList.length
       ).toFixed(2);
     },
   },

+ 10 - 5
src/features/Password/Password.vue

@@ -1,15 +1,20 @@
 <template>
   <main-layout>
     <i-breadcrumb
-      style="text-align: left; padding-left: 20px; height: 40px; line-height: 40px;
-                         background-color: #fafafa;"
+      style="
+        text-align: left;
+        padding-left: 20px;
+        height: 40px;
+        line-height: 40px;
+        background-color: #fafafa;
+      "
     >
       当前所在位置:
       <BreadcrumbItem>{{ locationTitle }}</BreadcrumbItem>
     </i-breadcrumb>
 
     <div class="password-container">
-      <i-form ref="form" :model="form" :rules="rules" style="width: 320px">
+      <i-form ref="form" :model="form" :rules="rules" style="width: 320px;">
         <i-form-item label="" prop="oldPassword">
           <i-input
             v-model="form.oldPassword"
@@ -31,7 +36,7 @@
             placeholder="请再次输入新密码"
           ></i-input>
         </i-form-item>
-        <i-form-item style="text-align: left">
+        <i-form-item style="text-align: left;">
           <i-button size="large" class="qm-primary-button" @click="changePwd">
             保存
           </i-button>
@@ -132,7 +137,7 @@ export default {
     locationTitle() {
       return (
         this.menus.find(
-          v => v.link.toUpperCase() === this.$route.path.toUpperCase()
+          (v) => v.link.toUpperCase() === this.$route.path.toUpperCase()
         ) || {}
       ).name;
     },

+ 31 - 12
src/features/SiteMessage/SiteMessageDetail.vue

@@ -1,15 +1,20 @@
 <template>
   <main-layout>
     <i-breadcrumb
-      style="text-align: left; padding-left: 20px; height: 40px; line-height: 40px;
-                         background-color: #fafafa;"
+      style="
+        text-align: left;
+        padding-left: 20px;
+        height: 40px;
+        line-height: 40px;
+        background-color: #fafafa;
+      "
     >
       当前所在位置:
       <BreadcrumbItem>{{ locationTitle }}</BreadcrumbItem>
     </i-breadcrumb>
 
     <div style="display: flex; flex-direction: row-reverse;">
-      <div style=" margin-top: 20px; margin-right: 20px;">
+      <div style="margin-top: 20px; margin-right: 20px;">
         <i-button>
           <div class="back-block" @click="goBack">
             <img src="./svgs/back.svg" /> &nbsp;返回列表
@@ -20,12 +25,24 @@
 
     <div v-if="message" class="site-message-container">
       <h3
-        style="font-size:24px;font-weight:500;color:rgba(34,34,34,1);line-height:33px;"
+        style="
+          font-size: 24px;
+          font-weight: 500;
+          color: rgba(34, 34, 34, 1);
+          line-height: 33px;
+        "
       >
         {{ message.title }}
       </h3>
       <h5
-        style="font-size:13px;font-weight:400;color:rgba(153,153,153,1);line-height:18px;margin-top: 16px;margin-bottom: 40px;"
+        style="
+          font-size: 13px;
+          font-weight: 400;
+          color: rgba(153, 153, 153, 1);
+          line-height: 18px;
+          margin-top: 16px;
+          margin-bottom: 40px;
+        "
       >
         发布时间: {{ message.publishTime }}
       </h5>
@@ -45,7 +62,7 @@ export default {
     locationTitle() {
       return (
         this.menus.find(
-          v =>
+          (v) =>
             v.link.toUpperCase() ===
             this.$route.path.match(/\/[^/]*/)[0].toUpperCase()
         ) || {}
@@ -53,7 +70,7 @@ export default {
     },
     message() {
       if (this.siteMessages) {
-        return this.siteMessages.find(v => v.id === +this.$route.params.id);
+        return this.siteMessages.find((v) => v.id === +this.$route.params.id);
       }
       return null;
     },
@@ -69,11 +86,13 @@ export default {
     ...mapMutations(["updateSiteMessages", "updateSiteMessagesTimeStamp"]),
     async getList() {
       try {
-        const noticeRes = (await this.$http.get(
-          "/api/ecs_exam_work/notice/getUserNoticeList?" +
-            this.user.id +
-            this.siteMessagesTimeStamp
-        )).data;
+        const noticeRes = (
+          await this.$http.get(
+            "/api/ecs_exam_work/notice/getUserNoticeList?" +
+              this.user.id +
+              this.siteMessagesTimeStamp
+          )
+        ).data;
         this.updateSiteMessages(noticeRes);
       } catch (error) {
         console.log(error);

+ 17 - 10
src/features/SiteMessage/SiteMessageHome.vue

@@ -1,15 +1,20 @@
 <template>
   <main-layout>
     <i-breadcrumb
-      style="text-align: left; padding-left: 20px; height: 40px; line-height: 40px;
-                         background-color: #fafafa;"
+      style="
+        text-align: left;
+        padding-left: 20px;
+        height: 40px;
+        line-height: 40px;
+        background-color: #fafafa;
+      "
     >
       当前所在位置:
       <BreadcrumbItem>{{ locationTitle }}</BreadcrumbItem>
     </i-breadcrumb>
 
     <div class="home">
-      <div style="font-size: 18px; font-weight: 500; color: #222C32;">
+      <div style="font-size: 18px; font-weight: 500; color: #222c32;">
         公告通知
       </div>
       <i-button>
@@ -89,7 +94,7 @@ export default {
     locationTitle() {
       return (
         this.menus.find(
-          v => v.link.toUpperCase() === this.$route.path.toUpperCase()
+          (v) => v.link.toUpperCase() === this.$route.path.toUpperCase()
         ) || {}
       ).name;
     },
@@ -112,11 +117,13 @@ export default {
     ...mapMutations(["updateSiteMessages", "updateSiteMessagesTimeStamp"]),
     async getList() {
       try {
-        const noticeRes = (await this.$http.get(
-          "/api/ecs_exam_work/notice/getUserNoticeList?" +
-            this.user.id +
-            this.siteMessagesTimeStamp
-        )).data;
+        const noticeRes = (
+          await this.$http.get(
+            "/api/ecs_exam_work/notice/getUserNoticeList?" +
+              this.user.id +
+              this.siteMessagesTimeStamp
+          )
+        ).data;
         this.updateSiteMessages(noticeRes);
       } catch (error) {
         console.log(error);
@@ -129,7 +136,7 @@ export default {
     },
     async markRead() {
       // console.log(this.$refs.selection.getSelection());
-      const selectIds = this.$refs.selection.getSelection().map(v => v.id);
+      const selectIds = this.$refs.selection.getSelection().map((v) => v.id);
       if (selectIds.length === 0) {
         this.$Message.warning({
           content: "请先选择消息",

+ 5 - 6
src/main.js

@@ -63,17 +63,16 @@ if (process.env.NODE_ENV === "development") {
       window.localStorage.setItem("key", data.key);
       window.localStorage.setItem("domain", process.env.VUE_APP_LOGIN_DOMAIN);
 
-      const student = await (await fetch(
-        "/api/ecs_core/student/getStudentInfoBySession",
-        {
+      const student = await (
+        await fetch("/api/ecs_core/student/getStudentInfoBySession", {
           method: "GET",
           headers: {
             "Content-Type": "application/json;charset=UTF-8",
             key: data.key,
             token: data.token,
           },
-        }
-      )).json();
+        })
+      ).json();
       const user = { ...data, ...student };
 
       window.localStorage.setItem("user-for-reload", JSON.stringify(user));
@@ -93,5 +92,5 @@ if (
 new Vue({
   router,
   store,
-  render: h => h(App),
+  render: (h) => h(App),
 }).$mount("#app");

+ 3 - 3
src/mixins/mixins.js

@@ -9,8 +9,8 @@ Vue.mixin({
   },
   mounted() {
     // console.log("mixin hook called");
-    [...document.getElementsByTagName("a")].forEach(e => {
-      e.addEventListener("click", function(event) {
+    [...document.getElementsByTagName("a")].forEach((e) => {
+      e.addEventListener("click", function (event) {
         event.preventDefault();
       });
     });
@@ -35,7 +35,7 @@ Vue.mixin({
             examingRes.status === 503 ||
             examingRes.data.code === "S-101000"
           ) {
-            await new Promise(resolve => setTimeout(() => resolve(), 2000));
+            await new Promise((resolve) => setTimeout(() => resolve(), 2000));
             continue;
           } else if (examingRes.data.code === "000000") {
             break;

+ 5 - 5
src/store.js

@@ -75,7 +75,7 @@ const examingHomeModule = {
       // );
 
       let alreayHas = false;
-      let allAudioPlayTimes = state.allAudioPlayTimes.map(audio => {
+      let allAudioPlayTimes = state.allAudioPlayTimes.map((audio) => {
         if (audio.name === payload) {
           alreayHas = true;
           const times = audio.times + 1;
@@ -93,7 +93,7 @@ const examingHomeModule = {
       }
       // console.log(allAudioPlayTimes);
 
-      const examQuestionList = state.examQuestionList.map(eq => {
+      const examQuestionList = state.examQuestionList.map((eq) => {
         // console.log(eq.order, order);
         if (eq.order == 1) {
           return Object.assign(
@@ -113,7 +113,7 @@ const examingHomeModule = {
       state,
       { order, studentAnswer, isSign, audioPlayTimes, getQuestionContent }
     ) {
-      const examQuestionList = state.examQuestionList.map(eq => {
+      const examQuestionList = state.examQuestionList.map((eq) => {
         // console.log(eq.order, order);
         if (eq.order == order) {
           return Object.assign(
@@ -146,7 +146,7 @@ const examingHomeModule = {
       state = Object.assign(state, { examQuestionList });
     },
     resetExamQuestionDirty(state) {
-      const examQuestionList = state.examQuestionList.map(eq => {
+      const examQuestionList = state.examQuestionList.map((eq) => {
         return Object.assign({}, eq, { dirty: false });
       });
       state = Object.assign(state, { examQuestionList });
@@ -163,7 +163,7 @@ const examingHomeModule = {
     setQuestionFileAnswerUrl(state, payload) {
       // 先清理之前保存过的记录
       state.questionAnswerFileUrl = state.questionAnswerFileUrl.filter(
-        v => !v.saved
+        (v) => !v.saved
       );
       let ary = state.questionAnswerFileUrl;
       let found = false;

+ 5 - 5
src/utils/axios.js

@@ -21,7 +21,7 @@ const qmInstance = axios.create({});
 
 let wk_token, wk_key;
 qmInstance.interceptors.request.use(
-  config => {
+  (config) => {
     // debugger;
     if (
       config.url.includes("/login") === false ||
@@ -43,7 +43,7 @@ qmInstance.interceptors.request.use(
 
     return config;
   },
-  error => {
+  (error) => {
     Message.error({
       content: error,
       duration: 15,
@@ -61,10 +61,10 @@ qmInstance.interceptors.request.use(
 
 //响应拦截
 qmInstance.interceptors.response.use(
-  response => {
+  (response) => {
     return response;
   },
-  error => {
+  (error) => {
     console.log("axios response error: " + JSON.stringify(error));
     createLog({
       action: "axios response",
@@ -240,7 +240,7 @@ loadProgressBar(qmInstance);
 Vue.prototype.$http = qmInstance;
 // Vue.prototype.$upyunhttp = upyunInstance;
 export default {
-  install: function(Vue) {
+  install: function (Vue) {
     Object.defineProperty(Vue.prototype, "$http", {
       value: qmInstance,
     });

+ 3 - 3
src/utils/axiosCache.js

@@ -1,18 +1,18 @@
-export default function(get, regexes) {
+export default function (get, regexes) {
   // cachingGet
   const cache = new Map();
 
   return function cachedGet(url) {
     const key = url;
 
-    if (regexes.some(regex => url.match(regex))) {
+    if (regexes.some((regex) => url.match(regex))) {
       if (cache.has(key)) {
         const request = cache.get(key);
         // console.log("cache.get(key):" + request.then(v => console.log(v)));
         return request;
       } else {
         const request = get(...arguments);
-        return request.then(v => {
+        return request.then((v) => {
           if (v.status === 200) {
             // 如果能取到数据,才缓存
             cache.set(key, request);

+ 4 - 4
src/utils/axiosProgress.js

@@ -7,7 +7,7 @@ export function loadProgressBar(instance = axios) {
   let requestsCounter = 0;
 
   const setupStartProgress = () => {
-    instance.interceptors.request.use(config => {
+    instance.interceptors.request.use((config) => {
       requestsCounter++;
       iView.LoadingBar.start();
       return config;
@@ -15,21 +15,21 @@ export function loadProgressBar(instance = axios) {
   };
 
   const setupUpdateProgress = () => {
-    const update = e =>
+    const update = (e) =>
       iView.LoadingBar.update(calculatePercentage(e.loaded, e.total));
     instance.defaults.onDownloadProgress = update;
     instance.defaults.onUploadProgress = update;
   };
 
   const setupStopProgress = () => {
-    const responseFunc = response => {
+    const responseFunc = (response) => {
       if (--requestsCounter === 0) {
         iView.LoadingBar.finish();
       }
       return response;
     };
 
-    const errorFunc = error => {
+    const errorFunc = (error) => {
       if (--requestsCounter === 0) {
         iView.LoadingBar.error();
       }

+ 4 - 4
src/utils/axiosRetry.js

@@ -1,6 +1,6 @@
 import Vue from "vue";
 
-Vue.prototype.$httpGetRetry = async function(...args) {
+Vue.prototype.$httpGetRetry = async function (...args) {
   for (let i = 0; i < 5; i++) {
     try {
       const res = await Vue.prototype.$http.get.apply(Vue, args);
@@ -9,7 +9,7 @@ Vue.prototype.$httpGetRetry = async function(...args) {
     } catch (error) {
       console.log(error);
       if (!error.response) {
-        await new Promise(resolve => setTimeout(resolve, 1000));
+        await new Promise((resolve) => setTimeout(resolve, 1000));
         continue; // 网络不通
       } else {
         return; // 其他错误不管
@@ -18,7 +18,7 @@ Vue.prototype.$httpGetRetry = async function(...args) {
   }
 };
 
-Vue.prototype.$httpPostRetry = async function(...args) {
+Vue.prototype.$httpPostRetry = async function (...args) {
   for (let i = 0; i < 5; i++) {
     try {
       const res = await Vue.prototype.$http.post.apply(Vue, args);
@@ -27,7 +27,7 @@ Vue.prototype.$httpPostRetry = async function(...args) {
     } catch (error) {
       console.log(error);
       if (!error.response) {
-        await new Promise(resolve => setTimeout(resolve, 1000));
+        await new Promise((resolve) => setTimeout(resolve, 1000));
         continue; // 网络不通
       } else {
         return; // 其他错误不管

+ 3 - 3
src/utils/electronLog.js

@@ -9,11 +9,11 @@ if (isElectron) {
   } catch (error) {
     console.debug(error);
   }
-  console.log = async function(...args) {
+  console.log = async function (...args) {
     // log && log.info(...args);
     if (log && log.info) {
       const encryLog = [window.location.pathname, ...args];
-      encryLog.map(v => {
+      encryLog.map((v) => {
         // 将对象转为string,Error对象怎么办?
         v = JSON.stringify(v);
         return v;
@@ -55,7 +55,7 @@ if (isElectron) {
         publicKey,
         encoded
       );
-      const ab2str = function(buf) {
+      const ab2str = function (buf) {
         return String.fromCharCode.apply(null, new Uint8Array(buf));
       };
 

+ 2 - 6
src/utils/logger.js

@@ -101,11 +101,7 @@ export function createEncryptLog() {
       const filePath = log.transports.file.findLogPath();
       const fs = window.nodeRequire("fs");
       const content = fs.readFileSync(filePath, "utf-8");
-      const ary = content
-        .toString()
-        .split("\r\n")
-        .join("\n")
-        .split("\n");
+      const ary = content.toString().split("\r\n").join("\n").split("\n");
       // 重复上传没有时间的行:跨过非时间戳的行; 错误识别:全部重新执行
       // let lastIndex = ary.findIndex(v => v === lastLog);
       // console.log({ lastIndex });
@@ -116,7 +112,7 @@ export function createEncryptLog() {
       let logLen = 10;
       const newAry = ary
         .slice(lastLogIndex, lastLogIndex + logLen)
-        .filter(v => v);
+        .filter((v) => v);
       // 如果没有上传的内容,则不修改lastLog, 也不上传
       if (!newAry.length) return;
       lastLogIndex = lastLogIndex + newAry.length;

+ 4 - 4
src/utils/monitors.js

@@ -1,7 +1,7 @@
 import Vue from "vue";
 import { createLog } from "@/utils/logger";
 
-Vue.config.errorHandler = error => {
+Vue.config.errorHandler = (error) => {
   // Vue.prototype.$httpNoAuth.post(
   //   "/api/ecs_core/log/studentClient/" + "debug/007001",
   //   error.stack.replace(/\n/g, '||||'),
@@ -35,7 +35,7 @@ Vue.config.errorHandler = error => {
 //   ]);
 // };
 
-window.addEventListener("error", function(event) {
+window.addEventListener("error", function (event) {
   // Vue.prototype.$httpNoAuth.post(
   //   "/api/ecs_core/log/studentClient/" + "debug/007002",
   //  `message: ${event.message}\nsource: ${event.filename}\nlineno: ${event.lineno}\ncolno: ${
@@ -64,7 +64,7 @@ window.addEventListener("error", function(event) {
   });
 });
 
-window.addEventListener("unhandledrejection", function(event) {
+window.addEventListener("unhandledrejection", function (event) {
   // let detail = "";
   // if (event.reason.config) {
   //   detail += "url:" + event.reason.config.url + "\n";
@@ -121,7 +121,7 @@ window.addEventListener("unhandledrejection", function(event) {
   }
 });
 
-window.addEventListener("rejectionhandled", function(event) {
+window.addEventListener("rejectionhandled", function (event) {
   console.log("rejectionhandled"); // 似乎并不触发
   // let detail = "";
   // if (event.reason.config) {

+ 2 - 2
src/utils/nativeExe.js

@@ -14,7 +14,7 @@ export default function async(exeName, cb) {
     });
     throw new Error("不在Electron中,调用 " + exeName + " 失败");
   }
-  return new Promise(resolve => {
+  return new Promise((resolve) => {
     window.nodeRequire("node-cmd").get(exeName, async (err, data, stderr) => {
       let stderrConverted;
       try {
@@ -33,7 +33,7 @@ export default function async(exeName, cb) {
         stderr: JSON.stringify(stderr),
         stderrConverted: JSON.stringify(stderrConverted),
       });
-      await new Promise(resolve2 => setTimeout(() => resolve2(), 1000));
+      await new Promise((resolve2) => setTimeout(() => resolve2(), 1000));
       await cb();
       resolve();
     });

+ 1 - 1
tests/vue/child.vue

@@ -20,7 +20,7 @@ export default {
     };
   },
   computed: {
-    computedFromProps: function() {
+    computedFromProps: function () {
       return "computed: " + this.passToChild;
     },
   },

+ 2 - 2
tests/vue/myinput.vue

@@ -18,7 +18,7 @@ export default {
     },
   },
   computed: {
-    inputListeners: function() {
+    inputListeners: function () {
       var vm = this;
       console.log(this.$listeners.input); // 从调用 <myinput @input /> 而来
       // `Object.assign` merges objects together to form a new object
@@ -32,7 +32,7 @@ export default {
         // behavior of some listeners.
         {
           // This ensures that the component works with v-model
-          input: function(event) {
+          input: function (event) {
             vm.$emit("input", +event.target.value);
           },
         }

+ 7 - 3
vue.config.js

@@ -1,10 +1,14 @@
 let proxy = {
   "/api/ecs_oe_admin": {
-    target: process.env.VUE_APP_OE_ADMIN_HOST_URL,
+    target:
+      process.env.VUE_APP_OE_ADMIN_HOST_URL ||
+      process.env.VUE_APP_CORE_HOST_URL,
     changeOrigin: true,
   },
   "/api/ecs_oe_student": {
-    target: process.env.VUE_APP_OE_STUDENT_HOST_URL,
+    target:
+      process.env.VUE_APP_OE_STUDENT_HOST_URL ||
+      process.env.VUE_APP_CORE_HOST_URL,
     changeOrigin: true,
   },
   "/api": {
@@ -66,7 +70,7 @@ module.exports = {
   devServer: {
     proxy,
   },
-  chainWebpack: config => {
+  chainWebpack: (config) => {
     // iview Loader
     config.module
       .rule("vue")

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 688 - 404
yarn.lock


Nem az összes módosított fájl került megjelenítésre, mert túl sok fájl változott