页面跳转

master
rongweikang 2 years ago
parent 2f0ce40830
commit 07d684ff5f

@ -242,7 +242,7 @@ class IotCarePlanFR200 extends Component<any, any> {
/** 基础版:脸部/眼部 */
BaseModeType: string[] = ["face", "eyes"];
async onLoad() {
async onLoad(option) {
// 保持屏幕常亮
Taro.setKeepScreenOn({
keepScreenOn: true,
@ -250,10 +250,13 @@ class IotCarePlanFR200 extends Component<any, any> {
this.initData();
this.getInstrumentClockSummary();
this.getInstrumentClockDetail();
if (option.modeId) {
this.setState({ activeModeID: option.modeId })
}
}
componentDidMount() {}
componentDidMount() { }
componentWillUnmount() {}
componentWillUnmount() { }
componentDidShow() {
console.log("页面显示了");
@ -389,6 +392,16 @@ class IotCarePlanFR200 extends Component<any, any> {
ModeList: res.data.data,
});
if (this.state.activeModeID != '') {
this.state.ModeList.map(item => {
if (item.id === this.state.activeModeID) {
this.setState({
ActiveModeItem: item
});
}
})
}
setTimeout(() => {
this.modeCurrentFun(res.data.data[0]);
}, 100);
@ -587,7 +600,7 @@ class IotCarePlanFR200 extends Component<any, any> {
this.onNursingTap();
// 倒计时弹窗: 倒计时完成后,自动开始,并判断弹窗
let downNum = CountDownTime[this.state.ActiveModeItem.modeType] || 3;
this.showCountdownFun(downNum, () => {});
this.showCountdownFun(downNum, () => { });
}, 500);
return;
@ -613,7 +626,7 @@ class IotCarePlanFR200 extends Component<any, any> {
};
// 绘制能量图
drawProwerPicture() {}
drawProwerPicture() { }
/** 切换光照 */
onSwitchChange = async () => {
@ -2083,9 +2096,9 @@ class IotCarePlanFR200 extends Component<any, any> {
deviceInfo={currentDevice}
close={this.connectionClose}
isDisconnect={!isConnectionBlutoot}
offlineChange={() => {}}
offlineChange={() => { }}
pairingChange={this.pairingChange}
upgradeFun={() => {}}
upgradeFun={() => { }}
/>
)}

@ -38,7 +38,8 @@ class MoistureTestReport extends Component<any, any> {
xinde: '',
imglist: [],
id: 0,
show: false
show: false,
modeId: 0
};
}
@ -71,20 +72,18 @@ class MoistureTestReport extends Component<any, any> {
reportData.shuifenGear.rightFace = gear
}
})
this.setState({ reportData });
setTimeout(() => {
console.log(this.state.reportData);
}, 50);
this.setState({ reportData, modeId: option.modeId });
}
async initData() { }
toIndex() {
Taro.reLaunch({ url: "/pages/index/index" });
}
toNursing() {
go(`/moduleIOT/pages/iotCarePlan/FR200?modeId=${this.state.modeId}`)
}
render() {
let { name, imgUrl, reportData, reportData1, isClock, xinde, imglist, id, show } = this.state
let { name, imgUrl, reportData, reportData1, isClock, xinde, imglist, id, show, modeId } = this.state
const getStatusData = (level) => {
var bgCssData = {
@ -288,7 +287,7 @@ class MoistureTestReport extends Component<any, any> {
</View>
<View className='go_clock_in flex sb aitems' >
<View className='go_clock_btn'></View>
<View className='go_clock_btn' onClick={this.toNursing.bind(this)}></View>
<View className='jump_box flex aitems' onClick={this.toIndex}>
<View className='txt'></View>
<Image src='@/img/fr200/right.png' mode='aspectFill'></Image>

@ -1,4 +1,4 @@
import Taro from "@tarojs/taro";
import Taro, { setStorageSync } from "@tarojs/taro";
import classnames from "classnames";
import { Component, PropsWithChildren, useEffect, useState } from "react";
@ -289,7 +289,11 @@ export default class Recording extends Component<any, any> {
};
// 跳转到护理报告
toReport(id, recordId, item) {
console.log(item, "查看类型", item.jumpType);
this.state.bindingInstrumentList.map(instrument => {
if (instrument.id == id) {
setStorageSync("instrument_detail", instrument);
}
})
switch (item.jumpType) {
case 1:
this.One(item);
@ -325,7 +329,7 @@ export default class Recording extends Component<any, any> {
};
// 打开第三种类型
three = async (item) => {
go(`/recoding/pages/moisture_test_report/moisture_test_report?data=${item.nursingData}&date=${item.createTime}`);
go(`/recoding/pages/moisture_test_report/moisture_test_report?data=${item.nursingData}&date=${item.createTime}&modeId=${item.modeId}`);
};
// 打开其他类型
AllDevice = async (item) => {

Loading…
Cancel
Save