feat: 增加策略信息页面和推送
This commit is contained in:
1 parent
640a3ecc57
commit
bb2e687d0a
7 files changed
+5314
-3785
No files matched your search
@@ -183,6 +183,13 @@ const handleOperateClick = (data: IObject) => {
|
||||
DeviceAPI.deviceScreenshot(data.row.serialno as string).then(() => {
|
||||
ElMessage.success(`截图设备,设备SN: ${data.row.serialno as string}`);
|
||||
});
|
||||
} else if (data.name === "mirror") {
|
||||
// 屏幕镜像:通知设备端启动屏幕采集,由家属端 client 进行 WebRTC 实时远程观看/控制
|
||||
DeviceAPI.deviceMirror(data.row.serialno as string)
|
||||
.then(() => {
|
||||
ElMessage.success(`已发送屏幕镜像指令,设备SN: ${data.row.serialno as string}`);
|
||||
})
|
||||
.catch(() => {});
|
||||
} else if (data.name === "reboot") {
|
||||
ElMessageBox.confirm("确定要重启该设备吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
@@ -215,6 +222,27 @@ const handleOperateClick = (data: IObject) => {
|
||||
});
|
||||
})
|
||||
.catch(() => {});
|
||||
} else if (data.name === "unbind") {
|
||||
// 解除设备手机号绑定(管理员端):确认后清除 snMobile 并推送通知设备端标记解绑
|
||||
const sn = data.row.serialno as string;
|
||||
const mobile = (data.row.snMobile as string) || "";
|
||||
ElMessageBox.confirm(
|
||||
mobile
|
||||
? `设备「${sn}」当前绑定手机号:${mobile}\n确定要解除该绑定吗?解除后需由家属端重新绑定。`
|
||||
: `设备「${sn}」当前未绑定手机号,无需解除绑定。`,
|
||||
"解除绑定",
|
||||
{
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
}
|
||||
)
|
||||
.then(() => {
|
||||
DeviceAPI.unbindDeviceMobile(data.row.serialno as string).then(() => {
|
||||
ElMessage.success(`已解除设备绑定,设备SN: ${data.row.serialno as string}`);
|
||||
});
|
||||
})
|
||||
.catch(() => {});
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user