|
|
|
|
@ -789,8 +789,14 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
|
|
|
|
|
/** 切换光照 */
|
|
|
|
|
onSwitchChange = async () => {
|
|
|
|
|
// todo
|
|
|
|
|
let { isStopNurse } = this.state;
|
|
|
|
|
let { isStopNurse, ActiveModeItem } = this.state;
|
|
|
|
|
|
|
|
|
|
console.log("切换光照,", ActiveModeItem);
|
|
|
|
|
if (ActiveModeItem.modeType === "led") {
|
|
|
|
|
this.onSwitchChangeLED();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (isStopNurse) {
|
|
|
|
|
// 开始光照逻辑
|
|
|
|
|
this.onNursingTap();
|
|
|
|
|
@ -804,6 +810,37 @@ class IotCarePlanFR200 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 每次进入设备运行页,打开首个模式的介绍弹窗
|
|
|
|
|
@ -1642,7 +1679,6 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
workMode: ActiveModeItem.modeType, // 使用模式
|
|
|
|
|
workStatus: newWorkStatus,
|
|
|
|
|
};
|
|
|
|
|
console.log(ActiveModeItem, "查看工作状态");
|
|
|
|
|
|
|
|
|
|
// 水分测试需要特殊处理
|
|
|
|
|
// 水分测试准备 水分测试工作 水分测试启动
|
|
|
|
|
|