diff --git a/src/app.config.ts b/src/app.config.ts index 67a4efb..6e116ca 100644 --- a/src/app.config.ts +++ b/src/app.config.ts @@ -20,7 +20,6 @@ export default defineAppConfig({ "pages/integral_list/integral_list", "pages/webViewPage/webViewPage", "pages/template/template", - "pages/face_report/face_report", "pages/face_report_AllDevice/face_report_AllDevice", "pages/connection_help/connection_help", "pages/errorpage/errorpage", @@ -84,6 +83,7 @@ export default defineAppConfig({ root: "recoding", pages: [ "pages/recording/recording", + "pages/face_report/face_report", "pages/face_report_one/face_report_one", "pages/moisture_test_report/moisture_test_report", ], diff --git a/src/img/face-report/Head_lift_Pro.png b/src/img/face-report/Head_lift_Pro.png index d0dfdaa..09a7c72 100644 Binary files a/src/img/face-report/Head_lift_Pro.png and b/src/img/face-report/Head_lift_Pro.png differ diff --git a/src/img/face-report/Mandibular_Pro.png b/src/img/face-report/Mandibular_Pro.png index 5c16d10..63a4db8 100644 Binary files a/src/img/face-report/Mandibular_Pro.png and b/src/img/face-report/Mandibular_Pro.png differ diff --git a/src/img/face-report/eye.png b/src/img/face-report/eye.png index 93049a2..256df3b 100644 Binary files a/src/img/face-report/eye.png and b/src/img/face-report/eye.png differ diff --git a/src/img/face-report/face.png b/src/img/face-report/face.png index d58fab8..09e9106 100644 Binary files a/src/img/face-report/face.png and b/src/img/face-report/face.png differ diff --git a/src/img/face-report/nasolabial_Pro.png b/src/img/face-report/nasolabial_Pro.png index be98a0d..1a70acf 100644 Binary files a/src/img/face-report/nasolabial_Pro.png and b/src/img/face-report/nasolabial_Pro.png differ diff --git a/src/moduleIOT/pages/iotCarePlan/FR200.tsx b/src/moduleIOT/pages/iotCarePlan/FR200.tsx index 6ad0e3b..7f339a0 100644 --- a/src/moduleIOT/pages/iotCarePlan/FR200.tsx +++ b/src/moduleIOT/pages/iotCarePlan/FR200.tsx @@ -178,8 +178,7 @@ class IotCarePlanFR200 extends Component { isModeLock: false, // 模式是否锁定 isSwitchActiveMode: false, // 是否显示弹窗切换模式 ModeList: [], - ModeType: "base", // all - modeClass: "", // 1基础护理 2专区护理 3专研促渗 4敏期护理 5智能测肤 + ModeType: "all", // all 1基础护理 2专区护理 3专研促渗 4敏期护理 5智能测肤 ActiveModeItem: { openSourceData: [], }, // 当前选中模式 @@ -484,14 +483,6 @@ class IotCarePlanFR200 extends Component { if (isReturn) return; } - let currentServiceData = { - startSource: "", - stopSource: "", - }; - if (data.serviceData.length) { - currentServiceData = data.serviceData[0]; - } - let currentTime = data.modeTimeStr; // 根据模式,动态设置底部按钮样式 @@ -509,20 +500,12 @@ class IotCarePlanFR200 extends Component { ActiveModeItem: data, activeModeID: data.id, ModeID: "mode_" + data.id, - currentServiceData, ModeStepIndex: 0, ModeType: this.ModeTypeArray[data.modeClass], currentTime, currentWorkModeType, }); - setTimeout(() => { - // 设置时间组合 - if (data.serviceData.length > 0) { - this.setServiceTimeData(); - } - }); - // 开发中,暂时允许直接切换 // 每次切换模式时清空一下历史数据 this.changeItemUpdateFR200NursingHistory(); @@ -1300,7 +1283,6 @@ class IotCarePlanFR200 extends Component { ); this.setState({ ModeStepIndex: index, - currentServiceData, }); } } @@ -1552,7 +1534,7 @@ class IotCarePlanFR200 extends Component { // 仪器缓存模式,判断是否存在于现有模式中 let recordModeItem = ModeList.find((item) => { - return item.id == FR200NursingHistory.currentServiceData.modeId; + return item.id == FR200NursingHistory.modeId; }); if (!FR200NursingHistory || !recordModeItem) { console.log("仪器有数据, 但是缓存没有数据, 忽略"); @@ -1652,7 +1634,7 @@ class IotCarePlanFR200 extends Component { this.setState({ isShowNurse: true, isShowHistoryMsg: true, - currentServiceData: this.FR200NursingHistory.currentServiceData, + videoTime: this.FR200NursingHistory.videoTime, tempModeCurrent: ActiveModeItem, ActiveModeItem: ActiveModeItem, activeModeID: ActiveModeItem.id, @@ -1695,21 +1677,10 @@ class IotCarePlanFR200 extends Component { // 设置当前时间 params.currentTime = this.state.currentTime; + // params.videoTime; // 设置正确封面 - 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 (!data) { if (jsonStatus) { // 缓存每秒数据 if (!params.dataArray) params.dataArray = []; @@ -2079,7 +2050,10 @@ class IotCarePlanFR200 extends Component { } else if ("moistureTest" === nursingData.workMode) { console.log("水分测试"); } else { - go("/pages/face_report/face_report?id=" + this.state.currentDevice.id); + go( + "/recoding/pages/face_report/face_report?id=" + + this.state.currentDevice.id + ); } }; diff --git a/src/moduleIOT/pages/iotCarePlan/WL200.tsx b/src/moduleIOT/pages/iotCarePlan/WL200.tsx index 7a641bb..b54a119 100644 --- a/src/moduleIOT/pages/iotCarePlan/WL200.tsx +++ b/src/moduleIOT/pages/iotCarePlan/WL200.tsx @@ -1928,7 +1928,10 @@ class IotCarePlanWL200 extends Component { goFaceReport = () => { // 跳转前置空定时器,防止重复提交 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 + ); }; // 完成配对 diff --git a/src/moduleIOT/pages/iotCarePlan/components/ModeList/FR200.tsx b/src/moduleIOT/pages/iotCarePlan/components/ModeList/FR200.tsx index 16fc624..06782db 100644 --- a/src/moduleIOT/pages/iotCarePlan/components/ModeList/FR200.tsx +++ b/src/moduleIOT/pages/iotCarePlan/components/ModeList/FR200.tsx @@ -8,7 +8,7 @@ interface Props { ModeID: any; activeModeID: any; ModeList: any; - ModeType: string; // all visor cabin yimeish + ModeType: string; // all base eyes zone permeation sensitive intelligence isShowNurse: boolean; // 是否已进入护理详情页 isPop: boolean; // 是否弹窗 onEmit: Function; // 每次点击item,回调事件和数据给父组件 diff --git a/src/pages/face_report/face_report.config.js b/src/recoding/pages/face_report/face_report.config.js similarity index 100% rename from src/pages/face_report/face_report.config.js rename to src/recoding/pages/face_report/face_report.config.js diff --git a/src/pages/face_report/face_report.less b/src/recoding/pages/face_report/face_report.less similarity index 100% rename from src/pages/face_report/face_report.less rename to src/recoding/pages/face_report/face_report.less diff --git a/src/pages/face_report/face_report.tsx b/src/recoding/pages/face_report/face_report.tsx similarity index 80% rename from src/pages/face_report/face_report.tsx rename to src/recoding/pages/face_report/face_report.tsx index f1aadbd..ddcaf71 100644 --- a/src/pages/face_report/face_report.tsx +++ b/src/recoding/pages/face_report/face_report.tsx @@ -2,17 +2,22 @@ import Taro from "@tarojs/taro"; import classnames from "classnames"; import { Component, PropsWithChildren, useEffect, useState } from "react"; import { Progress } from "@antmjs/vantui"; -import { showModal } from "../../utils/traoAPI"; +import { showModal } from "@/utils/traoAPI"; import { Tab, Tabs, Dialog, Popup } from "@antmjs/vantui"; import { - Block, View, Text, Image, Input, Button, Textarea, + Block, + View, + Text, + Image, + Input, + Button, + Textarea, } from "@tarojs/components"; -import { date, getdates, previewImage } from "../../utils/util"; +import { date, getdates, previewImage } from "@/utils/util"; /** 自定义组件 **/ -import Navbar from "../../components/navbar/navbar"; -import PopupAlert from "../../components/popup/popup-alert"; -import { InstrumentInfo } from "../../utils/Interface"; +import Navbar from "@/components/navbar/navbar"; +import { InstrumentInfo } from "@/utils/Interface"; /** 自定义组件 **/ import "./face_report.less"; @@ -21,8 +26,8 @@ export default class Index extends Component { constructor(props) { super(props); this.state = { - reportShow:true, - name: "template模板页", + reportShow: true, + name: "护理报告", statistics: {}, recordList: [], recordData: {}, @@ -50,9 +55,9 @@ export default class Index extends Component { }; } - componentDidMount() { } + componentDidMount() {} - componentWillUnmount() { } + componentWillUnmount() {} // 打开/关闭弹窗 setShow(show: boolean) { @@ -65,7 +70,7 @@ export default class Index extends Component { data["instrumentId"] = id; } let res = await InstrumentInfo.apiNursingLog.getStatistics(data); - + if (res.data.code === 200) { this.setState({ statistics: res.data.data }); } @@ -97,10 +102,12 @@ export default class Index extends Component { }); } } - // 文本框输入文字 - handleTextareaInput = (e) => { + // 文本框输入文字 + handleTextareaInput = (e) => { const punchInInfo = this.state.punchInInfo; - this.setState({ punchInInfo: { ...punchInInfo, clockContent: e.detail.value } }); + this.setState({ + punchInInfo: { ...punchInInfo, clockContent: e.detail.value }, + }); }; async submit() { let punchInInfo = this.state.punchInInfo || {}; @@ -123,24 +130,22 @@ export default class Index extends Component { t2: "您已完成今日打卡", btn1show: false, }).then(() => { - let data = new Date - Taro.setStorageSync('DayTime', data.toISOString()) + let data = new Date(); + Taro.setStorageSync("DayTime", data.toISOString()); this.setState({ - clockShow: true - }) + clockShow: true, + }); this.getClockStatistics(); this.setShow(false); - }); }); } - /**分页获取用户的打卡记录 page size*/ - async getClockStatistics(year = this.state.year) { + /**分页获取用户的打卡记录 page size*/ + async getClockStatistics(year = this.state.year) { let res = await InstrumentInfo.apiClock.getClockStatistics({ year }); - console.log(res,'查看返回',year); - - if (res.data.code === 200) { + console.log(res, "查看返回", year); + if (res.data.code === 200) { res.data.data.reverse(); if (res.data.data.length > 0) { res.data.data.map((item, index) => { @@ -177,8 +182,8 @@ export default class Index extends Component { this.setState({ clockStatistics: res.data.data }); } } - // 获取当月打卡记录 - async getList(id, year, month) { + // 获取当月打卡记录 + async getList(id, year, month) { let data = { year, month, @@ -198,41 +203,41 @@ export default class Index extends Component { this.setState({ clockStatistics: this.state.clockStatistics }); } } -// 上传图片 -handleChooseImage() { - Taro.chooseMedia({ - count: 1, - mediaType: ["image"], - sourceType: ["album", "camera"], - success: (res) => { - const tempFilePaths = res.tempFiles.map((item) => item.tempFilePath); - tempFilePaths?.forEach((item) => { - // eslint-disable-next-line @typescript-eslint/no-shadow - InstrumentInfo.apiClock - .clockFileUpload({ clockImg: item }) - .then((res) => { - const currentImage = res.data.url; - const newImageList = - this.state.punchInInfo.clockImageList.length >= 3 - ? this.state.punchInInfo.clockImageList - : [...this.state.punchInInfo.clockImageList, currentImage]; - const punchInInfo = this.state.punchInInfo; - punchInInfo.clockImageList = newImageList; - this.setState({ punchInInfo }); - }); - }); - }, - fail: (err) => { - console.info("err", err); - }, - }); -} -// 删除打卡图片 -delImg(i) { - const punchInInfo = this.state.punchInInfo; - punchInInfo.clockImageList.splice(i, 1); - this.setState({ punchInInfo }); -} + // 上传图片 + handleChooseImage() { + Taro.chooseMedia({ + count: 1, + mediaType: ["image"], + sourceType: ["album", "camera"], + success: (res) => { + const tempFilePaths = res.tempFiles.map((item) => item.tempFilePath); + tempFilePaths?.forEach((item) => { + // eslint-disable-next-line @typescript-eslint/no-shadow + InstrumentInfo.apiClock + .clockFileUpload({ clockImg: item }) + .then((res) => { + const currentImage = res.data.url; + const newImageList = + this.state.punchInInfo.clockImageList.length >= 3 + ? this.state.punchInInfo.clockImageList + : [...this.state.punchInInfo.clockImageList, currentImage]; + const punchInInfo = this.state.punchInInfo; + punchInInfo.clockImageList = newImageList; + this.setState({ punchInInfo }); + }); + }); + }, + fail: (err) => { + console.info("err", err); + }, + }); + } + // 删除打卡图片 + delImg(i) { + const punchInInfo = this.state.punchInInfo; + punchInInfo.clockImageList.splice(i, 1); + this.setState({ punchInInfo }); + } getRouteId() { const searchParams = new URLSearchParams(window.location.search); const id = searchParams.get("id"); @@ -253,31 +258,41 @@ delImg(i) { } } async onLoad(options) { - console.log(options,'查看传过来的参数'); - - let Bool = JSON.parse(options?.report) - if(!Bool ){ + console.log(options, "查看传过来的参数"); + + let Bool = JSON.parse(options?.report); + if (!Bool) { this.setState({ - reportShow:Bool - }) + reportShow: Bool, + }); } - + this.getRouteId(); - this.getClockStatistics() + this.getClockStatistics(); } - componentDidShow() { } + componentDidShow() {} - componentDidHide() { } + componentDidHide() {} - async initData() { } + async initData() {} GoIndex = () => { Taro.switchTab({ url: "/pages/index/index" }); }; 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 ( @@ -396,23 +411,22 @@ delImg(i) { ))} - {reportShow ? ( - - 前往打卡 - - 跳过 - - - - ): null} + {reportShow ? ( + + + 前往打卡 + + + 跳过 + + + + ) : null} this.setState({ show: false })}> @@ -432,7 +446,7 @@ delImg(i) { @@ -445,7 +459,7 @@ delImg(i) { >