From 6b6f060150298e89de70bf5b68e02ee70306750f Mon Sep 17 00:00:00 2001 From: blak-kong <546598185@qq.com> Date: Mon, 18 Mar 2024 16:46:05 +0800 Subject: [PATCH] . --- src/moduleIOT/pages/iotCarePlan/FR200.tsx | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/moduleIOT/pages/iotCarePlan/FR200.tsx b/src/moduleIOT/pages/iotCarePlan/FR200.tsx index fb50e3c..f0ca9ae 100644 --- a/src/moduleIOT/pages/iotCarePlan/FR200.tsx +++ b/src/moduleIOT/pages/iotCarePlan/FR200.tsx @@ -1560,6 +1560,7 @@ class IotCarePlanFR200 extends Component { this.setFR200NursingHistory(jsonStatus); } }; + // 改变模式时,清空dataArray,防止数据无限叠加 changeItemUpdateFR200NursingHistory() { this.FR200NursingHistory = Taro.getStorageSync("FR200NursingHistory"); if (this.FR200NursingHistory) { @@ -1575,15 +1576,11 @@ class IotCarePlanFR200 extends Component { */ rmFR200NursingHistory = (FR200NursingHistory, hard = false) => { const nowFR200NursingHistory = Taro.getStorageSync("FR200NursingHistory"); - - Taro.setStorageSync("FR200Echart", nowFR200NursingHistory); // 临时保存用于观看和调试 - if (nowFR200NursingHistory.id == FR200NursingHistory.id) { - Taro.removeStorageSync("FR200NursingHistory"); - this.FR200NursingHistory.id = ""; - } else if (hard) { - Taro.removeStorageSync("FR200NursingHistory"); - this.FR200NursingHistory.id = ""; + if (nowFR200NursingHistory) { + Taro.setStorageSync("FR200Echart", nowFR200NursingHistory); // 临时保存用于观看和调试 } + + Taro.removeStorageSync("FR200NursingHistory"); }; todoPromise = () => { @@ -1598,7 +1595,7 @@ class IotCarePlanFR200 extends Component { PostNursingLogClock = async (data: any = null, isJump = true) => { // todo 建议写一个Promise异步函数,用 await 执行,在提交前处理好数据 - return; + // return; let { currentDevice, ActiveModeItem } = this.state; let params = {}; if (data) {