|
|
|
|
@ -290,9 +290,9 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
this.getInstrumentClockSummary();
|
|
|
|
|
this.getInstrumentClockDetail();
|
|
|
|
|
}
|
|
|
|
|
componentDidMount() { }
|
|
|
|
|
componentDidMount() {}
|
|
|
|
|
|
|
|
|
|
componentWillUnmount() { }
|
|
|
|
|
componentWillUnmount() {}
|
|
|
|
|
|
|
|
|
|
componentDidShow() {
|
|
|
|
|
console.log("页面显示了");
|
|
|
|
|
@ -684,72 +684,78 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
let date = new Date();
|
|
|
|
|
|
|
|
|
|
let year = date.getFullYear();
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
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}`
|
|
|
|
|
this.moistureTest(
|
|
|
|
|
params.nursingData,
|
|
|
|
|
formattedDate,
|
|
|
|
|
ActiveModeItem.id,
|
|
|
|
|
currentDevice.id
|
|
|
|
|
);
|
|
|
|
|
=======
|
|
|
|
|
let month = (date.getMonth() + 1).toString().padStart(2, '0');
|
|
|
|
|
let day = date.getDate().toString().padStart(2, '0');
|
|
|
|
|
|
|
|
|
|
let formattedDate = `${year}.${month}.${day}`;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.moistureTest(params.nursingData, formattedDate, ActiveModeItem.id, currentDevice.id)
|
|
|
|
|
>>>>>>> 4c77ad357cabdbdc964386fcd5d889fe5cc5caca
|
|
|
|
|
}, 2000);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
async moistureTest(nursingData, formattedDate, ActiveModeItemId, currentDeviceId) {
|
|
|
|
|
async moistureTest(
|
|
|
|
|
nursingData,
|
|
|
|
|
formattedDate,
|
|
|
|
|
ActiveModeItemId,
|
|
|
|
|
currentDeviceId
|
|
|
|
|
) {
|
|
|
|
|
let data = {
|
|
|
|
|
queryDate: formattedDate,
|
|
|
|
|
instrumentId: currentDeviceId
|
|
|
|
|
}
|
|
|
|
|
instrumentId: currentDeviceId,
|
|
|
|
|
};
|
|
|
|
|
let res = await InstrumentInfo.fr200.moistureTest(data);
|
|
|
|
|
let echartsData = res.data.rows
|
|
|
|
|
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 (
|
|
|
|
|
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)
|
|
|
|
|
echartsData.splice(i, 1);
|
|
|
|
|
} else {
|
|
|
|
|
echartsData.splice(j, 1)
|
|
|
|
|
echartsData.splice(j, 1);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
let gears: any = []
|
|
|
|
|
let eDate: any = []
|
|
|
|
|
echartsData?.map(item => {
|
|
|
|
|
console.log(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)
|
|
|
|
|
})
|
|
|
|
|
let gears: any = [];
|
|
|
|
|
let eDate: any = [];
|
|
|
|
|
echartsData?.map((item) => {
|
|
|
|
|
console.log(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))
|
|
|
|
|
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)}`);
|
|
|
|
|
|
|
|
|
|
go(
|
|
|
|
|
`/recoding/pages/moisture_test_report/moisture_test_report?data=${nursingData}&date=${formattedDate}&modeId=${ActiveModeItemId}&id=${currentDeviceId}&echartsData=${JSON.stringify(
|
|
|
|
|
echartsData
|
|
|
|
|
)}`
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @name 不可切换光照提示
|
|
|
|
|
* @description 检测紧贴肌肤
|
|
|
|
|
@ -775,10 +781,10 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
}
|
|
|
|
|
}, 1000);
|
|
|
|
|
}
|
|
|
|
|
updata() { }
|
|
|
|
|
updata() {}
|
|
|
|
|
|
|
|
|
|
// 绘制能量图
|
|
|
|
|
drawProwerPicture() { }
|
|
|
|
|
drawProwerPicture() {}
|
|
|
|
|
|
|
|
|
|
/** 切换光照 */
|
|
|
|
|
onSwitchChange = async () => {
|
|
|
|
|
@ -1368,11 +1374,7 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
* @description 步骤+1并设置视频
|
|
|
|
|
*/
|
|
|
|
|
waterTestNext(index) {
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
let ActiveModeItem = this.state.ActiveModeItem;
|
|
|
|
|
=======
|
|
|
|
|
let ActiveModeItem = this.state.ActiveModeItem
|
|
|
|
|
>>>>>>> 4c77ad357cabdbdc964386fcd5d889fe5cc5caca
|
|
|
|
|
if (index === 0 && ActiveModeItem.stepOneVideo) {
|
|
|
|
|
this.VideoSrcLoad(ActiveModeItem.stepOneVideo);
|
|
|
|
|
} else if (index === 1 && ActiveModeItem.stepTwoVideo) {
|
|
|
|
|
@ -1622,11 +1624,7 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
// 水分测试需要特殊处理
|
|
|
|
|
// 水分测试准备 水分测试工作 水分测试启动
|
|
|
|
|
if (ActiveModeItem.modeType === "moistureTest") {
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
let that = this;
|
|
|
|
|
=======
|
|
|
|
|
let that = this
|
|
|
|
|
>>>>>>> 4c77ad357cabdbdc964386fcd5d889fe5cc5caca
|
|
|
|
|
sendParams.testStatus = "standby"; // 切换为准备
|
|
|
|
|
let waterStepList = this.state.waterStepList;
|
|
|
|
|
let waterStepIndex = this.state.waterStepIndex;
|
|
|
|
|
@ -2033,20 +2031,18 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
// 脸部one
|
|
|
|
|
todoPromise = async () => {
|
|
|
|
|
const nowFR200NursingHistory = Taro.getStorageSync("FR200NursingHistory");
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
console.log(nowFR200NursingHistory, "nowFR200NursingHistory");
|
|
|
|
|
=======
|
|
|
|
|
console.log(nowFR200NursingHistory, 'nowFR200NursingHistory');
|
|
|
|
|
>>>>>>> 4c77ad357cabdbdc964386fcd5d889fe5cc5caca
|
|
|
|
|
|
|
|
|
|
// 护理脸部
|
|
|
|
|
if ([
|
|
|
|
|
"face",
|
|
|
|
|
"eyes",
|
|
|
|
|
"nasolabialFold",
|
|
|
|
|
"mandibularLine",
|
|
|
|
|
"headLiftingPro",
|
|
|
|
|
].includes(nowFR200NursingHistory.jsonStatus.workMode)) {
|
|
|
|
|
if (
|
|
|
|
|
[
|
|
|
|
|
"face",
|
|
|
|
|
"eyes",
|
|
|
|
|
"nasolabialFold",
|
|
|
|
|
"mandibularLine",
|
|
|
|
|
"headLiftingPro",
|
|
|
|
|
].includes(nowFR200NursingHistory.jsonStatus.workMode)
|
|
|
|
|
) {
|
|
|
|
|
// 把working=工作中的状态数据筛选出来
|
|
|
|
|
let filtered = nowFR200NursingHistory.dataArray.filter(
|
|
|
|
|
(item) => item.workStatus === "working"
|
|
|
|
|
@ -2110,10 +2106,12 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
|
|
|
|
|
return nursingData;
|
|
|
|
|
}
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
=======
|
|
|
|
|
return { nursingData: JSON.stringify({ workMode: nowFR200NursingHistory.workMode, }),showFace:true }
|
|
|
|
|
>>>>>>> 4c77ad357cabdbdc964386fcd5d889fe5cc5caca
|
|
|
|
|
return {
|
|
|
|
|
nursingData: JSON.stringify({
|
|
|
|
|
workMode: nowFR200NursingHistory.workMode,
|
|
|
|
|
}),
|
|
|
|
|
showFace: true,
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// 计算挡位
|
|
|
|
|
@ -2151,7 +2149,6 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
}
|
|
|
|
|
let res1: any = await this.todoPromise();
|
|
|
|
|
if (!res1?.showFace) {
|
|
|
|
|
|
|
|
|
|
params = { ...params, ...res1 };
|
|
|
|
|
}
|
|
|
|
|
console.log(res1, "查看返回数据");
|
|
|
|
|
@ -2176,7 +2173,12 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
isShowNursingSuccess: false,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
this.goFaceReport(res1, ActiveModeItem.id, res2.data.data, currentDevice.id); // 跳转
|
|
|
|
|
this.goFaceReport(
|
|
|
|
|
res1,
|
|
|
|
|
ActiveModeItem.id,
|
|
|
|
|
res2.data.data,
|
|
|
|
|
currentDevice.id
|
|
|
|
|
); // 跳转
|
|
|
|
|
}, 2000);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@ -2285,51 +2287,40 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
"headLiftingPro",
|
|
|
|
|
].includes(nursingData.workMode)
|
|
|
|
|
) {
|
|
|
|
|
let ids = Number(deviceid)
|
|
|
|
|
let ids = Number(deviceid);
|
|
|
|
|
// 获取echarts数据 这个是获取接口更新echarts页面
|
|
|
|
|
let res2 = await InstrumentInfo.apiNursingLog.getStatiCDE(ids);
|
|
|
|
|
|
|
|
|
|
let nursingDatas = JSON.parse(res2.data.data.nursingData)
|
|
|
|
|
let nursingDatas = JSON.parse(res2.data.data.nursingData);
|
|
|
|
|
let obj = {
|
|
|
|
|
modeName: res2.data.data.modeName,
|
|
|
|
|
data: nursingDatas
|
|
|
|
|
}
|
|
|
|
|
data: nursingDatas,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
let report = true;
|
|
|
|
|
go(
|
|
|
|
|
"/recoding/pages/face_report_one/face_report_one?id=" +
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
id +
|
|
|
|
|
ids +
|
|
|
|
|
"&report=" +
|
|
|
|
|
report
|
|
|
|
|
=======
|
|
|
|
|
ids +
|
|
|
|
|
"&report=" +
|
|
|
|
|
report + "&obj=" +
|
|
|
|
|
JSON.stringify(obj)
|
|
|
|
|
>>>>>>> 4c77ad357cabdbdc964386fcd5d889fe5cc5caca
|
|
|
|
|
report +
|
|
|
|
|
"&obj=" +
|
|
|
|
|
JSON.stringify(obj)
|
|
|
|
|
);
|
|
|
|
|
} else if ("moistureTest" === nursingData.workMode) {
|
|
|
|
|
console.log("水分测试");
|
|
|
|
|
} else {
|
|
|
|
|
console.log('跳转11111111');
|
|
|
|
|
console.log("跳转11111111");
|
|
|
|
|
|
|
|
|
|
let report = true;
|
|
|
|
|
|
|
|
|
|
go(
|
|
|
|
|
"/recoding/pages/face_report/face_report?id=" +
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
this.state.currentDevice.id +
|
|
|
|
|
deviceid +
|
|
|
|
|
"&recordId=" +
|
|
|
|
|
currentDevice +
|
|
|
|
|
"&report=" +
|
|
|
|
|
report
|
|
|
|
|
=======
|
|
|
|
|
deviceid +
|
|
|
|
|
"&recordId=" + currentDevice +
|
|
|
|
|
"&report=" +
|
|
|
|
|
report
|
|
|
|
|
>>>>>>> 4c77ad357cabdbdc964386fcd5d889fe5cc5caca
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
@ -2640,9 +2631,9 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
deviceInfo={currentDevice}
|
|
|
|
|
close={this.connectionClose}
|
|
|
|
|
isDisconnect={!isConnectionBlutoot}
|
|
|
|
|
offlineChange={() => { }}
|
|
|
|
|
offlineChange={() => {}}
|
|
|
|
|
pairingChange={this.pairingChange}
|
|
|
|
|
upgradeFun={() => { }}
|
|
|
|
|
upgradeFun={() => {}}
|
|
|
|
|
/>
|
|
|
|
|
)}
|
|
|
|
|
|
|
|
|
|
@ -2725,12 +2716,12 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
|
|
|
|
|
{(ActiveModeItem.modeType === "maskPenetration" ||
|
|
|
|
|
ActiveModeItem.modeType === "essence") && (
|
|
|
|
|
<Gears
|
|
|
|
|
onEmitMinus={this.handleMinus}
|
|
|
|
|
onEmitAdd={this.handleAdd}
|
|
|
|
|
GearData={GearData}
|
|
|
|
|
></Gears>
|
|
|
|
|
)}
|
|
|
|
|
<Gears
|
|
|
|
|
onEmitMinus={this.handleMinus}
|
|
|
|
|
onEmitAdd={this.handleAdd}
|
|
|
|
|
GearData={GearData}
|
|
|
|
|
></Gears>
|
|
|
|
|
)}
|
|
|
|
|
|
|
|
|
|
{ActiveModeItem.modeType === "moistureTest" && (
|
|
|
|
|
<WaterTest
|
|
|
|
|
|