diff --git a/src/views/controlCenter/670/index.vue b/src/views/controlCenter/670/index.vue index 2bbcc1e..e4f9e9d 100644 --- a/src/views/controlCenter/670/index.vue +++ b/src/views/controlCenter/670/index.vue @@ -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); });