|
|
|
|
@ -11,7 +11,7 @@ import React, {
|
|
|
|
|
useRef,
|
|
|
|
|
} from "react";
|
|
|
|
|
|
|
|
|
|
import Echarts from "./components/Echart/index";
|
|
|
|
|
// import Echarts from "./components/Echart/index";
|
|
|
|
|
import {
|
|
|
|
|
Block,
|
|
|
|
|
View,
|
|
|
|
|
@ -41,7 +41,7 @@ import ConnectionBluetoot from "@/components/bluetoot/connection";
|
|
|
|
|
import ElectricityView from "./components/ElectricityView/index";
|
|
|
|
|
import ModeListView from "./components/ModeList/WL200";
|
|
|
|
|
import ModeContent from "./components/ModeContent/WL200";
|
|
|
|
|
import Footer from "./components/Footer";
|
|
|
|
|
import Footer from "./components/Footer/WL200";
|
|
|
|
|
/* 本页组件 END */
|
|
|
|
|
|
|
|
|
|
import { go, getStorageSync, setStorageSync, msg } from "@/utils/traoAPI";
|
|
|
|
|
@ -240,9 +240,9 @@ class IotCarePlanWL200 extends Component<any, any> {
|
|
|
|
|
this.getWL200NursingHistory();
|
|
|
|
|
this.initData();
|
|
|
|
|
}
|
|
|
|
|
componentDidMount() { }
|
|
|
|
|
componentDidMount() {}
|
|
|
|
|
|
|
|
|
|
componentWillUnmount() { }
|
|
|
|
|
componentWillUnmount() {}
|
|
|
|
|
|
|
|
|
|
componentDidShow() {
|
|
|
|
|
console.log("页面显示了");
|
|
|
|
|
@ -572,7 +572,7 @@ class IotCarePlanWL200 extends Component<any, any> {
|
|
|
|
|
this.onNursingTap();
|
|
|
|
|
// 倒计时弹窗: 倒计时完成后,自动开始,并判断弹窗
|
|
|
|
|
let downNum = CountDownTime[this.state.ActiveModeItem.modeType] || 3;
|
|
|
|
|
this.showCountdownFun(downNum, () => { });
|
|
|
|
|
this.showCountdownFun(downNum, () => {});
|
|
|
|
|
}, 500);
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
@ -604,7 +604,7 @@ class IotCarePlanWL200 extends Component<any, any> {
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// 绘制能量图
|
|
|
|
|
drawProwerPicture() { }
|
|
|
|
|
drawProwerPicture() {}
|
|
|
|
|
|
|
|
|
|
/** 切换光照 */
|
|
|
|
|
onSwitchChange = async () => {
|
|
|
|
|
@ -1369,7 +1369,7 @@ class IotCarePlanWL200 extends Component<any, any> {
|
|
|
|
|
// 仅在切换模式的时候,弹窗倒计时.
|
|
|
|
|
if (type === "switch") {
|
|
|
|
|
let downNum = CountDownTime[ActiveModeItem.modeType] || 3;
|
|
|
|
|
this.showCountdownFun(downNum, () => { }); // 倒计时弹窗
|
|
|
|
|
this.showCountdownFun(downNum, () => {}); // 倒计时弹窗
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 开始执行护理
|
|
|
|
|
@ -2024,22 +2024,21 @@ class IotCarePlanWL200 extends Component<any, any> {
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
handleClickVideo = () => {
|
|
|
|
|
let videoRef = Taro.createVideoContext('myVideo')
|
|
|
|
|
let videoRef = Taro.createVideoContext("myVideo");
|
|
|
|
|
// 开始播放
|
|
|
|
|
videoRef.play()
|
|
|
|
|
videoRef.play();
|
|
|
|
|
// 暂停播放
|
|
|
|
|
videoRef.pause()
|
|
|
|
|
console.log('暂停播放', videoRef);
|
|
|
|
|
videoRef.pause();
|
|
|
|
|
console.log("暂停播放", videoRef);
|
|
|
|
|
};
|
|
|
|
|
handleClicksound = () => {
|
|
|
|
|
let isMuted = this.state.isMuted
|
|
|
|
|
isMuted = !isMuted
|
|
|
|
|
this.setState({ isMuted })
|
|
|
|
|
}
|
|
|
|
|
let isMuted = this.state.isMuted;
|
|
|
|
|
isMuted = !isMuted;
|
|
|
|
|
this.setState({ isMuted });
|
|
|
|
|
};
|
|
|
|
|
onPlay = (e) => {
|
|
|
|
|
console.log('出发', e);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
console.log("出发", e);
|
|
|
|
|
};
|
|
|
|
|
customBack = () => {
|
|
|
|
|
Taro.reLaunch({ url: "/pages/index/index" });
|
|
|
|
|
};
|
|
|
|
|
@ -2117,8 +2116,8 @@ class IotCarePlanWL200 extends Component<any, any> {
|
|
|
|
|
<PopupInstrumentUploadTips
|
|
|
|
|
isShow={isFirstTipShow}
|
|
|
|
|
zIndex={10020}
|
|
|
|
|
myClassName='level-up'
|
|
|
|
|
title='打卡介绍'
|
|
|
|
|
myClassName="level-up"
|
|
|
|
|
title="打卡介绍"
|
|
|
|
|
data={nurseInfo}
|
|
|
|
|
close={this.onTipShowClose}
|
|
|
|
|
confirm={this.onTipShowClose}
|
|
|
|
|
@ -2130,11 +2129,11 @@ class IotCarePlanWL200 extends Component<any, any> {
|
|
|
|
|
isLarge
|
|
|
|
|
isClose
|
|
|
|
|
isShow={isEndCarePlan}
|
|
|
|
|
title='提示'
|
|
|
|
|
content='是否结束护理'
|
|
|
|
|
textAlgin='center'
|
|
|
|
|
cancelButtonText='取消'
|
|
|
|
|
confirmButtonText='确定'
|
|
|
|
|
title="提示"
|
|
|
|
|
content="是否结束护理"
|
|
|
|
|
textAlgin="center"
|
|
|
|
|
cancelButtonText="取消"
|
|
|
|
|
confirmButtonText="确定"
|
|
|
|
|
close={this.cancelEndBtn}
|
|
|
|
|
confirm={this.confirmEndBtn}
|
|
|
|
|
/>
|
|
|
|
|
@ -2142,7 +2141,7 @@ class IotCarePlanWL200 extends Component<any, any> {
|
|
|
|
|
isLarge
|
|
|
|
|
isClose
|
|
|
|
|
isShow={isSwitchActiveMode}
|
|
|
|
|
title='护理模式切换'
|
|
|
|
|
title="护理模式切换"
|
|
|
|
|
content={
|
|
|
|
|
<ModeListView
|
|
|
|
|
ModeID={ModeID}
|
|
|
|
|
@ -2156,9 +2155,9 @@ class IotCarePlanWL200 extends Component<any, any> {
|
|
|
|
|
onModeLockOpen={this.onModeLockOpen}
|
|
|
|
|
/>
|
|
|
|
|
}
|
|
|
|
|
textAlgin='center'
|
|
|
|
|
cancelButtonText='取消'
|
|
|
|
|
confirmButtonText='确定'
|
|
|
|
|
textAlgin="center"
|
|
|
|
|
cancelButtonText="取消"
|
|
|
|
|
confirmButtonText="确定"
|
|
|
|
|
close={this.cancelModeSwitchBtn}
|
|
|
|
|
confirm={this.confirmModeSwitchBtn}
|
|
|
|
|
/>
|
|
|
|
|
@ -2168,7 +2167,7 @@ class IotCarePlanWL200 extends Component<any, any> {
|
|
|
|
|
isShow={isShowStepTips}
|
|
|
|
|
isLarge
|
|
|
|
|
isFirstEntry={false}
|
|
|
|
|
confirmButtonText='知道了'
|
|
|
|
|
confirmButtonText="知道了"
|
|
|
|
|
data={ActiveModeItem.openSourceData}
|
|
|
|
|
close={this.closeStepTips}
|
|
|
|
|
/>
|
|
|
|
|
@ -2177,10 +2176,10 @@ class IotCarePlanWL200 extends Component<any, any> {
|
|
|
|
|
<PopupAlert
|
|
|
|
|
isShow={isNotEnoughTime}
|
|
|
|
|
isClose
|
|
|
|
|
title='提示'
|
|
|
|
|
content='您的本次护理时间不足,请重新护理'
|
|
|
|
|
confirmButtonText='确认'
|
|
|
|
|
textAlgin='center'
|
|
|
|
|
title="提示"
|
|
|
|
|
content="您的本次护理时间不足,请重新护理"
|
|
|
|
|
confirmButtonText="确认"
|
|
|
|
|
textAlgin="center"
|
|
|
|
|
close={this.closeNotEnoughTime}
|
|
|
|
|
confirm={this.closeNotEnoughTime}
|
|
|
|
|
/>
|
|
|
|
|
@ -2189,11 +2188,11 @@ class IotCarePlanWL200 extends Component<any, any> {
|
|
|
|
|
isShow={isShowErrorTipsText}
|
|
|
|
|
isClose
|
|
|
|
|
zIndex={10020}
|
|
|
|
|
myClassName='level-up'
|
|
|
|
|
title='提示'
|
|
|
|
|
myClassName="level-up"
|
|
|
|
|
title="提示"
|
|
|
|
|
content={errorTipsText}
|
|
|
|
|
confirmButtonText='知道了'
|
|
|
|
|
textAlgin='center'
|
|
|
|
|
confirmButtonText="知道了"
|
|
|
|
|
textAlgin="center"
|
|
|
|
|
close={this.closeErrorTipsText}
|
|
|
|
|
confirm={this.closeErrorTipsText}
|
|
|
|
|
/>
|
|
|
|
|
@ -2202,17 +2201,17 @@ class IotCarePlanWL200 extends Component<any, any> {
|
|
|
|
|
isShow={isShowTipsSave}
|
|
|
|
|
isClose
|
|
|
|
|
zIndex={10020}
|
|
|
|
|
myClassName='level-up'
|
|
|
|
|
title='提示'
|
|
|
|
|
myClassName="level-up"
|
|
|
|
|
title="提示"
|
|
|
|
|
content={
|
|
|
|
|
<Block>
|
|
|
|
|
<View>当前模式已护理部分时间</View>
|
|
|
|
|
<View>是否保存护理记录</View>
|
|
|
|
|
</Block>
|
|
|
|
|
}
|
|
|
|
|
cancelButtonText='取消'
|
|
|
|
|
confirmButtonText='确认'
|
|
|
|
|
textAlgin='center'
|
|
|
|
|
cancelButtonText="取消"
|
|
|
|
|
confirmButtonText="确认"
|
|
|
|
|
textAlgin="center"
|
|
|
|
|
close={this.closeTipsSave}
|
|
|
|
|
cancel={this.cancelTipsSave}
|
|
|
|
|
confirm={this.confirmTipsSave}
|
|
|
|
|
@ -2221,11 +2220,11 @@ class IotCarePlanWL200 extends Component<any, any> {
|
|
|
|
|
<PopupStatus
|
|
|
|
|
isShow={isShowNursingSuccess}
|
|
|
|
|
isClose
|
|
|
|
|
title='您已结束本次护理'
|
|
|
|
|
type='success'
|
|
|
|
|
content='正在上传护理记录……'
|
|
|
|
|
confirmButtonText='知道了'
|
|
|
|
|
textAlgin='center'
|
|
|
|
|
title="您已结束本次护理"
|
|
|
|
|
type="success"
|
|
|
|
|
content="正在上传护理记录……"
|
|
|
|
|
confirmButtonText="知道了"
|
|
|
|
|
textAlgin="center"
|
|
|
|
|
close={() => {
|
|
|
|
|
/*不需要做处理*/
|
|
|
|
|
}}
|
|
|
|
|
@ -2236,52 +2235,51 @@ class IotCarePlanWL200 extends Component<any, any> {
|
|
|
|
|
deviceInfo={currentDevice}
|
|
|
|
|
close={this.connectionClose}
|
|
|
|
|
isDisconnect={!isConnectionBlutoot}
|
|
|
|
|
offlineChange={() => { }}
|
|
|
|
|
offlineChange={() => {}}
|
|
|
|
|
pairingChange={this.pairingChange}
|
|
|
|
|
upgradeFun={() => { }}
|
|
|
|
|
upgradeFun={() => {}}
|
|
|
|
|
/>
|
|
|
|
|
)}
|
|
|
|
|
|
|
|
|
|
<Popup
|
|
|
|
|
show={isShowHistoryMsg}
|
|
|
|
|
className='custom-popup'
|
|
|
|
|
className="custom-popup"
|
|
|
|
|
overlay={false}
|
|
|
|
|
>
|
|
|
|
|
<View className='sync-history-msg'>正在同步护理记录...</View>
|
|
|
|
|
<View className="sync-history-msg">正在同步护理记录...</View>
|
|
|
|
|
</Popup>
|
|
|
|
|
</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}
|
|
|
|
|
loop
|
|
|
|
|
|
|
|
|
|
id="myVideo"
|
|
|
|
|
|
|
|
|
|
// ref={videoRef}
|
|
|
|
|
onPlay={this.onPlay}
|
|
|
|
|
muted={isMuted}
|
|
|
|
|
/>
|
|
|
|
|
)}
|
|
|
|
|
<button onClick={this.handleClicksound}>音频播放/音频暂停</button>
|
|
|
|
|
|
|
|
|
|
<button onClick={this.handleClicksound}>
|
|
|
|
|
音频播放/音频暂停
|
|
|
|
|
</button>
|
|
|
|
|
|
|
|
|
|
{/* <button onClick={this.handleClickVideo}>播放/暂停</button> */}
|
|
|
|
|
{isShowNurse && (
|
|
|
|
|
<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}
|
|
|
|
|
/>
|
|
|
|
|
)}
|
|
|
|
|
@ -2289,25 +2287,25 @@ class IotCarePlanWL200 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}
|
|
|
|
|
@ -2338,7 +2336,7 @@ class IotCarePlanWL200 extends Component<any, any> {
|
|
|
|
|
/>
|
|
|
|
|
)}
|
|
|
|
|
|
|
|
|
|
<Echarts></Echarts>
|
|
|
|
|
{/* <Echarts></Echarts> */}
|
|
|
|
|
</View>
|
|
|
|
|
|
|
|
|
|
<Footer
|
|
|
|
|
|