blak-kong 2 years ago
parent ffb4910983
commit fe8fc9fd82

@ -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, "查看工作状态");
// 水分测试需要特殊处理
// 水分测试准备 水分测试工作 水分测试启动

@ -31,7 +31,6 @@ function Index({
let PermeationList = ModeList.filter((item) => item.modeClass === 3); // 专研促渗
let SensitiveList = ModeList.filter((item) => item.modeClass === 4); // 敏感期护理
let IntelligenceList = ModeList.filter((item) => item.modeClass === 5); // 智能测肤
console.log(activeModeID, "查看id", BaseList, ModeList);
const onItemClick = (item) => {
if (item.lock) {
onModeLockOpen(); // 点击了锁定模式

Loading…
Cancel
Save