zhangjie 3 years ago
parent
commit
4bd17d5f5d
2 changed files with 7 additions and 1 deletions
  1. 1 1
      src/features/examwork/ExamManagement/ExamEdit.vue
  2. 6 0
      src/views/Layout/Layout.vue

+ 1 - 1
src/features/examwork/ExamManagement/ExamEdit.vue

@@ -689,7 +689,7 @@ export default {
       this.form.startEndTimeProxy = [this.form.startTime, this.form.endTime];
       this.form.monitorRecord = this.form.monitorRecord || [];
       this.form.monitorVideoSource = this.form.monitorVideoSource || [];
-      this.form.monitorProxy = !!this.form.monitorVideoSource;
+      this.form.monitorProxy = !!this.form.monitorVideoSource.length;
       this.form.preNoticeClone = this.form.preNotice;
       this.form.postNoticeClone = this.form.postNotice;
       this.parseMonitorVideoSource();

+ 6 - 0
src/views/Layout/Layout.vue

@@ -39,6 +39,12 @@ export default {
     };
   },
   created() {
+    if (!this.$store.state.user || !this.$store.state.user["id"]) {
+      this.$message.error("数据丢失,系统异常,请重新登录!");
+      this.$router.replace({ name: "Login" });
+      return;
+    }
+
     this.getMenu();
   },
   methods: {