水分测试bug

master
qsj 2 years ago
parent ab7e221405
commit 3a1f88f494

@ -67,482 +67,7 @@ import {
import commandMap from "@/utils/commandMap";
import { Popup } from "@antmjs/vantui";
import { fr200BleCommand } from "@/components/bluetoot/connection/fr200";
let datajson = {
ActiveModeItem: {
beganVideo: null,
combineData: [],
id: 154,
instrumentModel: "FR200",
instrumentType: 2,
isCabinMode: null,
isNew: 0,
lock: false,
lockCompanyTag: null,
lockCompanyTagArray: [],
lockWechatTag: null,
lockWechatTagArray: [],
modeBanner: "https://flossom.yq-h5.cn/image//statics/2024/03/14/v2-3b7111f4ac41cf4a139fba4f0cc54f21_720w_20240314175626A632.jpg",
modeClass: 1,
modeDesc: "基础班脸部",
modeName: "基础班脸部",
modeTime: "00:02:00",
modeTimeStr: "02:00",
modeType: "face",
modeVideo: "https://flossom.yq-h5.cn/image//statics/2024/03/14/497728332_nb2-1-16_20240314175725A633.mp4",
openSourceData: [],
pauseVideo: null,
preparationVideo: null,
serviceData: null,
status: 0,
},
currentServiceData: {
createBy: null,
createTime: "2024-03-15 14:15:14",
id: 169,
modeId: 154,
remark: null,
serviceEndTime: "00:02:00",
serviceEndTimeStr: "02:00",
serviceStartTime: "00:00:00",
serviceStartTimeStr: "00:00",
startSource: "https://flossom.yq-h5.cn/image//statics/2024/03/14/v2-5363f74dedf1bb14baf92e09744e49c9_720w_20240314180057A635.gif",
startTimeArray: null,
stopSource: "https://flossom.yq-h5.cn/image//statics/2024/03/14/v2-0584e53b800e6ed28b4a228fedb8cb8d_720w_20240314180040A634.gif",
updateBy: null,
updateTime: null,
currentTime: "00:00",
},
dataArray: [
{
battery: 4,
commandType: "DeviceStatusSync",
deviceSyncStatusType: "onlySyncStatusToDevice",
gear: 1,
impedance: 5,
isCharging: false,
joulePerSecond: 1,
matrixBattery: 0,
nasolabialOrMandibularOutput: false,
partition: 0,
pointOutChangeSide: false,
totalWorkingMinutes: 2,
totalWorkingSeconds: 1,
workMode: "face",
workStatus: "standby",
},
{
battery: 4,
commandType: "DeviceStatusSync",
deviceSyncStatusType: "onlySyncStatusToDevice",
gear: 1,
impedance: 211,
isCharging: false,
joulePerSecond: 1,
matrixBattery: 0,
nasolabialOrMandibularOutput: false,
partition: 0,
pointOutChangeSide: false,
totalWorkingMinutes: 2,
totalWorkingSeconds: 1,
workMode: "face",
workStatus: "standby",
}, {
battery: 4,
commandType: "DeviceStatusSync",
deviceSyncStatusType: "onlySyncStatusToDevice",
gear: 1,
impedance: 21,
isCharging: false,
joulePerSecond: 1,
matrixBattery: 0,
nasolabialOrMandibularOutput: false,
partition: 0,
pointOutChangeSide: false,
totalWorkingMinutes: 2,
totalWorkingSeconds: 1,
workMode: "face",
workStatus: "working",
}, {
battery: 4,
commandType: "DeviceStatusSync",
deviceSyncStatusType: "onlySyncStatusToDevice",
gear: 1,
impedance: 21,
isCharging: false,
joulePerSecond: 1,
matrixBattery: 0,
nasolabialOrMandibularOutput: false,
partition: 0,
pointOutChangeSide: false,
totalWorkingMinutes: 2,
totalWorkingSeconds: 1,
workMode: "face",
workStatus: "standby",
}, {
battery: 4,
commandType: "DeviceStatusSync",
deviceSyncStatusType: "onlySyncStatusToDevice",
gear: 1,
impedance: 251,
isCharging: false,
joulePerSecond: 1,
matrixBattery: 0,
nasolabialOrMandibularOutput: false,
partition: 0,
pointOutChangeSide: false,
totalWorkingMinutes: 2,
totalWorkingSeconds: 1,
workMode: "face",
workStatus: "working",
},
{
battery: 4,
commandType: "DeviceStatusSync",
deviceSyncStatusType: "onlySyncStatusToDevice",
gear: 1,
impedance: 321,
isCharging: false,
joulePerSecond: 1,
matrixBattery: 0,
nasolabialOrMandibularOutput: false,
partition: 0,
pointOutChangeSide: false,
totalWorkingMinutes: 2,
totalWorkingSeconds: 1,
workMode: "face",
workStatus: "working",
},
{
battery: 4,
commandType: "DeviceStatusSync",
deviceSyncStatusType: "onlySyncStatusToDevice",
gear: 1,
impedance: 271,
isCharging: false,
joulePerSecond: 1,
matrixBattery: 0,
nasolabialOrMandibularOutput: false,
partition: 0,
pointOutChangeSide: false,
totalWorkingMinutes: 2,
totalWorkingSeconds: 1,
workMode: "face",
workStatus: "working",
},
{
battery: 4,
commandType: "DeviceStatusSync",
deviceSyncStatusType: "onlySyncStatusToDevice",
gear: 1,
impedance: 219,
isCharging: false,
joulePerSecond: 1,
matrixBattery: 0,
nasolabialOrMandibularOutput: false,
partition: 0,
pointOutChangeSide: false,
totalWorkingMinutes: 2,
totalWorkingSeconds: 1,
workMode: "face",
workStatus: "working",
},
{
battery: 4,
commandType: "DeviceStatusSync",
deviceSyncStatusType: "onlySyncStatusToDevice",
gear: 1,
impedance: 271,
isCharging: false,
joulePerSecond: 1,
matrixBattery: 0,
nasolabialOrMandibularOutput: false,
partition: 0,
pointOutChangeSide: false,
totalWorkingMinutes: 2,
totalWorkingSeconds: 1,
workMode: "face",
workStatus: "working",
},
{
battery: 4,
commandType: "DeviceStatusSync",
deviceSyncStatusType: "onlySyncStatusToDevice",
gear: 1,
impedance: 421,
isCharging: false,
joulePerSecond: 1,
matrixBattery: 0,
nasolabialOrMandibularOutput: false,
partition: 0,
pointOutChangeSide: false,
totalWorkingMinutes: 2,
totalWorkingSeconds: 1,
workMode: "face",
workStatus: "working",
},
{
battery: 4,
commandType: "DeviceStatusSync",
deviceSyncStatusType: "onlySyncStatusToDevice",
gear: 1,
impedance: 251,
isCharging: false,
joulePerSecond: 1,
matrixBattery: 0,
nasolabialOrMandibularOutput: false,
partition: 0,
pointOutChangeSide: false,
totalWorkingMinutes: 2,
totalWorkingSeconds: 1,
workMode: "face",
workStatus: "working",
},
{
battery: 4,
commandType: "DeviceStatusSync",
deviceSyncStatusType: "onlySyncStatusToDevice",
gear: 1,
impedance: 231,
isCharging: false,
joulePerSecond: 1,
matrixBattery: 0,
nasolabialOrMandibularOutput: false,
partition: 0,
pointOutChangeSide: false,
totalWorkingMinutes: 2,
totalWorkingSeconds: 1,
workMode: "face",
workStatus: "working",
},
{
battery: 4,
commandType: "DeviceStatusSync",
deviceSyncStatusType: "onlySyncStatusToDevice",
gear: 1,
impedance: 211,
isCharging: false,
joulePerSecond: 1,
matrixBattery: 0,
nasolabialOrMandibularOutput: false,
partition: 0,
pointOutChangeSide: false,
totalWorkingMinutes: 2,
totalWorkingSeconds: 1,
workMode: "face",
workStatus: "working",
},
{
battery: 4,
commandType: "DeviceStatusSync",
deviceSyncStatusType: "onlySyncStatusToDevice",
gear: 1,
impedance: 261,
isCharging: false,
joulePerSecond: 1,
matrixBattery: 0,
nasolabialOrMandibularOutput: false,
partition: 0,
pointOutChangeSide: false,
totalWorkingMinutes: 2,
totalWorkingSeconds: 1,
workMode: "face",
workStatus: "working",
},
{
battery: 4,
commandType: "DeviceStatusSync",
deviceSyncStatusType: "onlySyncStatusToDevice",
gear: 1,
impedance: 261,
isCharging: false,
joulePerSecond: 1,
matrixBattery: 0,
nasolabialOrMandibularOutput: false,
partition: 0,
pointOutChangeSide: false,
totalWorkingMinutes: 2,
totalWorkingSeconds: 1,
workMode: "face",
workStatus: "working",
},
{
battery: 4,
commandType: "DeviceStatusSync",
deviceSyncStatusType: "onlySyncStatusToDevice",
gear: 1,
impedance: 721,
isCharging: false,
joulePerSecond: 1,
matrixBattery: 0,
nasolabialOrMandibularOutput: false,
partition: 0,
pointOutChangeSide: false,
totalWorkingMinutes: 2,
totalWorkingSeconds: 1,
workMode: "face",
workStatus: "working",
},
{
battery: 4,
commandType: "DeviceStatusSync",
deviceSyncStatusType: "onlySyncStatusToDevice",
gear: 1,
impedance: 121,
isCharging: false,
joulePerSecond: 1,
matrixBattery: 0,
nasolabialOrMandibularOutput: false,
partition: 0,
pointOutChangeSide: false,
totalWorkingMinutes: 2,
totalWorkingSeconds: 1,
workMode: "face",
workStatus: "working",
},
{
battery: 4,
commandType: "DeviceStatusSync",
deviceSyncStatusType: "onlySyncStatusToDevice",
gear: 1,
impedance: 321,
isCharging: false,
joulePerSecond: 1,
matrixBattery: 0,
nasolabialOrMandibularOutput: false,
partition: 0,
pointOutChangeSide: false,
totalWorkingMinutes: 2,
totalWorkingSeconds: 1,
workMode: "face",
workStatus: "working",
},
{
battery: 4,
commandType: "DeviceStatusSync",
deviceSyncStatusType: "onlySyncStatusToDevice",
gear: 1,
impedance: 221,
isCharging: false,
joulePerSecond: 1,
matrixBattery: 0,
nasolabialOrMandibularOutput: false,
partition: 0,
pointOutChangeSide: false,
totalWorkingMinutes: 2,
totalWorkingSeconds: 1,
workMode: "face",
workStatus: "working",
},
{
battery: 4,
commandType: "DeviceStatusSync",
deviceSyncStatusType: "onlySyncStatusToDevice",
gear: 1,
impedance: 216,
isCharging: false,
joulePerSecond: 1,
matrixBattery: 0,
nasolabialOrMandibularOutput: false,
partition: 0,
pointOutChangeSide: false,
totalWorkingMinutes: 2,
totalWorkingSeconds: 1,
workMode: "face",
workStatus: "working",
},
{
battery: 4,
commandType: "DeviceStatusSync",
deviceSyncStatusType: "onlySyncStatusToDevice",
gear: 1,
impedance: 212,
isCharging: false,
joulePerSecond: 1,
matrixBattery: 0,
nasolabialOrMandibularOutput: false,
partition: 0,
pointOutChangeSide: false,
totalWorkingMinutes: 2,
totalWorkingSeconds: 1,
workMode: "face",
workStatus: "working",
},
{
battery: 4,
commandType: "DeviceStatusSync",
deviceSyncStatusType: "onlySyncStatusToDevice",
gear: 1,
impedance: 211,
isCharging: false,
joulePerSecond: 1,
matrixBattery: 0,
nasolabialOrMandibularOutput: false,
partition: 0,
pointOutChangeSide: false,
totalWorkingMinutes: 2,
totalWorkingSeconds: 1,
workMode: "face",
workStatus: "working",
},
{
battery: 4,
commandType: "DeviceStatusSync",
deviceSyncStatusType: "onlySyncStatusToDevice",
gear: 1,
impedance: 721,
isCharging: false,
joulePerSecond: 1,
matrixBattery: 0,
nasolabialOrMandibularOutput: false,
partition: 0,
pointOutChangeSide: false,
totalWorkingMinutes: 2,
totalWorkingSeconds: 1,
workMode: "face",
workStatus: "working",
},
{
battery: 4,
commandType: "DeviceStatusSync",
deviceSyncStatusType: "onlySyncStatusToDevice",
gear: 1,
impedance: 121,
isCharging: false,
joulePerSecond: 1,
matrixBattery: 0,
nasolabialOrMandibularOutput: false,
partition: 0,
pointOutChangeSide: false,
totalWorkingMinutes: 2,
totalWorkingSeconds: 1,
workMode: "face",
workStatus: "working",
},
],
id: "2024-03-18 15:50:39",
instrumentId: 92,
instrumentName: "lzw的FR200测试",
jsonStatus: {
battery: 4,
commandType: "DeviceStatusSync",
deviceSyncStatusType: "onlySyncStatusToDevice",
gear: 1,
impedance: 21,
isCharging: false,
joulePerSecond: 1,
matrixBattery: 0,
nasolabialOrMandibularOutput: false,
partition: 0,
pointOutChangeSide: false,
totalWorkingMinutes: 2,
totalWorkingSeconds: 1,
workMode: "face",
workStatus: "standby",
},
modeId: 154,
modeName: "基础班脸部",
workMode: "face",
}
const deviceToolKitInstanceFR200 = new DeviceToolKitWM("FR200");
let deviceToolKitInstance = deviceToolKitInstanceFR200;
@ -628,7 +153,7 @@ class IotCarePlanFR200 extends Component<any, any> {
}, // 当前选中模式
SwitchActiveModeItem: {}, // 切换选中模式
ModeID: "mode_", // 模式KEY
activeModeID: "", // 当前选中模式ID:用于高亮
activeModeID: "154", // 当前选中模式ID:用于高亮
ModeStepIndex: 0, // 当前护理功效步骤:每个步骤时间不定,所以时间另外计算,根据步骤显示
ModeStepTimeArray: [], // 护理功效时间步骤用于切换显示GIF
currentServiceData: {
@ -704,6 +229,13 @@ class IotCarePlanFR200 extends Component<any, any> {
BaseModeType: string[] = ["face", "eyes"];
async onLoad(option) {
console.log(option,'跳转过来的数据');
if (option.modeId) {
this.setState({ activeModeID: option.modeId })
setTimeout(() => {
console.log(this.state,'查看');
})
}
// 保持屏幕常亮
Taro.setKeepScreenOn({
keepScreenOn: true,
@ -711,9 +243,7 @@ class IotCarePlanFR200 extends Component<any, any> {
this.initData();
this.getInstrumentClockSummary();
this.getInstrumentClockDetail();
if (option.modeId) {
this.setState({ activeModeID: option.modeId })
}
}
componentDidMount() { }
@ -845,6 +375,7 @@ class IotCarePlanFR200 extends Component<any, any> {
instrumentId: id,
};
let res = await InstrumentInfo.modeInfoList(params);
if (res.data.code === 200) {
if (res.data.data.length > 0) {
this.setState({
@ -861,9 +392,9 @@ class IotCarePlanFR200 extends Component<any, any> {
}
})
}
let res1= res.data.data.find(e =>e.id == this.state.activeModeID)
setTimeout(() => {
this.modeCurrentFun(res.data.data[0]);
this.modeCurrentFun(res1);
}, 100);
} else {
this.setState({ ModeList: [] });
@ -903,7 +434,7 @@ class IotCarePlanFR200 extends Component<any, any> {
/** 选中护理模式 */
modeCurrentFun = async (data, isNotCheck = false) => {
let { isShowNurse } = this.state;
let { isShowNurse,activeModeID } = this.state;
// 护理检查改变模式,是否提示切换护理模式
// isNotCheck为真时不进行校验直接切换
this.tempModeCurrent = data;
@ -930,7 +461,7 @@ class IotCarePlanFR200 extends Component<any, any> {
}
let currentTime = data.modeTimeStr;
this.setState({
ActiveModeItem: data,
activeModeID: data.id,
@ -946,6 +477,8 @@ class IotCarePlanFR200 extends Component<any, any> {
if (data.serviceData.length > 0) {
this.setServiceTimeData();
}
});
// 开发中,暂时允许直接切换
@ -1032,6 +565,7 @@ class IotCarePlanFR200 extends Component<any, any> {
};
// 弹窗确定切换护理模式
confirmModeSwitchBtn = () => {
let { SwitchActiveModeItem } = this.state;
this.cancelModeSwitchBtn();
this.modeCurrentFun(SwitchActiveModeItem);

@ -26,12 +26,14 @@ function Index({
onEmitShowAll,
onModeLockOpen,
}: Props) {
let BaseList = ModeList.filter((item) => item.modeClass === 1); // 基础护理
let ZoneList = ModeList.filter((item) => item.modeClass === 2); // 专区护理
let PermeationList = ModeList.filter((item) => item.modeClass === 3); // 专研促渗
let SensitiveList = ModeList.filter((item) => item.modeClass === 4); // 敏感期护理
let IntelligenceList = ModeList.filter((item) => item.modeClass === 5); // 智能测肤
console.log(activeModeID,'查看id',BaseList,ModeList);
const onItemClick = (item) => {
if (item.lock) {
onModeLockOpen(); // 点击了锁定模式

@ -294,21 +294,17 @@ export default class Recording extends Component<any, any> {
setStorageSync("instrument_detail", instrument);
}
})
switch (item.jumpType) {
case 1:
this.One(item);
break;
case 2:
this.two(item);
break;
case 6:
this.three(item);
break;
default:
this.AllDevice(item);
if ([1,2,3,4,5].includes(item.jumpType)) {
this.One(item);
} else if (item.jumpType === 0) {
this.two(item);
} else if (item.jumpType === 6) {
this.three(item);
} else {
this.AllDevice(item);
}
// let report =false
// go("/pages/face_report/face_report?id=" + id + "&recordId=" + recordId+ "&report=" + report );
}

Loading…
Cancel
Save