Browse Source

fix orgId

deason 3 years ago
parent
commit
ac220da620
2 changed files with 27 additions and 27 deletions
  1. 13 14
      src/modules/examwork/view/examStudent.vue
  2. 14 13
      src/modules/examwork/view/student.vue

+ 13 - 14
src/modules/examwork/view/examStudent.vue

@@ -1629,16 +1629,14 @@ export default {
       this.examStudentForm.ext1 = null;
       this.examStudentForm.examStageId = null;
       this.examStudentForm.examStageOrder = null;
+
+      this.getOrgList4InsertOrUpdate("");
       if (this.pureLC) {
         this.examStudentForm.orgId = this.lc_id;
-        this.orgList4InsertOrUpdate = [
-          { id: this.lc_id, name: this.lc_name, code: this.lc_code },
-        ];
       } else {
         this.examStudentForm.orgId = null;
-        this.orgList4InsertOrUpdate = null;
-        this.getOrgList4InsertOrUpdate("");
       }
+
       this.examList4InsertOrUpdate = [];
       this.courseList4InsertOrUpdate = [];
       this.examStageDisabled4Insert = true;
@@ -1931,23 +1929,24 @@ export default {
         this.pureLC = false;
       }
 
+      this.formSearch.rootOrgId = this.user.rootOrgId;
       this.getCourses4Search("");
       this.getOrgList4Search("");
       this.queryExams4Search("");
-      this.formSearch.rootOrgId = this.user.rootOrgId;
+
       if (this.pureLC) {
         var url = CORE_API + "/user/" + this.user.userId;
         await this.$httpWithMsg.get(url).then((response) => {
           var userInfo = response.data;
           this.lc_id = userInfo.orgId;
-          this.lc_name = userInfo.orgName;
-          this.lc_code = userInfo.orgCode;
-          this.orgList4Search = [
-            { id: this.lc_id, name: this.lc_name, code: this.lc_code },
-          ];
-          this.orgList4InsertOrUpdate = [
-            { id: this.lc_id, name: this.lc_name, code: this.lc_code },
-          ];
+          // this.lc_name = userInfo.orgName;
+          // this.lc_code = userInfo.orgCode;
+          // this.orgList4Search = [
+          //   { id: this.lc_id, name: this.lc_name, code: this.lc_code },
+          // ];
+          // this.orgList4InsertOrUpdate = [
+          //   { id: this.lc_id, name: this.lc_name, code: this.lc_code },
+          // ];
           this.formSearch.orgId = this.lc_id;
           this.examStudentForm.orgId = this.lc_id;
         });

+ 14 - 13
src/modules/examwork/view/student.vue

@@ -914,14 +914,15 @@ export default {
     resetPasswordByOrgId() {
       this.orgList4RestPassword = [];
       this.resetPasswordByOrgIdForm.orgId = null;
+
+      this.getOrgList4RestPassword("");
       if (this.pureLC) {
-        this.orgList4RestPassword = [
-          { id: this.lc_id, name: this.lc_name, code: this.lc_code },
-        ];
+        // this.orgList4RestPassword = [
+        //   { id: this.lc_id, name: this.lc_name, code: this.lc_code },
+        // ];
         this.resetPasswordByOrgIdForm.orgId = this.lc_id;
-      } else {
-        this.getOrgList4RestPassword("");
       }
+
       this.resetPasswordByOrgIdDialog = true;
     },
     submitResetPasswordByOrgId() {
@@ -1371,28 +1372,28 @@ export default {
         this.pureLC = false;
       }
 
+      this.formSearch.rootOrgId = this.user.rootOrgId;
+      this.getOrgList4Search("");
+
       if (this.pureLC) {
         let url = CORE_API + "/user/" + this.user.userId;
         await this.$httpWithMsg.get(url).then((response) => {
           var userInfo = response.data;
           this.lc_id = userInfo.orgId;
-          this.lc_name = userInfo.orgName;
-          this.lc_code = userInfo.orgCode;
-          this.orgList4Search = [
-            { id: this.lc_id, name: this.lc_name, code: this.lc_code },
-          ];
+          // this.lc_name = userInfo.orgName;
+          // this.lc_code = userInfo.orgCode;
+          // this.orgList4Search = [
+          //   { id: this.lc_id, name: this.lc_name, code: this.lc_code },
+          // ];
           this.formSearch.orgId = this.lc_id;
         });
       }
 
       let url = CORE_API + "/org/getRootOrgList";
-
       this.$httpWithMsg.get(url).then((response) => {
         this.rootOrgList = response.data;
       });
 
-      this.formSearch.rootOrgId = this.user.rootOrgId;
-      this.getOrgList4Search("");
       this.searchForm();
     },
     handleExamChange4Search(value) {