670控制中心

This commit is contained in:
liub
2025-09-18 11:26:08 +08:00
parent 34c828bef3
commit f249ff496f

View File

@ -382,7 +382,8 @@ const handleModeClick = async (id: string, type: string) => {
let dic = { promise: null, callback: null, key: '' }; let dic = { promise: null, callback: null, key: '' };
dic.promise = Promise.resolve({ code: 200, msg: '操作成功' });//测试时默认成功 //测试环境假装成功
dic.promise = Promise.resolve({ code: 200, msg: '操作成功' });
let arr = []; let arr = [];
if (type == 'lightMode') { if (type == 'lightMode') {
@ -423,8 +424,11 @@ const handleModeClick = async (id: string, type: string) => {
} }
}); });
}; };
if(type == 'sosMode' && Status.sosMode=== '1' && id==='0'){
if (type == 'sosMode' && id === '1') { showClose();
return;
}
else if (type == 'sosMode' && id === '1') {
ShowConfirm({ ShowConfirm({
title: '提示', title: '提示',
text: '您确认开启180秒强制报警', text: '您确认开启180秒强制报警',
@ -434,7 +438,7 @@ const handleModeClick = async (id: string, type: string) => {
Status.confirm.Visible = false; Status.confirm.Visible = false;
deviceDetail.value.staSOSGrade="1"; deviceDetail.value.staSOSGrade="1";
Status.timeOut = 50; Status.timeOut = 180;
timer = setInterval(() => { timer = setInterval(() => {
if (Status.timeOut === 0) { if (Status.timeOut === 0) {
clearInterval(timer); clearInterval(timer);
@ -445,7 +449,7 @@ const handleModeClick = async (id: string, type: string) => {
return; return;
} }
Status.timeOut = Status.timeOut - 10; Status.timeOut = Status.timeOut - 1;
Status.confirm.text = '设备强制报警中:' + Status.timeOut; Status.confirm.text = '设备强制报警中:' + Status.timeOut;
}, 1000); }, 1000);
}); });