添加声音控制并修改ui问题

master
rongweikang 2 years ago
parent 79e7432953
commit 3589191eef

@ -10,33 +10,29 @@
height: 790rpx; height: 790rpx;
background-color: #fff; background-color: #fff;
border-radius: 30rpx; border-radius: 30rpx;
.music-btn { .music {
position: absolute;
top: 17rpx;
right: 17rpx;
width: 54rpx; width: 54rpx;
height: 54rpx; height: 54rpx;
background: #f8f8f8; background: rgba(255, 255, 255, 0.6);
border-radius: 50%; border-radius: 50%;
z-index: 10; position: absolute;
display: flex; right: 20rpx;
justify-content: center; top: 20rpx;
align-items: center; image {
.music-btn_icon { width: 100%;
width: 54rpx; height: 100%;
height: 54rpx;
} }
} }
.video-or-image { .video-or-image {
display: block; display: block;
width: 690rpx; width: 690rpx;
height: 640rpx; height: 690rpx;
border-radius: 30rpx; border-radius: 30rpx;
animation-iteration-count: 1; // gif只播放一次 animation-iteration-count: 1; // gif只播放一次
} }
.iot-device { .iot-device {
width: 690rpx; width: 690rpx;
height: 150rpx; height: 100rpx;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;

@ -241,9 +241,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("页面显示了");
@ -588,7 +588,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;
@ -620,7 +620,7 @@ class IotCarePlanWL200 extends Component<any, any> {
}; };
// 绘制能量图 // 绘制能量图
drawProwerPicture() {} drawProwerPicture() { }
/** 切换光照 */ /** 切换光照 */
onSwitchChange = async () => { onSwitchChange = async () => {
@ -1385,7 +1385,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, () => { }); // 倒计时弹窗
} }
// 开始执行护理 // 开始执行护理
@ -1935,7 +1935,7 @@ class IotCarePlanWL200 extends Component<any, any> {
if (currentTimeTimer) clearInterval(currentTimeTimer); if (currentTimeTimer) clearInterval(currentTimeTimer);
go( go(
"/recording/pages/face_report/face_report?id=" + "/recording/pages/face_report/face_report?id=" +
this.state.currentDevice.id this.state.currentDevice.id
); );
}; };
@ -2128,11 +2128,11 @@ class IotCarePlanWL200 extends Component<any, any> {
<PopupAlert <PopupAlert
isShow={isModeLock} isShow={isModeLock}
zIndex={10020} zIndex={10020}
myClassName="level-up" myClassName='level-up'
title="提示" title='提示'
content="该模式即将上线,敬请期待" content='该模式即将上线,敬请期待'
confirmButtonText="我知道了" confirmButtonText='我知道了'
textAlgin="center" textAlgin='center'
isClose={false} isClose={false}
close={this.onModeLockClose} close={this.onModeLockClose}
confirm={this.onModeLockClose} confirm={this.onModeLockClose}
@ -2140,8 +2140,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}
@ -2153,11 +2153,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}
/> />
@ -2165,7 +2165,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}
@ -2179,9 +2179,9 @@ class IotCarePlanWL200 extends Component<any, any> {
onModeLockOpen={this.onModeLockOpen} onModeLockOpen={this.onModeLockOpen}
/> />
} }
textAlgin="center" textAlgin='center'
cancelButtonText="取消" cancelButtonText='取消'
confirmButtonText="确定" confirmButtonText='确定'
close={this.cancelModeSwitchBtn} close={this.cancelModeSwitchBtn}
confirm={this.confirmModeSwitchBtn} confirm={this.confirmModeSwitchBtn}
/> />
@ -2191,7 +2191,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}
/> />
@ -2200,10 +2200,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}
/> />
@ -2212,11 +2212,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}
/> />
@ -2225,17 +2225,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}
@ -2244,11 +2244,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={() => {
/*不需要做处理*/ /*不需要做处理*/
}} }}
@ -2259,31 +2259,31 @@ 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
id="myVideo" id='myVideo'
onPlay={this.onPlay} onPlay={this.onPlay}
muted={isMuted} muted={isMuted}
onTimeUpdate={this.GetVideosTime} onTimeUpdate={this.GetVideosTime}
@ -2296,12 +2296,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}
/> />
)} )}
@ -2309,25 +2309,33 @@ 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
<View className="iot-device"> className='music flex aitems jcenter'
<View className="item"> onClick={this.handleClicksound.bind(this)}
<Text className="device-time"> >
<Image
src={require(`@/img/${isMuted ? 'mute' : 'play'}.png`)}
mode='aspectFill'
></Image>
</View>
<View className='iot-device'>
<View className='item'>
<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}

Loading…
Cancel
Save