浏览代码

学校设备管理解除绑定优化

gzb
wangzhonglu 7 个月前
父节点
当前提交
2aba177704
共有 1 个文件被更改,包括 14 次插入8 次删除
  1. 14
    8
      src/views/schoolSection/deviceManage/deviceManage.vue

+ 14
- 8
src/views/schoolSection/deviceManage/deviceManage.vue 查看文件

@@ -1616,7 +1616,6 @@ export default {
1616 1616
       controlWSMsg.removeBind();
1617 1617
       controlWSMsg.send((isSend) => {
1618 1618
         if (isSend) {
1619
-          this.searchList();
1620 1619
           this.$Message.success("推送成功");
1621 1620
         } else {
1622 1621
           this.$Message.error("推送失败");
@@ -1628,17 +1627,24 @@ export default {
1628 1627
         pushObj: 1
1629 1628
       };
1630 1629
       form.userids = useridList;
1631
-      this.addPushLog(form);
1630
+      this.addPushLog(form).then(() => {
1631
+        this.searchList();
1632
+      });
1632 1633
     },
1633 1634
     // 添加推送日志
1634 1635
     addPushLog(form) {
1635
-      if (form.userids && form.userids.length === 0) {
1636
-        return;
1637
-      }
1638
-      logPush_add(form).then((data) => {
1639
-        if (data.code !== 0) {
1640
-          this.$Message.error(data.msg);
1636
+      return new Promise((resolve) => {
1637
+        if (form.userids && form.userids.length === 0) {
1638
+          resolve();
1639
+          return;
1641 1640
         }
1641
+        logPush_add(form).then((data) => {
1642
+          if (data.code === 0) {
1643
+            resolve();
1644
+          } else {
1645
+            this.$Message.error(data.msg);
1646
+          }
1647
+        });
1642 1648
       });
1643 1649
     },
1644 1650
     strategyPadTimes(id) {

正在加载...
取消
保存