|
|
|
|
@ -2,9 +2,14 @@ import Taro from "@tarojs/taro";
|
|
|
|
|
import dayjs from "dayjs";
|
|
|
|
|
import classnames from "classnames";
|
|
|
|
|
// eslint-disable-next-line import/no-named-as-default
|
|
|
|
|
import React, { Component, PropsWithChildren, useEffect, useState } from "react";
|
|
|
|
|
|
|
|
|
|
import Echarts from "./components/Echart/index"
|
|
|
|
|
import React, {
|
|
|
|
|
Component,
|
|
|
|
|
PropsWithChildren,
|
|
|
|
|
useEffect,
|
|
|
|
|
useState,
|
|
|
|
|
} from "react";
|
|
|
|
|
|
|
|
|
|
import Echarts from "./components/Echart/index";
|
|
|
|
|
import {
|
|
|
|
|
Block,
|
|
|
|
|
View,
|
|
|
|
|
@ -26,6 +31,7 @@ import PopupStepTips from "@/components/popup/popup-step-tips";
|
|
|
|
|
import PopupConfirm from "@/components/popup/popup-confirm";
|
|
|
|
|
import PopupAlert from "@/components/popup/popup-alert";
|
|
|
|
|
import PopupStatus from "@/components/popup/popup-status";
|
|
|
|
|
import PopupInstrumentUploadTips from "@/components/popup/popup-instrument-upload-tips";
|
|
|
|
|
import ConnectionBluetoot from "@/components/bluetoot/connection";
|
|
|
|
|
/* 公共组件 END */
|
|
|
|
|
|
|
|
|
|
@ -54,7 +60,7 @@ import {
|
|
|
|
|
bleCommandSamples,
|
|
|
|
|
} from "@/components/bluetoot/connection/test";
|
|
|
|
|
|
|
|
|
|
import { Progress } from '@antmjs/vantui'
|
|
|
|
|
import { Progress } from "@antmjs/vantui";
|
|
|
|
|
import {
|
|
|
|
|
s_to_s,
|
|
|
|
|
s_to_m,
|
|
|
|
|
@ -128,8 +134,6 @@ let DeviceSyncData = {
|
|
|
|
|
};
|
|
|
|
|
let deviceToolKitInstance = deviceToolKitInstanceWL200;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class IotCarePlan extends Component<any, any> {
|
|
|
|
|
constructor(props) {
|
|
|
|
|
super(props);
|
|
|
|
|
@ -176,7 +180,7 @@ class IotCarePlan extends Component<any, any> {
|
|
|
|
|
/** 护理过程 END*/
|
|
|
|
|
|
|
|
|
|
// 模式列表
|
|
|
|
|
isSwitchActiveMode: true, // 是否显示弹窗切换模式
|
|
|
|
|
isSwitchActiveMode: false, // 是否显示弹窗切换模式
|
|
|
|
|
ModeList: [],
|
|
|
|
|
ModeType: "all", // all visor面罩 cabin舱体 yimeish医美
|
|
|
|
|
modeClass: "", // 1面罩 2舱体 3医美
|
|
|
|
|
@ -209,10 +213,18 @@ class IotCarePlan extends Component<any, any> {
|
|
|
|
|
|
|
|
|
|
isShowNursingSuccess: false, // 护理成功弹窗
|
|
|
|
|
isShowTipsSave: false, // 切换模式时,提示是否保存部分护理记录
|
|
|
|
|
|
|
|
|
|
// 初次护理弹窗
|
|
|
|
|
isFirstTipShow: false,
|
|
|
|
|
nurseInfo: [],
|
|
|
|
|
|
|
|
|
|
// 上一次护理记录未生成,是否继续连接设备
|
|
|
|
|
isShowReReadRecordConnect: false,
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 不涉及渲染的页面变量
|
|
|
|
|
isRuning: any = false; // 设备是否运行中
|
|
|
|
|
jsonStatus: any = {}; // 同步设备返回数据,用于结束
|
|
|
|
|
tempModeCurrent: any = {}; // 临时保存的当前模式
|
|
|
|
|
elapsedTime: any = 0; // 设备已运行时间
|
|
|
|
|
@ -231,7 +243,7 @@ class IotCarePlan extends Component<any, any> {
|
|
|
|
|
}
|
|
|
|
|
componentDidMount() {}
|
|
|
|
|
|
|
|
|
|
componentWillUnmount() { }
|
|
|
|
|
componentWillUnmount() {}
|
|
|
|
|
|
|
|
|
|
componentDidShow() {
|
|
|
|
|
console.log("页面显示了");
|
|
|
|
|
@ -266,9 +278,9 @@ class IotCarePlan extends Component<any, any> {
|
|
|
|
|
console.log("info");
|
|
|
|
|
|
|
|
|
|
// 如果不存在设备模式值,则判断为首次进入,弹窗提示
|
|
|
|
|
let isFirstEntry = getStorageSync("isFirstEntry_" + info.id);
|
|
|
|
|
if (!isFirstEntry) {
|
|
|
|
|
this.setState({ isShowStepTips: true });
|
|
|
|
|
let isFirstTipShow = getStorageSync("first_instrument_" + info.id);
|
|
|
|
|
if (!isFirstTipShow) {
|
|
|
|
|
this.firstNurseInfo();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -281,30 +293,27 @@ class IotCarePlan extends Component<any, any> {
|
|
|
|
|
|
|
|
|
|
// 初始化蓝牙
|
|
|
|
|
// this.init();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getOption() {
|
|
|
|
|
const option = {
|
|
|
|
|
grid: { top: 8, right: 8, bottom: 24, left: 36 },
|
|
|
|
|
xAxis: {
|
|
|
|
|
type: 'category',
|
|
|
|
|
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
|
|
|
|
|
type: "category",
|
|
|
|
|
data: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"],
|
|
|
|
|
},
|
|
|
|
|
yAxis: {
|
|
|
|
|
type: 'value',
|
|
|
|
|
type: "value",
|
|
|
|
|
},
|
|
|
|
|
series: [
|
|
|
|
|
{
|
|
|
|
|
data: [820, 932, 901, 934, 1290, 1330, 1320],
|
|
|
|
|
type: 'line',
|
|
|
|
|
type: "line",
|
|
|
|
|
smooth: true,
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
tooltip: {
|
|
|
|
|
trigger: 'axis',
|
|
|
|
|
trigger: "axis",
|
|
|
|
|
},
|
|
|
|
|
// title: {
|
|
|
|
|
// text: 'ECharts 示例'
|
|
|
|
|
@ -323,8 +332,6 @@ class IotCarePlan extends Component<any, any> {
|
|
|
|
|
return option;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
async init() {
|
|
|
|
|
// 查询自定义设备指令
|
|
|
|
|
const queryInstructionParams = {
|
|
|
|
|
@ -419,9 +426,10 @@ class IotCarePlan extends Component<any, any> {
|
|
|
|
|
|
|
|
|
|
/** 选中护理模式 */
|
|
|
|
|
modeCurrentFun = async (data, isNotCheck = false) => {
|
|
|
|
|
// 是否跳过护理检查
|
|
|
|
|
// 护理检查改变模式,是否提示切换护理模式
|
|
|
|
|
// isNotCheck为真时,不进行校验,直接切换
|
|
|
|
|
this.tempModeCurrent = data;
|
|
|
|
|
if (!isNotCheck) {
|
|
|
|
|
this.tempModeCurrent = data;
|
|
|
|
|
let isReturn = this.modeRuningChange();
|
|
|
|
|
if (isReturn) return;
|
|
|
|
|
}
|
|
|
|
|
@ -471,7 +479,7 @@ class IotCarePlan extends Component<any, any> {
|
|
|
|
|
this.onStartNurse();
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
this.onNursingTap();
|
|
|
|
|
}, 1000);
|
|
|
|
|
}, 800);
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
/** 设备运行中切换模式 */
|
|
|
|
|
@ -482,23 +490,24 @@ class IotCarePlan extends Component<any, any> {
|
|
|
|
|
this.workStatus === MODE_WORKING_ENUM.WORKING
|
|
|
|
|
) {
|
|
|
|
|
const { totalWorkingMinutes, totalWorkingSeconds } = DeviceSyncData;
|
|
|
|
|
const totalTime = totalWorkingMinutes * 60 + totalWorkingSeconds;
|
|
|
|
|
const totalTime = totalWorkingMinutes * 60 + totalWorkingSeconds; // 设备时间
|
|
|
|
|
let { ActiveModeItem } = this.state;
|
|
|
|
|
if (!ActiveModeItem || totalTime === 0) {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//对比仪器上报运行的总秒数 和小程序页面运行的已经运行的总秒数,如果不一致就进行校准
|
|
|
|
|
const currentScene = ActiveModeItem; // 获取当前的场景
|
|
|
|
|
let sceneTime = minSecToS(currentScene.modeTimeStr); // 场景最小护理时间
|
|
|
|
|
|
|
|
|
|
if (
|
|
|
|
|
sceneTime <= totalTime &&
|
|
|
|
|
this.state.step == 2 &&
|
|
|
|
|
this.state.facialMaskConnectStatus == 1
|
|
|
|
|
) {
|
|
|
|
|
if (this.state.step == 2 && this.state.facialMaskConnectStatus == 1) {
|
|
|
|
|
// 提示切换护理模式
|
|
|
|
|
this.hanldeChangeNurseFun();
|
|
|
|
|
if (this.isCheckNurseTime()) {
|
|
|
|
|
// 满足时间条件,提示是否保存部分护理记录
|
|
|
|
|
this.judgementWorkStatus(
|
|
|
|
|
MODE_WORKING_ENUM.PAUSE,
|
|
|
|
|
this.state.ActiveModeItem?.modeType
|
|
|
|
|
);
|
|
|
|
|
this.setState({
|
|
|
|
|
isShowTipsSave: true,
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@ -531,29 +540,33 @@ class IotCarePlan extends Component<any, any> {
|
|
|
|
|
let { SwitchActiveModeItem, ActiveModeItem, isStandStatus } = this.state;
|
|
|
|
|
let modeArray = ["all", "visor", "cabin", "yimeish"];
|
|
|
|
|
// 切换护理模式时,需判断舱体和面罩是否切换
|
|
|
|
|
if (SwitchActiveModeItem.isCabinMode !== ActiveModeItem.isCabinMode) {
|
|
|
|
|
if (SwitchActiveModeItem.isCabinMode === 1) {
|
|
|
|
|
// 判断舱体是否连接成功
|
|
|
|
|
if (!isStandStatus) {
|
|
|
|
|
console.log(
|
|
|
|
|
"检测到面罩与舱体未连接成功,请确认面罩是否和舱体连接并接通舱体电源"
|
|
|
|
|
);
|
|
|
|
|
this.openErrorTipsText(
|
|
|
|
|
"检测到面罩与舱体未连接成功,请确认面罩是否和舱体连接并接通舱体电源"
|
|
|
|
|
);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
// 判断舱体是否断开连接
|
|
|
|
|
if (isStandStatus) {
|
|
|
|
|
console.log("检测到面罩与舱体仍在连接中,该模式需要分离面罩和舱体");
|
|
|
|
|
this.openErrorTipsText(
|
|
|
|
|
"检测到面罩与舱体仍在连接中,该模式需要分离面罩和舱体"
|
|
|
|
|
);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// if (SwitchActiveModeItem.isCabinMode !== ActiveModeItem.isCabinMode) {
|
|
|
|
|
// if (SwitchActiveModeItem.isCabinMode === 1) {
|
|
|
|
|
// // 判断舱体是否连接成功
|
|
|
|
|
// if (!isStandStatus) {
|
|
|
|
|
// console.log(
|
|
|
|
|
// "检测到面罩与舱体未连接成功,请确认面罩是否和舱体连接并接通舱体电源"
|
|
|
|
|
// );
|
|
|
|
|
// this.showTips(
|
|
|
|
|
// "检测到面罩与舱体未连接成功,请确认面罩是否和舱体连接并接通舱体电源"
|
|
|
|
|
// );
|
|
|
|
|
// // this.openErrorTipsText(
|
|
|
|
|
// // "检测到面罩与舱体未连接成功,请确认面罩是否和舱体连接并接通舱体电源"
|
|
|
|
|
// // );
|
|
|
|
|
// // return;
|
|
|
|
|
// }
|
|
|
|
|
// } else {
|
|
|
|
|
// // 判断舱体是否断开连接
|
|
|
|
|
// if (isStandStatus) {
|
|
|
|
|
// console.log("检测到面罩与舱体仍在连接中,该模式需要分离面罩和舱体");
|
|
|
|
|
// this.showTips("检测到面罩与舱体仍在连接中,该模式需要分离面罩和舱体");
|
|
|
|
|
// // this.openErrorTipsText(
|
|
|
|
|
// // "检测到面罩与舱体仍在连接中,该模式需要分离面罩和舱体"
|
|
|
|
|
// // );
|
|
|
|
|
// // return;
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
ModeType: modeArray[SwitchActiveModeItem.modeClass],
|
|
|
|
|
@ -612,9 +625,7 @@ class IotCarePlan extends Component<any, any> {
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// 绘制能量图
|
|
|
|
|
drawProwerPicture() {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
drawProwerPicture() {}
|
|
|
|
|
|
|
|
|
|
/** 切换光照 */
|
|
|
|
|
onSwitchChange = async () => {
|
|
|
|
|
@ -650,7 +661,6 @@ class IotCarePlan extends Component<any, any> {
|
|
|
|
|
this.setState({
|
|
|
|
|
facialMaskConnectStatus: true,
|
|
|
|
|
});
|
|
|
|
|
// log.info(commandMap.WL200Command, "配对成功");
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
@ -661,15 +671,32 @@ class IotCarePlan extends Component<any, any> {
|
|
|
|
|
// 附属设备是否连接支架
|
|
|
|
|
case "Stand":
|
|
|
|
|
if (jsonStatus.connectMessage?.connectType == "CONNECTED") {
|
|
|
|
|
console.log("舱体支架连接");
|
|
|
|
|
this.setState({
|
|
|
|
|
isStandStatus: true,
|
|
|
|
|
isCanClick: this.state.ActiveModeItem?.isCabinMode === 1,
|
|
|
|
|
});
|
|
|
|
|
if (!this.state.isStandStatus && this.isRuning) {
|
|
|
|
|
// 断开连接直接暂停
|
|
|
|
|
this.judgementWorkStatus(
|
|
|
|
|
MODE_WORKING_ENUM.PAUSE,
|
|
|
|
|
this.state.ActiveModeItem?.modeType
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
console.log("舱体支架断开连接");
|
|
|
|
|
if (this.state.isStandStatus && this.isRuning) {
|
|
|
|
|
// 断开连接直接暂停
|
|
|
|
|
this.judgementWorkStatus(
|
|
|
|
|
MODE_WORKING_ENUM.PAUSE,
|
|
|
|
|
this.state.ActiveModeItem?.modeType
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
isStandStatus: false,
|
|
|
|
|
isCanClick: this.state.ActiveModeItem?.isCabinMode !== 1,
|
|
|
|
|
isStopNurse: true,
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
@ -948,8 +975,7 @@ class IotCarePlan extends Component<any, any> {
|
|
|
|
|
* params 工作状态 工作模式 响应状态
|
|
|
|
|
*/
|
|
|
|
|
judgementWorkStatus(nWorkStatus, nWorkMode) {
|
|
|
|
|
const { step, isStandStatus, workMode, ActiveModeItem, ModeList } =
|
|
|
|
|
this.state;
|
|
|
|
|
const { step, workMode, ActiveModeItem, ModeList } = this.state;
|
|
|
|
|
const opts: any = {};
|
|
|
|
|
// ActiveModeItem
|
|
|
|
|
let nowModeItem;
|
|
|
|
|
@ -1022,7 +1048,7 @@ class IotCarePlan extends Component<any, any> {
|
|
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
isShowCountdown: false,
|
|
|
|
|
hadShowBreakTips: false
|
|
|
|
|
hadShowBreakTips: false,
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
pause: () => {
|
|
|
|
|
@ -1067,7 +1093,7 @@ class IotCarePlan extends Component<any, any> {
|
|
|
|
|
if (isAuto == true) {
|
|
|
|
|
// 仪器自动上报完成, 直接上报并跳转报告页
|
|
|
|
|
clearInterval(currentTimeTimer);
|
|
|
|
|
const isEnough = this.checkNurseTime();
|
|
|
|
|
const isEnough = this.isCheckNurseTime();
|
|
|
|
|
if (isEnough) {
|
|
|
|
|
this.saveNurseReport(true, "endnursing");
|
|
|
|
|
}
|
|
|
|
|
@ -1090,7 +1116,6 @@ class IotCarePlan extends Component<any, any> {
|
|
|
|
|
ModeStepIndex,
|
|
|
|
|
ActiveModeItem,
|
|
|
|
|
} = this.state;
|
|
|
|
|
console.log("resetTimer workStatus", this.workStatus);
|
|
|
|
|
if (
|
|
|
|
|
this.workStatus == MODE_WORKING_ENUM.WORKING &&
|
|
|
|
|
step == 2 &&
|
|
|
|
|
@ -1268,7 +1293,7 @@ class IotCarePlan extends Component<any, any> {
|
|
|
|
|
// 结束护理
|
|
|
|
|
endNurseFun() {
|
|
|
|
|
this.handleWorkStatus(false, "end");
|
|
|
|
|
if (this.checkNurseTime()) {
|
|
|
|
|
if (this.isCheckNurseTime()) {
|
|
|
|
|
this.PostNursingLogClock();
|
|
|
|
|
} else {
|
|
|
|
|
// 时间不满足,回到主页
|
|
|
|
|
@ -1280,21 +1305,8 @@ class IotCarePlan extends Component<any, any> {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 手动切换护理
|
|
|
|
|
hanldeChangeNurseFun() {
|
|
|
|
|
// 满足时间条件,提示是否保存部分护理记录
|
|
|
|
|
if (this.checkNurseTime()) {
|
|
|
|
|
// 打开提示保存护理弹窗
|
|
|
|
|
this.setState({
|
|
|
|
|
isShowTipsSave: true,
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
// 不满足条件,直接切换
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** 检查时间是否达标仪器最低护理时间 */
|
|
|
|
|
checkNurseTime() {
|
|
|
|
|
isCheckNurseTime() {
|
|
|
|
|
const { currentDevice, ActiveModeItem } = this.state;
|
|
|
|
|
const currentScene = ActiveModeItem;
|
|
|
|
|
let sceneTime = minSecToS(currentScene.modeTimeStr);
|
|
|
|
|
@ -1303,28 +1315,13 @@ class IotCarePlan extends Component<any, any> {
|
|
|
|
|
let nursingTimeStr = currentDevice?.nursingTimeStr;
|
|
|
|
|
let nursingTime = nursingTimeStr ? minSecToS(nursingTimeStr) : 60; // 设备生成护理记录至少需要运行时间
|
|
|
|
|
|
|
|
|
|
console.log("检查已运行时间", timeRemaining, nursingTime);
|
|
|
|
|
if (timeRemaining >= nursingTime) {
|
|
|
|
|
return true;
|
|
|
|
|
} else {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
/** 检查时间是否达标仪器最低护理时间 */
|
|
|
|
|
isCheckNurseTime(deviceItem, ModeItem) {
|
|
|
|
|
const currentScene = ModeItem;
|
|
|
|
|
let sceneTime = minSecToS(currentScene.modeTimeStr);
|
|
|
|
|
const timeRemaining = sceneTime - minSecToS(this.state.currentTime); // 当前模式已运行时间
|
|
|
|
|
|
|
|
|
|
let nursingTimeStr = deviceItem?.nursingTimeStr;
|
|
|
|
|
let nursingTime = nursingTimeStr ? minSecToS(nursingTimeStr) : 60; // 设备生成护理记录至少需要运行时间
|
|
|
|
|
|
|
|
|
|
if (timeRemaining >= nursingTime) {
|
|
|
|
|
return true;
|
|
|
|
|
} else {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*** 护理记录 START ***/
|
|
|
|
|
/** 小程序查询护理记录 */
|
|
|
|
|
getInstrumentHistoryData() {
|
|
|
|
|
@ -1670,8 +1667,8 @@ class IotCarePlan extends Component<any, any> {
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
confirmEndBtn = () => {
|
|
|
|
|
console.log("confirmEndBtn", this.checkNurseTime());
|
|
|
|
|
if (this.checkNurseTime()) {
|
|
|
|
|
console.log("confirmEndBtn", this.isCheckNurseTime());
|
|
|
|
|
if (this.isCheckNurseTime()) {
|
|
|
|
|
this.endNurseFun();
|
|
|
|
|
this.cancelEndBtn();
|
|
|
|
|
} else {
|
|
|
|
|
@ -1736,15 +1733,44 @@ class IotCarePlan extends Component<any, any> {
|
|
|
|
|
this.setState({
|
|
|
|
|
isShowTipsSave: false,
|
|
|
|
|
});
|
|
|
|
|
this.modeCurrentFun(this.tempModeCurrent, false);
|
|
|
|
|
this.modeCurrentFun(this.tempModeCurrent, true); // 不进行校验
|
|
|
|
|
};
|
|
|
|
|
confirmTipsSave = async () => {
|
|
|
|
|
this.setState({
|
|
|
|
|
isShowTipsSave: false,
|
|
|
|
|
});
|
|
|
|
|
// isShowTipsSave
|
|
|
|
|
this.PostNursingLogClock(null, false);
|
|
|
|
|
this.modeCurrentFun(this.tempModeCurrent, false);
|
|
|
|
|
this.modeCurrentFun(this.tempModeCurrent, true); // 不进行校验
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/** 初次护理信息弹窗 */
|
|
|
|
|
firstNurseInfo = async () => {
|
|
|
|
|
let { currentDevice } = this.state;
|
|
|
|
|
let res = await InstrumentInfo.firstNurseInfo({
|
|
|
|
|
instrumentId: currentDevice.id,
|
|
|
|
|
});
|
|
|
|
|
if (res.data.code === 200) {
|
|
|
|
|
let isFirstTipShow = getStorageSync(
|
|
|
|
|
"first_instrument_" + currentDevice.id
|
|
|
|
|
);
|
|
|
|
|
if (!isFirstTipShow) {
|
|
|
|
|
// 首次进入页面:自动打开打卡介绍弹窗
|
|
|
|
|
this.setState({ nurseInfo: res.data.data, isFirstTipShow: true });
|
|
|
|
|
setStorageSync("first_instrument_" + currentDevice.id, true);
|
|
|
|
|
} else {
|
|
|
|
|
this.setState({ nurseInfo: res.data.data });
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
onTipShowOpen = async () => {
|
|
|
|
|
this.setState({ isFirstTipShow: true });
|
|
|
|
|
};
|
|
|
|
|
onTipShowClose = async () => {
|
|
|
|
|
setStorageSync("first_instrument_" + this.state.currentDevice.id, "true");
|
|
|
|
|
this.setState({ isFirstTipShow: false });
|
|
|
|
|
};
|
|
|
|
|
/** 初次护理信息弹窗 END */
|
|
|
|
|
|
|
|
|
|
render() {
|
|
|
|
|
let {
|
|
|
|
|
@ -1778,6 +1804,9 @@ class IotCarePlan extends Component<any, any> {
|
|
|
|
|
currentDevice,
|
|
|
|
|
isConnectionBlutoot,
|
|
|
|
|
isShowTipsSave,
|
|
|
|
|
isFirstTipShow,
|
|
|
|
|
nurseInfo,
|
|
|
|
|
isShowReReadRecordSave,
|
|
|
|
|
} = this.state;
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
@ -1785,6 +1814,14 @@ class IotCarePlan extends Component<any, any> {
|
|
|
|
|
<Navbar titleSlot={title} isBack />
|
|
|
|
|
|
|
|
|
|
<View catchMove>
|
|
|
|
|
<PopupInstrumentUploadTips
|
|
|
|
|
isShow={isFirstTipShow}
|
|
|
|
|
title="打卡介绍"
|
|
|
|
|
data={nurseInfo}
|
|
|
|
|
close={this.onTipShowClose}
|
|
|
|
|
confirm={this.onTipShowClose}
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
<PopupCountdown isShow={isShowCountdown} countdown={countdown} />
|
|
|
|
|
|
|
|
|
|
<PopupConfirm
|
|
|
|
|
@ -1817,9 +1854,9 @@ class IotCarePlan extends Component<any, any> {
|
|
|
|
|
onEmitShowAll={this.openModeSwitch}
|
|
|
|
|
/>
|
|
|
|
|
}
|
|
|
|
|
textAlgin='center'
|
|
|
|
|
cancelButtonText='取消'
|
|
|
|
|
confirmButtonText='确定'
|
|
|
|
|
textAlgin="center"
|
|
|
|
|
cancelButtonText="取消"
|
|
|
|
|
confirmButtonText="确定"
|
|
|
|
|
close={this.cancelModeSwitchBtn}
|
|
|
|
|
confirm={this.confirmModeSwitchBtn}
|
|
|
|
|
/>
|
|
|
|
|
@ -1859,7 +1896,7 @@ class IotCarePlan extends Component<any, any> {
|
|
|
|
|
confirm={this.closeErrorTipsText}
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
<PopupAlert
|
|
|
|
|
<PopupConfirm
|
|
|
|
|
isShow={isShowTipsSave}
|
|
|
|
|
isClose
|
|
|
|
|
zIndex={10020}
|
|
|
|
|
@ -1878,6 +1915,25 @@ class IotCarePlan extends Component<any, any> {
|
|
|
|
|
confirm={this.confirmTipsSave}
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
<PopupConfirm
|
|
|
|
|
isShow={isShowReReadRecordSave}
|
|
|
|
|
isClose
|
|
|
|
|
zIndex={10020}
|
|
|
|
|
myClassName="level-up"
|
|
|
|
|
title="提示"
|
|
|
|
|
content={
|
|
|
|
|
<Block>
|
|
|
|
|
<View>检测到您上一次护理的记录未生成,</View>
|
|
|
|
|
<View>是否重新读取</View>
|
|
|
|
|
</Block>
|
|
|
|
|
}
|
|
|
|
|
cancelButtonText="取消"
|
|
|
|
|
confirmButtonText="确认"
|
|
|
|
|
textAlgin="center"
|
|
|
|
|
close={this.closeTipsSave}
|
|
|
|
|
confirm={this.confirmTipsSave}
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
<PopupStatus
|
|
|
|
|
isShow={isShowNursingSuccess}
|
|
|
|
|
isClose
|
|
|
|
|
@ -1904,12 +1960,12 @@ class IotCarePlan extends Component<any, any> {
|
|
|
|
|
</View>
|
|
|
|
|
|
|
|
|
|
<View>
|
|
|
|
|
<View className='iot-main'>
|
|
|
|
|
<View className='banner-box'>
|
|
|
|
|
<View className="iot-main">
|
|
|
|
|
<View className="banner-box">
|
|
|
|
|
<View>
|
|
|
|
|
{!isShowNurse && (
|
|
|
|
|
<Video
|
|
|
|
|
className='video-or-image'
|
|
|
|
|
className="video-or-image"
|
|
|
|
|
src={ActiveModeItem.modeVideo}
|
|
|
|
|
/>
|
|
|
|
|
)}
|
|
|
|
|
@ -1918,12 +1974,12 @@ class IotCarePlan extends Component<any, any> {
|
|
|
|
|
<Block>
|
|
|
|
|
{isStopNurse ? (
|
|
|
|
|
<Image
|
|
|
|
|
className='video-or-image'
|
|
|
|
|
className="video-or-image"
|
|
|
|
|
src={currentServiceData.stopSource}
|
|
|
|
|
/>
|
|
|
|
|
) : (
|
|
|
|
|
<Image
|
|
|
|
|
className='video-or-image'
|
|
|
|
|
className="video-or-image"
|
|
|
|
|
src={currentServiceData.startSource}
|
|
|
|
|
/>
|
|
|
|
|
)}
|
|
|
|
|
@ -1931,25 +1987,25 @@ class IotCarePlan extends Component<any, any> {
|
|
|
|
|
)}
|
|
|
|
|
{errorTips && (
|
|
|
|
|
<Block>
|
|
|
|
|
<View className='msg-tips'>
|
|
|
|
|
<View className="msg-tips">
|
|
|
|
|
<Image
|
|
|
|
|
className='msg-tips-img'
|
|
|
|
|
className="msg-tips-img"
|
|
|
|
|
src={require("../../img/tips.png")}
|
|
|
|
|
/>
|
|
|
|
|
<View className='msg-tips-content'>{errorTips}</View>
|
|
|
|
|
<View className="msg-tips-content">{errorTips}</View>
|
|
|
|
|
</View>
|
|
|
|
|
</Block>
|
|
|
|
|
)}
|
|
|
|
|
</View>
|
|
|
|
|
|
|
|
|
|
<View className='iot-device'>
|
|
|
|
|
<View className='item'>
|
|
|
|
|
<Text className='device-time'>
|
|
|
|
|
<View className="iot-device">
|
|
|
|
|
<View className="item">
|
|
|
|
|
<Text className="device-time">
|
|
|
|
|
护理时间:
|
|
|
|
|
<Text className='time'>{currentTime}</Text>
|
|
|
|
|
<Text className="time">{currentTime}</Text>
|
|
|
|
|
</Text>
|
|
|
|
|
</View>
|
|
|
|
|
<View className='line' />
|
|
|
|
|
<View className="line" />
|
|
|
|
|
<ElectricityView
|
|
|
|
|
Electricity={Electricity}
|
|
|
|
|
matrixElectricity={matrixElectricity}
|
|
|
|
|
@ -1977,7 +2033,7 @@ class IotCarePlan extends Component<any, any> {
|
|
|
|
|
ActiveModeItem={ActiveModeItem}
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
<Echarts></Echarts>
|
|
|
|
|
{/* <Echarts></Echarts> */}
|
|
|
|
|
</View>
|
|
|
|
|
|
|
|
|
|
<Footer
|
|
|
|
|
@ -1990,10 +2046,7 @@ class IotCarePlan extends Component<any, any> {
|
|
|
|
|
onEmitErrorTips={this.onEmitErrorTips}
|
|
|
|
|
/>
|
|
|
|
|
</View>
|
|
|
|
|
<Block id='ccccc' style={{ width: '300px', height: '300px' }}>66666666666666666666</Block>
|
|
|
|
|
<Block id='myBox' style={{ width: '300px', height: '300px' }}></Block>
|
|
|
|
|
|
|
|
|
|
</Block >
|
|
|
|
|
</Block>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|