|
|
|
|
@ -20,6 +20,7 @@ import {
|
|
|
|
|
Video,
|
|
|
|
|
Input,
|
|
|
|
|
Button,
|
|
|
|
|
PageMeta
|
|
|
|
|
} from "@tarojs/components";
|
|
|
|
|
|
|
|
|
|
import { sendCommand } from "@/utils/bluetoothWXAPI";
|
|
|
|
|
@ -98,6 +99,8 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
constructor(props) {
|
|
|
|
|
super(props);
|
|
|
|
|
this.state = {
|
|
|
|
|
textshow: false,
|
|
|
|
|
textscreen: 'portrait',
|
|
|
|
|
name: "FR200",
|
|
|
|
|
title: "FR200", // 页面标题
|
|
|
|
|
// 当前设备
|
|
|
|
|
@ -181,6 +184,7 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
ModeType: "all", // all 1基础护理 2专区护理 3专研促渗 4敏期护理 5智能测肤
|
|
|
|
|
ActiveModeItem: {
|
|
|
|
|
openSourceData: [],
|
|
|
|
|
modeType:""
|
|
|
|
|
}, // 当前选中模式
|
|
|
|
|
SwitchActiveModeItem: {}, // 切换选中模式
|
|
|
|
|
ModeID: "mode_", // 模式KEY
|
|
|
|
|
@ -404,9 +408,9 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
this.getInstrumentClockSummary();
|
|
|
|
|
this.getInstrumentClockDetail();
|
|
|
|
|
}
|
|
|
|
|
componentDidMount() {}
|
|
|
|
|
componentDidMount() { }
|
|
|
|
|
|
|
|
|
|
componentWillUnmount() {}
|
|
|
|
|
componentWillUnmount() { }
|
|
|
|
|
|
|
|
|
|
componentDidShow() {
|
|
|
|
|
console.log("页面显示了");
|
|
|
|
|
@ -429,6 +433,11 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
async initData() {
|
|
|
|
|
Taro.closeBluetoothAdapter({
|
|
|
|
|
complete: () => {
|
|
|
|
|
// this.openBluetoothAdapter();
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
let obj = getStorageSync("instrument_detail");
|
|
|
|
|
if (obj) {
|
|
|
|
|
this.setState({
|
|
|
|
|
@ -436,10 +445,10 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
title: obj.name,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
await this.GetModeList(obj.id);
|
|
|
|
|
await this.GetModeList(obj?.id);
|
|
|
|
|
|
|
|
|
|
// 如果不存在设备模式值,则判断为首次进入,弹窗提示
|
|
|
|
|
let isFirstTipShow = getStorageSync("first_instrument_" + obj.id);
|
|
|
|
|
let isFirstTipShow = getStorageSync("first_instrument_" + obj?.id);
|
|
|
|
|
if (!isFirstTipShow) {
|
|
|
|
|
this.firstNurseInfo();
|
|
|
|
|
}
|
|
|
|
|
@ -515,7 +524,7 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
if (this.state.activeModeID != "") {
|
|
|
|
|
let res1 = res.data.data.find((e) => e.id == this.state.activeModeID);
|
|
|
|
|
let res1 = res.data.data.find((e) => e?.id == this.state.activeModeID);
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
this.modeCurrentFun(res1);
|
|
|
|
|
}, 100);
|
|
|
|
|
@ -524,7 +533,7 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
this.modeCurrentFun(res.data.data[0]);
|
|
|
|
|
}, 100);
|
|
|
|
|
}
|
|
|
|
|
let res1 = res.data.data.find((e) => e.id == this.state.activeModeID);
|
|
|
|
|
let res1 = res.data.data.find((e) => e?.id == this.state.activeModeID);
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
this.modeCurrentFun(res1);
|
|
|
|
|
}, 100);
|
|
|
|
|
@ -588,20 +597,20 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
|
|
|
|
|
// 根据模式,动态设置底部按钮样式
|
|
|
|
|
let currentWorkModeType = 1;
|
|
|
|
|
if (data.modeType === "moistureTest") {
|
|
|
|
|
if (data?.modeType === "moistureTest") {
|
|
|
|
|
currentWorkModeType = 3;
|
|
|
|
|
} else if (
|
|
|
|
|
data.modeType === "maskPenetration" ||
|
|
|
|
|
data.modeType === "essence" ||
|
|
|
|
|
data.modeType === "led"
|
|
|
|
|
data?.modeType === "maskPenetration" ||
|
|
|
|
|
data?.modeType === "essence" ||
|
|
|
|
|
data?.modeType === "led"
|
|
|
|
|
) {
|
|
|
|
|
currentWorkModeType = 2;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
ActiveModeItem: data,
|
|
|
|
|
activeModeID: data.id,
|
|
|
|
|
ModeID: "mode_" + data.id,
|
|
|
|
|
activeModeID: data?.id,
|
|
|
|
|
ModeID: "mode_" + data?.id,
|
|
|
|
|
ModeStepIndex: 0,
|
|
|
|
|
waterStepIndex: 0, // 水分测试步骤
|
|
|
|
|
EssenceStepIndex: 0, // 精华促渗步骤
|
|
|
|
|
@ -620,7 +629,7 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
|
|
|
|
|
// FR200水分测试不可自动运行,需手动点击开始测试,手动启动检测
|
|
|
|
|
// 其他模式可以自动运行
|
|
|
|
|
if (data.modeType !== "moistureTest") {
|
|
|
|
|
if (data?.modeType !== "moistureTest") {
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
this.onNursingTap("switch");
|
|
|
|
|
}, 800);
|
|
|
|
|
@ -680,8 +689,8 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
switchModeCurrentFun = async (data) => {
|
|
|
|
|
this.setState({
|
|
|
|
|
SwitchActiveModeItem: data,
|
|
|
|
|
activeModeID: data.id,
|
|
|
|
|
ModeID: "mode_" + data.id,
|
|
|
|
|
activeModeID: data?.id,
|
|
|
|
|
ModeID: "mode_" + data?.id,
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
// 打开模式切换弹窗
|
|
|
|
|
@ -748,9 +757,9 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
let params: any = {};
|
|
|
|
|
|
|
|
|
|
params = {
|
|
|
|
|
instrumentId: currentDevice.id,
|
|
|
|
|
instrumentId: currentDevice?.id,
|
|
|
|
|
instrumentName: currentDevice.name,
|
|
|
|
|
modeId: ActiveModeItem.id,
|
|
|
|
|
modeId: ActiveModeItem?.id,
|
|
|
|
|
modeName: ActiveModeItem.modeName,
|
|
|
|
|
nursingTime: s_to_hms(this.elapsedTime),
|
|
|
|
|
nursingData: JSON.stringify({
|
|
|
|
|
@ -777,8 +786,8 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
this.moistureTest(
|
|
|
|
|
params.nursingData,
|
|
|
|
|
formattedDate,
|
|
|
|
|
ActiveModeItem.id,
|
|
|
|
|
currentDevice.id
|
|
|
|
|
ActiveModeItem?.id,
|
|
|
|
|
currentDevice?.id
|
|
|
|
|
);
|
|
|
|
|
}, 2000);
|
|
|
|
|
};
|
|
|
|
|
@ -851,6 +860,10 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
this.showTips("检测到您的设备没有紧贴肌肤,请紧贴肌肤后重新尝试");
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
ontextshow() {
|
|
|
|
|
let textshow = this.state.textshow
|
|
|
|
|
this.setState({ textshow: !textshow })
|
|
|
|
|
}
|
|
|
|
|
updata() {
|
|
|
|
|
let that = this;
|
|
|
|
|
let stop = 0;
|
|
|
|
|
@ -884,7 +897,16 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
full() {
|
|
|
|
|
let landscape = this.state.textscreen
|
|
|
|
|
if (landscape === 'landscape') {
|
|
|
|
|
this.setState({ textscreen: 'portrait' })
|
|
|
|
|
} else {
|
|
|
|
|
this.setState({ textscreen: 'landscape' })
|
|
|
|
|
}
|
|
|
|
|
// return 'landscape'
|
|
|
|
|
this.setState({ isFullScreen: !this.state.isFullScreen });
|
|
|
|
|
console.log(this.state.textscreen,1111);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** 切换光照 */
|
|
|
|
|
@ -892,7 +914,7 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
let { isStopNurse, ActiveModeItem } = this.state;
|
|
|
|
|
|
|
|
|
|
console.log("切换光照,", ActiveModeItem);
|
|
|
|
|
if (ActiveModeItem.modeType === "led") {
|
|
|
|
|
if (ActiveModeItem?.modeType === "led") {
|
|
|
|
|
this.onSwitchChangeLED();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
@ -947,7 +969,7 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
*/
|
|
|
|
|
openStepTips = () => {
|
|
|
|
|
let isFirstEntryModeNot = getStorageSync(
|
|
|
|
|
"isFirstEntryMode_" + this.state.currentDevice.id
|
|
|
|
|
"isFirstEntryMode_" + this.state.currentDevice?.id
|
|
|
|
|
);
|
|
|
|
|
// 1.如果没有持久化不再提示,每次进入都会弹窗提示
|
|
|
|
|
if (!isFirstEntryModeNot) {
|
|
|
|
|
@ -959,7 +981,7 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
};
|
|
|
|
|
closeStepTips = (data) => {
|
|
|
|
|
if (data.isLocal) {
|
|
|
|
|
setStorageSync("isFirstEntryMode_" + this.state.currentDevice.id, true); // 关闭首次进入弹窗
|
|
|
|
|
setStorageSync("isFirstEntryMode_" + this.state.currentDevice?.id, true); // 关闭首次进入弹窗
|
|
|
|
|
}
|
|
|
|
|
this.setState({ isShowStepTips: false });
|
|
|
|
|
};
|
|
|
|
|
@ -1075,7 +1097,7 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
let nowModeItem;
|
|
|
|
|
if (nWorkMode) {
|
|
|
|
|
nowModeItem = ModeList.find((item) => {
|
|
|
|
|
return item.modeType === nWorkMode;
|
|
|
|
|
return item?.modeType === nWorkMode;
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
opts.workStatus = nWorkStatus;
|
|
|
|
|
@ -1215,9 +1237,9 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// 根据不同的模式,切换步骤到下一步
|
|
|
|
|
if (ActiveModeItem.modeType === "essence") {
|
|
|
|
|
if (ActiveModeItem?.modeType === "essence") {
|
|
|
|
|
this.essencePenetrationNext();
|
|
|
|
|
} else if (ActiveModeItem.modeType === "maskPenetration") {
|
|
|
|
|
} else if (ActiveModeItem?.modeType === "maskPenetration") {
|
|
|
|
|
this.maskPenetrationNext();
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
@ -1378,7 +1400,7 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
const { ActiveModeItem, currentGear } = this.state;
|
|
|
|
|
let sendParams: any = {
|
|
|
|
|
...deviceCommandSamples.pause,
|
|
|
|
|
workMode: ActiveModeItem.modeType, // 使用模式
|
|
|
|
|
workMode: ActiveModeItem?.modeType, // 使用模式
|
|
|
|
|
workStatus: "working",
|
|
|
|
|
gear: currentGear,
|
|
|
|
|
};
|
|
|
|
|
@ -1427,7 +1449,7 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
|
|
|
|
|
let sendParams: any = {
|
|
|
|
|
...deviceCommandSamples.pause,
|
|
|
|
|
workMode: ActiveModeItem.modeType, // 使用模式
|
|
|
|
|
workMode: ActiveModeItem?.modeType, // 使用模式
|
|
|
|
|
workStatus: "working",
|
|
|
|
|
gear: gear,
|
|
|
|
|
};
|
|
|
|
|
@ -1452,7 +1474,7 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
|
|
|
|
|
let sendParams: any = {
|
|
|
|
|
...deviceCommandSamples.pause,
|
|
|
|
|
workMode: ActiveModeItem.modeType, // 使用模式
|
|
|
|
|
workMode: ActiveModeItem?.modeType, // 使用模式
|
|
|
|
|
workStatus: "working",
|
|
|
|
|
gear: currentGear,
|
|
|
|
|
};
|
|
|
|
|
@ -1499,13 +1521,13 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
|
|
|
|
|
let sendParams: any = {
|
|
|
|
|
...deviceCommandSamples.pause,
|
|
|
|
|
workMode: ActiveModeItem.modeType, // 使用模式
|
|
|
|
|
workMode: ActiveModeItem?.modeType, // 使用模式
|
|
|
|
|
workStatus: newWorkStatus,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// 水分测试需要特殊处理
|
|
|
|
|
// 水分测试准备 水分测试工作 水分测试启动
|
|
|
|
|
if (ActiveModeItem.modeType === "moistureTest") {
|
|
|
|
|
if (ActiveModeItem?.modeType === "moistureTest") {
|
|
|
|
|
let that = this;
|
|
|
|
|
sendParams.testStatus = "standby"; // 切换为准备
|
|
|
|
|
|
|
|
|
|
@ -1523,8 +1545,8 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
|
|
|
|
|
// 面膜促渗和精华促渗
|
|
|
|
|
if (
|
|
|
|
|
ActiveModeItem.modeType === "maskPenetration" ||
|
|
|
|
|
ActiveModeItem.modeType === "essence"
|
|
|
|
|
ActiveModeItem?.modeType === "maskPenetration" ||
|
|
|
|
|
ActiveModeItem?.modeType === "essence"
|
|
|
|
|
) {
|
|
|
|
|
sendParams.gear = this.state.currentGear; // 点击开始再开始
|
|
|
|
|
}
|
|
|
|
|
@ -1702,7 +1724,7 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
|
|
|
|
|
// 仪器缓存模式,判断是否存在于现有模式中
|
|
|
|
|
let recordModeItem = ModeList.find((item) => {
|
|
|
|
|
return item.id == FR200NursingHistory.modeId;
|
|
|
|
|
return item?.id == FR200NursingHistory.modeId;
|
|
|
|
|
});
|
|
|
|
|
if (!FR200NursingHistory || !recordModeItem) {
|
|
|
|
|
console.log("仪器有数据, 但是缓存没有数据, 忽略");
|
|
|
|
|
@ -1723,7 +1745,7 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
!workStatus
|
|
|
|
|
) {
|
|
|
|
|
// 判断id是否一致, 一致的话则生成护理报表
|
|
|
|
|
if (jsonStatus.id == FR200NursingHistory.id) {
|
|
|
|
|
if (jsonStatus?.id == FR200NursingHistory?.id) {
|
|
|
|
|
console.log("id一致, 设备没有运行/已完成/待机");
|
|
|
|
|
let totalSeconds = jsonStatus.totalSeconds; // 从仪器上获取的使用时间
|
|
|
|
|
|
|
|
|
|
@ -1744,9 +1766,9 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
: s_to_hms(this.elapsedTime);
|
|
|
|
|
|
|
|
|
|
let params = {
|
|
|
|
|
instrumentId: currentDevice.id,
|
|
|
|
|
instrumentId: currentDevice?.id,
|
|
|
|
|
instrumentName: currentDevice.name,
|
|
|
|
|
modeId: ActiveModeItem.id,
|
|
|
|
|
modeId: ActiveModeItem?.id,
|
|
|
|
|
modeName: ActiveModeItem.modeName,
|
|
|
|
|
nursingTime: timeValue,
|
|
|
|
|
};
|
|
|
|
|
@ -1757,9 +1779,9 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
} else {
|
|
|
|
|
// ID不一致,同步异常,统一提交一分钟
|
|
|
|
|
let params = {
|
|
|
|
|
instrumentId: currentDevice.id,
|
|
|
|
|
instrumentId: currentDevice?.id,
|
|
|
|
|
instrumentName: currentDevice.name,
|
|
|
|
|
modeId: ActiveModeItem.id,
|
|
|
|
|
modeId: ActiveModeItem?.id,
|
|
|
|
|
modeName: ActiveModeItem.modeName,
|
|
|
|
|
nursingTime: "00:01:00",
|
|
|
|
|
};
|
|
|
|
|
@ -1772,7 +1794,7 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
console.log("id一致, 设备运行中或暂停");
|
|
|
|
|
// 5.判断设备状态-运行中
|
|
|
|
|
// 同步时间
|
|
|
|
|
if (jsonStatus.id == FR200NursingHistory.id) {
|
|
|
|
|
if (jsonStatus?.id == FR200NursingHistory?.id) {
|
|
|
|
|
if (FR200NursingHistory.currentTime) {
|
|
|
|
|
this.isRuning = true;
|
|
|
|
|
this.resetTimer();
|
|
|
|
|
@ -1800,8 +1822,8 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
videoTime: this.FR200NursingHistory.videoTime,
|
|
|
|
|
tempModeCurrent: ActiveModeItem,
|
|
|
|
|
ActiveModeItem: ActiveModeItem,
|
|
|
|
|
activeModeID: ActiveModeItem.id,
|
|
|
|
|
ModeID: "mode_" + ActiveModeItem.id,
|
|
|
|
|
activeModeID: ActiveModeItem?.id,
|
|
|
|
|
ModeID: "mode_" + ActiveModeItem?.id,
|
|
|
|
|
currentTime: this.FR200NursingHistory.currentTime,
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
@ -1812,9 +1834,9 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
const params = {
|
|
|
|
|
createDate: dayjs().format("YYYY-MM-DD"),
|
|
|
|
|
workMode: jsonStatus.workMode,
|
|
|
|
|
instrumentId: currentDevice.id,
|
|
|
|
|
instrumentId: currentDevice?.id,
|
|
|
|
|
instrumentName: currentDevice.name,
|
|
|
|
|
modeId: ActiveModeItem.id,
|
|
|
|
|
modeId: ActiveModeItem?.id,
|
|
|
|
|
modeName: ActiveModeItem.modeName,
|
|
|
|
|
id: dayjs().format("YYYY-MM-DD HH:mm:ss"),
|
|
|
|
|
neededTotalSeconds: jsonStatus.neededTotalSeconds,
|
|
|
|
|
@ -1844,7 +1866,7 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
params.dataArray.push(jsonStatus);
|
|
|
|
|
params.jsonStatus = jsonStatus;
|
|
|
|
|
params.workMode = jsonStatus?.workMode;
|
|
|
|
|
params.modeId = this.state.ActiveModeItem.id;
|
|
|
|
|
params.modeId = this.state.ActiveModeItem?.id;
|
|
|
|
|
params.modeName = this.state.ActiveModeItem.modeName;
|
|
|
|
|
|
|
|
|
|
console.log(jsonStatus, 555555555555);
|
|
|
|
|
@ -1852,7 +1874,7 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
} else {
|
|
|
|
|
params.jsonStatus = jsonStatus;
|
|
|
|
|
params.workMode = jsonStatus?.workMode;
|
|
|
|
|
params.modeId = data.id;
|
|
|
|
|
params.modeId = data?.id;
|
|
|
|
|
params.modeName = data.modeName;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -2002,9 +2024,9 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
params = data;
|
|
|
|
|
} else {
|
|
|
|
|
params = {
|
|
|
|
|
instrumentId: currentDevice.id,
|
|
|
|
|
instrumentId: currentDevice?.id,
|
|
|
|
|
instrumentName: currentDevice.name,
|
|
|
|
|
modeId: ActiveModeItem.id,
|
|
|
|
|
modeId: ActiveModeItem?.id,
|
|
|
|
|
modeName: ActiveModeItem.modeName,
|
|
|
|
|
nursingTime: s_to_hms(this.elapsedTime),
|
|
|
|
|
};
|
|
|
|
|
@ -2019,7 +2041,7 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
console.log("PostNursingLogClock", res2);
|
|
|
|
|
if (res2.data.code === 200) {
|
|
|
|
|
let params = {
|
|
|
|
|
instrumentId: currentDevice.id,
|
|
|
|
|
instrumentId: currentDevice?.id,
|
|
|
|
|
};
|
|
|
|
|
// 上传护理完成的仪器ID
|
|
|
|
|
let res = await InstrumentInfo.apiClock.addClockInstrument(params);
|
|
|
|
|
@ -2037,9 +2059,9 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
|
|
|
|
|
this.goFaceReport(
|
|
|
|
|
res1,
|
|
|
|
|
ActiveModeItem.id,
|
|
|
|
|
ActiveModeItem?.id,
|
|
|
|
|
res2.data.data,
|
|
|
|
|
currentDevice.id
|
|
|
|
|
currentDevice?.id
|
|
|
|
|
); // 跳转
|
|
|
|
|
}, 2000);
|
|
|
|
|
}
|
|
|
|
|
@ -2162,11 +2184,11 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
let report = true;
|
|
|
|
|
go(
|
|
|
|
|
"/recoding/pages/face_report_one/face_report_one?id=" +
|
|
|
|
|
ids +
|
|
|
|
|
"&report=" +
|
|
|
|
|
report +
|
|
|
|
|
"&obj=" +
|
|
|
|
|
JSON.stringify(obj)
|
|
|
|
|
ids +
|
|
|
|
|
"&report=" +
|
|
|
|
|
report +
|
|
|
|
|
"&obj=" +
|
|
|
|
|
JSON.stringify(obj)
|
|
|
|
|
);
|
|
|
|
|
} else if ("moistureTest" === nursingData.workMode) {
|
|
|
|
|
console.log("水分测试");
|
|
|
|
|
@ -2177,11 +2199,11 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
|
|
|
|
|
go(
|
|
|
|
|
"/recoding/pages/face_report/face_report?id=" +
|
|
|
|
|
deviceid +
|
|
|
|
|
"&recordId=" +
|
|
|
|
|
currentDevice +
|
|
|
|
|
"&report=" +
|
|
|
|
|
report
|
|
|
|
|
deviceid +
|
|
|
|
|
"&recordId=" +
|
|
|
|
|
currentDevice +
|
|
|
|
|
"&report=" +
|
|
|
|
|
report
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
@ -2230,13 +2252,13 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
firstNurseInfo = async () => {
|
|
|
|
|
let { currentDevice } = this.state;
|
|
|
|
|
let res = await InstrumentInfo.firstNurseInfo({
|
|
|
|
|
instrumentId: currentDevice.id,
|
|
|
|
|
instrumentId: currentDevice?.id,
|
|
|
|
|
});
|
|
|
|
|
console.log(res, "接口");
|
|
|
|
|
|
|
|
|
|
if (res.data.code === 200) {
|
|
|
|
|
let isFirstTipShow = getStorageSync(
|
|
|
|
|
"first_instrument_" + currentDevice.id
|
|
|
|
|
"first_instrument_" + currentDevice?.id
|
|
|
|
|
);
|
|
|
|
|
console.log(isFirstTipShow, "查看返回值");
|
|
|
|
|
|
|
|
|
|
@ -2246,7 +2268,7 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
this.setState({ nurseInfo: res.data.data, isFirstTipShow: true });
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
setStorageSync("first_instrument_" + currentDevice.id, true);
|
|
|
|
|
setStorageSync("first_instrument_" + currentDevice?.id, true);
|
|
|
|
|
} else {
|
|
|
|
|
this.setState({ nurseInfo: res.data.data });
|
|
|
|
|
}
|
|
|
|
|
@ -2256,7 +2278,7 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
this.setState({ isFirstTipShow: true });
|
|
|
|
|
};
|
|
|
|
|
onTipShowClose = async () => {
|
|
|
|
|
setStorageSync("first_instrument_" + this.state.currentDevice.id, true);
|
|
|
|
|
setStorageSync("first_instrument_" + this.state.currentDevice?.id, true);
|
|
|
|
|
this.setState({ isFirstTipShow: false });
|
|
|
|
|
};
|
|
|
|
|
/** 初次护理信息弹窗 END */
|
|
|
|
|
@ -2308,6 +2330,7 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
render() {
|
|
|
|
|
let {
|
|
|
|
|
title,
|
|
|
|
|
textshow,
|
|
|
|
|
isConnectShow,
|
|
|
|
|
GearData,
|
|
|
|
|
waterStepList,
|
|
|
|
|
@ -2335,6 +2358,7 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
isNotEnoughTime,
|
|
|
|
|
isShowNursingSuccess,
|
|
|
|
|
currentDevice,
|
|
|
|
|
textscreen,
|
|
|
|
|
isConnectionBlutoot,
|
|
|
|
|
isShowTipsSave,
|
|
|
|
|
isFirstTipShow,
|
|
|
|
|
@ -2354,13 +2378,16 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<Block>
|
|
|
|
|
<Navbar
|
|
|
|
|
titleSlot={title}
|
|
|
|
|
isBack
|
|
|
|
|
isCustomBack
|
|
|
|
|
customBack={this.customBack}
|
|
|
|
|
/>
|
|
|
|
|
{!isFullScreen && (
|
|
|
|
|
<PageMeta pageOrientation={textscreen}></PageMeta>
|
|
|
|
|
|
|
|
|
|
<Block>
|
|
|
|
|
<Navbar
|
|
|
|
|
titleSlot={title}
|
|
|
|
|
isBack
|
|
|
|
|
isCustomBack
|
|
|
|
|
customBack={this.customBack}
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
<View>
|
|
|
|
|
<View catchMove>
|
|
|
|
|
<PopupAlert
|
|
|
|
|
@ -2434,51 +2461,54 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
|
|
|
|
|
<View>
|
|
|
|
|
<View className="iot-main">
|
|
|
|
|
<View className="banner-box">
|
|
|
|
|
<View>
|
|
|
|
|
<Video
|
|
|
|
|
className="video-or-image"
|
|
|
|
|
src={currentVideoSrc}
|
|
|
|
|
loop
|
|
|
|
|
id="myVideo"
|
|
|
|
|
objectFit="cover"
|
|
|
|
|
enablePlayGesture
|
|
|
|
|
showFullscreenBtn={false}
|
|
|
|
|
onLoadedMetaData={this.GetVideosTime}
|
|
|
|
|
/>
|
|
|
|
|
{/* <button onClick={this.executePromises}>点击按钮</button> */}
|
|
|
|
|
{errorTips && (
|
|
|
|
|
<Block>
|
|
|
|
|
<View className="msg-tips">
|
|
|
|
|
<Image
|
|
|
|
|
className="msg-tips-img"
|
|
|
|
|
src={require("@/img/tips.png")}
|
|
|
|
|
/>
|
|
|
|
|
<View className="msg-tips-content">{errorTips}</View>
|
|
|
|
|
</View>
|
|
|
|
|
</Block>
|
|
|
|
|
)}
|
|
|
|
|
</View>
|
|
|
|
|
|
|
|
|
|
<View className="fr200-iot-device">
|
|
|
|
|
<View className="item">
|
|
|
|
|
<Text className="device-time">
|
|
|
|
|
倒计时:<Text className="time">{currentTime}</Text>
|
|
|
|
|
</Text>
|
|
|
|
|
{isFullScreen &&
|
|
|
|
|
<View className="banner-box">
|
|
|
|
|
<View>
|
|
|
|
|
<Video
|
|
|
|
|
className="video-or-image"
|
|
|
|
|
src={currentVideoSrc}
|
|
|
|
|
loop
|
|
|
|
|
id="myVideo"
|
|
|
|
|
objectFit="cover"
|
|
|
|
|
enablePlayGesture
|
|
|
|
|
showFullscreenBtn={false}
|
|
|
|
|
onLoadedMetaData={this.GetVideosTime}
|
|
|
|
|
/>
|
|
|
|
|
{/* <button onClick={this.executePromises}>点击按钮</button> */}
|
|
|
|
|
{errorTips && (
|
|
|
|
|
<Block>
|
|
|
|
|
<View className="msg-tips">
|
|
|
|
|
<Image
|
|
|
|
|
className="msg-tips-img"
|
|
|
|
|
src={require("@/img/tips.png")}
|
|
|
|
|
/>
|
|
|
|
|
<View className="msg-tips-content">{errorTips}</View>
|
|
|
|
|
</View>
|
|
|
|
|
</Block>
|
|
|
|
|
)}
|
|
|
|
|
</View>
|
|
|
|
|
<View className="line" />
|
|
|
|
|
<View className="item">
|
|
|
|
|
档位:<Text className="gear">{currentGear}</Text>档
|
|
|
|
|
|
|
|
|
|
<View className="fr200-iot-device">
|
|
|
|
|
<View className="item">
|
|
|
|
|
<Text className="device-time">
|
|
|
|
|
倒计时:<Text className="time">{currentTime}</Text>
|
|
|
|
|
</Text>
|
|
|
|
|
</View>
|
|
|
|
|
<View className="line" />
|
|
|
|
|
<View className="item">
|
|
|
|
|
档位:<Text className="gear">{currentGear}</Text>档
|
|
|
|
|
</View>
|
|
|
|
|
<View className="line" />
|
|
|
|
|
<ElectricityView
|
|
|
|
|
Electricity={Electricity}
|
|
|
|
|
DeviceConnectStatus={DeviceConnectStatus}
|
|
|
|
|
/>
|
|
|
|
|
</View>
|
|
|
|
|
<View className="line" />
|
|
|
|
|
<ElectricityView
|
|
|
|
|
Electricity={Electricity}
|
|
|
|
|
DeviceConnectStatus={DeviceConnectStatus}
|
|
|
|
|
/>
|
|
|
|
|
</View>
|
|
|
|
|
</View>
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
{ModeList.length > 0 && (
|
|
|
|
|
{ModeList.length > 0 && isFullScreen&&(
|
|
|
|
|
<ModeListView
|
|
|
|
|
isPop={false}
|
|
|
|
|
isShowNurse={isShowNurse}
|
|
|
|
|
@ -2494,49 +2524,59 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
<button onClick={this.updata.bind(this)}>模拟数据更新 </button>
|
|
|
|
|
{/* <button onClick={this.updata.bind(this)}>添加数据 </button> */}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{(ActiveModeItem?.modeType === "maskPenetration" ||
|
|
|
|
|
ActiveModeItem?.modeType === "essence") &&isFullScreen&&(
|
|
|
|
|
<Gears
|
|
|
|
|
onEmitMinus={this.handleMinus}
|
|
|
|
|
onEmitAdd={this.handleAdd}
|
|
|
|
|
GearData={GearData}
|
|
|
|
|
></Gears>
|
|
|
|
|
)}
|
|
|
|
|
|
|
|
|
|
{ActiveModeItem?.modeType === "moistureTest" && isFullScreen&&(
|
|
|
|
|
<WaterTest
|
|
|
|
|
isRuningTest={isRuningTest}
|
|
|
|
|
stepList={waterStepList}
|
|
|
|
|
stepIndex={waterStepIndex}
|
|
|
|
|
></WaterTest>
|
|
|
|
|
)}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<View className={classnames({ show: showEcharts })}>
|
|
|
|
|
<Echarts
|
|
|
|
|
series={series}
|
|
|
|
|
full={this.full.bind(this)}
|
|
|
|
|
></Echarts>
|
|
|
|
|
|
|
|
|
|
<EchartsFullScean
|
|
|
|
|
{/* <EchartsFullScean
|
|
|
|
|
series={series}
|
|
|
|
|
full={this.full}
|
|
|
|
|
></EchartsFullScean>
|
|
|
|
|
></EchartsFullScean> */}
|
|
|
|
|
</View>
|
|
|
|
|
</View>
|
|
|
|
|
|
|
|
|
|
{(ActiveModeItem.modeType === "maskPenetration" ||
|
|
|
|
|
ActiveModeItem.modeType === "essence") && (
|
|
|
|
|
<Gears
|
|
|
|
|
onEmitMinus={this.handleMinus}
|
|
|
|
|
onEmitAdd={this.handleAdd}
|
|
|
|
|
GearData={GearData}
|
|
|
|
|
></Gears>
|
|
|
|
|
)}
|
|
|
|
|
{isFullScreen &&
|
|
|
|
|
<Footer
|
|
|
|
|
currentWorkModeType={currentWorkModeType}
|
|
|
|
|
isRuningTest={isRuningTest}
|
|
|
|
|
isStopNurse={isStopNurse}
|
|
|
|
|
onEmitStartNurse={this.onStartNurse}
|
|
|
|
|
onEmitSwitchChange={this.onSwitchChange}
|
|
|
|
|
onEmitEndPlan={this.onEndPlan}
|
|
|
|
|
onsuccess={this.onsuccess}
|
|
|
|
|
/>
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
{ActiveModeItem.modeType === "moistureTest" && (
|
|
|
|
|
<WaterTest
|
|
|
|
|
isRuningTest={isRuningTest}
|
|
|
|
|
stepList={waterStepList}
|
|
|
|
|
stepIndex={waterStepIndex}
|
|
|
|
|
></WaterTest>
|
|
|
|
|
)}
|
|
|
|
|
</View>
|
|
|
|
|
|
|
|
|
|
<Footer
|
|
|
|
|
currentWorkModeType={currentWorkModeType}
|
|
|
|
|
isRuningTest={isRuningTest}
|
|
|
|
|
isStopNurse={isStopNurse}
|
|
|
|
|
onEmitStartNurse={this.onStartNurse}
|
|
|
|
|
onEmitSwitchChange={this.onSwitchChange}
|
|
|
|
|
onEmitEndPlan={this.onEndPlan}
|
|
|
|
|
onsuccess={this.onsuccess}
|
|
|
|
|
/>
|
|
|
|
|
</View>
|
|
|
|
|
</View>
|
|
|
|
|
)}
|
|
|
|
|
{isFullScreen && (
|
|
|
|
|
|
|
|
|
|
{/*
|
|
|
|
|
<View>
|
|
|
|
|
<button onClick={this.updata.bind(this)}>模拟数据更新 </button>
|
|
|
|
|
|
|
|
|
|
@ -2544,8 +2584,20 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
series={series}
|
|
|
|
|
full={this.full}
|
|
|
|
|
></EchartsFullScean>
|
|
|
|
|
</View>
|
|
|
|
|
)}
|
|
|
|
|
</View> */}
|
|
|
|
|
|
|
|
|
|
</Block>
|
|
|
|
|
|
|
|
|
|
{/* <View
|
|
|
|
|
style="position:fixed;width:100vw;height:100vh"
|
|
|
|
|
|
|
|
|
|
>
|
|
|
|
|
<button onClick={this.full.bind(this)}>缩小 </button>
|
|
|
|
|
<Echarts
|
|
|
|
|
series={series}
|
|
|
|
|
full={this.full.bind(this)}
|
|
|
|
|
></Echarts>
|
|
|
|
|
</View> */}
|
|
|
|
|
</Block>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|