Explorar o código

fix 小程序更新图片被@input event覆盖的bug

Michael Wang %!s(int64=3) %!d(string=hai) anos
pai
achega
70f353f543
Modificáronse 1 ficheiros con 11 adicións e 3 borrados
  1. 11 3
      src/features/OnlineExam/Examing/TextQuestionView.vue

+ 11 - 3
src/features/OnlineExam/Examing/TextQuestionView.vue

@@ -97,7 +97,7 @@ function textInput($event: Event) {
   }
   }
   const sDom = document.createElement("div");
   const sDom = document.createElement("div");
   sDom.innerHTML = studentAnswer;
   sDom.innerHTML = studentAnswer;
-  const photoDom = sDom.querySelector("photo-answers-block");
+  const photoDom = sDom.querySelector(".photo-answers-block");
   const photoStr = photoDom?.outerHTML ?? "";
   const photoStr = photoDom?.outerHTML ?? "";
 
 
   studentAnswer = (<HTMLDivElement>$event.target).innerHTML + photoStr;
   studentAnswer = (<HTMLDivElement>$event.target).innerHTML + photoStr;
@@ -263,11 +263,19 @@ watch(
               q.transferFileType === "PIC"
               q.transferFileType === "PIC"
             ) {
             ) {
               pictureAnswer = q;
               pictureAnswer = q;
-              console.log("first");
             }
             }
             q.saved = true;
             q.saved = true;
-            if (acknowledgeStatus === "CONFIRMED")
+            if (acknowledgeStatus === "CONFIRMED") {
               $message.info("小程序作答已更新");
               $message.info("小程序作答已更新");
+            }
+            logger({
+              cnl: ["server"],
+              act: "小程序作答获得更新",
+              ext: {
+                acknowledgeStatus,
+                transferFileType: q.transferFileType,
+              },
+            });
           })
           })
           .catch(() => {
           .catch(() => {
             $message.error("更新小程序答案失败!");
             $message.error("更新小程序答案失败!");