Bladeren bron

学校路由设置

gzb
wangzhonglu 10 maanden geleden
bovenliggende
commit
ae683e107c
34 gewijzigde bestanden met toevoegingen van 1273 en 46 verwijderingen
  1. 44
    42
      src/router/index.js
  2. 288
    0
      src/router/school.js
  3. 45
    2
      src/views/platformSection/home/index.vue
  4. 14
    0
      src/views/schoolSection/applicationManage/applicationList.vue
  5. 14
    0
      src/views/schoolSection/applicationManage/greenBrowser.vue
  6. 14
    0
      src/views/schoolSection/applicationStrategy/applicationStrategy.vue
  7. 14
    0
      src/views/schoolSection/deviceManage/breakRuleDevice.vue
  8. 14
    0
      src/views/schoolSection/deviceManage/deviceManage.vue
  9. 14
    0
      src/views/schoolSection/deviceManage/inLineDevice.vue
  10. 14
    0
      src/views/schoolSection/deviceManage/outControlDevice.vue
  11. 14
    0
      src/views/schoolSection/deviceManage/parentControlDevice.vue
  12. 14
    0
      src/views/schoolSection/deviceManage/removeControlDevice.vue
  13. 42
    2
      src/views/schoolSection/home/index.vue
  14. 14
    0
      src/views/schoolSection/log/admin.vue
  15. 14
    0
      src/views/schoolSection/log/appLaunch.vue
  16. 14
    0
      src/views/schoolSection/log/applicationDownload.vue
  17. 14
    0
      src/views/schoolSection/log/deviceEvents.vue
  18. 14
    0
      src/views/schoolSection/log/deviceExport.vue
  19. 14
    0
      src/views/schoolSection/log/deviceInstallation.vue
  20. 14
    0
      src/views/schoolSection/log/deviceLocation.vue
  21. 14
    0
      src/views/schoolSection/log/devicePush.vue
  22. 14
    0
      src/views/schoolSection/log/violatingDevice.vue
  23. 14
    0
      src/views/schoolSection/networkManage/whitelist.vue
  24. 14
    0
      src/views/schoolSection/networkManage/whitelistLibrary.vue
  25. 490
    0
      src/views/schoolSection/notice/notice.vue
  26. 0
    0
      src/views/schoolSection/setting/device.vue
  27. 0
    0
      src/views/schoolSection/setting/logo.vue
  28. 0
    0
      src/views/schoolSection/setting/wallpaper.vue
  29. 14
    0
      src/views/schoolSection/strategy/personalStrategy.vue
  30. 14
    0
      src/views/schoolSection/strategy/publicStrategy.vue
  31. 14
    0
      src/views/schoolSection/strategy/strategyManage.vue
  32. 14
    0
      src/views/schoolSection/strategy/strategyTemplate.vue
  33. 14
    0
      src/views/schoolSection/timeLimit/timeLimit.vue
  34. 14
    0
      src/views/schoolSection/userManage/userManage.vue

+ 44
- 42
src/router/index.js Bestand weergeven

@@ -72,47 +72,49 @@ const router = createRouter();
72 72
  * 路由守卫(拦截)
73 73
  */
74 74
 router.beforeEach((to, from, next) => {
75
-  next();
76
-  // if (!to.meta.isAuth) {
77
-  //   next();
78
-  // } else {
79
-  //   /**
80
-  //    * xh_control_userInfo 登录用户信息
81
-  //    * {content, datetime}
82
-  //    */
83
-  //   let _userInfo = localStorage.getItem("xh_control_userInfo");
84
-  //   if (_userInfo) {
85
-  //     _userInfo = JSON.parse(_userInfo) || {};
86
-  //     if (_userInfo.content) {
87
-  //       const xh_control_userInfo = _userInfo.content;
88
-  //       const datetime = _userInfo.datetime;
89
-  //       const nowtime = new Date().getTime();
90
-  //       let diff = nowtime - datetime;
91
-  //       if (xh_control_userInfo && diff < 1000 * 60 * 60 * 24) {
92
-  //         _userInfo.datetime = nowtime;
93
-  //         localStorage.setItem("xh_control_userInfo", JSON.stringify(_userInfo));
94
-  //         next();
95
-  //       } else {
96
-  //         console.log("文件名:router index.vue,退出原因:超过24小时未登录");
97
-  //         next({
98
-  //           path: "/login",
99
-  //           query: to.query
100
-  //         });
101
-  //       }
102
-  //     } else {
103
-  //       console.log("文件名:router index.vue,退出原因:userInfo不存在1");
104
-  //       next({
105
-  //         path: "/login",
106
-  //         query: to.query
107
-  //       });
108
-  //     }
109
-  //   } else {
110
-  //     console.log("文件名:router index.vue,退出原因:userInfo不存在2");
111
-  //     next({
112
-  //       path: "/login",
113
-  //       query: to.query
114
-  //     });
115
-  //   }
116
-  // }
75
+  if (!to.meta.isAuth) {
76
+    next();
77
+  } else {
78
+    /**
79
+     * xh_control_userInfo 登录用户信息
80
+     * {content, datetime}
81
+     */
82
+    let _userInfo = localStorage.getItem("xh_control_userInfo");
83
+    if (_userInfo) {
84
+      _userInfo = JSON.parse(_userInfo) || {};
85
+      if (_userInfo.content) {
86
+        const xh_control_userInfo = _userInfo.content;
87
+        const datetime = _userInfo.datetime;
88
+        const nowtime = new Date().getTime();
89
+        let diff = nowtime - datetime;
90
+        if (xh_control_userInfo && diff < 1000 * 60 * 60 * 24) {
91
+          _userInfo.datetime = nowtime;
92
+          localStorage.setItem(
93
+            "xh_control_userInfo",
94
+            JSON.stringify(_userInfo)
95
+          );
96
+          next();
97
+        } else {
98
+          console.log("文件名:router index.vue,退出原因:超过24小时未登录");
99
+          next({
100
+            path: "/login",
101
+            query: to.query
102
+          });
103
+        }
104
+      } else {
105
+        console.log("文件名:router index.vue,退出原因:userInfo不存在1");
106
+        next({
107
+          path: "/login",
108
+          query: to.query
109
+        });
110
+      }
111
+    } else {
112
+      console.log("文件名:router index.vue,退出原因:userInfo不存在2");
113
+      next({
114
+        path: "/login",
115
+        query: to.query
116
+      });
117
+    }
118
+  }
117 119
 });
118 120
 export default router;

+ 288
- 0
src/router/school.js Bestand weergeven

@@ -20,6 +20,294 @@ export default {
20 20
         isAuth: true,
21 21
         title: "学校管控-首页"
22 22
       }
23
+    },
24
+    {
25
+      path: "applicationList",
26
+      component: () =>
27
+        import("@/views/schoolSection/applicationManage/applicationList.vue"),
28
+      name: "applicationList",
29
+      meta: {
30
+        keepAlive: true,
31
+        isAuth: true,
32
+        title: "学校管控-应用列表"
33
+      }
34
+    },
35
+    {
36
+      path: "greenBrowser",
37
+      component: () =>
38
+        import("@/views/schoolSection/applicationManage/greenBrowser.vue"),
39
+      name: "greenBrowser",
40
+      meta: {
41
+        keepAlive: true,
42
+        isAuth: true,
43
+        title: "学校管控-绿色浏览器访问网址"
44
+      }
45
+    },
46
+    {
47
+      path: "userManage",
48
+      component: () =>
49
+        import("@/views/schoolSection/userManage/userManage.vue"),
50
+      name: "userManage",
51
+      meta: {
52
+        keepAlive: true,
53
+        isAuth: true,
54
+        title: "学校管控-用户管理"
55
+      }
56
+    },
57
+    {
58
+      path: "strategyManage",
59
+      component: () =>
60
+        import("@/views/schoolSection/strategy/strategyManage.vue"),
61
+      name: "strategyManage",
62
+      meta: {
63
+        keepAlive: true,
64
+        isAuth: true,
65
+        title: "学校管控-策略管理"
66
+      }
67
+    },
68
+    {
69
+      path: "strategyTemplate",
70
+      component: () =>
71
+        import("@/views/schoolSection/strategy/strategyTemplate.vue"),
72
+      name: "strategyTemplate",
73
+      meta: {
74
+        keepAlive: true,
75
+        isAuth: true,
76
+        title: "学校管控-策略模版"
77
+      }
78
+    },
79
+    {
80
+      path: "applicationStrategy",
81
+      component: () =>
82
+        import(
83
+          "@/views/schoolSection/applicationStrategy/applicationStrategy.vue"
84
+        ),
85
+      name: "applicationStrategy",
86
+      meta: {
87
+        keepAlive: true,
88
+        isAuth: true,
89
+        title: "学校管控-应用策略"
90
+      }
91
+    },
92
+    {
93
+      path: "deviceManage",
94
+      component: () =>
95
+        import("@/views/schoolSection/deviceManage/deviceManage.vue"),
96
+      name: "deviceManage",
97
+      meta: {
98
+        keepAlive: true,
99
+        isAuth: true,
100
+        title: "学校管控-设备管理"
101
+      }
102
+    },
103
+    {
104
+      path: "breakRuleDevice",
105
+      component: () =>
106
+        import("@/views/schoolSection/deviceManage/breakRuleDevice.vue"),
107
+      name: "breakRuleDevice",
108
+      meta: {
109
+        keepAlive: true,
110
+        isAuth: true,
111
+        title: "学校管控-违规设备"
112
+      }
113
+    },
114
+    {
115
+      path: "outControlDevice",
116
+      component: () =>
117
+        import("@/views/schoolSection/deviceManage/outControlDevice.vue"),
118
+      name: "outControlDevice",
119
+      meta: {
120
+        keepAlive: true,
121
+        isAuth: true,
122
+        title: "学校管控-疑似脱管设备"
123
+      }
124
+    },
125
+    {
126
+      path: "removeControlDevice",
127
+      component: () =>
128
+        import("@/views/schoolSection/deviceManage/removeControlDevice.vue"),
129
+      name: "removeControlDevice",
130
+      meta: {
131
+        keepAlive: true,
132
+        isAuth: true,
133
+        title: "学校管控-解除管控设备"
134
+      }
135
+    },
136
+    {
137
+      path: "parentControlDevice",
138
+      component: () =>
139
+        import("@/views/schoolSection/deviceManage/parentControlDevice.vue"),
140
+      name: "parentControlDevice",
141
+      meta: {
142
+        keepAlive: true,
143
+        isAuth: true,
144
+        title: "学校管控-家长管控设备"
145
+      }
146
+    },
147
+    {
148
+      path: "inLineDevice",
149
+      component: () =>
150
+        import("@/views/schoolSection/deviceManage/inLineDevice.vue"),
151
+      name: "inLineDevice",
152
+      meta: {
153
+        keepAlive: true,
154
+        isAuth: true,
155
+        title: "学校管控-在线设备"
156
+      }
157
+    },
158
+    {
159
+      path: "whitelistLibrary",
160
+      component: () =>
161
+        import("@/views/schoolSection/networkManage/whitelistLibrary.vue"),
162
+      name: "whitelistLibrary",
163
+      meta: {
164
+        keepAlive: true,
165
+        isAuth: true,
166
+        title: "学校管控-白名单库"
167
+      }
168
+    },
169
+    {
170
+      path: "whitelist",
171
+      component: () =>
172
+        import("@/views/schoolSection/networkManage/whitelist.vue"),
173
+      name: "whitelist",
174
+      meta: {
175
+        keepAlive: true,
176
+        isAuth: true,
177
+        title: "学校管控-网址白名单"
178
+      }
179
+    },
180
+    {
181
+      path: "wallpaper",
182
+      component: () => import("@/views/schoolSection/setting/wallpaper.vue"),
183
+      name: "wallpaper",
184
+      meta: {
185
+        keepAlive: true,
186
+        isAuth: true,
187
+        title: "学校管控-壁纸"
188
+      }
189
+    },
190
+    {
191
+      path: "logo",
192
+      component: () => import("@/views/schoolSection/setting/logo.vue"),
193
+      name: "logo",
194
+      meta: {
195
+        keepAlive: true,
196
+        isAuth: true,
197
+        title: "学校管控-LOGO"
198
+      }
199
+    },
200
+    {
201
+      path: "device",
202
+      component: () => import("@/views/schoolSection/setting/device.vue"),
203
+      name: "device",
204
+      meta: {
205
+        keepAlive: true,
206
+        isAuth: true,
207
+        title: "学校管控-设备设置"
208
+      }
209
+    },
210
+    {
211
+      path: "admin",
212
+      component: () => import("@/views/schoolSection/log/admin.vue"),
213
+      name: "admin",
214
+      meta: {
215
+        keepAlive: true,
216
+        isAuth: true,
217
+        title: "学校管控-管理员日志"
218
+      }
219
+    },
220
+    {
221
+      path: "devicePush",
222
+      component: () => import("@/views/schoolSection/log/devicePush.vue"),
223
+      name: "devicePush",
224
+      meta: {
225
+        keepAlive: true,
226
+        isAuth: true,
227
+        title: "学校管控-设备推送日志"
228
+      }
229
+    },
230
+    {
231
+      path: "deviceLocation",
232
+      component: () => import("@/views/schoolSection/log/deviceLocation.vue"),
233
+      name: "deviceLocation",
234
+      meta: {
235
+        keepAlive: true,
236
+        isAuth: true,
237
+        title: "学校管控-设备位置日志"
238
+      }
239
+    },
240
+    {
241
+      path: "deviceEvents",
242
+      component: () => import("@/views/schoolSection/log/deviceEvents.vue"),
243
+      name: "deviceEvents",
244
+      meta: {
245
+        keepAlive: true,
246
+        isAuth: true,
247
+        title: "学校管控-设备事件日志"
248
+      }
249
+    },
250
+    {
251
+      path: "violatingDevice",
252
+      component: () => import("@/views/schoolSection/log/violatingDevice.vue"),
253
+      name: "violatingDevice",
254
+      meta: {
255
+        keepAlive: true,
256
+        isAuth: true,
257
+        title: "学校管控-违规设备日志"
258
+      }
259
+    },
260
+    {
261
+      path: "applicationDownload",
262
+      component: () =>
263
+        import("@/views/schoolSection/log/applicationDownload.vue"),
264
+      name: "applicationDownload",
265
+      meta: {
266
+        keepAlive: true,
267
+        isAuth: true,
268
+        title: "学校管控-应用下载日志"
269
+      }
270
+    },
271
+    {
272
+      path: "appLaunch",
273
+      component: () => import("@/views/schoolSection/log/appLaunch.vue"),
274
+      name: "appLaunch",
275
+      meta: {
276
+        keepAlive: true,
277
+        isAuth: true,
278
+        title: "学校管控-应用启动日志"
279
+      }
280
+    },
281
+    {
282
+      path: "deviceInstallation",
283
+      component: () =>
284
+        import("@/views/schoolSection/log/deviceInstallation.vue"),
285
+      name: "deviceInstallation",
286
+      meta: {
287
+        keepAlive: true,
288
+        isAuth: true,
289
+        title: "学校管控-设备已安装应用"
290
+      }
291
+    },
292
+    {
293
+      path: "deviceExport",
294
+      component: () => import("@/views/schoolSection/log/deviceExport.vue"),
295
+      name: "deviceExport",
296
+      meta: {
297
+        keepAlive: true,
298
+        isAuth: true,
299
+        title: "学校管控-设备导出"
300
+      }
301
+    },
302
+    {
303
+      path: "notice",
304
+      component: () => import("@/views/schoolSection/notice/notice.vue"),
305
+      name: "notice",
306
+      meta: {
307
+        keepAlive: true,
308
+        isAuth: true,
309
+        title: "学校管控-公告"
310
+      }
23 311
     }
24 312
   ]
25 313
 };

+ 45
- 2
src/views/platformSection/home/index.vue Bestand weergeven

@@ -1,5 +1,17 @@
1 1
 <template>
2
-  <div class="main_root"></div>
2
+  <div class="main_root">
3
+    <div class="row_item">
4
+      <div class="cell_item left_w max_h"></div>
5
+      <div class="cell_item right_w max_h"></div>
6
+    </div>
7
+    <div class="row_item">
8
+      <div class="cell_item left_w"></div>
9
+      <div class="cell_item right_w"></div>
10
+    </div>
11
+    <div class="row_item">
12
+      <div class="cell_item"></div>
13
+    </div>
14
+  </div>
3 15
 </template>
4 16
 
5 17
 <script>
@@ -11,4 +23,35 @@ export default {
11 23
 };
12 24
 </script>
13 25
 
14
-<style lang="less" scoped></style>
26
+<style lang="less" scoped>
27
+.main_root {
28
+  border-radius: 0;
29
+  border: none;
30
+  background-color: transparent;
31
+  .row_item {
32
+    margin-bottom: 10px;
33
+    display: flex;
34
+    justify-content: space-between;
35
+    align-items: center;
36
+    &.last-child {
37
+      margin-bottom: 0;
38
+    }
39
+    .cell_item {
40
+      width: 100%;
41
+      height: 400px;
42
+      border-radius: 15px;
43
+      border: 1px solid #e9f0f9;
44
+      background-color: #fff;
45
+      &.left_w {
46
+        width: calc(58.333% - 10px);
47
+      }
48
+      &.right_w {
49
+        width: 41.667%;
50
+      }
51
+      &.max_h {
52
+        height: 600px;
53
+      }
54
+    }
55
+  }
56
+}
57
+</style>

+ 14
- 0
src/views/schoolSection/applicationManage/applicationList.vue Bestand weergeven

@@ -0,0 +1,14 @@
1
+<template>
2
+  <div class="main_root"></div>
3
+</template>
4
+
5
+<script>
6
+export default {
7
+  data() {
8
+    return {};
9
+  },
10
+  methods: {}
11
+};
12
+</script>
13
+
14
+<style lang="less" scoped></style>

+ 14
- 0
src/views/schoolSection/applicationManage/greenBrowser.vue Bestand weergeven

@@ -0,0 +1,14 @@
1
+<template>
2
+  <div class="main_root"></div>
3
+</template>
4
+
5
+<script>
6
+export default {
7
+  data() {
8
+    return {};
9
+  },
10
+  methods: {}
11
+};
12
+</script>
13
+
14
+<style lang="less" scoped></style>

+ 14
- 0
src/views/schoolSection/applicationStrategy/applicationStrategy.vue Bestand weergeven

@@ -0,0 +1,14 @@
1
+<template>
2
+  <div class="main_root"></div>
3
+</template>
4
+
5
+<script>
6
+export default {
7
+  data() {
8
+    return {};
9
+  },
10
+  methods: {}
11
+};
12
+</script>
13
+
14
+<style lang="less" scoped></style>

+ 14
- 0
src/views/schoolSection/deviceManage/breakRuleDevice.vue Bestand weergeven

@@ -0,0 +1,14 @@
1
+<template>
2
+  <div class="main_root"></div>
3
+</template>
4
+
5
+<script>
6
+export default {
7
+  data() {
8
+    return {};
9
+  },
10
+  methods: {}
11
+};
12
+</script>
13
+
14
+<style lang="less" scoped></style>

+ 14
- 0
src/views/schoolSection/deviceManage/deviceManage.vue Bestand weergeven

@@ -0,0 +1,14 @@
1
+<template>
2
+  <div class="main_root"></div>
3
+</template>
4
+
5
+<script>
6
+export default {
7
+  data() {
8
+    return {};
9
+  },
10
+  methods: {}
11
+};
12
+</script>
13
+
14
+<style lang="less" scoped></style>

+ 14
- 0
src/views/schoolSection/deviceManage/inLineDevice.vue Bestand weergeven

@@ -0,0 +1,14 @@
1
+<template>
2
+  <div class="main_root"></div>
3
+</template>
4
+
5
+<script>
6
+export default {
7
+  data() {
8
+    return {};
9
+  },
10
+  methods: {}
11
+};
12
+</script>
13
+
14
+<style lang="less" scoped></style>

+ 14
- 0
src/views/schoolSection/deviceManage/outControlDevice.vue Bestand weergeven

@@ -0,0 +1,14 @@
1
+<template>
2
+  <div class="main_root"></div>
3
+</template>
4
+
5
+<script>
6
+export default {
7
+  data() {
8
+    return {};
9
+  },
10
+  methods: {}
11
+};
12
+</script>
13
+
14
+<style lang="less" scoped></style>

+ 14
- 0
src/views/schoolSection/deviceManage/parentControlDevice.vue Bestand weergeven

@@ -0,0 +1,14 @@
1
+<template>
2
+  <div class="main_root"></div>
3
+</template>
4
+
5
+<script>
6
+export default {
7
+  data() {
8
+    return {};
9
+  },
10
+  methods: {}
11
+};
12
+</script>
13
+
14
+<style lang="less" scoped></style>

+ 14
- 0
src/views/schoolSection/deviceManage/removeControlDevice.vue Bestand weergeven

@@ -0,0 +1,14 @@
1
+<template>
2
+  <div class="main_root"></div>
3
+</template>
4
+
5
+<script>
6
+export default {
7
+  data() {
8
+    return {};
9
+  },
10
+  methods: {}
11
+};
12
+</script>
13
+
14
+<style lang="less" scoped></style>

+ 42
- 2
src/views/schoolSection/home/index.vue Bestand weergeven

@@ -1,5 +1,17 @@
1 1
 <template>
2
-  <div class="main_root"></div>
2
+  <div class="main_root">
3
+    <div class="row_item">
4
+      <div class="cell_item left_w"></div>
5
+      <div class="cell_item right_w"></div>
6
+    </div>
7
+    <div class="row_item">
8
+      <div class="cell_item left_w"></div>
9
+      <div class="cell_item right_w"></div>
10
+    </div>
11
+    <div class="row_item">
12
+      <div class="cell_item"></div>
13
+    </div>
14
+  </div>
3 15
 </template>
4 16
 
5 17
 <script>
@@ -11,4 +23,32 @@ export default {
11 23
 };
12 24
 </script>
13 25
 
14
-<style lang="less" scoped></style>
26
+<style lang="less" scoped>
27
+.main_root {
28
+  border-radius: 0;
29
+  border: none;
30
+  background-color: transparent;
31
+  .row_item {
32
+    margin-bottom: 10px;
33
+    display: flex;
34
+    justify-content: space-between;
35
+    align-items: center;
36
+    &.last-child {
37
+      margin-bottom: 0;
38
+    }
39
+    .cell_item {
40
+      width: 100%;
41
+      height: 400px;
42
+      border-radius: 15px;
43
+      border: 1px solid #e9f0f9;
44
+      background-color: #fff;
45
+      &.left_w {
46
+        width: 41.667%;
47
+      }
48
+      &.right_w {
49
+        width: calc(58.333% - 10px);
50
+      }
51
+    }
52
+  }
53
+}
54
+</style>

+ 14
- 0
src/views/schoolSection/log/admin.vue Bestand weergeven

@@ -0,0 +1,14 @@
1
+<template>
2
+  <div class="main_root">管理员日志</div>
3
+</template>
4
+
5
+<script>
6
+export default {
7
+  data() {
8
+    return {};
9
+  },
10
+  methods: {}
11
+};
12
+</script>
13
+
14
+<style lang="less" scoped></style>

+ 14
- 0
src/views/schoolSection/log/appLaunch.vue Bestand weergeven

@@ -0,0 +1,14 @@
1
+<template>
2
+  <div class="main_root">应用启动日志</div>
3
+</template>
4
+
5
+<script>
6
+export default {
7
+  data() {
8
+    return {};
9
+  },
10
+  methods: {}
11
+};
12
+</script>
13
+
14
+<style lang="less" scoped></style>

+ 14
- 0
src/views/schoolSection/log/applicationDownload.vue Bestand weergeven

@@ -0,0 +1,14 @@
1
+<template>
2
+  <div class="main_root">应用下载日志</div>
3
+</template>
4
+
5
+<script>
6
+export default {
7
+  data() {
8
+    return {};
9
+  },
10
+  methods: {}
11
+};
12
+</script>
13
+
14
+<style lang="less" scoped></style>

+ 14
- 0
src/views/schoolSection/log/deviceEvents.vue Bestand weergeven

@@ -0,0 +1,14 @@
1
+<template>
2
+  <div class="main_root">设备事件日志</div>
3
+</template>
4
+
5
+<script>
6
+export default {
7
+  data() {
8
+    return {};
9
+  },
10
+  methods: {}
11
+};
12
+</script>
13
+
14
+<style lang="less" scoped></style>

+ 14
- 0
src/views/schoolSection/log/deviceExport.vue Bestand weergeven

@@ -0,0 +1,14 @@
1
+<template>
2
+  <div class="main_root">设备导出</div>
3
+</template>
4
+
5
+<script>
6
+export default {
7
+  data() {
8
+    return {};
9
+  },
10
+  methods: {}
11
+};
12
+</script>
13
+
14
+<style lang="less" scoped></style>

+ 14
- 0
src/views/schoolSection/log/deviceInstallation.vue Bestand weergeven

@@ -0,0 +1,14 @@
1
+<template>
2
+  <div class="main_root">设备已安装应用</div>
3
+</template>
4
+
5
+<script>
6
+export default {
7
+  data() {
8
+    return {};
9
+  },
10
+  methods: {}
11
+};
12
+</script>
13
+
14
+<style lang="less" scoped></style>

+ 14
- 0
src/views/schoolSection/log/deviceLocation.vue Bestand weergeven

@@ -0,0 +1,14 @@
1
+<template>
2
+  <div class="main_root">设备位置日志</div>
3
+</template>
4
+
5
+<script>
6
+export default {
7
+  data() {
8
+    return {};
9
+  },
10
+  methods: {}
11
+};
12
+</script>
13
+
14
+<style lang="less" scoped></style>

+ 14
- 0
src/views/schoolSection/log/devicePush.vue Bestand weergeven

@@ -0,0 +1,14 @@
1
+<template>
2
+  <div class="main_root">设备推送日志</div>
3
+</template>
4
+
5
+<script>
6
+export default {
7
+  data() {
8
+    return {};
9
+  },
10
+  methods: {}
11
+};
12
+</script>
13
+
14
+<style lang="less" scoped></style>

+ 14
- 0
src/views/schoolSection/log/violatingDevice.vue Bestand weergeven

@@ -0,0 +1,14 @@
1
+<template>
2
+  <div class="main_root">违规设备日志</div>
3
+</template>
4
+
5
+<script>
6
+export default {
7
+  data() {
8
+    return {};
9
+  },
10
+  methods: {}
11
+};
12
+</script>
13
+
14
+<style lang="less" scoped></style>

+ 14
- 0
src/views/schoolSection/networkManage/whitelist.vue Bestand weergeven

@@ -0,0 +1,14 @@
1
+<template>
2
+  <div class="main_root"></div>
3
+</template>
4
+
5
+<script>
6
+export default {
7
+  data() {
8
+    return {};
9
+  },
10
+  methods: {}
11
+};
12
+</script>
13
+
14
+<style lang="less" scoped></style>

+ 14
- 0
src/views/schoolSection/networkManage/whitelistLibrary.vue Bestand weergeven

@@ -0,0 +1,14 @@
1
+<template>
2
+  <div class="main_root"></div>
3
+</template>
4
+
5
+<script>
6
+export default {
7
+  data() {
8
+    return {};
9
+  },
10
+  methods: {}
11
+};
12
+</script>
13
+
14
+<style lang="less" scoped></style>

+ 490
- 0
src/views/schoolSection/notice/notice.vue Bestand weergeven

@@ -0,0 +1,490 @@
1
+<template>
2
+  <div class="main_root">
3
+    <div class="search_header">
4
+      <div class="search_left">
5
+        <DatePicker
6
+          v-model="searchForm.dataRange"
7
+          @on-change="searchList()"
8
+          :editable="false"
9
+          :transfer="true"
10
+          format="yyyy-MM-dd"
11
+          type="daterange"
12
+          placement="bottom-start"
13
+          placeholder="请选择日期范围"
14
+          style="margin-right: 10px; width: 220px"
15
+        ></DatePicker>
16
+        <Input
17
+          v-model="searchForm.title"
18
+          placeholder="请输入名称"
19
+          search
20
+          @on-search="searchList()"
21
+          style="width: 150px"
22
+        />
23
+      </div>
24
+      <Button type="primary" class="primary_btn" @click="toAdd()">新建</Button>
25
+    </div>
26
+    <div class="table_wrap">
27
+      <Table :columns="columns" :data="searchForm.list">
28
+        <template slot-scope="{ row }" slot="noticeTypeSlot">
29
+          <div>{{ row.noticeType === 1 ? "所有区域" : "自定义区域" }}</div>
30
+        </template>
31
+        <template slot-scope="{ row }" slot="actionSlot">
32
+          <div class="action_list">
33
+            <div @click="toView(row)">查看</div>
34
+            <div @click="toEdit(row)">编辑</div>
35
+            <div class="action_del" @click="toDel(row)">删除</div>
36
+          </div>
37
+        </template>
38
+      </Table>
39
+    </div>
40
+    <div class="page_wrap">
41
+      <Page
42
+        :transfer="true"
43
+        :total="searchForm.total"
44
+        :current="searchForm.page"
45
+        :page-size="searchForm.size"
46
+        :page-size-opts="[10, 20, 40, 60]"
47
+        @on-change="pageChange"
48
+        @on-page-size-change="pageSizeChange"
49
+        show-total
50
+        show-sizer
51
+      ></Page>
52
+    </div>
53
+    <!-- 新建/编辑 -->
54
+    <Modal
55
+      class="modal1"
56
+      :mask-closable="false"
57
+      v-model="noticeInfo.show"
58
+      :title="noticeInfo.noticeid ? '编辑' : '新建'"
59
+    >
60
+      <Form
61
+        v-if="noticeInfo.show"
62
+        ref="addForm"
63
+        :model="noticeInfo"
64
+        :rules="rules"
65
+        :label-width="60"
66
+      >
67
+        <FormItem label="标题" prop="noticeTitle">
68
+          <Input
69
+            v-model="noticeInfo.noticeTitle"
70
+            placeholder="请输入标题"
71
+          ></Input>
72
+        </FormItem>
73
+        <FormItem label="内容" prop="noticeContent">
74
+          <MyCkeditor
75
+            editor_ref="noticeEditor"
76
+            :height="240"
77
+            savefolder="/notice"
78
+            @change="getNoticeContent"
79
+            :content="noticeInfo.noticeContent"
80
+          ></MyCkeditor>
81
+        </FormItem>
82
+        <FormItem label="接收" prop="noticeType">
83
+          <RadioGroup
84
+            v-model="noticeInfo.noticeType"
85
+            @on-change="noticeInfo.regionids = []"
86
+          >
87
+            <Radio :label="1" font="16">所有区域</Radio>
88
+            <Radio :label="2" font="16">自定义区域</Radio>
89
+          </RadioGroup>
90
+          <div v-if="noticeInfo.noticeType === 2">
91
+            <CheckboxGroup v-model="noticeInfo.regionids">
92
+              <Checkbox
93
+                :label="regionItem.regionid"
94
+                v-for="regionItem in noticeInfo.regionList"
95
+                :key="regionItem.regionid"
96
+                >{{ regionItem.regionName }}</Checkbox
97
+              >
98
+            </CheckboxGroup>
99
+          </div>
100
+        </FormItem>
101
+      </Form>
102
+      <div slot="footer">
103
+        <Button @click="noticeInfo.show = false">取消</Button>
104
+        <Button @click="saveAddInfo()" type="primary">保存</Button>
105
+      </div>
106
+    </Modal>
107
+    <!-- 查看 -->
108
+    <Modal
109
+      class="modal1"
110
+      :mask-closable="false"
111
+      v-model="viewInfo.show"
112
+      title="查看"
113
+    >
114
+      <div class="notice_title">{{ viewInfo.noticeTitle }}</div>
115
+      <div class="notice_create">
116
+        <div>{{ viewInfo.createname }}</div>
117
+        <div>{{ viewInfo.updatetime }}</div>
118
+      </div>
119
+      <div class="notice_content" v-html="viewInfo.noticeContent"></div>
120
+      <div v-if="viewInfo.noticeType === 2" class="notice_regions">
121
+        <div v-for="regionItem in viewInfo.regions" :key="regionItem.regionid">
122
+          {{ regionItem.regionName }}
123
+        </div>
124
+      </div>
125
+      <div slot="footer" style="text-align: center">
126
+        <Button @click="viewInfo.show = false">关闭</Button>
127
+      </div>
128
+    </Modal>
129
+  </div>
130
+</template>
131
+
132
+<script>
133
+import { region_list_sel_pt } from "@/api/region";
134
+import {
135
+  notice_list,
136
+  notice_delete,
137
+  notice_add,
138
+  notice_edit,
139
+  notice_detail
140
+} from "@/api/notice";
141
+import { dateFormat, htmlHasContent } from "@/utils";
142
+import MyCkeditor from "@/components/Editor/MyCkeditor";
143
+export default {
144
+  components: {
145
+    MyCkeditor
146
+  },
147
+  data() {
148
+    // 通知内容验证
149
+    const noticeContentCheck = (rule, value, callback) => {
150
+      if (htmlHasContent(this.noticeInfo.noticeContent)) {
151
+        callback();
152
+      } else {
153
+        callback(new Error("请输入内容"));
154
+      }
155
+    };
156
+    return {
157
+      searchForm: {
158
+        title: "",
159
+        page: 1,
160
+        size: 10,
161
+        dataRange: [],
162
+        list: [],
163
+        total: 0
164
+      },
165
+      // 新建/编辑
166
+      noticeInfo: {
167
+        show: false,
168
+        noticeid: null,
169
+        rversion: null,
170
+        noticeTitle: "",
171
+        noticeContent: "",
172
+        noticeTxt: "",
173
+        // 1所有区域2自定义区域
174
+        noticeType: 1,
175
+        regionList: [],
176
+        regionids: []
177
+      },
178
+      // 查看信息
179
+      viewInfo: {
180
+        show: false,
181
+        noticeTitle: null,
182
+        createname: null,
183
+        updatetime: null,
184
+        noticeContent: null,
185
+        noticeType: null,
186
+        regions: []
187
+      },
188
+      rules: {
189
+        noticeTitle: [
190
+          {
191
+            required: true,
192
+            message: "请输入标题",
193
+            trigger: "blur"
194
+          }
195
+        ],
196
+        noticeContent: [
197
+          {
198
+            required: true,
199
+            validator: noticeContentCheck,
200
+            trigger: "change"
201
+          }
202
+        ],
203
+        noticeType: [
204
+          {
205
+            required: true,
206
+            type: "number",
207
+            message: "请选择接收区域",
208
+            trigger: "change"
209
+          }
210
+        ]
211
+      },
212
+      columns: [
213
+        {
214
+          title: "序号",
215
+          align: "center",
216
+          width: 70,
217
+          render: (h, params) => {
218
+            return h(
219
+              "span",
220
+              params.index +
221
+                (this.searchForm.page - 1) * this.searchForm.size +
222
+                1
223
+            );
224
+          }
225
+        },
226
+        {
227
+          title: "标题",
228
+          key: "noticeTitle",
229
+          align: "center"
230
+        },
231
+        {
232
+          title: "接收区域",
233
+          slot: "noticeTypeSlot",
234
+          width: 120,
235
+          align: "center"
236
+        },
237
+        {
238
+          title: "发布人",
239
+          key: "createname",
240
+          width: 140,
241
+          align: "center"
242
+        },
243
+        {
244
+          title: "更新时间",
245
+          key: "updatetime",
246
+          width: 190,
247
+          align: "center"
248
+        },
249
+        {
250
+          title: "操作",
251
+          slot: "actionSlot",
252
+          width: 180,
253
+          align: "center"
254
+        }
255
+      ]
256
+    };
257
+  },
258
+  created() {
259
+    this.searchList();
260
+  },
261
+  methods: {
262
+    // 搜索
263
+    searchList() {
264
+      this.searchForm.page = 1;
265
+      this.getList();
266
+    },
267
+    // 页码改变
268
+    pageChange(page) {
269
+      this.searchForm.page = page;
270
+      this.getList();
271
+    },
272
+    // 每页显示数量改变
273
+    pageSizeChange(size) {
274
+      this.searchForm.size = size;
275
+      this.searchForm.page = 1;
276
+      this.getList();
277
+    },
278
+    // 获取列表
279
+    getList() {
280
+      let _begindate = this.searchForm.dataRange[0];
281
+      _begindate = _begindate ? dateFormat(_begindate, "yyyy-MM-dd") : null;
282
+      let _enddate = this.searchForm.dataRange[1];
283
+      _enddate = _enddate ? dateFormat(_enddate, "yyyy-MM-dd") : null;
284
+      notice_list({
285
+        page: this.searchForm.page,
286
+        size: this.searchForm.size,
287
+        title: this.searchForm.title,
288
+        begindate: _begindate,
289
+        enddate: _enddate
290
+      }).then((data) => {
291
+        if (data.code === 0) {
292
+          this.searchForm.list = data.obj.data;
293
+          this.searchForm.total = data.obj.total;
294
+        } else {
295
+          this.$Message.error(data.msg);
296
+        }
297
+      });
298
+    },
299
+    // 新建
300
+    toAdd() {
301
+      this.noticeInfo = {
302
+        show: true,
303
+        noticeid: null,
304
+        rversion: null,
305
+        noticeTitle: "",
306
+        noticeContent: "",
307
+        noticeTxt: "",
308
+        // 1所有区域2自定义区域
309
+        noticeType: 1,
310
+        regionList: [],
311
+        regionids: []
312
+      };
313
+      this.getRegionList().then((list) => {
314
+        this.noticeInfo.regionList = list;
315
+      });
316
+    },
317
+    // 获取搜索区域列表
318
+    getRegionList() {
319
+      return new Promise((resolve) => {
320
+        region_list_sel_pt({}).then((data) => {
321
+          if (data.code === 0) {
322
+            resolve(data.obj);
323
+          } else {
324
+            resolve([]);
325
+            this.$Message.error(data.msg);
326
+          }
327
+        });
328
+      });
329
+    },
330
+    getNoticeContent(html, text = "") {
331
+      this.noticeInfo.noticeContent = html;
332
+      this.noticeInfo.noticeTxt = text.replace("\n", "");
333
+    },
334
+    saveAddInfo() {
335
+      this.$refs.addForm.validate((valid) => {
336
+        if (valid) {
337
+          if (
338
+            this.noticeInfo.noticeType === 2 &&
339
+            this.noticeInfo.regionids === 0
340
+          ) {
341
+            return;
342
+          }
343
+          this.noticeInfo.show = false;
344
+          let form = {
345
+            noticeTitle: this.noticeInfo.noticeTitle,
346
+            noticeContent: this.noticeInfo.noticeContent,
347
+            noticeTxt: this.noticeInfo.noticeTxt,
348
+            noticeType: this.noticeInfo.noticeType,
349
+            regionids: this.noticeInfo.regionids
350
+          };
351
+          if (this.noticeInfo.noticeid && this.noticeInfo.rversion) {
352
+            form.noticeid = this.noticeInfo.noticeid;
353
+            form.rversion = this.noticeInfo.rversion;
354
+          }
355
+          let api =
356
+            this.noticeInfo.noticeid && this.noticeInfo.rversion
357
+              ? notice_edit
358
+              : notice_add;
359
+          api(form).then((data) => {
360
+            if (data.code === 0) {
361
+              this.searchList();
362
+              this.$Message.success(data.msg);
363
+            } else {
364
+              this.$Message.error(data.msg);
365
+            }
366
+          });
367
+        }
368
+      });
369
+    },
370
+    // 查看
371
+    toView(row) {
372
+      notice_detail({
373
+        noticeid: row.noticeid
374
+      }).then((data) => {
375
+        if (data.code === 0) {
376
+          this.viewInfo = {
377
+            show: true,
378
+            noticeTitle: data.obj.noticeTitle,
379
+            createname: data.obj.createname,
380
+            updatetime: data.obj.updatetime,
381
+            noticeContent: data.obj.noticeContent,
382
+            noticeType: data.obj.noticeType,
383
+            regions: data.obj.noticeType === 1 ? [] : data.obj.regions
384
+          };
385
+        } else {
386
+          this.$Message.error(data.msg);
387
+        }
388
+      });
389
+    },
390
+    // 编辑
391
+    toEdit(row) {
392
+      notice_detail({
393
+        noticeid: row.noticeid
394
+      }).then((data) => {
395
+        if (data.code === 0) {
396
+          this.noticeInfo = {
397
+            show: true,
398
+            noticeid: data.obj.noticeid,
399
+            rversion: data.obj.rversion,
400
+            noticeTitle: data.obj.noticeTitle,
401
+            noticeContent: data.obj.noticeContent,
402
+            noticeTxt: data.obj.noticeTxt,
403
+            // 1所有区域2自定义区域
404
+            noticeType: data.obj.noticeType,
405
+            regionList: [],
406
+            regionids:
407
+              data.obj.noticeType === 1
408
+                ? []
409
+                : data.obj.regions.map((item) => item.regionid)
410
+          };
411
+          this.getRegionList().then((list) => {
412
+            this.noticeInfo.regionList = list;
413
+          });
414
+        } else {
415
+          this.$Message.error(data.msg);
416
+        }
417
+      });
418
+    },
419
+    // 删除
420
+    toDel(row) {
421
+      this.$Modal.confirm({
422
+        title: "提示",
423
+        content: "您确定删除选中数据吗?",
424
+        onOk: () => {
425
+          notice_delete({
426
+            noticeid: row.noticeid,
427
+            rversion: row.rversion
428
+          }).then((data) => {
429
+            if (data.code === 0) {
430
+              this.searchList();
431
+              this.$Message.success(data.msg);
432
+            } else {
433
+              this.$Message.error(data.msg);
434
+            }
435
+          });
436
+        },
437
+        onCancel: () => {}
438
+      });
439
+    }
440
+  }
441
+};
442
+</script>
443
+
444
+<style lang="less" scoped>
445
+.search_header {
446
+  display: flex;
447
+  justify-content: space-between;
448
+  align-items: center;
449
+  margin: 16px 16px;
450
+  .search_left {
451
+    display: flex;
452
+    justify-content: flex-start;
453
+    align-items: center;
454
+  }
455
+}
456
+.notice_title {
457
+  margin-bottom: 16px;
458
+  font-size: 18px;
459
+  font-weight: bold;
460
+  text-align: center;
461
+}
462
+.notice_create {
463
+  display: flex;
464
+  justify-content: center;
465
+  align-items: center;
466
+  margin-bottom: 16px;
467
+  font-size: 12px;
468
+  color: #afbcc7;
469
+  > div {
470
+    margin: 0 10px;
471
+  }
472
+}
473
+.notice_content {
474
+  font-size: 16px;
475
+}
476
+.notice_regions {
477
+  display: flex;
478
+  justify-content: flex-start;
479
+  align-items: center;
480
+  flex-wrap: wrap;
481
+  margin-top: 16px;
482
+  padding: 10px 16px;
483
+  font-size: 14px;
484
+  border-radius: 8px;
485
+  background: #f0f6fc;
486
+  > div {
487
+    margin: 10px 16px;
488
+  }
489
+}
490
+</style>

+ 0
- 0
src/views/schoolSection/setting/device.vue Bestand weergeven


+ 0
- 0
src/views/schoolSection/setting/logo.vue Bestand weergeven


+ 0
- 0
src/views/schoolSection/setting/wallpaper.vue Bestand weergeven


+ 14
- 0
src/views/schoolSection/strategy/personalStrategy.vue Bestand weergeven

@@ -0,0 +1,14 @@
1
+<template>
2
+  <div class="main_root"></div>
3
+</template>
4
+
5
+<script>
6
+export default {
7
+  data() {
8
+    return {};
9
+  },
10
+  methods: {}
11
+};
12
+</script>
13
+
14
+<style lang="less" scoped></style>

+ 14
- 0
src/views/schoolSection/strategy/publicStrategy.vue Bestand weergeven

@@ -0,0 +1,14 @@
1
+<template>
2
+  <div class="main_root"></div>
3
+</template>
4
+
5
+<script>
6
+export default {
7
+  data() {
8
+    return {};
9
+  },
10
+  methods: {}
11
+};
12
+</script>
13
+
14
+<style lang="less" scoped></style>

+ 14
- 0
src/views/schoolSection/strategy/strategyManage.vue Bestand weergeven

@@ -0,0 +1,14 @@
1
+<template>
2
+  <div class="main_root"></div>
3
+</template>
4
+
5
+<script>
6
+export default {
7
+  data() {
8
+    return {};
9
+  },
10
+  methods: {}
11
+};
12
+</script>
13
+
14
+<style lang="less" scoped></style>

+ 14
- 0
src/views/schoolSection/strategy/strategyTemplate.vue Bestand weergeven

@@ -0,0 +1,14 @@
1
+<template>
2
+  <div class="main_root"></div>
3
+</template>
4
+
5
+<script>
6
+export default {
7
+  data() {
8
+    return {};
9
+  },
10
+  methods: {}
11
+};
12
+</script>
13
+
14
+<style lang="less" scoped></style>

+ 14
- 0
src/views/schoolSection/timeLimit/timeLimit.vue Bestand weergeven

@@ -0,0 +1,14 @@
1
+<template>
2
+  <div class="main_root"></div>
3
+</template>
4
+
5
+<script>
6
+export default {
7
+  data() {
8
+    return {};
9
+  },
10
+  methods: {}
11
+};
12
+</script>
13
+
14
+<style lang="less" scoped></style>

+ 14
- 0
src/views/schoolSection/userManage/userManage.vue Bestand weergeven

@@ -0,0 +1,14 @@
1
+<template>
2
+  <div class="main_root"></div>
3
+</template>
4
+
5
+<script>
6
+export default {
7
+  data() {
8
+    return {};
9
+  },
10
+  methods: {}
11
+};
12
+</script>
13
+
14
+<style lang="less" scoped></style>

Laden…
Annuleren
Opslaan