Преглед на файлове

设备管理选中优化

gzb
wangzhonglu преди 7 месеца
родител
ревизия
9d4b0dad72
променени са 2 файла, в които са добавени 68 реда и са изтрити 17 реда
  1. 32
    8
      src/views/schoolSection/deviceManage/breakRuleDevice.vue
  2. 36
    9
      src/views/schoolSection/deviceManage/deviceManage.vue

+ 32
- 8
src/views/schoolSection/deviceManage/breakRuleDevice.vue Целия файл

@@ -388,7 +388,10 @@ export default {
388 388
         name: this.searchForm.name
389 389
       }).then((data) => {
390 390
         if (data.code === 0) {
391
-          this.searchForm.list = data.obj.data;
391
+          this.searchForm.list = data.obj.data || [];
392
+          this.searchForm.list.forEach((item) => {
393
+            item._checked = false;
394
+          });
392 395
           this.searchForm.total = data.obj.total;
393 396
         } else {
394 397
           this.$Message.error(data.msg);
@@ -607,7 +610,10 @@ export default {
607 610
           this.$Message.error("推送失败");
608 611
         }
609 612
       });
610
-      this.$refs.deviceTable.selectAll(false);
613
+      this.tableSelection.forEach((item) => {
614
+        item._checked = false;
615
+      });
616
+      this.tableSelection = [];
611 617
       let form = {
612 618
         pushType: 6,
613 619
         pushObj: 1
@@ -647,7 +653,10 @@ export default {
647 653
             content: this.controlMessageInfo.content
648 654
           };
649 655
           form.userids = useridList;
650
-          this.$refs.deviceTable.selectAll(false);
656
+          this.tableSelection.forEach((item) => {
657
+            item._checked = false;
658
+          });
659
+          this.tableSelection = [];
651 660
           this.addPushLog(form);
652 661
         }
653 662
       });
@@ -667,7 +676,10 @@ export default {
667 676
           this.$Message.error("推送失败");
668 677
         }
669 678
       });
670
-      this.$refs.deviceTable.selectAll(false);
679
+      this.tableSelection.forEach((item) => {
680
+        item._checked = false;
681
+      });
682
+      this.tableSelection = [];
671 683
       let form = {
672 684
         pushType: 2,
673 685
         pushObj: 1
@@ -690,7 +702,10 @@ export default {
690 702
           this.$Message.error("推送失败");
691 703
         }
692 704
       });
693
-      this.$refs.deviceTable.selectAll(false);
705
+      this.tableSelection.forEach((item) => {
706
+        item._checked = false;
707
+      });
708
+      this.tableSelection = [];
694 709
       let form = {
695 710
         pushType: 3,
696 711
         pushObj: 1
@@ -713,7 +728,10 @@ export default {
713 728
           this.$Message.error("推送失败");
714 729
         }
715 730
       });
716
-      this.$refs.deviceTable.selectAll(false);
731
+      this.tableSelection.forEach((item) => {
732
+        item._checked = false;
733
+      });
734
+      this.tableSelection = [];
717 735
       let form = {
718 736
         pushType: 4,
719 737
         pushObj: 1
@@ -736,7 +754,10 @@ export default {
736 754
           this.$Message.error("推送失败");
737 755
         }
738 756
       });
739
-      this.$refs.deviceTable.selectAll(false);
757
+      this.tableSelection.forEach((item) => {
758
+        item._checked = false;
759
+      });
760
+      this.tableSelection = [];
740 761
       let form = {
741 762
         pushType: 5,
742 763
         pushObj: 1
@@ -759,7 +780,10 @@ export default {
759 780
           this.$Message.error("推送失败");
760 781
         }
761 782
       });
762
-      this.$refs.deviceTable.selectAll(false);
783
+      this.tableSelection.forEach((item) => {
784
+        item._checked = false;
785
+      });
786
+      this.tableSelection = [];
763 787
       let form = {
764 788
         pushType: 7,
765 789
         pushObj: 1

+ 36
- 9
src/views/schoolSection/deviceManage/deviceManage.vue Целия файл

@@ -1062,7 +1062,10 @@ export default {
1062 1062
         name: this.searchForm.name
1063 1063
       }).then((data) => {
1064 1064
         if (data.code === 0) {
1065
-          this.searchForm.list = data.obj.data;
1065
+          this.searchForm.list = data.obj.data || [];
1066
+          this.searchForm.list.forEach((item) => {
1067
+            item._checked = false;
1068
+          });
1066 1069
           this.searchForm.total = data.obj.total;
1067 1070
         } else {
1068 1071
           this.$Message.error(data.msg);
@@ -1450,7 +1453,10 @@ export default {
1450 1453
           this.$Message.error("推送失败");
1451 1454
         }
1452 1455
       });
1453
-      this.$refs.deviceTable.selectAll(false);
1456
+      this.tableSelection.forEach((item) => {
1457
+        item._checked = false;
1458
+      });
1459
+      this.tableSelection = [];
1454 1460
       let form = {
1455 1461
         pushType: 6,
1456 1462
         pushObj: 1
@@ -1494,7 +1500,10 @@ export default {
1494 1500
           } else {
1495 1501
             form.userids = useridList;
1496 1502
           }
1497
-          this.$refs.deviceTable.selectAll(false);
1503
+          this.tableSelection.forEach((item) => {
1504
+            item._checked = false;
1505
+          });
1506
+          this.tableSelection = [];
1498 1507
           this.addPushLog(form);
1499 1508
         }
1500 1509
       });
@@ -1514,7 +1523,10 @@ export default {
1514 1523
           this.$Message.error("推送失败");
1515 1524
         }
1516 1525
       });
1517
-      this.$refs.deviceTable.selectAll(false);
1526
+      this.tableSelection.forEach((item) => {
1527
+        item._checked = false;
1528
+      });
1529
+      this.tableSelection = [];
1518 1530
       let form = {
1519 1531
         pushType: 2,
1520 1532
         pushObj: 1
@@ -1537,7 +1549,10 @@ export default {
1537 1549
           this.$Message.error("推送失败");
1538 1550
         }
1539 1551
       });
1540
-      this.$refs.deviceTable.selectAll(false);
1552
+      this.tableSelection.forEach((item) => {
1553
+        item._checked = false;
1554
+      });
1555
+      this.tableSelection = [];
1541 1556
       let form = {
1542 1557
         pushType: 3,
1543 1558
         pushObj: 1
@@ -1560,7 +1575,10 @@ export default {
1560 1575
           this.$Message.error("推送失败");
1561 1576
         }
1562 1577
       });
1563
-      this.$refs.deviceTable.selectAll(false);
1578
+      this.tableSelection.forEach((item) => {
1579
+        item._checked = false;
1580
+      });
1581
+      this.tableSelection = [];
1564 1582
       let form = {
1565 1583
         pushType: 4,
1566 1584
         pushObj: 1
@@ -1583,7 +1601,10 @@ export default {
1583 1601
           this.$Message.error("推送失败");
1584 1602
         }
1585 1603
       });
1586
-      this.$refs.deviceTable.selectAll(false);
1604
+      this.tableSelection.forEach((item) => {
1605
+        item._checked = false;
1606
+      });
1607
+      this.tableSelection = [];
1587 1608
       let form = {
1588 1609
         pushType: 5,
1589 1610
         pushObj: 1
@@ -1606,7 +1627,10 @@ export default {
1606 1627
           this.$Message.error("推送失败");
1607 1628
         }
1608 1629
       });
1609
-      this.$refs.deviceTable.selectAll(false);
1630
+      this.tableSelection.forEach((item) => {
1631
+        item._checked = false;
1632
+      });
1633
+      this.tableSelection = [];
1610 1634
       let form = {
1611 1635
         pushType: 7,
1612 1636
         pushObj: 1
@@ -1629,7 +1653,10 @@ export default {
1629 1653
           this.$Message.error("推送失败");
1630 1654
         }
1631 1655
       });
1632
-      this.$refs.deviceTable.selectAll(false);
1656
+      this.tableSelection.forEach((item) => {
1657
+        item._checked = false;
1658
+      });
1659
+      this.tableSelection = [];
1633 1660
       let form = {
1634 1661
         pushType: 8,
1635 1662
         pushObj: 1

Loading…
Отказ
Запис