|
|
|
|
@ -148,13 +148,12 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
isModeLock: false, // 模式是否锁定
|
|
|
|
|
isSwitchActiveMode: false, // 是否显示弹窗切换模式
|
|
|
|
|
ModeList: [],
|
|
|
|
|
ModeType: "all", // all
|
|
|
|
|
modeClass: "", // 1基础护理 2专区护理 3专研促渗 4敏期护理 5智能测肤
|
|
|
|
|
ModeType: "all", // all 1基础护理 2专区护理 3专研促渗 4敏期护理 5智能测肤
|
|
|
|
|
ActiveModeItem: {
|
|
|
|
|
openSourceData: [],
|
|
|
|
|
}, // 当前选中模式
|
|
|
|
|
SwitchActiveModeItem: {}, // 切换选中模式
|
|
|
|
|
ModeID: "base_", // 模式KEY
|
|
|
|
|
ModeID: "mode_", // 模式KEY
|
|
|
|
|
activeModeID: "", // 当前选中模式ID:用于高亮
|
|
|
|
|
ModeStepIndex: 0, // 当前护理功效步骤:每个步骤时间不定,所以时间另外计算,根据步骤显示
|
|
|
|
|
ModeStepTimeArray: [], // 护理功效时间步骤,用于切换显示GIF
|
|
|
|
|
@ -380,6 +379,7 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
this.setState({
|
|
|
|
|
ModeList: res.data.data, // 模式列表
|
|
|
|
|
ActiveModeItem: res.data.data[0], // 让模式列表正常显示
|
|
|
|
|
ModeType: this.ModeTypeArray[res.data.data[0].modeClass],
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
if (this.state.activeModeID != "") {
|
|
|
|
|
@ -453,14 +453,6 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
if (isReturn) return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let currentServiceData = {
|
|
|
|
|
startSource: "",
|
|
|
|
|
stopSource: "",
|
|
|
|
|
};
|
|
|
|
|
if (data.serviceData.length) {
|
|
|
|
|
currentServiceData = data.serviceData[0];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let currentTime = data.modeTimeStr;
|
|
|
|
|
|
|
|
|
|
// 根据模式,动态设置底部按钮样式
|
|
|
|
|
@ -478,20 +470,12 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
ActiveModeItem: data,
|
|
|
|
|
activeModeID: data.id,
|
|
|
|
|
ModeID: "mode_" + data.id,
|
|
|
|
|
currentServiceData,
|
|
|
|
|
ModeStepIndex: 0,
|
|
|
|
|
ModeType: this.ModeTypeArray[data.modeClass],
|
|
|
|
|
currentTime,
|
|
|
|
|
currentWorkModeType,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
// 设置时间组合
|
|
|
|
|
if (data.serviceData.length > 0) {
|
|
|
|
|
this.setServiceTimeData();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// 开发中,暂时允许直接切换
|
|
|
|
|
// 每次切换模式时清空一下历史数据
|
|
|
|
|
this.changeItemUpdateFR200NursingHistory();
|
|
|
|
|
@ -1190,7 +1174,6 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
);
|
|
|
|
|
this.setState({
|
|
|
|
|
ModeStepIndex: index,
|
|
|
|
|
currentServiceData,
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@ -1417,7 +1400,7 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
|
|
|
|
|
// 仪器缓存模式,判断是否存在于现有模式中
|
|
|
|
|
let recordModeItem = ModeList.find((item) => {
|
|
|
|
|
return item.id == FR200NursingHistory.currentServiceData.modeId;
|
|
|
|
|
return item.id == FR200NursingHistory.modeId;
|
|
|
|
|
});
|
|
|
|
|
if (!FR200NursingHistory || !recordModeItem) {
|
|
|
|
|
console.log("仪器有数据, 但是缓存没有数据, 忽略");
|
|
|
|
|
@ -1517,7 +1500,7 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
this.setState({
|
|
|
|
|
isShowNurse: true,
|
|
|
|
|
isShowHistoryMsg: true,
|
|
|
|
|
currentServiceData: this.FR200NursingHistory.currentServiceData,
|
|
|
|
|
videoTime: this.FR200NursingHistory.videoTime,
|
|
|
|
|
tempModeCurrent: ActiveModeItem,
|
|
|
|
|
ActiveModeItem: ActiveModeItem,
|
|
|
|
|
activeModeID: ActiveModeItem.id,
|
|
|
|
|
@ -1560,21 +1543,10 @@ class IotCarePlanFR200 extends Component<any, any> {
|
|
|
|
|
|
|
|
|
|
// 设置当前时间
|
|
|
|
|
params.currentTime = this.state.currentTime;
|
|
|
|
|
// params.videoTime;
|
|
|
|
|
|
|
|
|
|
// 设置正确封面
|
|
|
|
|
if (data) {
|
|
|
|
|
params.currentServiceData = data;
|
|
|
|
|
} else {
|
|
|
|
|
let currentServiceData = {
|
|
|
|
|
startSource: "",
|
|
|
|
|
stopSource: "",
|
|
|
|
|
};
|
|
|
|
|
let serviceLength = this.state.ActiveModeItem.serviceData.length;
|
|
|
|
|
if (serviceLength > 0) {
|
|
|
|
|
currentServiceData = this.state.ActiveModeItem.serviceData[0];
|
|
|
|
|
}
|
|
|
|
|
params.currentServiceData = currentServiceData;
|
|
|
|
|
|
|
|
|
|
if (!data) {
|
|
|
|
|
if (jsonStatus) {
|
|
|
|
|
// 缓存每秒数据
|
|
|
|
|
if (!params.dataArray) params.dataArray = [];
|
|
|
|
|
|