Эх сурвалжийг харах

SLS日志: 添加用户点击事件

Michael Wang 4 жил өмнө
parent
commit
45ff956a81

+ 6 - 0
src/components/FaceRecognition/FaceRecognition.vue

@@ -413,6 +413,12 @@ export default {
       // console.log(v);
       // return;
 
+      this.logger({
+        page: "同步人脸比对",
+        button: "开始识别按钮",
+        action: "点击",
+      });
+
       this.$Message.destroy();
       try {
         this.disableSnap = true;

+ 15 - 1
src/components/MainLayout/MainLayout.vue

@@ -68,7 +68,16 @@
       <a
         class="qm-primary-text"
         style="display: inline-block; margin-right: 20px; text-align: center"
-        @click="() => logout('?LogoutReason=正常退出')"
+        @click="
+          () => {
+            logger({
+              page: 'MainLayout',
+              button: '退出按钮',
+              action: '点击',
+            });
+            logout('?LogoutReason=正常退出');
+          }
+        "
       >
         {{ isEpcc ? "返回" : "退出登录" }}
       </a>
@@ -240,6 +249,11 @@ export default {
   methods: {
     ...mapMutations(["updateMenus"]),
     goChangePwd() {
+      this.logger({
+        page: "MainLayout",
+        button: "修改密码按钮",
+        action: "点击",
+      });
       this.$router.push("/password");
     },
   },

+ 5 - 0
src/components/MainLayout/SiteMessagePopup.vue

@@ -87,6 +87,11 @@ export default {
   },
   methods: {
     ignoreMessage() {
+      this.logger({
+        page: "SiteMessagePopup",
+        button: "忽略按钮",
+        action: "点击",
+      });
       this.ignoreMessageIds.push(this.unreadMessage.id);
       window.sessionStorage.setItem(
         "ignoreMessageIds",

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

@@ -557,7 +557,7 @@ export default {
       // alert("haha");
       createLog({
         currentPage: "登录页面--login clicked",
-        action: "page created",
+        action: "in login()",
         UA: navigator.userAgent,
       });
       // alert("haha end");
@@ -597,6 +597,14 @@ export default {
             seccode: geeRes.geetest_seccode, // geeForm[2].value,
           };
         }
+        createLog({
+          currentPage: "登录页面",
+          action: "send params",
+          domain: this.schoolDomain,
+          rootOrgId: this.QECSConfig.ROOT_ORG_ID,
+          accountType: this.loginType,
+          accountValue: this.loginForm.accountValue,
+        });
         // 以下网络请求失败,直接报网络异常错误
         loginResponse = await this.$http.post(
           "/api/ecs_core/verifyCode/gt/login",
@@ -1087,6 +1095,11 @@ export default {
       }
     },
     closeApp() {
+      this.logger({
+        page: "登录页",
+        button: "关闭按钮",
+        action: "点击",
+      });
       console.log("关闭应用");
       window.close();
     },

+ 34 - 3
src/features/OfflineExam/OfflineExamList.vue

@@ -27,11 +27,17 @@
                   :title="file.originalFileName"
                   ondragstart="return false;"
                   @click="
-                    () =>
+                    () => {
+                      logger({
+                        page: '离线考试页',
+                        button: '下载作答按钮',
+                        action: '点击',
+                      });
                       downloadOfflineFile(
                         file.offlineFileUrl,
                         file.originalFileName
-                      )
+                      );
+                    }
                   "
                 >
                   <i-icon type="ios-cloud-download"></i-icon>下载作答
@@ -55,7 +61,16 @@
                   href="#"
                   download
                   ondragstart="return false;"
-                  @click="() => tempDisableBtnAndDownloadPaper(course)"
+                  @click="
+                    () => {
+                      logger({
+                        page: '离线考试页面',
+                        button: '下载试卷按钮',
+                        action: '点击',
+                      });
+                      tempDisableBtnAndDownloadPaper(course);
+                    }
+                  "
                 >
                   下载试卷
                 </a>
@@ -145,6 +160,12 @@ export default {
   },
   methods: {
     async enterExam(course) {
+      this.logger({
+        page: "离线考试页面",
+        button: "抽取试卷按钮",
+        action: "点击",
+        examStudentId: course.examStudentId,
+      });
       // 若出错,直接报网络异常
       await this.$http.get(
         "/api/branch_ecs_oe_admin/offlineExam/startOfflineExam",
@@ -156,6 +177,11 @@ export default {
     },
     previewPaper(course) {
       window._hmt.push(["_trackEvent", "离线考试页面", "预览"]);
+      this.logger({
+        page: "离线考试页面",
+        button: "查看试卷按钮",
+        action: "点击",
+      });
       var user = {
         loginName: course.examStudentId,
         backUrl: window.document.location.href,
@@ -220,6 +246,11 @@ export default {
       return this.downloadIds.has(course.examStudentId);
     },
     uploadHandler(course) {
+      this.logger({
+        page: "离线考试页面",
+        button: "上传答案按钮",
+        action: "点击",
+      });
       this.selectedCourse = course;
       // setTimeout(() => {
       //   console.log(this.$refs);

+ 10 - 2
src/features/OnlineExam/Examing/ExamingHome.vue

@@ -82,7 +82,7 @@
       "
     >
       <h3 style="margin-top: 80px">请关闭远程桌面软件再进行考试!</h3>
-      <i-button @click="checkRemoteApp">确认已关闭远程桌面软件</i-button>
+      <i-button @click="checkRemoteAppClicked">确认已关闭远程桌面软件</i-button>
     </div>
   </div>
   <div v-else>
@@ -944,9 +944,17 @@ export default {
     },
     reloadPage() {
       window._hmt.push(["_trackEvent", "答题页面", "页面加载失败", "reload"]);
-      this.logger({ page: "答题页面", action: "页面加载失败" });
+      this.logger({ page: "答题页面", button: "重试按钮", action: "点击" });
       window.location.reload();
     },
+    async checkRemoteAppClicked() {
+      this.logger({
+        page: "答题页面",
+        button: "确认已关闭远程桌面软件",
+        action: "点击",
+      });
+      this.checkRemoteApp();
+    },
     async checkRemoteApp() {
       if (typeof nodeRequire == "undefined") {
         return;

+ 9 - 1
src/features/OnlineExam/Examing/FaceId.vue

@@ -36,7 +36,7 @@
           type="button"
           class="qm-primary-button"
           :disabled="redoBtnDisabled"
-          @click="startFaceVerify"
+          @click="startFaceVerifyClicked"
         >
           重试
         </button>
@@ -478,6 +478,14 @@ export default {
         this.faceidLoadedButTimeouted();
       }, 60000); //60000
     },
+    async startFaceVerifyClicked() {
+      this.logger({
+        page: "活体检测弹出框",
+        button: "重试按钮",
+        action: "点击",
+      });
+      await this.startFaceVerify();
+    },
     async startFaceVerify() {
       this.redoBtnDisabled = true;
       this.redoBtnMsg = "正在进入指定动作检测...";

+ 5 - 0
src/features/OnlineExam/OnlineExamFaceCheckModal.vue

@@ -100,6 +100,11 @@ export default {
   methods: {
     ...mapMutations(["toggleFaceCheckModal"]),
     closeModal() {
+      this.logger({
+        page: "OnlineExamFaceCheckModal",
+        button: "关闭按钮",
+        action: "点击",
+      });
       this.closeCamera = true;
       this.toggleFaceCheckModal(false);
     },

+ 5 - 0
src/features/OnlineExam/OnlineExamList.vue

@@ -173,6 +173,11 @@ export default {
       );
     },
     async raceEnter(course) {
+      this.logger({
+        page: "待考列表页",
+        button: "进入考试按钮",
+        action: "点击",
+      });
       this.spinShow = true;
       this.processingMessage = "正在请求...";
       const minutesAfterCourseStart = Math.floor(

+ 14 - 2
src/features/OnlineExam/OnlineExamOverview.vue

@@ -10,7 +10,7 @@
         class="qm-primary-button"
         :disabled="isForceRead"
         style="display: inline-block; width: 100%"
-        @click="goToPaper"
+        @click="gotoPaperClicked"
       >
         接受以上条款,开始考试(倒计时:
         <span class="animated infinite pulse"> {{ remainTimeFormatted }} </span
@@ -115,6 +115,10 @@ export default {
         "获取考试概览信息异常",
         e.response ? e.response.data.desc : e,
       ]);
+      this.logger({
+        page: "在线考试概览页面",
+        action: "获取考试概览信息异常",
+      });
       this.$router.back();
       return;
     }
@@ -125,7 +129,15 @@ export default {
     clearInterval(this.intervalId);
   },
   methods: {
-    goToPaper: function () {
+    gotoPaperClicked() {
+      this.logger({
+        page: "在线考试概览页面",
+        button: "开始考试",
+        action: "点击",
+      });
+      this.goToPaper();
+    },
+    goToPaper() {
       this.$router.replace(
         `/online-exam/exam/${this.$route.params.examId}/examRecordData/${this.examRecordDataId}/order/1`
       );

+ 14 - 0
src/features/OnlineExam/PhoneVerifyForDD.vue

@@ -81,6 +81,11 @@ export default {
   },
   methods: {
     async getCode() {
+      this.logger({
+        page: "PhoneVerifyForDD",
+        button: "发送验证码按钮",
+        action: "点击",
+      });
       try {
         await this.$http.post("/api/ecs_oe_student/sms/sendSmsCodeToStudent");
       } catch (error) {
@@ -101,6 +106,11 @@ export default {
       }, 1000);
     },
     async verify() {
+      this.logger({
+        page: "PhoneVerifyForDD",
+        button: "验证按钮",
+        action: "点击",
+      });
       try {
         await this.$http.post(
           `/api/ecs_oe_student/sms/checkSmsCode?phoneNumber=${this.user.phoneNumber}&code=${this.code}`
@@ -113,6 +123,10 @@ export default {
           duration: 15,
           closable: true,
         });
+        this.logger({
+          page: "PhoneVerifyForDD",
+          action: "验证手机号接口失败,请重试!",
+        });
       }
     },
   },

+ 10 - 0
src/features/OnlinePractice/OnlinePracticeList.vue

@@ -93,6 +93,11 @@ export default {
       );
     },
     async enterPractice(course) {
+      this.logger({
+        page: "在线练习页面",
+        button: "进入练习按钮",
+        action: "点击",
+      });
       const alreadyInExam = await this.checkExamInProgress();
       if (alreadyInExam) {
         window._hmt.push(["_trackEvent", "在线练习页面", "断点续考", "进入"]);
@@ -106,6 +111,11 @@ export default {
       );
     },
     async enterPracticeList(course) {
+      this.logger({
+        page: "在线练习页面",
+        button: "查看详情按钮",
+        action: "点击",
+      });
       this.$router.push(
         `/online-practice/exam/${course.examId}/list?examStudentId=${
           course.examStudentId

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

@@ -144,6 +144,11 @@ export default {
   },
   methods: {
     async changePwd() {
+      this.logger({
+        page: "修改密码页面",
+        button: "保存按钮",
+        action: "点击",
+      });
       const valid = await this.$refs["form"].validate();
       if (!valid) {
         return;

+ 5 - 0
src/features/SiteMessage/SiteMessageDetail.vue

@@ -115,6 +115,11 @@ export default {
       }
     },
     goBack() {
+      this.logger({
+        page: "站内消息详情页面",
+        button: "返回按钮",
+        action: "点击",
+      });
       this.$router.push("/site-message" + location.search);
     },
   },

+ 5 - 0
src/features/SiteMessage/SiteMessageHome.vue

@@ -135,6 +135,11 @@ export default {
       }
     },
     async markRead() {
+      this.logger({
+        page: "在线练习页面",
+        button: "标记为已读按钮",
+        action: "点击",
+      });
       // console.log(this.$refs.selection.getSelection());
       const selectIds = this.$refs.selection.getSelection().map((v) => v.id);
       if (selectIds.length === 0) {

+ 5 - 0
src/views/NotFoundComponent.vue

@@ -17,6 +17,11 @@ export default {
   name: "Page404",
   methods: {
     goLogin() {
+      this.logger({
+        page: "Page404",
+        button: "返回登录页按钮",
+        action: "点击",
+      });
       this.$router.push("/login/");
     },
   },