qsj 2 years ago
commit b4c4d1669c

@ -4,7 +4,28 @@ module.exports = {
},
defineConstants: {
},
mini: {},
mini: {
debugReact: true,
webpackChain: (chain, webpack) => {
chain.merge({
plugin: {
install: {
plugin: require('terser-webpack-plugin'),
args: [
{
terserOptions: {
compress: true, // 默认使用terser压缩
// mangle: false,
keep_classnames: true, // 不改变class名称
keep_fnames: true, // 不改变函数名称
},
},
],
},
},
})
},
},
h5: {
/**
* WebpackChain

@ -35,26 +35,25 @@
],
"author": "",
"dependencies": {
"@antmjs/vantui": "^3.2.2",
"@antmjs/vantui": "^3.3.5",
"@flossom-npm/iot-translater": "^1.0.8",
"@flossom-npm/iot-translater-we100": "^1.1.1",
"@reduxjs/toolkit": "^2.0.1",
"@taroify/core": "^0.1.1-alpha.8",
"@tarojs/components": "3.6.19",
"@tarojs/helper": "3.6.19",
"@tarojs/plugin-framework-react": "3.6.19",
"@tarojs/components": "~3.6.24",
"@tarojs/helper": "~3.6.24",
"@tarojs/plugin-framework-react": "~3.6.24",
"@tarojs/plugin-html": "^3.6.20",
"@tarojs/plugin-platform-alipay": "3.6.19",
"@tarojs/plugin-platform-h5": "3.6.19",
"@tarojs/plugin-platform-jd": "3.6.19",
"@tarojs/plugin-platform-qq": "3.6.19",
"@tarojs/plugin-platform-swan": "3.6.19",
"@tarojs/plugin-platform-tt": "3.6.19",
"@tarojs/plugin-platform-weapp": "3.6.19",
"@tarojs/react": "3.6.19",
"@tarojs/runtime": "3.6.19",
"@tarojs/shared": "3.6.19",
"@tarojs/taro": "3.6.19",
"@tarojs/plugin-platform-alipay": "~3.6.24",
"@tarojs/plugin-platform-h5": "~3.6.24",
"@tarojs/plugin-platform-jd": "~3.6.24",
"@tarojs/plugin-platform-qq": "~3.6.24",
"@tarojs/plugin-platform-swan": "~3.6.24",
"@tarojs/plugin-platform-tt": "~3.6.24",
"@tarojs/plugin-platform-weapp": "~3.6.24",
"@tarojs/react": "~3.6.24",
"@tarojs/runtime": "~3.6.24",
"@tarojs/shared": "~3.6.24",
"@tarojs/taro": "~3.6.24",
"dayjs": "^1.11.10",
"echarts": "^5.5.0",
"lodash": "^4.17.15",
@ -68,19 +67,19 @@
"@babel/core": "^7.8.0",
"@babel/runtime": "^7.7.7",
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.5",
"@tarojs/cli": "3.6.19",
"@tarojs/taro-loader": "3.6.19",
"@tarojs/webpack5-runner": "3.6.19",
"@tarojs/cli": "~3.6.24",
"@tarojs/taro-loader": "~3.6.24",
"@tarojs/webpack5-runner": "~3.6.24",
"@types/node": "^18.15.11",
"@types/react": "^18.0.0",
"@types/webpack-env": "^1.13.6",
"@typescript-eslint/eslint-plugin": "^5.20.0",
"@typescript-eslint/parser": "^5.20.0",
"babel-plugin-import": "^1.13.8",
"babel-preset-taro": "3.6.19",
"babel-preset-taro": "3.6.24",
"cache-loader": "^4.1.0",
"eslint": "^8.12.0",
"eslint-config-taro": "3.6.19",
"eslint-config-taro": "~3.6.24",
"eslint-plugin-import": "^2.12.0",
"eslint-plugin-react": "^7.8.2",
"eslint-plugin-react-hooks": "^4.2.0",

@ -17,7 +17,6 @@ export default defineAppConfig({
"pages/instrument_manage/index",
"pages/instrument_detail/index",
"pages/instrumentClickinUpload/index",
"pages/iotCarePlan/iotCarePlan",
'pages/privacyPolicy/privacyPolicy',
'pages/userPolicy/userPolicy',
'pages/about/about',
@ -82,5 +81,13 @@ export default defineAppConfig({
navigationBarTextStyle: 'black',
// enablePullDownRefresh: true
},
requiredPrivateInfos: ["getLocation"]
requiredPrivateInfos: ["getLocation"],
subPackages: [
{
root: 'moduleIOT',
pages: [
"pages/iotCarePlan/iotCarePlan",
]
}
]
})

@ -36,14 +36,12 @@ import {
} from "@/utils/util";
// const log = require("@/utils/log");
import commandMap from "@/utils/commandMap";
import { bleCommandSamples } from "./test";
import { bleCommandSamples } from "./wl200";
import { DeviceToolKit as DeviceToolKitWE100 } from "@flossom-npm/iot-translater-we100";
const deviceToolKitInstanceWL200 = new DeviceToolKitWE100("WL200", "WL200");
deviceToolKitInstanceWL200.setDebug(true);
// const _deviceToolKitInstanceWL200 = new DeviceToolKitWE100("WE100", "WL200");
const deviceToolKitInstanceM01 = new DeviceToolKitWE100("WE100", "M01");
deviceToolKitInstanceM01.setDebug(true);
@ -695,6 +693,7 @@ class ConnectionBluetoot extends Component<any, any> {
? deviceToolKitInstanceWL200.toBleCommand(versionCommand as any)
: deviceToolKitInstanceM01.toBleCommand(versionCommand as any);
console.log(otaDeviceType, " value", value);
sendCommand({ value });
}
}

@ -99,6 +99,7 @@
// width: 100%;
// height: 100%;
overflow: hidden;
background-color: #eee;
}
.error-block {

@ -102,6 +102,7 @@ export default class DeviceConnectPopup extends Component<any, any> {
onClick={this.onClose}
></View>
{/* 非错误弹窗 */}
{!error && (
<View className={classnames("common-box device-connection-box")}>
<View
@ -110,7 +111,7 @@ export default class DeviceConnectPopup extends Component<any, any> {
{data.bluetoothConnectingTitle}
</View>
<View className="device-popup-content-box">
{this.isImage(data.bluetoothConnecting) ? (
{!this.isImage(data.bluetoothConnecting) ? (
<Video className="videos" src={data.bluetoothConnecting} />
) : (
<Image
@ -187,6 +188,7 @@ export default class DeviceConnectPopup extends Component<any, any> {
</View>
)}
{/* 错误与失败弹窗 */}
{error && (
<View className={classnames("common-box", "device-connection-box")}>
<View
@ -195,7 +197,15 @@ export default class DeviceConnectPopup extends Component<any, any> {
{data.bluetoothConnectFailTitle}
</View>
<View className="device-popup-content-box">
<Video className="videos" src={data.bluetoothConnectFail} />
{!this.isImage(data.bluetoothConnectFail) ? (
<Video className="videos" src={data.bluetoothConnectFail} />
) : (
<Image
className="images"
src={data.bluetoothConnectFail}
mode="aspectFill"
/>
)}
<View className="error-block">
<View className="tip1"></View>

@ -1,5 +1,10 @@
.site-popup-content-box {
margin: 0;
.absolutely-img {
width: 100%;
height: 600rpx;
background-color: #eee;
}
}
// .van-popup {
// background-color: transparent;

@ -100,18 +100,19 @@ export default class PopupInstrumentUploadTips extends Component<any, any> {
};
render() {
let { isShow, data, isLarge, title } = this.props;
let { isShow, data, isLarge, title, myClassName, zIndex } = this.props;
let { current } = this.state;
if (!zIndex) zIndex = 10001;
return (
<Block>
<PageMeta pageStyle={isShow ? "overflow: hidden;" : ""} />
<Popup
className={myClassName}
style="background-color: #fff;"
show={isShow}
closeOnClickOverlay={false}
round
overlayStyle="width: 100vw;padding: 0;"
overlayStyle={`width: 100vw;padding: 0;z-index: ${zIndex} !important`}
onClick={this.onClickStop}
>
<View
@ -125,12 +126,7 @@ export default class PopupInstrumentUploadTips extends Component<any, any> {
return (
current === index && (
<View className="absolutely" key={"swiper_" + index}>
<View
style={{
width: "100%",
height: "600rpx",
}}
>
<View className="absolutely-img">
<Image
className="cover"
src={item.file}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 804 B

@ -7,6 +7,7 @@
padding: 35rpx 25rpx 25rpx 35rpx;
box-sizing: border-box;
position: relative;
z-index: 0;
}
.box_background {
position: absolute;
@ -23,7 +24,7 @@
font-size: 18rpx;
color: #cccccc;
}
.full{
.full {
width: 24rpx;
height: 24rpx;
position: absolute;
@ -50,7 +51,6 @@
}
}
.time {
position: absolute;
bottom: 22rpx;
@ -61,9 +61,6 @@
}
}
page {
background: #f8f8f8;
background: #f3f3f3;
@ -88,11 +85,11 @@ page {
border-radius: 30rpx;
margin: 27rpx 30rpx 22rpx;
position: relative;
box-shadow: -2rpx 0 12rpx .5rpx rgba(129, 129, 129, 0.05);
box-shadow: -2rpx 0 12rpx 0.5rpx rgba(129, 129, 129, 0.05);
.img {
width: 690rpx;
height: 690rpx;
box-shadow: -2rpx 0 12rpx .5rpx rgba(129, 129, 129, 0.05);
box-shadow: -2rpx 0 12rpx 0.5rpx rgba(129, 129, 129, 0.05);
position: relative;
border-radius: 20rpx;
margin: auto;
@ -325,7 +322,7 @@ page {
}
}
.infobox1 .info1 .block .tip1,
.infobox1 .info1 .block .dang {
.infobox1 .info1 .block .dang {
font-size: 26rpx;
font-weight: 500;
color: #000000;
@ -401,7 +398,7 @@ page {
width: 100%;
height: 138rpx;
background: #ffffff;
box-shadow: 0rpx -3rpx 7rpx 1rpx rgba(173,191,207,0.21);
box-shadow: 0rpx -3rpx 7rpx 1rpx rgba(173, 191, 207, 0.21);
border-bottom: 15rpx solid #ffffff;
.line {
position: absolute;
@ -420,7 +417,7 @@ page {
height: 36rpx;
}
.disabled {
opacity: 0.5!important;
opacity: 0.5 !important;
}
.end_img {
width: 36rpx;
@ -527,7 +524,7 @@ page {
height: 100%;
border-radius: 20rpx;
overflow: hidden;
box-shadow: -2rpx 0 12rpx .5rpx rgba(129, 129, 129, 0.05);
box-shadow: -2rpx 0 12rpx 0.5rpx rgba(129, 129, 129, 0.05);
.block1 {
.block1_1 {
height: 100%;
@ -550,11 +547,11 @@ page {
display: inline-block;
height: 100%;
width: 0;
transition: all .3s;
transition: all 0.3s;
.block2_info {
width: 140rpx;
text-align: center;
box-shadow: -2rpx 0 12rpx .5rpx rgba(129, 129, 129, 0.05);
box-shadow: -2rpx 0 12rpx 0.5rpx rgba(129, 129, 129, 0.05);
height: calc(140rpx - 10rpx);
border-radius: 20rpx;
align-items: flex-end;
@ -576,7 +573,7 @@ page {
-o-filter: grayscale(100%);
filter: grayscale(100%);
filter: gray;
opacity: .5;
opacity: 0.5;
}
.block2_bg {
position: absolute;
@ -584,7 +581,7 @@ page {
left: 0;
right: 0;
bottom: 0;
opacity: .5;
opacity: 0.5;
}
.block2_info1 {
height: 100%;
@ -621,7 +618,7 @@ page {
background: #fff;
height: 162rpx;
border-radius: 20rpx;
box-shadow: -2rpx 0 12rpx .5rpx rgba(129, 129, 129, 0.05);
box-shadow: -2rpx 0 12rpx 0.5rpx rgba(129, 129, 129, 0.05);
.block1 {
padding: 0 16rpx;
}
@ -669,25 +666,25 @@ page {
}
}
.infobox3 .info1 .block1,
.infobox3 .info2 .block1 {
.infobox3 .info2 .block1 {
flex-direction: column;
display: inline-block;
height: 100%;
text-align: center;
}
.infobox3 .info1 .tip1,
.infobox3 .info2 .tip1 {
.infobox3 .info2 .tip1 {
color: #202020;
font-size: 22rpx;
font-weight: bold;
}
.infobox3 .info1 .tip2,
.infobox3 .info2 .tip2 {
.infobox3 .info2 .tip2 {
color: #202020;
font-size: 22rpx;
}
.infobox3 .info1 .quan1,
.infobox3 .info2 .quan1 {
.infobox3 .info2 .quan1 {
border-radius: 50%;
width: 30rpx;
height: 30rpx;
@ -698,7 +695,7 @@ page {
border: 4rpx solid #f1f1f1;
}
.infobox3 .info1 .quan1 .quan2,
.infobox3 .info2 .quan1 .quan2 {
.infobox3 .info2 .quan1 .quan2 {
position: absolute;
border-radius: 50%;
background: #000000;
@ -732,7 +729,7 @@ page {
.infobox4 {
height: 300rpx;
border-radius: 20rpx;
box-shadow: -2rpx 0 12rpx .5rpx rgba(129, 129, 129, 0.05);
box-shadow: -2rpx 0 12rpx 0.5rpx rgba(129, 129, 129, 0.05);
margin: 22rpx 20rpx;
background: #fff;
position: relative;
@ -1084,7 +1081,13 @@ ec-canvas {
}
}
.water_test {
padding: 22rpx 46rpx;
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;
@ -1118,6 +1121,7 @@ ec-canvas {
color: #000000;
margin-left: 14rpx;
padding-top: 12rpx;
letter-spacing: 2rpx;
}
}
.test_txt {
@ -1125,6 +1129,8 @@ ec-canvas {
font-weight: 500;
color: #999999;
padding-top: 48rpx;
line-height: 36rpx;
letter-spacing: 2rpx;
}
}
.testing {
@ -1158,7 +1164,7 @@ ec-canvas {
height: 228rpx;
background: #ffffff;
border-radius: 0rpx 0rpx 30rpx 30rpx;
padding: 51rpx 28rpx 0 39rpx;
padding: 51rpx 30rpx 0 36rpx;
box-sizing: border-box;
.progress_box {
width: 100%;
@ -1170,6 +1176,7 @@ ec-canvas {
color: #000000;
min-width: 200rpx;
margin-right: 60rpx;
letter-spacing: 2rpx;
}
}
.tips {
@ -1177,6 +1184,8 @@ ec-canvas {
font-weight: 500;
color: #999999;
margin-top: 45rpx;
line-height: 36rpx;
letter-spacing: 2rpx;
}
.progress_block {
flex: 1;
@ -1390,6 +1399,83 @@ image {
}
}
}
.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 {
@ -1428,9 +1514,9 @@ image {
}
}
.current-button {
background: #CCCC;
background: #cccc;
.level {
color: #CCCC;
color: #cccc;
}
}
.success_popup {

@ -0,0 +1,621 @@
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 stepIndex = 0;
const testIndex = 1;
const stepList = [
{
value: "Step1",
name: "额头",
finish: false,
},
{
value: "Step2",
name: "左脸颊",
finish: false,
},
{
value: "Step3",
name: "右脸颊",
finish: false,
},
];
const gearLevel = {
currentGear: null,
//现在工作的档位
currentGearMode: "forehead",
//现在工作模式
forehead: 5,
leftCheek: 5,
rightCheek: 5,
};
const echartsRef = useRef<EchartsHandle>(null);
const option: EChartOption = {
grid: {
// 让图表占满容器
top: "28rpx",
left: "18rpx",
right: "28rpx",
bottom: "17rpx",
},
legend: {
show: false,
zlevel: -1,
},
xAxis: {
// name: '',
// nameGap: 5,
// nameTextStyle: {
// color: '#e4e4e4',
// fontSize:7
// },
type: "category",
axisLine: {
//坐标轴轴线相关设置。数学上的x轴
show: true,
lineStyle: {
color: "#cccccc",
},
},
axisLabel: {
//坐标轴刻度标签的相关设置
color: "#cccccc",
fontSize: 8,
},
axisTick: {
show: false,
},
data: [
"00:01",
"00:02",
"00:03",
"00:04",
"00:05",
"00:06",
"00:07",
"00:08",
"00:09",
"00:10",
],
},
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,
},
},
visualMap: {
z: 1,
top: 0,
right: 0,
seriesIndex: 0,
show: false,
pieces: [
{
gt: 0,
lte: 1,
color: "#fff8c9",
},
{
gt: 1,
lte: 2,
color: "#fff0c6",
},
{
gt: 2,
lte: 3,
color: "#ffe5c3",
},
{
gt: 3,
lte: 4,
color: "#ffdbbf",
},
{
gt: 4,
lte: 5,
color: "#ffcfbb",
},
{
gt: 5,
lte: 6,
color: "#ffbab5",
},
{
gt: 6,
lte: 7,
color: "#ffb4b3",
},
{
gt: 7,
lte: 8,
color: "#ffb4b3",
},
],
outOfRange: {
color: "#ff8410",
},
},
series: [
{
data: [2, 3, 5, 3, 5, 6, 8, 5, 6, 4],
type: "line",
smooth: true,
z: 1,
areaStyle: {},
color: "red",
},
{
data: [2, 3, 5, 3, 5, 6, 8, 5, 6, 4],
type: "line",
smooth: true,
symbolSize: 5,
lineStyle: {
color: "#ff8410",
width: 1,
},
itemStyle: {
color: "#ff8410",
},
},
{
name: "a",
data: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
type: "bar",
barWidth: 12,
z: 2,
stack: "x",
visualMap: false,
itemStyle: {
color: "#ffcf56",
},
},
{
name: "b",
data: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
type: "bar",
z: 2,
stack: "x",
visualMap: false,
itemStyle: {
color: "#febb22",
},
},
{
name: "c",
data: [0, 1, 1, 1, 1, 1, 1, 1, 1, 1],
type: "bar",
z: 2,
stack: "x",
visualMap: false,
itemStyle: {
color: "#ffac28",
},
},
{
name: "d",
data: [0, 0, 1, 0, 1, 1, 1, 1, 1, 1],
type: "bar",
z: 2,
stack: "x",
visualMap: false,
itemStyle: {
color: "#ff8410",
},
},
{
name: "e",
data: [0, 0, 1, 0, 1, 1, 1, 1, 1, 0],
type: "bar",
z: 2,
stack: "x",
visualMap: false,
itemStyle: {
color: "#f85804",
},
},
{
name: "f",
data: [0, 0, 0, 0, 0, 1, 1, 0, 1, 0],
type: "bar",
z: 2,
stack: "x",
visualMap: false,
itemStyle: {
color: "#e02e14",
},
},
{
name: "h",
data: [0, 0, 0, 0, 0, 0, 1, 0, 0, 0],
type: "bar",
z: 2,
stack: "x",
visualMap: false,
itemStyle: {
color: "#b30016",
},
},
{
name: "i",
data: [0, 0, 0, 0, 0, 0, 1, 0, 0, 0],
type: "bar",
z: 2,
stack: "x",
visualMap: false,
itemStyle: {
color: "#750010",
},
},
],
};
const level = [8, 7, 6, 5, 4, 3, 2];
return (
<Block>
<View className="box">
<Echarts
echarts={echarts}
option={option}
ref={echartsRef}
// isPage={false}
// 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>
{level.map((item) => (
<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>
<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>
);
}
export default Index;

@ -64,7 +64,7 @@ function Index({
<Block>
<Image
className="btn-icon"
src={require("../../../../img/iot/start_nurse.png")}
src={require("@/img/iot/start_nurse.png")}
mode="aspectFill"
/>
<Text className="btn-text"></Text>
@ -73,7 +73,7 @@ function Index({
<Block>
<Image
className="btn-icon"
src={require("../../../../img/iot/pause_nurse.png")}
src={require("@/img/iot/pause_nurse.png")}
mode="aspectFill"
/>
<Text className="btn-text"></Text>
@ -91,7 +91,7 @@ function Index({
<Image
className="btn-icon"
style="color: #ccc"
src={require("../../../../img/iot/start_nurse.png")}
src={require("@/img/iot/start_nurse.png")}
mode="aspectFill"
/>
<Text className="btn-text" style="color: #ccc">
@ -103,7 +103,7 @@ function Index({
<Image
className="btn-icon"
style="color: #ccc"
src={require("../../../../img/iot/pause_nurse.png")}
src={require("@/img/iot/pause_nurse.png")}
mode="aspectFill"
/>
<Text className="btn-text" style="color: #ccc">
@ -117,7 +117,7 @@ function Index({
<View className="btn-item" onClick={onEndPlan}>
<Image
className="btn-icon"
src={require("../../../../img/iot/over_nurse.png")}
src={require("@/img/iot/over_nurse.png")}
mode="aspectFill"
/>
<Text className="btn-text"></Text>

@ -53,7 +53,7 @@ function Index({
<View className="title"></View>
<Image
className="icon"
src={require("../../../../img/iot/mode-switch.png")}
src={require("@/img/iot/mode-switch.png")}
/>
</View>
)}

@ -10,7 +10,7 @@ import React, {
useState,
} from "react";
import Echarts from "./components/Echart/index";
// import Echarts from "./components/Echart/index";
import {
Block,
View,
@ -54,7 +54,7 @@ import {
import {
deviceCommandSamples,
bleCommandSamples,
} from "@/components/bluetoot/connection/test";
} from "@/components/bluetoot/connection/wl200";
import { minSecToS, s_to_ms, s_to_hms, sleep } from "@/utils/util";
import { DeviceToolKit as DeviceToolKitWE100 } from "@flossom-npm/iot-translater-we100";
@ -206,8 +206,8 @@ class IotCarePlan extends Component<any, any> {
// 上一次护理记录未生成,是否继续连接设备
isShowReReadRecordConnect: false,
// 按钮是否可运行
isFooterBtnDisabled: false,
// 按钮是否可运行
isFooterBtnDisabled: true,
isFirstEntryMode: false, // 模式首次打开
};
}
@ -373,9 +373,9 @@ class IotCarePlan extends Component<any, any> {
ModeList: res.data.data,
});
setTimeout(() => {
this.modeCurrentFun(res.data.data[0]);
});
// setTimeout(() => {
// this.modeCurrentFun(res.data.data[0]);
// }, 100);
} else {
this.setState({ ModeList: res.data.data });
}
@ -418,6 +418,11 @@ class IotCarePlan extends Component<any, any> {
// isNotCheck为真时不进行校验直接切换
this.tempModeCurrent = data;
// 仅在未开始护理前,切换模式的时候提示模式弹窗
if (!this.state.isShowNurse) {
this.openStepTips();
}
// 如果按钮不可点击则报错,内部自带检查底部按钮函数
this.onEmitErrorTips();
if (!isNotCheck) {
@ -426,7 +431,6 @@ class IotCarePlan extends Component<any, any> {
}
let { isShowNurse } = this.state;
let currentServiceData = {
startSource: "",
stopSource: "",
@ -460,11 +464,10 @@ class IotCarePlan extends Component<any, any> {
if (isShowNurse) {
if (!this.footerIsDisabled()) {
this.stepNext(); // 如果切换模式,则不执行开始逻辑
return;
setTimeout(() => {
this.onNursingTap("switch");
}, 800);
}
setTimeout(() => {
this.onNursingTap("switch");
}, 800);
}
};
/** 设备运行中切换模式 */
@ -556,7 +559,14 @@ class IotCarePlan extends Component<any, any> {
// 如果检查通过,可运行,则执行下一步
if (!this.footerIsDisabled()) {
this.stepNext();
this.openStepTips(); // 仅在进入运行页的时候弹窗
setTimeout(() => {
this.onNursingTap();
// 倒计时弹窗: 倒计时完成后,自动开始,并判断弹窗
let downNum = CountDownTime[this.state.ActiveModeItem.modeType] || 3;
this.showCountdownFun(downNum, () => {});
}, 500);
return;
}
// 如果检查失败,则报错
@ -568,19 +578,21 @@ class IotCarePlan extends Component<any, any> {
* @description isCabinMode 0. 1.
*/
onEmitErrorTips = async () => {
let { ActiveModeItem } = this.state;
setTimeout(() => {
let { ActiveModeItem } = this.state;
// 按钮不可点击时,提示报错
let isDisabled = this.footerIsDisabled();
if (isDisabled) {
if (ActiveModeItem.isCabinMode === 0) {
this.showTips("检测到面罩与舱体仍在连接中,该模式需要分离面罩和舱体");
} else {
this.showTips(
"检测到面罩与舱体未连接成功,请确认面罩是否和舱体连接并接通舱体电源"
);
// 按钮不可点击时,提示报错
let isDisabled = this.footerIsDisabled();
if (isDisabled) {
if (ActiveModeItem.isCabinMode === 0) {
this.showTips("检测到面罩与舱体仍在连接中,该模式需要分离面罩和舱体");
} else {
this.showTips(
"检测到面罩与舱体未连接成功,请确认面罩是否和舱体连接并接通舱体电源"
);
}
}
}
});
};
// 绘制能量图
@ -697,6 +709,9 @@ class IotCarePlan extends Component<any, any> {
this.onEmitErrorTips();
}, 500);
}
setTimeout(() => {
this.footerIsDisabled();
}, 100);
break;
default:
console.log("监听到到设备连接状态改变 this.footerIsDisabled()");
@ -715,6 +730,9 @@ class IotCarePlan extends Component<any, any> {
this.setState({
isStandStatus: isStandDevice,
});
setTimeout(() => {
this.footerIsDisabled();
});
// 连上面罩后, 获取仪器记录, 与缓存信息对比
if (!this.hadGotInstrumentHistoryData) {
@ -894,18 +912,18 @@ class IotCarePlan extends Component<any, any> {
});
/**
* 500
* 600
*/
const querySubDeviceArrayBuffer = deviceToolKitInstance.toBleCommand({
...bleCommandSamples.querySubDevice,
queryType: "WL200",
} as any);
setTimeout(() => {
console.log("发送查询指令");
console.log("发送查询附属设备指令 querySubDeviceArrayBuffer");
sendCommand({
value: querySubDeviceArrayBuffer,
});
}, 500);
}, 600);
/**
* 500
@ -914,7 +932,7 @@ class IotCarePlan extends Component<any, any> {
bleCommandSamples.queryDeviceStatus as any
);
setTimeout(() => {
console.log("发送查询设备指令");
console.log("发送查询设备电量指令");
sendCommand({
value: queryDeviceArrayBuffer,
});
@ -1296,11 +1314,11 @@ class IotCarePlan extends Component<any, any> {
const { ActiveModeItem, isStandStatus, facialMaskConnectStatus } =
this.state;
if (isStandStatus === 1 && ActiveModeItem.isCabinMode === 0) {
if (isStandStatus === true && ActiveModeItem.isCabinMode === 0) {
console.log("已连接舱体,只可选择舱体模式");
return;
}
if (isStandStatus === 0 && ActiveModeItem.isCabinMode === 1) {
if (isStandStatus === false && ActiveModeItem.isCabinMode === 1) {
console.log("未连接舱体!");
return;
}
@ -1450,7 +1468,7 @@ class IotCarePlan extends Component<any, any> {
// 仪器缓存模式,判断是否存在于现有模式中
let recordModeItem = ModeList.find((item) => {
return item.id == WL200NursingHistory.id;
return item.id == WL200NursingHistory.currentServiceData.id;
});
if (!WL200NursingHistory || !recordModeItem) {
console.log("仪器有数据, 但是缓存没有数据, 忽略");
@ -1820,8 +1838,11 @@ class IotCarePlan extends Component<any, any> {
pairingChange = () => {
this.setState({
isConnectShow: false,
isShowNurse: true,
});
setTimeout(() => {
this.onNursingTap("switch");
});
this.onNursingTap();
};
connectionClose = () => {
this.setState({
@ -1894,22 +1915,17 @@ class IotCarePlan extends Component<any, any> {
// 如果舱体状态和模式类型不相等,则禁用
let isFooterBtnDisabled = false;
if (isStandStatus) {
if (!isCanClick) {
isFooterBtnDisabled = true;
}
} else {
if (!isCanClick) {
isFooterBtnDisabled = true;
}
if (!isCanClick) {
isFooterBtnDisabled = true;
}
console.log("isCanClick", isCanClick);
console.log("isFooterBtnDisabled", isFooterBtnDisabled);
// 仅在值变化时更新state
if (isFooterBtnDisabled !== this.state.isFooterBtnDisabled) {
this.setState({
isFooterBtnDisabled: isFooterBtnDisabled,
});
}
// if (isFooterBtnDisabled !== this.state.isFooterBtnDisabled) {
this.setState({
isFooterBtnDisabled: isFooterBtnDisabled,
});
// }
return isFooterBtnDisabled; // 数据更新有延迟,返回用于判断
};
@ -1967,6 +1983,8 @@ class IotCarePlan extends Component<any, any> {
<View catchMove>
<PopupInstrumentUploadTips
isShow={isFirstTipShow}
zIndex={10020}
myClassName="level-up"
title="打卡介绍"
data={nurseInfo}
close={this.onTipShowClose}
@ -2123,7 +2141,7 @@ class IotCarePlan extends Component<any, any> {
<View className="msg-tips">
<Image
className="msg-tips-img"
src={require("../../img/tips.png")}
src={require("@/img/tips.png")}
/>
<View className="msg-tips-content">{errorTips}</View>
</View>

@ -256,7 +256,7 @@ class Index extends Component<any, any> {
}
// 页面初始化
async initData() {
initData = async () => {
let token = getStorageSync("token");
if (!token) {
// 如果token过期先登录登录完成后自动初始化
@ -265,7 +265,7 @@ class Index extends Component<any, any> {
// token没过期直接请求数据
this.initPageData();
}
}
};
initPageData = async () => {
const mobile = Taro.getStorageSync("mobile");
@ -293,7 +293,9 @@ class Index extends Component<any, any> {
await this.unbindingInstrumentInfoList(); // 获取未绑定设备
await this.getInstrumentInfoBySerial(); // 扫码序列号查询:注册后才调用,因为扫码未注册直接跳转注册页
console.log("this.props.isShowIndexFlag", this.props.isShowIndexFlag);
if (!this.props.isShowIndexFlag) {
this.initDeviceNursingHistory();
this.GetSitePopupList();
// 全局内存缓存,仅初次进入首页运行
this.props.setIndexFlag(true);
@ -793,13 +795,13 @@ class Index extends Component<any, any> {
*/
pairingChange = (e) => {
console.log("===epairingChange===》", e);
go("/pages/iotCarePlan/iotCarePlan"); // 画页面直接跳转
go("/moduleIOT/pages/iotCarePlan/iotCarePlan"); // 画页面直接跳转
this.connectionClose();
};
async goIot() {
go("/pages/iotCarePlan/iotCarePlan"); // 画页面直接跳转
go("/moduleIOT/pages/iotCarePlan/iotCarePlan"); // 画页面直接跳转
// return;
}
@ -905,7 +907,9 @@ class Index extends Component<any, any> {
isShowReConnectDeviceRecordWL200: false,
});
// this.goNursing()
let item = getStorageSync("instrument_detail");
this.setState({ connectInstrument: item });
setTimeout(() => this.bindBlockLeft());
};
// 扫码绑定必须先完成注册弹窗:确定以后删除扫码缓存,防止死循环
@ -1005,8 +1009,8 @@ class Index extends Component<any, any> {
<View></View>
</Block>
}
cancelButtonText="暂不绑定"
confirmButtonText="确认"
cancelButtonText="取消"
confirmButtonText="连接设备"
textAlgin="center"
close={this.closeReConnectDeviceRecordWL200}
confirm={this.confirmReConnectDeviceRecordWL200}

@ -500,6 +500,7 @@ export default class Instrument extends Component<any, any> {
<Video
className="banner_item"
autoplay
loop
objectFit="cover"
enablePlayGesture
showFullscreenBtn={false}

@ -187,7 +187,7 @@ class Intro extends Component<any, any> {
*/
pairingChange = (e) => {
console.log("===epairingChange===》", e);
go("/pages/iotCarePlan/iotCarePlan"); // 画页面直接跳转
go("/moduleIOT/pages/iotCarePlan/iotCarePlan"); // 画页面直接跳转
setTimeout(() => {
this.connectionClose();
@ -195,7 +195,7 @@ class Intro extends Component<any, any> {
};
async goIot() {
go("/pages/iotCarePlan/iotCarePlan"); // 画页面直接跳转
go("/moduleIOT/pages/iotCarePlan/iotCarePlan"); // 画页面直接跳转
setTimeout(() => {
this.connectionClose();
}, 100);
@ -300,6 +300,10 @@ class Intro extends Component<any, any> {
this.setState({
isShowReConnectDeviceRecordWL200: false,
});
let item = getStorageSync("instrument_detail");
this.setState({ connectInstrument: item });
setTimeout(() => this.bindBlockLeft());
};
render() {
@ -354,8 +358,8 @@ class Intro extends Component<any, any> {
<View></View>
</Block>
}
cancelButtonText="暂不绑定"
confirmButtonText="确认"
cancelButtonText="取消"
confirmButtonText="连接设备"
textAlgin="center"
close={this.closeReConnectDeviceRecordWL200}
confirm={this.confirmReConnectDeviceRecordWL200}

@ -1,569 +0,0 @@
import Taro from '@tarojs/taro';
import classnames from 'classnames';
import { Block, View, Image, Text } 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 stepIndex = 0
const testIndex = 1
const stepList = [
{
value: 'Step1',
name: '额头',
finish: false,
},
{
value: 'Step2',
name: '左脸颊',
finish: false,
},
{
value: 'Step3',
name: '右脸颊',
finish: false,
},
]
const gearLevel = {
currentGear: null,
//现在工作的档位
currentGearMode: 'forehead',
//现在工作模式
forehead: 5,
leftCheek: 5,
rightCheek: 5,
}
const echartsRef = useRef<EchartsHandle>(null)
const option: EChartOption = {
grid: { // 让图表占满容器
top: '28rpx',
left: '18rpx',
right: '28rpx',
bottom: '17rpx'
},
xAxis: {
// name: '',
// nameGap: 5,
// nameTextStyle: {
// color: '#e4e4e4',
// fontSize:7
// },
type: 'category',
axisLine: {
//坐标轴轴线相关设置。数学上的x轴
show: true,
lineStyle: {
color: '#cccccc'
}
},
axisLabel: {
//坐标轴刻度标签的相关设置
color: '#cccccc',
fontSize: 8
},
axisTick: {
show: false
},
data: [
'00:01',
'00:02',
'00:03',
'00:04',
'00:05',
'00:06',
'00:07',
'00:08',
'00:09',
'00:10'
]
},
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
}
},
visualMap: {
z: 1,
top: 0,
right: 0,
seriesIndex: 0,
show: false,
pieces: [
{
gt: 0,
lte: 1,
color: '#fff8c9'
},
{
gt: 1,
lte: 2,
color: '#fff0c6'
},
{
gt: 2,
lte: 3,
color: '#ffe5c3'
},
{
gt: 3,
lte: 4,
color: '#ffdbbf'
},
{
gt: 4,
lte: 5,
color: '#ffcfbb'
},
{
gt: 5,
lte: 6,
color: '#ffbab5'
},
{
gt: 6,
lte: 7,
color: '#ffb4b3'
},
{
gt: 7,
lte: 8,
color: '#ffb4b3'
}
],
outOfRange: {
color: '#ff8410'
}
},
series: [
{
data: [2, 3, 5, 3, 5, 6, 8, 5, 6, 4],
type: 'line',
smooth: true,
z: 1,
areaStyle: {},
color: 'red'
},
{
data: [2, 3, 5, 3, 5, 6, 8, 5, 6, 4],
type: 'line',
smooth: true,
symbolSize: 5,
lineStyle: {
color: '#ff8410',
width: 1
},
itemStyle: {
color: '#ff8410'
}
},
{
name: 'a',
data: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
type: 'bar',
barWidth: 12,
z: 2,
stack: 'x',
visualMap: false,
itemStyle: {
color: '#ffcf56'
}
},
{
name: 'b',
data: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
type: 'bar',
z: 2,
stack: 'x',
visualMap: false,
itemStyle: {
color: '#febb22'
}
},
{
name: 'c',
data: [0, 1, 1, 1, 1, 1, 1, 1, 1, 1],
type: 'bar',
z: 2,
stack: 'x',
visualMap: false,
itemStyle: {
color: '#ffac28'
}
},
{
name: 'd',
data: [0, 0, 1, 0, 1, 1, 1, 1, 1, 1],
type: 'bar',
z: 2,
stack: 'x',
visualMap: false,
itemStyle: {
color: '#ff8410'
}
},
{
name: 'e',
data: [0, 0, 1, 0, 1, 1, 1, 1, 1, 0],
type: 'bar',
z: 2,
stack: 'x',
visualMap: false,
itemStyle: {
color: '#f85804'
}
},
{
name: 'f',
data: [0, 0, 0, 0, 0, 1, 1, 0, 1, 0],
type: 'bar',
z: 2,
stack: 'x',
visualMap: false,
itemStyle: {
color: '#e02e14'
}
},
{
name: 'h',
data: [0, 0, 0, 0, 0, 0, 1, 0, 0, 0],
type: 'bar',
z: 2,
stack: 'x',
visualMap: false,
itemStyle: {
color: '#b30016'
}
},
{
name: 'i',
data: [0, 0, 0, 0, 0, 0, 1, 0, 0, 0],
type: 'bar',
z: 2,
stack: 'x',
visualMap: false,
itemStyle: {
color: '#750010'
}
}
]
}
const level = [8, 7, 6, 5, 4, 3, 2]
return (
<Block>
<View className='box' >
<Echarts
echarts={echarts}
option={option}
ref={echartsRef}
// isPage={false}
// 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>
{
level.map(item => (
<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>
<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: '6.75rem',
}}
percentage='80'
strokeWidth='6'
></Progress>
{stepList[stepIndex].finish && 80 >= 99 ? (
<Image
className='finish_img'
src={require('@/img/full-scran.png')}
mode='aspectFill'
></Image>
) : (
<Image
className='finish_img'
src={require('@/img/full-scran.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>
</Block>
</Block>
);
}
export default Index;

@ -0,0 +1,571 @@
page {
background: #F8F8F8;
}
.moisture_test_report {
padding: 0 30rpx 190rpx;
}
.moisture_test_report .time {
font-size: 36rpx;
font-weight: 500;
color: #000000;
line-height: 1;
padding: 38rpx 0;
}
.report_data {
position: relative;
width: 100%;
height: 850rpx;
background: #FFFFFF;
border-radius: 30rpx;
}
.report_data .moisture_block {
width: 160rpx;
height: 80rpx;
border-radius: 20rpx;
padding: 14rpx;
box-sizing: border-box;
}
.report_data .moisture_img {
width: 50rpx;
height: 50rpx;
border-radius: 50%;
}
.report_data .forehead {
position: absolute;
top: 52rpx;
left: 28rpx;
/*background: #FFEBDC;*/
}
.report_data .left_face {
position: absolute;
top: 172rpx;
left: 28rpx;
/*background: #FFE3E3;*/
}
.report_data .right_face {
position: absolute;
top: 172rpx;
right: 41rpx;
/*background: #F8F8F8;*/
}
.report_data .pos_info {
margin-left: 7rpx;
}
.report_data .pos_info .top {
font-size: 20rpx;
font-weight: 500;
color: #000000;
line-height: 1;
}
.report_data .pos_info .bottom {
font-size: 18rpx;
font-weight: 500;
color: #999999;
line-height: 1;
margin-top: 11rpx;
}
.report_data .example_box {
position: relative;
width: 100%;
height: 309rpx;
/*background: #ff6700;*/
}
.report_data .example_box image {
position: absolute;
top: 79rpx;
left: 50%;
transform: translateX(-50%);
width: 230rpx;
height: 230rpx;
border-radius: 50%;
}
.report_data .example_box .line1 {
position: absolute;
top: 120rpx;
left: 180rpx;
width: 170rpx;
height: 1rpx;
transform: rotate(17deg);
background: #D0D4DF;
}
.report_data .example_box .line2 {
position: absolute;
top: 211rpx;
left: 185rpx;
width: 135rpx;
height: 1rpx;
background: #D0D4DF;
}
.report_data .example_box .line3 {
position: absolute;
top: 209rpx;
right: 200rpx;
width: 106rpx;
height: 1rpx;
background: #D0D4DF;
}
.moisture_level_info .level_info {
padding: 36rpx 38rpx 0 33rpx;
}
.moisture_level_info .level_info .items {
padding: 8rpx 0;
}
.level_info .pos_name {
min-width: 83rpx;
font-size: 28rpx;
font-weight: 500;
color: #000000;
}
.level_info .progress {
overflow: hidden;
position: relative;
flex: 1;
height: 12rpx;
border-radius: 6rpx;
background: #F8F8F8;
margin: 0 51rpx 0 45rpx;
}
.level_info .progress_width {
position: absolute;
top: 0;
left: 0;
height: 100%;
}
.level_info .forehead_progress {
background: #FFC58C;
width: 30%;
}
.level_info .left_face_progress {
background: #FF9393;
width: 20%;
}
.level_info .right_face_progress {
background: #C2E5F3;
width: 70%;
}
.level_info .level {
font-size: 26rpx;
font-weight: 500;
color: #666666;
}
.moisture_level {
margin-top: 34rpx;
}
.moisture_level .level_txt {
font-size: 26rpx;
font-weight: 500;
color: #000000;
line-height: 1;
}
.moisture_level .level_txt .txt {
margin-left: 31rpx;
}
.circle {
width: 14rpx;
height: 14rpx;
background: #C2E5F3;
border-radius: 50%;
}
.serious {
background: #FF9393;
}
.moderate {
background: #FFC58C;
}
.slight {
background: #E5F3F9;
}
.normal {
background: #C2E5F3;
}
.sufficient {
background: #9FDBF3;
}
.level_list {
padding: 0 33rpx;
flex-wrap: wrap;
margin-top: 40rpx;
}
.level_list .txt {
font-size: 24rpx;
font-weight: 500;
color: #999999;
margin-left: 29rpx;
}
.level_list .items {
width: 50%;
padding: 7rpx 0;
}
.moisture_level .pour {
padding: 0 32rpx;
font-size: 24rpx;
font-weight: 500;
color: #999999;
line-height: 1;
margin-top: 36rpx;
}
.report_chart {
width: 100%;
height: 500rpx;
background: #FFFFFF;
border-radius: 30rpx;
margin: 20rpx 0;
}
.report_chart .chart_title {
padding: 41rpx 37rpx 0;
}
.common_title {
font-size: 28rpx;
font-weight: bold;
color: #000000;
}
.gear_recommend {
width: 100%;
height: 358rpx;
background: #FFFFFF;
border-radius: 30rpx;
}
.container {
width: 100%;
/*height: 100%;*/
height: 460rpx;
}
ec-canvas {
width: 100%;
height: 100%;
}
.gear_recommend {
padding: 0 39rpx;
box-sizing: border-box;
}
.gear_recommend .gear_header {
padding: 29rpx 0rpx 38rpx;
}
.gear_recommend .gear_header .gear_title {
padding-left: 2rpx;
}
.gear_header .gear_btn {
height: 60rpx;
line-height: 60rpx;
background: #000000;
border-radius: 30rpx;
padding: 0 29rpx;
font-size: 26rpx;
font-weight: 500;
color: #FFFFFF;
}
.gear_content .left_content {
text-align: center;
}
.gear_content .left_content .banner_img {
width: 140rpx;
height: 140rpx;
border-radius: 20rpx;
}
.gear_content .left_content .type {
font-size: 26rpx;
font-weight: 500;
color: #000000;
line-height: 1;
margin-top: 25rpx;
}
.gear_content .right_content {
flex: 1;
height: 190rpx;
background: #f8f8f8;
border-radius: 30rpx;
margin-left: 34rpx;
}
.right_content .gear_list {
width: 100%;
}
.right_content .gear_list .items {
flex-direction: column;
flex: 1;
}
.right_content .gear_list .items .gear_img {
width: 59rpx;
height: 57rpx;
}
.right_content .gear_list .items .name {
font-size: 26rpx;
font-weight: 500;
color: #000000;
line-height: 1;
padding: 26rpx 0 12rpx;
}
.right_content .gear_list .items .level {
font-size: 24rpx;
font-weight: 500;
color: #666666;
line-height: 1;
}
.go_clock_in {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
height: 153rpx;
background: #ffffff;
padding: 0 30rpx;
box-sizing: border-box;
box-shadow: 0rpx -3rpx 7rpx 1rpx rgba(173,191,207,0.21);
border-bottom: 21rpx solid #ffffff;
}
.go_clock_in image {
width: 10rpx;
height: 20rpx;
margin-left: 15rpx;
}
.go_clock_in .jump_box {
margin: 0 14rpx 0 49rpx;
/*box-sizing: border-box;*/
}
.go_clock_btn {
flex: 1;
height: 90rpx;
line-height: 90rpx;
background: #000000;
border-radius: 45rpx;
text-align: center;
font-size: 32rpx;
font-weight: bold;
color: #FFFFFF;
}
.jump_box .txt {
font-size: 32rpx;
font-weight: bold;
color: #000000;
}
.popbox {
position: relative;
width: 670rpx;
height: 840rpx;
border-radius: 30rpx;
background: #FFF;
}
.popbox .title {
font-weight: bold;
text-align: center;
font-size: 36rpx;
color: #030000;
padding-top: 39rpx;
}
.popbox_text {
font-size: 28rpx;
font-weight: 500;
color: #000;
text-align: center;
margin-top: 64rpx;
}
.popbox_text text {
font-weight: bold;
font-size: 36rpx;
}
.popbox .info1 {
border-bottom: 1rpx solid #D8D8D8;
padding: 16rpx 0;
margin: 0 24rpx;
text-align: center;
}
.popbox .info1 .tip1 {
color: #000;
font-size: 26rpx;
}
.popbox .info1 .tip2 {
color: #E9D3AE;
font-size: 32rpx;
}
.popbox .info2 {
padding: 16rpx 0 0;
}
.popbox .info2 .left {}
.popbox .info2 .left .tip1 {
color: #000;
font-size: 26rpx;
font-weight: bold;
}
.popbox .info2 .switch {
position: relative;
top: 4rpx;
margin-left: 12rpx;
}
.popbox .info3 {
margin: 59rpx 30rpx 37rpx;
}
.popbox .info3 .imgbox {
}
.popbox .info3 .imgbox .img {
position: relative;
width: 180rpx;
height: 180rpx;
border: 1px solid #DDDDDD;
border-radius: 20rpx;
background: #FFF;
overflow: hidden;
margin-right: 18rpx;
}
.popbox .info3 .imgbox .img .item_img {
width: 180rpx;
height: 180rpx;
}
.popbox .info3 .imgbox .img:nth-child(n+3) {
margin-right: 0;
}
.popbox .info3 .imgbox .img2 {
width: 180rpx;
height: 180rpx;
border: 1px solid #DDDDDD;
border-radius: 20rpx;
background: #FFF;
}
.popbox .info3 .imgbox .img2 image {
width: 70rpx;
}
.popbox .info3 .imgbox .img .close {
width: 28rpx;
height: 28rpx;
position: absolute;
z-index: 9;
right: 4rpx;
top: 4rpx;
border-radius: 50%;
background: rgba(0, 0, 0, .4);
}
.popbox .info4 {
width: 610rpx;
height: 186rpx;
background: #FFFFFF;
border: 1px solid #DDDDDD;
border-radius: 3rpx;
position: relative;
margin: 0 30rpx;
overflow: hidden;
padding: 22rpx 30rpx 50rpx;
box-sizing: border-box;
}
.popbox .info4 .content {
/*padding: 14rpx;*/
width: 100%;
height: 100%;
font-size: 28rpx;
font-weight: 500;
color: #CCCCCC;
}
.popbox .info4 .content textarea {
color: #CCCCCC;
font-size: 28rpx;
width: 100%;
height: 100%;
}
.popbox .info4 .tip {
position: absolute;
right: 14rpx;
color: #CCCCCC;
font-size: 22rpx;
bottom: 24rpx;
}
.popbox .popbtnbox {
position: absolute;
bottom: 54rpx;
left: 0;
right: 0;
}
.popbox .popbtnbox .btn1 {
flex-shrink: 0;
line-height: 90rpx;
text-align: center;
font-size: 30rpx;
width: 270rpx;
height: 90rpx;
background: #000;
border-radius: 45rpx;
color: #fff;
}

@ -0,0 +1,216 @@
import { Block, View, Text, Image, Input, Button } from "@tarojs/components";
import { Component, PropsWithChildren, useEffect, useState } from "react";
import "taro-ui/dist/style/components/button.scss"; // 按需引入
import Taro from "@tarojs/taro";
// 引入 Swiper, SwiperItem 组件
/*** redux ***/
import { connect } from "react-redux";
import { setMobile } from "../../store/features/userInfo";
/*** redux end ***/
import { WCUserLogin } from "../../utils/Interface";
import "./login.less";
class MoistureTestReport extends Component<any, any> {
constructor(props) {
super(props);
this.state = {
name: "重新登录",
imgUrl: '',
reportData: {
curDate: '',
shuifenLevel: {
head: 2,
leftFace: 3,
rightFace: 7
},
shuifenList: [],
shuifenGear: {
head: 0,
leftFace: 0,
rightFace: 0
}
},
bgCssData: {
serious: 'background: #FFE3E3',
moderate: 'background: #FFEBDC',
slight: 'background: #F6FCFF',
normal: 'background: #F8F8F8',
sufficient: 'background: #F8F8F8'
},
isClock: false,
xinde: '',
imglist: [],
id: 0,
show: false
};
}
async onLoad() { }
componentDidMount() { }
componentWillUnmount() { }
componentDidShow() { }
componentDidHide() { }
async initData() { }
render() {
let { name, imgUrl, reportData, bgCssData, isClock, xinde, imglist, id, show } = this.state
return (
<Block>
<View className='moisture_test_report'>
<View className='time'>{reportData.curDate || ''}</View>
<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>
<View className='pos_info'>
<View className='top'></View>
<View className='bottom'>{util.getStatusData(reportData.shuifenLevel.head).title}</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>
</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>
</View>
<View className='example_box'>
<Image className='banner_img' src='/img/fr200/shuifen.png' mode='aspectFill'></Image>
<View className='line1'></View>
<View className='line2'></View>
<View className='line3'></View>
</View>
<View className='moisture_level_info'>
<View className='level_info'>
<View className='items flex aitems'>
<View className='pos_name'></View>
<View className='progress'>
<View className='progress_width' style='width: {reportData.shuifenLevel.head * 10}%;{util.getStatusData(reportData.shuifenLevel.head).progressBg}'></View>
</View>
<View className='level'>{reportData.shuifenLevel.head}</View>
</View>
<View className='items flex aitems'>
<View className='pos_name'></View>
<View className='progress'>
<View className='progress_width left_face_progress' style='width: {reportData.shuifenLevel.leftFace * 10}%;{util.getStatusData(reportData.shuifenLevel.leftFace).progressBg}'></View>
</View>
<View className='level'>{reportData.shuifenLevel.leftFace}</View>
</View>
<View className='items flex aitems'>
<View className='pos_name'></View>
<View className='progress'>
<View className='progress_width right_face_progress' style='width: {reportData.shuifenLevel.rightFace * 10}%;{util.getStatusData(reportData.shuifenLevel.rightFace).progressBg}'></View>
</View>
<View className='level'>{reportData.shuifenLevel.rightFace}</View>
</View>
</View>
<View className='moisture_level'>
<View className='level_txt flex aitems jcenter'>
<View className='circle normal'></View>
<View className='txt'></View>
</View>
<View className='level_list flex'>
<View className='items flex aitems'>
<View className='circle serious'></View>
<View className='txt'>1-2</View>
</View>
<View className='items flex aitems'>
<View className='circle moderate'></View>
<View className='txt'>3-4</View>
</View>
<View className='items flex aitems'>
<View className='circle slight'></View>
<View className='txt'>5-6</View>
</View>
<View className='items flex aitems'>
<View className='circle normal'></View>
<View className='txt'>7-8</View>
</View>
<View className='items flex aitems'>
<View className='circle sufficient'></View>
<View className='txt'>9-10</View>
</View>
</View>
<View className='pour'></View>
</View>
</View>
</View>
<View className='report_chart'>
<View className='chart_title common_title'></View>
<View className='container'>
{/* <ec-canvas id='mychart' style='width: 100%;height: 100%' canvas-id='mychart-line' ec='{ ec }'></ec-canvas> */}
</View>
</View>
<View className='gear_recommend'>
<View className='gear_header flex aitems sb'>
<View className='gear_title common_title'></View>
<View className='gear_btn'></View>
</View>
<View className='gear_content flex aitems sb'>
<View className='left_content'>
<Image className='banner_img' src='/img/fr200/mian-mo.png' mode='aspectFill'></Image>
<View className='type'></View>
</View>
<View className='right_content flex aitems'>
<View className='gear_list flex aitems sa'>
<View className='items flex aitems jcenter'>
<Image className='gear_img' src='/img/fr200/{util.getStatusData(reportData.shuifenGear.head).gear}.png' mode='aspectFill'></Image>
<View className='name'></View>
<View className='level'>{reportData.shuifenGear.head}</View>
</View>
<View className='items flex aitems jcenter'>
<Image className='gear_img' src='/img/fr200/{util.getStatusData(reportData.shuifenGear.leftFace).gear}.png' mode='aspectFill'></Image>
<View className='name'></View>
<View className='level'>{reportData.shuifenGear.leftFace}</View>
</View>
<View className='items flex aitems jcenter'>
<Image className='gear_img' src='/img/fr200/{util.getStatusData(reportData.shuifenGear.rightFace).gear}.png' mode='aspectFill'></Image>
<View className='name'></View>
<View className='level'>{reportData.shuifenGear.rightFace}</View>
</View>
</View>
</View>
</View>
</View>
</View>
<View className='go_clock_in flex sb aitems' >
<View className='go_clock_btn'></View>
<View className='jump_box flex aitems'>
<View className='txt'></View>
<Image src='/img/fr200/right.png' mode='aspectFill'></Image>
</View>
</View>
</Block>
);
}
}
const mapStateToProps = (state) => ({
mobile: state.userInfo.mobile,
});
const mapDispatchToProps = (dispatch) => ({
setMobile(value) {
dispatch(setMobile(value));
},
});
export default connect(mapStateToProps, mapDispatchToProps)(Login);
Loading…
Cancel
Save