|
|
|
|
@ -134,7 +134,6 @@ class IotCarePlan extends Component<any, any> {
|
|
|
|
|
modelActiveIndex: 0, //模式下标
|
|
|
|
|
sliderProgress: 22,
|
|
|
|
|
facialMaskConnectStatus: 1, // 面罩连接状态 0未连接 1已连接
|
|
|
|
|
workStatus: "", // 工作状态
|
|
|
|
|
Electricity: 4, // WL200电量
|
|
|
|
|
matrixElectricity: 4, // WE200发箍电量
|
|
|
|
|
|
|
|
|
|
@ -471,7 +470,6 @@ class IotCarePlan extends Component<any, any> {
|
|
|
|
|
ModeType: modeArray[modeClass],
|
|
|
|
|
isShowNurse: true,
|
|
|
|
|
isStopNurse: true,
|
|
|
|
|
workStatus: "pause",
|
|
|
|
|
step: 2,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
@ -837,14 +835,8 @@ class IotCarePlan extends Component<any, any> {
|
|
|
|
|
* params 工作状态 工作模式 响应状态
|
|
|
|
|
*/
|
|
|
|
|
judgementWorkStatus(nWorkStatus, nWorkMode, jsonStatus) {
|
|
|
|
|
const {
|
|
|
|
|
workStatus,
|
|
|
|
|
step,
|
|
|
|
|
isStandStatus,
|
|
|
|
|
workMode,
|
|
|
|
|
ActiveModeItem,
|
|
|
|
|
ModeList,
|
|
|
|
|
} = this.state;
|
|
|
|
|
const { step, isStandStatus, workMode, ActiveModeItem, ModeList } =
|
|
|
|
|
this.state;
|
|
|
|
|
const opts: any = {};
|
|
|
|
|
// ActiveModeItem
|
|
|
|
|
let nowModeItem;
|
|
|
|
|
@ -981,7 +973,6 @@ class IotCarePlan extends Component<any, any> {
|
|
|
|
|
currentTimeTimer && clearInterval(currentTimeTimer);
|
|
|
|
|
currentTimeTimer = setInterval(() => {
|
|
|
|
|
let {
|
|
|
|
|
workStatus,
|
|
|
|
|
step,
|
|
|
|
|
facialMaskConnectStatus,
|
|
|
|
|
currentTime,
|
|
|
|
|
@ -989,9 +980,9 @@ class IotCarePlan extends Component<any, any> {
|
|
|
|
|
ModeStepIndex,
|
|
|
|
|
ActiveModeItem,
|
|
|
|
|
} = this.state;
|
|
|
|
|
console.log("resetTimer workStatus", workStatus);
|
|
|
|
|
console.log("resetTimer workStatus", this.workStatus);
|
|
|
|
|
if (
|
|
|
|
|
workStatus == MODE_WORKING_ENUM.WORKING &&
|
|
|
|
|
this.workStatus == MODE_WORKING_ENUM.WORKING &&
|
|
|
|
|
step == 2 &&
|
|
|
|
|
facialMaskConnectStatus == 1
|
|
|
|
|
) {
|
|
|
|
|
@ -1118,12 +1109,8 @@ class IotCarePlan extends Component<any, any> {
|
|
|
|
|
});
|
|
|
|
|
}, 500);
|
|
|
|
|
|
|
|
|
|
const {
|
|
|
|
|
ActiveModeItem,
|
|
|
|
|
workStatus,
|
|
|
|
|
isStandStatus,
|
|
|
|
|
facialMaskConnectStatus,
|
|
|
|
|
} = this.state;
|
|
|
|
|
const { ActiveModeItem, isStandStatus, facialMaskConnectStatus } =
|
|
|
|
|
this.state;
|
|
|
|
|
|
|
|
|
|
if (isStandStatus === 1 && ActiveModeItem.isCabinMode === 0) {
|
|
|
|
|
console.log("已连接舱体,只可选择舱体模式");
|
|
|
|
|
@ -1139,14 +1126,14 @@ class IotCarePlan extends Component<any, any> {
|
|
|
|
|
"点击开始护理按钮",
|
|
|
|
|
`当前模式: ${ActiveModeItem.modeType}`,
|
|
|
|
|
`当前面罩状态:${facialMaskConnectStatus}`,
|
|
|
|
|
`当前仪器模式:${workStatus}`
|
|
|
|
|
`当前仪器模式:${this.workStatus}`
|
|
|
|
|
);
|
|
|
|
|
console.log(ActiveModeItem);
|
|
|
|
|
console.log("isStandStatus:" + isStandStatus);
|
|
|
|
|
console.log(
|
|
|
|
|
workStatus !== MODE_WORKING_ENUM.WORKING &&
|
|
|
|
|
workStatus !== MODE_WORKING_ENUM.STANDBY &&
|
|
|
|
|
workStatus !== MODE_WORKING_ENUM.PAUSE
|
|
|
|
|
this.workStatus !== MODE_WORKING_ENUM.WORKING &&
|
|
|
|
|
this.workStatus !== MODE_WORKING_ENUM.STANDBY &&
|
|
|
|
|
this.workStatus !== MODE_WORKING_ENUM.PAUSE
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
if (facialMaskConnectStatus != 1) {
|
|
|
|
|
@ -1171,11 +1158,13 @@ class IotCarePlan extends Component<any, any> {
|
|
|
|
|
this.showTips(`${ActiveModeItem.modeName}模式设置失败,请联系小助手`);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
// 开始执行护理
|
|
|
|
|
this.handleWorkStatus(true, MODE_WORKING_ENUM.WORKING);
|
|
|
|
|
|
|
|
|
|
let downNum = CountDownTime[ActiveModeItem.modeName] || 3;
|
|
|
|
|
console.log("downNum", downNum);
|
|
|
|
|
this.showCountdownFun(downNum, () => {}); // 倒计时弹窗
|
|
|
|
|
|
|
|
|
|
// 开始执行护理
|
|
|
|
|
this.handleWorkStatus(true, MODE_WORKING_ENUM.WORKING);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 结束护理?
|
|
|
|
|
|