1
0
forked from dyf/dyf-vue-ui

670控制中心

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

View File

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