master
rongweikang 2 years ago
commit 6cba4cc658

@ -53,17 +53,16 @@
"@tarojs/plugin-platform-weapp": "3.6.19",
"@tarojs/react": "3.6.19",
"@tarojs/runtime": "3.6.19",
"@tarojs/shared": "3.6.19",
"@tarojs/shared": "3.6.19",
"@tarojs/taro": "3.6.19",
"@visactor/taro-vchart": "^1.9.0",
"dayjs": "^1.11.10",
"echarts": "^5.5.0",
"lodash": "^4.17.15",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-redux": "^9.0.3",
"taro-ui": "^3.2.0",
"taro-react-echarts": "^1.2.2"
"taro-react-echarts": "^1.2.2",
"taro-ui": "^3.2.0"
},
"devDependencies": {
"@babel/core": "^7.8.0",

@ -149,7 +149,7 @@ export default class DeviceConnectPopup extends Component<any, any> {
</Block>
)}
</View>
<View className="block2">
{/* <View className="block2">
{connectionSuccess ? (
<Block>
<View className="icon">
@ -175,7 +175,7 @@ export default class DeviceConnectPopup extends Component<any, any> {
</View>
</Block>
)}
</View>
</View> */}
</View>
<View className="common-popup-btns">
<Button

@ -40,7 +40,7 @@ export default class Navbar extends Component<any, any> {
if (!this.props.isCustomBack) {
back();
} else {
this.props.customBack();
this.props.customBack(); // 具体页面自定义返回逻辑
}
};
@ -49,8 +49,7 @@ export default class Navbar extends Component<any, any> {
success: (res) => {
const statusBarHeight = res.statusBarHeight || 0;
// 获取微信胶囊的位置信息 width,height,top,right,left,bottom
// const custom = Taro.getMenuButtonBoundingClientRect();
const custom = { height: 60, top: 20 };
const custom = Taro.getMenuButtonBoundingClientRect();
// 导航栏高度(标题栏高度) = 胶囊高度 + (顶部距离 - 状态栏高度) * 2
const navigationBarHeight =
custom.height + (custom.top - statusBarHeight) * 2;

@ -62,3 +62,9 @@
font-family: PingFang SC;
}
}
.instrument-swiper-step {
width: 600rpx;
height: 720rpx;
margin: 0 auto;
}

@ -71,9 +71,7 @@ export default class PopupInstrumentUploadTips extends Component<any, any> {
}
this.setState({ current });
}
onClickSwiperItem(item) {
goJump(item);
}
onFinish(event) {
const { current } = event.detail;
const { toRight, isClick } = this.state;
@ -94,7 +92,7 @@ export default class PopupInstrumentUploadTips extends Component<any, any> {
onNext = async () => {
let { current } = this.state;
if (current === this.props.data.length) {
if (current === this.props.data.length - 1) {
this.onClose();
} else {
this.setState({ current: current + 1 });
@ -122,42 +120,29 @@ export default class PopupInstrumentUploadTips extends Component<any, any> {
></View>
<View className={classnames("common-box upload-tips-common-box")}>
<View className="site-popup-content-box">
<Swiper
className="absolutely"
style="width: 600rpx;height: 720rpx"
current={current}
onChange={this.onChange.bind(this)}
onAnimationFinish={this.onFinish.bind(this)}
duration={800}
indicatorDots={false}
indicatorColor="#999"
indicatorActiveColor="#333"
disableTouch={true} // 禁止滑动
>
<View className="absolutely instrument-swiper-step">
{data.map((item, index) => {
return (
<SwiperItem
className="absolutely"
onClick={this.onClickSwiperItem.bind(this, item)}
key={"swiper_" + index}
>
<View
style={{
width: "100%",
height: "600rpx",
}}
>
<Image
className="cover"
src={item.file}
mode="aspectFit"
></Image>
current === index && (
<View className="absolutely" key={"swiper_" + index}>
<View
style={{
width: "100%",
height: "600rpx",
}}
>
<Image
className="cover"
src={item.file}
mode="aspectFit"
></Image>
</View>
<View className="tips-message">{item.message}</View>
</View>
<View className="tips-message">{item.message}</View>
</SwiperItem>
)
);
})}
</Swiper>
</View>
</View>
<View>
@ -170,15 +155,19 @@ export default class PopupInstrumentUploadTips extends Component<any, any> {
)}
{data.length > 1 && current === 0 && (
<View className="popup-btn-one">
<Button className="popup-btn" onClick={this.onPrev}>
<Button className="popup-btn" onClick={this.onNext}>
</Button>
</View>
)}
{data.length > 1 && (
{data.length > 1 && current > 0 && (
<View className="common-popup-btns">
<Button className="common-popup-btn2" onClick={this.onPrev}>
{current > 0 && current < data.length - 1 && "上一步"}
<Button
className="common-popup-btn2"
style="color:#000"
onClick={this.onPrev}
>
</Button>
<Button className="common-popup-btn2" onClick={this.onNext}>
{current > 0 && current < data.length - 1 && "下一步"}

@ -85,7 +85,7 @@ export default class PopupStepTips extends Component<any, any> {
onNext = async () => {
let { current } = this.state;
if (current === this.props.data.length) {
if (current === this.props.data.length - 1) {
this.onClose();
} else {
this.setState({ current: current + 1 });
@ -146,57 +146,54 @@ export default class PopupStepTips extends Component<any, any> {
</View>
)} */}
<View className="step-popup-content-box">
<Swiper
className="step-absolutely"
current={current}
duration={800}
indicatorDots={false}
indicatorColor="#999"
indicatorActiveColor="#333"
disableTouch={true} // 禁止滑动
>
<View className="absolutely instrument-swiper-step">
{data.map((item, index) => {
return (
<SwiperItem className="absolutely" key={"swiper_" + index}>
<View className="step-img">
<Image
className="cover"
src={item.openSourceUrl}
mode="aspectFit"
></Image>
current === index && (
<View className="absolutely" key={"swiper_" + index}>
<View
style={{
width: "100%",
height: "600rpx",
}}
>
<Image
className="cover"
src={item.openSourceUrl}
mode="aspectFit"
></Image>
</View>
<View className="tips-message">{item.openContent}</View>
</View>
<View className="tips-message">{item.openContent}</View>
</SwiperItem>
)
);
})}
</Swiper>
</View>
</View>
<View>
{data.length === 1 && (
<View className="popup-btn-one">
{isFirstEntry ? (
<Button className="popup-btn" onClick={this.onConfirm}>
{confirmButtonText}
</Button>
) : (
<Button className="popup-btn" onClick={this.onClose}>
{confirmButtonText}
</Button>
)}
<Button className="popup-btn" onClick={this.onClose}>
</Button>
</View>
)}
{data.length > 1 && current === 0 && (
<View className="popup-btn-one">
<Button className="popup-btn" onClick={this.onPrev}>
<Button className="popup-btn" onClick={this.onNext}>
</Button>
</View>
)}
{data.length > 1 && (
{data.length > 1 && current > 0 && (
<View className="common-popup-btns">
<Button className="common-popup-btn2" onClick={this.onPrev}>
{current > 0 && current < data.length - 1 && "上一步"}
<Button
className="common-popup-btn2"
style="color:#000"
onClick={this.onPrev}
>
</Button>
<Button className="common-popup-btn2" onClick={this.onNext}>
{current > 0 && current < data.length - 1 && "下一步"}

@ -7,6 +7,7 @@ import Navbar from "../../components/navbar/navbar";
import "./consultant.less";
import { getContactWorker } from "../../utils/Interface";
import { back } from "@/utils/traoAPI";
export default class Consultant extends Component<any, any> {
constructor(props) {
@ -16,6 +17,7 @@ export default class Consultant extends Component<any, any> {
pictureUrl: "",
};
}
$instance = Taro.getCurrentInstance();
async onLoad() {
this.initData();
@ -36,11 +38,25 @@ export default class Consultant extends Component<any, any> {
}
}
customBack = () => {
let customBack = this.$instance.router?.params?.customBack;
if (customBack) {
Taro.switchTab({ url: "/pages/index/index" });
return;
}
back();
};
render() {
const { pictureUrl } = this.state;
return (
<Block>
<Navbar titleSlot="联系客服" isBack={true} />
<Navbar
titleSlot="联系客服"
isBack={true}
isCustomBack
customBack={this.customBack}
/>
<View className="img">
<Image
src={pictureUrl}

@ -55,20 +55,16 @@ import {
setStorageSync,
showModal,
} from "@/utils/traoAPI";
import commandMap from "@/utils/commandMap";
import InstrumentTypeEnum from "@/components/bluetoot/InstrumentTypeEnum";
import OtaDeviceTypeEnum from "@/components/bluetoot/OtaDeviceTypeEnum";
// const log = require("@/utils/log");
class Index extends Component<any, any> {
// pageCtx = Taro.getCurrentInstance().page;
$instance = Taro.getCurrentInstance();
constructor(props) {
super(props);
this.state = {
showEquipment: false, // 扫码绑定设备弹窗
isRegisterBoolean: false, // 是否已登录
isShowPrivacyPopup: false,
isShowSiteSwiper: false,
@ -146,8 +142,6 @@ class Index extends Component<any, any> {
}
async onLoad() {
console.log(1123131233);
// 仅非扫码进入页面时,校验跳转欢迎页
if (!this.$instance.router?.params?.q) {
const isFirst = Taro.getStorageSync("isWelcome");
@ -155,9 +149,10 @@ class Index extends Component<any, any> {
go("/pages/initiate/initiate");
}
}
if (Taro.getStorageSync("skip")) {
// 判断是否跳过了注册
if (Taro.getStorageSync("skipRegister")) {
this.setState({ showEquipment: true });
Taro.removeStorageSync("skip");
Taro.removeStorageSync("skipRegister");
}
}
@ -490,6 +485,10 @@ class Index extends Component<any, any> {
instrumentInfo.bindingStatus === 1 ||
instrumentInfo.bindingStatus === 2
) {
// 判断是否已绑定同名仪器,如果已绑定,判断序列号是否一致
// 如果自己已绑定,判断扫码序列号和已绑定序列号是否一致,如果一致:忽略
// 如果自己已绑定,判断扫码序列号和已绑定序列号是否一致,如果不一致:提示换绑
// 以上逻辑交给后端处理,直接查询是否绑定或换绑
setTimeout(() => {
this.isBindingSerial();
}, 100);
@ -539,7 +538,7 @@ class Index extends Component<any, any> {
if (data.code === 200) {
msg("绑定成功");
setTimeout(() => {
go("/pages/instrument/intro?id=" + instrumentInfo.id);
go("/pages/instrument/intro??customBack=true&id=" + instrumentInfo.id);
}, 2000);
return;
} else if (data.code === 202) {
@ -553,6 +552,7 @@ class Index extends Component<any, any> {
}
};
// 换绑仪器
exchangeBinding = async () => {
Taro.showLoading({
title: "请求中...",
@ -575,7 +575,7 @@ class Index extends Component<any, any> {
};
onBindErrorConfirm = () => {
this.onBindErrorClose();
go("/pages/consultant/consultant");
go("/pages/consultant/consultant?customBack=true");
};
onBeforeBindClose = () => {
this.setState({ isBeforeBinding: false });
@ -750,6 +750,7 @@ class Index extends Component<any, any> {
instrumentInfo,
instrumentList,
showEquipment,
bindEquipment,
// 升级弹窗
isShowUpdateVersionTip,
@ -765,6 +766,25 @@ class Index extends Component<any, any> {
return (
<Block>
<View catchMove>
{/* <PopupConfirm
isShow={isShowBindConfirm}
isClose
zIndex={10020}
myClassName="level-up"
title="提示"
content={
<Block>
<View>{}</View>
<View>{}</View>
<View>{}</View>
</Block>
}
cancelButtonText="暂不绑定"
confirmButtonText="确认"
textAlgin="center"
close={this.closeBindConfirm}
confirm={this.confirmBindConfirm}
/> */}
<PopupAlert
isShow={isBindingError}
title="提示"
@ -845,8 +865,10 @@ class Index extends Component<any, any> {
title="提示"
content={
<Block>
<View className="mb10"></View>
<View className="mb10">uniquie14231</View>
<View className="mb10">
{instrumentInfo.instrumentName}
</View>
<View className="mb10">{instrumentInfo.serial}</View>
<View className="mb10"></View>
</Block>
}

@ -25,6 +25,7 @@ import { getImgInfo, contraction } from "@/utils/compressImage";
/* 自定义组件 */
import Navbar from "@/components/navbar/navbar";
import PopupAlert from "@/components/popup/popup-alert";
import PopupBinding from "@/components/popup/popup-binding";
/* 组件 */
import "./instrument.less";
@ -61,6 +62,10 @@ export default class Instrument extends Component<any, any> {
userinfo: null,
showLoginPopup: "",
fromUrl: "",
isVisibleBinding: false,
isRegisterBoolean: false,
isExchangeBinding: false,
};
}
$instance = Taro.getCurrentInstance();
@ -183,10 +188,19 @@ export default class Instrument extends Component<any, any> {
const { channelInfo } = this.state;
if (channelInfo.id === item.id) return;
channelInfo.serialCode = "";
channelInfo.manualCodeBinding = "";
channelInfo.scanCodeBinding = "";
this.setState({
channelInfo: item,
channelInfo: channelInfo,
isVideo: this.isVideo(item.banner),
});
setTimeout(() => {
this.setState({
channelInfo: item,
});
}, 10);
}
closeDev = () => {
@ -248,7 +262,7 @@ export default class Instrument extends Component<any, any> {
console.log("bindingInstrument", res);
Taro.hideLoading();
if (res.code === 200) {
this.binding();
this.openBindingVisible();
} else if (res.code === 204) {
this.setState({ isBindingCheckError: false });
} else {
@ -267,7 +281,8 @@ export default class Instrument extends Component<any, any> {
});
Taro.hideLoading();
if (res.data.code === 200) {
this.binding();
// this.bindingInstrument();
this.openBindingVisible();
} else if (res.data.code === 204) {
this.setState({ isBindingCheckError: true });
} else {
@ -275,7 +290,8 @@ export default class Instrument extends Component<any, any> {
}
};
binding = async () => {
// 调用绑定接口
bindingInstrument = async () => {
Taro.showLoading({
title: "请求中...",
mask: true,
@ -297,6 +313,24 @@ export default class Instrument extends Component<any, any> {
this.setState({ isBindingError: true });
}
};
// 换绑仪器
exchangeBinding = async () => {
Taro.showLoading({
title: "请求中...",
mask: true,
});
let { channelInfo } = this.state;
let { data } = await InstrumentInfo.exchangeBinding({
serial: channelInfo.serialCode,
});
console.log("exchangeBinding", data);
Taro.hideLoading();
this.closeBinding();
if (data.code !== 200) {
//todo
}
};
onBindErrorClose = () => {
this.setState({ isBindingError: false });
};
@ -313,6 +347,25 @@ export default class Instrument extends Component<any, any> {
Taro.switchTab({ url: "/pages/index/index" });
};
// 打开绑定弹窗
openBindingVisible = () => {
this.setState({ isVisibleBinding: true });
};
closeBinding = () => {
this.setState({ isVisibleBinding: false });
};
confirmBinding = () => {
let { isExchangeBinding } = this.state;
if (!isExchangeBinding) {
// 绑定仪器
this.bindingInstrument();
} else {
// 换绑仪器
this.exchangeBinding();
}
};
render() {
let {
isBindingError,
@ -321,6 +374,9 @@ export default class Instrument extends Component<any, any> {
inputType,
style,
equipmentList,
isVisibleBinding,
isRegisterBoolean,
isExchangeBinding,
} = this.state;
return (
<Block>
@ -340,6 +396,16 @@ export default class Instrument extends Component<any, any> {
isCustomBack
customBack={this.customBack}
/>
<PopupBinding
type={channelInfo.bindingStatus}
isShow={isVisibleBinding}
isRegisterBoolean={isRegisterBoolean}
isExchangeBinding={isExchangeBinding}
data={channelInfo}
close={this.closeBinding}
confirm={this.confirmBinding}
/>
<PopupAlert
isShow={isBindingError}
title="提示"

@ -12,12 +12,12 @@ import {
} from "@tarojs/components";
/* 自定义组件 */
import Navbar from "../../components/navbar/navbar";
import Navbar from "@/components/navbar/navbar";
// import PopupAlert from "../../components/popup/popup-alert";
/* 组件 */
import { InstrumentInfo } from "../../utils/Interface";
import { setStorageSync, getStorageSync, go } from "../../utils/traoAPI";
import { InstrumentInfo } from "@/utils/Interface";
import { setStorageSync, getStorageSync, go, back } from "@/utils/traoAPI";
import "./intro.less";
@ -32,6 +32,7 @@ class Intro extends Component<any, any> {
isNursing: false,
};
}
$instance = Taro.getCurrentInstance();
async onLoad() {}
componentDidMount() {}
@ -93,11 +94,25 @@ class Intro extends Component<any, any> {
});
}
customBack = () => {
let customBack = this.$instance.router?.params?.customBack;
if (customBack) {
Taro.switchTab({ url: "/pages/index/index" });
return;
}
back();
};
render() {
let { current, introList, instrument } = this.state;
return (
<Block>
<Navbar titleSlot="仪器绑定" isBack={true} />
<Navbar
titleSlot="仪器绑定"
isBack
isCustomBack
customBack={this.customBack}
/>
<View style="position: relative">
<Swiper
className="main"

@ -87,14 +87,10 @@ export default class InstrumentClickInUpload extends Component<any, any> {
let instrumentDetail = JSON.parse(objStr);
this.setState({ instrumentDetail });
}
const searchParams = new URLSearchParams(window.location.search);
const id = searchParams.get("id");
setTimeout(() => {
this.firstNurseInfo();
this.getLatestClockRecord();
this.modeInfoList(id);
this.modeInfoList(this.state.instrumentDetail.id);
}, 10);
}
@ -119,8 +115,10 @@ export default class InstrumentClickInUpload extends Component<any, any> {
let { punchInInfo } = this.state;
let res = await InstrumentInfo.apiClock.getLatestClockRecord();
if (res.data.code === 200) {
punchInInfo.clockContent = res.data.data.clockContent;
punchInInfo.clockImageList = res.data.data.clockImg;
if (res.data.data) {
punchInInfo.clockContent = res.data.data.clockContent;
punchInInfo.clockImageList = res.data.data.clockImg;
}
}
this.setState({ punchInInfo });
};

@ -5,18 +5,18 @@ import { useState, useEffect } from "react";
import "./index.less";
interface Props {
isCanClick: boolean;
isShowNurse: boolean;
isStopNurse: boolean;
isDisabled: boolean; // 是否禁用开始暂停按钮:模式与连接设备是否一致
onEmitStartNurse: Function; // 每次点击item回调事件和数据给父组件
onEmitSwitchChange: Function;
onEmitEndPlan: Function;
onEmitErrorTips: Function; // 不可点击,提示错误
}
function Index({
isCanClick,
isShowNurse,
isStopNurse,
isDisabled,
onEmitStartNurse,
onEmitSwitchChange,
onEmitEndPlan,
@ -27,7 +27,9 @@ function Index({
};
const onSwitchChange = () => {
onEmitSwitchChange();
if (!isDisabled) {
onEmitSwitchChange();
}
};
const onEndPlan = () => {
@ -43,12 +45,12 @@ function Index({
<View className="footer">
{!isShowNurse && (
<Block>
{isCanClick ? (
<View className="btn" onClick={onStartNurse}>
{isDisabled ? (
<View className="btn btn-disable" onClick={onStartNurse}>
</View>
) : (
<View className="btn btn-disable" onClick={onStartNurse}>
<View className="btn" onClick={onStartNurse}>
</View>
)}
@ -56,7 +58,7 @@ function Index({
)}
{isShowNurse && (
<View className="switch-btn-box">
{isCanClick && (
{!isDisabled && (
<View className="btn-item border-right" onClick={onSwitchChange}>
{isStopNurse ? (
<Block>
@ -79,8 +81,11 @@ function Index({
)}
</View>
)}
{!isCanClick && (
<View className="btn-item border-right" onClick={onErrorTips}>
{isDisabled && (
<View
className="btn-item border-right btn-disable"
onClick={onErrorTips}
>
{isStopNurse ? (
<Block>
<Image

@ -105,7 +105,11 @@ function Index({
{activeModeID === item.id && (
<View className="mode-pic">
<Image src={item.modeBanner} mode="aspectFill" />
<Image
src={item.modeBanner}
mode="aspectFill"
style="animation-iteration-count:1;"
/>
</View>
)}
</View>
@ -159,7 +163,11 @@ function Index({
{activeModeID === item.id && (
<View className="mode-pic">
<Image src={item.modeBanner} mode="aspectFill" />
<Image
src={item.modeBanner}
mode="aspectFill"
style="animation-iteration-count:1;"
/>
</View>
)}
</View>
@ -213,7 +221,11 @@ function Index({
{activeModeID === item.id && (
<View className="mode-pic">
<Image src={item.modeBanner} mode="aspectFill" />
<Image
src={item.modeBanner}
mode="aspectFill"
style="animation-iteration-count:1;"
/>
</View>
)}
</View>

@ -32,6 +32,7 @@
width: 690rpx;
height: 640rpx;
border-radius: 30rpx;
animation-iteration-count: 1; // gif只播放一次
}
.iot-device {
width: 690rpx;
@ -86,6 +87,7 @@
background-color: rgba(0, 0, 0, 0.5);
box-sizing: border-box;
border-radius: 30rpx;
z-index: 10100 !important; // 提升层级,防止被其他元素遮挡
.msg-tips-img {
width: 30rpx;
height: 30rpx;

@ -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);
@ -165,7 +169,6 @@ class IotCarePlan extends Component<any, any> {
/** 连接设备 End */
/** 护理过程 */
isCanClick: false, // 是否可以点击开始按钮/启动暂停
isStandStatus: false, // 当前模式是否舱体/支架模式
isShowStepTips: false, // 是否显示介绍步骤弹窗
isConnectionBlutoot: true, // 是否已连接蓝牙
@ -176,7 +179,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 +212,21 @@ class IotCarePlan extends Component<any, any> {
isShowNursingSuccess: false, // 护理成功弹窗
isShowTipsSave: false, // 切换模式时,提示是否保存部分护理记录
// 初次护理弹窗
isFirstTipShow: false,
nurseInfo: [],
// 上一次护理记录未生成,是否继续连接设备
isShowReReadRecordConnect: false,
// 按钮是否可运行
isFooterBtnDisabled: false,
};
}
// 不涉及渲染的页面变量
isRuning: any = false; // 设备是否运行中
jsonStatus: any = {}; // 同步设备返回数据,用于结束
tempModeCurrent: any = {}; // 临时保存的当前模式
elapsedTime: any = 0; // 设备已运行时间
@ -231,7 +245,7 @@ class IotCarePlan extends Component<any, any> {
}
componentDidMount() {}
componentWillUnmount() { }
componentWillUnmount() {}
componentDidShow() {
console.log("页面显示了");
@ -266,9 +280,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 +295,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 +334,6 @@ class IotCarePlan extends Component<any, any> {
return option;
}
async init() {
// 查询自定义设备指令
const queryInstructionParams = {
@ -364,6 +373,7 @@ class IotCarePlan extends Component<any, any> {
isConnectionBlutoot: false, // 断开蓝牙
isShowCountdown: false, // 关闭倒计时,防止倒计时还在运行
});
this.footerIsDisabled();
};
GetModeList = async (id) => {
@ -419,23 +429,24 @@ class IotCarePlan extends Component<any, any> {
/** 选中护理模式 */
modeCurrentFun = async (data, isNotCheck = false) => {
// 是否跳过护理检查
// 护理检查改变模式,是否提示切换护理模式
// isNotCheck为真时不进行校验直接切换
this.tempModeCurrent = data;
this.footerIsDisabled();
if (!isNotCheck) {
this.tempModeCurrent = data;
let isReturn = this.modeRuningChange();
if (isReturn) return;
}
let { isStandStatus, isShowNurse } = this.state;
// 舱体模式无法对应的时候,置灰开始按钮
let isCabinMode = data.isCabinMode === 1;
if (isStandStatus === isCabinMode) {
this.setState({ isCanClick: true }); // 是否舱体一致时,可以点击
} else {
this.setState({ isCanClick: false });
}
console.log("isStandStatus", isStandStatus, isCabinMode);
console.log("isStandStatus === isCabinMode", isStandStatus === isCabinMode);
// let isCabinMode = data.isCabinMode === 1;
// if (isStandStatus === isCabinMode) {
// this.setState({ isCanClick: true }); // 是否舱体一致时,可以点击
// } else {
// this.setState({ isCanClick: false });
// }
let currentServiceData = {
startSource: "",
@ -471,7 +482,7 @@ class IotCarePlan extends Component<any, any> {
this.onStartNurse();
setTimeout(() => {
this.onNursingTap();
}, 1000);
}, 800);
}
};
/** 设备运行中切换模式 */
@ -482,23 +493,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 +543,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],
@ -582,22 +598,19 @@ class IotCarePlan extends Component<any, any> {
};
/** 开始护理按钮:点击开始,页面进行到下一步 */
onStartNurse = async () => {
// 开发者工具
// const platform = Taro.getSystemInfoSync().platform;
// if (platform === "devtools") {
// // 仅开发者工具,直接运行
// this.stepNext();
// }
let { isStandStatus, ActiveModeItem } = this.state;
let isCabinMode = ActiveModeItem.isCabinMode === 1;
if (isStandStatus === isCabinMode) {
// 如果检查通过,可运行,则执行下一步
if (!this.footerIsDisabled()) {
this.stepNext();
return;
}
// 如果检查失败,则报错
this.onEmitErrorTips();
};
/** 不可切换光照提示 */
/**
* @name
* @description isCabinMode 0. 1.
*/
onEmitErrorTips = async () => {
let { isStandStatus, ActiveModeItem } = this.state;
if (isStandStatus) {
@ -612,9 +625,7 @@ class IotCarePlan extends Component<any, any> {
};
// 绘制能量图
drawProwerPicture() {
}
drawProwerPicture() {}
/** 切换光照 */
onSwitchChange = async () => {
@ -642,38 +653,76 @@ class IotCarePlan extends Component<any, any> {
/** 蓝牙相关 */
switchBLEMatch = (jsonStatus: any) => {
console.log("蓝牙相关", jsonStatus);
let { ActiveModeItem } = this.state;
switch (jsonStatus.bleCommandType) {
// 如果设备配对链接发送配对码的时候,设备应答小程序配对码是否正确。
case "SendMatchCode":
if (jsonStatus.matchedSuccess) {
console.log("设备配对成功");
this.setState({
facialMaskConnectStatus: true,
facialMaskConnectStatus: 1,
});
// log.info(commandMap.WL200Command, "配对成功");
}
break;
// 附属设备状态主动上报,这种指令是主机主动上报某个附属设备断开或者连上了
// 设备状态主动上报,这种指令是主机主动上报某个附属设备断开或者连上了
case "BleStatusSync":
console.log("BleStatusSync 附属设备状态主动上报", jsonStatus);
switch (jsonStatus.connectMessage?.deviceName) {
case "WL200":
if (jsonStatus.connectMessage?.connectType == "CONNECTED") {
} else {
// 清除时间倒计时定时器
this.setState({
facialMaskConnectStatus: 0, // 蓝牙断开
isFooterBtnDisabled: false, // 蓝牙断开所以不可点击
});
// 断开连接直接暂停
this.judgementWorkStatus(
MODE_WORKING_ENUM.PAUSE,
ActiveModeItem?.modeType
);
// 设备断开时,给定一个断开时间
ActiveModeItem.breakTimeStr = this.state.currentTime;
}
break;
// 附属设备是否连接支架
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,
ActiveModeItem?.modeType
);
}
} else {
console.log("舱体支架断开连接");
if (this.state.isStandStatus && this.isRuning) {
// 断开连接直接暂停
this.judgementWorkStatus(
MODE_WORKING_ENUM.PAUSE,
ActiveModeItem?.modeType
);
}
// 设备断开时,给定一个断开时间
ActiveModeItem.breakTimeStr = this.state.currentTime;
this.setState({
isStandStatus: false,
isCanClick: this.state.ActiveModeItem?.isCabinMode !== 1,
isStopNurse: true,
ActiveModeItem,
});
}
break;
default:
console.log("监听到到设备连接状态改变 this.footerIsDisabled()");
this.footerIsDisabled(); // 判断底部运行按钮是否可点击
break;
}
break;
@ -687,9 +736,6 @@ class IotCarePlan extends Component<any, any> {
console.log("支架是否链接", isStandDevice);
this.setState({
isStandStatus: isStandDevice,
isCanClick: isStandDevice
? this.state.ActiveModeItem?.isCabinMode === 1
: this.state.ActiveModeItem?.isCabinMode !== 1,
});
// 连上面罩后, 获取仪器记录, 与缓存信息对比
@ -754,25 +800,34 @@ class IotCarePlan extends Component<any, any> {
"设备主动上报给小程序的指令 一般是工作状态改变",
jsonStatus
);
this.workStatus = jsonStatus.workStatus;
this.setState({
Electricity: jsonStatus.battery,
// fr200Electricity: jsonStatus.battery,
matrixElectricity: jsonStatus.matrixBattery,
workMode: jsonStatus?.workMode,
});
// 判断是否在step == 2(护理中)
if (
this.state.step == 2 &&
jsonStatus.workStatus !== MODE_WORKING_ENUM.END
) {
this.updateDeviceSyncData(
{
totalWorkingMinutes: jsonStatus.totalWorkingMinutes,
totalWorkingSeconds: jsonStatus.totalWorkingSeconds,
},
jsonStatus
);
if (jsonStatus?.workMode === this.state.ActiveModeItem.modeType) {
this.setState({
workMode: jsonStatus?.workMode, // 仅当设备上报模式与小程序一致时,才允许改变小程序变量缓存
});
// 判断是否在step == 2(护理中)
// 仅当设备模式与小程序是否一致,才允许更改设备运行时间
if (
this.state.facialMaskConnectStatus === 1 &&
this.state.step == 2 &&
jsonStatus.workStatus !== MODE_WORKING_ENUM.END
) {
this.updateDeviceSyncData(
{
totalWorkingMinutes: jsonStatus.totalWorkingMinutes,
totalWorkingSeconds: jsonStatus.totalWorkingSeconds,
},
jsonStatus
);
}
}
if (
@ -948,8 +1003,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 +1076,7 @@ class IotCarePlan extends Component<any, any> {
this.setState({
isShowCountdown: false,
hadShowBreakTips: false
hadShowBreakTips: false,
});
},
pause: () => {
@ -1067,7 +1121,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,16 +1144,25 @@ 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 &&
facialMaskConnectStatus == 1
) {
let totalSeconds = minSecToS(ActiveModeItem.modeTimeStr);
let currentSeconds = minSecToS(currentTime);
// 现在的倒计时剩余时间:同步时检查是否断开重连,如果是,则使用断开的剩余时长,进行倒计时计算
let currentSeconds = ActiveModeItem?.breakTimeStr
? minSecToS(ActiveModeItem.breakTimeStr)
: minSecToS(currentTime);
let checkTime = totalSeconds - currentSeconds;
this.elapsedTime = checkTime;
// 完成重连同步则删除重连时间字段
if (ActiveModeItem?.breakTimeStr) {
delete ActiveModeItem?.breakTimeStr;
this.setState({ ActiveModeItem });
}
// 判断剩余时间是否大于1
if (currentSeconds >= 1) {
// 小程序显示倒计时
this.setState({
@ -1130,6 +1193,8 @@ class IotCarePlan extends Component<any, any> {
currentServiceData
);
this.updateWL200NursingHistory(currentServiceData);
this.setState({
ModeStepIndex: index,
currentServiceData,
@ -1197,6 +1262,8 @@ class IotCarePlan extends Component<any, any> {
*
*/
onNursingTap() {
// 如果已禁止运行,则停止执行后续逻辑
if (this.state.isFooterBtnDisabled) return;
// 防止多次点击
if (this.state.hadClickStart) return;
this.setState({
@ -1268,7 +1335,7 @@ class IotCarePlan extends Component<any, any> {
// 结束护理
endNurseFun() {
this.handleWorkStatus(false, "end");
if (this.checkNurseTime()) {
if (this.isCheckNurseTime()) {
this.PostNursingLogClock();
} else {
// 时间不满足,回到主页
@ -1280,21 +1347,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 +1357,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() {
@ -1410,7 +1449,8 @@ class IotCarePlan extends Component<any, any> {
let totalSeconds = jsonStatus.totalSeconds; // 从仪器上获取的使用时间
let neededTotalSeconds = jsonStatus.neededTotalSeconds; // 从仪器上获取的使用时间
console.log(
"从仪器上获取的使用时间 neededTotalSeconds",
"从仪器上获取的使用时间 totalSeconds: %d neededTotalSeconds: %d",
totalSeconds,
neededTotalSeconds
);
let nursingTimeStr = currentDevice?.nursingTimeStr;
@ -1481,6 +1521,32 @@ class IotCarePlan extends Component<any, any> {
Taro.setStorageSync("WL200NursingHistory", params);
console.log("保存setWL200NursingHistory");
};
/** 更新WL200护理历史运行时间 */
updateWL200NursingHistory = (data: any = null) => {
this.WL200NursingHistory = Taro.getStorageSync("WL200NursingHistory");
if (this.WL200NursingHistory) {
let params: any = this.WL200NursingHistory;
params.currentTime = this.state.currentTime;
// 设置正确封面
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;
}
Taro.setStorageSync("WL200NursingHistory", params);
console.log("更新updateWL200NursingHistory");
}
};
/** 删除WL200护理历史 */
rmWL200NursingHistory = (WL200NursingHistory, hard = false) => {
const nowWL200NursingHistory = Taro.getStorageSync("WL200NursingHistory");
@ -1670,8 +1736,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,14 +1802,60 @@ 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 */
/**
* @name
* @description
* @returns true
*/
footerIsDisabled = () => {
let { isStandStatus } = this.state;
let isCanClick = isStandStatus
? this.tempModeCurrent?.isCabinMode === 1
: this.tempModeCurrent?.isCabinMode === 0;
let isFooterBtnDisabled = !(isStandStatus === isCanClick);
this.setState({
isFooterBtnDisabled: isFooterBtnDisabled,
});
return isFooterBtnDisabled; // 数据更新有延迟,返回用于判断
};
render() {
@ -1778,6 +1890,10 @@ class IotCarePlan extends Component<any, any> {
currentDevice,
isConnectionBlutoot,
isShowTipsSave,
isFirstTipShow,
nurseInfo,
isShowReReadRecordSave,
isFooterBtnDisabled,
} = this.state;
return (
@ -1785,6 +1901,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 +1941,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 +1983,7 @@ class IotCarePlan extends Component<any, any> {
confirm={this.closeErrorTipsText}
/>
<PopupAlert
<PopupConfirm
isShow={isShowTipsSave}
isClose
zIndex={10020}
@ -1878,6 +2002,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 +2047,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 +2061,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 +2074,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,11 +2120,11 @@ class IotCarePlan extends Component<any, any> {
ActiveModeItem={ActiveModeItem}
/>
<Echarts></Echarts>
{/* <Echarts></Echarts> */}
</View>
<Footer
isCanClick={isCanClick}
isDisabled={isFooterBtnDisabled}
isShowNurse={isShowNurse}
isStopNurse={isStopNurse}
onEmitStartNurse={this.onStartNurse}
@ -1990,10 +2133,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>
);
}
}

@ -104,7 +104,7 @@ export default class Recording extends Component<any, any> {
let res = await InstrumentInfo.apiClock.getLatestClockRecord();
if (res.data.code === 200) {
if (!res.data.data) {
this.setShow(true);
// this.setShow(true);
} else {
let punchInInfo = {
clockImageList: res.data.data.clockImg,

@ -55,7 +55,9 @@ class Register extends Component<any, any> {
url: "/pages/index/index",
});
};
back() {
skipRegister() {
// 跳过注册
Taro.setStorageSync("skipRegister", true);
Taro.navigateBack({
delta: 1,
});
@ -210,7 +212,7 @@ class Register extends Component<any, any> {
>
</Button>
<View className="text" onClick={this.back}>
<View className="text" onClick={this.skipRegister}>
&gt;
</View>
</View>

Loading…
Cancel
Save