Parcourir la source

Merge commit 'b3071286bcab7239f58a98deae8cb23ad0d8c866' into gzb

gzb
guozhongbo il y a 9 mois
Parent
révision
b5c9704925

+ 2
- 0
public/config.js Voir le fichier

@@ -5,6 +5,7 @@ window._config = window.isTest
5 5
       baseUrl: "https://mcapitest.xhkjedu.com/",
6 6
       baseImageUrl: "https://mcapitest.xhkjedu.com/",
7 7
       showImageUrl: "https://mcapitest.xhkjedu.com/",
8
+      downLoadUrl: "https://mcapitest.xhkjedu.com/",
8 9
       wsUrl: "wss://mcwstest.xhkjedu.com/ws",
9 10
       axiosApiTimeout: 60, // 接口超时时间 单位秒
10 11
       axiosFileTimeout: 120, // 上传文件超时时间 单位秒
@@ -20,6 +21,7 @@ window._config = window.isTest
20 21
       baseUrl: "https://mcapi.xhkjedu.com/",
21 22
       baseImageUrl: "https://mcapi.xhkjedu.com/",
22 23
       showImageUrl: "https://mcapi.xhkjedu.com/",
24
+      downLoadUrl: "https://mcapitest.xhkjedu.com/",
23 25
       wsUrl: "wss://mcws.xhkjedu.com/ws",
24 26
       axiosApiTimeout: 20, // 接口超时时间 单位秒
25 27
       axiosFileTimeout: 30, // 上传文件超时时间 单位秒

+ 3
- 3
src/api/setting.js Voir le fichier

@@ -62,15 +62,15 @@ export const password_delete = (data) => setRequest("password/delete", data);
62 62
 /**
63 63
  * 8.3.2.1 设备设置管理-详情
64 64
  */
65
-export const deviceSet_detail = (data) => setRequest("deviceSet/detail", data);
65
+export const schoolSet_detail = (data) => setRequest("schoolSet/detail", data);
66 66
 /**
67 67
  * 8.3.2.2 设备设置管理-保存
68 68
  */
69
-export const deviceSet_edit = (data) => setRequest("deviceSet/edit", data);
69
+export const schoolSet_edit = (data) => setRequest("schoolSet/edit", data);
70 70
 /**
71 71
  * 8.3.2.3 设备设置管理-重置
72 72
  */
73
-export const deviceSet_delete = (data) => setRequest("deviceSet/delete", data);
73
+export const schoolSet_delete = (data) => setRequest("schoolSet/delete", data);
74 74
 /**
75 75
  * 8.3.3 设备管理-获取
76 76
  */

+ 5
- 0
src/assets/less/common.less Voir le fichier

@@ -11,6 +11,11 @@ body,
11 11
   font-family: "Microsoft YaHei", "微软雅黑" !important;
12 12
   color: #253a70;
13 13
   font-size: 14px;
14
+  -webkit-touch-callout: none;
15
+  -webkit-user-select: none;
16
+  -khtml-user-select: none;
17
+  -moz-user-select: none;
18
+  -ms-user-select: none;
14 19
   user-select: none;
15 20
   background: #ffff;
16 21
   box-sizing: border-box;

+ 5
- 0
src/components/ImgPreview/ImgPreview.vue Voir le fichier

@@ -408,6 +408,11 @@ export default {
408 408
   bottom: 0;
409 409
   left: 0;
410 410
   z-index: 9999;
411
+  -webkit-touch-callout: none;
412
+  -webkit-user-select: none;
413
+  -khtml-user-select: none;
414
+  -moz-user-select: none;
415
+  -ms-user-select: none;
411 416
   user-select: none;
412 417
   overflow: hidden;
413 418
   .image_preview {

+ 4
- 0
src/utils/ControlWSMsg.js Voir le fichier

@@ -49,6 +49,10 @@ class ControlWSMsg {
49 49
   restoreFactory() {
50 50
     this.code = 2006;
51 51
   }
52
+  // 解除管控
53
+  removeControl() {
54
+    this.code = 2007;
55
+  }
52 56
   toJSONString() {
53 57
     let tempObj = {};
54 58
     for (let key in this) {

+ 65
- 7
src/views/platformSection/home/index.vue Voir le fichier

@@ -217,6 +217,7 @@ export default {
217 217
             res.push({
218 218
               name: outdata[i].name,
219 219
               value: geoCoord.concat(outdata[i].value),
220
+              numInfo: outdata[i].numInfo,
220 221
               //单独修改圆环上的文字
221 222
               label: {
222 223
                 formatter: () => {
@@ -245,13 +246,22 @@ export default {
245 246
           appendTo: "body",
246 247
           formatter: (params) => {
247 248
             return `${params.name}<div>设备数:${
248
-              (params.numInfo && params.numInfo.devicenum) || 0
249
+              (params.data &&
250
+                params.data.numInfo &&
251
+                params.data.numInfo.devicenum) ||
252
+              0
249 253
             } 台</div>
250 254
             <div>用户数:${
251
-              (params.numInfo && params.numInfo.usernum) || 0
255
+              (params.data &&
256
+                params.data.numInfo &&
257
+                params.data.numInfo.usernum) ||
258
+              0
252 259
             } 人</div>
253 260
             <div>学校数:${
254
-              (params.numInfo && params.numInfo.schoolnum) || 0
261
+              (params.data &&
262
+                params.data.numInfo &&
263
+                params.data.numInfo.schoolnum) ||
264
+              0
255 265
             } 所</div>`;
256 266
           }
257 267
         },
@@ -312,6 +322,34 @@ export default {
312 322
           },
313 323
           {
314 324
             type: "scatter",
325
+            tooltip: {
326
+              show: true,
327
+              borderColor: "#6AC8F0",
328
+              // 将tooltip限制在图表内
329
+              confine: true,
330
+              // 将tooltip添加到body下
331
+              appendTo: "body",
332
+              formatter: (params) => {
333
+                return `${params.name}<div>设备数:${
334
+                  (params.data &&
335
+                    params.data.numInfo &&
336
+                    params.data.numInfo.devicenum) ||
337
+                  0
338
+                } 台</div>
339
+            <div>用户数:${
340
+              (params.data &&
341
+                params.data.numInfo &&
342
+                params.data.numInfo.usernum) ||
343
+              0
344
+            } 人</div>
345
+            <div>学校数:${
346
+              (params.data &&
347
+                params.data.numInfo &&
348
+                params.data.numInfo.schoolnum) ||
349
+              0
350
+            } 所</div>`;
351
+              }
352
+            },
315 353
             coordinateSystem: "geo",
316 354
             zlevel: 2,
317 355
             rippleEffect: {
@@ -323,7 +361,6 @@ export default {
323 361
               show: true,
324 362
               color: "#fff"
325 363
             },
326
-            // #FF243A
327 364
             symbol: "pin", //定位图标样式
328 365
             symbolSize: 60,
329 366
             //点的名称和经纬度
@@ -682,9 +719,29 @@ export default {
682 719
         color:
683 720
           this.deviceActivityInfo.doEvent === 2 ? ["#52C41A"] : ["#339DFF"],
684 721
         tooltip: {
685
-          trigger: "item",
686
-          formatter: (params) => {
687
-            return `${params.name}:${params.value}次`;
722
+          trigger: "axis",
723
+          backgroundColor: "#fff", //背景颜色(此时为默认色)
724
+          borderWidth: 1, //边框线宽
725
+          textStyle: {
726
+            lineHeight: 1.6,
727
+            color: "#253A70"
728
+          },
729
+          axisPointer: {
730
+            z: 1, //竖线在圆圈后面
731
+            lineStyle: {
732
+              color: "#f8f8fd",
733
+              width: 20,
734
+              opacity: 0.7
735
+            }
736
+          },
737
+          formatter: (data) => {
738
+            let date = "";
739
+            let seriesDom = "";
740
+            for (const item of data) {
741
+              date = item.name;
742
+              seriesDom += `<div><span style="color: #95ABDF">${item.seriesName}</span> ${item.value}次</div>`;
743
+            }
744
+            return `${date}${seriesDom}`;
688 745
           }
689 746
         },
690 747
         legend: {
@@ -769,6 +826,7 @@ export default {
769 826
                 verticalAlign: "bottom",
770 827
                 position: "top",
771 828
                 distance: 0,
829
+                color: "inherit",
772 830
                 formatter: `{c}`
773 831
               }
774 832
             },

+ 65
- 7
src/views/regionSection/home/index.vue Voir le fichier

@@ -210,6 +210,7 @@ export default {
210 210
             res.push({
211 211
               name: outdata[i].name,
212 212
               value: geoCoord.concat(outdata[i].value),
213
+              numInfo: outdata[i].numInfo,
213 214
               //单独修改圆环上的文字
214 215
               label: {
215 216
                 formatter: () => {
@@ -238,13 +239,22 @@ export default {
238 239
           appendTo: "body",
239 240
           formatter: (params) => {
240 241
             return `${params.name}<div>设备数:${
241
-              (params.numInfo && params.numInfo.devicenum) || 0
242
+              (params.data &&
243
+                params.data.numInfo &&
244
+                params.data.numInfo.devicenum) ||
245
+              0
242 246
             } 台</div>
243 247
             <div>用户数:${
244
-              (params.numInfo && params.numInfo.usernum) || 0
248
+              (params.data &&
249
+                params.data.numInfo &&
250
+                params.data.numInfo.usernum) ||
251
+              0
245 252
             } 人</div>
246 253
             <div>学校数:${
247
-              (params.numInfo && params.numInfo.schoolnum) || 0
254
+              (params.data &&
255
+                params.data.numInfo &&
256
+                params.data.numInfo.schoolnum) ||
257
+              0
248 258
             } 所</div>`;
249 259
           }
250 260
         },
@@ -305,6 +315,34 @@ export default {
305 315
           },
306 316
           {
307 317
             type: "scatter",
318
+            tooltip: {
319
+              show: true,
320
+              borderColor: "#6AC8F0",
321
+              // 将tooltip限制在图表内
322
+              confine: true,
323
+              // 将tooltip添加到body下
324
+              appendTo: "body",
325
+              formatter: (params) => {
326
+                return `${params.name}<div>设备数:${
327
+                  (params.data &&
328
+                    params.data.numInfo &&
329
+                    params.data.numInfo.devicenum) ||
330
+                  0
331
+                } 台</div>
332
+            <div>用户数:${
333
+              (params.data &&
334
+                params.data.numInfo &&
335
+                params.data.numInfo.usernum) ||
336
+              0
337
+            } 人</div>
338
+            <div>学校数:${
339
+              (params.data &&
340
+                params.data.numInfo &&
341
+                params.data.numInfo.schoolnum) ||
342
+              0
343
+            } 所</div>`;
344
+              }
345
+            },
308 346
             coordinateSystem: "geo",
309 347
             zlevel: 2,
310 348
             rippleEffect: {
@@ -316,7 +354,6 @@ export default {
316 354
               show: true,
317 355
               color: "#fff"
318 356
             },
319
-            // #FF243A
320 357
             symbol: "pin", //定位图标样式
321 358
             symbolSize: 60,
322 359
             //点的名称和经纬度
@@ -675,9 +712,29 @@ export default {
675 712
         color:
676 713
           this.deviceActivityInfo.doEvent === 2 ? ["#52C41A"] : ["#339DFF"],
677 714
         tooltip: {
678
-          trigger: "item",
679
-          formatter: (params) => {
680
-            return `${params.name}:${params.value}次`;
715
+          trigger: "axis",
716
+          backgroundColor: "#fff", //背景颜色(此时为默认色)
717
+          borderWidth: 1, //边框线宽
718
+          textStyle: {
719
+            lineHeight: 1.6,
720
+            color: "#253A70"
721
+          },
722
+          axisPointer: {
723
+            z: 1, //竖线在圆圈后面
724
+            lineStyle: {
725
+              color: "#f8f8fd",
726
+              width: 20,
727
+              opacity: 0.7
728
+            }
729
+          },
730
+          formatter: (data) => {
731
+            let date = "";
732
+            let seriesDom = "";
733
+            for (const item of data) {
734
+              date = item.name;
735
+              seriesDom += `<div><span style="color: #95ABDF">${item.seriesName}</span> ${item.value}次</div>`;
736
+            }
737
+            return `${date}${seriesDom}`;
681 738
           }
682 739
         },
683 740
         legend: {
@@ -762,6 +819,7 @@ export default {
762 819
                 verticalAlign: "bottom",
763 820
                 position: "top",
764 821
                 distance: 0,
822
+                color: "inherit",
765 823
                 formatter: `{c}`
766 824
               }
767 825
             },

+ 6
- 1
src/views/schoolSection/applicationManage/greenBrowser.vue Voir le fichier

@@ -11,7 +11,7 @@
11 11
         />
12 12
       </div>
13 13
       <div class="search_right">
14
-        <div class="download_btn">
14
+        <div class="download_btn" @click="toDownloadBrower()">
15 15
           <Icon type="md-download" />
16 16
           <div>下载浏览器</div>
17 17
         </div>
@@ -180,6 +180,11 @@ export default {
180 180
     }
181 181
   },
182 182
   methods: {
183
+    toDownloadBrower() {
184
+      let url =
185
+        this.$api.downLoadUrl + "upload/greenbrowser/xh_control_browser.apk";
186
+      window.open(encodeURI(url, "utf-8"), "_blank");
187
+    },
183 188
     // 搜索
184 189
     searchList() {
185 190
       this.searchForm.page = 1;

+ 122
- 42
src/views/schoolSection/deviceManage/breakRuleDevice.vue Voir le fichier

@@ -32,6 +32,7 @@
32 32
             <DropdownItem name="5">限制使用</DropdownItem>
33 33
             <DropdownItem name="6">更新策略</DropdownItem>
34 34
             <DropdownItem name="7">重启设备</DropdownItem>
35
+            <DropdownItem name="9">解除管控</DropdownItem>
35 36
             <DropdownItem name="8">合规处理</DropdownItem>
36 37
           </DropdownMenu>
37 38
         </Dropdown>
@@ -39,6 +40,7 @@
39 40
     </div>
40 41
     <div class="table_wrap">
41 42
       <Table
43
+        ref="deviceTable"
42 44
         :columns="columns"
43 45
         :data="searchForm.list"
44 46
         @on-selection-change="selectionChange"
@@ -527,23 +529,44 @@ export default {
527 529
           return;
528 530
         }
529 531
         this.toLogHandle(snList);
532
+      } else if (name === "9") {
533
+        // 解除管控
534
+        if (snList.length === 0) {
535
+          this.$Message.error("请勾选至少一个设备。");
536
+          return;
537
+        }
538
+        this.$Modal.confirm({
539
+          title: "提示",
540
+          content: "确定对所选设备进行解除管控操作吗?",
541
+          onOk: () => {
542
+            this.controlRemovetDevice(snList, useridList);
543
+          },
544
+          onCancel: () => {}
545
+        });
530 546
       }
531 547
     },
532 548
     // 恢复出厂设置
533
-    controlRestoreFactory(snList, useridList) {
549
+    controlRestoreFactory(snList) {
534 550
       let controlWSMsg = new ControlWSMsg(
535 551
         controlWs.ws,
536 552
         this.userInfo.adminid,
537 553
         snList
538 554
       );
539 555
       controlWSMsg.restoreFactory();
540
-      controlWSMsg.send();
541
-      let form = {
542
-        pushType: 6,
543
-        pushObj: 1
544
-      };
545
-      form.userids = useridList;
546
-      this.addPushLog(form);
556
+      controlWSMsg.send((isSend) => {
557
+        if (isSend) {
558
+          this.$Message.success("推送成功");
559
+        } else {
560
+          this.$Message.error("推送失败");
561
+        }
562
+      });
563
+      this.$refs.deviceTable.selectAll(false);
564
+      // let form = {
565
+      //   pushType: 6,
566
+      //   pushObj: 1
567
+      // };
568
+      // form.userids = useridList;
569
+      // this.addPushLog(form);
547 570
     },
548 571
     // 发送消息
549 572
     controlSendMessage() {
@@ -563,7 +586,13 @@ export default {
563 586
               content: this.controlMessageInfo.content
564 587
             })
565 588
           );
566
-          controlWSMsg.send();
589
+          controlWSMsg.send((isSend) => {
590
+            if (isSend) {
591
+              this.$Message.success("推送成功");
592
+            } else {
593
+              this.$Message.error("推送失败");
594
+            }
595
+          });
567 596
           let form = {
568 597
             pushType: 1,
569 598
             pushObj: 1,
@@ -571,79 +600,130 @@ export default {
571 600
             content: this.controlMessageInfo.content
572 601
           };
573 602
           form.userids = useridList;
603
+          this.$refs.deviceTable.selectAll(false);
574 604
           this.addPushLog(form);
575 605
         }
576 606
       });
577 607
     },
578 608
     // 解除限制
579
-    controlRemoveLimit(snList, useridList) {
609
+    controlRemoveLimit(snList) {
580 610
       let controlWSMsg = new ControlWSMsg(
581 611
         controlWs.ws,
582 612
         this.userInfo.adminid,
583 613
         snList
584 614
       );
585 615
       controlWSMsg.removeLimit();
586
-      controlWSMsg.send();
587
-      let form = {
588
-        pushType: 2,
589
-        pushObj: 1
590
-      };
591
-      form.userids = useridList;
592
-      this.addPushLog(form);
616
+      controlWSMsg.send((isSend) => {
617
+        if (isSend) {
618
+          this.$Message.success("推送成功");
619
+        } else {
620
+          this.$Message.error("推送失败");
621
+        }
622
+      });
623
+      this.$refs.deviceTable.selectAll(false);
624
+      // let form = {
625
+      //   pushType: 2,
626
+      //   pushObj: 1
627
+      // };
628
+      // form.userids = useridList;
629
+      // this.addPushLog(form);
593 630
     },
594 631
     // 限制使用
595
-    controlLimitedUse(snList, useridList) {
632
+    controlLimitedUse(snList) {
596 633
       let controlWSMsg = new ControlWSMsg(
597 634
         controlWs.ws,
598 635
         this.userInfo.adminid,
599 636
         snList
600 637
       );
601 638
       controlWSMsg.limitedUse();
602
-      controlWSMsg.send();
603
-      let form = {
604
-        pushType: 3,
605
-        pushObj: 1
606
-      };
607
-      form.userids = useridList;
608
-      this.addPushLog(form);
639
+      controlWSMsg.send((isSend) => {
640
+        if (isSend) {
641
+          this.$Message.success("推送成功");
642
+        } else {
643
+          this.$Message.error("推送失败");
644
+        }
645
+      });
646
+      this.$refs.deviceTable.selectAll(false);
647
+      // let form = {
648
+      //   pushType: 3,
649
+      //   pushObj: 1
650
+      // };
651
+      // form.userids = useridList;
652
+      // this.addPushLog(form);
609 653
     },
610 654
     // 更新策略
611
-    controlUpdateStrategy(snList, useridList) {
655
+    controlUpdateStrategy(snList) {
612 656
       let controlWSMsg = new ControlWSMsg(
613 657
         controlWs.ws,
614 658
         this.userInfo.adminid,
615 659
         snList
616 660
       );
617 661
       controlWSMsg.updateStrategy();
618
-      controlWSMsg.send();
619
-      let form = {
620
-        pushType: 4,
621
-        pushObj: 1
622
-      };
623
-      form.userids = useridList;
624
-      this.addPushLog(form);
662
+      controlWSMsg.send((isSend) => {
663
+        if (isSend) {
664
+          this.$Message.success("推送成功");
665
+        } else {
666
+          this.$Message.error("推送失败");
667
+        }
668
+      });
669
+      this.$refs.deviceTable.selectAll(false);
670
+      // let form = {
671
+      //   pushType: 4,
672
+      //   pushObj: 1
673
+      // };
674
+      // form.userids = useridList;
675
+      // this.addPushLog(form);
625 676
     },
626 677
     // 重启设备
627
-    controlRebootDevice(snList, useridList) {
678
+    controlRebootDevice(snList) {
628 679
       let controlWSMsg = new ControlWSMsg(
629 680
         controlWs.ws,
630 681
         this.userInfo.adminid,
631 682
         snList
632 683
       );
633 684
       controlWSMsg.rebootDevice();
634
-      controlWSMsg.send();
635
-      let form = {
636
-        pushType: 4,
637
-        pushObj: 1
638
-      };
639
-      form.userids = useridList;
640
-      this.addPushLog(form);
685
+      controlWSMsg.send((isSend) => {
686
+        if (isSend) {
687
+          this.$Message.success("推送成功");
688
+        } else {
689
+          this.$Message.error("推送失败");
690
+        }
691
+      });
692
+      this.$refs.deviceTable.selectAll(false);
693
+      // let form = {
694
+      //   pushType: 4,
695
+      //   pushObj: 1
696
+      // };
697
+      // form.userids = useridList;
698
+      // this.addPushLog(form);
699
+    },
700
+    // 解除管控
701
+    controlRemovetDevice(snList) {
702
+      let controlWSMsg = new ControlWSMsg(
703
+        controlWs.ws,
704
+        this.userInfo.adminid,
705
+        snList
706
+      );
707
+      controlWSMsg.removeControl();
708
+      controlWSMsg.send((isSend) => {
709
+        if (isSend) {
710
+          this.$Message.success("推送成功");
711
+        } else {
712
+          this.$Message.error("推送失败");
713
+        }
714
+      });
715
+      this.$refs.deviceTable.selectAll(false);
716
+      // let form = {
717
+      //   pushType: 4,
718
+      //   pushObj: 1
719
+      // };
720
+      // form.userids = useridList;
721
+      // this.addPushLog(form);
641 722
     },
642 723
     // 添加推送日志
643 724
     addPushLog(form) {
644 725
       logPush_add(form).then((data) => {
645 726
         if (data.code === 0) {
646
-          this.$refs.deviceTable.selectAll(false);
647 727
           this.$Message.success(data.msg);
648 728
         } else {
649 729
           this.$Message.error(data.msg);

+ 122
- 45
src/views/schoolSection/deviceManage/deviceManage.vue Voir le fichier

@@ -72,6 +72,7 @@
72 72
               <DropdownItem name="5">限制使用</DropdownItem>
73 73
               <DropdownItem name="6">更新策略</DropdownItem>
74 74
               <DropdownItem name="7">重启设备</DropdownItem>
75
+              <DropdownItem name="9">解除管控</DropdownItem>
75 76
             </DropdownMenu>
76 77
           </Dropdown>
77 78
         </div>
@@ -1361,23 +1362,44 @@ export default {
1361 1362
           },
1362 1363
           onCancel: () => {}
1363 1364
         });
1365
+      } else if (name === "9") {
1366
+        // 解除管控
1367
+        if (snList.length === 0) {
1368
+          this.$Message.error("请勾选至少一个设备。");
1369
+          return;
1370
+        }
1371
+        this.$Modal.confirm({
1372
+          title: "提示",
1373
+          content: "确定对所选设备进行解除管控操作吗?",
1374
+          onOk: () => {
1375
+            this.controlRemovetDevice(snList, useridList);
1376
+          },
1377
+          onCancel: () => {}
1378
+        });
1364 1379
       }
1365 1380
     },
1366 1381
     // 恢复出厂设置
1367
-    controlRestoreFactory(snList, useridList) {
1382
+    controlRestoreFactory(snList) {
1368 1383
       let controlWSMsg = new ControlWSMsg(
1369 1384
         controlWs.ws,
1370 1385
         this.userInfo.adminid,
1371 1386
         snList
1372 1387
       );
1373 1388
       controlWSMsg.restoreFactory();
1374
-      controlWSMsg.send();
1375
-      let form = {
1376
-        pushType: 6,
1377
-        pushObj: 1
1378
-      };
1379
-      form.userids = useridList;
1380
-      this.addPushLog(form);
1389
+      controlWSMsg.send((isSend) => {
1390
+        if (isSend) {
1391
+          this.$Message.success("推送成功");
1392
+        } else {
1393
+          this.$Message.error("推送失败");
1394
+        }
1395
+      });
1396
+      this.$refs.deviceTable.selectAll(false);
1397
+      // let form = {
1398
+      //   pushType: 6,
1399
+      //   pushObj: 1
1400
+      // };
1401
+      // form.userids = useridList;
1402
+      // this.addPushLog(form);
1381 1403
     },
1382 1404
     // 发送消息
1383 1405
     controlSendMessage() {
@@ -1397,7 +1419,13 @@ export default {
1397 1419
               content: this.controlMessageInfo.content
1398 1420
             })
1399 1421
           );
1400
-          controlWSMsg.send();
1422
+          controlWSMsg.send((isSend) => {
1423
+            if (isSend) {
1424
+              this.$Message.success("推送成功");
1425
+            } else {
1426
+              this.$Message.error("推送失败");
1427
+            }
1428
+          });
1401 1429
           let form = {
1402 1430
             pushType: 1,
1403 1431
             pushObj: this.controlMessageInfo.classid ? 2 : 1,
@@ -1409,81 +1437,130 @@ export default {
1409 1437
           } else {
1410 1438
             form.userids = useridList;
1411 1439
           }
1440
+          this.$refs.deviceTable.selectAll(false);
1412 1441
           this.addPushLog(form);
1413 1442
         }
1414 1443
       });
1415 1444
     },
1416 1445
     // 解除限制
1417
-    controlRemoveLimit(snList, useridList) {
1446
+    controlRemoveLimit(snList) {
1418 1447
       let controlWSMsg = new ControlWSMsg(
1419 1448
         controlWs.ws,
1420 1449
         this.userInfo.adminid,
1421 1450
         snList
1422 1451
       );
1423 1452
       controlWSMsg.removeLimit();
1424
-      controlWSMsg.send();
1425
-      let form = {
1426
-        pushType: 2,
1427
-        pushObj: 1
1428
-      };
1429
-      form.userids = useridList;
1430
-      this.addPushLog(form);
1453
+      controlWSMsg.send((isSend) => {
1454
+        if (isSend) {
1455
+          this.$Message.success("推送成功");
1456
+        } else {
1457
+          this.$Message.error("推送失败");
1458
+        }
1459
+      });
1460
+      this.$refs.deviceTable.selectAll(false);
1461
+      // let form = {
1462
+      //   pushType: 2,
1463
+      //   pushObj: 1
1464
+      // };
1465
+      // form.userids = useridList;
1466
+      // this.addPushLog(form);
1431 1467
     },
1432 1468
     // 限制使用
1433
-    controlLimitedUse(snList, useridList) {
1469
+    controlLimitedUse(snList) {
1434 1470
       let controlWSMsg = new ControlWSMsg(
1435 1471
         controlWs.ws,
1436 1472
         this.userInfo.adminid,
1437 1473
         snList
1438 1474
       );
1439 1475
       controlWSMsg.limitedUse();
1440
-      controlWSMsg.send();
1441
-      let form = {
1442
-        pushType: 3,
1443
-        pushObj: 1
1444
-      };
1445
-      form.userids = useridList;
1446
-      this.addPushLog(form);
1476
+      controlWSMsg.send((isSend) => {
1477
+        if (isSend) {
1478
+          this.$Message.success("推送成功");
1479
+        } else {
1480
+          this.$Message.error("推送失败");
1481
+        }
1482
+      });
1483
+      this.$refs.deviceTable.selectAll(false);
1484
+      // let form = {
1485
+      //   pushType: 3,
1486
+      //   pushObj: 1
1487
+      // };
1488
+      // form.userids = useridList;
1489
+      // this.addPushLog(form);
1447 1490
     },
1448 1491
     // 更新策略
1449
-    controlUpdateStrategy(snList, useridList) {
1492
+    controlUpdateStrategy(snList) {
1450 1493
       let controlWSMsg = new ControlWSMsg(
1451 1494
         controlWs.ws,
1452 1495
         this.userInfo.adminid,
1453 1496
         snList
1454 1497
       );
1455 1498
       controlWSMsg.updateStrategy();
1456
-      controlWSMsg.send();
1457
-      let form = {
1458
-        pushType: 4,
1459
-        pushObj: 1
1460
-      };
1461
-      form.userids = useridList;
1462
-      this.addPushLog(form);
1499
+      controlWSMsg.send((isSend) => {
1500
+        if (isSend) {
1501
+          this.$Message.success("推送成功");
1502
+        } else {
1503
+          this.$Message.error("推送失败");
1504
+        }
1505
+      });
1506
+      this.$refs.deviceTable.selectAll(false);
1507
+      // let form = {
1508
+      //   pushType: 4,
1509
+      //   pushObj: 1
1510
+      // };
1511
+      // form.userids = useridList;
1512
+      // this.addPushLog(form);
1463 1513
     },
1464 1514
     // 重启设备
1465
-    controlRebootDevice(snList, useridList) {
1515
+    controlRebootDevice(snList) {
1466 1516
       let controlWSMsg = new ControlWSMsg(
1467 1517
         controlWs.ws,
1468 1518
         this.userInfo.adminid,
1469 1519
         snList
1470 1520
       );
1471 1521
       controlWSMsg.rebootDevice();
1472
-      controlWSMsg.send();
1473
-      let form = {
1474
-        pushType: 4,
1475
-        pushObj: 1
1476
-      };
1477
-      form.userids = useridList;
1478
-      this.addPushLog(form);
1522
+      controlWSMsg.send((isSend) => {
1523
+        if (isSend) {
1524
+          this.$Message.success("推送成功");
1525
+        } else {
1526
+          this.$Message.error("推送失败");
1527
+        }
1528
+      });
1529
+      this.$refs.deviceTable.selectAll(false);
1530
+      // let form = {
1531
+      //   pushType: 4,
1532
+      //   pushObj: 1
1533
+      // };
1534
+      // form.userids = useridList;
1535
+      // this.addPushLog(form);
1536
+    },
1537
+    // 解除管控
1538
+    controlRemovetDevice(snList) {
1539
+      let controlWSMsg = new ControlWSMsg(
1540
+        controlWs.ws,
1541
+        this.userInfo.adminid,
1542
+        snList
1543
+      );
1544
+      controlWSMsg.removeControl();
1545
+      controlWSMsg.send((isSend) => {
1546
+        if (isSend) {
1547
+          this.$Message.success("推送成功");
1548
+        } else {
1549
+          this.$Message.error("推送失败");
1550
+        }
1551
+      });
1552
+      this.$refs.deviceTable.selectAll(false);
1553
+      // let form = {
1554
+      //   pushType: 4,
1555
+      //   pushObj: 1
1556
+      // };
1557
+      // form.userids = useridList;
1558
+      // this.addPushLog(form);
1479 1559
     },
1480 1560
     // 添加推送日志
1481 1561
     addPushLog(form) {
1482 1562
       logPush_add(form).then((data) => {
1483
-        if (data.code === 0) {
1484
-          this.$refs.deviceTable.selectAll(false);
1485
-          this.$Message.success(data.msg);
1486
-        } else {
1563
+        if (data.code !== 0) {
1487 1564
           this.$Message.error(data.msg);
1488 1565
         }
1489 1566
       });

+ 1023
- 7
src/views/schoolSection/home/index.vue
Fichier diff supprimé car celui-ci est trop grand
Voir le fichier


+ 60
- 60
src/views/schoolSection/setting/deviceSetting.vue Voir le fichier

@@ -36,11 +36,11 @@
36 36
       <div class="require">
37 37
         限制使用时长后,客户端使用时间到了设备提醒休息,默认允许使用30分钟,这里你可以自行设置(可设置范围20~120分钟)。
38 38
       </div>
39
-      <div class="require">
39
+      <!-- <div class="require">
40 40
         限制安装来源功能开启后,只允许安装<span style="color: #339dff"
41 41
           >云鸽</span
42 42
         >商店内的应用(该功能仅对华为设备生效)。
43
-      </div>
43
+      </div> -->
44 44
     </div>
45 45
     <div class="form_box" v-if="menuInfo.selected === 1">
46 46
       <Form :label-width="80">
@@ -222,7 +222,7 @@
222 222
       <Button
223 223
         :disabled="
224 224
           (menuInfo.selected === 1 && !menuInfo.pswDetail.pwid) ||
225
-          (menuInfo.selected === 2 && !menuInfo.setDetail.dsid)
225
+          (menuInfo.selected === 2 && !menuInfo.setDetail.ssid)
226 226
         "
227 227
         style="margin-right: 20px"
228 228
         @click="resetDetail()"
@@ -240,9 +240,9 @@ import {
240 240
   password_detail,
241 241
   password_edit,
242 242
   password_delete,
243
-  deviceSet_detail,
244
-  deviceSet_edit,
245
-  deviceSet_delete
243
+  schoolSet_detail,
244
+  schoolSet_edit,
245
+  schoolSet_delete
246 246
 } from "@/api/setting";
247 247
 export default {
248 248
   data() {
@@ -256,33 +256,33 @@ export default {
256 256
           password: null
257 257
         },
258 258
         setDetail: {
259
-          dsid: null,
259
+          ssid: null,
260 260
           rversion: null,
261
-          forceBind: 1,
262
-          // sdcard: 1,
263
-          simcard: 1,
264
-          // dataFlow: 1,
265
-          logout: 1,
266
-          cleanup: 1,
267
-          accelerate: 1,
268
-          // gesturePwd: 1,
269
-          // wifiAdvanced: 1,
270
-          screenshots: 1,
271
-          // clientAdmin: 1,
272
-          rotateSetting: 1,
273
-          gallery: 1,
274
-          camera: 1,
275
-          alarmClock: 1,
276
-          calendar: 1,
277
-          protectedEyes: 1,
278
-          // installStore: 1,
279
-          changePwd: 1,
280
-          schoolClass: 1,
281
-          // gps: 1,
282
-          // privacyStatement: 1,
261
+          forceBind: 0,
262
+          // sdcard: 0,
263
+          simcard: 0,
264
+          // dataFlow: 0,
265
+          logout: 0,
266
+          cleanup: 0,
267
+          accelerate: 0,
268
+          // gesturePwd: 0,
269
+          // wifiAdvanced: 0,
270
+          screenshots: 0,
271
+          // clientAdmin: 0,
272
+          rotateSetting: 0,
273
+          gallery: 0,
274
+          camera: 0,
275
+          alarmClock: 0,
276
+          calendar: 0,
277
+          protectedEyes: 0,
278
+          // installStore: 0,
279
+          changePwd: 0,
280
+          schoolClass: 0,
281
+          // gps: 0,
282
+          // privacyStatement: 0,
283 283
           remindDuration: 1,
284 284
           duration: 30
285
-          // otg: 1
285
+          // otg: 0
286 286
         }
287 287
       }
288 288
     };
@@ -323,13 +323,13 @@ export default {
323 323
           }
324 324
         });
325 325
       } else if (this.menuInfo.selected === 2) {
326
-        if (!this.menuInfo.setDetail.dsid) {
326
+        if (!this.menuInfo.setDetail.ssid) {
327 327
           return;
328 328
         }
329
-        deviceSet_delete({
329
+        schoolSet_delete({
330 330
           rtype: this.powerParams.rtype,
331 331
           objectid: this.powerParams.objectid,
332
-          dsid: this.menuInfo.setDetail.dsid,
332
+          ssid: this.menuInfo.setDetail.ssid,
333 333
           rversion: this.menuInfo.setDetail.rversion
334 334
         }).then((data) => {
335 335
           if (data.code === 0) {
@@ -364,7 +364,7 @@ export default {
364 364
       });
365 365
     },
366 366
     getSetDetail() {
367
-      deviceSet_detail({
367
+      schoolSet_detail({
368 368
         rtype: this.powerParams.rtype,
369 369
         objectid: this.powerParams.objectid,
370 370
         schoolid: this.powerParams.objectid
@@ -374,33 +374,33 @@ export default {
374 374
             this.menuInfo.setDetail = data.obj;
375 375
           } else {
376 376
             this.menuInfo.setDetail = {
377
-              dsid: null,
377
+              ssid: null,
378 378
               rversion: null,
379
-              forceBind: 1,
380
-              // sdcard: 1,
381
-              simcard: 1,
382
-              // dataFlow: 1,
383
-              logout: 1,
384
-              cleanup: 1,
385
-              accelerate: 1,
386
-              // gesturePwd: 1,
387
-              // wifiAdvanced: 1,
388
-              screenshots: 1,
389
-              // clientAdmin: 1,
390
-              rotateSetting: 1,
391
-              gallery: 1,
392
-              camera: 1,
393
-              alarmClock: 1,
394
-              calendar: 1,
395
-              protectedEyes: 1,
396
-              // installStore: 1,
397
-              changePwd: 1,
398
-              schoolClass: 1,
399
-              // gps: 1,
400
-              // privacyStatement: 1,
379
+              forceBind: 0,
380
+              // sdcard: 0,
381
+              simcard: 0,
382
+              // dataFlow: 0,
383
+              logout: 0,
384
+              cleanup: 0,
385
+              accelerate: 0,
386
+              // gesturePwd: 0,
387
+              // wifiAdvanced: 0,
388
+              screenshots: 0,
389
+              // clientAdmin: 0,
390
+              rotateSetting: 0,
391
+              gallery: 0,
392
+              camera: 0,
393
+              alarmClock: 0,
394
+              calendar: 0,
395
+              protectedEyes: 0,
396
+              // installStore: 0,
397
+              changePwd: 0,
398
+              schoolClass: 0,
399
+              // gps: 0,
400
+              // privacyStatement: 0,
401 401
               remindDuration: 1,
402 402
               duration: 30
403
-              // otg: 1
403
+              // otg: 0
404 404
             };
405 405
           }
406 406
         } else {
@@ -445,11 +445,11 @@ export default {
445 445
       });
446 446
     },
447 447
     saveSetDetail() {
448
-      deviceSet_edit({
448
+      schoolSet_edit({
449 449
         rtype: this.powerParams.rtype,
450 450
         objectid: this.powerParams.objectid,
451 451
         schoolid: this.powerParams.objectid,
452
-        dsid: this.menuInfo.setDetail.dsid,
452
+        ssid: this.menuInfo.setDetail.ssid,
453 453
         rversion: this.menuInfo.setDetail.rversion,
454 454
         forceBind: this.menuInfo.setDetail.forceBind,
455 455
         // sdcard: this.menuInfo.setDetail.sdcard,

Chargement…
Annuler
Enregistrer