临时提交给别的前端测试

master
blak-kong 2 years ago
parent dd2a627f8a
commit 226f20392f

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

Loading…
Cancel
Save