forked from dyf/dyf-vue-ui
670控制中心问题调整
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
<div class="device-page p-2">
|
||||
<!-- 头部信息栏 -->
|
||||
<div class="header-bar">
|
||||
<div>设备名称:{{ deviceDetail.deviceName }}</div>
|
||||
<div>设备名称:{{ deviceDetail.deviceName }},IMEI:{{deviceDetail.deviceImei }}</div>
|
||||
<div>设备型号:{{ deviceDetail.typeName }}</div>
|
||||
<div class="device-status">
|
||||
设备状态:
|
||||
@ -372,8 +372,7 @@ const deviceDetail = ref<any>({
|
||||
});
|
||||
|
||||
//模式设置
|
||||
const handleModeClick = async (id: string, type: string) => {
|
||||
|
||||
const handleModeClick = async (id: string, type: string) => {
|
||||
if (Status[type] == id) {
|
||||
return;
|
||||
}
|
||||
@ -406,8 +405,7 @@ const handleModeClick = async (id: string, type: string) => {
|
||||
});
|
||||
};
|
||||
|
||||
dic.promise.then((res) => {
|
||||
|
||||
dic.promise.then((res) => {
|
||||
if (res.code === 200) {
|
||||
Status[type] = id;
|
||||
ElMessage.closeAll();
|
||||
@ -419,12 +417,13 @@ const handleModeClick = async (id: string, type: string) => {
|
||||
|
||||
callback();
|
||||
}
|
||||
|
||||
} else {
|
||||
proxy?.$modal.msgError(res.msg);
|
||||
}
|
||||
});
|
||||
};
|
||||
if(type == 'sosMode' && Status.sosMode=== '1' && id==='0'){
|
||||
if(type == 'sosMode' && Status.sosMode=== '1' && id==='0' && timer){
|
||||
showClose();
|
||||
return;
|
||||
}
|
||||
@ -444,7 +443,7 @@ const handleModeClick = async (id: string, type: string) => {
|
||||
clearInterval(timer);
|
||||
timer = null;
|
||||
hideConfirm();
|
||||
handleModeClick('sosMode','1');
|
||||
handleModeClick('1','sosMode');
|
||||
deviceDetail.value.staSOSGrade="0";
|
||||
return;
|
||||
}
|
||||
@ -563,11 +562,13 @@ function showClose() {
|
||||
Status.confirm.Visible = true;
|
||||
Status.confirm.OkTxt = '关闭';
|
||||
Status.confirm.OkCallback=()=>{
|
||||
handleModeClick('sosMode','0');
|
||||
deviceDetail.value.staSOSGrade="0";
|
||||
clearInterval(timer);
|
||||
clearInterval(timer);
|
||||
timer=null;
|
||||
handleModeClick('0','sosMode');
|
||||
deviceDetail.value.staSOSGrade="0";
|
||||
|
||||
Status.timeOut=0;
|
||||
|
||||
hideConfirm();
|
||||
}
|
||||
}
|
||||
|
||||
@ -205,9 +205,12 @@ var dic = reactive({
|
||||
'3': '开机画面',
|
||||
'4': '人员信息登记',
|
||||
'5': '发送信息',
|
||||
'6': '产品信息'
|
||||
'6': '产品信息',
|
||||
'41':'静电探测',
|
||||
'42':'SOS'
|
||||
});
|
||||
|
||||
|
||||
var power = computed(() => {
|
||||
let arr = [];
|
||||
let keys = Object.keys(dic);
|
||||
|
||||
Reference in New Issue
Block a user