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; }