|
@@ -73,6 +73,7 @@
|
73
|
73
|
<DropdownItem name="6">更新策略</DropdownItem>
|
74
|
74
|
<DropdownItem name="7">重启设备</DropdownItem>
|
75
|
75
|
<DropdownItem name="9">解除管控</DropdownItem>
|
|
76
|
+ <DropdownItem name="10">解除绑定</DropdownItem>
|
76
|
77
|
</DropdownMenu>
|
77
|
78
|
</Dropdown>
|
78
|
79
|
</div>
|
|
@@ -96,6 +97,7 @@
|
96
|
97
|
<div v-if="row.sn" @click="toView(row)">查看</div>
|
97
|
98
|
<div @click="toStrategy(row)">策略</div>
|
98
|
99
|
<div v-if="row.sn" @click="toPsw(row)">设备密码</div>
|
|
100
|
+ <div v-if="row.sn" @click="toUnbind(row)">解除绑定</div>
|
99
|
101
|
</div>
|
100
|
102
|
</template>
|
101
|
103
|
</Table>
|
|
@@ -670,7 +672,7 @@ export default {
|
670
|
672
|
{
|
671
|
673
|
title: "状态",
|
672
|
674
|
slot: "onlineSlot",
|
673
|
|
- width: 70,
|
|
675
|
+ width: 90,
|
674
|
676
|
align: "center"
|
675
|
677
|
},
|
676
|
678
|
{
|
|
@@ -697,7 +699,7 @@ export default {
|
697
|
699
|
{
|
698
|
700
|
title: "操作",
|
699
|
701
|
slot: "actionSlot",
|
700
|
|
- width: 200,
|
|
702
|
+ width: 275,
|
701
|
703
|
align: "center"
|
702
|
704
|
}
|
703
|
705
|
],
|
|
@@ -1257,6 +1259,17 @@ export default {
|
1257
|
1259
|
}
|
1258
|
1260
|
});
|
1259
|
1261
|
},
|
|
1262
|
+ // 解除绑定
|
|
1263
|
+ toUnbind(row) {
|
|
1264
|
+ this.$Modal.confirm({
|
|
1265
|
+ title: "提示",
|
|
1266
|
+ content: "确定对所选设备进行解除绑定操作吗?",
|
|
1267
|
+ onOk: () => {
|
|
1268
|
+ this.controlRemoveBind([row.sn], [row.userid]);
|
|
1269
|
+ },
|
|
1270
|
+ onCancel: () => {}
|
|
1271
|
+ });
|
|
1272
|
+ },
|
1260
|
1273
|
selectionChange(selection) {
|
1261
|
1274
|
this.tableSelection = selection;
|
1262
|
1275
|
},
|
|
@@ -1391,7 +1404,21 @@ export default {
|
1391
|
1404
|
title: "提示",
|
1392
|
1405
|
content: "确定对所选设备进行解除管控操作吗?",
|
1393
|
1406
|
onOk: () => {
|
1394
|
|
- this.controlRemovetDevice(snList, useridList);
|
|
1407
|
+ this.controlRemoveDevice(snList, useridList);
|
|
1408
|
+ },
|
|
1409
|
+ onCancel: () => {}
|
|
1410
|
+ });
|
|
1411
|
+ } else if (name === "10") {
|
|
1412
|
+ // 解除绑定
|
|
1413
|
+ if (snList.length === 0) {
|
|
1414
|
+ this.$Message.error("请勾选至少一个设备。");
|
|
1415
|
+ return;
|
|
1416
|
+ }
|
|
1417
|
+ this.$Modal.confirm({
|
|
1418
|
+ title: "提示",
|
|
1419
|
+ content: "确定对所选设备进行解除绑定操作吗?",
|
|
1420
|
+ onOk: () => {
|
|
1421
|
+ this.controlRemoveBind(snList, useridList);
|
1395
|
1422
|
},
|
1396
|
1423
|
onCancel: () => {}
|
1397
|
1424
|
});
|
|
@@ -1547,14 +1574,14 @@ export default {
|
1547
|
1574
|
});
|
1548
|
1575
|
this.$refs.deviceTable.selectAll(false);
|
1549
|
1576
|
let form = {
|
1550
|
|
- pushType: 4,
|
|
1577
|
+ pushType: 5,
|
1551
|
1578
|
pushObj: 1
|
1552
|
1579
|
};
|
1553
|
1580
|
form.userids = useridList;
|
1554
|
1581
|
this.addPushLog(form);
|
1555
|
1582
|
},
|
1556
|
1583
|
// 解除管控
|
1557
|
|
- controlRemovetDevice(snList, useridList) {
|
|
1584
|
+ controlRemoveDevice(snList, useridList) {
|
1558
|
1585
|
let controlWSMsg = new ControlWSMsg(
|
1559
|
1586
|
controlWs.ws,
|
1560
|
1587
|
this.userInfo.adminid,
|
|
@@ -1570,7 +1597,30 @@ export default {
|
1570
|
1597
|
});
|
1571
|
1598
|
this.$refs.deviceTable.selectAll(false);
|
1572
|
1599
|
let form = {
|
1573
|
|
- pushType: 4,
|
|
1600
|
+ pushType: 7,
|
|
1601
|
+ pushObj: 1
|
|
1602
|
+ };
|
|
1603
|
+ form.userids = useridList;
|
|
1604
|
+ this.addPushLog(form);
|
|
1605
|
+ },
|
|
1606
|
+ // 解除绑定
|
|
1607
|
+ controlRemoveBind(snList, useridList) {
|
|
1608
|
+ let controlWSMsg = new ControlWSMsg(
|
|
1609
|
+ controlWs.ws,
|
|
1610
|
+ this.userInfo.adminid,
|
|
1611
|
+ snList
|
|
1612
|
+ );
|
|
1613
|
+ controlWSMsg.removeBind();
|
|
1614
|
+ controlWSMsg.send((isSend) => {
|
|
1615
|
+ if (isSend) {
|
|
1616
|
+ this.$Message.success("推送成功");
|
|
1617
|
+ } else {
|
|
1618
|
+ this.$Message.error("推送失败");
|
|
1619
|
+ }
|
|
1620
|
+ });
|
|
1621
|
+ this.$refs.deviceTable.selectAll(false);
|
|
1622
|
+ let form = {
|
|
1623
|
+ pushType: 8,
|
1574
|
1624
|
pushObj: 1
|
1575
|
1625
|
};
|
1576
|
1626
|
form.userids = useridList;
|