|
|
|
|
@ -738,107 +738,6 @@ class IotCarePlanWE200 extends Component<any, any> {
|
|
|
|
|
// 如果检查失败,则报错
|
|
|
|
|
this.onEmitErrorTips();
|
|
|
|
|
};
|
|
|
|
|
/** 完成护理,跳转到水分 */
|
|
|
|
|
onsuccess = async () => {
|
|
|
|
|
let waterStepList = this.state.waterStepList;
|
|
|
|
|
this.setState({
|
|
|
|
|
isShowNursingSuccess: true,
|
|
|
|
|
});
|
|
|
|
|
// return;
|
|
|
|
|
let { currentDevice, ActiveModeItem } = this.state;
|
|
|
|
|
let params: any = {};
|
|
|
|
|
|
|
|
|
|
params = {
|
|
|
|
|
instrumentId: currentDevice.id,
|
|
|
|
|
instrumentName: currentDevice.name,
|
|
|
|
|
modeId: ActiveModeItem.id,
|
|
|
|
|
modeName: ActiveModeItem.modeName,
|
|
|
|
|
nursingTime: s_to_hms(this.elapsedTime),
|
|
|
|
|
nursingData: JSON.stringify({
|
|
|
|
|
GearData: [...waterStepList],
|
|
|
|
|
}),
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// params = { ...params, ...nursingData };
|
|
|
|
|
let res: any = await InstrumentInfo.apiNursingLog.addLog(
|
|
|
|
|
JSON.stringify(params)
|
|
|
|
|
);
|
|
|
|
|
setTimeout(async () => {
|
|
|
|
|
this.setState({
|
|
|
|
|
isShowNursingSuccess: false,
|
|
|
|
|
});
|
|
|
|
|
let date = new Date();
|
|
|
|
|
|
|
|
|
|
let year = date.getFullYear();
|
|
|
|
|
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
|
|
|
|
|
);
|
|
|
|
|
}, 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));
|
|
|
|
|
let report = true;
|
|
|
|
|
// 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
|
|
|
|
|
)}&report=${report}`
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @name 不可切换光照提示
|
|
|
|
|
@ -852,41 +751,6 @@ class IotCarePlanWE200 extends Component<any, any> {
|
|
|
|
|
this.showTips("检测到您的设备没有紧贴肌肤,请紧贴肌肤后重新尝试");
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
updata() {
|
|
|
|
|
let that = this;
|
|
|
|
|
let stop = 0;
|
|
|
|
|
let time = setInterval(function () {
|
|
|
|
|
stop++;
|
|
|
|
|
let series = JSON.parse(JSON.stringify(that.state.series));
|
|
|
|
|
let num = Math.floor(Math.random() * 9);
|
|
|
|
|
let count = 0;
|
|
|
|
|
series.map((item) => {
|
|
|
|
|
if (item.type === "line") {
|
|
|
|
|
item.data.splice(0, 1);
|
|
|
|
|
item.data.push(num);
|
|
|
|
|
}
|
|
|
|
|
if (item.type === "bar") {
|
|
|
|
|
count++;
|
|
|
|
|
item.data.splice(0, 1);
|
|
|
|
|
if (count <= num) {
|
|
|
|
|
item.data.push(1);
|
|
|
|
|
} else {
|
|
|
|
|
item.data.push(0);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// 更新图表数据
|
|
|
|
|
that.setState({ series });
|
|
|
|
|
if (stop >= 20) {
|
|
|
|
|
clearInterval(time);
|
|
|
|
|
}
|
|
|
|
|
}, 1000);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
full() {
|
|
|
|
|
this.setState({ isFullScreen: !this.state.isFullScreen });
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** 切换光照 */
|
|
|
|
|
onSwitchChange = async () => {
|
|
|
|
|
@ -911,37 +775,6 @@ class IotCarePlanWE200 extends Component<any, any> {
|
|
|
|
|
isStopNurse: !isStopNurse,
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
/** LED切换模式 */
|
|
|
|
|
onSwitchChangeLED = () => {
|
|
|
|
|
let { isStopNurse } = this.state;
|
|
|
|
|
if (isStopNurse) {
|
|
|
|
|
// 开始光照逻辑
|
|
|
|
|
this.onNursingTap();
|
|
|
|
|
this.switchVideoPlay(); // 开始
|
|
|
|
|
} else {
|
|
|
|
|
// 暂停光照逻辑
|
|
|
|
|
let sendParams: any = {
|
|
|
|
|
...deviceCommandSamples.pause,
|
|
|
|
|
workMode: "led", // 使用模式
|
|
|
|
|
workStatus: "standby",
|
|
|
|
|
};
|
|
|
|
|
const pauseArrayBuffer = deviceToolKitInstance.toBleCommand(
|
|
|
|
|
sendParams as any
|
|
|
|
|
);
|
|
|
|
|
sendCommand({
|
|
|
|
|
value: pauseArrayBuffer,
|
|
|
|
|
}).then(() => {
|
|
|
|
|
this.workStatus = "pause";
|
|
|
|
|
this.resetTimer();
|
|
|
|
|
console.info(`发送暂停指令成功 参数为 =>`, sendParams);
|
|
|
|
|
});
|
|
|
|
|
// this.handleWorkStatus(false, MODE_WORKING_ENUM.PAUSE);
|
|
|
|
|
this.switchVideoPause(); // 暂停
|
|
|
|
|
}
|
|
|
|
|
this.setState({
|
|
|
|
|
isStopNurse: !isStopNurse,
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @name 每次进入设备运行页,打开首个模式的介绍弹窗
|
|
|
|
|
@ -1235,265 +1068,11 @@ class IotCarePlanWE200 extends Component<any, any> {
|
|
|
|
|
}, 1000);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @name 水分测试下一步,手动调用
|
|
|
|
|
* @description 步骤+1并设置视频
|
|
|
|
|
*/
|
|
|
|
|
waterTestNext(index) {
|
|
|
|
|
let ActiveModeItem = this.state.ActiveModeItem;
|
|
|
|
|
if (index === 0 && ActiveModeItem.stepOneVideo) {
|
|
|
|
|
this.VideoSrcLoad(ActiveModeItem.stepOneVideo);
|
|
|
|
|
} else if (index === 1 && ActiveModeItem.stepTwoVideo) {
|
|
|
|
|
this.VideoSrcLoad(ActiveModeItem.stepTwoVideo);
|
|
|
|
|
} else if (index === 2 && ActiveModeItem.stepThreeVideo) {
|
|
|
|
|
this.VideoSrcLoad(ActiveModeItem.stepThreeVideo);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @name 面膜促渗下一步,根据时间自动调用
|
|
|
|
|
* @description 1.切换步骤 2.检测记录蜂鸣/震动的时间节点与步骤
|
|
|
|
|
* */
|
|
|
|
|
maskPenetrationNext() {
|
|
|
|
|
let {
|
|
|
|
|
MaskModeStepIndex,
|
|
|
|
|
MaskModeBuzzingIndex,
|
|
|
|
|
MaskModeVibrateIndex,
|
|
|
|
|
ActiveModeItem,
|
|
|
|
|
} = this.state;
|
|
|
|
|
|
|
|
|
|
// 模式多个步骤节点切换
|
|
|
|
|
// 已运行时间达到下一节点时,切换
|
|
|
|
|
let GearLength = ActiveModeItem.modeGear.length;
|
|
|
|
|
if (GearLength && MaskModeStepIndex < GearLength) {
|
|
|
|
|
let GearTime = minSecToS(ActiveModeItem.modeGear[MaskModeStepIndex].time);
|
|
|
|
|
if (this.elapsedTime > GearTime) {
|
|
|
|
|
// 已运行时间达到下一节点,且存在下一节点,步骤切换时更新
|
|
|
|
|
if (MaskModeStepIndex < GearLength) {
|
|
|
|
|
let index = MaskModeStepIndex + 1; // 提前步骤+1
|
|
|
|
|
this.setState({
|
|
|
|
|
MaskModeStepIndex: index,
|
|
|
|
|
});
|
|
|
|
|
this.FR200AutoChangeGear(index);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let BuzzingLength = ActiveModeItem.modeBuzzing.length;
|
|
|
|
|
if (BuzzingLength && MaskModeStepIndex < GearLength) {
|
|
|
|
|
let BuzzingTime = minSecToS(
|
|
|
|
|
ActiveModeItem.modeBuzzing[MaskModeStepIndex].time
|
|
|
|
|
);
|
|
|
|
|
if (this.elapsedTime > BuzzingTime) {
|
|
|
|
|
if (MaskModeBuzzingIndex < BuzzingLength) {
|
|
|
|
|
let index = MaskModeBuzzingIndex + 1; // 提前步骤+1
|
|
|
|
|
this.setState({
|
|
|
|
|
MaskModeBuzzingIndex: index,
|
|
|
|
|
});
|
|
|
|
|
this.FR200Buzzing();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let VibrateLength = ActiveModeItem.modeVibrate.length;
|
|
|
|
|
if (VibrateLength && MaskModeStepIndex < VibrateLength) {
|
|
|
|
|
let VibrateTime = minSecToS(
|
|
|
|
|
ActiveModeItem.modeVibrate[MaskModeStepIndex].time
|
|
|
|
|
);
|
|
|
|
|
if (this.elapsedTime > VibrateTime) {
|
|
|
|
|
if (MaskModeVibrateIndex < VibrateLength) {
|
|
|
|
|
let index = MaskModeVibrateIndex + 1; // 提前步骤+1
|
|
|
|
|
this.setState({
|
|
|
|
|
MaskModeVibrateIndex: index,
|
|
|
|
|
});
|
|
|
|
|
this.FR200Vibrate();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** @name 精华促渗下一步,根据时间自动调用 */
|
|
|
|
|
essencePenetrationNext() {
|
|
|
|
|
let {
|
|
|
|
|
EssenceStepIndex,
|
|
|
|
|
EssenceBuzzingIndex,
|
|
|
|
|
EssenceVibrateIndex,
|
|
|
|
|
ActiveModeItem,
|
|
|
|
|
} = this.state;
|
|
|
|
|
|
|
|
|
|
// 模式多个步骤节点切换
|
|
|
|
|
// 已运行时间达到下一节点时,切换
|
|
|
|
|
let GearLength = ActiveModeItem.modeGear.length;
|
|
|
|
|
if (GearLength && EssenceBuzzingIndex < GearLength) {
|
|
|
|
|
let GearTime = minSecToS(
|
|
|
|
|
ActiveModeItem.modeGear[EssenceBuzzingIndex].time
|
|
|
|
|
);
|
|
|
|
|
if (this.elapsedTime > GearTime) {
|
|
|
|
|
// 已运行时间达到下一节点,且存在下一节点,步骤切换时更新
|
|
|
|
|
if (EssenceStepIndex < GearLength) {
|
|
|
|
|
let index = EssenceStepIndex + 1; // 提前步骤+1
|
|
|
|
|
this.setState({
|
|
|
|
|
EssenceStepIndex: index,
|
|
|
|
|
});
|
|
|
|
|
this.FR200AutoChangeGear(index);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let BuzzingLength = ActiveModeItem.modeBuzzing.length;
|
|
|
|
|
if (BuzzingLength && EssenceBuzzingIndex < BuzzingLength) {
|
|
|
|
|
let BuzzingTime = minSecToS(
|
|
|
|
|
ActiveModeItem.modeBuzzing[EssenceBuzzingIndex].time
|
|
|
|
|
);
|
|
|
|
|
if (this.elapsedTime > BuzzingTime) {
|
|
|
|
|
if (EssenceBuzzingIndex < BuzzingLength) {
|
|
|
|
|
let index = EssenceBuzzingIndex + 1; // 提前步骤+1
|
|
|
|
|
this.setState({
|
|
|
|
|
EssenceBuzzingIndex: index,
|
|
|
|
|
});
|
|
|
|
|
this.FR200Buzzing();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let VibrateLength = ActiveModeItem.modeVibrate.length;
|
|
|
|
|
if (VibrateLength && EssenceBuzzingIndex < VibrateLength) {
|
|
|
|
|
let VibrateTime = minSecToS(
|
|
|
|
|
ActiveModeItem.modeBuzzing[EssenceBuzzingIndex].time
|
|
|
|
|
);
|
|
|
|
|
if (this.elapsedTime > VibrateTime) {
|
|
|
|
|
if (EssenceVibrateIndex < VibrateLength) {
|
|
|
|
|
let index = EssenceVibrateIndex + 1; // 提前步骤+1
|
|
|
|
|
this.setState({
|
|
|
|
|
EssenceVibrateIndex: index,
|
|
|
|
|
});
|
|
|
|
|
this.FR200Vibrate();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**切换挡位发起蜂鸣:可以切换到现在的挡位?*/
|
|
|
|
|
FR200Buzzing = () => {
|
|
|
|
|
console.log("FR200Buzzing 蜂鸣", this.elapsedTime);
|
|
|
|
|
const { ActiveModeItem, currentGear } = this.state;
|
|
|
|
|
let sendParams: any = {
|
|
|
|
|
...deviceCommandSamples.pause,
|
|
|
|
|
workMode: ActiveModeItem.modeType, // 使用模式
|
|
|
|
|
workStatus: "working",
|
|
|
|
|
gear: currentGear,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
if (currentGear > 1) {
|
|
|
|
|
sendParams.gear = currentGear - 1;
|
|
|
|
|
let pauseArrayBuffer = deviceToolKitInstance.toBleCommand(
|
|
|
|
|
sendParams as any
|
|
|
|
|
);
|
|
|
|
|
sendCommand({
|
|
|
|
|
value: pauseArrayBuffer,
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
sendParams.gear = currentGear + 1;
|
|
|
|
|
let pauseArrayBuffer = deviceToolKitInstance.toBleCommand(
|
|
|
|
|
sendParams as any
|
|
|
|
|
);
|
|
|
|
|
sendCommand({
|
|
|
|
|
value: pauseArrayBuffer,
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
sendParams.gear = currentGear;
|
|
|
|
|
let pauseArrayBuffer = deviceToolKitInstance.toBleCommand(
|
|
|
|
|
sendParams as any
|
|
|
|
|
);
|
|
|
|
|
sendCommand({
|
|
|
|
|
value: pauseArrayBuffer,
|
|
|
|
|
});
|
|
|
|
|
}, 300);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @name FR200自动切换挡位
|
|
|
|
|
* @description 需要传参索引
|
|
|
|
|
*/
|
|
|
|
|
FR200AutoChangeGear = (index: number = 0) => {
|
|
|
|
|
console.log("FR200AutoChangeGear 切换挡位", this.elapsedTime);
|
|
|
|
|
const { ActiveModeItem, GearData } = this.state;
|
|
|
|
|
let gear = GearData[index].forehead;
|
|
|
|
|
|
|
|
|
|
// 同步挡位
|
|
|
|
|
this.setState({
|
|
|
|
|
currentGear: gear,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
let sendParams: any = {
|
|
|
|
|
...deviceCommandSamples.pause,
|
|
|
|
|
workMode: ActiveModeItem.modeType, // 使用模式
|
|
|
|
|
workStatus: "working",
|
|
|
|
|
gear: gear,
|
|
|
|
|
};
|
|
|
|
|
const pauseArrayBuffer = deviceToolKitInstance.toBleCommand(
|
|
|
|
|
sendParams as any
|
|
|
|
|
);
|
|
|
|
|
sendCommand({
|
|
|
|
|
value: pauseArrayBuffer,
|
|
|
|
|
}).then(() => {
|
|
|
|
|
this.workStatus = "working";
|
|
|
|
|
this.resetTimer();
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @name FR200震动
|
|
|
|
|
* @description 同步设备工作却不改变档位,仅震动
|
|
|
|
|
*/
|
|
|
|
|
FR200Vibrate = () => {
|
|
|
|
|
console.log("FR200Vibrate FR200震动", this.elapsedTime);
|
|
|
|
|
const { ActiveModeItem, currentGear } = this.state;
|
|
|
|
|
|
|
|
|
|
let sendParams: any = {
|
|
|
|
|
...deviceCommandSamples.pause,
|
|
|
|
|
workMode: ActiveModeItem.modeType, // 使用模式
|
|
|
|
|
workStatus: "working",
|
|
|
|
|
gear: currentGear,
|
|
|
|
|
};
|
|
|
|
|
const pauseArrayBuffer = deviceToolKitInstance.toBleCommand(
|
|
|
|
|
sendParams as any
|
|
|
|
|
);
|
|
|
|
|
sendCommand({
|
|
|
|
|
value: pauseArrayBuffer,
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
executePromises = async () => {
|
|
|
|
|
let waterStepList = this.state.waterStepList;
|
|
|
|
|
let waterStepIndex = this.state.waterStepIndex;
|
|
|
|
|
let that = this;
|
|
|
|
|
await new Promise<void>((resolve) => {
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
waterStepList[waterStepIndex].schedule = 100;
|
|
|
|
|
that.setState({
|
|
|
|
|
waterStepList,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
resolve();
|
|
|
|
|
}, 3000);
|
|
|
|
|
}).then(() => {
|
|
|
|
|
return new Promise<void>((resolve) => {
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
waterStepList[waterStepIndex].finish = true;
|
|
|
|
|
that.setState({
|
|
|
|
|
waterStepList,
|
|
|
|
|
});
|
|
|
|
|
resolve();
|
|
|
|
|
}, 2000);
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// 检测并控制工作状态
|
|
|
|
|
handleWorkStatus = async (isBtnClick: boolean, workStatus) => {
|
|
|
|
|
const { DeviceConnectStatus, ActiveModeItem } = this.state;
|
|
|
|
|
|
|
|
|
|
// 如果没有指定工作状态,则切换工作状态
|
|
|
|
|
let newWorkStatus =
|
|
|
|
|
workStatus ||
|
|
|
|
|
(this.workStatus == MODE_WORKING_ENUM.WORKING ? "pause" : "working");
|
|
|
|
|
@ -1504,33 +1083,8 @@ class IotCarePlanWE200 extends Component<any, any> {
|
|
|
|
|
workStatus: newWorkStatus,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// 水分测试需要特殊处理
|
|
|
|
|
// 水分测试准备 水分测试工作 水分测试启动
|
|
|
|
|
if (ActiveModeItem.modeType === "moistureTest") {
|
|
|
|
|
let that = this;
|
|
|
|
|
sendParams.testStatus = "standby"; // 切换为准备
|
|
|
|
|
|
|
|
|
|
// 3秒定时器,逻辑3秒把进度条弄成100,再加2秒获取最后结果
|
|
|
|
|
if (isBtnClick) {
|
|
|
|
|
that.setState({
|
|
|
|
|
isRuningTest: 2,
|
|
|
|
|
});
|
|
|
|
|
this.executePromises();
|
|
|
|
|
|
|
|
|
|
sendParams.testStatus = "start"; // 点击开始再开始
|
|
|
|
|
console.log("点击开始", isBtnClick);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 面膜促渗和精华促渗
|
|
|
|
|
if (
|
|
|
|
|
ActiveModeItem.modeType === "maskPenetration" ||
|
|
|
|
|
ActiveModeItem.modeType === "essence"
|
|
|
|
|
) {
|
|
|
|
|
sendParams.gear = this.state.currentGear; // 点击开始再开始
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
console.log("准备发送自定义或工作指令", ActiveModeItem, sendParams);
|
|
|
|
|
|
|
|
|
|
const pauseArrayBuffer = deviceToolKitInstance.toBleCommand(
|
|
|
|
|
sendParams as any
|
|
|
|
|
);
|
|
|
|
|
|