Kaynağa Gözat

feat: 备用卷卷型调整

zhangjie 6 ay önce
ebeveyn
işleme
3e70b81f0e

+ 6 - 1
src/modules/exam/components/createExamAndPrintTask/InfoExamTask.vue

@@ -680,6 +680,7 @@ export default {
       if (this.examTask.openAb) {
         this.paperAttachments.forEach((paperAttachment) => {
           const attachment = paperAttachment.paperAttachmentIds[0];
+          attachment.name = "A";
           paperAttachment.paperAttachmentIds.push(
             Object.assign(deepCopy(attachment), {
               name: "B",
@@ -692,9 +693,11 @@ export default {
           );
         });
       } else {
-        this.paperAttachments.forEach((paperAttachment) => {
+        this.paperAttachments.forEach((paperAttachment, index) => {
           paperAttachment.paperAttachmentIds =
             paperAttachment.paperAttachmentIds.slice(0, 1);
+
+          paperAttachment.paperAttachmentIds[0].name = this.abc[index];
         });
       }
     },
@@ -1201,6 +1204,8 @@ export default {
         paperAttachment.paperAttachmentIds.push(
           Object.assign(deepCopy(newAttachment), { name: "B" })
         );
+      } else {
+        newAttachment.name = this.abc[serialNumber - 1];
       }
       this.paperAttachments.push(paperAttachment);
     },

+ 5 - 1
src/modules/exam/components/taskApply/TaskPaper.vue

@@ -616,6 +616,7 @@ export default {
       if (this.openAb) {
         this.paperAttachments.forEach((paperAttachment) => {
           const attachment = paperAttachment.paperAttachmentIds[0];
+          attachment.name = "A";
           paperAttachment.paperAttachmentIds.push(
             Object.assign(deepCopy(attachment), {
               name: "B",
@@ -628,9 +629,10 @@ export default {
           );
         });
       } else {
-        this.paperAttachments.forEach((paperAttachment) => {
+        this.paperAttachments.forEach((paperAttachment, index) => {
           paperAttachment.paperAttachmentIds =
             paperAttachment.paperAttachmentIds.slice(0, 1);
+          paperAttachment.paperAttachmentIds[0].name = this.abc[index];
         });
       }
 
@@ -735,6 +737,8 @@ export default {
         paperAttachment.paperAttachmentIds.push(
           Object.assign(deepCopy(newAttachment), { name: "B" })
         );
+      } else {
+        newAttachment.name = this.abc[serialNumber - 1];
       }
       this.paperAttachments.push(paperAttachment);
     },

+ 15 - 0
src/plugins/crypto.js

@@ -21,6 +21,21 @@ export const AES = (content) => {
   return encrypted.toString();
 };
 
+export const AESDecode = (content) => {
+  const KEY = "Qmth87863577qmth";
+  // const IV = "1234567890123456";
+
+  const key = CryptoJS.enc.Utf8.parse(KEY);
+
+  // const iv = CryptoJS.enc.Utf8.parse(IV);
+  const decrypted = CryptoJS.AES.decrypt(content, key, {
+    // iv: iv,
+    mode: CryptoJS.mode.ECB,
+    padding: CryptoJS.pad.Pkcs7,
+  });
+  return decrypted.toString(CryptoJS.enc.Utf8);
+};
+
 /**
  * 获取authorisation
  * @param {Object} infos 相关信息