rongweikang 2 years ago
commit 79c1eed90c

@ -8,7 +8,7 @@
"compileHotReLoad": false,
"postcss": false,
"preloadBackgroundData": false,
"minified": false,
"minified": true,
"newFeature": true,
"autoAudits": false,
"coverView": true,

@ -0,0 +1,33 @@
{
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
"condition": {
"miniprogram": {
"list": [
{
"name": "moduleIOT/pages/iotCarePlan/WL200",
"pathName": "moduleIOT/pages/iotCarePlan/WL200",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "pages/index/index",
"pathName": "pages/index/index",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "pages/face_report_one/face_report_one",
"pathName": "pages/face_report_one/face_report_one",
"query": "id=60&recordId=undefined&report=false",
"launchMode": "default",
"scene": null
}
]
}
},
"setting": {
"bigPackageSizeSupport": true
}
}

@ -25,8 +25,10 @@ export default defineAppConfig({
"pages/integral_list/integral_list",
"pages/recording/recording",
"pages/webViewPage/webViewPage",
"pages/template/template",
"pages/face_report/face_report",
'pages/template/template',
'pages/face_report/face_report',
'pages/face_report_one/face_report_one',
'pages/face_report_AllDevice/face_report_AllDevice',
"pages/connection_help/connection_help",
"pages/errorpage/errorpage",
"pages/moisture_test_report/moisture_test_report",

@ -57,21 +57,27 @@ export const fr200DeviceControlCommand = {
},
/**
* '脸部' = 'workFace',
* '眼部' = 'workEye',
* '颈纹' = 'workNeck',
* '进入水分测试模式' = 'switchTestMode',
* '启动水分测试模式' = 'startTestMode',
* face
* eyes
* neck
* moistureTest
* face: "01", 面部
* eyes: "02", 脸部
* nasolabialFold: "03", 法令纹
* mandibularLine: "04", 下颌线
* led: "05", led
* moistureTest: "06", 水分测试
* maskPenetration: "07",面膜促渗
* essence: "08", 精华模式
* headLiftingPro: "09", 抬头纹Pro
* neck: "0A", 颈纹
* partition: "11", 分区模式 废弃VM1001
* ignore: "255", 不改变/无模式
*/
// 普通工作模式
work: {
commandType: "DeviceControl",
workStatus: "working",
workMode: "face",
workMode: "ignore", // face
},
// 切换/进入水分测试
switchTestMode: {

@ -459,7 +459,7 @@ class ConnectionBluetoot extends Component<any, any> {
return jsonStatus;
}
/** 7.通知BLE特征值更改 */
/** 7.通知BLE特征值更改 连接成功需拿到响应判断是否需要升级,然后跳转详情页 */
notifyBLECharacteristicValueChange() {
console.log("7.通知BLE特征值更改");
const { deviceInfo } = this.props;

Binary file not shown.

After

Width:  |  Height:  |  Size: 246 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 237 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 246 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 246 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 246 KiB

File diff suppressed because it is too large Load Diff

@ -8,12 +8,14 @@ import React, {
PropsWithChildren,
useEffect,
useState,
useRef,
} from "react";
import Echarts from "./components/Echart/index";
import EchartFace from "./components/Echart_face/index";
import {
Block,
View,
View,
Text,
Image,
Video,
@ -40,7 +42,7 @@ import ConnectionBluetoot from "@/components/bluetoot/connection";
import ElectricityView from "./components/ElectricityView/index";
import ModeListView from "./components/ModeList/WL200";
import ModeContent from "./components/ModeContent/WL200";
import Footer from "./components/Footer";
import Footer from "./components/Footer/WL200";
/* 本页组件 END */
import { go, getStorageSync, setStorageSync, msg } from "@/utils/traoAPI";
@ -144,7 +146,8 @@ class IotCarePlanWL200 extends Component<any, any> {
matrixElectricity: 4, // WE200发箍电量
workMode: "", //当前模式
videoRef: {},
isMuted: false,
gear: { gear: 1 },
currentShowDialog: "",
step: 1, // 1:选择模式并播放视频, 2:护理中
@ -166,11 +169,14 @@ class IotCarePlanWL200 extends Component<any, any> {
/** 护理过程 END*/
// 模式列表
isModeLock: false, // 模式锁定
isSwitchActiveMode: false, // 是否显示弹窗切换模式
ModeList: [],
ModeType: "all", // all visor面罩 cabin舱体 yimeish医美
modeClass: "", // 1面罩 2舱体 3医美
ActiveModeItem: {}, // 当前选中模式
ActiveModeItem: {
openSourceData: [],
}, // 当前选中模式
SwitchActiveModeItem: {}, // 切换选中模式
ModeID: "mode_", // 模式KEY
activeModeID: "", // 当前选中模式ID:用于高亮
@ -235,13 +241,12 @@ class IotCarePlanWL200 extends Component<any, any> {
this.getWL200NursingHistory();
this.initData();
}
componentDidMount() { }
componentDidMount() {}
componentWillUnmount() { }
componentWillUnmount() {}
componentDidShow() {
console.log("页面显示了");
if (!this.hadLoadedPage) {
this.hadLoadedPage = true; // 二次进入页面(非首次进入)
return;
@ -568,7 +573,7 @@ class IotCarePlanWL200 extends Component<any, any> {
this.onNursingTap();
// 倒计时弹窗: 倒计时完成后,自动开始,并判断弹窗
let downNum = CountDownTime[this.state.ActiveModeItem.modeType] || 3;
this.showCountdownFun(downNum, () => { });
this.showCountdownFun(downNum, () => {});
}, 500);
return;
@ -600,7 +605,7 @@ class IotCarePlanWL200 extends Component<any, any> {
};
// 绘制能量图
drawProwerPicture() { }
drawProwerPicture() {}
/** 切换光照 */
onSwitchChange = async () => {
@ -682,7 +687,7 @@ class IotCarePlanWL200 extends Component<any, any> {
this.setState({
isStandStatus: true,
});
if (!this.state.isStandStatus && this.isRuning) {
if (!this.state.isStandStatus && this.state.step === 2) {
// 断开连接直接暂停
this.judgementWorkStatus(
MODE_WORKING_ENUM.PAUSE,
@ -692,7 +697,7 @@ class IotCarePlanWL200 extends Component<any, any> {
} else {
console.log("舱体支架断开连接");
if (this.state.isStandStatus && this.isRuning) {
if (this.state.isStandStatus && this.state.step === 2) {
// 断开连接直接暂停
this.judgementWorkStatus(
MODE_WORKING_ENUM.PAUSE,
@ -1365,7 +1370,7 @@ class IotCarePlanWL200 extends Component<any, any> {
// 仅在切换模式的时候,弹窗倒计时.
if (type === "switch") {
let downNum = CountDownTime[ActiveModeItem.modeType] || 3;
this.showCountdownFun(downNum, () => { }); // 倒计时弹窗
this.showCountdownFun(downNum, () => {}); // 倒计时弹窗
}
// 开始执行护理
@ -2019,16 +2024,45 @@ class IotCarePlanWL200 extends Component<any, any> {
return isFooterBtnDisabled; // 数据更新有延迟,返回用于判断
};
handleClickVideo = () => {
let videoRef = Taro.createVideoContext("myVideo");
// 开始播放
videoRef.play();
// 暂停播放
videoRef.pause();
console.log("暂停播放", videoRef);
};
handleClicksound = () => {
let isMuted = this.state.isMuted;
isMuted = !isMuted;
this.setState({ isMuted });
};
GetVideosTime = (event) => {
let videoRef = Taro.createVideoContext("myVideo", this);
// videoRef.currentTime
console.log("获取播放时间", event.detail.currentTime);
};
onPlay = (e) => {
console.log("出发", e);
};
customBack = () => {
Taro.reLaunch({ url: "/pages/index/index" });
};
onModeLockOpen = async () => {
this.setState({ isModeLock: true });
};
onModeLockClose = async () => {
this.setState({ isModeLock: false });
};
render() {
let {
title,
isConnectShow,
isShowStepTips,
isShowNurse,
isStopNurse,
ModeList,
ModeType,
@ -2042,6 +2076,7 @@ class IotCarePlanWL200 extends Component<any, any> {
isShowCountdown,
countdown,
Electricity,
isMuted,
matrixElectricity,
errorTips,
isEndCarePlan,
@ -2059,7 +2094,7 @@ class IotCarePlanWL200 extends Component<any, any> {
isShowReReadRecordSave,
isFooterBtnDisabled,
isShowHistoryMsg,
stepIndex,
isModeLock,
} = this.state;
return (
@ -2072,11 +2107,23 @@ class IotCarePlanWL200 extends Component<any, any> {
/>
<View catchMove>
<PopupAlert
isShow={isModeLock}
zIndex={10020}
myClassName="level-up"
title="提示"
content="该模式即将上线,敬请期待"
confirmButtonText="我知道了"
textAlgin="center"
isClose={false}
close={this.onModeLockClose}
confirm={this.onModeLockClose}
/>
<PopupInstrumentUploadTips
isShow={isFirstTipShow}
zIndex={10020}
myClassName='level-up'
title='打卡介绍'
myClassName="level-up"
title="打卡介绍"
data={nurseInfo}
close={this.onTipShowClose}
confirm={this.onTipShowClose}
@ -2088,11 +2135,11 @@ class IotCarePlanWL200 extends Component<any, any> {
isLarge
isClose
isShow={isEndCarePlan}
title='提示'
content='是否结束护理'
textAlgin='center'
cancelButtonText='取消'
confirmButtonText='确定'
title="提示"
content="是否结束护理"
textAlgin="center"
cancelButtonText="取消"
confirmButtonText="确定"
close={this.cancelEndBtn}
confirm={this.confirmEndBtn}
/>
@ -2100,7 +2147,7 @@ class IotCarePlanWL200 extends Component<any, any> {
isLarge
isClose
isShow={isSwitchActiveMode}
title='护理模式切换'
title="护理模式切换"
content={
<ModeListView
ModeID={ModeID}
@ -2111,21 +2158,22 @@ class IotCarePlanWL200 extends Component<any, any> {
ModeType={ModeType}
onEmit={this.switchModeCurrentFun}
onEmitShowAll={this.openModeSwitch}
onModeLockOpen={this.onModeLockOpen}
/>
}
textAlgin='center'
cancelButtonText='取消'
confirmButtonText='确定'
textAlgin="center"
cancelButtonText="取消"
confirmButtonText="确定"
close={this.cancelModeSwitchBtn}
confirm={this.confirmModeSwitchBtn}
/>
{ActiveModeItem.openSourceData && (
{ActiveModeItem.openSourceData.length > 0 && (
<PopupStepTips
isShow={isShowStepTips}
isLarge
isFirstEntry={false}
confirmButtonText='知道了'
confirmButtonText="知道了"
data={ActiveModeItem.openSourceData}
close={this.closeStepTips}
/>
@ -2134,10 +2182,10 @@ class IotCarePlanWL200 extends Component<any, any> {
<PopupAlert
isShow={isNotEnoughTime}
isClose
title='提示'
content='您的本次护理时间不足,请重新护理'
confirmButtonText='确认'
textAlgin='center'
title="提示"
content="您的本次护理时间不足,请重新护理"
confirmButtonText="确认"
textAlgin="center"
close={this.closeNotEnoughTime}
confirm={this.closeNotEnoughTime}
/>
@ -2146,11 +2194,11 @@ class IotCarePlanWL200 extends Component<any, any> {
isShow={isShowErrorTipsText}
isClose
zIndex={10020}
myClassName='level-up'
title='提示'
myClassName="level-up"
title="提示"
content={errorTipsText}
confirmButtonText='知道了'
textAlgin='center'
confirmButtonText="知道了"
textAlgin="center"
close={this.closeErrorTipsText}
confirm={this.closeErrorTipsText}
/>
@ -2159,17 +2207,17 @@ class IotCarePlanWL200 extends Component<any, any> {
isShow={isShowTipsSave}
isClose
zIndex={10020}
myClassName='level-up'
title='提示'
myClassName="level-up"
title="提示"
content={
<Block>
<View></View>
<View></View>
</Block>
}
cancelButtonText='取消'
confirmButtonText='确认'
textAlgin='center'
cancelButtonText="取消"
confirmButtonText="确认"
textAlgin="center"
close={this.closeTipsSave}
cancel={this.cancelTipsSave}
confirm={this.confirmTipsSave}
@ -2178,11 +2226,11 @@ class IotCarePlanWL200 extends Component<any, any> {
<PopupStatus
isShow={isShowNursingSuccess}
isClose
title='您已结束本次护理'
type='success'
content='正在上传护理记录……'
confirmButtonText='知道了'
textAlgin='center'
title="您已结束本次护理"
type="success"
content="正在上传护理记录……"
confirmButtonText="知道了"
textAlgin="center"
close={() => {
/*不需要做处理*/
}}
@ -2193,43 +2241,49 @@ class IotCarePlanWL200 extends Component<any, any> {
deviceInfo={currentDevice}
close={this.connectionClose}
isDisconnect={!isConnectionBlutoot}
offlineChange={() => { }}
offlineChange={() => {}}
pairingChange={this.pairingChange}
upgradeFun={() => { }}
upgradeFun={() => {}}
/>
)}
<Popup
show={isShowHistoryMsg}
className='custom-popup'
className="custom-popup"
overlay={false}
>
<View className='sync-history-msg'>...</View>
<View className="sync-history-msg">...</View>
</Popup>
</View>
<View>
<View className='iot-main'>
<View className='banner-box'>
<View className="iot-main">
<View className="banner-box">
<View>
{!isShowNurse && (
<Video
className='video-or-image'
className="video-or-image"
src={ActiveModeItem.modeVideo}
loop
id="myVideo"
onPlay={this.onPlay}
muted={isMuted}
onTimeUpdate={this.GetVideosTime}
/>
)}
<button onClick={this.GetVideosTime}></button>
{/* <button onClick={this.handleClicksound}>音频播放/音频暂停</button> */}
{/* <button onClick={this.handleClickVideo}>播放/暂停</button> */}
{isShowNurse && (
<Block>
{isStopNurse ? (
<Image
className='video-or-image'
className="video-or-image"
src={currentServiceData.stopSource}
/>
) : (
<Image
className='video-or-image'
className="video-or-image"
src={currentServiceData.startSource}
/>
)}
@ -2237,29 +2291,29 @@ class IotCarePlanWL200 extends Component<any, any> {
)}
{errorTips && (
<Block>
<View className='msg-tips'>
<View className="msg-tips">
<Image
className='msg-tips-img'
className="msg-tips-img"
src={require("@/img/tips.png")}
/>
<View className='msg-tips-content'>{errorTips}</View>
<View className="msg-tips-content">{errorTips}</View>
</View>
</Block>
)}
</View>
<View className='iot-device'>
<View className='item'>
<Text className='device-time'>
<View className="iot-device">
<View className="item">
<Text className="device-time">
<Text className='time'>{currentTime}</Text>
<Text className="time">{currentTime}</Text>
</Text>
</View>
<View className='line' />
<View className="line" />
<ElectricityView
Electricity={Electricity}
matrixElectricity={matrixElectricity}
facialMaskConnectStatus={facialMaskConnectStatus}
DeviceConnectStatus={facialMaskConnectStatus}
/>
</View>
</View>
@ -2274,6 +2328,7 @@ class IotCarePlanWL200 extends Component<any, any> {
activeModeID={activeModeID}
onEmit={this.modeCurrentFun}
onEmitShowAll={this.openModeSwitch}
onModeLockOpen={this.onModeLockOpen}
/>
)}
@ -2286,6 +2341,7 @@ class IotCarePlanWL200 extends Component<any, any> {
)}
<Echarts></Echarts>
<EchartFace></EchartFace>
</View>
<Footer

@ -17,6 +17,7 @@ interface Props {
function Index() {
const echartsRef = useRef<EchartsHandle>(null);
const option: EChartOption = {
grid: {
// 让图表占满容器
top: "28rpx",
@ -255,6 +256,7 @@ function Index() {
<Block>
<View className='box'>
<Echarts
force-use-old-canvas="false"
echarts={echarts}
option={option}
ref={echartsRef}

@ -0,0 +1,383 @@
import Taro from "@tarojs/taro";
import classnames from "classnames";
import { Block, View, Image, Text, Input } from "@tarojs/components";
import { Popup, Progress, Slider } from "@antmjs/vantui";
import { useRef } from "react";
import Echarts, { EChartOption, EchartsHandle } from "taro-react-echarts";
import echarts from "@/utils/echarts.min.js";
import "./index.less";
interface Props {
Electricity: any;
matrixElectricity: any;
facialMaskConnectStatus: any;
}
function Index() {
const echartsRef = useRef<EchartsHandle>(null);
function generateColorArray(startColor, endColor, steps) {
var startRGB = hexToRgb(startColor);
var endRGB = hexToRgb(endColor);
var colors = [];
for (var i = 0; i < steps; i++) {
var r = interpolate(startRGB.r, endRGB.r, steps, i);
var g = interpolate(startRGB.g, endRGB.g, steps, i);
var b = interpolate(startRGB.b, endRGB.b, steps, i);
colors.push(rgbToHex(r, g, b));
}
return colors;
}
function hexToRgb(hex) {
var bigint = parseInt(hex.slice(1), 16);
var r = (bigint >> 16) & 255;
var g = (bigint >> 8) & 255;
var b = bigint & 255;
return { r: r, g: g, b: b };
}
function rgbToHex(r, g, b) {
return (
"#" + ((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1)
);
}
function interpolate(start, end, steps, count) {
return start + ((end - start) / steps) * count;
}
const startColor = "#FFFF00"; // 黄色
const endColor = "#FF0000"; // 红色
const steps = 80; // 80个颜色
const colors = generateColorArray(startColor, endColor, steps);
const xList = [...new Array(61).fill(0).map((item, key) => key)];
const seriesData = [
...xList.map((item) => {
return Math.random() * 80;
}),
];
// let seriesData=[
// 1,2,2,3,3,4,5,1,2,3,4,2,3,5,1,2,3,1,2,2,3,3,4,5,1,2,3,4,2,3,5,1,2,3,
// 1,2,2,3,3,4,5,1,2,3,4,2,3,5,1,2,3,
// 1,2,2,3,3,4,5,1,2,3,4,2,3,5,1,2,3
// ,1,2,2,3,3,4,5,1,2,3,4,2,3,5,1,2,3
// ,1,2,2,3,3,4,5,1,2,3,4,2,3,5,1,2,3
// ,1,2,2,3,3,4,5,1,2,3,4,2,3,5,1,2,3
// ,1,2,2,3,3,4,5,1,2,3,4,2,8,5,1,2,3,
// 1,2,2,3,3,4,5,1,2,3,4,2,3,5,1,2,3
// ,1,2,2,3,3,4,5,1,2,3,4,2,3,5,1,2,3
// ,1,2,2,3,3,4,5,1,2,3,4,2,3,5,1,2,3
// ,1,2,2,3,3,4,5,1,2,3,4,2,3,5,1,2,3
// ,1,2,2,3,3,4,5,1,2,3,4,2,3,5,1,2,3
// ]
// console.log(seriesData,'seriesData',xList);
const option: EChartOption ={
grid: {
// 让图表占满容器
top: "10rpx",
left: "35rpx",
right: "28rpx",
bottom: "17rpx",
},
xAxis: {
type: "category",
data: [...xList],
axisLabel: {
interval: 9,
formatter: function (value, index) {
return value * 6 + 's';
},
textStyle: {
color: '#999999', // 文字颜色
fontSize: 8 // 文字大小
},
},
axisTick: {
// alignWithLabel: true,
show: false,
interval: 9,
},
// axisLine: {
// show: false,
// },
},
yAxis: [
{
min: 0,
max: 80,
splitNumber: 10,
axisLabel: {
formatter: function (value, index) {
const num = value / 10 + 1
return num === 9 ? '' : num + '级';
},
textStyle: {
color: '#999999', // 文字颜色
fontSize: 8 // 文字大小
},
},
type: "value",
splitLine: {
lineStyle: {
color: ["#ccc", "#ccc", "#ccc", "#ccc", "#ccc", "#ccc", "#ccc", "#ccc", "#fff"],
type:'dashed'
},
}
},
],
series: [
{
barCategoryGap:'0%',
data: seriesData,
type: "bar",
// barWidth: 15,
gapWidth: "0%",
itemStyle: {
normal: {
color: function (params) {
var value = params.data;
return new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{
offset: 0,
color: colors[parseInt(value)], // 红色
},
{
offset: 1,
color: colors[0], // 黄色
},
]);;
},
},
},
},
],
};
// const option: EChartOption = {
// grid: {
// // 让图表占满容器
// top: "28rpx",
// left: "18rpx",
// right: "28rpx",
// bottom: "17rpx",
// },
// xAxis: [
// {
// type: 'category',
// axisTick: { show: false },
// data: ['2012', '2013', '2014', '2015', '2016'],
// axisLine: {
// show: false,
// },
// axisLabel: {
// show: false,
// },
// }
// ],
// yAxis: {
// type: "value",
// min: 0,
// max: 8,
// splitNumber: 8,
// splitLine: {
// show: false,
// // lineStyle: {
// // color: "#cccccc",
// // type: [4, 2],
// // dashOffset: 4,
// // },
// },
// axisLine: {
// show: false,
// },
// axisLabel: {
// show: false,
// },
// axisTick: {
// show: false,
// },
// },
// series: [
// { barCategoryGap:'0%',
// name: 'Forest',
// type: 'bar',
// barGap: 0,
// // label: labelOption,
// // emphasis: {
// // focus: 'series'
// // },
// data: [2, 4, 4, 5, 7]
// },
// { barCategoryGap:'0%',
// name: 'Steppe',
// type: 'bar',
// // label: labelOption,
// emphasis: {
// focus: 'series'
// },
// data: [2, 4, 4, 5, 7]
// },
// { barCategoryGap:'0%',
// name: 'Desert',
// type: 'bar',
// // label: labelOption,
// // emphasis: {
// // focus: 'series'
// // },
// data: [2, 4, 4, 5, 7]
// },
// { barCategoryGap:'0%',
// name: 'Wetland',
// type: 'bar',
// // label: labelOption,
// // emphasis: {
// // focus: 'series'
// // },
// data: [2, 4, 4, 5, 7]
// },
// { barCategoryGap:'0%',
// name: 'demo1',
// type: 'bar',
// // label: labelOption,
// // emphasis: {
// // focus: 'series'
// // },
// data: [2, 4, 4, 5, 7]
// },
// { barCategoryGap:'0%',
// name: 'demo2',
// type: 'bar',
// // label: labelOption,
// // emphasis: {
// // focus: 'series'
// // },
// data: [2, 4, 4, 5, 7]
// },
// { barCategoryGap:'0%',
// name: 'demo3',
// type: 'bar',
// // label: labelOption,
// // emphasis: {
// // focus: 'series'
// // },
// data: [2, 4, 4, 5, 7]
// },
// { barCategoryGap:'0%',
// name: 'demo4',
// type: 'bar',
// // label: labelOption,
// // emphasis: {
// // focus: 'series'
// // },
// data: [2, 4, 4, 5, 7]
// },
// { barCategoryGap:'0%',
// name: 'demo5',
// type: 'bar',
// // label: labelOption,
// // emphasis: {
// // focus: 'series'
// // },
// data: [2, 4, 4, 5, 7]
// },
// {
// color:'red',
// barCategoryGap:'0%',
// name: 'demo6',
// type: 'bar',
// // label: labelOption,
// // emphasis: {
// // focus: 'series'
// // },
// data: [2, 4, 4, 5, 7]
// }
// ]
// // grid: {
// // // 让图表占满容器
// // top: "28rpx",
// // left: "18rpx",
// // right: "28rpx",
// // bottom: "17rpx",
// // },
// // xAxis: {
// // type: 'category',
// // // data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
// // show: false,
// // // axisLine: {
// // // show: false,
// // // },
// // },
// // yAxis: {
// // type: "value",
// // min: 0,
// // max: 50,
// // splitNumber: 10,
// // splitLine: {
// // show: false,
// // // lineStyle: {
// // // color: "#cccccc",
// // // type: [4, 2],
// // // dashOffset: 4,
// // // },
// // },
// // axisLine: {
// // show: false,
// // },
// // axisLabel: {
// // show: false,
// // },
// // axisTick: {
// // show: false,
// // },
// // },
// // series: [
// // {
// // data: [1, 6, 3, 4, 7, 6, 0,8, 0, 10, 11, 12, 13, 14,15, 16, 17, 18, 19, 20, 21,22, 23, 24, 25, 26, 27, 28,29, 30, 31, 32, 33, 34, 35,36],
// // type: 'bar',
// // barWidth:30, //设置柱子的宽度
// // barGap:'100%',
// // barCategoryGap:'0%',
// // }
// // ]
// };
const level = [8, 7, 6, 5, 4, 3, 2];
let arr =[2,3,4,5,6,7]
return (
<Block>
<Echarts
echarts={echarts}
option={option}
ref={echartsRef}
// isPage={false}
// style自定义设置echarts宽高
// style={{ width: "100%", height: "100%" }}
style={{ width: "630rpx", height: "260rpx" }}
/>
{/* <View className="box">
<Echarts
echarts={echarts}
option={option}
ref={echartsRef}
// isPage={false}
// style自定义设置echarts宽高
style={{ width: "630rpx", height: "240rpx" }}
/>
</View> */}
</Block>
);
}
export default Index;

@ -7,13 +7,9 @@ import { useState, useEffect } from "react";
interface Props {
Electricity: any;
matrixElectricity: any;
facialMaskConnectStatus: any;
DeviceConnectStatus: any;
}
function Index({
Electricity,
matrixElectricity,
facialMaskConnectStatus,
}: Props) {
function Index({ Electricity, matrixElectricity, DeviceConnectStatus }: Props) {
return (
<Block>
<View className="electricity-box">
@ -62,7 +58,7 @@ function Index({
)}
</View>
</View> */}
{facialMaskConnectStatus === 1 && (
{DeviceConnectStatus === 1 && (
<Block>
<View className="item">
<View className="label"> :</View>

@ -8,7 +8,7 @@
height: 153rpx;
background: #ffffff;
box-shadow: 0rpx -3rpx 7rpx 1rpx rgba(173, 191, 207, 0.21);
padding-bottom: env(safe-area-inset-bottom);
// padding-bottom: env(safe-area-inset-bottom);
box-sizing: border-box;
.btn {
width: 690rpx;

@ -1,8 +1,5 @@
import Taro from "@tarojs/taro";
import classnames from "classnames";
import { Block, View, Image, Text, CoverView } from "@tarojs/components";
import { useState, useEffect } from "react";
import "./index.less";
import "./FR200.less";
interface Props {
isShowNurse: boolean;
@ -42,7 +39,7 @@ function Index({
return (
<Block>
<CoverView className="iot-footer">
<View className="iot-footer">
{!isShowNurse && (
<Block>
{isDisabled ? (
@ -56,6 +53,7 @@ function Index({
)}
</Block>
)}
{isShowNurse && (
<View className="switch-btn-box">
{!isDisabled && (
@ -124,7 +122,7 @@ function Index({
</View>
</View>
)}
</CoverView>
</View>
</Block>
);
}

@ -0,0 +1,74 @@
.iot-footer {
position: fixed;
bottom: 0;
z-index: 99;
display: flex;
align-items: baseline;
width: 100%;
height: 153rpx;
background: #ffffff;
box-shadow: 0rpx -3rpx 7rpx 1rpx rgba(173, 191, 207, 0.21);
// padding-bottom: env(safe-area-inset-bottom);
box-sizing: border-box;
.btn {
width: 690rpx;
height: 90rpx;
background: #000;
border-radius: 45rpx;
color: #fff;
line-height: 90rpx;
text-align: center;
margin: 21rpx 49rpx 42rpx 30rpx;
font-size: 32rpx;
}
.text {
display: flex;
align-items: center;
font-size: 32rpx;
font-weight: bold;
color: #000;
}
.btn-disable {
background-color: #ccc !important; /* 设置按钮背景颜色为灰色 */
color: #fff !important; /* 设置按钮文字颜色为白色 */
border-color: #ccc !important; /* 设置按钮边框颜色为灰色 */
}
.switch-btn-box {
width: 100vw;
display: flex;
align-items: center;
margin-top: 34rpx;
.btn-item {
height: 70rpx;
display: flex;
flex: 1;
align-items: center;
justify-content: center;
.btn-icon {
width: 36rpx;
height: 36rpx;
margin-right: 18rpx;
}
.btn-text {
font-size: 32rpx;
font-family: PingFang SC;
font-weight: bold;
color: #000000;
}
}
.border-right {
border-right: 1px solid #ddd;
}
.btn-disable {
color: #fff !important; /* 设置按钮文字颜色为白色 */
border-color: #ccc !important; /* 设置按钮边框颜色为灰色 */
background-color: #fff !important; /* 设置按钮背景颜色为灰色 */
.btn-text {
color: #ccc !important; /* 设置按钮文字颜色为白色 */
border-color: #ccc !important; /* 设置按钮边框颜色为灰色 */
background-color: #fff !important; /* 设置按钮背景颜色为灰色 */
}
}
}
}

@ -0,0 +1,130 @@
import { Block, View, Image, Text, CoverView } from "@tarojs/components";
import "./WL200.less";
interface Props {
isShowNurse: boolean;
isStopNurse: boolean;
isDisabled: boolean; // 是否禁用开始暂停按钮:模式与连接设备是否一致
onEmitStartNurse: Function; // 每次点击item回调事件和数据给父组件
onEmitSwitchChange: Function;
onEmitEndPlan: Function;
onEmitErrorTips: Function; // 不可点击,提示错误
}
function Index({
isShowNurse,
isStopNurse,
isDisabled,
onEmitStartNurse,
onEmitSwitchChange,
onEmitEndPlan,
onEmitErrorTips,
}: Props) {
const onStartNurse = () => {
onEmitStartNurse();
};
const onSwitchChange = () => {
if (!isDisabled) {
onEmitSwitchChange();
}
};
const onEndPlan = () => {
onEmitEndPlan();
};
const onErrorTips = () => {
onEmitErrorTips();
};
return (
<Block>
<View className="iot-footer">
{!isShowNurse && (
<Block>
{isDisabled ? (
<View className="btn btn-disable" onClick={onStartNurse}>
</View>
) : (
<View className="btn" onClick={onStartNurse}>
</View>
)}
</Block>
)}
{isShowNurse && (
<View className="switch-btn-box">
{!isDisabled && (
<View className="btn-item border-right" onClick={onSwitchChange}>
{isStopNurse ? (
<Block>
<Image
className="btn-icon"
src={require("@/img/iot/start_nurse.png")}
mode="aspectFill"
/>
<Text className="btn-text"></Text>
</Block>
) : (
<Block>
<Image
className="btn-icon"
src={require("@/img/iot/pause_nurse.png")}
mode="aspectFill"
/>
<Text className="btn-text"></Text>
</Block>
)}
</View>
)}
{isDisabled && (
<View
className="btn-item border-right btn-disable"
onClick={onErrorTips}
>
{isStopNurse ? (
<Block>
<Image
className="btn-icon"
style="color: #ccc"
src={require("@/img/iot/start_nurse.png")}
mode="aspectFill"
/>
<Text className="btn-text" style="color: #ccc">
</Text>
</Block>
) : (
<Block>
<Image
className="btn-icon"
style="color: #ccc"
src={require("@/img/iot/pause_nurse.png")}
mode="aspectFill"
/>
<Text className="btn-text" style="color: #ccc">
</Text>
</Block>
)}
</View>
)}
<View className="btn-item" onClick={onEndPlan}>
<Image
className="btn-icon"
src={require("@/img/iot/over_nurse.png")}
mode="aspectFill"
/>
<Text className="btn-text"></Text>
</View>
</View>
)}
</View>
</Block>
);
}
export default Index;

@ -71,6 +71,9 @@ page {
height: 28rpx;
}
}
.button_minus_zero {
background: unset !important;
}
.button_plus {
width: 90rpx;

@ -2,230 +2,222 @@ import Taro from "@tarojs/taro";
import classnames from "classnames";
import { Block, View, Image, Text, Input } from "@tarojs/components";
import { Popup, Progress, Slider } from "@antmjs/vantui";
import React, { useState } from 'react';
import "./index.less";
interface Props {
Electricity: any;
matrixElectricity: any;
facialMaskConnectStatus: any;
// Electricity: any;
// matrixElectricity: any;
// facialMaskConnectStatus: any;
onEmitMinus:Function
onEmitAdd:Function
GearData:any
}
function Index() {
const gearLevel = {
currentGear: null,
//现在工作的档位
currentGearMode: "forehead",
//现在工作模式
forehead: 5,
leftCheek: 5,
rightCheek: 5,
};
function Index({
GearData,
onEmitMinus,
onEmitAdd
}:Props) {
// 挡位调节
// const gearLevel = {
// currentGear: null,
// //现在工作的档位
// currentGearMode: "forehead",
// //现在工作模式
// forehead: 5,
// leftCheek: 5,
// rightCheek: 5,
// };
// // // 挡位调节
// const hangeGearAdjustment =(value) =>{
// console.log(value,'查看');
// }
// const gearLevelViews =() =>{
// return (
// <> <View>
// <View className='gear_adjust'>
// <View className='title'>档位调节</View>
// <View className='gear_box'>
// <View className='gear flex aitems'>
// <View className='pos'>额头</View>
// <Slider
// style={{
// flex: "1",
// }}
// value={gearLevel.forehead}
// min={1}
// max={10}
// inactiveColor='#F8F8F8'
// activeColor={
// gearLevel.currentGearMode == "forehead"
// ? "#EECDA1"
// : "#CCCCCC"
// }
// disabled={gearLevel.currentGearMode !== "forehead"}
// barHeight={6}
// // useButtonSlot
// data-key='forehead'
// // onDrag={this.onDrag}
// onChange={hangeGearAdjustment}
// renderButton={
// <Block>
// <View
// className={
// "custom-button " +
// (gearLevel.currentGearMode !== "forehead" &&
// "current-button")
// }
// >
// <View className='circle'></View>
// <View className='level'>
// {gearLevel.forehead + "档"}
// </View>
// </View>
// </Block>
// }
// ></Slider>
// </View>
// <View className='gear flex aitems'>
// <View className='pos'>左脸颊</View>
// <Slider
// style={{
// flex: "1",
// }}
// value={gearLevel.leftCheek}
// min={1}
// max={10}
// inactiveColor='#F8F8F8'
// activeColor={
// gearLevel.currentGearMode == "leftCheek"
// ? "#EECDA1"
// : "#CCCCCC"
// }
// disabled={gearLevel.currentGearMode !== "leftCheek"}
// barHeight={6}
// // useButtonSlot
// data-key='leftCheek'
// // onDrag={this.onDrag}
// // onChange={this.onChange}
// onChange={hangeGearAdjustment}
// renderButton={
// <Block>
// <View
// className={
// "custom-button " +
// (gearLevel.currentGearMode !== "leftCheek" &&
// "current-button")
// }
// >
// <View className='circle'></View>
// <View className='level'>
// {gearLevel.leftCheek + "档"}
// </View>
// </View>
// </Block>
// }
// ></Slider>
// </View>
// <View className='gear flex aitems'>
// <View className='pos'>右脸颊</View>
// <Slider
// style={{
// flex: "1",
// }}
// value={gearLevel.rightCheek}
// min={1}
// max={10}
// inactiveColor='#F8F8F8'
// activeColor={
// gearLevel.currentGearMode == "rightCheek"
// ? "#EECDA1"
// : "#CCCCCC"
// }
// disabled={gearLevel.currentGearMode !== "rightCheek"}
// barHeight={6}
// // useButtonSlot
// data-key='rightCheek'
// // onDrag={this.onDrag}
// // onChange={this.onChange}
// renderButton={
// <Block>
// <View
// className={
// "custom-button flex jcenter aitems " +
// (gearLevel.currentGearMode !== "rightCheek" &&
// "current-button")
// }
// >
// <View className='circle'></View>
// <View className='level'>
// {gearLevel.rightCheek + "档"}
// </View>
// </View>
// </Block>
// }
// ></Slider>
// </View>
// {/* <View className='level_box flex aitems'>
// {(10).map((item, index) => {
// return (
// <View key={item}
// className='level_num'
// style={{
// marginRight: '1.225rem',
// }}
// >
// {item + 1}
// </View>
// )
// })}
// </View> */}
// </View>
// </View>
// </View></>
// );
// }
// 使用 map() 方法创建动态循环
const gearViews = GearData.map((gear, index) => (
<View key={index} className='gear flex aitems'>
<View className='pos'>{gear.name}</View>
<View className='gear_button flex aitems'>
<View className={gear.forehead === 1 ? 'button_minus button_minus_zero' : 'button_minus'}>
<Image
className='image'
src={require('@/img/fr200/minus.png')}
onClick={() => onEmitMinus(gear,index)}
></Image>
</View>
<View className='button_value'>
<View className='number'>{gear.forehead}</View>
</View>
<View className={gear.forehead === gear.Total ? 'button_plus button_minus_zero' : 'button_plus'}>
<Image
className='image'
src={require('@/img/fr200/add.png')}
onClick={() => onEmitAdd(gear,index)}
></Image>
</View>
</View>
</View>
));
return (
<Block>
<View>
<View className='gear_adjust'>
<View className='title'></View>
<View className='gear_box'>
<View className='gear flex aitems'>
<View className='pos'></View>
<Slider
style={{
flex: "1",
}}
value={gearLevel.forehead}
min={1}
max={10}
inactiveColor='#F8F8F8'
activeColor={
gearLevel.currentGearMode == "forehead"
? "#EECDA1"
: "#CCCCCC"
}
disabled={gearLevel.currentGearMode !== "forehead"}
barHeight={6}
// useButtonSlot
data-key='forehead'
// onDrag={this.onDrag}
// onChange={this.onChange}
renderButton={
<Block>
<View
className={
"custom-button " +
(gearLevel.currentGearMode !== "forehead" &&
"current-button")
}
>
<View className='circle'></View>
<View className='level'>
{gearLevel.forehead + "档"}
</View>
</View>
</Block>
}
></Slider>
</View>
<View className='gear flex aitems'>
<View className='pos'></View>
<Slider
style={{
flex: "1",
}}
value={gearLevel.leftCheek}
min={1}
max={10}
inactiveColor='#F8F8F8'
activeColor={
gearLevel.currentGearMode == "leftCheek"
? "#EECDA1"
: "#CCCCCC"
}
disabled={gearLevel.currentGearMode !== "leftCheek"}
barHeight={6}
// useButtonSlot
data-key='leftCheek'
// onDrag={this.onDrag}
// onChange={this.onChange}
renderButton={
<Block>
<View
className={
"custom-button " +
(gearLevel.currentGearMode !== "leftCheek" &&
"current-button")
}
>
<View className='circle'></View>
<View className='level'>
{gearLevel.leftCheek + "档"}
</View>
</View>
</Block>
}
></Slider>
</View>
<View className='gear flex aitems'>
<View className='pos'></View>
<Slider
style={{
flex: "1",
}}
value={gearLevel.rightCheek}
min={1}
max={10}
inactiveColor='#F8F8F8'
activeColor={
gearLevel.currentGearMode == "rightCheek"
? "#EECDA1"
: "#CCCCCC"
}
disabled={gearLevel.currentGearMode !== "rightCheek"}
barHeight={6}
// useButtonSlot
data-key='rightCheek'
// onDrag={this.onDrag}
// onChange={this.onChange}
renderButton={
<Block>
<View
className={
"custom-button flex jcenter aitems " +
(gearLevel.currentGearMode !== "rightCheek" &&
"current-button")
}
>
<View className='circle'></View>
<View className='level'>
{gearLevel.rightCheek + "档"}
</View>
</View>
</Block>
}
></Slider>
</View>
{/* <View className='level_box flex aitems'>
{(10).map((item, index) => {
return (
<View key={item}
className='level_num'
style={{
marginRight: '1.225rem',
}}
>
{item + 1}
</View>
)
})}
</View> */}
</View>
</View>
</View>
{/* {gearLevelViews} */}
<View className='gear_adjustment'>
<View className='gear_box'>
<View className='gear flex aitems'>
<View className='pos'></View>
<View className='gear_button flex aitems'>
<View className='button_minus'>
<Image
className='image'
src={require("@/img/fr200/minus.png")}
></Image>
</View>
<View className='button_value'>
<View className='number'>1</View>
</View>
<View className='button_plus'>
<Image
className='image'
src={require("@/img/fr200/add.png")}
></Image>
</View>
</View>
</View>
<View className='gear flex aitems'>
<View className='pos'></View>
<View className='gear_button flex aitems'>
<View className='button_minus'>
<Image
className='image'
src={require("@/img/fr200/minus.png")}
></Image>
</View>
<View className='button_value'>
<View className='number'>1</View>
</View>
<View className='button_plus'>
<Image
className='image'
src={require("@/img/fr200/add.png")}
></Image>
</View>
</View>
</View>
<View className='gear flex aitems'>
<View className='pos'></View>
<View className='gear_button flex aitems'>
<View className='button_minus'>
<Image
className='image'
src={require("@/img/fr200/minus.png")}
></Image>
</View>
<View className='button_value'>
<View className='number'>1</View>
</View>
<View className='button_plus'>
<Image
className='image'
src={require("@/img/fr200/add.png")}
></Image>
</View>
</View>
</View>
{gearViews}
</View>
</View>
</Block>

@ -15,8 +15,21 @@ function Index({ isShowNurse, ActiveModeItem, ModeStepIndex }: Props) {
"630nm": "#CF231D",
"830nm": "#9C1D17",
};
let [value, setValue] = useState("");
const add = () => {
useEffect(() => {
setValue(value + 1);
});
};
return (
<Block>{isShowNurse && <View className="modelInfo-box"></View>}</Block>
<Block>
<View onClick={add}>add</View>
<View>{value}</View>
{isShowNurse && <View className="modelInfo-box"></View>}
</Block>
);
}

@ -13,6 +13,7 @@ interface Props {
isPop: boolean; // 是否弹窗
onEmit: Function; // 每次点击item回调事件和数据给父组件
onEmitShowAll: Function; // 打开弹窗按钮
onModeLockOpen: Function; // 打开锁定弹窗
}
function Index({
isShowNurse,
@ -23,6 +24,7 @@ function Index({
activeModeID,
onEmit,
onEmitShowAll,
onModeLockOpen,
}: Props) {
let BaseList = ModeList.filter((item) => item.modeClass === 1); // 基础护理
let ZoneList = ModeList.filter((item) => item.modeClass === 2); // 专区护理
@ -31,6 +33,10 @@ function Index({
let IntelligenceList = ModeList.filter((item) => item.modeClass === 5); // 智能测肤
const onItemClick = (item) => {
if (item.lock) {
onModeLockOpen(); // 点击了锁定模式
return;
}
onEmit(item);
};

@ -13,6 +13,7 @@ interface Props {
isPop: boolean; // 是否弹窗
onEmit: Function; // 每次点击item回调事件和数据给父组件
onEmitShowAll: Function; // 打开弹窗按钮
onModeLockOpen: Function; // 打开锁定弹窗
}
function Index({
isShowNurse,
@ -23,20 +24,17 @@ function Index({
activeModeID,
onEmit,
onEmitShowAll,
onModeLockOpen,
}: Props) {
let VisorList = ModeList.filter((item) => item.modeClass === 1); // 面罩模式
let CabinList = ModeList.filter((item) => item.modeClass === 2); // 舱体模式
let YimeishList = ModeList.filter((item) => item.modeClass === 3); // 医美术后
const yimeishClick = (item) => {
onEmit(item);
};
const cabinClick = (item) => {
onEmit(item);
};
const visorClick = (item) => {
const onItemClick = (item) => {
if (item.isLock) {
onModeLockOpen();
return;
}
onEmit(item);
};
@ -73,7 +71,7 @@ function Index({
className={classnames("mode-item", {
"mode-item-active": activeModeID === item.id,
})}
onClick={visorClick.bind(this, item)}
onClick={onItemClick.bind(this, item)}
>
<View
className={classnames("new", {
@ -128,7 +126,7 @@ function Index({
<View
key={"cabin_" + index}
id={"cabin_" + item.id}
onClick={cabinClick.bind(this, item)}
onClick={onItemClick.bind(this, item)}
className={classnames("mode-item", {
"mode-item-active": activeModeID === item.id,
})}
@ -186,7 +184,7 @@ function Index({
<View
key={"yimeish_" + index}
id={"yimeish_" + item.id}
onClick={yimeishClick.bind(this, item)}
onClick={onItemClick.bind(this, item)}
className={classnames("mode-item", {
"mode-item-active": activeModeID === item.id,
})}

@ -2,7 +2,7 @@ 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.js";
import { showModal } from "../../utils/traoAPI";
import { Tab, Tabs, Dialog, Popup } from "@antmjs/vantui";
import {
Block, View, Text, Image, Input, Button, Textarea,
@ -65,6 +65,7 @@ export default class Index extends Component<any, any> {
data["instrumentId"] = id;
}
let res = await InstrumentInfo.apiNursingLog.getStatistics(data);
if (res.data.code === 200) {
this.setState({ statistics: res.data.data });
}
@ -252,8 +253,9 @@ delImg(i) {
}
}
async onLoad(options) {
console.log(options,'查看传过来的参数');
let Bool = JSON.parse(options?.report)
console.log('传过来的东西',options,Bool);
if(!Bool ){
this.setState({
reportShow:Bool

@ -0,0 +1,3 @@
export default definePageConfig({
navigationBarTitleText: "模板页",
});

@ -0,0 +1,44 @@
import Taro from "@tarojs/taro";
import classnames from "classnames";
import { Component, PropsWithChildren, useEffect, useState } from "react";
import { Block, View, Text, Image, Input, Button } from "@tarojs/components";
import Navbar from "@/components/navbar/navbar";
import "./face_report_AllDevice.less";
export default class Index extends Component<any, any> {
constructor(props) {
super(props);
this.state = {
name: "页面待开发",
};
}
async onLoad() {}
componentDidMount() {}
componentWillUnmount() {}
componentDidShow() {}
componentDidHide() {}
async initData() {}
customBack = () => {
Taro.navigateBack();
};
render() {
let { name } = this.state;
return (
<Block>
<Navbar
titleSlot="待开发页面"
isBack
isCustomBack
customBack={this.customBack}
/>
<View>{name}</View>
</Block>
);
}
}

@ -0,0 +1,3 @@
export default definePageConfig({
navigationBarTitleText: "模板页",
});

@ -0,0 +1,353 @@
page {
background: #f8f8f8;
}
.time {
font-size: 36rpx;
font-weight: 500;
color: #000000;
margin: 38rpx 0;
}
.m-x-30 {
margin-right: 30rpx;
margin-left: 30rpx;
background: #fff;
}
.statistic {
height: 200rpx;
background: #ffffff;
border-radius: 30rpx;
text-align: center;
margin-bottom: 20rpx;
margin-top: 32rpx;
}
.statistic_item {
flex: 1;
border-right: 1rpx solid #dddddd;
}
.statistic_title {
font-size: 48rpx;
font-weight: 600;
color: #000000;
margin-bottom: 26rpx;
height: 37rpx;
line-height: 1;
}
.num {
font-size: 26rpx;
font-weight: 500;
margin-left: 13rpx;
}
.statistic_desc {
font-size: 26rpx;
font-weight: 500;
color: #999999;
line-height: 36rpx;
}
.statistic_item:last-child {
border: none;
}
.bottom-title{
margin-right: 30rpx;
margin-left: 30rpx;
margin-top: 27rpx;
}
.text-title{
font-size: 18rpx;
color: #999999;
}
.main {
border-radius: 30rpx;
overflow: hidden;
// padding-bottom: calc(153rpx + env(safe-area-inset-bottom));
}
.main_title {
font-size: 32rpx;
font-weight: bold;
color: #000;
// margin: 48rpx 0 34rpx;
}
.eacharts{
// background-color: red;
// margin-top: 14px;
margin-bottom: 45rpx;
/* margin: 52rpx 0rpx; */
width: 100%;
height: 247rpx;
}
.van-popup {
border-radius: 30rpx;
.popBox {
box-sizing: border-box;
width: 670rpx;
height: 840rpx;
background: #ffffff;
border-radius: 30rpx;
position: relative;
padding: 42rpx 30rpx 0;
.close_icon {
position: absolute;
width: 50rpx;
height: 50rpx;
top: 34rpx;
right: 34rpx;
}
.popTitle {
font-size: 36rpx;
text-align: center;
font-family: PingFang SC;
font-weight: bold;
}
.popSubtitle {
display: flex;
justify-content: center;
align-items: flex-end;
font-size: 28rpx;
text-align: center;
margin-top: 50rpx;
.bold {
font-size: 38rpx;
font-weight: bold;
}
}
.img_box {
margin: 58rpx 0 37rpx 0;
display: flex;
flex-wrap: wrap;
.img {
position: relative;
margin-right: 35rpx;
width: 180rpx;
height: 180rpx;
.closeImg {
position: absolute;
top: 10rpx;
right: 10rpx;
width: 30rpx;
}
}
.img:last-child {
margin-right: 0;
}
.addBox {
width: 180rpx;
height: 180rpx;
background: #ffffff;
border: 1px solid #dddddd;
border-radius: 20rpx;
display: flex;
justify-content: center;
align-items: center;
Image {
width: 40rpx;
}
}
.showImg {
width: 100% !important;
height: 100% !important;
border-radius: 20rpx;
}
}
.info4 {
position: relative;
textarea {
padding: 28rpx 30rpx;
width: 610rpx;
height: 186rpx;
background: #ffffff;
border: 1px solid #dddddd;
border-radius: 3rpx;
box-sizing: border-box;
}
.tip {
position: absolute;
right: 20rpx;
bottom: 22rpx;
font-size: 22rpx;
font-family: PingFang SC;
font-weight: 500;
color: #cccccc;
}
}
.btn1 {
font-style: normal;
width: 270rpx;
height: 90rpx;
line-height: 90rpx;
background: #000000;
text-align: center;
border-radius: 45rpx;
font-size: 32rpx;
font-weight: bold;
margin-top: 55rpx;
color: #ffffff;
}
}
}
.footer {
position: fixed;
z-index: 99;
bottom: 0;
width: 100%;
height: 153rpx;
box-shadow: 0rpx -3rpx 7rpx 1rpx rgba(173, 191, 207, 0.21);
background: #ffffff;
}
.btn {
width: 540rpx;
height: 90rpx;
background: #000000;
border-radius: 45rpx;
color: #fff;
text-align: center;
line-height: 90rpx;
font-weight: bold;
font-size: 32rpx;
margin: 0 30rpx 0 49rpx;
}
.text {
flex: 1;
height: 31rpx;
font-size: 32rpx;
font-weight: bold;
color: #000000;
line-height: 31rpx;
}
.text image {
width: 10rpx;
height: 20rpx;
margin-left: 15rpx;
}
.products_item {
width: 690rpx;
height: 330rpx;
background: #fff;
padding: 30rpx 33rpx 38rpx;
border-radius: 30rpx;
box-sizing: border-box;
// margin-bottom: 20rpx;
}
.products_item:last-child {
border: none;
}
.products_top {
font-size: 28rpx;
font-weight: bold;
color: #000000;
margin-bottom: 36rpx;
}
.products_top .add_time {
padding-right: 23rpx;
}
.tag {
width: 90rpx;
height: 36rpx;
line-height: 36rpx;
background: #e5f9ee;
border-radius: 18rpx;
text-align: center;
font-size: 24rpx;
font-weight: 500;
color: #57bc81;
}
.tag_active {
background: #f8f8f8;
color: #999;
}
.face_type{
text-align: center;
margin-right: 37rpx;
// margin-top: 16rpx;
font-weight: 700;
}
.cover {
width: 170rpx;
height: 211rpx;
border-radius: 20rpx;
margin-right: 37rpx;
// background-color: red;
}
.content {
display: flex;
flex-flow: column;
justify-content: space-between;
background-color: #f8f8f8;
border-radius: 30rpx;
padding: 21rpx;
border-radius: 20rpx;
width: 457rpx;
height: 195rpx;
}
.content_top{
height: 140rpx;
display: flex;
flex-flow: column;
justify-content: space-between;
}
.title {
font-size: 28rpx;
font-weight: bold;
color: #000000;
margin: 3rpx 0 25rpx;
}
.desc {
font-size: 24rpx;
font-weight: 500;
color: #999999;
margin: 12rpx 0rpx;
color: #181818;
font-weight: 700;
}
// .desc:last-child {
// margin-top: 10rpx;
// }
.progress {
display: flex;
margin-top: 10rpx;
font-size: 24rpx;
font-family: PingFang SC;
font-weight: 500;
color: #999999;
align-items: center;
.van-progress {
width: 213rpx;
.van-progress__portion {
background: linear-gradient(90deg, #ffe9c7, #eecda1);
border-radius: 6rpx;
height: 12rpx;
.van-progress__pivot {
display: none;
}
}
}
.percent {
margin-left: 52rpx;
}
}

@ -0,0 +1,430 @@
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 { Tab, Tabs, Dialog, Popup } from "@antmjs/vantui";
import {
Block, View, Text, Image, Input, Button, Textarea,
} from "@tarojs/components";
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";
// 引入ecahrts图表
import EchartsForm from '../../moduleIOT/pages/iotCarePlan/components/Echart_face'
/** 自定义组件 **/
import "./face_report_one.less";
export default class Index extends Component<any, any> {
constructor(props) {
super(props);
this.state = {
face_Tyep: '基础脸部',
reportShow: true,
name: "template模板页",
statistics: {},
recordList: [],
recordData: {
modeImage:require("@/img/face-report/face.png")
},
year: new Date().getFullYear(),
show: false,
clockStatistics: [],
punchInInfo: {
clockImageList: [],
clockContent: "",
},
monthTime: [
{ month: 1, time: 0 },
{ month: 2, time: 0 },
{ month: 3, time: 0 },
{ month: 4, time: 0 },
{ month: 5, time: 0 },
{ month: 6, time: 0 },
{ month: 7, time: 0 },
{ month: 8, time: 0 },
{ month: 9, time: 0 },
{ month: 10, time: 0 },
{ month: 11, time: 0 },
{ month: 12, time: 0 },
],
};
}
componentDidMount() { }
componentWillUnmount() { }
// 打开/关闭弹窗
setShow(show: boolean) {
this.setState({ show });
}
// 查询用户护理记录的当月统计信息
async getStatistics(id) {
let data = {};
if (id != null) {
data["instrumentId"] = id;
}
let res = await InstrumentInfo.apiNursingLog.getStatistics(data);
if (res.data.code === 200) {
this.setState({ statistics: res.data.data });
}
}
async getRecord(id, recordId) {
console.log("id, recordId", id, recordId);
let data = {};
if (id != null) {
data["instrumentId"] = id;
}
let res = await InstrumentInfo.apiNursingLog.getRecord(data);
if (res.data.code === 200) {
if (recordId) {
res.data.rows.map((item) => {
item.nursingTime = this.getTime(item.nursingTime);
item.createTime = getdates(item.createTime).replace(/-/g, ".");
if (item.id == recordId) {
this.setState({ recordData: item });
}
});
} else {
this.setState({ recordData: res.data.rows[0] });
}
this.setState({
recordList: res.data.rows.filter((item) => item.id != recordId),
});
}
}
// 文本框输入文字
handleTextareaInput = (e) => {
const punchInInfo = this.state.punchInInfo;
this.setState({ punchInInfo: { ...punchInInfo, clockContent: e.detail.value } });
};
async submit() {
let punchInInfo = this.state.punchInInfo || {};
if (!punchInInfo.clockImageList.length) {
Taro.showToast({
title: "请上传图片",
icon: "none",
});
return;
}
if (!punchInInfo.clockContent) {
Taro.showToast({
title: "请输入打卡心得",
icon: "none",
});
return;
}
InstrumentInfo.apiClock.postInsertClockLog(punchInInfo).then((res) => {
showModal({
t2: "您已完成今日打卡",
btn1show: false,
}).then(() => {
let data = new Date
Taro.setStorageSync('DayTime', data.toISOString())
this.setState({
clockShow: true
})
this.getClockStatistics();
this.setShow(false);
});
});
}
/**分页获取用户的打卡记录 page size*/
async getClockStatistics(year = this.state.year) {
let res = await InstrumentInfo.apiClock.getClockStatistics({ year });
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) => {
item.isMore = false;
item.detail = [];
if (index === 0) {
item.isMore = true;
this.getList(item.id, item.year, item.month);
}
this.state.monthTime.map((monthItem) => {
if (monthItem.month == item.month) {
monthItem.time = item.clockNum;
}
});
});
this.setState({ monthTime: this.state.monthTime });
} else {
let monthTime = [
{ month: 1, time: 0 },
{ month: 2, time: 0 },
{ month: 3, time: 0 },
{ month: 4, time: 0 },
{ month: 5, time: 0 },
{ month: 6, time: 0 },
{ month: 7, time: 0 },
{ month: 8, time: 0 },
{ month: 9, time: 0 },
{ month: 10, time: 0 },
{ month: 11, time: 0 },
{ month: 12, time: 0 },
];
this.setState({ monthTime });
}
this.setState({ clockStatistics: res.data.data });
}
}
// 获取当月打卡记录
async getList(id, year, month) {
let data = {
year,
month,
};
let res = await InstrumentInfo.apiClock.getList(data);
if (res.data.code === 200) {
console.log(this.state.clockStatistics, 88888);
this.state.clockStatistics.map((item) => {
if (item.id === id) {
item.detail = res.data.data;
item.detail.map((obj) => {
obj.updateTime = getdates(obj.updateTime).replace(/-/g, ".");
});
}
});
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 });
}
getRouteId() {
const searchParams = new URLSearchParams(window.location.search);
const id = searchParams.get("id");
const recordId = searchParams.get("recordId");
this.getStatistics(id);
this.getRecord(id, recordId);
console.log(recordId);
}
getTime(time) {
const hour = time.slice(0, 2);
const minute = time.slice(3, 5);
const second = time.slice(6, 8);
if (hour > 0) {
return hour + "时" + minute + "分" + second + "秒";
} else {
return minute + "分" + second + "秒";
}
}
async onLoad(options) {
console.log(options, '查看传过来的参数');
let Bool = JSON.parse(options?.report)
if (!Bool) {
this.setState({
reportShow: Bool
})
}
this.getRouteId();
this.getClockStatistics()
}
componentDidShow() { }
componentDidHide() { }
async initData() { }
GoIndex = () => {
Taro.switchTab({ url: "/pages/index/index" });
};
render() {
let { name, statistics, recordList, recordData, show, clockStatistics, punchInInfo, monthTime, reportShow, face_Tyep } = this.state;
return (
<Block>
<Navbar isBack titleSlot="护理报告"></Navbar>
<View className="statistic m-x-30 flex aitems">
<View className="statistic_item">
<View className="statistic_title">
<text>{statistics.nursingNum}</text>
<text className="num"></text>
</View>
<View className="statistic_desc"></View>
</View>
<View className="statistic_item">
<View className="statistic_title">{statistics.nursingTime}</View>
<View className="statistic_desc"></View>
</View>
{/* </block> */}
</View>
<View className="main m-x-30">
<View className="products_item" style="border: none">
<View className="products_middle flex">
<View className="left">
<Image
className="cover"
src={recordData.modeImage}
mode="aspectFill"
></Image>
<View className="face_type">{face_Tyep}</View>
</View>
<View className="content">
<View className="content_top">
<View className="desc_box">
<View className="desc">{recordData.modeName}</View>
<View className="desc">
{recordData.nursingTime}
</View>
<View className="desc">
{recordData.nursingTime}
</View>
<View className="desc">
{recordData.nursingTime}
</View>
</View>
</View>
</View>
</View>
</View>
<View className="main_title">-{face_Tyep}</View>
<View className="eacharts">
<EchartsForm></EchartsForm>
</View>
</View>
<View className="bottom-title">
<View className="text-title">[1] :1,使11
</View>
<View className="text-title">[2]: 使</View>
<View className="text-title">[3]:使<br /></View>
<View className="text-title">[4]:<br /></View>
<View className="text-title">
[5]:</View>
</View>
{reportShow ? (
<View className="footer flex aitems">
<View className="btn" onClick={this.setShow.bind(this, true)}></View>
<View className="text flex aitems">
<View onClick={this.GoIndex}></View>
<Image
src={require("../../img/right.png")}
mode="aspectFill"
></Image>
</View>
</View>
) : null}
<Popup show={show} onClose={() => this.setState({ show: false })}>
<View className="popBox">
<Image
className="close_icon"
src={require("../../img/close.png")}
mode="widthFix"
onClick={this.setShow.bind(this, false)}
></Image>
<View className="popTitle"></View>
<View className="popSubtitle">
<View className="bold">{clockStatistics[0]?.clockNum}</View>{" "}
<View className="bold">
{(clockStatistics[0]?.percentage * 100).toFixed(1)}%
</View>
</View>
<View className="img_box">
{punchInInfo.clockImageList.map((item, index) => (
<View key={item} className="img">
<Image className="showImg" src={item} mode="widthFix"></Image>
<Image
className="closeImg"
src={require("../../img/close1.png")}
mode="widthFix"
onClick={this.delImg.bind(this, index)}
></Image>
</View>
))}
{punchInInfo.clockImageList.length < 3 && (
<View
className="addBox"
onClick={this.handleChooseImage.bind(this)}
>
<Image
className="showImg"
src={require("../../img/clock_in_upload/add-image.png")}
mode="widthFix"
></Image>
</View>
)}
</View>
<View className="info4">
<View className="content">
<Textarea
placeholderStyle="color: #ccc; font-size: 26rpx;font-weight: 400;font-family: PingFang SC;"
placeholder="请记录一下今天的护理心得吧"
maxlength={120}
onInput={this.handleTextareaInput.bind(this)}
value={punchInInfo.clockContent}
></Textarea>
</View>
<View className="tip">
{"" + (punchInInfo.clockContent.length || 0) + "/120"}
</View>
</View>
<View className="popbtnbox flex aitems jcenter">
<View className="btn1" onClick={this.submit.bind(this)}>
</View>
</View>
</View>
</Popup>
</Block>
);
}
}

@ -839,7 +839,9 @@ class Index extends Component<any, any> {
};
// 跳转仪器介绍页
goNursing = (item) => {
goNursing = (item) => {
console.log(item,'查看item');
// 仅开发者工具调试使用
const platform = Taro.getSystemInfoSync().platform;
if (platform === "devtools") {

@ -55,7 +55,7 @@ export default class InstrumentClickInUpload extends Component<any, any> {
secondClockImg: null,
thirdClockImg: null,
},
// 现在选中的数据
currentInfo: {
modeVideo: "",
@ -122,7 +122,6 @@ export default class InstrumentClickInUpload extends Component<any, any> {
};
// 获取最新一条打卡记录
getLatestClockRecord = async () => {
let { punchInInfo } = this.state;
let res = await InstrumentInfo.apiClock.getLatestClockRecord();
if (res.data.code === 200) {
@ -190,7 +189,7 @@ export default class InstrumentClickInUpload extends Component<any, any> {
// 提交打卡
handleSubmit = async () => {
let { punchInInfo,instrumentDetail } = this.state;
let { punchInInfo, instrumentDetail } = this.state;
let obj = punchInInfo;
if (obj.clockImageList.length === 0) {
msg("至少上传一张图片");
@ -236,9 +235,11 @@ export default class InstrumentClickInUpload extends Component<any, any> {
instrumentId: instrumentDetail.id,
};
// 上传护理完成的仪器ID
let instrumentRes = await InstrumentInfo.apiClock.addClockInstrument(params);
console.log(instrumentRes,'添加仪器成功');
let instrumentRes = await InstrumentInfo.apiClock.addClockInstrument(
params
);
console.log(instrumentRes, "添加仪器成功");
let res = await InstrumentInfo.apiClock.postInsertClockLog(clockParmas);
if (res.data.code === 200) {
msg("打卡成功");
@ -268,10 +269,11 @@ export default class InstrumentClickInUpload extends Component<any, any> {
videoLoadedMetaData = async () => {};
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 },
});
};
onModeLockOpen = async () => {
@ -324,23 +326,26 @@ export default class InstrumentClickInUpload extends Component<any, any> {
canvasId="compressImage"
type="2d"
></Canvas>
<PopupAlert
isShow={isModeLock}
title="提示"
content="该模式即将上线,敬请期待"
confirmButtonText="我知道了"
textAlgin="center"
isClose={false}
close={this.onModeLockClose}
confirm={this.onModeLockClose}
/>
<PopupInstrumentUploadTips
isShow={isTipShow}
title="打卡介绍"
data={nurseInfo}
close={this.onTipShowClose}
confirm={this.onTipShowClose}
/>
<View catchMove>
<PopupAlert
isShow={isModeLock}
title="提示"
content="该模式即将上线,敬请期待"
confirmButtonText="我知道了"
textAlgin="center"
isClose={false}
close={this.onModeLockClose}
confirm={this.onModeLockClose}
/>
<PopupInstrumentUploadTips
isShow={isTipShow}
title="打卡介绍"
data={nurseInfo}
close={this.onTipShowClose}
confirm={this.onTipShowClose}
/>
</View>
<View className="infobox1 flex aitems jcenter">
<View className="img">

@ -32,7 +32,7 @@ export default class Recording extends Component<any, any> {
this.state = {
name: "护理历程",
current: 0,
ViewAddInstrument:false, //用来记录有没有添加设备
ViewAddInstrument: false, //用来记录有没有添加设备
array: [1, 2, 3, 4, 5],
recordList: [],
bindingInstrumentList: [],
@ -94,15 +94,16 @@ export default class Recording extends Component<any, any> {
data["instrumentId"] = id;
}
let res = await InstrumentInfo.apiNursingLog.getRecord(data);
console.log(res, '查看你获取护理历程');
if (res.data.code === 200) {
res.data.rows.map((item) => {
item.nursingTime = this.getTime(item.nursingTime);
let createTime = getdates(item.createTime)
item.createTime = createTime&& createTime.replace(/-/g, ".");
item.createTime = createTime && createTime.replace(/-/g, ".");
});
this.setState({ recordList: res.data.rows });
}
@ -141,7 +142,7 @@ export default class Recording extends Component<any, any> {
/**分页获取用户的打卡记录 page size*/
async getClockStatistics(year = this.state.year) {
let res = await InstrumentInfo.apiClock.getClockStatistics({ year });
if (res.data.code === 200) {
res.data.data.reverse();
@ -216,15 +217,15 @@ export default class Recording extends Component<any, any> {
};
let res = await InstrumentInfo.apiClock.getList(data);
if (res.data.code === 200) {
console.log(res, 88888,this.state.clockStatistics,id);
console.log(res, 88888, this.state.clockStatistics, id);
this.state.clockStatistics.map((item) => {
if (item.id === id) {
item.detail = res.data.data;
item.detail.map((obj) => {
let updateTime =getdates(obj.updateTime)
let updateTime = getdates(obj.updateTime)
obj.updateTime = updateTime && updateTime.replace(/-/g, ".");
});
}
@ -264,8 +265,8 @@ export default class Recording extends Component<any, any> {
const ViewAddInstrument = options.param;
this.setState({
ViewAddInstrument: ViewAddInstrument
})
})
this.getRecord(null);
this.getBindingInstrumentList();
this.getLatestClockRecord();
@ -292,9 +293,46 @@ export default class Recording extends Component<any, any> {
}
};
// 跳转到护理报告
toReport(id, recordId) {
let report =false
go("/pages/face_report/face_report?id=" + id + "&recordId=" + recordId+ "&report=" + report );
toReport(id, recordId, item) {
console.log(item, '查看类型', item.jumpType );
item.jumpType =1
switch (item.jumpType ) {
case 1:
this.One(item);
break;
case 2:
this.two(item); break;
case 3:
this.three(item); break;
default:
this.AllDevice(item);
}
// let report =false
// go("/pages/face_report/face_report?id=" + id + "&recordId=" + recordId+ "&report=" + report );
}
// 打开第一种类型
One = async (item) => {
console.log('打开第一种类型', item);
let report =false
go("/pages/face_report_one/face_report_one?id=" + item.id + "&recordId=" + item.recordId+ "&report=" + report );
}
// 打开第二种类型
two = async (item) => {
console.log('打开第二种类型', item);
}
// 打开第二种类型
three = async (item) => {
console.log('打开第二种类型', item);
}
// 打开其他类型
AllDevice = async (item) => {
console.log('打开其他类型', item);
go("/pages/face_report_AllDevice/face_report_AllDevice");
}
// 上传图片
handleChooseImage() {
@ -492,13 +530,14 @@ export default class Recording extends Component<any, any> {
{item.online === 1 ? "在线" : "离线"}
</View>
</View>
{item.instrumentType === 1 && (
{item.instrumentType === 2 && (
<View
className="top-right"
onClick={this.toReport.bind(
this,
item.instrumentId,
item.id
item.id,
item,
)}
>
@ -662,7 +701,7 @@ export default class Recording extends Component<any, any> {
!clockShow && ViewAddInstrument === "true" && (
<View className="footer flex aitems">
<View className="btn" onClick={this.setShow.bind(this, true)}>
</View>
{/* <View className="text" onClick={this.back}>
&gt;
@ -710,7 +749,7 @@ export default class Recording extends Component<any, any> {
className="showImg"
src={require("../../img/clock_in_upload/add-image.png")}
mode="widthFix"
></Image>
</View>
)}

Loading…
Cancel
Save