Browse Source

路由根据权限跳转传参

gzb
wangzhonglu 9 months ago
parent
commit
bee8a54650
36 changed files with 721 additions and 98 deletions
  1. 3
    1
      src/App.vue
  2. 1
    1
      src/api/region.js
  3. 91
    1
      src/router/index.js
  4. 131
    3
      src/store/index.js
  5. 54
    1
      src/views/layout.vue
  6. 2
    7
      src/views/login/login.vue
  7. 11
    1
      src/views/platformSection/log/deviceExport.vue
  8. 11
    0
      src/views/platformSection/networkManage/whitelistLibrary.vue
  9. 15
    0
      src/views/platformSection/notice/notice.vue
  10. 13
    0
      src/views/platformSection/regionManage/adminManage.vue
  11. 17
    1
      src/views/platformSection/regionManage/regionManage.vue
  12. 41
    2
      src/views/regionSection/index.vue
  13. 11
    3
      src/views/regionSection/regionManage/regionManage.vue
  14. 11
    4
      src/views/regionSection/regionManage/schoolManage.vue
  15. 14
    6
      src/views/schoolSection/applicationManage/greenBrowser.vue
  16. 8
    2
      src/views/schoolSection/deviceManage/breakRuleDevice.vue
  17. 14
    2
      src/views/schoolSection/deviceManage/deviceManage.vue
  18. 8
    1
      src/views/schoolSection/deviceManage/inLineDevice.vue
  19. 8
    1
      src/views/schoolSection/deviceManage/outControlDevice.vue
  20. 8
    1
      src/views/schoolSection/deviceManage/removeControlDevice.vue
  21. 22
    2
      src/views/schoolSection/index.vue
  22. 11
    2
      src/views/schoolSection/log/admin.vue
  23. 11
    2
      src/views/schoolSection/log/appLaunch.vue
  24. 11
    2
      src/views/schoolSection/log/applicationDownload.vue
  25. 17
    4
      src/views/schoolSection/log/deviceEvents.vue
  26. 17
    4
      src/views/schoolSection/log/deviceExport.vue
  27. 17
    4
      src/views/schoolSection/log/deviceInstallation.vue
  28. 17
    2
      src/views/schoolSection/log/deviceLocation.vue
  29. 11
    2
      src/views/schoolSection/log/devicePush.vue
  30. 17
    4
      src/views/schoolSection/log/violatingDevice.vue
  31. 22
    8
      src/views/schoolSection/networkManage/whitelist.vue
  32. 12
    2
      src/views/schoolSection/networkManage/whitelistLibrary.vue
  33. 9
    0
      src/views/schoolSection/notice/notice.vue
  34. 21
    9
      src/views/schoolSection/setting/deviceSetting.vue
  35. 12
    5
      src/views/schoolSection/setting/logo.vue
  36. 22
    8
      src/views/schoolSection/setting/wallpaper.vue

+ 3
- 1
src/App.vue View File

9
   data() {
9
   data() {
10
     return {};
10
     return {};
11
   },
11
   },
12
-  created() {},
12
+  created() {
13
+    this.$store.commit("setPowerAfterRefresh");
14
+  },
13
   methods: {}
15
   methods: {}
14
 };
16
 };
15
 </script>
17
 </script>

+ 1
- 1
src/api/region.js View File

17
  * 2.1.1.2区域--区域选择列表
17
  * 2.1.1.2区域--区域选择列表
18
  */
18
  */
19
 export const region_list_sel_qy = (data) =>
19
 export const region_list_sel_qy = (data) =>
20
-    setRequest("region/list_sel_qy", data);
20
+  setRequest("region/list_sel_qy", data);
21
 /**
21
 /**
22
  * 2.1.1.2区域--区域学校选择列表
22
  * 2.1.1.2区域--区域学校选择列表
23
  */
23
  */

+ 91
- 1
src/router/index.js View File

93
             "xh_control_userInfo",
93
             "xh_control_userInfo",
94
             JSON.stringify(_userInfo)
94
             JSON.stringify(_userInfo)
95
           );
95
           );
96
-          next();
96
+          let _userPower = localStorage.getItem("xh_control_userPower");
97
+          if (_userPower) {
98
+            _userPower = JSON.parse(_userPower);
99
+            if (_userPower.atype === 3) {
100
+              if (
101
+                to.path.startsWith("/platform/") ||
102
+                to.path.startsWith("/region/")
103
+              ) {
104
+                console.log("文件名:router index.vue,退出原因:未获得权限1");
105
+                next({
106
+                  path: "/login",
107
+                  query: to.query
108
+                });
109
+              } else {
110
+                next();
111
+              }
112
+            } else if (_userPower.atype === 2) {
113
+              if (to.path.startsWith("/platform/")) {
114
+                console.log("文件名:router index.vue,退出原因:未获得权限2");
115
+                next({
116
+                  path: "/login",
117
+                  query: to.query
118
+                });
119
+              } else {
120
+                if (to.path.startsWith("/region/")) {
121
+                  if (_userPower.regionids.length > 0 && _userPower.schoolid) {
122
+                    next("/school");
123
+                  } else {
124
+                    next();
125
+                  }
126
+                } else if (to.path.startsWith("/school/")) {
127
+                  if (_userPower.regionids.length > 0 && !_userPower.schoolid) {
128
+                    next("/region");
129
+                  } else {
130
+                    next();
131
+                  }
132
+                } else {
133
+                  next();
134
+                }
135
+              }
136
+            } else if (_userPower.atype === 1) {
137
+              if (to.path.startsWith("/platform/")) {
138
+                if (_userPower.regionids.length > 0 && _userPower.schoolid) {
139
+                  next("/school");
140
+                } else if (
141
+                  _userPower.regionids.length > 0 &&
142
+                  !_userPower.schoolid
143
+                ) {
144
+                  next("/region");
145
+                } else {
146
+                  next();
147
+                }
148
+              } else if (to.path.startsWith("/region/")) {
149
+                if (_userPower.regionids.length === 0 && !_userPower.schoolid) {
150
+                  next("/platform");
151
+                } else if (
152
+                  _userPower.regionids.length > 0 &&
153
+                  _userPower.schoolid
154
+                ) {
155
+                  next("/school");
156
+                } else {
157
+                  next();
158
+                }
159
+              } else if (to.path.startsWith("/school/")) {
160
+                if (_userPower.regionids.length === 0 && !_userPower.schoolid) {
161
+                  next("/platform");
162
+                } else if (
163
+                  _userPower.regionids.length > 0 &&
164
+                  !_userPower.schoolid
165
+                ) {
166
+                  next("/region");
167
+                } else {
168
+                  next();
169
+                }
170
+              } else {
171
+                next();
172
+              }
173
+            } else {
174
+              console.log("文件名:router index.vue,退出原因:未获得权限3");
175
+              next({
176
+                path: "/login",
177
+                query: to.query
178
+              });
179
+            }
180
+          } else {
181
+            console.log("文件名:router index.vue,退出原因:未获得权限4");
182
+            next({
183
+              path: "/login",
184
+              query: to.query
185
+            });
186
+          }
97
         } else {
187
         } else {
98
           console.log("文件名:router index.vue,退出原因:超过24小时未登录");
188
           console.log("文件名:router index.vue,退出原因:超过24小时未登录");
99
           next({
189
           next({

+ 131
- 3
src/store/index.js View File

4
 
4
 
5
 export default new Vuex.Store({
5
 export default new Vuex.Store({
6
   state: {
6
   state: {
7
-    userInfo: {}
7
+    userInfo: {},
8
+    // 用户权限
9
+    userPower: {
10
+      // 1平台管理员 2区域管理员 3学校管理员
11
+      atype: null,
12
+      // 进入的区域层级列表
13
+      regionids: [],
14
+      // 进入的学校
15
+      schoolid: null
16
+    }
8
   },
17
   },
9
-  mutations: {},
10
-  actions: {}
18
+  mutations: {
19
+    // 登录后设置用户信息
20
+    loginSetUserInfo(state, info) {
21
+      state.userInfo = info;
22
+      state.userPower.atype = info.atype;
23
+      if (state.userPower.atype === 1) {
24
+        state.userPower.regionids = [];
25
+        state.userPower.schoolid = null;
26
+      } else if (state.userPower.atype === 2) {
27
+        state.userPower.regionids = [info.regionid];
28
+        state.userPower.schoolid = null;
29
+      } else if (state.userPower.atype === 3) {
30
+        state.userPower.regionids = [info.regionid];
31
+        state.userPower.schoolid = info.schoolid;
32
+      }
33
+      localStorage.setItem(
34
+        "xh_control_userInfo",
35
+        JSON.stringify({
36
+          content: info,
37
+          datetime: new Date().getTime()
38
+        })
39
+      );
40
+      // 登录后设置用户的初始权限
41
+      localStorage.setItem(
42
+        "xh_control_userPower",
43
+        JSON.stringify(state.userPower)
44
+      );
45
+    },
46
+    // 刷新后设置权限
47
+    setPowerAfterRefresh(state) {
48
+      let _userInfo = localStorage.getItem("xh_control_userInfo");
49
+      let _userPower = localStorage.getItem("xh_control_userPower");
50
+      if (_userInfo && _userPower) {
51
+        _userPower = JSON.parse(_userPower);
52
+        state.userPower.atype = _userPower.atype;
53
+        state.userPower.regionids = _userPower.regionids;
54
+        state.userPower.schoolid = _userPower.schoolid;
55
+      } else {
56
+        state.userPower.atype = null;
57
+        state.userPower.regionids = [];
58
+        state.userPower.schoolid = null;
59
+      }
60
+    },
61
+    // 进入区域设置跳转痕迹
62
+    setEnterRegionPower(state, regionid) {
63
+      if (!state.userPower.regionids.includes(regionid)) {
64
+        state.userPower.regionids.push(regionid);
65
+      }
66
+      localStorage.setItem(
67
+        "xh_control_userPower",
68
+        JSON.stringify(state.userPower)
69
+      );
70
+    },
71
+    // 退出当前区域设置跳转痕迹
72
+    setQuitRegionPower(state) {
73
+      if (state.userPower.atype === 1) {
74
+        if (state.userPower.regionids.length > 0) {
75
+          state.userPower.regionids.pop();
76
+        }
77
+      } else if (state.userPower.atype === 2) {
78
+        if (state.userPower.regionids.length > 1) {
79
+          state.userPower.regionids.pop();
80
+        }
81
+      }
82
+      localStorage.setItem(
83
+        "xh_control_userPower",
84
+        JSON.stringify(state.userPower)
85
+      );
86
+    },
87
+    // 进入学校设置跳转痕迹
88
+    setEnterSchoolPower(state, schoolid) {
89
+      state.userPower.schoolid = schoolid;
90
+      localStorage.setItem(
91
+        "xh_control_userPower",
92
+        JSON.stringify(state.userPower)
93
+      );
94
+    },
95
+    // 退出当前学校设置跳转痕迹
96
+    setQuitSchoolPower(state) {
97
+      if (state.userPower.atype === 1 || state.userPower.atype === 2) {
98
+        state.userPower.schoolid = null;
99
+      }
100
+      localStorage.setItem(
101
+        "xh_control_userPower",
102
+        JSON.stringify(state.userPower)
103
+      );
104
+    }
105
+  },
106
+  getters: {
107
+    powerParams(state) {
108
+      let _powerParams = {
109
+        // 1平台 2区域 3学校
110
+        rtype: null,
111
+        // 区域ID/学校ID
112
+        objectid: null
113
+      };
114
+      if (
115
+        state.userPower.schoolid &&
116
+        (state.userPower.atype === 1 ||
117
+          state.userPower.atype === 2 ||
118
+          state.userPower.atype === 3)
119
+      ) {
120
+        _powerParams.rtype = 3;
121
+        _powerParams.objectid = state.userPower.schoolid;
122
+      } else if (
123
+        state.userPower.regionids.length > 0 &&
124
+        (state.userPower.atype === 1 || state.userPower.atype === 2)
125
+      ) {
126
+        _powerParams.rtype = 2;
127
+        let _regionids = [...state.userPower.regionids];
128
+        _powerParams.objectid = _regionids.pop();
129
+      } else if (
130
+        state.userPower.regionids.length === 0 &&
131
+        state.userPower.atype === 1
132
+      ) {
133
+        _powerParams.rtype = 1;
134
+        _powerParams.objectid = null;
135
+      }
136
+      return _powerParams;
137
+    }
138
+  }
11
 });
139
 });

+ 54
- 1
src/views/layout.vue View File

5
         <img src="@/assets/img/setting/LOGO.png" />
5
         <img src="@/assets/img/setting/LOGO.png" />
6
       </div>
6
       </div>
7
       <div class="header_right">
7
       <div class="header_right">
8
+        <div style="margin-right: 10px" v-if="powerParams.rtype === 2">
9
+          所属区域【{{ belongName }}】
10
+        </div>
11
+        <div style="margin-right: 10px" v-else-if="powerParams.rtype === 3">
12
+          所属学校【{{ belongName }}】
13
+        </div>
8
         <Dropdown
14
         <Dropdown
9
           :transfer="true"
15
           :transfer="true"
10
           @on-visible-change="userDropdownVisibleChange"
16
           @on-visible-change="userDropdownVisibleChange"
37
 </template>
43
 </template>
38
 
44
 
39
 <script>
45
 <script>
46
+import { region_detail } from "@/api/region";
47
+import { school_detail } from "@/api/school";
40
 export default {
48
 export default {
41
   data() {
49
   data() {
42
     return {
50
     return {
43
       userDropdown: false,
51
       userDropdown: false,
44
-      userInfo: {}
52
+      userInfo: {},
53
+      // 所属名称
54
+      belongName: ""
45
     };
55
     };
46
   },
56
   },
47
   created() {
57
   created() {
49
       localStorage.getItem("xh_control_userInfo")
59
       localStorage.getItem("xh_control_userInfo")
50
     ).content;
60
     ).content;
51
   },
61
   },
62
+  computed: {
63
+    powerParams() {
64
+      return this.$store.getters.powerParams;
65
+    }
66
+  },
67
+  watch: {
68
+    $route: {
69
+      handler() {
70
+        this.$nextTick(() => {
71
+          this.getDetail();
72
+        });
73
+      },
74
+      deep: true,
75
+      immediate: true
76
+    }
77
+  },
52
   methods: {
78
   methods: {
79
+    getDetail() {
80
+      if (this.powerParams.rtype === 2) {
81
+        region_detail({
82
+          regionid: this.powerParams.objectid
83
+        }).then((data) => {
84
+          if (data.code === 0) {
85
+            this.belongName = data.obj.regionName;
86
+          } else {
87
+            this.belongName = "";
88
+            this.$Message.error(data.msg);
89
+          }
90
+        });
91
+      } else if (this.powerParams.rtype === 3) {
92
+        school_detail({
93
+          schoolid: this.powerParams.objectid
94
+        }).then((data) => {
95
+          if (data.code === 0) {
96
+            this.belongName = data.obj.schoolName;
97
+          } else {
98
+            this.belongName = "";
99
+            this.$Message.error(data.msg);
100
+          }
101
+        });
102
+      } else {
103
+        this.belongName = "";
104
+      }
105
+    },
53
     // 下拉菜单显示隐藏
106
     // 下拉菜单显示隐藏
54
     userDropdownVisibleChange(visible) {
107
     userDropdownVisibleChange(visible) {
55
       this.userDropdown = visible;
108
       this.userDropdown = visible;

+ 2
- 7
src/views/login/login.vue View File

164
   created() {
164
   created() {
165
     //登录前清除信息
165
     //登录前清除信息
166
     localStorage.setItem("xh_control_userInfo", "");
166
     localStorage.setItem("xh_control_userInfo", "");
167
+    localStorage.setItem("xh_control_userPower", "");
167
     // 在页面加载时获取账号信息
168
     // 在页面加载时获取账号信息
168
     let userdata = localStorage.getItem("control_user");
169
     let userdata = localStorage.getItem("control_user");
169
     // 如果存在赋值给表单,并且将记住密码勾选
170
     // 如果存在赋值给表单,并且将记住密码勾选
241
             that.wait_flag = false;
242
             that.wait_flag = false;
242
             if (res.code == 0) {
243
             if (res.code == 0) {
243
               that.$Message.success(res.msg);
244
               that.$Message.success(res.msg);
244
-              localStorage.setItem(
245
-                "xh_control_userInfo",
246
-                JSON.stringify({
247
-                  content: res.obj,
248
-                  datetime: new Date().getTime()
249
-                })
250
-              );
245
+              this.$store.commit("loginSetUserInfo", res.obj);
251
               let atype = res.obj.atype;
246
               let atype = res.obj.atype;
252
               let path = "";
247
               let path = "";
253
               //1平台管理员2区域管理员3学校管理员
248
               //1平台管理员2区域管理员3学校管理员

+ 11
- 1
src/views/platformSection/log/deviceExport.vue View File

98
   created() {
98
   created() {
99
     this.searchList();
99
     this.searchList();
100
   },
100
   },
101
+  computed: {
102
+    powerParams() {
103
+      return this.$store.getters.powerParams;
104
+    }
105
+  },
101
   methods: {
106
   methods: {
102
     // 搜索
107
     // 搜索
103
     searchList() {
108
     searchList() {
118
     // 获取列表
123
     // 获取列表
119
     getList() {
124
     getList() {
120
       logDeviceBind_list({
125
       logDeviceBind_list({
126
+        rtype: this.powerParams.rtype,
127
+        objectid: this.powerParams.objectid,
121
         page: this.searchForm.page,
128
         page: this.searchForm.page,
122
         size: this.searchForm.size,
129
         size: this.searchForm.size,
123
         name: this.searchForm.name
130
         name: this.searchForm.name
131
       });
138
       });
132
     },
139
     },
133
     toExport(row) {
140
     toExport(row) {
134
-      let form = {};
141
+      let form = {
142
+        rtype: this.powerParams.rtype,
143
+        objectid: this.powerParams.objectid
144
+      };
135
       if (row) {
145
       if (row) {
136
         form.regionid = row.regionid;
146
         form.regionid = row.regionid;
137
       }
147
       }

+ 11
- 0
src/views/platformSection/networkManage/whitelistLibrary.vue View File

277
   created() {
277
   created() {
278
     this.searchList();
278
     this.searchList();
279
   },
279
   },
280
+  computed: {
281
+    powerParams() {
282
+      return this.$store.getters.powerParams;
283
+    }
284
+  },
280
   methods: {
285
   methods: {
281
     // 搜索
286
     // 搜索
282
     searchList() {
287
     searchList() {
297
     // 获取列表
302
     // 获取列表
298
     getList() {
303
     getList() {
299
       whiteLibrary_list({
304
       whiteLibrary_list({
305
+        rtype: this.powerParams.rtype,
306
+        objectid: this.powerParams.objectid,
300
         page: this.searchForm.page,
307
         page: this.searchForm.page,
301
         size: this.searchForm.size,
308
         size: this.searchForm.size,
302
         name: this.searchForm.name
309
         name: this.searchForm.name
334
               ? whiteLibrary_edit
341
               ? whiteLibrary_edit
335
               : whiteLibrary_add;
342
               : whiteLibrary_add;
336
           let form = {
343
           let form = {
344
+            rtype: this.powerParams.rtype,
345
+            objectid: this.powerParams.objectid,
337
             name: this.whiteLibraryInfo.name,
346
             name: this.whiteLibraryInfo.name,
338
             wltype: this.whiteLibraryInfo.wltype,
347
             wltype: this.whiteLibraryInfo.wltype,
339
             comm: this.whiteLibraryInfo.comm,
348
             comm: this.whiteLibraryInfo.comm,
393
         content: "您确定删除选中数据吗?",
402
         content: "您确定删除选中数据吗?",
394
         onOk: () => {
403
         onOk: () => {
395
           whiteLibrary_delete({
404
           whiteLibrary_delete({
405
+            rtype: this.powerParams.rtype,
406
+            objectid: this.powerParams.objectid,
396
             wlid: row.wlid,
407
             wlid: row.wlid,
397
             rversion: row.rversion
408
             rversion: row.rversion
398
           }).then((data) => {
409
           }).then((data) => {

+ 15
- 0
src/views/platformSection/notice/notice.vue View File

258
   created() {
258
   created() {
259
     this.searchList();
259
     this.searchList();
260
   },
260
   },
261
+  computed: {
262
+    powerParams() {
263
+      return this.$store.getters.powerParams;
264
+    }
265
+  },
261
   methods: {
266
   methods: {
262
     // 搜索
267
     // 搜索
263
     searchList() {
268
     searchList() {
282
       let _enddate = this.searchForm.dataRange[1];
287
       let _enddate = this.searchForm.dataRange[1];
283
       _enddate = _enddate ? dateFormat(_enddate, "yyyy-MM-dd") : null;
288
       _enddate = _enddate ? dateFormat(_enddate, "yyyy-MM-dd") : null;
284
       notice_list({
289
       notice_list({
290
+        rtype: this.powerParams.rtype,
291
+        objectid: this.powerParams.objectid,
285
         page: this.searchForm.page,
292
         page: this.searchForm.page,
286
         size: this.searchForm.size,
293
         size: this.searchForm.size,
287
         title: this.searchForm.title,
294
         title: this.searchForm.title,
342
           }
349
           }
343
           this.noticeInfo.show = false;
350
           this.noticeInfo.show = false;
344
           let form = {
351
           let form = {
352
+            rtype: this.powerParams.rtype,
353
+            objectid: this.powerParams.objectid,
345
             noticeTitle: this.noticeInfo.noticeTitle,
354
             noticeTitle: this.noticeInfo.noticeTitle,
346
             noticeContent: this.noticeInfo.noticeContent,
355
             noticeContent: this.noticeInfo.noticeContent,
347
             noticeTxt: this.noticeInfo.noticeTxt,
356
             noticeTxt: this.noticeInfo.noticeTxt,
370
     // 查看
379
     // 查看
371
     toView(row) {
380
     toView(row) {
372
       notice_detail({
381
       notice_detail({
382
+        rtype: this.powerParams.rtype,
383
+        objectid: this.powerParams.objectid,
373
         noticeid: row.noticeid
384
         noticeid: row.noticeid
374
       }).then((data) => {
385
       }).then((data) => {
375
         if (data.code === 0) {
386
         if (data.code === 0) {
390
     // 编辑
401
     // 编辑
391
     toEdit(row) {
402
     toEdit(row) {
392
       notice_detail({
403
       notice_detail({
404
+        rtype: this.powerParams.rtype,
405
+        objectid: this.powerParams.objectid,
393
         noticeid: row.noticeid
406
         noticeid: row.noticeid
394
       }).then((data) => {
407
       }).then((data) => {
395
         if (data.code === 0) {
408
         if (data.code === 0) {
423
         content: "您确定删除选中数据吗?",
436
         content: "您确定删除选中数据吗?",
424
         onOk: () => {
437
         onOk: () => {
425
           notice_delete({
438
           notice_delete({
439
+            rtype: this.powerParams.rtype,
440
+            objectid: this.powerParams.objectid,
426
             noticeid: row.noticeid,
441
             noticeid: row.noticeid,
427
             rversion: row.rversion
442
             rversion: row.rversion
428
           }).then((data) => {
443
           }).then((data) => {

+ 13
- 0
src/views/platformSection/regionManage/adminManage.vue View File

434
     this.getSearchRegionList();
434
     this.getSearchRegionList();
435
     this.searchList();
435
     this.searchList();
436
   },
436
   },
437
+  computed: {
438
+    powerParams() {
439
+      return this.$store.getters.powerParams;
440
+    }
441
+  },
437
   methods: {
442
   methods: {
438
     // 获取搜索区域列表
443
     // 获取搜索区域列表
439
     getSearchRegionList() {
444
     getSearchRegionList() {
464
     // 获取列表
469
     // 获取列表
465
     getList() {
470
     getList() {
466
       admin_list_pt({
471
       admin_list_pt({
472
+        rtype: this.powerParams.rtype,
473
+        objectid: this.powerParams.objectid,
467
         page: this.searchForm.page,
474
         page: this.searchForm.page,
468
         size: this.searchForm.size,
475
         size: this.searchForm.size,
469
         enabled: this.searchForm.enabled,
476
         enabled: this.searchForm.enabled,
570
           this.adminInfo.show = false;
577
           this.adminInfo.show = false;
571
           let api = this.adminInfo.adminid ? admin_edit : admin_add;
578
           let api = this.adminInfo.adminid ? admin_edit : admin_add;
572
           let form = {
579
           let form = {
580
+            rtype: this.powerParams.rtype,
581
+            objectid: this.powerParams.objectid,
573
             aname: this.adminInfo.aname,
582
             aname: this.adminInfo.aname,
574
             loginname: this.adminInfo.loginname,
583
             loginname: this.adminInfo.loginname,
575
             loginpwd: this.adminInfo.loginpwd,
584
             loginpwd: this.adminInfo.loginpwd,
633
         content: "您确定删除选中数据吗?",
642
         content: "您确定删除选中数据吗?",
634
         onOk: () => {
643
         onOk: () => {
635
           admin_delete({
644
           admin_delete({
645
+            rtype: this.powerParams.rtype,
646
+            objectid: this.powerParams.objectid,
636
             adminid: row.adminid,
647
             adminid: row.adminid,
637
             rversion: row.rversion
648
             rversion: row.rversion
638
           }).then((data) => {
649
           }).then((data) => {
650
     enabledChange(row) {
661
     enabledChange(row) {
651
       let api = row.enabled === 1 ? admin_enable : admin_disabled;
662
       let api = row.enabled === 1 ? admin_enable : admin_disabled;
652
       api({
663
       api({
664
+        rtype: this.powerParams.rtype,
665
+        objectid: this.powerParams.objectid,
653
         adminid: row.adminid,
666
         adminid: row.adminid,
654
         rversion: row.rversion
667
         rversion: row.rversion
655
       }).then((data) => {
668
       }).then((data) => {

+ 17
- 1
src/views/platformSection/regionManage/regionManage.vue View File

419
   created() {
419
   created() {
420
     this.searchList();
420
     this.searchList();
421
   },
421
   },
422
+  computed: {
423
+    powerParams() {
424
+      return this.$store.getters.powerParams;
425
+    }
426
+  },
422
   methods: {
427
   methods: {
423
     // 获取短信验证码
428
     // 获取短信验证码
424
     getMsgCode() {
429
     getMsgCode() {
476
     // 获取列表
481
     // 获取列表
477
     getList() {
482
     getList() {
478
       region_list_pt({
483
       region_list_pt({
484
+        rtype: this.powerParams.rtype,
485
+        objectid: this.powerParams.objectid,
479
         page: this.searchForm.page,
486
         page: this.searchForm.page,
480
         size: this.searchForm.size,
487
         size: this.searchForm.size,
481
         regionName: this.searchForm.regionName
488
         regionName: this.searchForm.regionName
535
           }
542
           }
536
           this.regionInfo.show = false;
543
           this.regionInfo.show = false;
537
           region_add({
544
           region_add({
545
+            rtype: this.powerParams.rtype,
546
+            objectid: this.powerParams.objectid,
538
             regionName: this.regionInfo.regionName,
547
             regionName: this.regionInfo.regionName,
539
             regionCode: this.regionInfo.regionCode,
548
             regionCode: this.regionInfo.regionCode,
540
             admin: {
549
             admin: {
563
         if (valid) {
572
         if (valid) {
564
           this.regionInfo.show = false;
573
           this.regionInfo.show = false;
565
           region_edit({
574
           region_edit({
575
+            rtype: this.powerParams.rtype,
576
+            objectid: this.powerParams.objectid,
566
             regionName: this.modifyRegion.regionName,
577
             regionName: this.modifyRegion.regionName,
567
             regionCode: this.modifyRegion.regionCode,
578
             regionCode: this.modifyRegion.regionCode,
568
             address: this.modifyRegion.address,
579
             address: this.modifyRegion.address,
581
       });
592
       });
582
     },
593
     },
583
     // 进入
594
     // 进入
584
-    toEnter() {
595
+    toEnter(row) {
596
+      this.$store.commit("setEnterRegionPower", row.regionid);
585
       this.$router.push({
597
       this.$router.push({
586
         path: "/region/home",
598
         path: "/region/home",
587
         query: {}
599
         query: {}
590
     // 查看
602
     // 查看
591
     toView(row) {
603
     toView(row) {
592
       region_list_admin({
604
       region_list_admin({
605
+        rtype: this.powerParams.rtype,
606
+        objectid: this.powerParams.objectid,
593
         regionid: row.regionid
607
         regionid: row.regionid
594
       }).then((data) => {
608
       }).then((data) => {
595
         if (data.code === 0) {
609
         if (data.code === 0) {
623
         content: "您确定删除选中数据吗?",
637
         content: "您确定删除选中数据吗?",
624
         onOk: () => {
638
         onOk: () => {
625
           region_delete({
639
           region_delete({
640
+            rtype: this.powerParams.rtype,
641
+            objectid: this.powerParams.objectid,
626
             regionid: row.regionid,
642
             regionid: row.regionid,
627
             rversion: row.rversion
643
             rversion: row.rversion
628
           }).then((data) => {
644
           }).then((data) => {

+ 41
- 2
src/views/regionSection/index.vue View File

264
           <span>公告</span>
264
           <span>公告</span>
265
         </router-link>
265
         </router-link>
266
       </div>
266
       </div>
267
-      <div class="out_region" @click="exitToPreviousLevel()">退出区域</div>
267
+      <div
268
+        class="out_region"
269
+        v-if="
270
+          (userPower.atype === 1 && userPower.regionids.length > 0) ||
271
+          (userPower.atype === 2 && userPower.regionids.length > 1)
272
+        "
273
+        @click="exitToPreviousLevel()"
274
+      >
275
+        退出区域
276
+      </div>
268
     </div>
277
     </div>
269
     <div class="section_main">
278
     <div class="section_main">
270
       <router-view></router-view>
279
       <router-view></router-view>
336
         this.$route.path.includes("/region/deviceInstallationLog") ||
345
         this.$route.path.includes("/region/deviceInstallationLog") ||
337
         this.$route.path.includes("/region/deviceExport")
346
         this.$route.path.includes("/region/deviceExport")
338
       );
347
       );
348
+    },
349
+    // 用户权限
350
+    userPower() {
351
+      return this.$store.state.userPower;
339
     }
352
     }
340
   },
353
   },
341
   methods: {
354
   methods: {
348
     },
361
     },
349
     // 退出到上一级
362
     // 退出到上一级
350
     exitToPreviousLevel() {
363
     exitToPreviousLevel() {
351
-      this.$router.push("/platform/home");
364
+      let power = this.userPower;
365
+      if (power.atype === 1) {
366
+        if (power.regionids.length === 1) {
367
+          this.$store.commit("setQuitRegionPower");
368
+          if (this.$route.path === "/platform/home") {
369
+            this.$router.go(0);
370
+          } else {
371
+            this.$router.push("/platform/home");
372
+          }
373
+        } else if (power.regionids.length > 1) {
374
+          this.$store.commit("setQuitRegionPower");
375
+          if (this.$route.path === "/region/home") {
376
+            this.$router.go(0);
377
+          } else {
378
+            this.$router.push("/region/home");
379
+          }
380
+        }
381
+      } else if (power.atype === 2) {
382
+        if (power.regionids.length > 1) {
383
+          this.$store.commit("setQuitRegionPower");
384
+          if (this.$route.path === "/region/home") {
385
+            this.$router.go(0);
386
+          } else {
387
+            this.$router.push("/region/home");
388
+          }
389
+        }
390
+      }
352
     }
391
     }
353
   }
392
   }
354
 };
393
 };

+ 11
- 3
src/views/regionSection/regionManage/regionManage.vue View File

366
     ).content;
366
     ).content;
367
     this.searchList();
367
     this.searchList();
368
   },
368
   },
369
+  computed: {
370
+    powerParams() {
371
+      return this.$store.getters.powerParams;
372
+    }
373
+  },
369
   methods: {
374
   methods: {
370
     // 获取短信验证码
375
     // 获取短信验证码
371
     getMsgCode() {
376
     getMsgCode() {
423
     // 获取列表
428
     // 获取列表
424
     getList() {
429
     getList() {
425
       region_list_qy({
430
       region_list_qy({
431
+        rtype: this.powerParams.rtype,
432
+        objectid: this.powerParams.objectid,
433
+        regionid: this.powerParams.objectid,
426
         page: this.searchForm.page,
434
         page: this.searchForm.page,
427
         size: this.searchForm.size,
435
         size: this.searchForm.size,
428
-        regionName: this.searchForm.regionName,
429
-        regionid: this.userInfo.regionid
436
+        regionName: this.searchForm.regionName
430
       }).then((data) => {
437
       }).then((data) => {
431
         if (data.code === 0) {
438
         if (data.code === 0) {
432
           this.searchForm.list = data.obj.data;
439
           this.searchForm.list = data.obj.data;
521
       });
528
       });
522
     },
529
     },
523
     // 进入
530
     // 进入
524
-    toEnter() {
531
+    toEnter(row) {
532
+      this.$store.commit("setEnterRegionPower", row.regionid);
525
       this.$router.push({
533
       this.$router.push({
526
         path: "/region/home",
534
         path: "/region/home",
527
         query: {}
535
         query: {}

+ 11
- 4
src/views/regionSection/regionManage/schoolManage.vue View File

314
 </template>
314
 </template>
315
 
315
 
316
 <script>
316
 <script>
317
-import { region_list_sel_pt, region_list_sel_qy } from "@/api/region";
317
+import { region_list_sel_qy } from "@/api/region";
318
 import { login_msg_code } from "@/api/login";
318
 import { login_msg_code } from "@/api/login";
319
 import { generateRandomString } from "@/utils";
319
 import { generateRandomString } from "@/utils";
320
 import {
320
 import {
508
     this.getAreaList();
508
     this.getAreaList();
509
     this.searchList();
509
     this.searchList();
510
   },
510
   },
511
-  mounted() {},
511
+  computed: {
512
+    powerParams() {
513
+      return this.$store.getters.powerParams;
514
+    }
515
+  },
512
   methods: {
516
   methods: {
513
     //选择省份
517
     //选择省份
514
     provinceChange(id, type) {
518
     provinceChange(id, type) {
590
     // 获取列表
594
     // 获取列表
591
     getList() {
595
     getList() {
592
       school_list({
596
       school_list({
597
+        rtype: this.powerParams.rtype,
598
+        objectid: this.powerParams.objectid,
599
+        regionid: this.powerParams.objectid,
593
         page: this.searchForm.page,
600
         page: this.searchForm.page,
594
         size: this.searchForm.size,
601
         size: this.searchForm.size,
595
         areaCode: this.searchForm.areaCodes,
602
         areaCode: this.searchForm.areaCodes,
596
-        schoolName: this.searchForm.schoolName,
597
-        regionid: this.userInfo.regionid
603
+        schoolName: this.searchForm.schoolName
598
       }).then((data) => {
604
       }).then((data) => {
599
         if (data.code === 0) {
605
         if (data.code === 0) {
600
           this.searchForm.list = data.obj.data;
606
           this.searchForm.list = data.obj.data;
739
     },
745
     },
740
     // 进入学校
746
     // 进入学校
741
     toSchool(row) {
747
     toSchool(row) {
748
+      this.$store.commit("setEnterSchoolPower", row.schoolid);
742
       this.$router.push({
749
       this.$router.push({
743
         path: "/school/home",
750
         path: "/school/home",
744
         query: {}
751
         query: {}

+ 14
- 6
src/views/schoolSection/applicationManage/greenBrowser.vue View File

169
   created() {
169
   created() {
170
     this.searchList();
170
     this.searchList();
171
   },
171
   },
172
+  computed: {
173
+    powerParams() {
174
+      return this.$store.getters.powerParams;
175
+    }
176
+  },
172
   methods: {
177
   methods: {
173
     // 搜索
178
     // 搜索
174
     searchList() {
179
     searchList() {
188
     },
193
     },
189
     // 获取列表
194
     // 获取列表
190
     getList() {
195
     getList() {
191
-      console.warn("---注意替换regionid---schoolid->");
192
       browser_list({
196
       browser_list({
193
-        schoolid: 4,
197
+        rtype: this.powerParams.rtype,
198
+        objectid: this.powerParams.objectid,
199
+        schoolid: this.powerParams.objectid,
194
         page: this.searchForm.page,
200
         page: this.searchForm.page,
195
         size: this.searchForm.size,
201
         size: this.searchForm.size,
196
         visitName: this.searchForm.visitName
202
         visitName: this.searchForm.visitName
204
       });
210
       });
205
     },
211
     },
206
     toAdd() {
212
     toAdd() {
207
-      console.warn("---注意替换regionid---schoolid->");
208
       this.browserInfo = {
213
       this.browserInfo = {
209
         show: true,
214
         show: true,
210
         browserid: null,
215
         browserid: null,
211
         rversion: null,
216
         rversion: null,
212
-        schoolid: 4,
217
+        schoolid: this.powerParams.objectid,
213
         visitName: null,
218
         visitName: null,
214
         visitUrl: null
219
         visitUrl: null
215
       };
220
       };
220
           this.browserInfo.show = false;
225
           this.browserInfo.show = false;
221
           let api = this.browserInfo.browserid ? browser_edit : browser_add;
226
           let api = this.browserInfo.browserid ? browser_edit : browser_add;
222
           let form = {
227
           let form = {
228
+            rtype: this.powerParams.rtype,
229
+            objectid: this.powerParams.objectid,
223
             schoolid: this.browserInfo.schoolid,
230
             schoolid: this.browserInfo.schoolid,
224
             visitName: this.browserInfo.visitName,
231
             visitName: this.browserInfo.visitName,
225
             visitUrl: this.browserInfo.visitUrl
232
             visitUrl: this.browserInfo.visitUrl
240
       });
247
       });
241
     },
248
     },
242
     toEdit(row) {
249
     toEdit(row) {
243
-      console.warn("---注意替换regionid---schoolid->");
244
       this.browserInfo = {
250
       this.browserInfo = {
245
         show: true,
251
         show: true,
246
         browserid: row.browserid,
252
         browserid: row.browserid,
247
         rversion: row.rversion,
253
         rversion: row.rversion,
248
-        schoolid: 4,
254
+        schoolid: this.powerParams.objectid,
249
         visitName: row.visitName,
255
         visitName: row.visitName,
250
         visitUrl: row.visitUrl
256
         visitUrl: row.visitUrl
251
       };
257
       };
256
         content: "您确定删除选中数据吗?",
262
         content: "您确定删除选中数据吗?",
257
         onOk: () => {
263
         onOk: () => {
258
           browser_delete({
264
           browser_delete({
265
+            rtype: this.powerParams.rtype,
266
+            objectid: this.powerParams.objectid,
259
             browserid: row.browserid,
267
             browserid: row.browserid,
260
             rversion: row.rversion
268
             rversion: row.rversion
261
           }).then((data) => {
269
           }).then((data) => {

+ 8
- 2
src/views/schoolSection/deviceManage/breakRuleDevice.vue View File

155
   created() {
155
   created() {
156
     this.searchList();
156
     this.searchList();
157
   },
157
   },
158
+  computed: {
159
+    powerParams() {
160
+      return this.$store.getters.powerParams;
161
+    }
162
+  },
158
   methods: {
163
   methods: {
159
     // 搜索
164
     // 搜索
160
     searchList() {
165
     searchList() {
176
     getList() {
181
     getList() {
177
       this.tableSelection = [];
182
       this.tableSelection = [];
178
       device_manager_list_vd({
183
       device_manager_list_vd({
184
+        rtype: this.powerParams.rtype,
185
+        objectid: this.powerParams.objectid,
179
         page: this.searchForm.page,
186
         page: this.searchForm.page,
180
         size: this.searchForm.size,
187
         size: this.searchForm.size,
181
-        schoolid: 4,
182
         handled: this.searchForm.handled,
188
         handled: this.searchForm.handled,
183
         name: this.searchForm.name
189
         name: this.searchForm.name
184
       }).then((data) => {
190
       }).then((data) => {
185
         if (data.code === 0) {
191
         if (data.code === 0) {
186
-          // this.searchForm.list = data.obj.data;
192
+          this.searchForm.list = data.obj.data;
187
           this.searchForm.total = data.obj.total;
193
           this.searchForm.total = data.obj.total;
188
         } else {
194
         } else {
189
           this.$Message.error(data.msg);
195
           this.$Message.error(data.msg);

+ 14
- 2
src/views/schoolSection/deviceManage/deviceManage.vue View File

204
   created() {
204
   created() {
205
     this.getClassList();
205
     this.getClassList();
206
   },
206
   },
207
+  computed: {
208
+    powerParams() {
209
+      return this.$store.getters.powerParams;
210
+    }
211
+  },
207
   methods: {
212
   methods: {
208
     classChange(classid) {
213
     classChange(classid) {
209
       this.searchForm.classid = classid;
214
       this.searchForm.classid = classid;
227
     },
232
     },
228
     // 获取班级列表
233
     // 获取班级列表
229
     getClassList() {
234
     getClassList() {
230
-      console.warn("class_list----");
231
       class_list({
235
       class_list({
232
-        schoolid: 1
236
+        rtype: this.powerParams.rtype,
237
+        objectid: this.powerParams.objectid,
238
+        schoolid: this.powerParams.objectid
233
       }).then((data) => {
239
       }).then((data) => {
234
         if (data.code === 0) {
240
         if (data.code === 0) {
235
           this.schoolInfo = {
241
           this.schoolInfo = {
247
     getList() {
253
     getList() {
248
       this.tableSelection = [];
254
       this.tableSelection = [];
249
       device_manager_list_d({
255
       device_manager_list_d({
256
+        rtype: this.powerParams.rtype,
257
+        objectid: this.powerParams.objectid,
250
         page: this.searchForm.page,
258
         page: this.searchForm.page,
251
         size: this.searchForm.size,
259
         size: this.searchForm.size,
252
         schoolid: this.schoolInfo.schoolid,
260
         schoolid: this.schoolInfo.schoolid,
265
     // 设备导出
273
     // 设备导出
266
     toDeviceExport() {
274
     toDeviceExport() {
267
       device_manager_export_d({
275
       device_manager_export_d({
276
+        rtype: this.powerParams.rtype,
277
+        objectid: this.powerParams.objectid,
268
         schoolid: this.schoolInfo.schoolid,
278
         schoolid: this.schoolInfo.schoolid,
269
         classid: this.searchForm.classid,
279
         classid: this.searchForm.classid,
270
         atype: this.searchForm.atype,
280
         atype: this.searchForm.atype,
304
     // 安装应用导出
314
     // 安装应用导出
305
     toInstallingAppExport() {
315
     toInstallingAppExport() {
306
       device_manager_export_id({
316
       device_manager_export_id({
317
+        rtype: this.powerParams.rtype,
318
+        objectid: this.powerParams.objectid,
307
         schoolid: this.schoolInfo.schoolid,
319
         schoolid: this.schoolInfo.schoolid,
308
         classid: this.searchForm.classid
320
         classid: this.searchForm.classid
309
       }).then((data) => {
321
       }).then((data) => {

+ 8
- 1
src/views/schoolSection/deviceManage/inLineDevice.vue View File

134
   created() {
134
   created() {
135
     this.searchList();
135
     this.searchList();
136
   },
136
   },
137
+  computed: {
138
+    powerParams() {
139
+      return this.$store.getters.powerParams;
140
+    }
141
+  },
137
   methods: {
142
   methods: {
138
     // 搜索
143
     // 搜索
139
     searchList() {
144
     searchList() {
154
     // 获取列表
159
     // 获取列表
155
     getList() {
160
     getList() {
156
       device_manager_list_od({
161
       device_manager_list_od({
162
+        rtype: this.powerParams.rtype,
163
+        objectid: this.powerParams.objectid,
157
         page: this.searchForm.page,
164
         page: this.searchForm.page,
158
         size: this.searchForm.size,
165
         size: this.searchForm.size,
159
-        schoolid: 4,
166
+        schoolid: this.powerParams.objectid,
160
         atype: this.searchForm.atype,
167
         atype: this.searchForm.atype,
161
         doEvent: this.searchForm.doEvent,
168
         doEvent: this.searchForm.doEvent,
162
         name: this.searchForm.name
169
         name: this.searchForm.name

+ 8
- 1
src/views/schoolSection/deviceManage/outControlDevice.vue View File

137
   created() {
137
   created() {
138
     this.searchList();
138
     this.searchList();
139
   },
139
   },
140
+  computed: {
141
+    powerParams() {
142
+      return this.$store.getters.powerParams;
143
+    }
144
+  },
140
   methods: {
145
   methods: {
141
     // 搜索
146
     // 搜索
142
     searchList() {
147
     searchList() {
157
     // 获取列表
162
     // 获取列表
158
     getList() {
163
     getList() {
159
       device_manager_list_hd({
164
       device_manager_list_hd({
165
+        rtype: this.powerParams.rtype,
166
+        objectid: this.powerParams.objectid,
160
         page: this.searchForm.page,
167
         page: this.searchForm.page,
161
         size: this.searchForm.size,
168
         size: this.searchForm.size,
162
-        schoolid: 4,
169
+        schoolid: this.powerParams.objectid,
163
         name: this.searchForm.name,
170
         name: this.searchForm.name,
164
         atype: this.searchForm.atype,
171
         atype: this.searchForm.atype,
165
         doEvent: this.searchForm.doEvent,
172
         doEvent: this.searchForm.doEvent,

+ 8
- 1
src/views/schoolSection/deviceManage/removeControlDevice.vue View File

112
   created() {
112
   created() {
113
     this.searchList();
113
     this.searchList();
114
   },
114
   },
115
+  computed: {
116
+    powerParams() {
117
+      return this.$store.getters.powerParams;
118
+    }
119
+  },
115
   methods: {
120
   methods: {
116
     // 搜索
121
     // 搜索
117
     searchList() {
122
     searchList() {
132
     // 获取列表
137
     // 获取列表
133
     getList() {
138
     getList() {
134
       device_manager_list_od({
139
       device_manager_list_od({
140
+        rtype: this.powerParams.rtype,
141
+        objectid: this.powerParams.objectid,
135
         page: this.searchForm.page,
142
         page: this.searchForm.page,
136
         size: this.searchForm.size,
143
         size: this.searchForm.size,
137
-        schoolid: 4,
144
+        schoolid: this.powerParams.objectid,
138
         atype: this.searchForm.atype,
145
         atype: this.searchForm.atype,
139
         doEvent: this.searchForm.doEvent,
146
         doEvent: this.searchForm.doEvent,
140
         name: this.searchForm.name
147
         name: this.searchForm.name

+ 22
- 2
src/views/schoolSection/index.vue View File

242
           <span>公告</span>
242
           <span>公告</span>
243
         </router-link>
243
         </router-link>
244
       </div>
244
       </div>
245
-      <div class="out_region" @click="exitToPreviousLevel()">退出学校</div>
245
+      <div
246
+        class="out_region"
247
+        v-if="
248
+          (userPower.atype === 1 || userPower.atype === 2) && userPower.schoolid
249
+        "
250
+        @click="exitToPreviousLevel()"
251
+      >
252
+        退出学校
253
+      </div>
246
     </div>
254
     </div>
247
     <div class="section_main">
255
     <div class="section_main">
248
       <router-view></router-view>
256
       <router-view></router-view>
311
         this.$route.path.includes("/school/deviceInstallation") ||
319
         this.$route.path.includes("/school/deviceInstallation") ||
312
         this.$route.path.includes("/school/deviceExport")
320
         this.$route.path.includes("/school/deviceExport")
313
       );
321
       );
322
+    },
323
+    // 用户权限
324
+    userPower() {
325
+      return this.$store.state.userPower;
314
     }
326
     }
315
   },
327
   },
316
   methods: {
328
   methods: {
323
     },
335
     },
324
     // 退出到上一级
336
     // 退出到上一级
325
     exitToPreviousLevel() {
337
     exitToPreviousLevel() {
326
-      this.$router.push("/region/home");
338
+      let power = this.userPower;
339
+      if ((power.atype === 1 || power.atype === 2) && power.schoolid) {
340
+        this.$store.commit("setQuitSchoolPower");
341
+        if (this.$route.path === "/region/home") {
342
+          this.$router.go(0);
343
+        } else {
344
+          this.$router.push("/region/home");
345
+        }
346
+      }
327
     }
347
     }
328
   }
348
   }
329
 };
349
 };

+ 11
- 2
src/views/schoolSection/log/admin.vue View File

96
   created() {
96
   created() {
97
     this.searchList();
97
     this.searchList();
98
   },
98
   },
99
+  computed: {
100
+    powerParams() {
101
+      return this.$store.getters.powerParams;
102
+    }
103
+  },
99
   methods: {
104
   methods: {
100
     // 搜索
105
     // 搜索
101
     searchList() {
106
     searchList() {
119
       _begindate = _begindate ? dateFormat(_begindate, "yyyy-MM-dd") : null;
124
       _begindate = _begindate ? dateFormat(_begindate, "yyyy-MM-dd") : null;
120
       let _enddate = this.searchForm.dataRange[1];
125
       let _enddate = this.searchForm.dataRange[1];
121
       _enddate = _enddate ? dateFormat(_enddate, "yyyy-MM-dd") : null;
126
       _enddate = _enddate ? dateFormat(_enddate, "yyyy-MM-dd") : null;
127
+      let _regionids = this.$store.state.userPower.regionids;
128
+      _regionids = [..._regionids];
122
       logOperate_list({
129
       logOperate_list({
123
-        regionid: 1,
124
-        schoolid: 1,
130
+        rtype: this.powerParams.rtype,
131
+        objectid: this.powerParams.objectid,
132
+        regionid: _regionids.pop(),
133
+        schoolid: this.powerParams.objectid,
125
         page: this.searchForm.page,
134
         page: this.searchForm.page,
126
         size: this.searchForm.size,
135
         size: this.searchForm.size,
127
         begindate: _begindate,
136
         begindate: _begindate,

+ 11
- 2
src/views/schoolSection/log/appLaunch.vue View File

125
   created() {
125
   created() {
126
     this.searchList();
126
     this.searchList();
127
   },
127
   },
128
+  computed: {
129
+    powerParams() {
130
+      return this.$store.getters.powerParams;
131
+    }
132
+  },
128
   methods: {
133
   methods: {
129
     // 搜索
134
     // 搜索
130
     searchList() {
135
     searchList() {
148
       _begindate = _begindate ? dateFormat(_begindate, "yyyy-MM-dd") : null;
153
       _begindate = _begindate ? dateFormat(_begindate, "yyyy-MM-dd") : null;
149
       let _enddate = this.searchForm.dataRange[1];
154
       let _enddate = this.searchForm.dataRange[1];
150
       _enddate = _enddate ? dateFormat(_enddate, "yyyy-MM-dd") : null;
155
       _enddate = _enddate ? dateFormat(_enddate, "yyyy-MM-dd") : null;
156
+      let _regionids = this.$store.state.userPower.regionids;
157
+      _regionids = [..._regionids];
151
       logAppStart_list_start({
158
       logAppStart_list_start({
152
-        regionid: 1,
153
-        schoolid: 1,
159
+        rtype: this.powerParams.rtype,
160
+        objectid: this.powerParams.objectid,
161
+        regionid: _regionids.pop(),
162
+        schoolid: this.powerParams.objectid,
154
         page: this.searchForm.page,
163
         page: this.searchForm.page,
155
         size: this.searchForm.size,
164
         size: this.searchForm.size,
156
         begindate: _begindate,
165
         begindate: _begindate,

+ 11
- 2
src/views/schoolSection/log/applicationDownload.vue View File

116
   created() {
116
   created() {
117
     this.searchList();
117
     this.searchList();
118
   },
118
   },
119
+  computed: {
120
+    powerParams() {
121
+      return this.$store.getters.powerParams;
122
+    }
123
+  },
119
   methods: {
124
   methods: {
120
     // 搜索
125
     // 搜索
121
     searchList() {
126
     searchList() {
139
       _begindate = _begindate ? dateFormat(_begindate, "yyyy-MM-dd") : null;
144
       _begindate = _begindate ? dateFormat(_begindate, "yyyy-MM-dd") : null;
140
       let _enddate = this.searchForm.dataRange[1];
145
       let _enddate = this.searchForm.dataRange[1];
141
       _enddate = _enddate ? dateFormat(_enddate, "yyyy-MM-dd") : null;
146
       _enddate = _enddate ? dateFormat(_enddate, "yyyy-MM-dd") : null;
147
+      let _regionids = this.$store.state.userPower.regionids;
148
+      _regionids = [..._regionids];
142
       logAppDown_list({
149
       logAppDown_list({
143
-        regionid: 1,
144
-        schoolid: 1,
150
+        rtype: this.powerParams.rtype,
151
+        objectid: this.powerParams.objectid,
152
+        regionid: _regionids.pop(),
153
+        schoolid: this.powerParams.objectid,
145
         page: this.searchForm.page,
154
         page: this.searchForm.page,
146
         size: this.searchForm.size,
155
         size: this.searchForm.size,
147
         begindate: _begindate,
156
         begindate: _begindate,

+ 17
- 4
src/views/schoolSection/log/deviceEvents.vue View File

154
   created() {
154
   created() {
155
     this.searchList();
155
     this.searchList();
156
   },
156
   },
157
+  computed: {
158
+    powerParams() {
159
+      return this.$store.getters.powerParams;
160
+    }
161
+  },
157
   methods: {
162
   methods: {
158
     // 搜索
163
     // 搜索
159
     searchList() {
164
     searchList() {
177
       _begindate = _begindate ? dateFormat(_begindate, "yyyy-MM-dd") : null;
182
       _begindate = _begindate ? dateFormat(_begindate, "yyyy-MM-dd") : null;
178
       let _enddate = this.searchForm.dataRange[1];
183
       let _enddate = this.searchForm.dataRange[1];
179
       _enddate = _enddate ? dateFormat(_enddate, "yyyy-MM-dd") : null;
184
       _enddate = _enddate ? dateFormat(_enddate, "yyyy-MM-dd") : null;
185
+      let _regionids = this.$store.state.userPower.regionids;
186
+      _regionids = [..._regionids];
180
       logdoperate_list_event({
187
       logdoperate_list_event({
181
-        regionid: 3,
182
-        schoolid: 1,
188
+        rtype: this.powerParams.rtype,
189
+        objectid: this.powerParams.objectid,
190
+        regionid: _regionids.pop(),
191
+        schoolid: this.powerParams.objectid,
183
         page: this.searchForm.page,
192
         page: this.searchForm.page,
184
         size: this.searchForm.size,
193
         size: this.searchForm.size,
185
         doEvent: this.searchForm.doEvent,
194
         doEvent: this.searchForm.doEvent,
200
       _begindate = _begindate ? dateFormat(_begindate, "yyyy-MM-dd") : null;
209
       _begindate = _begindate ? dateFormat(_begindate, "yyyy-MM-dd") : null;
201
       let _enddate = this.searchForm.dataRange[1];
210
       let _enddate = this.searchForm.dataRange[1];
202
       _enddate = _enddate ? dateFormat(_enddate, "yyyy-MM-dd") : null;
211
       _enddate = _enddate ? dateFormat(_enddate, "yyyy-MM-dd") : null;
212
+      let _regionids = this.$store.state.userPower.regionids;
213
+      _regionids = [..._regionids];
203
       logdoperate_list_event({
214
       logdoperate_list_event({
204
-        regionid: 3,
205
-        schoolid: 1,
215
+        rtype: this.powerParams.rtype,
216
+        objectid: this.powerParams.objectid,
217
+        regionid: _regionids.pop(),
218
+        schoolid: this.powerParams.objectid,
206
         doEvent: this.searchForm.doEvent,
219
         doEvent: this.searchForm.doEvent,
207
         begindate: _begindate,
220
         begindate: _begindate,
208
         enddate: _enddate,
221
         enddate: _enddate,

+ 17
- 4
src/views/schoolSection/log/deviceExport.vue View File

126
   created() {
126
   created() {
127
     this.searchList();
127
     this.searchList();
128
   },
128
   },
129
+  computed: {
130
+    powerParams() {
131
+      return this.$store.getters.powerParams;
132
+    }
133
+  },
129
   methods: {
134
   methods: {
130
     // 搜索
135
     // 搜索
131
     searchList() {
136
     searchList() {
145
     },
150
     },
146
     // 获取列表
151
     // 获取列表
147
     getList() {
152
     getList() {
153
+      let _regionids = this.$store.state.userPower.regionids;
154
+      _regionids = [..._regionids];
148
       logDeviceBind_list_school({
155
       logDeviceBind_list_school({
149
-        regionid: 1,
150
-        schoolid: 1,
156
+        rtype: this.powerParams.rtype,
157
+        objectid: this.powerParams.objectid,
158
+        regionid: _regionids.pop(),
159
+        schoolid: this.powerParams.objectid,
151
         page: this.searchForm.page,
160
         page: this.searchForm.page,
152
         size: this.searchForm.size,
161
         size: this.searchForm.size,
153
         name: this.searchForm.name
162
         name: this.searchForm.name
161
       });
170
       });
162
     },
171
     },
163
     toExport() {
172
     toExport() {
173
+      let _regionids = this.$store.state.userPower.regionids;
174
+      _regionids = [..._regionids];
164
       logDeviceBind_list_school({
175
       logDeviceBind_list_school({
165
-        regionid: 1,
166
-        schoolid: 1,
176
+        rtype: this.powerParams.rtype,
177
+        objectid: this.powerParams.objectid,
178
+        regionid: _regionids.pop(),
179
+        schoolid: this.powerParams.objectid,
167
         page: this.searchForm.page,
180
         page: this.searchForm.page,
168
         size: this.searchForm.size,
181
         size: this.searchForm.size,
169
         name: this.searchForm.name
182
         name: this.searchForm.name

+ 17
- 4
src/views/schoolSection/log/deviceInstallation.vue View File

125
   created() {
125
   created() {
126
     this.searchList();
126
     this.searchList();
127
   },
127
   },
128
+  computed: {
129
+    powerParams() {
130
+      return this.$store.getters.powerParams;
131
+    }
132
+  },
128
   methods: {
133
   methods: {
129
     // 搜索
134
     // 搜索
130
     searchList() {
135
     searchList() {
148
       _begindate = _begindate ? dateFormat(_begindate, "yyyy-MM-dd") : null;
153
       _begindate = _begindate ? dateFormat(_begindate, "yyyy-MM-dd") : null;
149
       let _enddate = this.searchForm.dataRange[1];
154
       let _enddate = this.searchForm.dataRange[1];
150
       _enddate = _enddate ? dateFormat(_enddate, "yyyy-MM-dd") : null;
155
       _enddate = _enddate ? dateFormat(_enddate, "yyyy-MM-dd") : null;
156
+      let _regionids = this.$store.state.userPower.regionids;
157
+      _regionids = [..._regionids];
151
       logAppStart_list_install({
158
       logAppStart_list_install({
152
-        regionid: 1,
153
-        schoolid: 1,
159
+        rtype: this.powerParams.rtype,
160
+        objectid: this.powerParams.objectid,
161
+        regionid: _regionids.pop(),
162
+        schoolid: this.powerParams.objectid,
154
         page: this.searchForm.page,
163
         page: this.searchForm.page,
155
         size: this.searchForm.size,
164
         size: this.searchForm.size,
156
         begindate: _begindate,
165
         begindate: _begindate,
170
       _begindate = _begindate ? dateFormat(_begindate, "yyyy-MM-dd") : null;
179
       _begindate = _begindate ? dateFormat(_begindate, "yyyy-MM-dd") : null;
171
       let _enddate = this.searchForm.dataRange[1];
180
       let _enddate = this.searchForm.dataRange[1];
172
       _enddate = _enddate ? dateFormat(_enddate, "yyyy-MM-dd") : null;
181
       _enddate = _enddate ? dateFormat(_enddate, "yyyy-MM-dd") : null;
182
+      let _regionids = this.$store.state.userPower.regionids;
183
+      _regionids = [..._regionids];
173
       logAppStart_list_install({
184
       logAppStart_list_install({
174
-        regionid: 1,
175
-        schoolid: 1,
185
+        rtype: this.powerParams.rtype,
186
+        objectid: this.powerParams.objectid,
187
+        regionid: _regionids.pop(),
188
+        schoolid: this.powerParams.objectid,
176
         begindate: _begindate,
189
         begindate: _begindate,
177
         enddate: _enddate,
190
         enddate: _enddate,
178
         name: this.searchForm.name
191
         name: this.searchForm.name

+ 17
- 2
src/views/schoolSection/log/deviceLocation.vue View File

115
   created() {
115
   created() {
116
     this.searchList();
116
     this.searchList();
117
   },
117
   },
118
+  computed: {
119
+    powerParams() {
120
+      return this.$store.getters.powerParams;
121
+    }
122
+  },
118
   methods: {
123
   methods: {
119
     // 搜索
124
     // 搜索
120
     searchList() {
125
     searchList() {
138
       _begindate = _begindate ? dateFormat(_begindate, "yyyy-MM-dd") : null;
143
       _begindate = _begindate ? dateFormat(_begindate, "yyyy-MM-dd") : null;
139
       let _enddate = this.searchForm.dataRange[1];
144
       let _enddate = this.searchForm.dataRange[1];
140
       _enddate = _enddate ? dateFormat(_enddate, "yyyy-MM-dd") : null;
145
       _enddate = _enddate ? dateFormat(_enddate, "yyyy-MM-dd") : null;
146
+      let _regionids = this.$store.state.userPower.regionids;
147
+      _regionids = [..._regionids];
141
       logDeviceLogin_list({
148
       logDeviceLogin_list({
142
-        regionid: 1,
143
-        schoolid: 1,
149
+        rtype: this.powerParams.rtype,
150
+        objectid: this.powerParams.objectid,
151
+        regionid: _regionids.pop(),
152
+        schoolid: this.powerParams.objectid,
144
         page: this.searchForm.page,
153
         page: this.searchForm.page,
145
         size: this.searchForm.size,
154
         size: this.searchForm.size,
146
         begindate: _begindate,
155
         begindate: _begindate,
160
       _begindate = _begindate ? dateFormat(_begindate, "yyyy-MM-dd") : null;
169
       _begindate = _begindate ? dateFormat(_begindate, "yyyy-MM-dd") : null;
161
       let _enddate = this.searchForm.dataRange[1];
170
       let _enddate = this.searchForm.dataRange[1];
162
       _enddate = _enddate ? dateFormat(_enddate, "yyyy-MM-dd") : null;
171
       _enddate = _enddate ? dateFormat(_enddate, "yyyy-MM-dd") : null;
172
+      let _regionids = this.$store.state.userPower.regionids;
173
+      _regionids = [..._regionids];
163
       logDeviceLogin_list({
174
       logDeviceLogin_list({
175
+        rtype: this.powerParams.rtype,
176
+        objectid: this.powerParams.objectid,
177
+        regionid: _regionids.pop(),
178
+        schoolid: this.powerParams.objectid,
164
         begindate: _begindate,
179
         begindate: _begindate,
165
         enddate: _enddate,
180
         enddate: _enddate,
166
         name: this.searchForm.name
181
         name: this.searchForm.name

+ 11
- 2
src/views/schoolSection/log/devicePush.vue View File

107
   created() {
107
   created() {
108
     this.searchList();
108
     this.searchList();
109
   },
109
   },
110
+  computed: {
111
+    powerParams() {
112
+      return this.$store.getters.powerParams;
113
+    }
114
+  },
110
   methods: {
115
   methods: {
111
     // 搜索
116
     // 搜索
112
     searchList() {
117
     searchList() {
130
       _begindate = _begindate ? dateFormat(_begindate, "yyyy-MM-dd") : null;
135
       _begindate = _begindate ? dateFormat(_begindate, "yyyy-MM-dd") : null;
131
       let _enddate = this.searchForm.dataRange[1];
136
       let _enddate = this.searchForm.dataRange[1];
132
       _enddate = _enddate ? dateFormat(_enddate, "yyyy-MM-dd") : null;
137
       _enddate = _enddate ? dateFormat(_enddate, "yyyy-MM-dd") : null;
138
+      let _regionids = this.$store.state.userPower.regionids;
139
+      _regionids = [..._regionids];
133
       logPush_list({
140
       logPush_list({
134
-        regionid: 1,
135
-        schoolid: 1,
141
+        rtype: this.powerParams.rtype,
142
+        objectid: this.powerParams.objectid,
143
+        regionid: _regionids.pop(),
144
+        schoolid: this.powerParams.objectid,
136
         page: this.searchForm.page,
145
         page: this.searchForm.page,
137
         size: this.searchForm.size,
146
         size: this.searchForm.size,
138
         begindate: _begindate,
147
         begindate: _begindate,

+ 17
- 4
src/views/schoolSection/log/violatingDevice.vue View File

201
   created() {
201
   created() {
202
     this.searchList();
202
     this.searchList();
203
   },
203
   },
204
+  computed: {
205
+    powerParams() {
206
+      return this.$store.getters.powerParams;
207
+    }
208
+  },
204
   methods: {
209
   methods: {
205
     // 搜索
210
     // 搜索
206
     searchList() {
211
     searchList() {
224
       _begindate = _begindate ? dateFormat(_begindate, "yyyy-MM-dd") : null;
229
       _begindate = _begindate ? dateFormat(_begindate, "yyyy-MM-dd") : null;
225
       let _enddate = this.searchForm.dataRange[1];
230
       let _enddate = this.searchForm.dataRange[1];
226
       _enddate = _enddate ? dateFormat(_enddate, "yyyy-MM-dd") : null;
231
       _enddate = _enddate ? dateFormat(_enddate, "yyyy-MM-dd") : null;
232
+      let _regionids = this.$store.state.userPower.regionids;
233
+      _regionids = [..._regionids];
227
       logdoperate_list_violate({
234
       logdoperate_list_violate({
228
-        regionid: 1,
229
-        schoolid: 1,
235
+        rtype: this.powerParams.rtype,
236
+        objectid: this.powerParams.objectid,
237
+        regionid: _regionids.pop(),
238
+        schoolid: this.powerParams.objectid,
230
         page: this.searchForm.page,
239
         page: this.searchForm.page,
231
         size: this.searchForm.size,
240
         size: this.searchForm.size,
232
         doEvent: this.searchForm.doEvent,
241
         doEvent: this.searchForm.doEvent,
247
       _begindate = _begindate ? dateFormat(_begindate, "yyyy-MM-dd") : null;
256
       _begindate = _begindate ? dateFormat(_begindate, "yyyy-MM-dd") : null;
248
       let _enddate = this.searchForm.dataRange[1];
257
       let _enddate = this.searchForm.dataRange[1];
249
       _enddate = _enddate ? dateFormat(_enddate, "yyyy-MM-dd") : null;
258
       _enddate = _enddate ? dateFormat(_enddate, "yyyy-MM-dd") : null;
259
+      let _regionids = this.$store.state.userPower.regionids;
260
+      _regionids = [..._regionids];
250
       logdoperate_list_violate({
261
       logdoperate_list_violate({
251
-        regionid: 1,
252
-        schoolid: 1,
262
+        rtype: this.powerParams.rtype,
263
+        objectid: this.powerParams.objectid,
264
+        regionid: _regionids.pop(),
265
+        schoolid: this.powerParams.objectid,
253
         page: this.searchForm.page,
266
         page: this.searchForm.page,
254
         size: this.searchForm.size,
267
         size: this.searchForm.size,
255
         doEvent: this.searchForm.doEvent,
268
         doEvent: this.searchForm.doEvent,

+ 22
- 8
src/views/schoolSection/networkManage/whitelist.vue View File

215
   created() {
215
   created() {
216
     this.searchList();
216
     this.searchList();
217
   },
217
   },
218
+  computed: {
219
+    powerParams() {
220
+      return this.$store.getters.powerParams;
221
+    }
222
+  },
218
   methods: {
223
   methods: {
219
     // 搜索
224
     // 搜索
220
     searchList() {
225
     searchList() {
234
     },
239
     },
235
     // 获取列表
240
     // 获取列表
236
     getList() {
241
     getList() {
237
-      console.warn("---注意替换regionid---->white_list");
242
+      let _regionids = this.$store.state.userPower.regionids;
243
+      _regionids = [..._regionids];
238
       white_list({
244
       white_list({
239
-        regionid: 11,
245
+        rtype: this.powerParams.rtype,
246
+        objectid: this.powerParams.objectid,
247
+        regionid: _regionids.pop(),
240
         page: this.searchForm.page,
248
         page: this.searchForm.page,
241
         size: this.searchForm.size,
249
         size: this.searchForm.size,
242
         whiteName: this.searchForm.whiteName
250
         whiteName: this.searchForm.whiteName
251
     },
259
     },
252
     // 新建
260
     // 新建
253
     toAdd() {
261
     toAdd() {
254
-      console.warn("---注意替换regionid---schoolids->");
262
+      let _regionids = this.$store.state.userPower.regionids;
263
+      _regionids = [..._regionids];
255
       this.whiteListInfo = {
264
       this.whiteListInfo = {
256
         show: true,
265
         show: true,
257
         whiteid: null,
266
         whiteid: null,
260
         // 1所有学校2指定学校
269
         // 1所有学校2指定学校
261
         targetSchool: 2,
270
         targetSchool: 2,
262
         website: "",
271
         website: "",
263
-        regionid: 11,
272
+        regionid: _regionids.pop(),
264
         comm: "",
273
         comm: "",
265
-        schoolids: [4]
274
+        schoolids: [this.powerParams.objectid]
266
       };
275
       };
267
     },
276
     },
268
     // 保存新建
277
     // 保存新建
275
               ? white_edit
284
               ? white_edit
276
               : white_add;
285
               : white_add;
277
           let form = {
286
           let form = {
287
+            rtype: this.powerParams.rtype,
288
+            objectid: this.powerParams.objectid,
278
             whiteName: this.whiteListInfo.whiteName,
289
             whiteName: this.whiteListInfo.whiteName,
279
             targetSchool: this.whiteListInfo.targetSchool,
290
             targetSchool: this.whiteListInfo.targetSchool,
280
             website: this.whiteListInfo.website,
291
             website: this.whiteListInfo.website,
310
     },
321
     },
311
     // 编辑
322
     // 编辑
312
     toEdit(row) {
323
     toEdit(row) {
313
-      console.warn("---注意替换regionid-schoolids--->");
324
+      let _regionids = this.$store.state.userPower.regionids;
325
+      _regionids = [..._regionids];
314
       this.whiteListInfo = {
326
       this.whiteListInfo = {
315
         show: true,
327
         show: true,
316
         whiteid: row.whiteid,
328
         whiteid: row.whiteid,
319
         // 1所有学校2指定学校
331
         // 1所有学校2指定学校
320
         targetSchool: 2,
332
         targetSchool: 2,
321
         website: row.website,
333
         website: row.website,
322
-        regionid: 11,
334
+        regionid: _regionids.pop(),
323
         comm: row.comm,
335
         comm: row.comm,
324
-        schoolids: [4]
336
+        schoolids: [this.powerParams.objectid]
325
       };
337
       };
326
     },
338
     },
327
     // 删除
339
     // 删除
333
         }?`,
345
         }?`,
334
         onOk: () => {
346
         onOk: () => {
335
           white_delete({
347
           white_delete({
348
+            rtype: this.powerParams.rtype,
349
+            objectid: this.powerParams.objectid,
336
             whiteid: row.whiteid,
350
             whiteid: row.whiteid,
337
             rversion: row.rversion
351
             rversion: row.rversion
338
           }).then((data) => {
352
           }).then((data) => {

+ 12
- 2
src/views/schoolSection/networkManage/whitelistLibrary.vue View File

108
   created() {
108
   created() {
109
     this.searchList();
109
     this.searchList();
110
   },
110
   },
111
+  computed: {
112
+    powerParams() {
113
+      return this.$store.getters.powerParams;
114
+    }
115
+  },
111
   methods: {
116
   methods: {
112
     // 搜索
117
     // 搜索
113
     searchList() {
118
     searchList() {
128
     // 获取列表
133
     // 获取列表
129
     getList() {
134
     getList() {
130
       whiteLibrary_list({
135
       whiteLibrary_list({
136
+        rtype: this.powerParams.rtype,
137
+        objectid: this.powerParams.objectid,
131
         page: this.searchForm.page,
138
         page: this.searchForm.page,
132
         size: this.searchForm.size,
139
         size: this.searchForm.size,
133
         name: this.searchForm.name
140
         name: this.searchForm.name
142
     },
149
     },
143
     // 添加到白名单
150
     // 添加到白名单
144
     addToWhitelist(row) {
151
     addToWhitelist(row) {
145
-      console.warn("---注意替换regionid---->whiteLibrary_add_white");
146
       this.$Modal.confirm({
152
       this.$Modal.confirm({
147
         title: "提示",
153
         title: "提示",
148
         content: `确定要将“${row.name}”加到白名单?`,
154
         content: `确定要将“${row.name}”加到白名单?`,
149
         onOk: () => {
155
         onOk: () => {
156
+          let _regionids = this.$store.state.userPower.regionids;
157
+          _regionids = [..._regionids];
150
           whiteLibrary_add_white({
158
           whiteLibrary_add_white({
159
+            rtype: this.powerParams.rtype,
160
+            objectid: this.powerParams.objectid,
151
             wlid: row.wlid,
161
             wlid: row.wlid,
152
-            regionid: 11
162
+            regionid: _regionids.pop()
153
           }).then((data) => {
163
           }).then((data) => {
154
             if (data.code === 0) {
164
             if (data.code === 0) {
155
               this.$Message.success(data.msg);
165
               this.$Message.success(data.msg);

+ 9
- 0
src/views/schoolSection/notice/notice.vue View File

131
   created() {
131
   created() {
132
     this.searchList();
132
     this.searchList();
133
   },
133
   },
134
+  computed: {
135
+    powerParams() {
136
+      return this.$store.getters.powerParams;
137
+    }
138
+  },
134
   methods: {
139
   methods: {
135
     // 搜索
140
     // 搜索
136
     searchList() {
141
     searchList() {
155
       let _enddate = this.searchForm.dataRange[1];
160
       let _enddate = this.searchForm.dataRange[1];
156
       _enddate = _enddate ? dateFormat(_enddate, "yyyy-MM-dd") : null;
161
       _enddate = _enddate ? dateFormat(_enddate, "yyyy-MM-dd") : null;
157
       notice_list_region({
162
       notice_list_region({
163
+        rtype: this.powerParams.rtype,
164
+        objectid: this.powerParams.objectid,
158
         page: this.searchForm.page,
165
         page: this.searchForm.page,
159
         size: this.searchForm.size,
166
         size: this.searchForm.size,
160
         title: this.searchForm.title,
167
         title: this.searchForm.title,
172
     // 查看
179
     // 查看
173
     toView(row) {
180
     toView(row) {
174
       notice_detail_region({
181
       notice_detail_region({
182
+        rtype: this.powerParams.rtype,
183
+        objectid: this.powerParams.objectid,
175
         noticeid: row.noticeid
184
         noticeid: row.noticeid
176
       }).then((data) => {
185
       }).then((data) => {
177
         if (data.code === 0) {
186
         if (data.code === 0) {

+ 21
- 9
src/views/schoolSection/setting/deviceSetting.vue View File

289
   created() {
289
   created() {
290
     this.getPswDetail();
290
     this.getPswDetail();
291
   },
291
   },
292
+  computed: {
293
+    powerParams() {
294
+      return this.$store.getters.powerParams;
295
+    }
296
+  },
292
   methods: {
297
   methods: {
293
     toChangeMenu(type) {
298
     toChangeMenu(type) {
294
       this.menuInfo.selected = type;
299
       this.menuInfo.selected = type;
299
       }
304
       }
300
     },
305
     },
301
     resetDetail() {
306
     resetDetail() {
302
-      console.warn("------schoolid-------");
303
       if (this.menuInfo.selected === 1) {
307
       if (this.menuInfo.selected === 1) {
304
         if (!this.menuInfo.pswDetail.pwid) {
308
         if (!this.menuInfo.pswDetail.pwid) {
305
           return;
309
           return;
306
         }
310
         }
307
         password_delete({
311
         password_delete({
312
+          rtype: this.powerParams.rtype,
313
+          objectid: this.powerParams.objectid,
308
           pwid: this.menuInfo.pswDetail.pwid,
314
           pwid: this.menuInfo.pswDetail.pwid,
309
           rversion: this.menuInfo.pswDetail.rversion
315
           rversion: this.menuInfo.pswDetail.rversion
310
         }).then((data) => {
316
         }).then((data) => {
320
           return;
326
           return;
321
         }
327
         }
322
         deviceSet_delete({
328
         deviceSet_delete({
329
+          rtype: this.powerParams.rtype,
330
+          objectid: this.powerParams.objectid,
323
           dsid: this.menuInfo.setDetail.dsid,
331
           dsid: this.menuInfo.setDetail.dsid,
324
           rversion: this.menuInfo.setDetail.rversion
332
           rversion: this.menuInfo.setDetail.rversion
325
         }).then((data) => {
333
         }).then((data) => {
333
       }
341
       }
334
     },
342
     },
335
     getPswDetail() {
343
     getPswDetail() {
336
-      console.warn("------schoolid-------");
337
       password_detail({
344
       password_detail({
338
-        schoolid: 4
345
+        rtype: this.powerParams.rtype,
346
+        objectid: this.powerParams.objectid,
347
+        schoolid: this.powerParams.objectid
339
       }).then((data) => {
348
       }).then((data) => {
340
         if (data.code === 0) {
349
         if (data.code === 0) {
341
           if (data.obj) {
350
           if (data.obj) {
354
       });
363
       });
355
     },
364
     },
356
     getSetDetail() {
365
     getSetDetail() {
357
-      console.warn("------schoolid-------");
358
       deviceSet_detail({
366
       deviceSet_detail({
359
-        schoolid: 4
367
+        rtype: this.powerParams.rtype,
368
+        objectid: this.powerParams.objectid,
369
+        schoolid: this.powerParams.objectid
360
       }).then((data) => {
370
       }).then((data) => {
361
         if (data.code === 0) {
371
         if (data.code === 0) {
362
           if (data.obj) {
372
           if (data.obj) {
405
       }
415
       }
406
     },
416
     },
407
     savePswDetail() {
417
     savePswDetail() {
408
-      console.warn("------schoolid-------");
409
       password_edit({
418
       password_edit({
410
-        schoolid: 4,
419
+        rtype: this.powerParams.rtype,
420
+        objectid: this.powerParams.objectid,
421
+        schoolid: this.powerParams.objectid,
411
         trend: this.menuInfo.pswDetail.trend,
422
         trend: this.menuInfo.pswDetail.trend,
412
         password: this.menuInfo.pswDetail.password,
423
         password: this.menuInfo.pswDetail.password,
413
         pwid: this.menuInfo.pswDetail.pwid,
424
         pwid: this.menuInfo.pswDetail.pwid,
422
       });
433
       });
423
     },
434
     },
424
     saveSetDetail() {
435
     saveSetDetail() {
425
-      console.warn("------schoolid-------");
426
       deviceSet_edit({
436
       deviceSet_edit({
427
-        schoolid: 4,
437
+        rtype: this.powerParams.rtype,
438
+        objectid: this.powerParams.objectid,
439
+        schoolid: this.powerParams.objectid,
428
         dsid: this.menuInfo.setDetail.dsid,
440
         dsid: this.menuInfo.setDetail.dsid,
429
         rversion: this.menuInfo.setDetail.rversion,
441
         rversion: this.menuInfo.setDetail.rversion,
430
         forceBind: this.menuInfo.setDetail.forceBind,
442
         forceBind: this.menuInfo.setDetail.forceBind,

+ 12
- 5
src/views/schoolSection/setting/logo.vue View File

55
   created() {
55
   created() {
56
     this.getLogoDetail();
56
     this.getLogoDetail();
57
   },
57
   },
58
+  computed: {
59
+    powerParams() {
60
+      return this.$store.getters.powerParams;
61
+    }
62
+  },
58
   methods: {
63
   methods: {
59
     getLogoDetail() {
64
     getLogoDetail() {
60
-      console.warn("----objectid----");
61
       logo_detail({
65
       logo_detail({
62
-        objectid: 4,
66
+        rtype: this.powerParams.rtype,
67
+        objectid: this.powerParams.objectid,
63
         llevel: 3
68
         llevel: 3
64
       }).then((data) => {
69
       }).then((data) => {
65
         if (data.code === 0) {
70
         if (data.code === 0) {
75
         return;
80
         return;
76
       }
81
       }
77
       logo_delete({
82
       logo_delete({
83
+        rtype: this.powerParams.rtype,
84
+        objectid: this.powerParams.objectid,
78
         logoid: this.logoInfo.logoid,
85
         logoid: this.logoInfo.logoid,
79
         rversion: this.logoInfo.rversion
86
         rversion: this.logoInfo.rversion
80
       }).then((data) => {
87
       }).then((data) => {
128
         });
135
         });
129
     },
136
     },
130
     toUploadLogo() {
137
     toUploadLogo() {
131
-      console.warn("----objectid----");
132
       logo_edit({
138
       logo_edit({
139
+        rtype: this.powerParams.rtype,
140
+        objectid: this.powerParams.objectid,
133
         logoPath: this.logoInfo.logoPath,
141
         logoPath: this.logoInfo.logoPath,
134
-        llevel: this.logoInfo.llevel || 3,
135
-        objectid: this.logoInfo.objectid || 4,
142
+        llevel: 3,
136
         logoid: this.logoInfo.logoid,
143
         logoid: this.logoInfo.logoid,
137
         rversion: this.logoInfo.rversion
144
         rversion: this.logoInfo.rversion
138
       }).then((data) => {
145
       }).then((data) => {

+ 22
- 8
src/views/schoolSection/setting/wallpaper.vue View File

387
     ).content;
387
     ).content;
388
     this.searchList();
388
     this.searchList();
389
   },
389
   },
390
+  computed: {
391
+    powerParams() {
392
+      return this.$store.getters.powerParams;
393
+    }
394
+  },
390
   methods: {
395
   methods: {
391
     // 搜索
396
     // 搜索
392
     searchList() {
397
     searchList() {
406
     },
411
     },
407
     // 获取列表
412
     // 获取列表
408
     getList() {
413
     getList() {
409
-      console.warn("---注意替换regionid--schoolid-->wallpaper_list");
414
+      let _regionids = this.$store.state.userPower.regionids;
415
+      _regionids = [..._regionids];
410
       wallpaper_list({
416
       wallpaper_list({
417
+        rtype: this.powerParams.rtype,
418
+        objectid: this.powerParams.objectid,
419
+        schoolid: this.powerParams.objectid,
420
+        regionid: _regionids.pop(),
411
         page: this.searchForm.page,
421
         page: this.searchForm.page,
412
         size: this.searchForm.size,
422
         size: this.searchForm.size,
413
-        name: this.searchForm.name,
414
-        regionid: 11,
415
-        schoolid: 4
423
+        name: this.searchForm.name
416
       }).then((data) => {
424
       }).then((data) => {
417
         if (data.code === 0) {
425
         if (data.code === 0) {
418
           this.searchForm.list = data.obj.data;
426
           this.searchForm.list = data.obj.data;
424
     },
432
     },
425
     // 新建
433
     // 新建
426
     toAdd() {
434
     toAdd() {
427
-      console.warn("---objectid---->", 4);
428
       this.wallpaperInfo = {
435
       this.wallpaperInfo = {
429
         show: true,
436
         show: true,
430
         wallpaperid: null,
437
         wallpaperid: null,
437
         // 2区域3学校
444
         // 2区域3学校
438
         wlevel: 3,
445
         wlevel: 3,
439
         // 对应的区域/学校ID
446
         // 对应的区域/学校ID
440
-        objectid: 4,
447
+        objectid: this.powerParams.objectid,
441
         deviceids: [],
448
         deviceids: [],
442
         deviceList: []
449
         deviceList: []
443
       };
450
       };
598
           }
605
           }
599
           this.wallpaperInfo.show = false;
606
           this.wallpaperInfo.show = false;
600
           let form = {
607
           let form = {
608
+            rtype: this.powerParams.rtype,
609
+            objectid: this.powerParams.objectid,
601
             wname: this.wallpaperInfo.wname,
610
             wname: this.wallpaperInfo.wname,
602
             hpath: this.wallpaperInfo.hpath,
611
             hpath: this.wallpaperInfo.hpath,
603
             vpath: this.wallpaperInfo.vpath,
612
             vpath: this.wallpaperInfo.vpath,
604
             wlevel: this.wallpaperInfo.wlevel,
613
             wlevel: this.wallpaperInfo.wlevel,
605
-            objectid: this.wallpaperInfo.objectid,
606
             deviceids: this.wallpaperInfo.deviceids
614
             deviceids: this.wallpaperInfo.deviceids
607
           };
615
           };
608
           if (this.wallpaperInfo.wallpaperid && this.wallpaperInfo.rversion) {
616
           if (this.wallpaperInfo.wallpaperid && this.wallpaperInfo.rversion) {
684
     },
692
     },
685
     getWallpaperDetail(wallpaperid) {
693
     getWallpaperDetail(wallpaperid) {
686
       return new Promise((resolve) => {
694
       return new Promise((resolve) => {
687
-        wallpaper_detail({ wallpaperid }).then((data) => {
695
+        wallpaper_detail({
696
+          rtype: this.powerParams.rtype,
697
+          objectid: this.powerParams.objectid,
698
+          wallpaperid
699
+        }).then((data) => {
688
           if (data.code === 0) {
700
           if (data.code === 0) {
689
             resolve(data.obj);
701
             resolve(data.obj);
690
           } else {
702
           } else {
701
         content: "您确定删除选中数据吗?",
713
         content: "您确定删除选中数据吗?",
702
         onOk: () => {
714
         onOk: () => {
703
           wallpaper_delete({
715
           wallpaper_delete({
716
+            rtype: this.powerParams.rtype,
717
+            objectid: this.powerParams.objectid,
704
             wallpaperid: row.wallpaperid,
718
             wallpaperid: row.wallpaperid,
705
             rversion: row.rversion
719
             rversion: row.rversion
706
           }).then((data) => {
720
           }).then((data) => {

Loading…
Cancel
Save