Przeglądaj źródła

学校添加用户区域id改为当前学校所在区域id

gzb
guozhongbo 7 miesięcy temu
rodzic
commit
3c9bf7b341

+ 4
- 1
src/store/index.js Wyświetl plik

@@ -13,6 +13,8 @@ export default new Vuex.Store({
13 13
       regionids: [],
14 14
       // 进入的学校
15 15
       schoolid: null,
16
+      // 当前学校区域id
17
+      schoolRegid: null,
16 18
       // 所属位置(所属区域、所属学校)
17 19
       belong: []
18 20
     }
@@ -95,7 +97,8 @@ export default new Vuex.Store({
95 97
       );
96 98
     },
97 99
     // 进入学校设置跳转痕迹
98
-    setEnterSchoolPower(state, { schoolid, schoolName }) {
100
+    setEnterSchoolPower(state, { regionid, schoolid, schoolName }) {
101
+      state.userPower.schoolRegid = regionid; //当前学校区域id
99 102
       state.userPower.schoolid = schoolid;
100 103
       state.userPower.belong.push(schoolName);
101 104
       localStorage.setItem(

+ 1
- 0
src/views/regionSection/regionManage/schoolManage.vue Wyświetl plik

@@ -743,6 +743,7 @@ export default {
743 743
     // 进入学校
744 744
     toSchool(row) {
745 745
       this.$store.commit("setEnterSchoolPower", {
746
+        regionid: row.regionid,
746 747
         schoolid: row.schoolid,
747 748
         schoolName: row.schoolName
748 749
       });

+ 4
- 6
src/views/schoolSection/userManage/userManage.vue Wyświetl plik

@@ -776,9 +776,8 @@ export default {
776 776
         this.form_data = new FormData();
777 777
         this.form_data.append("file", file);
778 778
         this.form_data.append("schoolid", this.powerParams.objectid);
779
-        let _regionids = this.$store.state.userPower.regionids;
780
-        _regionids = [..._regionids];
781
-        this.form_data.append("regionid", _regionids.pop());
779
+        let regionid = this.$store.state.userPower.schoolRegid;
780
+        this.form_data.append("regionid", regionid);
782 781
       } else {
783 782
         this.importInfo.file = null;
784 783
         this.$Message.error("请上传excel文件");
@@ -850,8 +849,7 @@ export default {
850 849
             this.$Message.error("请选择班级!");
851 850
             return;
852 851
           }
853
-          let _regionids = this.$store.state.userPower.regionids;
854
-          _regionids = [..._regionids];
852
+          let regionid = this.$store.state.userPower.schoolRegid;
855 853
           let form = {
856 854
             username: this.addInfo.username,
857 855
             loginname: this.addInfo.loginname,
@@ -859,7 +857,7 @@ export default {
859 857
             loginpwd: this.addInfo.loginpwd,
860 858
             rtype: this.powerParams.rtype,
861 859
             objectid: this.powerParams.objectid,
862
-            regionid: _regionids.pop(),
860
+            regionid: regionid,
863 861
             schoolid: this.powerParams.objectid,
864 862
             enabled: this.addInfo.enabled,
865 863
             studentno: this.addInfo.studentno,

Ładowanie…
Anuluj
Zapisz