master
rongweikang 2 years ago
parent 99e964313e
commit 99cdfc9d39

@ -10,10 +10,10 @@ import React, {
useState, useState,
} from "react"; } from "react";
// import Echarts from "./components/Echart/index"; import Echarts from "./components/Echart/index";
import { import {
Block, Block,
View, View,
Text, Text,
Image, Image,
Video, Video,
@ -235,9 +235,9 @@ class IotCarePlanWL200 extends Component<any, any> {
this.getWL200NursingHistory(); this.getWL200NursingHistory();
this.initData(); this.initData();
} }
componentDidMount() {} componentDidMount() { }
componentWillUnmount() {} componentWillUnmount() { }
componentDidShow() { componentDidShow() {
console.log("页面显示了"); console.log("页面显示了");
@ -568,7 +568,7 @@ class IotCarePlanWL200 extends Component<any, any> {
this.onNursingTap(); this.onNursingTap();
// 倒计时弹窗: 倒计时完成后,自动开始,并判断弹窗 // 倒计时弹窗: 倒计时完成后,自动开始,并判断弹窗
let downNum = CountDownTime[this.state.ActiveModeItem.modeType] || 3; let downNum = CountDownTime[this.state.ActiveModeItem.modeType] || 3;
this.showCountdownFun(downNum, () => {}); this.showCountdownFun(downNum, () => { });
}, 500); }, 500);
return; return;
@ -600,7 +600,7 @@ class IotCarePlanWL200 extends Component<any, any> {
}; };
// 绘制能量图 // 绘制能量图
drawProwerPicture() {} drawProwerPicture() { }
/** 切换光照 */ /** 切换光照 */
onSwitchChange = async () => { onSwitchChange = async () => {
@ -1365,7 +1365,7 @@ class IotCarePlanWL200 extends Component<any, any> {
// 仅在切换模式的时候,弹窗倒计时. // 仅在切换模式的时候,弹窗倒计时.
if (type === "switch") { if (type === "switch") {
let downNum = CountDownTime[ActiveModeItem.modeType] || 3; let downNum = CountDownTime[ActiveModeItem.modeType] || 3;
this.showCountdownFun(downNum, () => {}); // 倒计时弹窗 this.showCountdownFun(downNum, () => { }); // 倒计时弹窗
} }
// 开始执行护理 // 开始执行护理
@ -2075,8 +2075,8 @@ class IotCarePlanWL200 extends Component<any, any> {
<PopupInstrumentUploadTips <PopupInstrumentUploadTips
isShow={isFirstTipShow} isShow={isFirstTipShow}
zIndex={10020} zIndex={10020}
myClassName="level-up" myClassName='level-up'
title="打卡介绍" title='打卡介绍'
data={nurseInfo} data={nurseInfo}
close={this.onTipShowClose} close={this.onTipShowClose}
confirm={this.onTipShowClose} confirm={this.onTipShowClose}
@ -2088,11 +2088,11 @@ class IotCarePlanWL200 extends Component<any, any> {
isLarge isLarge
isClose isClose
isShow={isEndCarePlan} isShow={isEndCarePlan}
title="提示" title='提示'
content="是否结束护理" content='是否结束护理'
textAlgin="center" textAlgin='center'
cancelButtonText="取消" cancelButtonText='取消'
confirmButtonText="确定" confirmButtonText='确定'
close={this.cancelEndBtn} close={this.cancelEndBtn}
confirm={this.confirmEndBtn} confirm={this.confirmEndBtn}
/> />
@ -2100,7 +2100,7 @@ class IotCarePlanWL200 extends Component<any, any> {
isLarge isLarge
isClose isClose
isShow={isSwitchActiveMode} isShow={isSwitchActiveMode}
title="护理模式切换" title='护理模式切换'
content={ content={
<ModeListView <ModeListView
ModeID={ModeID} ModeID={ModeID}
@ -2113,9 +2113,9 @@ class IotCarePlanWL200 extends Component<any, any> {
onEmitShowAll={this.openModeSwitch} onEmitShowAll={this.openModeSwitch}
/> />
} }
textAlgin="center" textAlgin='center'
cancelButtonText="取消" cancelButtonText='取消'
confirmButtonText="确定" confirmButtonText='确定'
close={this.cancelModeSwitchBtn} close={this.cancelModeSwitchBtn}
confirm={this.confirmModeSwitchBtn} confirm={this.confirmModeSwitchBtn}
/> />
@ -2125,7 +2125,7 @@ class IotCarePlanWL200 extends Component<any, any> {
isShow={isShowStepTips} isShow={isShowStepTips}
isLarge isLarge
isFirstEntry={false} isFirstEntry={false}
confirmButtonText="知道了" confirmButtonText='知道了'
data={ActiveModeItem.openSourceData} data={ActiveModeItem.openSourceData}
close={this.closeStepTips} close={this.closeStepTips}
/> />
@ -2134,10 +2134,10 @@ class IotCarePlanWL200 extends Component<any, any> {
<PopupAlert <PopupAlert
isShow={isNotEnoughTime} isShow={isNotEnoughTime}
isClose isClose
title="提示" title='提示'
content="您的本次护理时间不足,请重新护理" content='您的本次护理时间不足,请重新护理'
confirmButtonText="确认" confirmButtonText='确认'
textAlgin="center" textAlgin='center'
close={this.closeNotEnoughTime} close={this.closeNotEnoughTime}
confirm={this.closeNotEnoughTime} confirm={this.closeNotEnoughTime}
/> />
@ -2146,11 +2146,11 @@ class IotCarePlanWL200 extends Component<any, any> {
isShow={isShowErrorTipsText} isShow={isShowErrorTipsText}
isClose isClose
zIndex={10020} zIndex={10020}
myClassName="level-up" myClassName='level-up'
title="提示" title='提示'
content={errorTipsText} content={errorTipsText}
confirmButtonText="知道了" confirmButtonText='知道了'
textAlgin="center" textAlgin='center'
close={this.closeErrorTipsText} close={this.closeErrorTipsText}
confirm={this.closeErrorTipsText} confirm={this.closeErrorTipsText}
/> />
@ -2159,17 +2159,17 @@ class IotCarePlanWL200 extends Component<any, any> {
isShow={isShowTipsSave} isShow={isShowTipsSave}
isClose isClose
zIndex={10020} zIndex={10020}
myClassName="level-up" myClassName='level-up'
title="提示" title='提示'
content={ content={
<Block> <Block>
<View></View> <View></View>
<View></View> <View></View>
</Block> </Block>
} }
cancelButtonText="取消" cancelButtonText='取消'
confirmButtonText="确认" confirmButtonText='确认'
textAlgin="center" textAlgin='center'
close={this.closeTipsSave} close={this.closeTipsSave}
cancel={this.cancelTipsSave} cancel={this.cancelTipsSave}
confirm={this.confirmTipsSave} confirm={this.confirmTipsSave}
@ -2178,11 +2178,11 @@ class IotCarePlanWL200 extends Component<any, any> {
<PopupStatus <PopupStatus
isShow={isShowNursingSuccess} isShow={isShowNursingSuccess}
isClose isClose
title="您已结束本次护理" title='您已结束本次护理'
type="success" type='success'
content="正在上传护理记录……" content='正在上传护理记录……'
confirmButtonText="知道了" confirmButtonText='知道了'
textAlgin="center" textAlgin='center'
close={() => { close={() => {
/*不需要做处理*/ /*不需要做处理*/
}} }}
@ -2193,28 +2193,28 @@ class IotCarePlanWL200 extends Component<any, any> {
deviceInfo={currentDevice} deviceInfo={currentDevice}
close={this.connectionClose} close={this.connectionClose}
isDisconnect={!isConnectionBlutoot} isDisconnect={!isConnectionBlutoot}
offlineChange={() => {}} offlineChange={() => { }}
pairingChange={this.pairingChange} pairingChange={this.pairingChange}
upgradeFun={() => {}} upgradeFun={() => { }}
/> />
)} )}
<Popup <Popup
show={isShowHistoryMsg} show={isShowHistoryMsg}
className="custom-popup" className='custom-popup'
overlay={false} overlay={false}
> >
<View className="sync-history-msg">...</View> <View className='sync-history-msg'>...</View>
</Popup> </Popup>
</View> </View>
<View> <View>
<View className="iot-main"> <View className='iot-main'>
<View className="banner-box"> <View className='banner-box'>
<View> <View>
{!isShowNurse && ( {!isShowNurse && (
<Video <Video
className="video-or-image" className='video-or-image'
src={ActiveModeItem.modeVideo} src={ActiveModeItem.modeVideo}
loop loop
/> />
@ -2224,12 +2224,12 @@ class IotCarePlanWL200 extends Component<any, any> {
<Block> <Block>
{isStopNurse ? ( {isStopNurse ? (
<Image <Image
className="video-or-image" className='video-or-image'
src={currentServiceData.stopSource} src={currentServiceData.stopSource}
/> />
) : ( ) : (
<Image <Image
className="video-or-image" className='video-or-image'
src={currentServiceData.startSource} src={currentServiceData.startSource}
/> />
)} )}
@ -2237,25 +2237,25 @@ class IotCarePlanWL200 extends Component<any, any> {
)} )}
{errorTips && ( {errorTips && (
<Block> <Block>
<View className="msg-tips"> <View className='msg-tips'>
<Image <Image
className="msg-tips-img" className='msg-tips-img'
src={require("@/img/tips.png")} src={require("@/img/tips.png")}
/> />
<View className="msg-tips-content">{errorTips}</View> <View className='msg-tips-content'>{errorTips}</View>
</View> </View>
</Block> </Block>
)} )}
</View> </View>
<View className="iot-device"> <View className='iot-device'>
<View className="item"> <View className='item'>
<Text className="device-time"> <Text className='device-time'>
<Text className="time">{currentTime}</Text> <Text className='time'>{currentTime}</Text>
</Text> </Text>
</View> </View>
<View className="line" /> <View className='line' />
<ElectricityView <ElectricityView
Electricity={Electricity} Electricity={Electricity}
matrixElectricity={matrixElectricity} matrixElectricity={matrixElectricity}
@ -2285,7 +2285,7 @@ class IotCarePlanWL200 extends Component<any, any> {
/> />
)} )}
{/* <Echarts></Echarts> */} <Echarts></Echarts>
</View> </View>
<Footer <Footer

@ -164,11 +164,11 @@ class Index extends Component<any, any> {
} }
} }
componentDidMount() {} componentDidMount() { }
componentWillUnmount() { componentWillUnmount() {
// 页面卸载监听 // 页面卸载监听
Taro.offAppHide((res) => {}); Taro.offAppHide((res) => { });
this.$instance = null; this.$instance = null;
} }
@ -261,7 +261,7 @@ class Index extends Component<any, any> {
this.isSancQrcodeEnter(); this.isSancQrcodeEnter();
} }
}, },
fail: () => {}, fail: () => { },
complete: () => { complete: () => {
// 授权完成运行页面初始化 // 授权完成运行页面初始化
}, },
@ -420,6 +420,7 @@ class Index extends Component<any, any> {
}; };
GetSiteAddTag = async (id) => { GetSiteAddTag = async (id) => {
go("/pages/moisture_test_report/moisture_test_report")
let res = await GetSiteAddTag(id); let res = await GetSiteAddTag(id);
if (res.data.code === 200) { if (res.data.code === 200) {
console.log("点击自动上报,不需要逻辑处理"); console.log("点击自动上报,不需要逻辑处理");
@ -519,7 +520,7 @@ class Index extends Component<any, any> {
this.setState({ isShowSiteSwiper: false }); this.setState({ isShowSiteSwiper: false });
}; };
bannerSwiperchange() {} bannerSwiperchange() { }
gobanner(item) { gobanner(item) {
// 跳转类型0无跳转、1跳转内部链接、3跳转外部链接、4跳转小程序、5导向视频号、6导向视频号直播间', // 跳转类型0无跳转、1跳转内部链接、3跳转外部链接、4跳转小程序、5导向视频号、6导向视频号直播间',
@ -907,13 +908,11 @@ class Index extends Component<any, any> {
*/ */
pairingChange = (e) => { pairingChange = (e) => {
console.log("===epairingChange===》", e); console.log("===epairingChange===》", e);
if (this.state.connectInstrument.model === "FR200") { if (this.state.connectInstrument.model === "FR200") {
go("/moduleIOT/pages/iotCarePlan/FR200"); // 画页面直接跳转 go("/moduleIOT/pages/iotCarePlan/FR200"); // 画页面直接跳转
} else { } else {
go("/moduleIOT/pages/iotCarePlan/WL200"); // 画页面直接跳转 go("/moduleIOT/pages/iotCarePlan/WL200"); // 画页面直接跳转
} }
this.connectionClose(); this.connectionClose();
}; };
@ -1108,7 +1107,7 @@ class Index extends Component<any, any> {
<View catchMove> <View catchMove>
<PopupAlert <PopupAlert
isShow={isCommonError} isShow={isCommonError}
title="提示" title='提示'
content={ content={
<Block> <Block>
{commonErrorText.map((item) => { {commonErrorText.map((item) => {
@ -1116,60 +1115,60 @@ class Index extends Component<any, any> {
})} })}
</Block> </Block>
} }
confirmButtonText="知道了" confirmButtonText='知道了'
textAlgin="center" textAlgin='center'
close={this.onCommonErrorFun} close={this.onCommonErrorFun}
confirm={this.onCommonErrorFun} confirm={this.onCommonErrorFun}
/> />
<PopupConfirm <PopupConfirm
isShow={isShowReConnectDeviceRecordWL200} isShow={isShowReConnectDeviceRecordWL200}
isClose isClose
title="提示" title='提示'
zIndex={10020} zIndex={10020}
myClassName="level-up" myClassName='level-up'
content={ content={
<Block> <Block>
<View></View> <View></View>
<View></View> <View></View>
</Block> </Block>
} }
cancelButtonText="取消" cancelButtonText='取消'
confirmButtonText="连接设备" confirmButtonText='连接设备'
textAlgin="center" textAlgin='center'
close={this.closeReConnectDeviceRecordWL200} close={this.closeReConnectDeviceRecordWL200}
confirm={this.confirmReConnectDeviceRecordWL200} confirm={this.confirmReConnectDeviceRecordWL200}
/> />
<PopupAlert <PopupAlert
isShow={isBindingError} isShow={isBindingError}
title="提示" title='提示'
content={ content={
<Block> <Block>
<View></View> <View></View>
<View></View> <View></View>
</Block> </Block>
} }
confirmButtonText="知道了" confirmButtonText='知道了'
textAlgin="center" textAlgin='center'
close={this.onBindErrorClose} close={this.onBindErrorClose}
confirm={this.onBindErrorConfirm} confirm={this.onBindErrorConfirm}
/> />
<PopupAlert <PopupAlert
isShow={isNotRegister} isShow={isNotRegister}
isClose isClose
title="提示" title='提示'
content="暂未授权注册,请点击注册" content='暂未授权注册,请点击注册'
confirmButtonText="确定" confirmButtonText='确定'
textAlgin="center" textAlgin='center'
type="1" type='1'
close={this.closeAlert} close={this.closeAlert}
confirm={this.closeAlert} confirm={this.closeAlert}
/> />
<PopupAlert <PopupAlert
isShow={isDev} isShow={isDev}
title="提示" title='提示'
content="页面正在开发中" content='页面正在开发中'
confirmButtonText="确定" confirmButtonText='确定'
textAlgin="center" textAlgin='center'
close={this.closeDev} close={this.closeDev}
confirm={this.closeDev} confirm={this.closeDev}
/> />
@ -1188,54 +1187,54 @@ class Index extends Component<any, any> {
/> />
<PopupAlert <PopupAlert
isShow={isBindingError} isShow={isBindingError}
title="提示" title='提示'
content={ content={
<Block> <Block>
<View></View> <View></View>
<View></View> <View></View>
</Block> </Block>
} }
confirmButtonText="知道了" confirmButtonText='知道了'
textAlgin="center" textAlgin='center'
close={this.onBindErrorClose} close={this.onBindErrorClose}
confirm={this.onBindErrorConfirm} confirm={this.onBindErrorConfirm}
/> />
<PopupAlert <PopupAlert
isShow={isBeforeBindingError} isShow={isBeforeBindingError}
title="提示" title='提示'
content={ content={
BeforeBindingErrorText || "您选择的仪器有误,请重新确认选择" BeforeBindingErrorText || "您选择的仪器有误,请重新确认选择"
} }
confirmButtonText="知道了" confirmButtonText='知道了'
textAlgin="center" textAlgin='center'
close={this.onBeforeBindClose} close={this.onBeforeBindClose}
confirm={this.onBeforeBindConfirm} confirm={this.onBeforeBindConfirm}
/> />
<PopupAlert <PopupAlert
isShow={isBindingError203} isShow={isBindingError203}
title="提示" title='提示'
content="序列码已被别人绑定,请联系微信助手" content='序列码已被别人绑定,请联系微信助手'
confirmButtonText="知道了" confirmButtonText='知道了'
textAlgin="center" textAlgin='center'
close={this.onBindErrorClose203} close={this.onBindErrorClose203}
confirm={this.onBindErrorConfirm203} confirm={this.onBindErrorConfirm203}
></PopupAlert> ></PopupAlert>
<PopupAlert <PopupAlert
isShow={showEquipment} isShow={showEquipment}
title="提示" title='提示'
content={ content={
<Block> <Block>
<View className="mb10"> <View className='mb10'>
{instrumentInfo.instrumentName} {instrumentInfo.instrumentName}
</View> </View>
<View className="mb10">{instrumentInfo.serial}</View> <View className='mb10'>{instrumentInfo.serial}</View>
<View className="mb10"></View> <View className='mb10'></View>
</Block> </Block>
} }
confirmButtonText="知道了" confirmButtonText='知道了'
textAlgin="center" textAlgin='center'
close={this.onUnloginClose.bind(this)} close={this.onUnloginClose.bind(this)}
confirm={this.onUnloginConfirm.bind(this)} confirm={this.onUnloginConfirm.bind(this)}
></PopupAlert> ></PopupAlert>
@ -1243,9 +1242,9 @@ class Index extends Component<any, any> {
<PopupSiteSwiper <PopupSiteSwiper
isShow={isShowSiteSwiper} isShow={isShowSiteSwiper}
siteData={sitePopupList} siteData={sitePopupList}
size="middle" size='middle'
confirmButtonText="确定" confirmButtonText='确定'
textAlgin="center" textAlgin='center'
close={this.closeSiteSwiper} close={this.closeSiteSwiper}
confirm={this.closeSiteSwiper} confirm={this.closeSiteSwiper}
/> />
@ -1265,15 +1264,15 @@ class Index extends Component<any, any> {
isLarge isLarge
isClose isClose
isShow={isShowUpdateVersionTip} isShow={isShowUpdateVersionTip}
title="提示" title='提示'
content={ content={
<Block> <Block>
<View></View> <View></View>
<View></View> <View></View>
</Block> </Block>
} }
textAlgin="center" textAlgin='center'
confirmButtonText="确定" confirmButtonText='确定'
close={this.cancelUpdateVersionTip} close={this.cancelUpdateVersionTip}
confirm={this.confirmUpdateVersionTip} confirm={this.confirmUpdateVersionTip}
/> />
@ -1286,16 +1285,16 @@ class Index extends Component<any, any> {
)} )}
<PopupAlert <PopupAlert
isShow={isShowVersionUpgradFinish} isShow={isShowVersionUpgradFinish}
title="升级内容公告" title='升级内容公告'
content={ content={
<Block> <Block>
<View className="nodes"> <View className='nodes'>
<RichText nodes={versionUpgradFinishNodes} /> <RichText nodes={versionUpgradFinishNodes} />
</View> </View>
</Block> </Block>
} }
confirmButtonText="知道了" confirmButtonText='知道了'
textAlgin="left" textAlgin='left'
isClose isClose
close={this.onVersionUpgradFinish} close={this.onVersionUpgradFinish}
confirm={this.onVersionUpgradFinish} confirm={this.onVersionUpgradFinish}
@ -1307,29 +1306,29 @@ class Index extends Component<any, any> {
leftSlot={ leftSlot={
<Block> <Block>
<View <View
className="message" className='message'
onClick={this.gourl} onClick={this.gourl}
data-url="/pages/message/message" data-url='/pages/message/message'
> >
<Image <Image
className="message-img" className='message-img'
src={require("../../img/index/message.png")} src={require("../../img/index/message.png")}
mode="aspectFill" mode='aspectFill'
/> />
{messagecount ? <View className="tip" /> : ""} {messagecount ? <View className='tip' /> : ""}
</View> </View>
</Block> </Block>
} }
/> />
<View className="index"> <View className='index'>
<View className="date-title" onClick={this.toNursingRecords}> <View className='date-title' onClick={this.toNursingRecords}>
<Text className="text"></Text> <Text className='text'></Text>
<Image <Image
src={require("../../img/index/right.png")} src={require("../../img/index/right.png")}
style="width: 20rpx;height: 20rpx;" style='width: 20rpx;height: 20rpx;'
/> />
</View> </View>
<View className="bg-while"> <View className='bg-while'>
<AtCalendar <AtCalendar
hideArrow hideArrow
isSwiper={false} isSwiper={false}
@ -1341,40 +1340,40 @@ class Index extends Component<any, any> {
/> />
</View> </View>
</View> </View>
<View className="infobox5"> <View className='infobox5'>
{instrumentList.length > 0 && ( {instrumentList.length > 0 && (
<Block> <Block>
<View className="nurse_plan_box flex aitems sb"> <View className='nurse_plan_box flex aitems sb'>
<View className="title"></View> <View className='title'></View>
<View <View
className="txt_box flex jcenter aitems" className='txt_box flex jcenter aitems'
data-url="/pages/instrument/instrument" data-url='/pages/instrument/instrument'
onClick={this.gourl} onClick={this.gourl}
> >
<Image <Image
className="right_icon" className='right_icon'
src={require("../../img/black-add.png")} src={require("../../img/black-add.png")}
mode="aspectFill" mode='aspectFill'
/> />
<View className="txt"></View> <View className='txt'></View>
</View> </View>
</View> </View>
<View style="overflow-x: auto;"> <View style='overflow-x: auto;'>
<View className="device_list flex"> <View className='device_list flex'>
{instrumentList.map((item, index) => { {instrumentList.map((item, index) => {
return ( return (
<View <View
key={"instrumentList" + index} key={"instrumentList" + index}
className="device_item" className='device_item'
onClick={this.goNursing.bind(this, item)} onClick={this.goNursing.bind(this, item)}
> >
<Image <Image
className="banner_img" className='banner_img'
src={item.banner} src={item.banner}
mode="aspectFill" mode='aspectFill'
/> />
<View className="device_name ellipsis1"> <View className='device_name ellipsis1'>
{item.name} {item.name}
</View> </View>
</View> </View>
@ -1386,28 +1385,28 @@ class Index extends Component<any, any> {
)} )}
{instrumentList.length === 0 && ( {instrumentList.length === 0 && (
<Block> <Block>
<View className="nurse_plan_box flex aitems sb"> <View className='nurse_plan_box flex aitems sb'>
<View className="title"></View> <View className='title'></View>
</View> </View>
<View className="add_device flex jcenter aitems bg-while"> <View className='add_device flex jcenter aitems bg-while'>
<View className="add_device_btn"> <View className='add_device_btn'>
<View className="txt_box flex jcenter aitems"> <View className='txt_box flex jcenter aitems'>
<View <View
className="at-icon at-icon-add" className='at-icon at-icon-add'
style="color: #fff;font-size: 30rpx;" style='color: #fff;font-size: 30rpx;'
></View> ></View>
<View className="txt" onClick={this.addNewDevice}> <View className='txt' onClick={this.addNewDevice}>
</View> </View>
</View> </View>
</View> </View>
<View className="tips"></View> <View className='tips'></View>
</View> </View>
</Block> </Block>
)} )}
</View> </View>
<View className="infobox3"> <View className='infobox3'>
<Swiper <Swiper
autoplay autoplay
onAnimationFinish={this.bannerSwiperchange.bind(this)} onAnimationFinish={this.bannerSwiperchange.bind(this)}
@ -1419,15 +1418,15 @@ class Index extends Component<any, any> {
key={"banner_" + index} key={"banner_" + index}
onClick={this.gobanner.bind(this, item)} onClick={this.gobanner.bind(this, item)}
> >
<Image style="width:100%;height:100%" src={item.fileUrl} /> <Image style='width:100%;height:100%' src={item.fileUrl} />
</SwiperItem> </SwiperItem>
); );
})} })}
</Swiper> </Swiper>
</View> </View>
<View style="height:200rpx"></View> <View style='height:200rpx'></View>
<Popup show={show} className="custom-popup" overlay={false}> <Popup show={show} className='custom-popup' overlay={false}>
<View className="popBox"></View> <View className='popBox'></View>
</Popup> </Popup>
</Block> </Block>
); );

Loading…
Cancel
Save