qsj 2 years ago
commit e0ab75bf02

@ -46,12 +46,12 @@ class Instrument extends Component<any, any> {
super(props); super(props);
this.state = { this.state = {
name: "instrument", name: "instrument",
isSerialPosition: false,
isBindingError: false, isBindingError: false,
isBindingError203: false, isBindingError203: false,
isBindingCheckError: false, isBindingCheckError: false,
style: "font-size: 28rpx; color: #ccc;", style: "font-size: 28rpx; color: #ccc;",
succeedShow: false, succeedShow: false,
tipShow: false,
loading: true, loading: true,
channelList: [], channelList: [],
channelInfo: { channelInfo: {
@ -126,10 +126,6 @@ class Instrument extends Component<any, any> {
this.setState({ channelInfo }); this.setState({ channelInfo });
}; };
onTipShow = () => {
this.setState({ tipShow: true });
};
onTabTap = (type) => { onTabTap = (type) => {
this.setState({ this.setState({
inputType: type, inputType: type,
@ -532,12 +528,24 @@ class Instrument extends Component<any, any> {
} }
}; };
openLookSerialPosition = () => {
console.log(this.state.channelInfo);
if (this.state.channelInfo.serial) {
this.setState({ isSerialPosition: true });
} else {
msg("暂无图片");
}
};
closeLookSerialPosition = () => {
this.setState({ isSerialPosition: false });
};
render() { render() {
let { let {
isSerialPosition,
isBindingError, isBindingError,
isBindingError203, isBindingError203,
isBindingCheckError, isBindingCheckError,
show,
channelInfo, channelInfo,
instrumentInfo, instrumentInfo,
inputType, inputType,
@ -602,6 +610,24 @@ class Instrument extends Component<any, any> {
close={this.onBindCheckErrorClose} close={this.onBindCheckErrorClose}
confirm={this.onBindCheckErrorClose} confirm={this.onBindCheckErrorClose}
></PopupAlert> ></PopupAlert>
<PopupAlert
isShow={isSerialPosition}
title="序列号位置"
content={
<View>
<Image
style="width: 100%;height:200px"
mode="aspectFit"
src={channelInfo.serial}
></Image>
</View>
}
confirmButtonText="知道了"
textAlgin="center"
close={this.closeLookSerialPosition}
confirm={this.closeLookSerialPosition}
></PopupAlert>
</View> </View>
<Canvas <Canvas
style="position: fixed;left:-10000px;max-width: 1024px;max-height: 768px;" style="position: fixed;left:-10000px;max-width: 1024px;max-height: 768px;"
@ -726,7 +752,10 @@ class Instrument extends Component<any, any> {
* *
</Text> </Text>
</View> </View>
<View className="label_text" onClick={this.onTipShow}> <View
className="label_text"
onClick={this.openLookSerialPosition}
>
<Text className="label-tips"></Text> <Text className="label-tips"></Text>
<Image <Image
className="right_icon" className="right_icon"

@ -213,6 +213,8 @@ page {
display: inline-block; display: inline-block;
height: 100%; height: 100%;
text-align: center; text-align: center;
padding-left: 10rpx;
padding-right: 20rpx;
.block1_1 { .block1_1 {
height: 100%; height: 100%;
flex-direction: column; flex-direction: column;
@ -230,14 +232,14 @@ page {
height: 140rpx; height: 140rpx;
border-radius: 20rpx; border-radius: 20rpx;
overflow: hidden; overflow: hidden;
margin-left: 6rpx; // margin-left: 6rpx;
image { image {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
} }
.tip1 { .tip1 {
margin-top: 20rpx; margin-top: 16rpx;
font-size: 26rpx; font-size: 26rpx;
font-weight: bold; font-weight: bold;
color: #000000; color: #000000;
@ -253,7 +255,7 @@ page {
border: 3rpx solid #f1f1f1; border: 3rpx solid #f1f1f1;
width: 30rpx; width: 30rpx;
height: 30rpx; height: 30rpx;
margin-top: 15rpx; margin-top: 10rpx;
&.is-select { &.is-select {
display: flex; display: flex;
background-color: #fff; background-color: #fff;

@ -34,8 +34,7 @@ export default class InstrumentClickInUpload extends Component<any, any> {
year: new Date().getFullYear(), year: new Date().getFullYear(),
month: String(new Date().getMonth() + 1).padStart(2, "0"), month: String(new Date().getMonth() + 1).padStart(2, "0"),
day: String(new Date().getDate()).padStart(2, "0"), day: String(new Date().getDate()).padStart(2, "0"),
zkmoshiindex: 0, modeIndex: 0,
modeIndex: null,
stepIndex: null, stepIndex: null,
autoPlay: false, autoPlay: false,
scrollleft: 0, scrollleft: 0,
@ -154,7 +153,7 @@ export default class InstrumentClickInUpload extends Component<any, any> {
this.onModeLockOpen(); // 点击了锁定模式 this.onModeLockOpen(); // 点击了锁定模式
return; return;
} }
this.setState({ zkmoshiindex: index, currentInfo }); this.setState({ modeIndex: index, currentInfo });
}; };
// 选择图片上传 // 选择图片上传
@ -300,7 +299,6 @@ export default class InstrumentClickInUpload extends Component<any, any> {
duration, duration,
showVideoPlayBtn, showVideoPlayBtn,
scrollleft, scrollleft,
zkmoshiindex,
punchInInfo, punchInInfo,
isTipShow, isTipShow,
currentInfo, currentInfo,
@ -319,119 +317,119 @@ export default class InstrumentClickInUpload extends Component<any, any> {
} = this.state; } = this.state;
return ( return (
<Block> <Block>
<Navbar titleSlot='打卡上传' isBack /> <Navbar titleSlot="打卡上传" isBack />
<Canvas <Canvas
style='position: fixed;left:-10000px;' style="position: fixed;left:-10000px;"
id='compressImage' id="compressImage"
canvasId='compressImage' canvasId="compressImage"
type='2d' type="2d"
></Canvas> ></Canvas>
<View catchMove> <View catchMove>
<PopupAlert <PopupAlert
isShow={isModeLock} isShow={isModeLock}
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}
/> />
<PopupInstrumentUploadTips <PopupInstrumentUploadTips
isShow={isTipShow} isShow={isTipShow}
title='打卡介绍' title="打卡介绍"
data={nurseInfo} data={nurseInfo}
close={this.onTipShowClose} close={this.onTipShowClose}
confirm={this.onTipShowClose} confirm={this.onTipShowClose}
/> />
</View> </View>
<View className='infobox1 flex aitems jcenter'> <View className="infobox1 flex aitems jcenter">
<View className='img'> <View className="img">
<Video <Video
src={currentInfo.modeVideo} src={currentInfo.modeVideo}
id='myVideo' id="myVideo"
enableProgressGesture={false} enableProgressGesture={false}
controls controls
// autoplay={false} // autoplay={false}
direction={0} direction={0}
loop={false} loop={false}
showMuteBtn showMuteBtn
referrerPolicy='origin' referrerPolicy="origin"
onTimeUpdate={this.videoBindTimeUpdate} onTimeUpdate={this.videoBindTimeUpdate}
onEnded={this.videoEnded} onEnded={this.videoEnded}
onPause={this.videoPause} onPause={this.videoPause}
onPlay={this.videoPlay} onPlay={this.videoPlay}
showCenterPlayBtn={false} showCenterPlayBtn={false}
onLoadedMetaData={this.videoLoadedMetaData} onLoadedMetaData={this.videoLoadedMetaData}
style='width: 100%; height: 100%;border-radius: 30rpx;' style="width: 100%; height: 100%;border-radius: 30rpx;"
/> />
{showVideoPlayBtn && ( {showVideoPlayBtn && (
<View className='video-cover'> <View className="video-cover">
<Image <Image
className='video-cover-icon' className="video-cover-icon"
src={require("@/img/fr200/play.png")} src={require("@/img/fr200/play.png")}
onClick={this.onPlayTap} onClick={this.onPlayTap}
></Image> ></Image>
{duration && ( {duration && (
<View className='video-cover-time'>{duration}</View> <View className="video-cover-time">{duration}</View>
)} )}
</View> </View>
)} )}
</View> </View>
</View> </View>
<View className='infobox3'> <View className="infobox3">
<ScrollView <ScrollView
style='white-space: nowrap; height: 100%;' style="white-space: nowrap; height: 100%;"
scroll-x scroll-x
scroll-left={scrollleft} scroll-left={scrollleft}
> >
{modeInfo.map((item, index) => { {modeInfo.map((item, index) => {
return ( return (
<View <View
className='info1' className="info1"
onClick={this.bindMoshi.bind(this, index)} onClick={this.bindMoshi.bind(this, index)}
key={index} key={index}
> >
<View <View
className='flex aitems modebox' className="flex aitems modebox"
style={{ style={{
height: "100%", height: "100%",
background: background:
zkmoshiindex == index modeIndex == index
? "linear-gradient(90deg, #EFDCC2, #FFF2DF)" ? "linear-gradient(90deg, #EFDCC2, #FFF2DF)"
: "", : "",
}} }}
> >
<View className='block1'> <View className="block1">
<View className='block1_1 flex aitems '> <View className="block1_1 flex aitems ">
<View className='tip1'>{item.modeName}</View> <View className="tip1">{item.modeName}</View>
<View className='tip2'>{item.modeDesc}</View> <View className="tip2">{item.modeDesc}</View>
{!item.lock && zkmoshiindex !== index && ( {!item.lock && modeIndex !== index && (
<View className='quan1'></View> <View className="quan1"></View>
)} )}
{!item.lock && zkmoshiindex == index && ( {!item.lock && modeIndex == index && (
<View className='quan1 is-select flex aitems jcenter'> <View className="quan1 is-select flex aitems jcenter">
<View className='quan2'></View> <View className="quan2"></View>
</View> </View>
)} )}
{item.lock && ( {item.lock && (
<View className='icon'> <View className="icon">
<Image <Image
src={require("@/img/fr200/suo.png")} src={require("@/img/fr200/suo.png")}
mode='aspectFill' mode="aspectFill"
></Image> ></Image>
</View> </View>
)} )}
</View> </View>
</View> </View>
{item.modeBanner && index == zkmoshiindex && ( {item.modeBanner && index == modeIndex && (
<View className='info1_img'> <View className="info1_img">
<Image src={item.modeBanner} mode='aspectFill' /> <Image src={item.modeBanner} mode="aspectFill" />
</View> </View>
)} )}
</View> </View>
@ -441,32 +439,32 @@ export default class InstrumentClickInUpload extends Component<any, any> {
</ScrollView> </ScrollView>
</View> </View>
<View className='infobox2'> <View className="infobox2">
<View className='infobox2_info'> <View className="infobox2_info">
<View className='info4'> <View className="info4">
<View className='upload_header flex aitems sb'> <View className="upload_header flex aitems sb">
<View className='upload_title'></View> <View className="upload_title"></View>
<View className='icon' onClick={this.onTipShowOpen}> <View className="icon" onClick={this.onTipShowOpen}>
<Image <Image
src={require("@/img/clock_in_upload/info.png")} src={require("@/img/clock_in_upload/info.png")}
mode='aspectFill' mode="aspectFill"
></Image> ></Image>
</View> </View>
</View> </View>
<View className='imgbox flex aitems'> <View className="imgbox flex aitems">
{punchInInfo.clockImageList.length > 0 && {punchInInfo.clockImageList.length > 0 &&
punchInInfo.clockImageList.map((item, index) => { punchInInfo.clockImageList.map((item, index) => {
return ( return (
<View className='img' key={"clickin_" + index}> <View className="img" key={"clickin_" + index}>
<Image src={item}></Image> <Image src={item}></Image>
<View <View
className='close flex aitems jcenter' className="close flex aitems jcenter"
data-index={index} data-index={index}
onClick={this.handleDeleteImage} onClick={this.handleDeleteImage}
> >
<Image <Image
src={require("@/img/fr200/close_white.png")} src={require("@/img/fr200/close_white.png")}
mode='widthFix' mode="widthFix"
></Image> ></Image>
</View> </View>
</View> </View>
@ -475,23 +473,23 @@ export default class InstrumentClickInUpload extends Component<any, any> {
{punchInInfo.clockImageList.length < 3 && ( {punchInInfo.clockImageList.length < 3 && (
<View <View
className='img2 flex aitems jcenter' className="img2 flex aitems jcenter"
onClick={this.handleChooseImage} onClick={this.handleChooseImage}
> >
<Image <Image
src={require("@/img/fr200/add-image.png")} src={require("@/img/fr200/add-image.png")}
mode='aspectFill' mode="aspectFill"
></Image> ></Image>
</View> </View>
)} )}
</View> </View>
<View className='content'> <View className="content">
<Textarea <Textarea
placeholder-className="placeh和给g'holder" placeholder-className="placeh和给g'holder"
maxlength={100} maxlength={100}
onInput={this.handleTextareaInput} onInput={this.handleTextareaInput}
value={punchInInfo.clockContent} value={punchInInfo.clockContent}
placeholder='请记录一下今天打卡的心得吧~' placeholder="请记录一下今天打卡的心得吧~"
></Textarea> ></Textarea>
{/* {tipshow && ( {/* {tipshow && (
<View className="Textarea"> <View className="Textarea">
@ -500,7 +498,7 @@ export default class InstrumentClickInUpload extends Component<any, any> {
: "请记录一下今天打卡的心得吧~"} : "请记录一下今天打卡的心得吧~"}
</View> </View>
)} */} )} */}
<View className='tips-num'> <View className="tips-num">
{punchInInfo.clockContent.length}/100 {punchInInfo.clockContent.length}/100
{/* {punchInInfo.clockContent.length}/100 */} {/* {punchInInfo.clockContent.length}/100 */}
</View> </View>
@ -509,16 +507,16 @@ export default class InstrumentClickInUpload extends Component<any, any> {
</View> </View>
</View> </View>
<View style='height: 150rpx'></View> <View style="height: 150rpx"></View>
{!isSubmit && ( {!isSubmit && (
<View className='confirm_btn flex aitems' onClick={this.handleSubmit}> <View className="confirm_btn flex aitems" onClick={this.handleSubmit}>
<View className='btn'></View> <View className="btn"></View>
</View> </View>
)} )}
{isSubmit && ( {isSubmit && (
<View className='confirm_btn flex aitems'> <View className="confirm_btn flex aitems">
<View className='btn'></View> <View className="btn"></View>
</View> </View>
)} )}
</Block> </Block>

@ -3,17 +3,19 @@ page {
padding-bottom: calc(env(safe-area-inset-bottom)); padding-bottom: calc(env(safe-area-inset-bottom));
} }
.list { .list {
margin: 26rpx 30rpx 0rpx; margin: 38rpx 30rpx 0 30rpx;
border-radius: 50rpx; border-radius: 50rpx;
padding-bottom: 0rpx; padding-bottom: 0rpx;
overflow: hidden; overflow: hidden;
position: relative; position: relative;
height: calc(166rpx * 2); height: 368rpx;
} }
.list > .instrument_img { .list > .instrument_img {
position: relative; position: relative;
height: 100%; height: 100%;
/* top: -250rpx; */ image {
background: #eee;
}
} }
.list > .instrument_img .bind_status { .list > .instrument_img .bind_status {
position: absolute; position: absolute;

@ -63,11 +63,11 @@ export default class InstrumentDetail extends Component<any, any> {
<Image src={info.instrumentBanner} /> <Image src={info.instrumentBanner} />
<View className="bind_status"></View> <View className="bind_status"></View>
<View className="titile">{info.instrumentName}</View> <View className="titile">{info.instrumentName}</View>
{/* {info.iot == 2 && ( {info.instrumentIotVersion && (
<View className="iot_versions"> <View className="iot_versions">
{info.iot_versions} {info.instrumentIotVersion}
</View> </View>
)} */} )}
</View> </View>
</View> </View>
</Block> </Block>

@ -4,7 +4,7 @@ page {
} }
.instrument_box { .instrument_box {
.title { .title {
margin: 35rpx 37rpx; margin: 34rpx 48rpx;
font-size: 32rpx; font-size: 32rpx;
font-weight: bold; font-weight: bold;
color: #030000; color: #030000;
@ -24,7 +24,7 @@ page {
} }
.bind_list { .bind_list {
height: 650rpx; height: 630rpx;
.wrapper { .wrapper {
display: inline-block; display: inline-block;
@ -37,7 +37,7 @@ page {
font-size: 24rpx; font-size: 24rpx;
left: 40rpx; left: 40rpx;
padding: 6rpx 40rpx; padding: 6rpx 40rpx;
background: linear-gradient(90deg, #fff0da, #ffe4c0); background: linear-gradient(90deg, #ffe4c0, #ffedce);
border-radius: 30rpx; border-radius: 30rpx;
} }
} }
@ -61,7 +61,7 @@ page {
color: #000000; color: #000000;
width: 100%; width: 100%;
line-height: 1; line-height: 1;
margin: 30rpx 0; margin: 30rpx 0 35rpx 0;
box-sizing: border-box; box-sizing: border-box;
} }
.intro { .intro {
@ -100,10 +100,12 @@ page {
font-size: 36rpx; font-size: 36rpx;
font-weight: bold; font-weight: bold;
color: #000000; color: #000000;
margin-top: 60rpx;
} }
.bindinfo { .bindinfo {
/* display: block; */ /* display: block; */
margin: 0 auto; margin: 0 auto;
margin-top: 43rpx;
width: 240rpx; width: 240rpx;
height: 60rpx; height: 60rpx;
line-height: 60rpx; line-height: 60rpx;

@ -54,18 +54,19 @@ export default class InstrumentManage extends Component<any, any> {
componentDidHide() {} componentDidHide() {}
async initData() { async initData() {
Taro.showLoading({
title: "请求中...",
mask: true,
});
this.bindingInstrumentList(); this.bindingInstrumentList();
this.unbindingInstrumentInfoList(); this.unbindingInstrumentInfoList();
Taro.hideLoading();
} }
// 获取已绑定仪器列表 // 获取已绑定仪器列表
bindingInstrumentList = async () => { bindingInstrumentList = async () => {
Taro.showLoading({
title: "请求中...",
mask: true,
});
let { data: res } = await InstrumentInfo.bindingInstrumentList(); let { data: res } = await InstrumentInfo.bindingInstrumentList();
Taro.hideLoading();
if (res.code === 200) { if (res.code === 200) {
this.setState({ bindList: res.data }); this.setState({ bindList: res.data });
} else { } else {
@ -74,12 +75,7 @@ export default class InstrumentManage extends Component<any, any> {
}; };
// 获取未绑定仪器列表 // 获取未绑定仪器列表
unbindingInstrumentInfoList = async () => { unbindingInstrumentInfoList = async () => {
Taro.showLoading({
title: "请求中...",
mask: true,
});
let { data: res } = await InstrumentInfo.unbindingInstrumentInfoList(); let { data: res } = await InstrumentInfo.unbindingInstrumentInfoList();
Taro.hideLoading();
if (res.code === 200) { if (res.code === 200) {
this.setState({ unBindList: res.data }); this.setState({ unBindList: res.data });
} else { } else {

@ -187,7 +187,7 @@ class IotCarePlanFR200 extends Component<any, any> {
ModeStepIndex: 0, // 当前护理功效步骤:每个步骤时间不定,所以时间另外计算,根据步骤显示 ModeStepIndex: 0, // 当前护理功效步骤:每个步骤时间不定,所以时间另外计算,根据步骤显示
ModeStepTimeArray: [], // 护理功效时间步骤用于切换显示GIF ModeStepTimeArray: [], // 护理功效时间步骤用于切换显示GIF
TestModeStepIndex: 0, // 水分测试步骤 // TestModeStepIndex: 0, // 水分测试步骤
EssenceStepIndex: 0, // 精华促渗步骤 EssenceStepIndex: 0, // 精华促渗步骤
MaskModeStepIndex: 0, // 面膜促渗步骤 MaskModeStepIndex: 0, // 面膜促渗步骤
@ -518,7 +518,7 @@ class IotCarePlanFR200 extends Component<any, any> {
activeModeID: data.id, activeModeID: data.id,
ModeID: "mode_" + data.id, ModeID: "mode_" + data.id,
ModeStepIndex: 0, ModeStepIndex: 0,
TestModeStepIndex: 0, // 水分测试步骤 waterStepIndex: 0, // 水分测试步骤
EssenceStepIndex: 0, // 精华促渗步骤 EssenceStepIndex: 0, // 精华促渗步骤
MaskModeStepIndex: 0, // 面膜促渗步骤 MaskModeStepIndex: 0, // 面膜促渗步骤
ModeType: this.ModeTypeArray[data.modeClass], ModeType: this.ModeTypeArray[data.modeClass],
@ -670,14 +670,12 @@ class IotCarePlanFR200 extends Component<any, any> {
nursingTime: s_to_hms(this.elapsedTime), nursingTime: s_to_hms(this.elapsedTime),
nursingData: JSON.stringify({ nursingData: JSON.stringify({
GearData: [...waterStepList], GearData: [...waterStepList],
}) }),
}; };
// params = { ...params, ...nursingData }; // params = { ...params, ...nursingData };
let res: any = await InstrumentInfo.apiNursingLog.addLog( let res: any = await InstrumentInfo.apiNursingLog.addLog(
JSON.stringify( JSON.stringify(params)
params
)
); );
setTimeout(async () => { setTimeout(async () => {
this.setState({ this.setState({
@ -686,59 +684,78 @@ class IotCarePlanFR200 extends Component<any, any> {
let date = new Date(); let date = new Date();
let year = date.getFullYear(); let year = date.getFullYear();
let month = (date.getMonth() + 1).toString().padStart(2, '0'); let month = (date.getMonth() + 1).toString().padStart(2, "0");
let day = date.getDate().toString().padStart(2, '0'); let day = date.getDate().toString().padStart(2, "0");
let formattedDate = `${year}.${month}.${day}`; let formattedDate = `${year}.${month}.${day}`;
this.moistureTest(
this.moistureTest(params.nursingData, formattedDate, ActiveModeItem.id, currentDevice.id) params.nursingData,
formattedDate,
ActiveModeItem.id,
currentDevice.id
);
}, 2000); }, 2000);
}; };
async moistureTest(nursingData, formattedDate, ActiveModeItemId, currentDeviceId) { async moistureTest(
nursingData,
formattedDate,
ActiveModeItemId,
currentDeviceId
) {
let data = { let data = {
queryDate: formattedDate, queryDate: formattedDate,
instrumentId: currentDeviceId instrumentId: currentDeviceId,
} };
let res = await InstrumentInfo.fr200.moistureTest(data); let res = await InstrumentInfo.fr200.moistureTest(data);
let echartsData = res.data.rows let echartsData = res.data.rows;
for (let i = 0; i < echartsData.length; i++) { for (let i = 0; i < echartsData.length; i++) {
for (let j = i + 1; j < echartsData.length; j++) { for (let j = i + 1; j < echartsData.length; j++) {
if (echartsData[i].createTime.split(' ')[0] == echartsData[j].createTime.split(' ')[0]) { if (
let result = Date.parse(echartsData[i].createTime) - Date.parse(echartsData[j].createTime) echartsData[i].createTime.split(" ")[0] ==
echartsData[j].createTime.split(" ")[0]
) {
let result =
Date.parse(echartsData[i].createTime) -
Date.parse(echartsData[j].createTime);
if (result < 0) { if (result < 0) {
echartsData.splice(i, 1) echartsData.splice(i, 1);
} else { } else {
echartsData.splice(j, 1) echartsData.splice(j, 1);
} }
} }
} }
} }
let gears: any = [] let gears: any = [];
let eDate: any = [] let eDate: any = [];
echartsData?.map(item => { echartsData?.map((item) => {
const result = item.createTime.split(' ')[0].substring(5); console.log(item, "查看数据");
eDate.push(result)
item.nursingData = JSON.parse(item.nursingData) const result = item.createTime.split(" ")[0].substring(5);
let level: any = 0 eDate.push(result);
item.nursingData?.GearData?.map(gear => { item.nursingData = JSON.parse(item.nursingData);
level = level + gear.forehead let level: any = 0;
}) item.nursingData?.GearData?.map((gear) => {
level = Math.floor(level / 3) level = level + gear.forehead;
gears.push(level) });
}) level = Math.floor(level / 3);
gears.push(level);
});
echartsData = { echartsData = {
gears, eDate gears,
} eDate,
setStorageSync('moistureEachtsData', JSON.stringify(echartsData)) };
setStorageSync("moistureEachtsData", JSON.stringify(echartsData));
// go(`/recoding/pages/moisture_test_report/moisture_test_report?data=${allData.nursingData}&date=${allData.createTime}&modeId=${allData.modeId}&id=${allData.instrumentId}&echartsData=${JSON.stringify(echartsData)}`); // go(`/recoding/pages/moisture_test_report/moisture_test_report?data=${allData.nursingData}&date=${allData.createTime}&modeId=${allData.modeId}&id=${allData.instrumentId}&echartsData=${JSON.stringify(echartsData)}`);
go(`/recoding/pages/moisture_test_report/moisture_test_report?data=${nursingData}&date=${formattedDate}&modeId=${ActiveModeItemId}&id=${currentDeviceId}&echartsData=${JSON.stringify(echartsData)}`); go(
`/recoding/pages/moisture_test_report/moisture_test_report?data=${nursingData}&date=${formattedDate}&modeId=${ActiveModeItemId}&id=${currentDeviceId}&echartsData=${JSON.stringify(
echartsData
)}`
);
} }
/** /**
* @name * @name
* @description * @description
@ -922,7 +939,7 @@ class IotCarePlanFR200 extends Component<any, any> {
let num = waterStepIndex; let num = waterStepIndex;
if (waterStepIndex < 2) { if (waterStepIndex < 2) {
num = waterStepIndex + 1; num = waterStepIndex + 1;
this.waterTestNext(num) this.waterTestNext(num);
} }
this.setState({ this.setState({
waterStepIndex: num, waterStepIndex: num,
@ -1338,7 +1355,7 @@ class IotCarePlanFR200 extends Component<any, any> {
clearInterval(currentTimeTimer); clearInterval(currentTimeTimer);
this.setState({ this.setState({
currentTime: "00:00", currentTime: "00:00",
TestModeStepIndex: 0, // 水分测试步骤 waterStepIndex: 0, // 水分测试步骤
EssenceStepIndex: 0, // 精华促渗步骤 EssenceStepIndex: 0, // 精华促渗步骤
MaskModeStepIndex: 0, // 面膜促渗步骤 MaskModeStepIndex: 0, // 面膜促渗步骤
}); });
@ -1353,7 +1370,7 @@ class IotCarePlanFR200 extends Component<any, any> {
* @description +1 * @description +1
*/ */
waterTestNext(index) { waterTestNext(index) {
let ActiveModeItem = this.state.ActiveModeItem let ActiveModeItem = this.state.ActiveModeItem;
if (index === 0 && ActiveModeItem.stepOneVideo) { if (index === 0 && ActiveModeItem.stepOneVideo) {
this.VideoSrcLoad(ActiveModeItem.stepOneVideo); this.VideoSrcLoad(ActiveModeItem.stepOneVideo);
} else if (index === 1 && ActiveModeItem.stepTwoVideo) { } else if (index === 1 && ActiveModeItem.stepTwoVideo) {
@ -1635,7 +1652,7 @@ class IotCarePlanFR200 extends Component<any, any> {
// 水分测试需要特殊处理 // 水分测试需要特殊处理
// 水分测试准备 水分测试工作 水分测试启动 // 水分测试准备 水分测试工作 水分测试启动
if (ActiveModeItem.modeType === "moistureTest") { if (ActiveModeItem.modeType === "moistureTest") {
let that = this let that = this;
sendParams.testStatus = "standby"; // 切换为准备 sendParams.testStatus = "standby"; // 切换为准备
// 3秒定时器逻辑3秒把进度条弄成100再加2秒获取最后结果 // 3秒定时器逻辑3秒把进度条弄成100再加2秒获取最后结果
@ -2028,16 +2045,18 @@ class IotCarePlanFR200 extends Component<any, any> {
// 脸部one // 脸部one
todoPromise = async () => { todoPromise = async () => {
const nowFR200NursingHistory = Taro.getStorageSync("FR200NursingHistory"); const nowFR200NursingHistory = Taro.getStorageSync("FR200NursingHistory");
console.log(nowFR200NursingHistory, 'nowFR200NursingHistory'); console.log(nowFR200NursingHistory, "nowFR200NursingHistory");
// 护理脸部 // 护理脸部
if ([ if (
[
"face", "face",
"eyes", "eyes",
"nasolabialFold", "nasolabialFold",
"mandibularLine", "mandibularLine",
"headLiftingPro", "headLiftingPro",
].includes(nowFR200NursingHistory.jsonStatus.workMode)) { ].includes(nowFR200NursingHistory.jsonStatus.workMode)
) {
// 把working=工作中的状态数据筛选出来 // 把working=工作中的状态数据筛选出来
let filtered = nowFR200NursingHistory.dataArray.filter( let filtered = nowFR200NursingHistory.dataArray.filter(
(item) => item.workStatus === "working" (item) => item.workStatus === "working"
@ -2139,7 +2158,6 @@ class IotCarePlanFR200 extends Component<any, any> {
} }
let res1: any = await this.todoPromise(); let res1: any = await this.todoPromise();
if (!res1?.showFace) { if (!res1?.showFace) {
params = { ...params, ...res1 }; params = { ...params, ...res1 };
} }
console.log(res1, "查看返回数据"); console.log(res1, "查看返回数据");
@ -2164,7 +2182,12 @@ class IotCarePlanFR200 extends Component<any, any> {
isShowNursingSuccess: false, isShowNursingSuccess: false,
}); });
this.goFaceReport(res1, ActiveModeItem.id, res2.data.data, currentDevice.id); // 跳转 this.goFaceReport(
res1,
ActiveModeItem.id,
res2.data.data,
currentDevice.id
); // 跳转
}, 2000); }, 2000);
} }
} }
@ -2273,39 +2296,40 @@ class IotCarePlanFR200 extends Component<any, any> {
"headLiftingPro", "headLiftingPro",
].includes(nursingData.workMode) ].includes(nursingData.workMode)
) { ) {
let ids = Number(deviceid) let ids = Number(deviceid);
// 获取echarts数据 这个是获取接口更新echarts页面 // 获取echarts数据 这个是获取接口更新echarts页面
let res2 = await InstrumentInfo.apiNursingLog.getStatiCDE(ids); let res2 = await InstrumentInfo.apiNursingLog.getStatiCDE(ids);
let nursingDatas = JSON.parse(res2.data.data.nursingData) let nursingDatas = JSON.parse(res2.data.data.nursingData);
let obj = { let obj = {
modeName: res2.data.data.modeName, modeName: res2.data.data.modeName,
data: nursingDatas data: nursingDatas,
} };
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 + "&obj=" + report +
"&obj=" +
JSON.stringify(obj) JSON.stringify(obj)
); );
} else if ("moistureTest" === nursingData.workMode) { } else if ("moistureTest" === nursingData.workMode) {
console.log("水分测试"); console.log("水分测试");
} else { } else {
console.log('跳转11111111'); console.log("跳转11111111");
let report = true; let report = true;
go( go(
"/recoding/pages/face_report/face_report?id=" + "/recoding/pages/face_report/face_report?id=" +
deviceid + deviceid +
"&recordId=" + currentDevice + "&recordId=" +
currentDevice +
"&report=" + "&report=" +
report report
); );
} }
}; };
@ -2465,7 +2489,6 @@ class IotCarePlanFR200 extends Component<any, any> {
isRuningTest, isRuningTest,
isShowHistoryMsg, isShowHistoryMsg,
isModeLock, isModeLock,
TestModeStepIndex,
currentVideoSrc, currentVideoSrc,
currentGear, currentGear,
showEcharts, showEcharts,
@ -2712,7 +2735,6 @@ class IotCarePlanFR200 extends Component<any, any> {
{ActiveModeItem.modeType === "moistureTest" && ( {ActiveModeItem.modeType === "moistureTest" && (
<WaterTest <WaterTest
isRuningTest={isRuningTest} isRuningTest={isRuningTest}
TestModeStepIndex={TestModeStepIndex}
stepList={waterStepList} stepList={waterStepList}
stepIndex={waterStepIndex} stepIndex={waterStepIndex}
></WaterTest> ></WaterTest>

@ -7,16 +7,11 @@ import "./index.less";
interface Props { interface Props {
isRuningTest: boolean; // 是否已开始水分测试 isRuningTest: boolean; // 是否已开始水分测试
TestModeStepIndex: number; // 当前测试步骤 stepList: any;
stepList:any stepIndex: any;
stepIndex:any
} }
function Index({ function Index({ isRuningTest, stepList, stepIndex }: Props) {
isRuningTest,
stepList,
stepIndex
}:Props) {
// const stepIndex = 0; // const stepIndex = 0;
const testIndex = 1; const testIndex = 1;

Loading…
Cancel
Save