blak-kong 2 years ago
commit 66b9630072

@ -0,0 +1,16 @@
{
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
"condition": {
"miniprogram": {
"list": [
{
"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
}
]
}
}
}

@ -1,42 +1,45 @@
export default defineAppConfig({
__usePrivacyCheck__: true,
pages: [
'pages/index/index',
'pages/login/login',
'pages/initiate/initiate',
'pages/entry/entry',
'pages/activity/activity',
"pages/index/index",
"pages/login/login",
"pages/initiate/initiate",
"pages/entry/entry",
"pages/activity/activity",
"pages/detect/detect",
"pages/shop/shop",
"pages/user/user",
"pages/userInfo/userInfo",
'pages/userInfoDetail/userInfoDetail',
"pages/userInfoDetail/userInfoDetail",
"pages/register/register",
'pages/instrument/instrument',
"pages/instrument/instrument",
"pages/instrument/intro",
"pages/instrument_manage/index",
"pages/instrument_detail/index",
"pages/instrumentClickinUpload/index",
'pages/privacyPolicy/privacyPolicy',
'pages/userPolicy/userPolicy',
'pages/about/about',
'pages/message/message',
'pages/consultant/consultant',
'pages/integral_list/integral_list',
"pages/privacyPolicy/privacyPolicy",
"pages/userPolicy/userPolicy",
"pages/about/about",
"pages/message/message",
"pages/consultant/consultant",
"pages/integral_list/integral_list",
"pages/recording/recording",
"pages/webViewPage/webViewPage",
'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",
],
"tabBar": {
"custom": true,
"color": "#707070",
"selectedColor": "#CAB18C",
"backgroundColor": "#ffffff",
"borderStyle": "black",
"list": [
tabBar: {
custom: true,
color: "#707070",
selectedColor: "#CAB18C",
backgroundColor: "#ffffff",
borderStyle: "black",
list: [
{
pagePath: "pages/index/index",
text: "主页",
@ -67,28 +70,23 @@ export default defineAppConfig({
iconPath: "img/tabar/5.png",
selectedIconPath: "img/tabar/55.png",
},
]
],
},
usingComponents: {
},
lazyCodeLoading: 'requiredComponents',
usingComponents: {},
lazyCodeLoading: "requiredComponents",
window: {
backgroundTextStyle: 'light',
navigationStyle: 'custom',
navigationBarBackgroundColor: '#fff',
navigationBarTitleText: 'WeChat',
navigationBarTextStyle: 'black',
backgroundTextStyle: "light",
navigationStyle: "custom",
navigationBarBackgroundColor: "#fff",
navigationBarTitleText: "WeChat",
navigationBarTextStyle: "black",
// enablePullDownRefresh: true
},
requiredPrivateInfos: ["getLocation"],
subPackages: [
{
root: 'moduleIOT',
pages: [
"pages/iotCarePlan/WL200",
"pages/iotCarePlan/FR200",
]
}
]
})
root: "moduleIOT",
pages: ["pages/iotCarePlan/WL200", "pages/iotCarePlan/FR200"],
},
],
});

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

@ -10,10 +10,10 @@ import React, {
useState,
} from "react";
// import Echarts from "./components/Echart/index";
import Echarts from "./components/Echart/index";
import {
Block,
View,
View,
Text,
Image,
Video,
@ -238,9 +238,9 @@ class IotCarePlanWL200 extends Component<any, any> {
this.getWL200NursingHistory();
this.initData();
}
componentDidMount() {}
componentDidMount() { }
componentWillUnmount() {}
componentWillUnmount() { }
componentDidShow() {
console.log("页面显示了");
@ -571,7 +571,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;
@ -603,7 +603,7 @@ class IotCarePlanWL200 extends Component<any, any> {
};
// 绘制能量图
drawProwerPicture() {}
drawProwerPicture() { }
/** 切换光照 */
onSwitchChange = async () => {
@ -1368,7 +1368,7 @@ class IotCarePlanWL200 extends Component<any, any> {
// 仅在切换模式的时候,弹窗倒计时.
if (type === "switch") {
let downNum = CountDownTime[ActiveModeItem.modeType] || 3;
this.showCountdownFun(downNum, () => {}); // 倒计时弹窗
this.showCountdownFun(downNum, () => { }); // 倒计时弹窗
}
// 开始执行护理
@ -2097,8 +2097,8 @@ class IotCarePlanWL200 extends Component<any, any> {
<PopupInstrumentUploadTips
isShow={isFirstTipShow}
zIndex={10020}
myClassName="level-up"
title="打卡介绍"
myClassName='level-up'
title='打卡介绍'
data={nurseInfo}
close={this.onTipShowClose}
confirm={this.onTipShowClose}
@ -2110,11 +2110,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}
/>
@ -2122,7 +2122,7 @@ class IotCarePlanWL200 extends Component<any, any> {
isLarge
isClose
isShow={isSwitchActiveMode}
title="护理模式切换"
title='护理模式切换'
content={
<ModeListView
ModeID={ModeID}
@ -2136,9 +2136,9 @@ class IotCarePlanWL200 extends Component<any, any> {
onModeLockOpen={this.onModeLockOpen}
/>
}
textAlgin="center"
cancelButtonText="取消"
confirmButtonText="确定"
textAlgin='center'
cancelButtonText='取消'
confirmButtonText='确定'
close={this.cancelModeSwitchBtn}
confirm={this.confirmModeSwitchBtn}
/>
@ -2148,7 +2148,7 @@ class IotCarePlanWL200 extends Component<any, any> {
isShow={isShowStepTips}
isLarge
isFirstEntry={false}
confirmButtonText="知道了"
confirmButtonText='知道了'
data={ActiveModeItem.openSourceData}
close={this.closeStepTips}
/>
@ -2157,10 +2157,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}
/>
@ -2169,11 +2169,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}
/>
@ -2182,17 +2182,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}
@ -2201,11 +2201,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={() => {
/*不需要做处理*/
}}
@ -2216,28 +2216,28 @@ 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
/>
@ -2247,12 +2247,12 @@ class IotCarePlanWL200 extends Component<any, any> {
<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}
/>
)}
@ -2260,25 +2260,25 @@ 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}
@ -2309,7 +2309,7 @@ class IotCarePlanWL200 extends Component<any, any> {
/>
)}
{/* <Echarts></Echarts> */}
<Echarts></Echarts>
</View>
<Footer

File diff suppressed because it is too large Load Diff

@ -287,7 +287,7 @@ function Index() {
return (
<Block>
<View className="box">
<View className='box'>
<Echarts
echarts={echarts}
option={option}
@ -296,324 +296,21 @@ function Index() {
// style自定义设置echarts宽高
style={{ width: "630rpx", height: "260rpx" }}
/>
<View className="box_background">
<Image className="full" src={require("@/img/full-scran.png")}></Image>
<View className="power"></View>
<View className='box_background'>
<Image className='full' src={require("@/img/full-scran.png")}></Image>
<View className='power'></View>
{level.map((item) => (
<View className="line" key={item}>
<View className="number">{item}</View>
<View className="bottom_line">8</View>
<View className='line' key={item}>
<View className='number'>{item}</View>
<View className='bottom_line'>8</View>
</View>
))}
<View className="line">
<View className="number">1</View>
<View className='line'>
<View className='number'>1</View>
</View>
<View className="time"></View>
<View className='time'></View>
</View>
</View>
<Block>
<View>
<View className="water_test">
<View className="test_step flex aitems sb">
{stepList.map((item, index) => {
return (
<View className="step_block flex aitems" key={index}>
<View className="step_top flex aitems">
<View className="drop"></View>
<View className="step_num">{item.value}</View>
{index != 2 && <View className="line"></View>}
</View>
<View className="step_name">{item.name}</View>
</View>
);
})}
</View>
<View className="test_txt">
</View>
</View>
<View className="testing">
<View className="testing_header flex aitems">
{stepList.map((item, index) => {
return (
<View
className="items flex aitems jcenter"
key={index}
style={stepIndex == index ? "background: #fff" : ""}
>
{stepIndex > index && (
<Image
className="finish_img"
src={require("@/img/full-scran.png")}
mode="aspectFill"
></Image>
)}
<View className="value">{item.value}</View>
<View className="name">{item.name}</View>
</View>
);
})}
</View>
<View className="testing_content">
<View className="progress_box flex aitems">
<View className="title">
{stepList[stepIndex].name + "水分测试"}
</View>
{/* <view class='progress_block flex aitems'> */}
<Progress
style={{
width: "300rpx",
}}
percentage="80"
strokeWidth="14"
showPivot={false}
color="#C2E5F3"
></Progress>
{stepList[stepIndex].finish && 80 >= 99 ? (
<Image
className="finish_img"
src={require("@/img/finished.png")}
mode="aspectFill"
></Image>
) : (
<Image
className="finish_img"
src={require("@/img/no-finish.png")}
mode="aspectFill"
></Image>
)}
{/* </view> */}
</View>
{/* <view class='tips' wx:if='{{!finish}}'> */}
{/* 请参考视频指引,将仪器紧贴<text style='color: #000000'>额头区域</text> */}
{/* </view> */}
<View className="tips flex sb">
<View>
{(testIndex == 1 || testIndex == 2 || testIndex == 4) && (
<Text
style={{
color: "#000000",
}}
>
{stepList[stepIndex].name + "区域"}
</Text>
)}
{testIndex == 1 && (
<Text></Text>
)}
</View>
</View>
</View>
</View>
</View>
<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>
<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>
</View>
</View>
</Block>
</Block>
);
}

@ -0,0 +1,373 @@
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: "0rpx",
left: "28rpx",
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>
<View className="box">
<Echarts
echarts={echarts}
option={option}
ref={echartsRef}
// isPage={false}
// style自定义设置echarts宽高
style={{ width: "630rpx", height: "240rpx" }}
/>
</View>
</Block>
);
}
export default Index;

@ -0,0 +1,266 @@
page {
background: #f8f8f8;
background: #f3f3f3;
}
.gear_adjust {
padding: 2rpx 10rpx 40rpx 18rpx;
.title {
font-size: 28rpx;
font-weight: bold;
color: #000000;
}
.gear_box {
margin-top: 14rpx;
.slider_class {
height: 12rpx;
box-sizing: border-box;
flex: 1;
border-radius: 6rpx;
}
.gear {
padding: 20rpx 0;
}
.pos {
font-size: 26rpx;
font-weight: 500;
color: #666666;
min-width: 76rpx;
margin-right: 32rpx;
}
}
}
.gear_adjustment {
box-sizing: border-box;
width: 690rpx;
height: 300rpx;
background: #ffffff;
border-radius: 30rpx;
padding: 30rpx;
margin: 30rpx auto 200rpx;
.gear_box {
.gear {
margin-bottom: 30rpx;
.pos {
font-size: 26rpx;
font-weight: 500;
color: #666666;
min-width: 76rpx;
margin-right: 32rpx;
}
.gear_button {
width: 500rpx;
height: 60rpx;
background: #f8f8f8;
border-radius: 30rpx;
justify-content: space-between;
font-size: 20rpx;
.button_minus {
width: 90rpx;
height: 60rpx;
background: #e5e5e5;
border-radius: 30rpx 0rpx 0rpx 30rpx;
display: flex;
justify-content: center;
align-items: center;
.image {
width: 28rpx;
height: 28rpx;
}
}
.button_plus {
width: 90rpx;
height: 60rpx;
background: #e5e5e5;
border-radius: 0rpx 30rpx 30rpx 0rpx;
display: flex;
justify-content: center;
align-items: center;
.image {
width: 28rpx;
height: 28rpx;
}
}
.button_value {
display: flex;
justify-content: center;
align-items: center;
font-size: 24rpx;
width: 320rpx;
height: 60rpx;
line-height: 60rpx;
color: #666;
.number {
font-family: PingFang SC;
font-weight: 800;
font-size: 30rpx;
color: #000000;
margin-right: 4rpx;
}
}
}
}
}
}
.level_box {
padding-left: 109rpx;
.level_num {
font-size: 16rpx;
font-weight: 500;
color: #cccccc;
}
}
.custom-button {
position: relative;
width: 32rpx;
height: 32rpx;
background: linear-gradient(90deg, #ffe9c7, #eecda1);
border: 4rpx solid #ffffff;
border-radius: 50%;
box-sizing: border-box;
.circle {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 12rpx;
height: 12rpx;
background: #ffffff;
border-radius: 50%;
}
.level {
position: absolute;
top: -30rpx;
left: 0;
width: 44rpx;
font-size: 20rpx;
font-weight: 500;
color: #bf8e49;
height: 28rpx;
}
}
.current-button {
background: #cccc;
.level {
color: #cccc;
}
}
.success_popup {
width: calc(100% - 110rpx);
box-sizing: border-box;
.popup_content {
width: 100%;
padding: 52rpx 0 60rpx;
box-sizing: border-box;
display: flex;
flex-direction: column;
align-items: center;
color: #030000;
.title {
font-size: 36rpx;
font-weight: bold;
}
.success_icon {
width: 120rpx;
height: 120rpx;
margin: 52rpx 0;
}
.tips {
font-size: 30rpx;
}
}
& > .infobox1 {
padding: 0rpx 0 35rpx;
.tip {
font-size: 36rpx;
font-weight: bold;
color: #030000;
text-align: center;
}
.tip1 {
text-align: center;
margin-top: 71rpx;
font-size: 30rpx;
color: #030000;
}
.tip2 {
color: #202020;
font-size: 40rpx;
text-align: center;
}
.btnbox {
margin-top: 71rpx;
padding: 0 3rpx 10rpx 15rpx;
display: flex;
align-items: center;
justify-content: space-between;
.btn1 {
background: #fff;
width: 212rpx;
height: 66rpx;
line-height: 66rpx;
text-align: center;
font-size: 30rpx;
color: #e2c6a3;
border-radius: 32rpx;
border: 2rpx solid #e2c6a3;
font-style: normal;
width: 270rpx;
height: 90rpx;
line-height: 90rpx;
background: #ffffff;
text-align: center;
border: 2rpx solid #000000;
border-radius: 45rpx;
font-size: 32rpx;
font-weight: bold;
color: #000000;
}
.btn2 {
width: 270rpx;
height: 90rpx;
line-height: 90rpx;
text-align: center;
background: #000000;
border-radius: 45rpx;
font-size: 32rpx;
font-weight: bold;
color: #ffffff;
font-style: normal;
width: 270rpx;
height: 90rpx;
line-height: 90rpx;
background: #000000;
text-align: center;
border-radius: 45rpx;
font-size: 32rpx;
font-weight: bold;
color: #ffffff;
}
}
}
}
.flex {
display: flex;
}
.aitems {
align-items: center;
}
.jcenter {
justify-content: center;
}
.sb {
justify-content: space-between;
}
.sa {
justify-content: space-around;
}
.wrap {
flex-wrap: wrap;
}

@ -0,0 +1,235 @@
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 "./index.less";
interface Props {
Electricity: any;
matrixElectricity: any;
facialMaskConnectStatus: any;
}
function Index() {
const gearLevel = {
currentGear: null,
//现在工作的档位
currentGearMode: "forehead",
//现在工作模式
forehead: 5,
leftCheek: 5,
rightCheek: 5,
};
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>
<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>
</View>
</View>
</Block>
);
}
export default Index;

@ -0,0 +1,557 @@
page {
background: #f8f8f8;
background: #f3f3f3;
}
.water_test {
margin: 0 auto;
box-sizing: border-box;
padding: 42rpx 48rpx;
width: 690rpx;
height: 292rpx;
background: #ffffff;
border-radius: 30rpx;
.test_step {
.step_block {
flex-direction: column;
}
.step_top {
position: relative;
.line {
position: absolute;
top: 50%;
right: -117rpx;
width: 97rpx;
height: 0;
border-top: 2rpx dashed #f1f1f1;
}
.drop {
width: 10rpx;
height: 10rpx;
background: #999999;
border-radius: 50%;
}
.step_num {
font-size: 24rpx;
font-weight: 500;
color: #666666;
margin-left: 14rpx;
}
}
.step_name {
font-size: 26rpx;
font-weight: bold;
color: #000000;
margin-left: 14rpx;
padding-top: 12rpx;
letter-spacing: 2rpx;
}
}
.test_txt {
font-size: 24rpx;
font-weight: 500;
color: #999999;
padding-top: 48rpx;
line-height: 36rpx;
letter-spacing: 2rpx;
}
}
.testing {
.testing_header {
.items {
flex: 1;
border-radius: 30rpx 30rpx 0rpx 0rpx;
padding: 25rpx 0 21rpx;
justify-content: space-evenly;
.finish_img {
width: 24rpx;
height: 24rpx;
border-radius: 50%;
}
.value {
font-size: 24rpx;
font-weight: 500;
color: #666666;
line-height: 1;
}
.name {
font-size: 26rpx;
font-weight: bold;
color: #000000;
line-height: 1;
}
}
}
.testing_content {
width: 100%;
height: 228rpx;
background: #ffffff;
border-radius: 0rpx 0rpx 30rpx 30rpx;
padding: 51rpx 30rpx 0 36rpx;
box-sizing: border-box;
.progress_box {
width: 100%;
height: 36rpx;
line-height: 36rpx;
.title {
font-size: 28rpx;
font-weight: bold;
color: #000000;
min-width: 200rpx;
margin-right: 60rpx;
letter-spacing: 2rpx;
}
}
.tips {
font-size: 24rpx;
font-weight: 500;
color: #999999;
margin-top: 45rpx;
line-height: 36rpx;
letter-spacing: 2rpx;
}
.progress_block {
flex: 1;
}
.finish_img {
width: 36rpx;
height: 36rpx;
margin-left: 49rpx;
}
}
}
.isquanpingclass {
position: fixed;
width: calc(100% - 100rpx);
padding: 20rpx 50rpx;
margin: 0;
z-index: 999;
top: 0;
left: 0;
right: 0;
height: 100vh;
}
.canvas {
position: fixed;
top: -9999999px;
}
.popbox1 {
width: 600rpx;
height: 360rpx;
border-radius: 28rpx;
flex-direction: column;
.tip1 {
font-size: 40rpx;
color: #000000;
text-align: center;
font-weight: 400;
margin-top: 28rpx;
}
.tip2 {
font-size: 32rpx;
color: #000000;
text-align: center;
font-weight: 400;
margin-top: 36rpx;
height: 110rpx;
}
.btnbox {
.btn1 {
font-size: 30rpx;
color: #000000;
text-align: center;
font-weight: 400;
width: 240rpx;
height: 100rpx;
line-height: 100rpx;
border: 2rpx solid rgba(0, 0, 0, 0.3);
border-radius: 28rpx;
}
.btn2 {
font-size: 30rpx;
color: #000000;
text-align: center;
font-weight: 400;
width: 240rpx;
height: 100rpx;
line-height: 100rpx;
margin-left: 40rpx;
background: #e2c5a3;
border-radius: 28rpx;
}
}
}
.van-tabs__scroll--line {
background: transparent !important;
}
image {
width: 100%;
height: 100%;
display: flex;
}
/* .color{
color: #F1AB15;
} */
.ellipsis2 {
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.nodata {
color: #666666;
text-align: center;
margin-top: 50rpx;
font-size: 28rpx;
}
.MT30 {
margin-top: 30rpx;
}
.submitbtn {
position: absolute;
bottom: 100rpx;
width: 400rpx;
left: 50%;
margin-left: -200rpx;
.btn {
position: absolute;
top: 20rpx;
color: #fff;
font-weight: bold;
font-size: 32rpx;
text-align: center;
width: 100%;
bottom: 0;
}
}
.avatar-wrapper {
position: absolute;
bottom: 0;
width: 100%;
height: 100%;
left: 0;
right: 0;
top: 0;
z-index: 99;
opacity: 0;
}
.permeate_model_box {
position: relative;
display: flex;
flex-direction: column;
align-items: center;
width: 100%;
padding: 52rpx 30rpx 38rpx 30rpx;
box-sizing: border-box;
.my_moisture_box {
width: 600rpx;
height: 600rpx;
margin: 0 auto;
}
.permeate_title {
font-size: 36rpx;
font-weight: bold;
color: #030000;
line-height: 1;
padding-bottom: 54rpx;
box-sizing: border-box;
}
.permeate_tips {
font-size: 28rpx;
font-weight: 500;
color: #030000;
line-height: 60rpx;
padding: 37rpx 0;
box-sizing: border-box;
.txt {
font-size: 26rpx;
font-weight: 500;
color: #666666;
margin-left: 12rpx;
}
}
.permeate_btn {
height: 90rpx;
line-height: 90rpx;
background: #000000;
border-radius: 45rpx;
font-size: 32rpx;
font-weight: bold;
color: #ffffff;
padding: 0 72rpx;
}
.close_box {
position: absolute;
top: 34rpx;
right: 29rpx;
padding: 50rpx;
}
.close_img {
position: absolute;
top: 0;
right: 0;
width: 24rpx;
height: 24rpx;
}
}
.gear_adjust {
padding: 2rpx 10rpx 40rpx 18rpx;
.title {
font-size: 28rpx;
font-weight: bold;
color: #000000;
}
.gear_box {
margin-top: 14rpx;
.slider_class {
height: 12rpx;
box-sizing: border-box;
flex: 1;
border-radius: 6rpx;
}
.gear {
padding: 20rpx 0;
}
.pos {
font-size: 26rpx;
font-weight: 500;
color: #666666;
min-width: 76rpx;
margin-right: 32rpx;
}
}
}
.gear_adjustment {
box-sizing: border-box;
width: 690rpx;
height: 300rpx;
background: #ffffff;
border-radius: 30rpx;
padding: 30rpx;
margin: 30rpx auto 200rpx;
.gear_box {
.gear {
margin-bottom: 30rpx;
.pos {
font-size: 26rpx;
font-weight: 500;
color: #666666;
min-width: 76rpx;
margin-right: 32rpx;
}
.gear_button {
width: 500rpx;
height: 60rpx;
background: #f8f8f8;
border-radius: 30rpx;
justify-content: space-between;
font-size: 20rpx;
.button_minus {
width: 90rpx;
height: 60rpx;
background: #e5e5e5;
border-radius: 30rpx 0rpx 0rpx 30rpx;
display: flex;
justify-content: center;
align-items: center;
.image {
width: 28rpx;
height: 28rpx;
}
}
.button_plus {
width: 90rpx;
height: 60rpx;
background: #e5e5e5;
border-radius: 0rpx 30rpx 30rpx 0rpx;
display: flex;
justify-content: center;
align-items: center;
.image {
width: 28rpx;
height: 28rpx;
}
}
.button_value {
display: flex;
justify-content: center;
align-items: center;
font-size: 24rpx;
width: 320rpx;
height: 60rpx;
line-height: 60rpx;
color: #666;
.number {
font-family: PingFang SC;
font-weight: 800;
font-size: 30rpx;
color: #000000;
margin-right: 4rpx;
}
}
}
}
}
}
.level_box {
padding-left: 109rpx;
.level_num {
font-size: 16rpx;
font-weight: 500;
color: #cccccc;
}
}
.custom-button {
position: relative;
width: 32rpx;
height: 32rpx;
background: linear-gradient(90deg, #ffe9c7, #eecda1);
border: 4rpx solid #ffffff;
border-radius: 50%;
box-sizing: border-box;
.circle {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 12rpx;
height: 12rpx;
background: #ffffff;
border-radius: 50%;
}
.level {
position: absolute;
top: -30rpx;
left: 0;
width: 44rpx;
font-size: 20rpx;
font-weight: 500;
color: #bf8e49;
height: 28rpx;
}
}
.current-button {
background: #cccc;
.level {
color: #cccc;
}
}
.success_popup {
width: calc(100% - 110rpx);
box-sizing: border-box;
.popup_content {
width: 100%;
padding: 52rpx 0 60rpx;
box-sizing: border-box;
display: flex;
flex-direction: column;
align-items: center;
color: #030000;
.title {
font-size: 36rpx;
font-weight: bold;
}
.success_icon {
width: 120rpx;
height: 120rpx;
margin: 52rpx 0;
}
.tips {
font-size: 30rpx;
}
}
& > .infobox1 {
padding: 0rpx 0 35rpx;
.tip {
font-size: 36rpx;
font-weight: bold;
color: #030000;
text-align: center;
}
.tip1 {
text-align: center;
margin-top: 71rpx;
font-size: 30rpx;
color: #030000;
}
.tip2 {
color: #202020;
font-size: 40rpx;
text-align: center;
}
.btnbox {
margin-top: 71rpx;
padding: 0 3rpx 10rpx 15rpx;
display: flex;
align-items: center;
justify-content: space-between;
.btn1 {
background: #fff;
width: 212rpx;
height: 66rpx;
line-height: 66rpx;
text-align: center;
font-size: 30rpx;
color: #e2c6a3;
border-radius: 32rpx;
border: 2rpx solid #e2c6a3;
font-style: normal;
width: 270rpx;
height: 90rpx;
line-height: 90rpx;
background: #ffffff;
text-align: center;
border: 2rpx solid #000000;
border-radius: 45rpx;
font-size: 32rpx;
font-weight: bold;
color: #000000;
}
.btn2 {
width: 270rpx;
height: 90rpx;
line-height: 90rpx;
text-align: center;
background: #000000;
border-radius: 45rpx;
font-size: 32rpx;
font-weight: bold;
color: #ffffff;
font-style: normal;
width: 270rpx;
height: 90rpx;
line-height: 90rpx;
background: #000000;
text-align: center;
border-radius: 45rpx;
font-size: 32rpx;
font-weight: bold;
color: #ffffff;
}
}
}
}
.flex {
display: flex;
}
.aitems {
align-items: center;
}
.jcenter {
justify-content: center;
}
.sb {
justify-content: space-between;
}
.sa {
justify-content: space-around;
}
.wrap {
flex-wrap: wrap;
}

@ -0,0 +1,139 @@
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 "./index.less";
interface Props {
Electricity: any;
matrixElectricity: any;
facialMaskConnectStatus: any;
}
function Index() {
const stepIndex = 0;
const testIndex = 1;
const stepList = [
{
value: "Step1",
name: "额头",
finish: false,
},
{
value: "Step2",
name: "左脸颊",
finish: false,
},
{
value: "Step3",
name: "右脸颊",
finish: false,
},
];
return (
<Block>
<View>
<View className='water_test'>
<View className='test_step flex aitems sb'>
{stepList.map((item, index) => {
return (
<View className='step_block flex aitems' key={index}>
<View className='step_top flex aitems'>
<View className='drop'></View>
<View className='step_num'>{item.value}</View>
{index != 2 && <View className='line'></View>}
</View>
<View className='step_name'>{item.name}</View>
</View>
);
})}
</View>
<View className='test_txt'>
</View>
</View>
<View className='testing'>
<View className='testing_header flex aitems'>
{stepList.map((item, index) => {
return (
<View
className='items flex aitems jcenter'
key={index}
style={stepIndex == index ? "background: #fff" : ""}
>
{stepIndex > index && (
<Image
className='finish_img'
src={require("@/img/full-scran.png")}
mode='aspectFill'
></Image>
)}
<View className='value'>{item.value}</View>
<View className='name'>{item.name}</View>
</View>
);
})}
</View>
<View className='testing_content'>
<View className='progress_box flex aitems'>
<View className='title'>
{stepList[stepIndex].name + "水分测试"}
</View>
{/* <view class='progress_block flex aitems'> */}
<Progress
style={{
width: "300rpx",
}}
percentage='80'
strokeWidth='14'
showPivot={false}
color='#C2E5F3'
></Progress>
{stepList[stepIndex].finish && 80 >= 99 ? (
<Image
className='finish_img'
src={require("@/img/finished.png")}
mode='aspectFill'
></Image>
) : (
<Image
className='finish_img'
src={require("@/img/no-finish.png")}
mode='aspectFill'
></Image>
)}
{/* </view> */}
</View>
{/* <view class='tips' wx:if='{{!finish}}'> */}
{/* 请参考视频指引,将仪器紧贴<text style='color: #000000'>额头区域</text> */}
{/* </view> */}
<View className='tips flex sb'>
<View>
{(testIndex == 1 || testIndex == 2 || testIndex == 4) && (
<Text
style={{
color: "#000000",
}}
>
{stepList[stepIndex].name + "区域"}
</Text>
)}
{testIndex == 1 && (
<Text></Text>
)}
</View>
</View>
</View>
</View>
</View>
</Block>
);
}
export default Index;

@ -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>
);
}
}

@ -164,11 +164,11 @@ class Index extends Component<any, any> {
}
}
componentDidMount() {}
componentDidMount() { }
componentWillUnmount() {
// 页面卸载监听
Taro.offAppHide((res) => {});
Taro.offAppHide((res) => { });
this.$instance = null;
}
@ -261,7 +261,7 @@ class Index extends Component<any, any> {
this.isSancQrcodeEnter();
}
},
fail: () => {},
fail: () => { },
complete: () => {
// 授权完成运行页面初始化
},
@ -420,6 +420,7 @@ class Index extends Component<any, any> {
};
GetSiteAddTag = async (id) => {
go("/pages/moisture_test_report/moisture_test_report")
let res = await GetSiteAddTag(id);
if (res.data.code === 200) {
console.log("点击自动上报,不需要逻辑处理");
@ -519,7 +520,7 @@ class Index extends Component<any, any> {
this.setState({ isShowSiteSwiper: false });
};
bannerSwiperchange() {}
bannerSwiperchange() { }
gobanner(item) {
// 跳转类型0无跳转、1跳转内部链接、3跳转外部链接、4跳转小程序、5导向视频号、6导向视频号直播间',
@ -907,13 +908,11 @@ class Index extends Component<any, any> {
*/
pairingChange = (e) => {
console.log("===epairingChange===》", e);
if (this.state.connectInstrument.model === "FR200") {
go("/moduleIOT/pages/iotCarePlan/FR200"); // 画页面直接跳转
} else {
go("/moduleIOT/pages/iotCarePlan/WL200"); // 画页面直接跳转
}
this.connectionClose();
};
@ -1108,7 +1107,7 @@ class Index extends Component<any, any> {
<View catchMove>
<PopupAlert
isShow={isCommonError}
title="提示"
title='提示'
content={
<Block>
{commonErrorText.map((item) => {
@ -1116,60 +1115,60 @@ class Index extends Component<any, any> {
})}
</Block>
}
confirmButtonText="知道了"
textAlgin="center"
confirmButtonText='知道了'
textAlgin='center'
close={this.onCommonErrorFun}
confirm={this.onCommonErrorFun}
/>
<PopupConfirm
isShow={isShowReConnectDeviceRecordWL200}
isClose
title="提示"
title='提示'
zIndex={10020}
myClassName="level-up"
myClassName='level-up'
content={
<Block>
<View></View>
<View></View>
</Block>
}
cancelButtonText="取消"
confirmButtonText="连接设备"
textAlgin="center"
cancelButtonText='取消'
confirmButtonText='连接设备'
textAlgin='center'
close={this.closeReConnectDeviceRecordWL200}
confirm={this.confirmReConnectDeviceRecordWL200}
/>
<PopupAlert
isShow={isBindingError}
title="提示"
title='提示'
content={
<Block>
<View></View>
<View></View>
</Block>
}
confirmButtonText="知道了"
textAlgin="center"
confirmButtonText='知道了'
textAlgin='center'
close={this.onBindErrorClose}
confirm={this.onBindErrorConfirm}
/>
<PopupAlert
isShow={isNotRegister}
isClose
title="提示"
content="暂未授权注册,请点击注册"
confirmButtonText="确定"
textAlgin="center"
type="1"
title='提示'
content='暂未授权注册,请点击注册'
confirmButtonText='确定'
textAlgin='center'
type='1'
close={this.closeAlert}
confirm={this.closeAlert}
/>
<PopupAlert
isShow={isDev}
title="提示"
content="页面正在开发中"
confirmButtonText="确定"
textAlgin="center"
title='提示'
content='页面正在开发中'
confirmButtonText='确定'
textAlgin='center'
close={this.closeDev}
confirm={this.closeDev}
/>
@ -1188,54 +1187,54 @@ class Index extends Component<any, any> {
/>
<PopupAlert
isShow={isBindingError}
title="提示"
title='提示'
content={
<Block>
<View></View>
<View></View>
</Block>
}
confirmButtonText="知道了"
textAlgin="center"
confirmButtonText='知道了'
textAlgin='center'
close={this.onBindErrorClose}
confirm={this.onBindErrorConfirm}
/>
<PopupAlert
isShow={isBeforeBindingError}
title="提示"
title='提示'
content={
BeforeBindingErrorText || "您选择的仪器有误,请重新确认选择"
}
confirmButtonText="知道了"
textAlgin="center"
confirmButtonText='知道了'
textAlgin='center'
close={this.onBeforeBindClose}
confirm={this.onBeforeBindConfirm}
/>
<PopupAlert
isShow={isBindingError203}
title="提示"
content="序列码已被别人绑定,请联系微信助手"
confirmButtonText="知道了"
textAlgin="center"
title='提示'
content='序列码已被别人绑定,请联系微信助手'
confirmButtonText='知道了'
textAlgin='center'
close={this.onBindErrorClose203}
confirm={this.onBindErrorConfirm203}
></PopupAlert>
<PopupAlert
isShow={showEquipment}
title="提示"
title='提示'
content={
<Block>
<View className="mb10">
<View className='mb10'>
{instrumentInfo.instrumentName}
</View>
<View className="mb10">{instrumentInfo.serial}</View>
<View className="mb10"></View>
<View className='mb10'>{instrumentInfo.serial}</View>
<View className='mb10'></View>
</Block>
}
confirmButtonText="知道了"
textAlgin="center"
confirmButtonText='知道了'
textAlgin='center'
close={this.onUnloginClose.bind(this)}
confirm={this.onUnloginConfirm.bind(this)}
></PopupAlert>
@ -1243,9 +1242,9 @@ class Index extends Component<any, any> {
<PopupSiteSwiper
isShow={isShowSiteSwiper}
siteData={sitePopupList}
size="middle"
confirmButtonText="确定"
textAlgin="center"
size='middle'
confirmButtonText='确定'
textAlgin='center'
close={this.closeSiteSwiper}
confirm={this.closeSiteSwiper}
/>
@ -1265,15 +1264,15 @@ class Index extends Component<any, any> {
isLarge
isClose
isShow={isShowUpdateVersionTip}
title="提示"
title='提示'
content={
<Block>
<View></View>
<View></View>
</Block>
}
textAlgin="center"
confirmButtonText="确定"
textAlgin='center'
confirmButtonText='确定'
close={this.cancelUpdateVersionTip}
confirm={this.confirmUpdateVersionTip}
/>
@ -1286,16 +1285,16 @@ class Index extends Component<any, any> {
)}
<PopupAlert
isShow={isShowVersionUpgradFinish}
title="升级内容公告"
title='升级内容公告'
content={
<Block>
<View className="nodes">
<View className='nodes'>
<RichText nodes={versionUpgradFinishNodes} />
</View>
</Block>
}
confirmButtonText="知道了"
textAlgin="left"
confirmButtonText='知道了'
textAlgin='left'
isClose
close={this.onVersionUpgradFinish}
confirm={this.onVersionUpgradFinish}
@ -1307,29 +1306,29 @@ class Index extends Component<any, any> {
leftSlot={
<Block>
<View
className="message"
className='message'
onClick={this.gourl}
data-url="/pages/message/message"
data-url='/pages/message/message'
>
<Image
className="message-img"
className='message-img'
src={require("../../img/index/message.png")}
mode="aspectFill"
mode='aspectFill'
/>
{messagecount ? <View className="tip" /> : ""}
{messagecount ? <View className='tip' /> : ""}
</View>
</Block>
}
/>
<View className="index">
<View className="date-title" onClick={this.toNursingRecords}>
<Text className="text"></Text>
<View className='index'>
<View className='date-title' onClick={this.toNursingRecords}>
<Text className='text'></Text>
<Image
src={require("../../img/index/right.png")}
style="width: 20rpx;height: 20rpx;"
style='width: 20rpx;height: 20rpx;'
/>
</View>
<View className="bg-while">
<View className='bg-while'>
<AtCalendar
hideArrow
isSwiper={false}
@ -1341,40 +1340,40 @@ class Index extends Component<any, any> {
/>
</View>
</View>
<View className="infobox5">
<View className='infobox5'>
{instrumentList.length > 0 && (
<Block>
<View className="nurse_plan_box flex aitems sb">
<View className="title"></View>
<View className='nurse_plan_box flex aitems sb'>
<View className='title'></View>
<View
className="txt_box flex jcenter aitems"
data-url="/pages/instrument/instrument"
className='txt_box flex jcenter aitems'
data-url='/pages/instrument/instrument'
onClick={this.gourl}
>
<Image
className="right_icon"
className='right_icon'
src={require("../../img/black-add.png")}
mode="aspectFill"
mode='aspectFill'
/>
<View className="txt"></View>
<View className='txt'></View>
</View>
</View>
<View style="overflow-x: auto;">
<View className="device_list flex">
<View style='overflow-x: auto;'>
<View className='device_list flex'>
{instrumentList.map((item, index) => {
return (
<View
key={"instrumentList" + index}
className="device_item"
className='device_item'
onClick={this.goNursing.bind(this, item)}
>
<Image
className="banner_img"
className='banner_img'
src={item.banner}
mode="aspectFill"
mode='aspectFill'
/>
<View className="device_name ellipsis1">
<View className='device_name ellipsis1'>
{item.name}
</View>
</View>
@ -1386,28 +1385,28 @@ class Index extends Component<any, any> {
)}
{instrumentList.length === 0 && (
<Block>
<View className="nurse_plan_box flex aitems sb">
<View className="title"></View>
<View className='nurse_plan_box flex aitems sb'>
<View className='title'></View>
</View>
<View className="add_device flex jcenter aitems bg-while">
<View className="add_device_btn">
<View className="txt_box flex jcenter aitems">
<View className='add_device flex jcenter aitems bg-while'>
<View className='add_device_btn'>
<View className='txt_box flex jcenter aitems'>
<View
className="at-icon at-icon-add"
style="color: #fff;font-size: 30rpx;"
className='at-icon at-icon-add'
style='color: #fff;font-size: 30rpx;'
></View>
<View className="txt" onClick={this.addNewDevice}>
<View className='txt' onClick={this.addNewDevice}>
</View>
</View>
</View>
<View className="tips"></View>
<View className='tips'></View>
</View>
</Block>
)}
</View>
<View className="infobox3">
<View className='infobox3'>
<Swiper
autoplay
onAnimationFinish={this.bannerSwiperchange.bind(this)}
@ -1419,15 +1418,15 @@ class Index extends Component<any, any> {
key={"banner_" + index}
onClick={this.gobanner.bind(this, item)}
>
<Image style="width:100%;height:100%" src={item.fileUrl} />
<Image style='width:100%;height:100%' src={item.fileUrl} />
</SwiperItem>
);
})}
</Swiper>
</View>
<View style="height:200rpx"></View>
<Popup show={show} className="custom-popup" overlay={false}>
<View className="popBox"></View>
<View style='height:200rpx'></View>
<Popup show={show} className='custom-popup' overlay={false}>
<View className='popBox'></View>
</Popup>
</Block>
);

@ -12,7 +12,7 @@ import { setMobile } from "../../store/features/userInfo";
import { WCUserLogin } from "../../utils/Interface";
import "./login.less";
import "./moisture_test_report.less";
class MoistureTestReport extends Component<any, any> {
constructor(props) {
@ -60,6 +60,63 @@ class MoistureTestReport extends Component<any, any> {
async initData() { }
getStatusData(level) {
var bgCssData = {
serious: 'background: #FFE3E3',
moderate: 'background: #FFEBDC',
slight: 'background: #F6FCFF',
normal: 'background: #F8F8F8',
sufficient: 'background: #F8F8F8'
}
var progressBgData = {
serious: 'background: #FF9393',
moderate: 'background: #FFC58C',
slight: 'background: #E5F3F9',
normal: 'background: #C2E5F3',
sufficient: 'background: #9FDBF3'
}
if (level >= 1 && level <= 2) {
return {
bg: bgCssData.serious,
title: '严重缺水',
gear: 1,
img: 'serious',
progressBg: progressBgData.serious
}
} else if (level >= 3 && level <= 4) {
return {
bg: bgCssData.moderate,
title: '中度缺水',
gear: 2,
img: 'moderate',
progressBg: progressBgData.moderate
}
} else if (level >= 5 && level <= 6) {
return {
bg: bgCssData.slight,
title: '轻微缺水',
gear: 3,
img: 'slight',
progressBg: progressBgData.slight
}
} else if (level >= 7 && level <= 8) {
return {
bg: bgCssData.normal,
title: '水分正常',
gear: 4,
img: 'normal',
progressBg: progressBgData.normal
}
} else if (level >= 9 && level <= 10) {
return {
bg: bgCssData.sufficient,
title: '水分充足',
gear: 5,
img: 'sufficient',
progressBg: progressBgData.sufficient
}
}
}
render() {
let { name, imgUrl, reportData, bgCssData, isClock, xinde, imglist, id, show } = this.state
@ -70,24 +127,29 @@ class MoistureTestReport extends Component<any, any> {
<View className='report_data'>
<View className='forehead moisture_block flex' style='{util.getStatusData(reportData.shuifenLevel.head).bg}'>
<Image className='moisture_img' src={require("/img/fr200/{util.getStatusData(reportData.shuifenLevel.head).img}.png")} mode='aspectFill'></Image>
<Image className='moisture_img' src={`/img/fr200/${this.getStatusData(reportData.shuifenLevel.head)}.img}.png`} mode='aspectFill'></Image>
<View className='pos_info'>
<View className='top'></View>
<View className='bottom'>{util.getStatusData(reportData.shuifenLevel.head).title}</View>
{/* <View className='bottom'>{this.getStatusData(7).title}</View> */}
<View className='bottom'></View>
</View>
</View>
<View className='left_face moisture_block flex' style='{util.getStatusData(reportData.shuifenLevel.leftFace).bg}'>
<Image className='moisture_img' src='/img/fr200/{util.getStatusData(reportData.shuifenLevel.leftFace).img}.png' mode='aspectFill'></Image>
<View className='pos_info'>
<View className='top'></View>
<View className='bottom'>{util.getStatusData(reportData.shuifenLevel.leftFace).title}</View>
{/* <View className='bottom'>{this.getStatusData(reportData.shuifenLevel.leftFace).title}</View> */}
<View className='bottom'></View>
</View>
</View>
<View className='right_face moisture_block flex' style='{util.getStatusData(reportData.shuifenLevel.rightFace).bg}'>
<Image className='moisture_img' src='/img/fr200/{util.getStatusData(reportData.shuifenLevel.rightFace).img}.png' mode='aspectFill'></Image>
<View className='pos_info'>
<View className='top'></View>
<View className='bottom'>{util.getStatusData(reportData.shuifenLevel.rightFace).title}</View>
{/* <View className='bottom'>{this.getStatusData(reportData.shuifenLevel.rightFace).title}</View> */}
<View className='bottom'></View>
</View>
</View>
<View className='example_box'>
@ -213,4 +275,4 @@ const mapDispatchToProps = (dispatch) => ({
dispatch(setMobile(value));
},
});
export default connect(mapStateToProps, mapDispatchToProps)(Login);
export default connect(mapStateToProps, mapDispatchToProps)(MoistureTestReport);

@ -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