qsj 2 years ago
commit 661bbe18a3

@ -0,0 +1,4 @@
export default definePageConfig({
navigationBarTitleText: 'FR200',
  enablePageMeta: true
})

@ -1,8 +1,20 @@
@import url(./WL200.less); @import url(./WL200.less);
.music {
width: 54rpx;
height: 54rpx;
background: rgba(255, 255, 255, 0.6);
border-radius: 50%;
position: absolute;
right: 20rpx;
top: 20rpx;
image {
width: 100%;
height: 100%;
}
}
.fr200-iot-device { .fr200-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;

@ -172,7 +172,7 @@ class IotCarePlanFR200 extends Component<any, any> {
isConnectionBlutoot: true, // 是否已连接蓝牙 isConnectionBlutoot: true, // 是否已连接蓝牙
isShowNurse: true, // 是否开始并显示护理 FR200默认已经开始准备护理 isShowNurse: true, // 是否开始并显示护理 FR200默认已经开始准备护理
isStopNurse: false, // 是否暂停护理 isStopNurse: false, // 是否暂停护理
isEndNurse: false, // 是否结束护理 // isEndNurse: false, // 是否结束护理
errorTips: "", // 错误提示 errorTips: "", // 错误提示
/** 护理过程 END*/ /** 护理过程 END*/
@ -184,7 +184,7 @@ class IotCarePlanFR200 extends Component<any, any> {
ModeList: [], ModeList: [],
ModeType: "all", // all 1基础护理 2专区护理 3专研促渗 4敏期护理 5智能测肤 ModeType: "all", // all 1基础护理 2专区护理 3专研促渗 4敏期护理 5智能测肤
ActiveModeItem: { ActiveModeItem: {
modeType: "", modeType: "face",
openSourceData: [], openSourceData: [],
}, // 当前选中模式 }, // 当前选中模式
SwitchActiveModeItem: { SwitchActiveModeItem: {
@ -233,7 +233,7 @@ class IotCarePlanFR200 extends Component<any, any> {
echartsData: "", //传给echarts图表的数据 echartsData: "", //传给echarts图表的数据
series: [ series: [
{ {
data: [2, 3, 5, 3, 5, 6, 8, 5, 6, 4], data: [],
type: "line", type: "line",
smooth: true, smooth: true,
z: 1, z: 1,
@ -241,10 +241,10 @@ class IotCarePlanFR200 extends Component<any, any> {
color: "red", color: "red",
}, },
{ {
data: [2, 3, 5, 3, 5, 6, 8, 5, 6, 4], data: [],
type: "line", type: "line",
smooth: true, smooth: true,
symbolSize: 10, symbolSize: 5,
lineStyle: { lineStyle: {
color: "#ff8410", color: "#ff8410",
width: 1, width: 1,
@ -255,9 +255,9 @@ class IotCarePlanFR200 extends Component<any, any> {
}, },
{ {
name: "a", name: "a",
data: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], data: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
type: "bar", type: "bar",
barWidth: 22, barWidth: 12,
z: 2, z: 2,
stack: "x", stack: "x",
visualMap: false, visualMap: false,
@ -267,7 +267,7 @@ class IotCarePlanFR200 extends Component<any, any> {
}, },
{ {
name: "b", name: "b",
data: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], data: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
type: "bar", type: "bar",
z: 2, z: 2,
stack: "x", stack: "x",
@ -278,7 +278,7 @@ class IotCarePlanFR200 extends Component<any, any> {
}, },
{ {
name: "c", name: "c",
data: [0, 1, 1, 1, 1, 1, 1, 1, 1, 1], data: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
type: "bar", type: "bar",
z: 2, z: 2,
stack: "x", stack: "x",
@ -289,7 +289,7 @@ class IotCarePlanFR200 extends Component<any, any> {
}, },
{ {
name: "d", name: "d",
data: [0, 0, 1, 0, 1, 1, 1, 1, 1, 1], data: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
type: "bar", type: "bar",
z: 2, z: 2,
stack: "x", stack: "x",
@ -300,7 +300,7 @@ class IotCarePlanFR200 extends Component<any, any> {
}, },
{ {
name: "e", name: "e",
data: [0, 0, 1, 0, 1, 1, 1, 1, 1, 0], data: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
type: "bar", type: "bar",
z: 2, z: 2,
stack: "x", stack: "x",
@ -311,7 +311,7 @@ class IotCarePlanFR200 extends Component<any, any> {
}, },
{ {
name: "f", name: "f",
data: [0, 0, 0, 0, 0, 1, 1, 0, 1, 0], data: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
type: "bar", type: "bar",
z: 2, z: 2,
stack: "x", stack: "x",
@ -322,7 +322,7 @@ class IotCarePlanFR200 extends Component<any, any> {
}, },
{ {
name: "h", name: "h",
data: [0, 0, 0, 0, 0, 0, 1, 0, 0, 0], data: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
type: "bar", type: "bar",
z: 2, z: 2,
stack: "x", stack: "x",
@ -333,7 +333,7 @@ class IotCarePlanFR200 extends Component<any, any> {
}, },
{ {
name: "i", name: "i",
data: [0, 0, 0, 0, 0, 0, 1, 0, 0, 0], data: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
type: "bar", type: "bar",
z: 2, z: 2,
stack: "x", stack: "x",
@ -343,6 +343,12 @@ class IotCarePlanFR200 extends Component<any, any> {
}, },
}, },
], ],
time: {
min: 0,
second: 0
},
timeArr: [],
videoVoiceStatus: false
}; };
} }
bluetoothContainer: any = null; bluetoothContainer: any = null;
@ -403,9 +409,9 @@ class IotCarePlanFR200 extends Component<any, any> {
this.getInstrumentClockSummary(); this.getInstrumentClockSummary();
this.getInstrumentClockDetail(); this.getInstrumentClockDetail();
} }
componentDidMount() {} componentDidMount() { }
componentWillUnmount() {} componentWillUnmount() { }
componentDidShow() { componentDidShow() {
console.log("页面显示了"); console.log("页面显示了");
@ -435,6 +441,24 @@ class IotCarePlanFR200 extends Component<any, any> {
title: obj.name, title: obj.name,
}); });
let sendParams: any = {
// ...deviceCommandSamples.pause,
// workMode: 'moistureTest', // 使用模式
commandType: "DeviceStatusSync",
deviceSyncCommandType: 'onlySyncStatusToDevice',
totalWorkingSeconds: 0,
workStatus: "pause",
workMode: 'face',
};
sendParams.gear = 1;
let pauseArrayBuffer = deviceToolKitInstance.toBleCommand(
sendParams as any
);
sendCommand({
value: pauseArrayBuffer,
}).then((res) => console.log("同步为0=====》", res));
await this.GetModeList(obj?.id); await this.GetModeList(obj?.id);
// 如果不存在设备模式值,则判断为首次进入,弹窗提示 // 如果不存在设备模式值,则判断为首次进入,弹窗提示
@ -448,7 +472,7 @@ class IotCarePlanFR200 extends Component<any, any> {
const platform = Taro.getSystemInfoSync().platform; const platform = Taro.getSystemInfoSync().platform;
if (platform !== "devtools") { if (platform !== "devtools") {
// 仅手机端初始化蓝牙 // 仅手机端初始化蓝牙
// this.init(); this.init();
} }
} }
@ -573,7 +597,7 @@ class IotCarePlanFR200 extends Component<any, any> {
* @name / * @name /
* */ * */
modeCurrentFun = async (data, isNotCheck = false) => { modeCurrentFun = async (data, isNotCheck = false) => {
let { isShowNurse, activeModeID } = this.state; let { isShowNurse, activeModeID, series } = this.state;
// 护理检查改变模式,是否提示切换护理模式 // 护理检查改变模式,是否提示切换护理模式
// isNotCheck为真时不进行校验直接切换 // isNotCheck为真时不进行校验直接切换
this.tempModeCurrent = data; this.tempModeCurrent = data;
@ -603,6 +627,15 @@ class IotCarePlanFR200 extends Component<any, any> {
currentWorkModeType = 2; currentWorkModeType = 2;
} }
series.map(item => {
if (item.type == 'line') {
item.data = []
} else {
item.data = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
}
})
this.setState({ this.setState({
ActiveModeItem: data, ActiveModeItem: data,
activeModeID: data?.id, activeModeID: data?.id,
@ -612,6 +645,7 @@ class IotCarePlanFR200 extends Component<any, any> {
MaskModeStepIndex: 0, // 面膜促渗步骤 MaskModeStepIndex: 0, // 面膜促渗步骤
ModeType: this.ModeTypeArray[data.modeClass], ModeType: this.ModeTypeArray[data.modeClass],
currentWorkModeType, currentWorkModeType,
series
}); });
// 切换模式时:重新设置视频地址 // 切换模式时:重新设置视频地址
@ -860,36 +894,53 @@ class IotCarePlanFR200 extends Component<any, any> {
let textshow = this.state.textshow; let textshow = this.state.textshow;
this.setState({ textshow: !textshow }); this.setState({ textshow: !textshow });
} }
updata() { updata(level = 1, min = 0, seconds = 0) {
let that = this; if (seconds == 0 && min == 0) {
let stop = 0; return
let time = setInterval(function () { }
stop++; // let that = this;
let series = JSON.parse(JSON.stringify(that.state.series)); // let stop = 0;
let num = Math.floor(Math.random() * 9); // let time = setInterval(function () {
let count = 0; // stop++;
series.map((item) => { let series = JSON.parse(JSON.stringify(this.state.series));
if (item.type === "line") { let num = level
let count = 0;
series.map((item) => {
if (item.type === "line") {
if (item.data.length >= 10) {
item.data.splice(0, 1); item.data.splice(0, 1);
item.data.push(num);
} }
if (item.type === "bar") { item.data.push(num);
count++; }
if (item.type === "bar") {
count++;
if (seconds > 10) {
item.data.splice(0, 1); item.data.splice(0, 1);
if (count <= num) { if (count <= num) {
item.data.push(1); item.data.push(1);
} else { } else {
item.data.push(0); item.data.push(0);
} }
} else {
if (count <= num) {
item.data.splice(seconds - 1, 1, 1)
} else {
item.data.splice(seconds - 1, 1, 0)
}
} }
});
// 更新图表数据
that.setState({ series });
if (stop >= 20) {
clearInterval(time);
} }
}, 1000); });
let time = JSON.parse(JSON.stringify(this.state.time));
time.min = min
time.second = seconds
// 更新图表数据
this.setState({ series });
this.setState({ time });
// if (stop >= 20) {
// clearInterval(time);
// }
// }, 1000);
} }
full() { full() {
@ -1040,6 +1091,7 @@ class IotCarePlanFR200 extends Component<any, any> {
// 更新界面倒计时 // 更新界面倒计时
this.resetTimer(); this.resetTimer();
if ( if (
sceneTime > totalTime && sceneTime > totalTime &&
this.isRuning && this.isRuning &&
@ -1329,6 +1381,15 @@ class IotCarePlanFR200 extends Component<any, any> {
} }
} }
/**
*
*/
videoVoiceStatusChange() {
let { videoVoiceStatus } = this.state;
this.setState({ videoVoiceStatus: !videoVoiceStatus })
}
/** @name 精华促渗下一步,根据时间自动调用 */ /** @name 精华促渗下一步,根据时间自动调用 */
essencePenetrationNext() { essencePenetrationNext() {
let { let {
@ -1843,8 +1904,27 @@ class IotCarePlanFR200 extends Component<any, any> {
Taro.setStorageSync("FR200NursingHistory", params); Taro.setStorageSync("FR200NursingHistory", params);
console.log("保存setFR200NursingHistory"); console.log("保存setFR200NursingHistory");
}; };
formatTime(min, sec) {
let mins
if (min < 10) {
mins = '0' + min;
} else {
mins = min;
}
let secs
if (sec < 10) {
secs = '0' + sec;
} else {
secs = sec;
}
return `${mins.toString()}:${secs.toString()}`;
}
/** 更新WL200护理历史运行时间 */ /** 更新WL200护理历史运行时间 */
updateFR200NursingHistory = (data: any = null, jsonStatus: any = null) => { updateFR200NursingHistory = (data: any = null, jsonStatus: any = null) => {
console.log(11111111);
this.FR200NursingHistory = Taro.getStorageSync("FR200NursingHistory"); this.FR200NursingHistory = Taro.getStorageSync("FR200NursingHistory");
if (this.FR200NursingHistory) { if (this.FR200NursingHistory) {
@ -1857,6 +1937,19 @@ class IotCarePlanFR200 extends Component<any, any> {
// 设置正确封面 // 设置正确封面
if (!data) { if (!data) {
if (jsonStatus) { if (jsonStatus) {
let { timeArr } = this.state
let newTime = this.formatTime(jsonStatus.totalWorkingMinutes, jsonStatus.totalWorkingSeconds)
let flag = false
timeArr.map(item => {
if (newTime === item) {
flag = true
}
})
if (flag) {
return
}
timeArr.push(newTime)
this.setState({ timeArr })
// 缓存每秒数据 // 缓存每秒数据
if (!params.dataArray) params.dataArray = []; if (!params.dataArray) params.dataArray = [];
params.dataArray.push(jsonStatus); params.dataArray.push(jsonStatus);
@ -1864,8 +1957,17 @@ class IotCarePlanFR200 extends Component<any, any> {
params.workMode = jsonStatus?.workMode; params.workMode = jsonStatus?.workMode;
params.modeId = this.state.ActiveModeItem?.id; params.modeId = this.state.ActiveModeItem?.id;
params.modeName = this.state.ActiveModeItem.modeName; params.modeName = this.state.ActiveModeItem.modeName;
let impedance = jsonStatus.impedance
let level = impedance - 200
if (level < 0) {
level = 1
} else {
level = Math.ceil(level / 80) + 1
}
console.log('min:', jsonStatus.totalWorkingMinutes, ' ', 'sec', jsonStatus.totalWorkingSeconds);
this.updata(level, jsonStatus.totalWorkingMinutes, jsonStatus.totalWorkingSeconds)
console.log(jsonStatus, 555555555555);
} }
} else { } else {
params.jsonStatus = jsonStatus; params.jsonStatus = jsonStatus;
@ -2180,11 +2282,11 @@ class IotCarePlanFR200 extends Component<any, any> {
let report = true; let report = true;
go( go(
"/recoding/pages/face_report_one/face_report_one?id=" + "/recoding/pages/face_report_one/face_report_one?id=" +
ids + ids +
"&report=" + "&report=" +
report + report +
"&obj=" + "&obj=" +
JSON.stringify(obj) JSON.stringify(obj)
); );
} else if ("moistureTest" === nursingData.workMode) { } else if ("moistureTest" === nursingData.workMode) {
console.log("水分测试"); console.log("水分测试");
@ -2195,11 +2297,11 @@ class IotCarePlanFR200 extends Component<any, any> {
go( go(
"/recoding/pages/face_report/face_report?id=" + "/recoding/pages/face_report/face_report?id=" +
deviceid + deviceid +
"&recordId=" + "&recordId=" +
currentDevice + currentDevice +
"&report=" + "&report=" +
report report
); );
} }
}; };
@ -2387,7 +2489,9 @@ class IotCarePlanFR200 extends Component<any, any> {
echartsData, echartsData,
isShowReReadRecordConnect, isShowReReadRecordConnect,
series, series,
time,
isFullScreen, isFullScreen,
videoVoiceStatus
} = this.state; } = this.state;
return ( return (
@ -2406,19 +2510,19 @@ class IotCarePlanFR200 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'
close={this.onModeLockClose} close={this.onModeLockClose}
confirm={this.onModeLockClose} confirm={this.onModeLockClose}
/> />
<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}
@ -2430,11 +2534,11 @@ class IotCarePlanFR200 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}
/> />
@ -2442,7 +2546,7 @@ class IotCarePlanFR200 extends Component<any, any> {
isLarge isLarge
isClose isClose
isShow={isSwitchActiveMode} isShow={isSwitchActiveMode}
title="护理模式切换" title='护理模式切换'
content={ content={
<ModeListView <ModeListView
ModeID={ModeID} ModeID={ModeID}
@ -2456,9 +2560,9 @@ class IotCarePlanFR200 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}
/> />
@ -2468,7 +2572,7 @@ class IotCarePlanFR200 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}
/> />
@ -2477,10 +2581,10 @@ class IotCarePlanFR200 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}
/> />
@ -2489,11 +2593,11 @@ class IotCarePlanFR200 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}
/> />
@ -2502,17 +2606,17 @@ class IotCarePlanFR200 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}
@ -2521,11 +2625,11 @@ class IotCarePlanFR200 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={() => {
/*不需要做处理*/ /*不需要做处理*/
}} }}
@ -2536,32 +2640,33 @@ class IotCarePlanFR200 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'>
{isFullScreen && ( {isFullScreen && (
<View className="banner-box"> <View className='banner-box'>
<View> <View>
<Video <Video
className="video-or-image" className='video-or-image'
src={currentVideoSrc} src={currentVideoSrc}
loop loop
id="myVideo" id='myVideo'
objectFit="cover" muted={videoVoiceStatus}
objectFit='cover'
enablePlayGesture enablePlayGesture
showFullscreenBtn={false} showFullscreenBtn={false}
onLoadedMetaData={this.GetVideosTime} onLoadedMetaData={this.GetVideosTime}
@ -2569,29 +2674,37 @@ class IotCarePlanFR200 extends Component<any, any> {
{/* <button onClick={this.executePromises}>点击按钮</button> */} {/* <button onClick={this.executePromises}>点击按钮</button> */}
{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="fr200-iot-device"> className='music flex aitems jcenter'
<View className="item"> onClick={this.videoVoiceStatusChange.bind(this)}
<Text className="device-time"> >
<Image
src={require(`@/img/${videoVoiceStatus ? 'mute' : 'play'}.png`)}
mode='aspectFill'
></Image>
</View>
<View className='fr200-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' />
<View className="item"> <View className='item'>
<Text className="gear">{currentGear}</Text> <Text className='gear'>{currentGear}</Text>
</View> </View>
<View className="line" /> <View className='line' />
<ElectricityView <ElectricityView
Electricity={Electricity} Electricity={Electricity}
DeviceConnectStatus={DeviceConnectStatus} DeviceConnectStatus={DeviceConnectStatus}
@ -2613,9 +2726,10 @@ class IotCarePlanFR200 extends Component<any, any> {
onModeLockOpen={this.onModeLockOpen} onModeLockOpen={this.onModeLockOpen}
/> />
)} )}
<button onClick={this.updata.bind(this)}> </button> {/* <button onClick={this.updata.bind(this)}>模拟数据更新 </button> */}
<View className={classnames({ show: showEcharts })}>
<Echarts series={series} full={this.full.bind(this)}></Echarts> <View className={classnames({ show: ActiveModeItem?.modeType !== "face" && ActiveModeItem?.modeType !== "eyes" && ActiveModeItem?.modeType !== "nasolabialFold" && ActiveModeItem?.modeType !== "mandibularLine" && ActiveModeItem?.modeType !== "headLiftingPro" })}>
<Echarts series={series} time={time} full={this.full.bind(this)}></Echarts>
</View> </View>
{(ActiveModeItem?.modeType === "maskPenetration" || {(ActiveModeItem?.modeType === "maskPenetration" ||

@ -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}

@ -136,6 +136,7 @@ export default class BluetoothContainer {
workMode: jsonStatus?.workMode, // 仅当设备上报模式与小程序一致时,才允许改变小程序变量缓存 workMode: jsonStatus?.workMode, // 仅当设备上报模式与小程序一致时,才允许改变小程序变量缓存
}); });
} }
console.log("this.that.isRuning",this.that.isRuning)
// 判断设备是否在运行中(护理中) // 判断设备是否在运行中(护理中)
// 仅当设备模式与小程序是否一致,才允许更改设备运行时间 // 仅当设备模式与小程序是否一致,才允许更改设备运行时间
if (this.that.isRuning) { if (this.that.isRuning) {

@ -7,86 +7,106 @@
padding: 35rpx 25rpx 25rpx 35rpx; padding: 35rpx 25rpx 25rpx 35rpx;
box-sizing: border-box; box-sizing: border-box;
position: relative; position: relative;
}
.fullscreen {
position: fixed;
top: 450rpx;
left: -450rpx;
right: 0;
bottom: 0;
width: 100vh;
height: 100vw;
z-index: 9999;
background-color: rgba(0, 0, 0, 0.5); /* 背景色 */
transform: rotate(90deg);
// animation: rotate 0s linear;
}
.fullscreen { @keyframes echartRotate {
position: fixed; from {
top: 450rpx; width: 690rpx;
left: -450rpx; height: 320rpx;
right: 0; transform: rotate(0deg);
bottom: 0; }
to {
width: 100vh; width: 100vh;
height: 100vw; height: 100vw;
z-index: 9999; transform: rotate(0deg);
background-color: rgba(0, 0, 0, 0.5); /* 背景色 */
transform: rotate(90deg);
// animation: rotate 0s linear;
} }
}
@keyframes echartRotate { .box_background {
from { position: absolute;
width: 690rpx; top: 0;
height: 320rpx; left: 0;
transform: rotate(0deg); width: 690rpx;
} height: 320rpx;
to { border-radius: 30rpx;
width: 100vh; background-color: #fff;
height: 100vw; .power {
transform: rotate(0deg); margin: 34rpx 0 28rpx 28rpx;
} font-family: PingFang-SC;
font-weight: 500;
font-size: 18rpx;
color: #cccccc;
} }
.full {
.box_background { width: 24rpx;
height: 24rpx;
position: absolute; position: absolute;
top: 0; top: 32rpx;
left: 0; right: 26rpx;
width: 690rpx; z-index: 2;
height: 320rpx; }
border-radius: 30rpx; .line {
background-color: #fff; margin: 0 0 6rpx 35rpx;
.power { font-family: PingFang-SC;
margin: 34rpx 0 28rpx 28rpx; font-size: 14rpx;
font-family: PingFang-SC; color: #cccccc;
font-weight: 500; display: flex;
font-size: 18rpx; position: relative;
color: #cccccc; height: 18rpx;
} .bottom_line {
.full { // border-bottom: 1rpx #ccc dashed;
width: 24rpx; width: 550rpx;
height: 24rpx; margin-left: 20rpx;
position: absolute;
top: 32rpx;
right: 26rpx;
z-index: 2;
}
.line {
margin: 0 0 6rpx 35rpx;
font-family: PingFang-SC;
font-size: 14rpx;
color: #cccccc;
display: flex;
position: relative;
height: 18rpx;
.bottom_line {
// border-bottom: 1rpx #ccc dashed;
width: 550rpx;
margin-left: 20rpx;
position: absolute;
bottom: -6rpx;
right: 74rpx;
height: 4rpx;
color: #fff;
}
}
.time {
position: absolute; position: absolute;
bottom: 22rpx; bottom: -6rpx;
right: 24rpx; right: 74rpx;
font-family: PingFang-SC; height: 4rpx;
font-size: 18rpx; color: #fff;
color: #cccccc;
} }
} }
.time_list {
position: absolute;
bottom: 28rpx;
left: 72rpx;
font-family: PingFang-SC;
font-size: 15rpx;
color: #cccccc;
width: 540rpx;
justify-content: space-around;
}
.time {
position: absolute;
bottom: 22rpx;
right: 24rpx;
font-family: PingFang-SC;
font-size: 18rpx;
color: #cccccc;
}
}
.echart-component-full {
width: 690rpx;
height: 320rpx;
margin: 0rpx auto;
background-color: #fff;
border-radius: 30rpx;
padding: 35rpx 25rpx 25rpx 35rpx;
box-sizing: border-box;
position: relative;
} }
page { page {

@ -11,9 +11,10 @@ import "./index.less";
interface Props { interface Props {
series: any; series: any;
full: any; full: any;
time: any
} }
function Index({ series, full }: Props) { function Index({ series, full, time }: Props) {
const echartsRef = useRef<EchartsHandle>(null); const echartsRef = useRef<EchartsHandle>(null);
const [options, setOptions] = useState({ const [options, setOptions] = useState({
animation: false, animation: false,
@ -49,24 +50,13 @@ function Index({ series, full }: Props) {
}, },
axisLabel: { axisLabel: {
//坐标轴刻度标签的相关设置 //坐标轴刻度标签的相关设置
color: "#cccccc", color: "#fff",
fontSize: 8, fontSize: 1,
}, },
axisTick: { axisTick: {
show: false, show: false,
}, },
data: [ data: [],
"00:01",
"00:02",
"00:03",
"00:04",
"00:05",
"00:06",
"00:07",
"00:08",
"00:09",
"00:10",
],
}, },
yAxis: { yAxis: {
type: "value", type: "value",
@ -143,36 +133,222 @@ function Index({ series, full }: Props) {
color: "#ff8410", color: "#ff8410",
}, },
}, },
series: [], series: []
}); })
// let data = true
// const newParams = {
// animation: false,
// grid: {
// // 让图表占满容器
// // containLabel: true,
// top: "32rpx",
// left: "48rpx",
// right: "86rpx",
// bottom: "38rpx",
// },
// // legend: {
// // itemStyle: {
// // decal: {
// // rotation: 90
// // }
// // }
// // },
// yAxis: {
// // name: '',
// // nameGap: 5,
// // nameTextStyle: {
// // color: '#e4e4e4',
// // fontSize:7
// // },
// type: "category",
// inverse: true,
// axisLine: {
// //坐标轴轴线相关设置。数学上的x轴
// show: true,
// lineStyle: {
// color: "#cccccc",
// },
// },
// axisLabel: {
// //坐标轴刻度标签的相关设置
// color: "#cccccc",
// fontSize: 14,
// rotate: -90,
// margin: 18
// },
// axisTick: {
// show: false,
// },
// data: [
// "00:01",
// "00:02",
// "00:03",
// "00:04",
// "00:05",
// "00:06",
// "00:07",
// "00:08",
// "00:09",
// "00:10",
// ],
// },
// xAxis: {
// type: "value",
// min: 0,
// max: 8,
// splitNumber: 8,
// splitLine: {
// show: true,
// lineStyle: {
// color: "#cccccc",
// type: [4, 2],
// dashOffset: 4,
// },
// },
// axisLine: {
// show: false,
// },
// axisLabel: {
// show: false,
// },
// axisTick: {
// show: false,
// },
// },
// visualMap: {
// z: 1,
// top: 0,
// right: 0,
// seriesIndex: 0,
// show: false,
// dimension: 0,
// pieces: [
// {
// gt: 0,
// lte: 1,
// color: "#fff8c9",
// },
// {
// gt: 1,
// lte: 2,
// color: "#fff0c6",
// },
// {
// gt: 2,
// lte: 3,
// color: "#ffe5c3",
// },
// {
// gt: 3,
// lte: 4,
// color: "#ffdbbf",
// },
// {
// gt: 4,
// lte: 5,
// color: "#ffcfbb",
// },
// {
// gt: 5,
// lte: 6,
// color: "#ffbab5",
// },
// {
// gt: 6,
// lte: 7,
// color: "#ffb4b3",
// },
// {
// gt: 7,
// lte: 8,
// color: "#ffb4b3",
// },
// ],
// outOfRange: {
// color: "#ff8410",
// },
// },
// series: []
// }
const level = [8, 7, 6, 5, 4, 3, 2]; const level = [8, 7, 6, 5, 4, 3, 2];
const [isFull, setIsfull] = useState(false)
const [data, setData] = useState([
"00:01",
"00:02",
"00:03",
"00:04",
"00:05",
"00:06",
"00:07",
"00:08",
"00:09",
"00:10",
],)
const [newOptions, setNewOptions] = useState(options); const [newOptions, setNewOptions] = useState(options);
const updata = useCallback((res) => { const updata = useCallback((res, times) => {
let option = JSON.parse(JSON.stringify(options)); if (times.second == 0) {
option.series = JSON.parse(JSON.stringify(res)); return
}
// let option
// if (data) {
// option = JSON.parse(JSON.stringify(newParams))
// } else {
// option = JSON.parse(JSON.stringify(options))
// }
let option = JSON.parse(JSON.stringify(options))
let datas = JSON.parse(JSON.stringify(data))
if (times.min > 0 || times.second > 10) {
datas.splice(0, 1)
datas.push(formatTime(times))
}
setData(JSON.parse(JSON.stringify(datas)))
// option.xAxis.data = data
option.series = JSON.parse(JSON.stringify(res))
// 更新图表数据 // 更新图表数据
setNewOptions(option); setNewOptions(option);
}, []); }, [data]);
function formatTime(times: any) {
let mins
if (times.min < 10) {
mins = '0' + times.min;
} else {
mins = times.min;
}
let secs
if (times.second < 10) {
secs = '0' + times.second;
} else {
secs = times.second;
}
return `${mins.toString()}:${secs.toString()}`;
}
const cancelFull = useCallback((res) => { const cancelFull = useCallback((res) => {
full(); full()
}, []); setIsfull(!isFull)
}, [isFull])
useEffect(() => { useEffect(() => {
setOptions(newOptions); setOptions(newOptions);
}, [newOptions]); }, [newOptions]);
useEffect(() => { useEffect(() => {
updata(series); updata(series, time);
}, [series]); }, [series]);
return ( return (
<Block> <Block>
<View id="box" className="echart-component"> <View id='box' className={isFull ? "echart-component-full" : "echart-component"}>
<Echarts <Echarts
force-use-old-canvas="false" force-use-old-canvas='false'
echarts={echarts} echarts={echarts}
option={options} option={options}
ref={echartsRef} ref={echartsRef}
@ -180,23 +356,30 @@ function Index({ series, full }: Props) {
// style自定义设置echarts宽高 // style自定义设置echarts宽高
style={{ width: "630rpx", height: "260rpx", zIndex: 1 }} style={{ width: "630rpx", height: "260rpx", zIndex: 1 }}
/> />
<View className="box_background"> <View className='box_background'>
<Image <Image
className="full" className='full'
src={require("@/img/full-scran.png")} src={require("@/img/full-scran.png")}
onClick={cancelFull} onClick={cancelFull}
></Image> ></Image>
<View className="power"></View> <View className='power'></View>
{level.map((item) => ( {level.map((item) => (
<View className="line" key={item}> <View className='line' key={item}>
<View className="number">{item}</View> <View className='number'>{item}</View>
<View className="bottom_line"></View> <View className='bottom_line'></View>
</View> </View>
))} ))}
<View className="line"> <View className='line'>
<View className="number">1</View> <View className='number'>1</View>
</View>
<View className='time_list flex'>
{
data.map((times, index) => (
<View key={index}>{times}</View>
))
}
</View> </View>
<View className="time"></View> <View className='time'></View>
</View> </View>
</View> </View>
</Block> </Block>

@ -25,7 +25,7 @@ function Index({ series, full }: Props) {
top: "32rpx", top: "32rpx",
left: "48rpx", left: "48rpx",
right: "86rpx", right: "86rpx",
bottom: "68rpx", bottom: "38rpx",
}, },
// legend: { // legend: {
// itemStyle: { // itemStyle: {
@ -164,8 +164,6 @@ function Index({ series, full }: Props) {
}, []) }, [])
const cancelFull = useCallback((res) => { const cancelFull = useCallback((res) => {
console.log(1111);
full() full()
}, []) }, [])
@ -184,16 +182,17 @@ function Index({ series, full }: Props) {
<Block> <Block>
<View id='box' className='box_full'> <View id='box' className='box_full'>
<Echarts <Echarts
force-use-old-canvas='false' force-use-old-canvas='false'
echarts={echarts} echarts={echarts}
option={options} option={options}
ref={echartsRef} ref={echartsRef}
// isPage={false} // isPage={false}
// style自定义设置echarts宽高 // style自定义设置echarts宽高
style={{ width: "620rpx", height: "80vh", zIndex: 1 }} style={{ width: "620rpx", height: "75vh", zIndex: 1 }}
/> />
<View className='box_background1'> <View className='box_background1'>
<Image className='part' src={require("@/img/part-scran.png")} onClick={cancelFull}></Image> <Image className='part' src={require("@/img/part-scran.png")} onClick={cancelFull}></Image>
<View className='power'></View> <View className='power'></View>
{level.map((item) => ( {level.map((item) => (
<View className='line' key={item}> <View className='line' key={item}>

@ -519,9 +519,19 @@ page {
.MembraneCloth { .MembraneCloth {
position: relative; position: relative;
width: 670rpx; width: 670rpx;
height: 840rpx;
border-radius: 30rpx; border-radius: 30rpx;
background: #fff; background: #fff;
padding: 52rpx 20rpx 46rpx;
box-sizing: border-box;
.title {
font-weight: bold;
text-align: center;
font-size: 36rpx;
margin-bottom: 36rpx;
color: #030000;
}
.btn1 { .btn1 {
font-style: normal; font-style: normal;
width: 270rpx; width: 270rpx;
@ -532,28 +542,57 @@ page {
border-radius: 45rpx; border-radius: 45rpx;
font-size: 32rpx; font-size: 32rpx;
font-weight: bold; font-weight: bold;
margin-top: 55rpx;
color: #ffffff; color: #ffffff;
} }
.center{ .center {
height: 70%; margin-bottom: 44rpx;
background-color: red; .list {
.list{
width: 100%; width: 100%;
height: 117rpx; height: 150rpx;
background-color: #41a9fc; background: linear-gradient(90deg, #efdcc2, #fff2df);
border-bottom: 2rpx solid black; border-radius: 30rpx;
display: flex; margin-bottom: 20rpx;
padding: 20rpx 31rpx 20rpx 20rpx;
box-sizing: border-box;
justify-content: space-between;
Image {
width: 120rpx;
height: 120rpx;
border-radius: 20rpx;
}
.name_box {
margin-left: 24rpx;
.name {
font-family: PingFang SC;
font-weight: bold;
font-size: 26rpx;
color: #000000;
margin-bottom: 12rpx;
}
.subTitle {
font-family: PingFang SC;
font-weight: 500;
font-size: 22rpx;
color: #666666;
}
}
.buy {
font-family: PingFang SC;
font-weight: 500;
font-size: 26rpx;
color: #666666;
display: flex;
align-items: center;
Image {
height: 20rpx;
width: 20rpx;
margin-left: 10rpx;
}
}
} }
} }
} }
.MembraneCloth .title {
font-weight: bold;
text-align: center;
font-size: 36rpx;
color: #030000;
padding-top: 39rpx;
}
.popbox .title { .popbox .title {
font-weight: bold; font-weight: bold;
text-align: center; text-align: center;

@ -1,5 +1,4 @@
import classnames from "classnames"; import classnames from "classnames";
setSerial;
import dayjs from "dayjs"; import dayjs from "dayjs";
import Taro from "@tarojs/taro"; import Taro from "@tarojs/taro";
import { Component } from "react"; import { Component } from "react";
@ -12,8 +11,9 @@ import {
SwiperItem, SwiperItem,
RichText, RichText,
PageMeta, PageMeta,
Radio
} from "@tarojs/components"; } from "@tarojs/components";
import { Popup, Radio,Toast } from "@antmjs/vantui"; import { Popup,Toast } from "@antmjs/vantui";
/*** redux ***/ /*** redux ***/
import { connect } from "react-redux"; import { connect } from "react-redux";
import { userRefresh, tokenRefresh } from "@/store/features/userInfo"; import { userRefresh, tokenRefresh } from "@/store/features/userInfo";
@ -128,24 +128,13 @@ class Index extends Component<any, any> {
}, },
// 膜布列表 // 膜布列表
MembraneClothList: [ MembraneClothList: [{
{ name: '集体美容仪'
name: "mox名字", },
}, {
{ name: 'M02美容仪'
name: "mox名字", }],
}, checkedMembraneCloth: '',
{
name: "mox名字",
},
{
name: "mox名字",
},
{
name: "mox名字",
},
],
checkedMembraneCloth: "",
list: [], list: [],
params: "", params: "",
messageCount: Taro.getStorageSync("messageCount") || 0, messageCount: Taro.getStorageSync("messageCount") || 0,
@ -1233,6 +1222,8 @@ class Index extends Component<any, any> {
commonErrorText, commonErrorText,
isModeLockWE, isModeLockWE,
MembraneClothList, MembraneClothList,
checkedMembraneCloth,
list,
calendarComplete, calendarComplete,
calendarInComplete, calendarInComplete,
currentDate, currentDate,
@ -1278,7 +1269,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) => {
@ -1286,60 +1277,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}
/> />
@ -1358,54 +1349,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>
@ -1413,9 +1404,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}
/> />
@ -1435,15 +1426,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}
/> />
@ -1468,16 +1459,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}
@ -1489,29 +1480,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}
@ -1523,41 +1514,41 @@ class Index extends Component<any, any> {
/> />
</View> </View>
</View> </View>
<View className="index-infobox5"> <View className='index-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="/instrument/pages/instrument/instrument" data-url='/instrument/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>
@ -1570,28 +1561,28 @@ class Index extends Component<any, any> {
{/* <button onClick={this.handlepopup}>点击我</button> */} {/* <button onClick={this.handlepopup}>点击我</button> */}
{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)}
@ -1603,35 +1594,55 @@ 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>
<Popup show={false}> <Popup show={false}>
<View className="MembraneCloth"> <View className='MembraneCloth'>
<View className="title"></View> <View className='title'></View>
<View className="center"> <View className='center '>
{MembraneClothList.map((item, index) => { {MembraneClothList.map((item, index) => {
return ( return (
<View key={index} className="list"> <View
<Radio name="1" v-model={this.state.checkedMembraneCloth}> key={index}
{item.name} className='list flex aitems'
</Radio> >
<View className='flex aitems'>
<Radio v-model={checkedMembraneCloth} />
<Image src={require('@/img/avater.png')}></Image>
<View className='name_box'>
<View className='name'>
{item.name}
</View>
<View className='subTitle'>
</View>
</View>
</View>
<View className='buy flex aitems'>
<Image src={require('@/img/index-right.png')}></Image>
</View>
</View> </View>
); );
})} })}
</View> </View>
<View className="popbtnbox flex aitems jcenter"> <View className='popbtnbox flex aitems jcenter'>
<View className="btn1"></View> <View className='btn1' >
</View>
</View> </View>
</View> </View>
</Popup> </Popup>
<PopupWe <PopupWe
isShow={isModeLockWE} isShow={isModeLockWE}

Loading…
Cancel
Save