qsj 2 years ago
commit e55061722d

@ -20,7 +20,6 @@ export default defineAppConfig({
"pages/integral_list/integral_list", "pages/integral_list/integral_list",
"pages/webViewPage/webViewPage", "pages/webViewPage/webViewPage",
"pages/template/template", "pages/template/template",
"pages/face_report/face_report",
"pages/face_report_AllDevice/face_report_AllDevice", "pages/face_report_AllDevice/face_report_AllDevice",
"pages/connection_help/connection_help", "pages/connection_help/connection_help",
"pages/errorpage/errorpage", "pages/errorpage/errorpage",
@ -84,6 +83,7 @@ export default defineAppConfig({
root: "recoding", root: "recoding",
pages: [ pages: [
"pages/recording/recording", "pages/recording/recording",
"pages/face_report/face_report",
"pages/face_report_one/face_report_one", "pages/face_report_one/face_report_one",
"pages/moisture_test_report/moisture_test_report", "pages/moisture_test_report/moisture_test_report",
], ],

Binary file not shown.

Before

Width:  |  Height:  |  Size: 246 KiB

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 237 KiB

After

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 246 KiB

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 246 KiB

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 246 KiB

After

Width:  |  Height:  |  Size: 81 KiB

@ -178,8 +178,7 @@ class IotCarePlanFR200 extends Component<any, any> {
isModeLock: false, // 模式是否锁定 isModeLock: false, // 模式是否锁定
isSwitchActiveMode: false, // 是否显示弹窗切换模式 isSwitchActiveMode: false, // 是否显示弹窗切换模式
ModeList: [], ModeList: [],
ModeType: "base", // all ModeType: "all", // all 1基础护理 2专区护理 3专研促渗 4敏期护理 5智能测肤
modeClass: "", // 1基础护理 2专区护理 3专研促渗 4敏期护理 5智能测肤
ActiveModeItem: { ActiveModeItem: {
openSourceData: [], openSourceData: [],
}, // 当前选中模式 }, // 当前选中模式
@ -484,14 +483,6 @@ class IotCarePlanFR200 extends Component<any, any> {
if (isReturn) return; if (isReturn) return;
} }
let currentServiceData = {
startSource: "",
stopSource: "",
};
if (data.serviceData.length) {
currentServiceData = data.serviceData[0];
}
let currentTime = data.modeTimeStr; let currentTime = data.modeTimeStr;
// 根据模式,动态设置底部按钮样式 // 根据模式,动态设置底部按钮样式
@ -509,20 +500,12 @@ class IotCarePlanFR200 extends Component<any, any> {
ActiveModeItem: data, ActiveModeItem: data,
activeModeID: data.id, activeModeID: data.id,
ModeID: "mode_" + data.id, ModeID: "mode_" + data.id,
currentServiceData,
ModeStepIndex: 0, ModeStepIndex: 0,
ModeType: this.ModeTypeArray[data.modeClass], ModeType: this.ModeTypeArray[data.modeClass],
currentTime, currentTime,
currentWorkModeType, currentWorkModeType,
}); });
setTimeout(() => {
// 设置时间组合
if (data.serviceData.length > 0) {
this.setServiceTimeData();
}
});
// 开发中,暂时允许直接切换 // 开发中,暂时允许直接切换
// 每次切换模式时清空一下历史数据 // 每次切换模式时清空一下历史数据
this.changeItemUpdateFR200NursingHistory(); this.changeItemUpdateFR200NursingHistory();
@ -1300,7 +1283,6 @@ class IotCarePlanFR200 extends Component<any, any> {
); );
this.setState({ this.setState({
ModeStepIndex: index, ModeStepIndex: index,
currentServiceData,
}); });
} }
} }
@ -1552,7 +1534,7 @@ class IotCarePlanFR200 extends Component<any, any> {
// 仪器缓存模式,判断是否存在于现有模式中 // 仪器缓存模式,判断是否存在于现有模式中
let recordModeItem = ModeList.find((item) => { let recordModeItem = ModeList.find((item) => {
return item.id == FR200NursingHistory.currentServiceData.modeId; return item.id == FR200NursingHistory.modeId;
}); });
if (!FR200NursingHistory || !recordModeItem) { if (!FR200NursingHistory || !recordModeItem) {
console.log("仪器有数据, 但是缓存没有数据, 忽略"); console.log("仪器有数据, 但是缓存没有数据, 忽略");
@ -1652,7 +1634,7 @@ class IotCarePlanFR200 extends Component<any, any> {
this.setState({ this.setState({
isShowNurse: true, isShowNurse: true,
isShowHistoryMsg: true, isShowHistoryMsg: true,
currentServiceData: this.FR200NursingHistory.currentServiceData, videoTime: this.FR200NursingHistory.videoTime,
tempModeCurrent: ActiveModeItem, tempModeCurrent: ActiveModeItem,
ActiveModeItem: ActiveModeItem, ActiveModeItem: ActiveModeItem,
activeModeID: ActiveModeItem.id, activeModeID: ActiveModeItem.id,
@ -1695,21 +1677,10 @@ class IotCarePlanFR200 extends Component<any, any> {
// 设置当前时间 // 设置当前时间
params.currentTime = this.state.currentTime; params.currentTime = this.state.currentTime;
// params.videoTime;
// 设置正确封面 // 设置正确封面
if (data) { if (!data) {
params.currentServiceData = data;
} else {
let currentServiceData = {
startSource: "",
stopSource: "",
};
let serviceLength = this.state.ActiveModeItem.serviceData.length;
if (serviceLength > 0) {
currentServiceData = this.state.ActiveModeItem.serviceData[0];
}
params.currentServiceData = currentServiceData;
if (jsonStatus) { if (jsonStatus) {
// 缓存每秒数据 // 缓存每秒数据
if (!params.dataArray) params.dataArray = []; if (!params.dataArray) params.dataArray = [];
@ -2079,7 +2050,10 @@ class IotCarePlanFR200 extends Component<any, any> {
} else if ("moistureTest" === nursingData.workMode) { } else if ("moistureTest" === nursingData.workMode) {
console.log("水分测试"); console.log("水分测试");
} else { } else {
go("/pages/face_report/face_report?id=" + this.state.currentDevice.id); go(
"/recoding/pages/face_report/face_report?id=" +
this.state.currentDevice.id
);
} }
}; };

@ -1928,7 +1928,10 @@ class IotCarePlanWL200 extends Component<any, any> {
goFaceReport = () => { goFaceReport = () => {
// 跳转前置空定时器,防止重复提交 // 跳转前置空定时器,防止重复提交
if (currentTimeTimer) clearInterval(currentTimeTimer); if (currentTimeTimer) clearInterval(currentTimeTimer);
go("/pages/face_report/face_report?id=" + this.state.currentDevice.id); go(
"/recoding/pages/face_report/face_report?id=" +
this.state.currentDevice.id
);
}; };
// 完成配对 // 完成配对

@ -8,7 +8,7 @@ interface Props {
ModeID: any; ModeID: any;
activeModeID: any; activeModeID: any;
ModeList: any; ModeList: any;
ModeType: string; // all visor cabin yimeish ModeType: string; // all base eyes zone permeation sensitive intelligence
isShowNurse: boolean; // 是否已进入护理详情页 isShowNurse: boolean; // 是否已进入护理详情页
isPop: boolean; // 是否弹窗 isPop: boolean; // 是否弹窗
onEmit: Function; // 每次点击item回调事件和数据给父组件 onEmit: Function; // 每次点击item回调事件和数据给父组件

@ -2,17 +2,22 @@ import Taro from "@tarojs/taro";
import classnames from "classnames"; import classnames from "classnames";
import { Component, PropsWithChildren, useEffect, useState } from "react"; import { Component, PropsWithChildren, useEffect, useState } from "react";
import { Progress } from "@antmjs/vantui"; import { Progress } from "@antmjs/vantui";
import { showModal } from "../../utils/traoAPI"; import { showModal } from "@/utils/traoAPI";
import { Tab, Tabs, Dialog, Popup } from "@antmjs/vantui"; import { Tab, Tabs, Dialog, Popup } from "@antmjs/vantui";
import { import {
Block, View, Text, Image, Input, Button, Textarea, Block,
View,
Text,
Image,
Input,
Button,
Textarea,
} from "@tarojs/components"; } from "@tarojs/components";
import { date, getdates, previewImage } from "../../utils/util"; import { date, getdates, previewImage } from "@/utils/util";
/** 自定义组件 **/ /** 自定义组件 **/
import Navbar from "../../components/navbar/navbar"; import Navbar from "@/components/navbar/navbar";
import PopupAlert from "../../components/popup/popup-alert"; import { InstrumentInfo } from "@/utils/Interface";
import { InstrumentInfo } from "../../utils/Interface";
/** 自定义组件 **/ /** 自定义组件 **/
import "./face_report.less"; import "./face_report.less";
@ -21,8 +26,8 @@ export default class Index extends Component<any, any> {
constructor(props) { constructor(props) {
super(props); super(props);
this.state = { this.state = {
reportShow:true, reportShow: true,
name: "template模板页", name: "护理报告",
statistics: {}, statistics: {},
recordList: [], recordList: [],
recordData: {}, recordData: {},
@ -50,9 +55,9 @@ export default class Index extends Component<any, any> {
}; };
} }
componentDidMount() { } componentDidMount() {}
componentWillUnmount() { } componentWillUnmount() {}
// 打开/关闭弹窗 // 打开/关闭弹窗
setShow(show: boolean) { setShow(show: boolean) {
@ -100,7 +105,9 @@ export default class Index extends Component<any, any> {
// 文本框输入文字 // 文本框输入文字
handleTextareaInput = (e) => { handleTextareaInput = (e) => {
const punchInInfo = this.state.punchInInfo; const punchInInfo = this.state.punchInInfo;
this.setState({ punchInInfo: { ...punchInInfo, clockContent: e.detail.value } }); this.setState({
punchInInfo: { ...punchInInfo, clockContent: e.detail.value },
});
}; };
async submit() { async submit() {
let punchInInfo = this.state.punchInInfo || {}; let punchInInfo = this.state.punchInInfo || {};
@ -123,24 +130,22 @@ export default class Index extends Component<any, any> {
t2: "您已完成今日打卡", t2: "您已完成今日打卡",
btn1show: false, btn1show: false,
}).then(() => { }).then(() => {
let data = new Date let data = new Date();
Taro.setStorageSync('DayTime', data.toISOString()) Taro.setStorageSync("DayTime", data.toISOString());
this.setState({ this.setState({
clockShow: true clockShow: true,
}) });
this.getClockStatistics(); this.getClockStatistics();
this.setShow(false); this.setShow(false);
}); });
}); });
} }
/**分页获取用户的打卡记录 page size*/ /**分页获取用户的打卡记录 page size*/
async getClockStatistics(year = this.state.year) { async getClockStatistics(year = this.state.year) {
let res = await InstrumentInfo.apiClock.getClockStatistics({ year }); let res = await InstrumentInfo.apiClock.getClockStatistics({ year });
console.log(res,'查看返回',year); console.log(res, "查看返回", year);
if (res.data.code === 200) { if (res.data.code === 200) {
res.data.data.reverse(); res.data.data.reverse();
if (res.data.data.length > 0) { if (res.data.data.length > 0) {
res.data.data.map((item, index) => { res.data.data.map((item, index) => {
@ -198,8 +203,8 @@ export default class Index extends Component<any, any> {
this.setState({ clockStatistics: this.state.clockStatistics }); this.setState({ clockStatistics: this.state.clockStatistics });
} }
} }
// 上传图片 // 上传图片
handleChooseImage() { handleChooseImage() {
Taro.chooseMedia({ Taro.chooseMedia({
count: 1, count: 1,
mediaType: ["image"], mediaType: ["image"],
@ -226,13 +231,13 @@ handleChooseImage() {
console.info("err", err); console.info("err", err);
}, },
}); });
} }
// 删除打卡图片 // 删除打卡图片
delImg(i) { delImg(i) {
const punchInInfo = this.state.punchInInfo; const punchInInfo = this.state.punchInInfo;
punchInInfo.clockImageList.splice(i, 1); punchInInfo.clockImageList.splice(i, 1);
this.setState({ punchInInfo }); this.setState({ punchInInfo });
} }
getRouteId() { getRouteId() {
const searchParams = new URLSearchParams(window.location.search); const searchParams = new URLSearchParams(window.location.search);
const id = searchParams.get("id"); const id = searchParams.get("id");
@ -253,31 +258,41 @@ delImg(i) {
} }
} }
async onLoad(options) { async onLoad(options) {
console.log(options,'查看传过来的参数'); console.log(options, "查看传过来的参数");
let Bool = JSON.parse(options?.report) let Bool = JSON.parse(options?.report);
if(!Bool ){ if (!Bool) {
this.setState({ this.setState({
reportShow:Bool reportShow: Bool,
}) });
} }
this.getRouteId(); this.getRouteId();
this.getClockStatistics() this.getClockStatistics();
} }
componentDidShow() { } componentDidShow() {}
componentDidHide() { } componentDidHide() {}
async initData() { } async initData() {}
GoIndex = () => { GoIndex = () => {
Taro.switchTab({ url: "/pages/index/index" }); Taro.switchTab({ url: "/pages/index/index" });
}; };
render() { render() {
let { name, statistics, recordList, recordData, show,clockStatistics,punchInInfo,monthTime,reportShow } = this.state; let {
name,
statistics,
recordList,
recordData,
show,
clockStatistics,
punchInInfo,
monthTime,
reportShow,
} = this.state;
return ( return (
<Block> <Block>
<Navbar isBack titleSlot="护理报告"></Navbar> <Navbar isBack titleSlot="护理报告"></Navbar>
@ -398,21 +413,20 @@ delImg(i) {
</View> </View>
{reportShow ? ( {reportShow ? (
<View className="footer flex aitems"> <View className="footer flex aitems">
<View className="btn" onClick={this.setShow.bind(this, true)}></View> <View className="btn" onClick={this.setShow.bind(this, true)}>
</View>
<View className="text flex aitems"> <View className="text flex aitems">
<View onClick={this.GoIndex}></View> <View onClick={this.GoIndex}></View>
<Image <Image src={require("@/img/right.png")} mode="aspectFill"></Image>
src={require("../../img/right.png")}
mode="aspectFill"
></Image>
</View> </View>
</View> </View>
): null} ) : null}
<Popup show={show} onClose={() => this.setState({ show: false })}> <Popup show={show} onClose={() => this.setState({ show: false })}>
<View className="popBox"> <View className="popBox">
<Image <Image
className="close_icon" className="close_icon"
src={require("../../img/close.png")} src={require("@/img/close.png")}
mode="widthFix" mode="widthFix"
onClick={this.setShow.bind(this, false)} onClick={this.setShow.bind(this, false)}
></Image> ></Image>
@ -432,7 +446,7 @@ delImg(i) {
<Image className="showImg" src={item} mode="widthFix"></Image> <Image className="showImg" src={item} mode="widthFix"></Image>
<Image <Image
className="closeImg" className="closeImg"
src={require("../../img/close1.png")} src={require("@/img/close1.png")}
mode="widthFix" mode="widthFix"
onClick={this.delImg.bind(this, index)} onClick={this.delImg.bind(this, index)}
></Image> ></Image>
@ -445,7 +459,7 @@ delImg(i) {
> >
<Image <Image
className="showImg" className="showImg"
src={require("../../img/clock_in_upload/add-image.png")} src={require("@/img/clock_in_upload/add-image.png")}
mode="widthFix" mode="widthFix"
></Image> ></Image>
</View> </View>
Loading…
Cancel
Save