From df99d5745720f6ad82472522bab74a0d8060b90b Mon Sep 17 00:00:00 2001 From: blak-kong <546598185@qq.com> Date: Tue, 12 Mar 2024 20:37:45 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8D=E5=88=87=E6=8D=A2?= =?UTF-8?q?=E6=A8=A1=E5=BC=8Fbug=EF=BC=8C=E8=87=AA=E5=8A=A8=E5=90=AF?= =?UTF-8?q?=E5=8A=A8=E5=80=92=E8=AE=A1=E6=97=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/iotCarePlan/iotCarePlan.tsx | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/moduleIOT/pages/iotCarePlan/iotCarePlan.tsx b/src/moduleIOT/pages/iotCarePlan/iotCarePlan.tsx index f3459e0..34f42fd 100644 --- a/src/moduleIOT/pages/iotCarePlan/iotCarePlan.tsx +++ b/src/moduleIOT/pages/iotCarePlan/iotCarePlan.tsx @@ -414,14 +414,22 @@ class IotCarePlan extends Component { /** 选中护理模式 */ modeCurrentFun = async (data, isNotCheck = false) => { + // 护理检查改变模式,是否提示切换护理模式 + // isNotCheck为真时,不进行校验,直接切换 + this.tempModeCurrent = data; + // 仅在未开始护理前,切换模式的时候提示模式弹窗 if (!this.state.isShowNurse) { this.openStepTips(); } - // 护理检查改变模式,是否提示切换护理模式 - // isNotCheck为真时,不进行校验,直接切换 - this.tempModeCurrent = data; + // 如果按钮不可点击则报错,内部自带检查底部按钮函数 + this.onEmitErrorTips(); + if (!isNotCheck) { + let isReturn = this.modeRuningChange(); + if (isReturn) return; + } + let { isShowNurse } = this.state; let currentServiceData = { startSource: "", @@ -441,13 +449,6 @@ class IotCarePlan extends Component { currentTime, }); - // 如果按钮不可点击则报错,内部自带检查底部按钮函数 - this.onEmitErrorTips(); - if (!isNotCheck) { - let isReturn = this.modeRuningChange(); - if (isReturn) return; - } - setTimeout(() => { // 设置时间组合 if (data.serviceData.length > 0) { @@ -463,11 +464,10 @@ class IotCarePlan extends Component { if (isShowNurse) { if (!this.footerIsDisabled()) { this.stepNext(); // 如果切换模式,则不执行开始逻辑 - return; + setTimeout(() => { + this.onNursingTap("switch"); + }, 800); } - setTimeout(() => { - this.onNursingTap("switch"); - }, 800); } }; /** 设备运行中切换模式 */ @@ -1314,11 +1314,11 @@ class IotCarePlan extends Component { const { ActiveModeItem, isStandStatus, facialMaskConnectStatus } = this.state; - if (isStandStatus === 1 && ActiveModeItem.isCabinMode === 0) { + if (isStandStatus === true && ActiveModeItem.isCabinMode === 0) { console.log("已连接舱体,只可选择舱体模式"); return; } - if (isStandStatus === 0 && ActiveModeItem.isCabinMode === 1) { + if (isStandStatus === false && ActiveModeItem.isCabinMode === 1) { console.log("未连接舱体!"); return; }