|
|
|
|
@ -290,9 +290,9 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
this.getInstrumentClockSummary();
|
|
|
|
|
this.getInstrumentClockDetail();
|
|
|
|
|
}
|
|
|
|
|
componentDidMount() {}
|
|
|
|
|
componentDidMount() { }
|
|
|
|
|
|
|
|
|
|
componentWillUnmount() {}
|
|
|
|
|
componentWillUnmount() { }
|
|
|
|
|
|
|
|
|
|
componentDidShow() {
|
|
|
|
|
console.log("页面显示了");
|
|
|
|
|
@ -660,7 +660,7 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
});
|
|
|
|
|
// return;
|
|
|
|
|
let { currentDevice, ActiveModeItem } = this.state;
|
|
|
|
|
let params:any = {};
|
|
|
|
|
let params: any = {};
|
|
|
|
|
|
|
|
|
|
params = {
|
|
|
|
|
instrumentId: currentDevice.id,
|
|
|
|
|
@ -679,7 +679,7 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
params
|
|
|
|
|
)
|
|
|
|
|
);
|
|
|
|
|
setTimeout(async() => {
|
|
|
|
|
setTimeout(async () => {
|
|
|
|
|
this.setState({
|
|
|
|
|
isShowNursingSuccess: false,
|
|
|
|
|
});
|
|
|
|
|
@ -690,11 +690,53 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
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}`);
|
|
|
|
|
this.moistureTest(params.nursingData, formattedDate, ActiveModeItem.id, currentDevice.id)
|
|
|
|
|
}, 2000);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
async moistureTest(nursingData, formattedDate, ActiveModeItemId, currentDeviceId) {
|
|
|
|
|
let data = {
|
|
|
|
|
queryDate: formattedDate,
|
|
|
|
|
instrumentId: currentDeviceId
|
|
|
|
|
}
|
|
|
|
|
let res = await InstrumentInfo.fr200.moistureTest(data);
|
|
|
|
|
let echartsData = res.data.rows
|
|
|
|
|
for (let i = 0; i < echartsData.length; i++) {
|
|
|
|
|
for (let j = i + 1; j < echartsData.length; j++) {
|
|
|
|
|
if (echartsData[i].createTime.split(' ')[0] == echartsData[j].createTime.split(' ')[0]) {
|
|
|
|
|
let result = Date.parse(echartsData[i].createTime) - Date.parse(echartsData[j].createTime)
|
|
|
|
|
if (result < 0) {
|
|
|
|
|
echartsData.splice(i, 1)
|
|
|
|
|
} else {
|
|
|
|
|
echartsData.splice(j, 1)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
let gears: any = []
|
|
|
|
|
let eDate: any = []
|
|
|
|
|
echartsData.map(item => {
|
|
|
|
|
const result = item.createTime.split(' ')[0].substring(5);
|
|
|
|
|
eDate.push(result)
|
|
|
|
|
item.nursingData = JSON.parse(item.nursingData)
|
|
|
|
|
let level: any = 0
|
|
|
|
|
item.nursingData.GearData.map(gear => {
|
|
|
|
|
level = level + gear.forehead
|
|
|
|
|
})
|
|
|
|
|
level = Math.floor(level / 3)
|
|
|
|
|
gears.push(level)
|
|
|
|
|
})
|
|
|
|
|
echartsData = {
|
|
|
|
|
gears, eDate
|
|
|
|
|
}
|
|
|
|
|
setStorageSync('moistureEachtsData', JSON.stringify(echartsData))
|
|
|
|
|
|
|
|
|
|
// go(`/recoding/pages/moisture_test_report/moisture_test_report?data=${allData.nursingData}&date=${allData.createTime}&modeId=${allData.modeId}&id=${allData.instrumentId}&echartsData=${JSON.stringify(echartsData)}`);
|
|
|
|
|
go(`/recoding/pages/moisture_test_report/moisture_test_report?data=${nursingData}&date=${formattedDate}&modeId=${ActiveModeItemId}&id=${currentDeviceId}&echartsData=${JSON.stringify(echartsData)}`);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @name 不可切换光照提示
|
|
|
|
|
* @description 检测紧贴肌肤
|
|
|
|
|
@ -720,10 +762,10 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
}
|
|
|
|
|
}, 1000);
|
|
|
|
|
}
|
|
|
|
|
updata() {}
|
|
|
|
|
updata() { }
|
|
|
|
|
|
|
|
|
|
// 绘制能量图
|
|
|
|
|
drawProwerPicture() {}
|
|
|
|
|
drawProwerPicture() { }
|
|
|
|
|
|
|
|
|
|
/** 切换光照 */
|
|
|
|
|
onSwitchChange = async () => {
|
|
|
|
|
@ -1313,7 +1355,7 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
* @description 步骤+1并设置视频
|
|
|
|
|
*/
|
|
|
|
|
waterTestNext(index) {
|
|
|
|
|
let ActiveModeItem =this.state.ActiveModeItem
|
|
|
|
|
let ActiveModeItem = this.state.ActiveModeItem
|
|
|
|
|
if (index === 0 && ActiveModeItem.stepOneVideo) {
|
|
|
|
|
this.VideoSrcLoad(ActiveModeItem.stepOneVideo);
|
|
|
|
|
} else if (index === 1 && ActiveModeItem.stepTwoVideo) {
|
|
|
|
|
@ -1563,7 +1605,7 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
// 水分测试需要特殊处理
|
|
|
|
|
// 水分测试准备 水分测试工作 水分测试启动
|
|
|
|
|
if (ActiveModeItem.modeType === "moistureTest") {
|
|
|
|
|
let that =this
|
|
|
|
|
let that = this
|
|
|
|
|
sendParams.testStatus = "standby"; // 切换为准备
|
|
|
|
|
let waterStepList = this.state.waterStepList;
|
|
|
|
|
let waterStepIndex = this.state.waterStepIndex;
|
|
|
|
|
@ -1970,7 +2012,7 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
// 脸部one
|
|
|
|
|
todoPromise = async () => {
|
|
|
|
|
const nowFR200NursingHistory = Taro.getStorageSync("FR200NursingHistory");
|
|
|
|
|
console.log(nowFR200NursingHistory,'nowFR200NursingHistory');
|
|
|
|
|
console.log(nowFR200NursingHistory, 'nowFR200NursingHistory');
|
|
|
|
|
|
|
|
|
|
// 护理脸部
|
|
|
|
|
if (nowFR200NursingHistory.jsonStatus.workMode === "face") {
|
|
|
|
|
@ -2221,7 +2263,7 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
let report = true;
|
|
|
|
|
go(
|
|
|
|
|
"/recoding/pages/face_report/face_report?id=" +
|
|
|
|
|
this.state.currentDevice.id+
|
|
|
|
|
this.state.currentDevice.id +
|
|
|
|
|
"&report=" +
|
|
|
|
|
report
|
|
|
|
|
);
|
|
|
|
|
@ -2540,9 +2582,9 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
deviceInfo={currentDevice}
|
|
|
|
|
close={this.connectionClose}
|
|
|
|
|
isDisconnect={!isConnectionBlutoot}
|
|
|
|
|
offlineChange={() => {}}
|
|
|
|
|
offlineChange={() => { }}
|
|
|
|
|
pairingChange={this.pairingChange}
|
|
|
|
|
upgradeFun={() => {}}
|
|
|
|
|
upgradeFun={() => { }}
|
|
|
|
|
/>
|
|
|
|
|
)}
|
|
|
|
|
|
|
|
|
|
|