deason 4 vuotta sitten
vanhempi
commit
e9a9f5081b

+ 8 - 5
src/modules/examwork/view/examStudent.vue

@@ -1342,20 +1342,22 @@ export default {
         console.log(index);
         this.selectedExamStuIds.push(element.id);
       });
-      console.log(this.selectedExamStuIds);
+      // console.log(this.selectedExamStuIds);
     },
     resetSearchForm() {
       this.formSearch.rootOrgId = "";
       this.formSearch.examId = "";
       this.formSearch.studentCode = "";
       this.formSearch.studentName = "";
-      this.formSearch.orgId = "";
       this.formSearch.specialtyName = "";
       this.formSearch.courseId = "";
       this.formSearch.infoCollector = "";
       this.formSearch.identityNumber = "";
       this.formSearch.examSite = "";
       this.formSearch.enable = "UNDEFINED";
+      if (!this.pureLC) {
+        this.formSearch.orgId = "";
+      }
     },
     resetPageAndSearchForm() {
       this.currentPage = 1;
@@ -1852,7 +1854,7 @@ export default {
         this.rolePrivileges = response.data;
       });
     },
-    init() {
+    async init() {
       for (let role of this.user.roleList) {
         if (role.roleCode == "LC_USER") {
           this.pureLC = true;
@@ -1870,7 +1872,7 @@ export default {
       this.formSearch.rootOrgId = this.user.rootOrgId;
       if (this.pureLC) {
         var url = CORE_API + "/user/" + this.user.userId;
-        this.$httpWithMsg.get(url).then(response => {
+        await this.$httpWithMsg.get(url).then(response => {
           var userInfo = response.data;
           this.lc_id = userInfo.orgId;
           this.lc_name = userInfo.orgName;
@@ -1883,8 +1885,9 @@ export default {
           ];
           this.formSearch.orgId = this.lc_id;
           this.examStudentForm.orgId = this.lc_id;
-          // this.searchForm();
         });
+
+        // this.searchForm();
       }
     },
     handleExamChange4Search(value) {

+ 5 - 2
src/modules/examwork/view/student.vue

@@ -1082,6 +1082,9 @@ export default {
       this.formSearch.identityNumber = "";
       this.formSearch.enable = "UNDEFINED";
       this.formSearch.hasPhoto = "UNDEFINED";
+      if (!this.pureLC) {
+        this.formSearch.orgId = "";
+      }
     },
     resetPageAndSearchForm() {
       this.currentPage = 1;
@@ -1340,7 +1343,7 @@ export default {
         this.rolePrivileges = response.data;
       });
     },
-    init() {
+    async init() {
       this.initPrivileges();
 
       for (let role of this.user.roleList) {
@@ -1356,7 +1359,7 @@ export default {
 
       if (this.pureLC) {
         let url = CORE_API + "/user/" + this.user.userId;
-        this.$httpWithMsg.get(url).then(response => {
+        await this.$httpWithMsg.get(url).then(response => {
           var userInfo = response.data;
           this.lc_id = userInfo.orgId;
           this.lc_name = userInfo.orgName;