From a83f8c13ed8527101e41fcea03c2d6bc8885f7ec Mon Sep 17 00:00:00 2001 From: qsj <731458905@qq.com> Date: Wed, 20 Mar 2024 17:16:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/moduleIOT/pages/iotCarePlan/FR200.tsx | 26 +++++++++++++++++------ src/moduleIOT/pages/iotCarePlan/WL200.tsx | 2 -- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/src/moduleIOT/pages/iotCarePlan/FR200.tsx b/src/moduleIOT/pages/iotCarePlan/FR200.tsx index aa1d832..f4d72ee 100644 --- a/src/moduleIOT/pages/iotCarePlan/FR200.tsx +++ b/src/moduleIOT/pages/iotCarePlan/FR200.tsx @@ -155,7 +155,7 @@ class IotCarePlanFR200 extends Component { }, // 当前选中模式 SwitchActiveModeItem: {}, // 切换选中模式 ModeID: "mode_", // 模式KEY - activeModeID: "154", // 当前选中模式ID:用于高亮 + activeModeID: "", // 当前选中模式ID:用于高亮 ModeStepIndex: 0, // 当前护理功效步骤:每个步骤时间不定,所以时间另外计算,根据步骤显示 ModeStepTimeArray: [], // 护理功效时间步骤,用于切换显示GIF currentServiceData: { @@ -383,7 +383,8 @@ class IotCarePlanFR200 extends Component { ModeList: res.data.data, }); - if (this.state.activeModeID != '') { + + if(this.state.activeModeID){ this.state.ModeList.map(item => { if (item.id === this.state.activeModeID) { this.setState({ @@ -391,11 +392,17 @@ class IotCarePlanFR200 extends Component { }); } }) + let res1= res.data.data.find(e =>e.id == this.state.activeModeID) + setTimeout(() => { + this.modeCurrentFun(res1); + }, 100); + } else { + setTimeout(() => { + this.modeCurrentFun(res.data.data[0]); + }, 100); } - let res1= res.data.data.find(e =>e.id == this.state.activeModeID) - setTimeout(() => { - this.modeCurrentFun(res1); - }, 100); + + } else { this.setState({ ModeList: [] }); } @@ -1231,10 +1238,13 @@ class IotCarePlanFR200 extends Component { workMode: ActiveModeItem.modeType, // 使用模式 workStatus: newWorkStatus, }; - + console.log(ActiveModeItem,'查看ActiveModeItem'); + // 水分测试需要特殊处理 // 水分测试准备 水分测试工作 水分测试启动 if (ActiveModeItem.modeType === "moistureTest") { + console.log('查看切换-----------------------------------------'); + sendParams.testStatus = "standby"; // 切换为准备 if (isBtnClick) { // 水分测试启动 @@ -1952,6 +1962,8 @@ class IotCarePlanFR200 extends Component { JSON.stringify(obj) ); } else if ("moistureTest" === nursingData.workMode) { + // go(`/recoding/pages/moisture_test_report/moisture_test_report?data=${item.nursingData}&date=${item.createTime}`); + // go("/pages/face_report/face_report?id=" + this.state.currentDevice.id); console.log("水分测试"); } else { go("/pages/face_report/face_report?id=" + this.state.currentDevice.id); diff --git a/src/moduleIOT/pages/iotCarePlan/WL200.tsx b/src/moduleIOT/pages/iotCarePlan/WL200.tsx index 7a641bb..485a3db 100644 --- a/src/moduleIOT/pages/iotCarePlan/WL200.tsx +++ b/src/moduleIOT/pages/iotCarePlan/WL200.tsx @@ -2048,8 +2048,6 @@ class IotCarePlanWL200 extends Component { this.setState({ isMuted }); }; GetVideosTime = (event) => { - let videoRef = Taro.createVideoContext("myVideo", this); - // videoRef.currentTime console.log("获取播放时间", event.detail.currentTime); }; onPlay = (e) => {