|
|
|
|
@ -225,7 +225,7 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
nasolabialOrMandibularOutput: false, // 鼻唇或下颌输出
|
|
|
|
|
partition: 0, // 分割?
|
|
|
|
|
pointOutChangeSide: false, // 交叉输出点
|
|
|
|
|
impedance: 107, // 阻抗?
|
|
|
|
|
impedance: 107, // 阻抗/能量等级:1档<200 200<2档<280 280<3档<360 后面以此类推每加一档+80抗阻
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/** FR200模式类型:名称 */
|
|
|
|
|
@ -426,13 +426,14 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
|
|
|
|
|
/** 选中护理模式 */
|
|
|
|
|
modeCurrentFun = async (data, isNotCheck = false) => {
|
|
|
|
|
let { isShowNurse } = this.state;
|
|
|
|
|
// 护理检查改变模式,是否提示切换护理模式
|
|
|
|
|
// isNotCheck为真时,不进行校验,直接切换
|
|
|
|
|
this.tempModeCurrent = data;
|
|
|
|
|
|
|
|
|
|
// 仅在未开始护理前,切换模式的时候提示模式弹窗
|
|
|
|
|
// FR200默认开始护理
|
|
|
|
|
if (!this.state.isShowNurse) {
|
|
|
|
|
if (!isShowNurse) {
|
|
|
|
|
this.openStepTips();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -443,7 +444,6 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
if (isReturn) return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let { isShowNurse } = this.state;
|
|
|
|
|
let currentServiceData = {
|
|
|
|
|
startSource: "",
|
|
|
|
|
stopSource: "",
|
|
|
|
|
@ -471,15 +471,13 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// 如果是正在运行中切换,则直接准备运行
|
|
|
|
|
if (isShowNurse) {
|
|
|
|
|
if (!this.footerIsDisabled()) {
|
|
|
|
|
this.stepNext(); // 如果切换模式,则不执行开始逻辑
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
this.onNursingTap("switch");
|
|
|
|
|
}, 800);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// 开发中,暂时允许直接切换
|
|
|
|
|
// 每次切换模式时清空一下历史数据
|
|
|
|
|
this.changeItemUpdateFR200NursingHistory();
|
|
|
|
|
this.stepNext(); // 如果切换模式,则不执行开始逻辑
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
this.onNursingTap("switch");
|
|
|
|
|
}, 800);
|
|
|
|
|
};
|
|
|
|
|
/** 设备运行中切换模式 */
|
|
|
|
|
modeRuningChange() {
|
|
|
|
|
@ -1516,7 +1514,7 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
instrumentName: currentDevice.name,
|
|
|
|
|
modeId: ActiveModeItem.id,
|
|
|
|
|
modeName: ActiveModeItem.modeName,
|
|
|
|
|
id: jsonStatus.id,
|
|
|
|
|
id: dayjs().format("YYYY-MM-DD HH:mm:ss"),
|
|
|
|
|
neededTotalSeconds: jsonStatus.neededTotalSeconds,
|
|
|
|
|
jsonStatus,
|
|
|
|
|
ActiveModeItem: this.state.ActiveModeItem,
|
|
|
|
|
@ -1553,6 +1551,7 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
// 缓存每秒数据
|
|
|
|
|
if (!params.dataArray) params.dataArray = [];
|
|
|
|
|
params.dataArray.push(jsonStatus);
|
|
|
|
|
params.jsonStatus = jsonStatus;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
Taro.setStorageSync("FR200NursingHistory", params);
|
|
|
|
|
@ -1561,6 +1560,13 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
this.setFR200NursingHistory(jsonStatus);
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
changeItemUpdateFR200NursingHistory() {
|
|
|
|
|
this.FR200NursingHistory = Taro.getStorageSync("FR200NursingHistory");
|
|
|
|
|
if (this.FR200NursingHistory) {
|
|
|
|
|
this.FR200NursingHistory.dataArray = [];
|
|
|
|
|
Taro.setStorageSync("FR200NursingHistory", this.FR200NursingHistory);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* @name 删除WL200护理历史
|
|
|
|
|
* @description 参数1 护理历史 参数2 强制删除
|
|
|
|
|
@ -1580,10 +1586,20 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/** 提交护理记录 */
|
|
|
|
|
todoPromise = () => {
|
|
|
|
|
return new Promise<void>((resolve, reject) => {
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
resolve();
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/** 提交护理记录:完成护理后自动调用,会跳转页面 */
|
|
|
|
|
PostNursingLogClock = async (data: any = null, isJump = true) => {
|
|
|
|
|
let { currentDevice, ActiveModeItem } = this.state;
|
|
|
|
|
// todo 建议写一个Promise异步函数,用 await 执行,在提交前处理好数据
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
let { currentDevice, ActiveModeItem } = this.state;
|
|
|
|
|
let params = {};
|
|
|
|
|
if (data) {
|
|
|
|
|
params = data;
|
|
|
|
|
@ -1599,7 +1615,6 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
|
|
|
|
|
let res: any = await InstrumentInfo.apiNursingLog.addLog(params);
|
|
|
|
|
console.log("PostNursingLogClock", res);
|
|
|
|
|
|
|
|
|
|
if (res.data.code === 200) {
|
|
|
|
|
let params = {
|
|
|
|
|
instrumentId: currentDevice.id,
|
|
|
|
|
@ -1617,7 +1632,7 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
this.setState({
|
|
|
|
|
isShowNursingSuccess: false,
|
|
|
|
|
});
|
|
|
|
|
this.goFaceReport();
|
|
|
|
|
this.goFaceReport(); // 跳转
|
|
|
|
|
}, 2000);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|