|
|
|
@ -660,32 +660,38 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
// return;
|
|
|
|
// return;
|
|
|
|
let { currentDevice, ActiveModeItem } = this.state;
|
|
|
|
let { currentDevice, ActiveModeItem } = this.state;
|
|
|
|
let params = {};
|
|
|
|
let params:any = {};
|
|
|
|
let nursingData = {
|
|
|
|
|
|
|
|
nursingData: JSON.stringify({
|
|
|
|
|
|
|
|
GearData: [...waterStepList],
|
|
|
|
|
|
|
|
}),
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
params = {
|
|
|
|
params = {
|
|
|
|
instrumentId: currentDevice.id,
|
|
|
|
instrumentId: currentDevice.id,
|
|
|
|
instrumentName: currentDevice.name,
|
|
|
|
instrumentName: currentDevice.name,
|
|
|
|
modeId: ActiveModeItem.id,
|
|
|
|
modeId: ActiveModeItem.id,
|
|
|
|
modeName: ActiveModeItem.modeName,
|
|
|
|
modeName: ActiveModeItem.modeName,
|
|
|
|
nursingTime: s_to_hms(this.elapsedTime),
|
|
|
|
nursingTime: s_to_hms(this.elapsedTime),
|
|
|
|
|
|
|
|
nursingData: JSON.stringify({
|
|
|
|
|
|
|
|
GearData: [...waterStepList],
|
|
|
|
|
|
|
|
})
|
|
|
|
};
|
|
|
|
};
|
|
|
|
params = { ...params, ...nursingData };
|
|
|
|
|
|
|
|
|
|
|
|
// params = { ...params, ...nursingData };
|
|
|
|
let res: any = await InstrumentInfo.apiNursingLog.addLog(
|
|
|
|
let res: any = await InstrumentInfo.apiNursingLog.addLog(
|
|
|
|
JSON.stringify(params)
|
|
|
|
JSON.stringify(
|
|
|
|
|
|
|
|
params
|
|
|
|
|
|
|
|
)
|
|
|
|
);
|
|
|
|
);
|
|
|
|
setTimeout(() => {
|
|
|
|
setTimeout(async() => {
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
isShowNursingSuccess: false,
|
|
|
|
isShowNursingSuccess: false,
|
|
|
|
});
|
|
|
|
});
|
|
|
|
go(
|
|
|
|
let date = new Date();
|
|
|
|
`/recoding/pages/moisture_test_report/moisture_test_report?data=${nursingData}&date=${s_to_hms(
|
|
|
|
|
|
|
|
this.elapsedTime
|
|
|
|
let year = date.getFullYear();
|
|
|
|
)}&modeId=${ActiveModeItem.id}`
|
|
|
|
let month = (date.getMonth() + 1).toString().padStart(2, '0');
|
|
|
|
);
|
|
|
|
let day = date.getDate().toString().padStart(2, '0');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let formattedDate = `${year}.${month}.${day}`;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
go(`/recoding/pages/moisture_test_report/moisture_test_report?data=${params.nursingData}&date=${formattedDate}&modeId=${ActiveModeItem.id}&id=${currentDevice.id}`);
|
|
|
|
}, 2000);
|
|
|
|
}, 2000);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
@ -872,6 +878,7 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
let num = waterStepIndex;
|
|
|
|
let num = waterStepIndex;
|
|
|
|
if (waterStepIndex < 2) {
|
|
|
|
if (waterStepIndex < 2) {
|
|
|
|
num = waterStepIndex + 1;
|
|
|
|
num = waterStepIndex + 1;
|
|
|
|
|
|
|
|
this.waterTestNext(num)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
timerIdSuccess: null,
|
|
|
|
timerIdSuccess: null,
|
|
|
|
@ -1305,21 +1312,14 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
* @name 水分测试下一步,手动调用
|
|
|
|
* @name 水分测试下一步,手动调用
|
|
|
|
* @description 步骤+1并设置视频
|
|
|
|
* @description 步骤+1并设置视频
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
waterTestNext() {
|
|
|
|
waterTestNext(index) {
|
|
|
|
let { TestModeStepIndex, ActiveModeItem } = this.state;
|
|
|
|
let ActiveModeItem =this.state.ActiveModeItem
|
|
|
|
if (TestModeStepIndex < 3) {
|
|
|
|
if (index === 0 && ActiveModeItem.stepOneVideo) {
|
|
|
|
let index = TestModeStepIndex + 1; // 提前步骤+1
|
|
|
|
this.VideoSrcLoad(ActiveModeItem.stepOneVideo);
|
|
|
|
this.setState({
|
|
|
|
} else if (index === 1 && ActiveModeItem.stepTwoVideo) {
|
|
|
|
TestModeStepIndex: index,
|
|
|
|
this.VideoSrcLoad(ActiveModeItem.stepTwoVideo);
|
|
|
|
});
|
|
|
|
} else if (index === 2 && ActiveModeItem.stepThreeVideo) {
|
|
|
|
|
|
|
|
this.VideoSrcLoad(ActiveModeItem.stepThreeVideo);
|
|
|
|
if (index === 1 && ActiveModeItem.stepOneVideo) {
|
|
|
|
|
|
|
|
this.VideoSrcLoad(ActiveModeItem.stepOneVideo);
|
|
|
|
|
|
|
|
} else if (index === 2 && ActiveModeItem.stepTwoVideo) {
|
|
|
|
|
|
|
|
this.VideoSrcLoad(ActiveModeItem.stepTwoVideo);
|
|
|
|
|
|
|
|
} else if (index === 3 && ActiveModeItem.stepThreeVideo) {
|
|
|
|
|
|
|
|
this.VideoSrcLoad(ActiveModeItem.stepThreeVideo);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ -1563,6 +1563,7 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
// 水分测试需要特殊处理
|
|
|
|
// 水分测试需要特殊处理
|
|
|
|
// 水分测试准备 水分测试工作 水分测试启动
|
|
|
|
// 水分测试准备 水分测试工作 水分测试启动
|
|
|
|
if (ActiveModeItem.modeType === "moistureTest") {
|
|
|
|
if (ActiveModeItem.modeType === "moistureTest") {
|
|
|
|
|
|
|
|
let that =this
|
|
|
|
sendParams.testStatus = "standby"; // 切换为准备
|
|
|
|
sendParams.testStatus = "standby"; // 切换为准备
|
|
|
|
let waterStepList = this.state.waterStepList;
|
|
|
|
let waterStepList = this.state.waterStepList;
|
|
|
|
let waterStepIndex = this.state.waterStepIndex;
|
|
|
|
let waterStepIndex = this.state.waterStepIndex;
|
|
|
|
@ -1574,16 +1575,16 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
|
|
|
|
|
|
|
timerIdSuccess = setTimeout(function () {
|
|
|
|
timerIdSuccess = setTimeout(function () {
|
|
|
|
waterStepList[waterStepIndex].finish = true;
|
|
|
|
waterStepList[waterStepIndex].finish = true;
|
|
|
|
this.setState({
|
|
|
|
that.setState({
|
|
|
|
waterStepList,
|
|
|
|
waterStepList,
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}, 2000);
|
|
|
|
}, 2000);
|
|
|
|
this.setState({
|
|
|
|
that.setState({
|
|
|
|
waterStepList,
|
|
|
|
waterStepList,
|
|
|
|
timerIdSuccess,
|
|
|
|
timerIdSuccess,
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}, 3000);
|
|
|
|
}, 3000);
|
|
|
|
this.setState({
|
|
|
|
that.setState({
|
|
|
|
isRuningTest: 2,
|
|
|
|
isRuningTest: 2,
|
|
|
|
timerIdSchedule,
|
|
|
|
timerIdSchedule,
|
|
|
|
});
|
|
|
|
});
|
|
|
|
@ -1969,8 +1970,10 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
// 脸部one
|
|
|
|
// 脸部one
|
|
|
|
todoPromise = async () => {
|
|
|
|
todoPromise = async () => {
|
|
|
|
const nowFR200NursingHistory = Taro.getStorageSync("FR200NursingHistory");
|
|
|
|
const nowFR200NursingHistory = Taro.getStorageSync("FR200NursingHistory");
|
|
|
|
|
|
|
|
console.log(nowFR200NursingHistory,'nowFR200NursingHistory');
|
|
|
|
|
|
|
|
|
|
|
|
// 护理脸部
|
|
|
|
// 护理脸部
|
|
|
|
if (nowFR200NursingHistory.workMode === "face") {
|
|
|
|
if (nowFR200NursingHistory.jsonStatus.workMode === "face") {
|
|
|
|
// 把working=工作中的状态数据筛选出来
|
|
|
|
// 把working=工作中的状态数据筛选出来
|
|
|
|
let filtered = nowFR200NursingHistory.dataArray.filter(
|
|
|
|
let filtered = nowFR200NursingHistory.dataArray.filter(
|
|
|
|
(item) => item.workStatus === "working"
|
|
|
|
(item) => item.workStatus === "working"
|
|
|
|
@ -2033,23 +2036,7 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
return nursingData;
|
|
|
|
return nursingData;
|
|
|
|
} else {
|
|
|
|
}
|
|
|
|
let GearData = this.state.GearData;
|
|
|
|
|
|
|
|
// 肌肤报告
|
|
|
|
|
|
|
|
let Allnum = 0;
|
|
|
|
|
|
|
|
GearData.forEach((e) => {
|
|
|
|
|
|
|
|
Allnum = +e.forehead;
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
// 向下取整
|
|
|
|
|
|
|
|
Allnum = Math.floor(Allnum / 3);
|
|
|
|
|
|
|
|
let nursingData = {
|
|
|
|
|
|
|
|
nursingData: JSON.stringify({
|
|
|
|
|
|
|
|
Allnum,
|
|
|
|
|
|
|
|
GearData,
|
|
|
|
|
|
|
|
}),
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
return nursingData;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// 计算挡位
|
|
|
|
// 计算挡位
|
|
|
|
@ -2217,26 +2204,31 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
"headLiftingPro",
|
|
|
|
"headLiftingPro",
|
|
|
|
].includes(nursingData.workMode)
|
|
|
|
].includes(nursingData.workMode)
|
|
|
|
) {
|
|
|
|
) {
|
|
|
|
let obj = {
|
|
|
|
// let obj = {
|
|
|
|
modeName: nursingData.modeName,
|
|
|
|
// modeName: nursingData.modeName,
|
|
|
|
data: nursingData,
|
|
|
|
// data: nursingData,
|
|
|
|
};
|
|
|
|
// };
|
|
|
|
let report = true;
|
|
|
|
let report = true;
|
|
|
|
go(
|
|
|
|
go(
|
|
|
|
"/recoding/pages/face_report_one/face_report_one?id=" +
|
|
|
|
"/recoding/pages/face_report_one/face_report_one?id=" +
|
|
|
|
id +
|
|
|
|
id +
|
|
|
|
"&report=" +
|
|
|
|
"&report=" +
|
|
|
|
report +
|
|
|
|
report
|
|
|
|
"&obj=" +
|
|
|
|
|
|
|
|
JSON.stringify(obj)
|
|
|
|
|
|
|
|
);
|
|
|
|
);
|
|
|
|
} else if ("moistureTest" === nursingData.workMode) {
|
|
|
|
} else if ("moistureTest" === nursingData.workMode) {
|
|
|
|
console.log("水分测试");
|
|
|
|
console.log("水分测试");
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
|
|
|
|
let report = true;
|
|
|
|
go(
|
|
|
|
go(
|
|
|
|
"/recording/pages/face_report/face_report?id=" +
|
|
|
|
"/recoding/pages/face_report/face_report?id=" +
|
|
|
|
this.state.currentDevice.id
|
|
|
|
this.state.currentDevice.id+
|
|
|
|
|
|
|
|
"&report=" +
|
|
|
|
|
|
|
|
report
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|
|
|
|
// go(
|
|
|
|
|
|
|
|
// "/recoding/pages/face_report/face_report?id=" +
|
|
|
|
|
|
|
|
// this.state.currentDevice.id
|
|
|
|
|
|
|
|
// );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|