From 8f043948c8e56f633b1d85f6bb8ec6669c5e2d6d Mon Sep 17 00:00:00 2001
From: rongweikang <1174906669@qq.com>
Date: Wed, 27 Mar 2024 15:07:32 +0800
Subject: [PATCH 1/7] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=A0=B7=E5=BC=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../iotCarePlan/components/EchartFullScean/index.tsx | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/src/moduleIOT/pages/iotCarePlan/components/EchartFullScean/index.tsx b/src/moduleIOT/pages/iotCarePlan/components/EchartFullScean/index.tsx
index 8c7a4c6..6499b44 100644
--- a/src/moduleIOT/pages/iotCarePlan/components/EchartFullScean/index.tsx
+++ b/src/moduleIOT/pages/iotCarePlan/components/EchartFullScean/index.tsx
@@ -25,7 +25,7 @@ function Index({ series, full }: Props) {
top: "32rpx",
left: "48rpx",
right: "86rpx",
- bottom: "68rpx",
+ bottom: "38rpx",
},
// legend: {
// itemStyle: {
@@ -162,8 +162,6 @@ function Index({ series, full }: Props) {
}, [])
const cancelFull = useCallback((res) => {
- console.log(1111);
-
full()
}, [])
@@ -182,16 +180,17 @@ function Index({ series, full }: Props) {
-
+
实时能量
{level.map((item) => (
From 48530fe7b0d3b3cb0e8317e5a67068203008d45b Mon Sep 17 00:00:00 2001
From: rongweikang <1174906669@qq.com>
Date: Wed, 27 Mar 2024 15:07:40 +0800
Subject: [PATCH 2/7] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=85=8D=E7=BD=AE?=
=?UTF-8?q?=E6=96=87=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/moduleIOT/pages/iotCarePlan/FR200.config.ts | 4 ++++
1 file changed, 4 insertions(+)
create mode 100644 src/moduleIOT/pages/iotCarePlan/FR200.config.ts
diff --git a/src/moduleIOT/pages/iotCarePlan/FR200.config.ts b/src/moduleIOT/pages/iotCarePlan/FR200.config.ts
new file mode 100644
index 0000000..1b26e80
--- /dev/null
+++ b/src/moduleIOT/pages/iotCarePlan/FR200.config.ts
@@ -0,0 +1,4 @@
+export default definePageConfig({
+ navigationBarTitleText: 'FR200',
+ enablePageMeta: true
+})
From 3f7e7fa9d8a0e6efb02ec4355871a048735f56d2 Mon Sep 17 00:00:00 2001
From: rongweikang <1174906669@qq.com>
Date: Thu, 28 Mar 2024 09:28:38 +0800
Subject: [PATCH 3/7] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=BC=B9=E7=AA=97?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages/index/index.less | 73 ++++++++---
src/pages/index/index.tsx | 255 +++++++++++++++++++------------------
2 files changed, 187 insertions(+), 141 deletions(-)
diff --git a/src/pages/index/index.less b/src/pages/index/index.less
index aa3df80..db760d0 100644
--- a/src/pages/index/index.less
+++ b/src/pages/index/index.less
@@ -519,9 +519,19 @@ page {
.MembraneCloth {
position: relative;
width: 670rpx;
- height: 840rpx;
border-radius: 30rpx;
background: #fff;
+ padding: 52rpx 20rpx 46rpx;
+ box-sizing: border-box;
+
+ .title {
+ font-weight: bold;
+ text-align: center;
+ font-size: 36rpx;
+ margin-bottom: 36rpx;
+ color: #030000;
+ }
+
.btn1 {
font-style: normal;
width: 270rpx;
@@ -532,28 +542,57 @@ page {
border-radius: 45rpx;
font-size: 32rpx;
font-weight: bold;
- margin-top: 55rpx;
color: #ffffff;
}
- .center{
- height: 70%;
- background-color: red;
- .list{
+ .center {
+ margin-bottom: 44rpx;
+ .list {
width: 100%;
- height: 117rpx;
- background-color: #41a9fc;
- border-bottom: 2rpx solid black;
- display: flex;
+ height: 150rpx;
+ background: linear-gradient(90deg, #efdcc2, #fff2df);
+ border-radius: 30rpx;
+ margin-bottom: 20rpx;
+ padding: 20rpx 31rpx 20rpx 20rpx;
+ box-sizing: border-box;
+ justify-content: space-between;
+ Image {
+ width: 120rpx;
+ height: 120rpx;
+ border-radius: 20rpx;
+ }
+ .name_box {
+ margin-left: 24rpx;
+ .name {
+ font-family: PingFang SC;
+ font-weight: bold;
+ font-size: 26rpx;
+ color: #000000;
+ margin-bottom: 12rpx;
+ }
+ .subTitle {
+ font-family: PingFang SC;
+ font-weight: 500;
+ font-size: 22rpx;
+ color: #666666;
+ }
+ }
+
+ .buy {
+ font-family: PingFang SC;
+ font-weight: 500;
+ font-size: 26rpx;
+ color: #666666;
+ display: flex;
+ align-items: center;
+ Image {
+ height: 20rpx;
+ width: 20rpx;
+ margin-left: 10rpx;
+ }
+ }
}
}
}
-.MembraneCloth .title {
- font-weight: bold;
- text-align: center;
- font-size: 36rpx;
- color: #030000;
- padding-top: 39rpx;
-}
.popbox .title {
font-weight: bold;
text-align: center;
diff --git a/src/pages/index/index.tsx b/src/pages/index/index.tsx
index cb1e1e1..5fac2ce 100644
--- a/src/pages/index/index.tsx
+++ b/src/pages/index/index.tsx
@@ -1,5 +1,4 @@
import classnames from "classnames";
-setSerial;
import dayjs from "dayjs";
import Taro from "@tarojs/taro";
import { Component } from "react";
@@ -12,8 +11,9 @@ import {
SwiperItem,
RichText,
PageMeta,
+ Radio
} from "@tarojs/components";
-import { Popup,Radio } from "@antmjs/vantui";
+import { Popup } from "@antmjs/vantui";
/*** redux ***/
import { connect } from "react-redux";
import { userRefresh, tokenRefresh } from "@/store/features/userInfo";
@@ -84,23 +84,14 @@ class Index extends Component {
mobile: Taro.getStorageSync("mobile"),
},
// 膜布列表
- MembraneClothList:[ {
- name:'mox名字'
+ MembraneClothList: [{
+ name: '集体美容仪'
},
{
- name:'mox名字'
- },
- {
- name:'mox名字'
- }, {
- name:'mox名字'
- }, {
- name:'mox名字'
- },],
- checkedMembraneCloth:'',
- list: [
-
- ],
+ name: 'M02美容仪'
+ }],
+ checkedMembraneCloth: '',
+ list: [],
params: "",
messageCount: Taro.getStorageSync("messageCount") || 0,
offlineDialogType: 1, //1离线弹窗 2升级弹窗
@@ -204,7 +195,7 @@ class Index extends Component {
}
}
- componentDidMount() {}
+ componentDidMount() { }
componentWillUnmount() {
// 页面卸载监听
@@ -278,7 +269,7 @@ class Index extends Component {
this.isSancQrcodeEnter();
}
},
- fail: () => {},
+ fail: () => { },
complete: () => {
// 授权完成运行页面初始化
},
@@ -535,7 +526,7 @@ class Index extends Component {
this.setState({ isShowSiteSwiper: false });
};
- bannerSwiperchange() {}
+ bannerSwiperchange() { }
gobanner(item) {
// 跳转类型:0无跳转、1跳转内部链接、3跳转外部链接、4跳转小程序、5导向视频号、6导向视频号直播间',
@@ -1109,6 +1100,8 @@ class Index extends Component {
isCommonError,
commonErrorText,
MembraneClothList,
+ checkedMembraneCloth,
+ list,
calendarComplete,
calendarInComplete,
currentDate,
@@ -1153,7 +1146,7 @@ class Index extends Component {
{commonErrorText.map((item) => {
@@ -1161,60 +1154,60 @@ class Index extends Component {
})}
}
- confirmButtonText="知道了"
- textAlgin="center"
+ confirmButtonText='知道了'
+ textAlgin='center'
close={this.onCommonErrorFun}
confirm={this.onCommonErrorFun}
/>
检测到您上一次护理的记录未生成,
是否重新读取
}
- cancelButtonText="取消"
- confirmButtonText="连接设备"
- textAlgin="center"
+ cancelButtonText='取消'
+ confirmButtonText='连接设备'
+ textAlgin='center'
close={this.closeReConnectDeviceRecordWL200}
confirm={this.confirmReConnectDeviceRecordWL200}
/>
序列号信息仍在更新,请联系微信小助理
协助您绑定仪器
}
- confirmButtonText="知道了"
- textAlgin="center"
+ confirmButtonText='知道了'
+ textAlgin='center'
close={this.onBindErrorClose}
confirm={this.onBindErrorConfirm}
/>
@@ -1233,54 +1226,54 @@ class Index extends Component {
/>
序列号信息仍在更新,请联系微信小助理
协助您绑定仪器
}
- confirmButtonText="知道了"
- textAlgin="center"
+ confirmButtonText='知道了'
+ textAlgin='center'
close={this.onBindErrorClose}
confirm={this.onBindErrorConfirm}
/>
-
+
仪器:{instrumentInfo.instrumentName}
- 序列号:{instrumentInfo.serial}
- 您需要完成注册登录才能进行一起绑定
+ 序列号:{instrumentInfo.serial}
+ 您需要完成注册登录才能进行一起绑定
}
- confirmButtonText="知道了"
- textAlgin="center"
+ confirmButtonText='知道了'
+ textAlgin='center'
close={this.onUnloginClose.bind(this)}
confirm={this.onUnloginConfirm.bind(this)}
>
@@ -1288,9 +1281,9 @@ class Index extends Component {
@@ -1310,15 +1303,15 @@ class Index extends Component {
isLarge
isClose
isShow={isShowUpdateVersionTip}
- title="提示"
+ title='提示'
content={
检测到设备有升级请求
是否进行升级?
}
- textAlgin="center"
- confirmButtonText="确定"
+ textAlgin='center'
+ confirmButtonText='确定'
close={this.cancelUpdateVersionTip}
confirm={this.confirmUpdateVersionTip}
/>
@@ -1331,16 +1324,16 @@ class Index extends Component {
)}
-
+
}
- confirmButtonText="知道了"
- textAlgin="left"
+ confirmButtonText='知道了'
+ textAlgin='left'
isClose
close={this.onVersionUpgradFinish}
confirm={this.onVersionUpgradFinish}
@@ -1352,29 +1345,29 @@ class Index extends Component {
leftSlot={
- {messagecount ? : ""}
+ {messagecount ? : ""}
}
/>
-
-
- 护理记录
+
+
+ 护理记录
-
+
{
/>
-
+
{instrumentList.length > 0 && (
-
- 前往护理
+
+ 前往护理
- 添加新设备
+ 添加新设备
-
-
+
+
{instrumentList.map((item, index) => {
return (
-
+
{item.name}
@@ -1431,28 +1424,28 @@ class Index extends Component {
)}
{instrumentList.length === 0 && (
-
- 前往护理
+
+ 前往护理
-
-
-
+
+
+
-
+
添加新设备
- 您暂时还没有绑定任何设备
+ 您暂时还没有绑定任何设备
)}
-
+
{
key={"banner_" + index}
onClick={this.gobanner.bind(this, item)}
>
-
+
);
})}
-
-
- 你已绑定所有设备
+
+
+ 你已绑定所有设备
-
-
- 膜布选择
-
- {MembraneClothList.map((item, index) => {
- return (
-
- {item.name}
-
-
- );
- })}
+
+
+ 膜布选择
+
+ {MembraneClothList.map((item, index) => {
+ return (
+
+
+
+
+
+
+ {item.name}
+
+
+ 描述描述描述描述
+
+
+
+
+ 前往购买
+
+
+
+ );
+ })}
-
-
+
+
确认
-
-
-
+
+
+
{/* */}
{/*
Date: Thu, 28 Mar 2024 09:33:00 +0800
Subject: [PATCH 4/7] =?UTF-8?q?=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../iotCarePlan/components/Echart/index.tsx | 160 +++++++++++++++++-
1 file changed, 154 insertions(+), 6 deletions(-)
diff --git a/src/moduleIOT/pages/iotCarePlan/components/Echart/index.tsx b/src/moduleIOT/pages/iotCarePlan/components/Echart/index.tsx
index 24a6c54..a068416 100644
--- a/src/moduleIOT/pages/iotCarePlan/components/Echart/index.tsx
+++ b/src/moduleIOT/pages/iotCarePlan/components/Echart/index.tsx
@@ -143,22 +143,170 @@ function Index({ series, full }: Props) {
color: "#ff8410",
},
},
- series: [],
- });
+ series: []
+ })
+ // let data = true
+ // const newParams = {
+ // animation: false,
+ // grid: {
+ // // 让图表占满容器
+ // // containLabel: true,
+ // top: "32rpx",
+ // left: "48rpx",
+ // right: "86rpx",
+ // bottom: "38rpx",
+ // },
+ // // legend: {
+ // // itemStyle: {
+ // // decal: {
+ // // rotation: 90
+ // // }
+ // // }
+ // // },
+ // yAxis: {
+ // // name: '',
+ // // nameGap: 5,
+ // // nameTextStyle: {
+ // // color: '#e4e4e4',
+ // // fontSize:7
+ // // },
+ // type: "category",
+ // inverse: true,
+ // axisLine: {
+ // //坐标轴轴线相关设置。数学上的x轴
+ // show: true,
+ // lineStyle: {
+ // color: "#cccccc",
+ // },
+ // },
+ // axisLabel: {
+ // //坐标轴刻度标签的相关设置
+ // color: "#cccccc",
+ // fontSize: 14,
+ // rotate: -90,
+ // margin: 18
+ // },
+ // axisTick: {
+ // show: false,
+ // },
+ // data: [
+ // "00:01",
+ // "00:02",
+ // "00:03",
+ // "00:04",
+ // "00:05",
+ // "00:06",
+ // "00:07",
+ // "00:08",
+ // "00:09",
+ // "00:10",
+ // ],
+ // },
+ // xAxis: {
+ // type: "value",
+ // min: 0,
+ // max: 8,
+ // splitNumber: 8,
+ // splitLine: {
+ // show: true,
+ // 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,
+ // dimension: 0,
+ // 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: []
+ // }
const level = [8, 7, 6, 5, 4, 3, 2];
const [newOptions, setNewOptions] = useState(options);
const updata = useCallback((res) => {
- let option = JSON.parse(JSON.stringify(options));
- option.series = JSON.parse(JSON.stringify(res));
+ // let option
+ // if (data) {
+ // option = JSON.parse(JSON.stringify(newParams))
+ // } else {
+ // option = JSON.parse(JSON.stringify(options))
+ // }
+ let option = JSON.parse(JSON.stringify(options))
+ option.series = JSON.parse(JSON.stringify(res))
// 更新图表数据
setNewOptions(option);
}, []);
const cancelFull = useCallback((res) => {
- full();
- }, []);
+ // let option = JSON.parse(JSON.stringify(newParams))
+ // setNewOptions(option)
+ // console.log(data, 88888);
+ // data = !data
+ // console.log(data, 88888);
+ full()
+ }, [])
+
+
useEffect(() => {
setOptions(newOptions);
From f06b1d8cc1470fb49e051e6b0cec9c19d358cc7f Mon Sep 17 00:00:00 2001
From: qsj <731458905@qq.com>
Date: Fri, 29 Mar 2024 10:56:54 +0800
Subject: [PATCH 5/7] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=A0=B7=E5=BC=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../components/popup-We/popup-We.less | 162 ++++++++++++++
.../components/popup-We/popup-We.tsx | 199 ++++++++++++++++++
src/pages/index/index.less | 2 +-
src/pages/index/index.tsx | 110 +++++++++-
src/recoding/pages/recording/recording.less | 10 +-
src/recoding/pages/recording/recording.tsx | 5 +-
6 files changed, 479 insertions(+), 9 deletions(-)
create mode 100644 src/moduleIOT/pages/iotCarePlan/components/popup-We/popup-We.less
create mode 100644 src/moduleIOT/pages/iotCarePlan/components/popup-We/popup-We.tsx
diff --git a/src/moduleIOT/pages/iotCarePlan/components/popup-We/popup-We.less b/src/moduleIOT/pages/iotCarePlan/components/popup-We/popup-We.less
new file mode 100644
index 0000000..ee3622a
--- /dev/null
+++ b/src/moduleIOT/pages/iotCarePlan/components/popup-We/popup-We.less
@@ -0,0 +1,162 @@
+.step-popup-content-box {
+ margin: 0;
+
+ .absolutely-img {
+ width: 100%;
+ height: 600rpx;
+ background-color: #eee;
+ }
+}
+
+.step-absolutely {
+ width: 600rpx;
+ height: 720rpx;
+ text-align: left;
+ margin: 0 auto;
+}
+
+.step-img {
+ display: block;
+ width: 600rpx;
+ height: 600rpx;
+ border-radius: 30rpx;
+}
+
+.common-popup-title-WE {
+ font-size: 36rpx;
+ font-family: PingFang SC;
+ font-weight: bold;
+ color: #030000;
+ text-align: center;
+
+
+}
+
+.whitePop {
+ background-color: #fff !important;
+ color: #000 !important;
+}
+
+.Newpop {
+ .center {
+ // background-color: red;
+ height: 720rpx;
+
+ .page {
+ color: #dedede;
+ margin-bottom: 10rpx;
+ font-size: 25rpx;
+
+ }
+ .titleSlogan{
+ font-size: 30rpx;
+ font-family: 700;
+ margin-bottom: 17rpx;
+ }
+ .img {
+ width: 100%;
+ height: 500rpx;
+ background-color: #666;
+ }
+
+ .text {
+ margin: 20rpx;
+ font-size: 23rpx;
+ font-weight: 700;
+ background-color: #f8f8f8;
+ // border: 1rpx solid;
+ border-radius: 45rpx;
+ padding: 5rpx 24rpx;
+ }
+
+ .black {
+ color: #000;
+ display: inline-block;
+ }
+ }
+}
+
+.site-close {
+ position: absolute;
+ right: 16rpx;
+ top: 16rpx;
+ color: #000;
+ font-size: 36rpx;
+ z-index: 100009;
+ background-color: transparent;
+ border-radius: 50%;
+ padding: 8rpx;
+ box-sizing: border-box;
+}
+
+.step-popup-btn {
+ position: absolute;
+ bottom: 100rpx;
+ left: calc(50% - 120rpx);
+ width: 240rpx;
+ height: 70rpx;
+ line-height: 70rpx;
+ font-size: 28rpx;
+ text-align: center;
+ border: 1rpx solid #000;
+ border-radius: 40rpx;
+ background-color: #000;
+ color: #fff;
+ box-sizing: border-box;
+}
+
+.step-tips-common-box {
+ padding: 50rpx 35rpx 74rpx 35rpx;
+
+ .tips-message {
+ margin-top: 70rpx;
+ font-size: 28rpx;
+ font-family: PingFang SC;
+ font-weight: 400;
+ color: #030000;
+ line-height: 60rpx;
+ }
+}
+
+.popup-btn-one {
+ display: flex;
+ margin-top: 60rpx;
+ justify-content: center;
+
+ .popup-btn {
+ width: 270rpx;
+ height: 90rpx;
+ line-height: 90rpx;
+ font-size: 32rpx;
+ font-weight: 500;
+ text-align: center;
+ border: 1rpx solid #000;
+ border-radius: 45rpx;
+ color: #fff;
+ background-color: #000;
+ font-family: PingFang SC;
+ }
+}
+
+.setp-footer-btn {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ text-align: center;
+ height: 30rpx;
+ // padding: 10rpx;
+ margin-top: 50rpx;
+
+ .checked {
+ width: 30rpx;
+ height: 30rpx;
+ margin-right: 26rpx;
+ }
+
+ .text {
+ font-family: PingFang SC;
+ font-size: 28rpx;
+ color: #666;
+ font-weight: 400;
+ }
+}
\ No newline at end of file
diff --git a/src/moduleIOT/pages/iotCarePlan/components/popup-We/popup-We.tsx b/src/moduleIOT/pages/iotCarePlan/components/popup-We/popup-We.tsx
new file mode 100644
index 0000000..82f7d41
--- /dev/null
+++ b/src/moduleIOT/pages/iotCarePlan/components/popup-We/popup-We.tsx
@@ -0,0 +1,199 @@
+import classnames from "classnames";
+import { Component } from "react";
+
+import {
+ Block,
+ View,
+ Image,
+ Text,
+ Button,
+ PageMeta,
+ ScrollView,
+} from "@tarojs/components";
+
+import { Popup, Checkbox, CheckboxGroup, Steps } from "@antmjs/vantui";
+
+
+import "@/components/popup/popup.less";
+import "@/components/popup/popup-alert.less";
+import "./popup-We.less"
+
+import { go } from "@/utils/traoAPI";
+
+/** props
+ * isLarge 是否大尺寸
+ * isShow 是否显示
+ * isClose 右上角关闭图标
+ * title 弹窗标题
+ * content 弹窗内容
+ * confirmButtonText 确定按钮
+ * textAlgin 文本对齐 left right center
+ * type: 1注册
+ * @confirm 关闭回调
+ */
+
+class PopupWe extends Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ name: "确认组件",
+ // Page:1,
+ type: "1",
+ // titleSlogan:'请选择额头区域护理目标'
+ };
+ }
+
+ async onLoad() {
+ console.log(this.props, '111111111111');
+
+ }
+ componentDidMount() { }
+
+ componentWillUnmount() { }
+
+ componentDidShow() { }
+
+ componentDidHide() { }
+
+ async initData() { }
+
+ onClose = () => {
+ this.props.close();
+ };
+
+ onConfirm = () => {
+
+ };
+
+ onClickStop = (e) => {
+ e.stopPropagation();
+ };
+
+ onTouchMove = () => {
+ return true;
+ };
+ html1_3 = () => {
+ return 22222
+ }
+ render() {
+ let {
+ title,
+
+ content,
+ confirmButtonText,
+ textAlgin,
+ isShow,
+ isClose,
+ isLarge,
+ values,
+ myClassName,
+ zIndex,
+ Page,
+ type,
+ handlepopupCheck,
+ WeCurrent,
+ PreviousStep,
+ NextStep
+ } = this.props;
+ if (!zIndex) zIndex = 10001;
+ return (
+
+
+
+
+
+ {title && (
+
+ {title}
+
+ )}
+
+
+
+ 0{Page}/06
+
+ {WeCurrent[Page - 1].titleSlogan}
+ {Page > 3 ?
+ 22222
+
+
+
+ :
+
+ 111111
+
+
+
+
+ {
+ console.info(e, WeCurrent, Page)
+ handlepopupCheck(e)
+
+ }}
+ >
+ {WeCurrent[Page - 1].text1}
+ {WeCurrent[Page - 1].text2}
+
+
+
+ }
+
+
+
+
+
+ {Page !== 1 ? : null}
+
+
+
+
+
+
+
+ );
+ }
+}
+export default PopupWe;
\ No newline at end of file
diff --git a/src/pages/index/index.less b/src/pages/index/index.less
index aa3df80..aefd738 100644
--- a/src/pages/index/index.less
+++ b/src/pages/index/index.less
@@ -13,7 +13,7 @@ page {
height: 0;
color: transparent;
}
-
+
.message {
position: relative;
width: 40rpx;
diff --git a/src/pages/index/index.tsx b/src/pages/index/index.tsx
index da4558b..13ebeab 100644
--- a/src/pages/index/index.tsx
+++ b/src/pages/index/index.tsx
@@ -40,6 +40,10 @@ import Navbar from "@/components/navbar/navbar";
import ConnectionBluetoot from "@/components/bluetoot/connection";
import UpdateIotWL200 from "@/components/bluetoot/update-wl200/index";
import UpdateIotFR200 from "@/components/bluetoot/update-fr200/index";
+// import PopupWe from "@/moduleIOT/pages/iotCarePlan/components/popup-We/popup-We";
+import PopupWe from "../../moduleIOT/pages/iotCarePlan/components/popup-We/popup-We";
+
+
/** 自定义组件 **/
import {
@@ -67,13 +71,53 @@ import {
// const log = require("@/utils/log");
class Index extends Component {
+ onModeLockClose: any;
constructor(props) {
super(props);
this.state = {
+
isDisabledClickAddDevice: false, // 是否禁止点击添加设备
isCommonError: false, // 是否显示通用错误提示
commonErrorText: [], // 通用错误提示
-
+ WeCurrent: [
+ {
+ values:[],
+ text1:' 强效提拉额肌,淡化抬头纹',
+ text2:'密集水光灌注,胶原直达肌底',
+ titleSlogan:'请选择额头区域的护理目标(可多选)'
+ },
+ {
+ values:[],
+ text1:' 强效提拉额肌,淡化抬头纹',
+ text2:'密集水光灌注,胶原直达肌底',
+ titleSlogan:'请选择脸颊区域的护理目标(可多选)'
+ },
+ {
+ values:[],
+ text1:' 强效提拉轮廓,淡化木偶纹',
+ text2:'密集水光灌注,胶原直达肌底',
+ titleSlogan:'请选择下颌线区域的护理目标(可多选)'
+ },
+ {
+ values:[],
+ text1:' 444',
+ text2:'444',
+ titleSlogan:'请选择额头区域的护理目标(可多选)'
+ },
+ {
+ values:[],
+ text1:' 55555',
+ text2:'55555',
+ titleSlogan:'请选择额头区域的护理目标(可多选)'
+ },
+ {
+ values:[],
+ text1:' 6666',
+ text2:'66666',
+ titleSlogan:'请选择额头区域的护理目标(可多选)'
+ }
+ ],
+ WeCurrentPage: 4,
showEquipment: false, // 扫码绑定设备弹窗
isRegisterBoolean: false, // 是否已登录
isShowPrivacyPopup: false,
@@ -84,6 +128,7 @@ class Index extends Component {
userinfo: {
mobile: Taro.getStorageSync("mobile"),
},
+ isModeLockWE: false,
// 膜布列表
MembraneClothList: [
{
@@ -207,7 +252,7 @@ class Index extends Component {
}
}
- componentDidMount() {}
+ componentDidMount() { }
componentWillUnmount() {
// 页面卸载监听
@@ -281,7 +326,7 @@ class Index extends Component {
this.isSancQrcodeEnter();
}
},
- fail: () => {},
+ fail: () => { },
complete: () => {
// 授权完成运行页面初始化
},
@@ -538,8 +583,45 @@ class Index extends Component {
this.setState({ isShowSiteSwiper: false });
};
- bannerSwiperchange() {}
+ bannerSwiperchange() { }
+ // 模拟弹窗
+ handlepopup = () => {
+ console.log('当前的state:', this.state,);
+ let isModeLockWE = this.state.isModeLockWE;
+ console.log('进入模拟弹窗', isModeLockWE);
+ // 其他操作...
+ this.setState({ isModeLockWE: !isModeLockWE })
+ }
+ // 复选框
+ handlepopupCheck = (e) => {
+ let WeCurrent =this.state.WeCurrent
+ let WeCurrentPage =this.state.WeCurrentPage
+ WeCurrent[WeCurrentPage -1].values=[...e.detail]
+ this.setState({ WeCurrent })
+ }
+ // 上一步
+ PreviousStep = () => {
+ console.log(1111111);
+ let WeCurrentPage =this.state.WeCurrentPage
+ if(WeCurrentPage !== 1){
+ WeCurrentPage=WeCurrentPage-1
+ this.setState({
+ WeCurrentPage
+ })
+ }
+
+ }
+ // 下一步
+ NextStep = () => {
+ let WeCurrentPage =this.state.WeCurrentPage
+ if(WeCurrentPage !== 6){
+ WeCurrentPage=WeCurrentPage+1
+ this.setState({
+ WeCurrentPage
+ })
+ }
+ }
gobanner(item) {
// 跳转类型:0无跳转、1跳转内部链接、3跳转外部链接、4跳转小程序、5导向视频号、6导向视频号直播间',
/**
@@ -1133,6 +1215,7 @@ class Index extends Component {
show,
isCommonError,
commonErrorText,
+ isModeLockWE,
MembraneClothList,
calendarComplete,
calendarInComplete,
@@ -1143,7 +1226,8 @@ class Index extends Component {
isNotRegister,
isShowSiteSwiper,
isDev,
-
+ WeCurrent,
+ WeCurrentPage,
bannerList,
bannerCurrent,
// 绑定弹窗
@@ -1428,6 +1512,7 @@ class Index extends Component {
前往护理
+
{
)}
+ {/* */}
{instrumentList.length === 0 && (
@@ -1531,6 +1617,20 @@ class Index extends Component {
+
{/* */}
{/* {
return (
+
{
// scrollIntoView={"products_item_" + curIndex}
style={{
top: height + 110 + "rpx",
- position: "sticky",
+ position: "fixed",
}}
>
From 79e7432953019b035539b24a4e4d4925f53869a0 Mon Sep 17 00:00:00 2001
From: rongweikang <1174906669@qq.com>
Date: Fri, 29 Mar 2024 13:50:43 +0800
Subject: [PATCH 6/7] =?UTF-8?q?=E5=AE=8C=E6=88=90echarts=E8=A1=A8=E6=A0=BC?=
=?UTF-8?q?=E5=AF=B9=E6=8E=A5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/moduleIOT/pages/iotCarePlan/FR200.less | 16 +-
src/moduleIOT/pages/iotCarePlan/FR200.tsx | 330 ++++++++++++------
.../iotCarePlan/components/Bluetoot/FR200.ts | 1 +
.../iotCarePlan/components/Echart/index.less | 160 +++++----
.../iotCarePlan/components/Echart/index.tsx | 105 ++++--
5 files changed, 397 insertions(+), 215 deletions(-)
diff --git a/src/moduleIOT/pages/iotCarePlan/FR200.less b/src/moduleIOT/pages/iotCarePlan/FR200.less
index a8d2e3b..8d9921f 100644
--- a/src/moduleIOT/pages/iotCarePlan/FR200.less
+++ b/src/moduleIOT/pages/iotCarePlan/FR200.less
@@ -1,8 +1,20 @@
@import url(./WL200.less);
-
+.music {
+ width: 54rpx;
+ height: 54rpx;
+ background: rgba(255, 255, 255, 0.6);
+ border-radius: 50%;
+ position: absolute;
+ right: 20rpx;
+ top: 20rpx;
+ image {
+ width: 100%;
+ height: 100%;
+ }
+}
.fr200-iot-device {
width: 690rpx;
- height: 150rpx;
+ height: 100rpx;
display: flex;
align-items: center;
justify-content: center;
diff --git a/src/moduleIOT/pages/iotCarePlan/FR200.tsx b/src/moduleIOT/pages/iotCarePlan/FR200.tsx
index 2612a0f..161fe7d 100644
--- a/src/moduleIOT/pages/iotCarePlan/FR200.tsx
+++ b/src/moduleIOT/pages/iotCarePlan/FR200.tsx
@@ -172,7 +172,7 @@ class IotCarePlanFR200 extends Component {
isConnectionBlutoot: true, // 是否已连接蓝牙
isShowNurse: true, // 是否开始并显示护理 FR200默认已经开始准备护理
isStopNurse: false, // 是否暂停护理
- isEndNurse: false, // 是否结束护理
+ // isEndNurse: false, // 是否结束护理
errorTips: "", // 错误提示
/** 护理过程 END*/
@@ -184,7 +184,7 @@ class IotCarePlanFR200 extends Component {
ModeList: [],
ModeType: "all", // all 1基础护理 2专区护理 3专研促渗 4敏期护理 5智能测肤
ActiveModeItem: {
- modeType: "",
+ modeType: "face",
openSourceData: [],
}, // 当前选中模式
SwitchActiveModeItem: {
@@ -233,7 +233,7 @@ class IotCarePlanFR200 extends Component {
echartsData: "", //传给echarts图表的数据
series: [
{
- data: [2, 3, 5, 3, 5, 6, 8, 5, 6, 4],
+ data: [],
type: "line",
smooth: true,
z: 1,
@@ -241,10 +241,10 @@ class IotCarePlanFR200 extends Component {
color: "red",
},
{
- data: [2, 3, 5, 3, 5, 6, 8, 5, 6, 4],
+ data: [],
type: "line",
smooth: true,
- symbolSize: 10,
+ symbolSize: 5,
lineStyle: {
color: "#ff8410",
width: 1,
@@ -255,9 +255,9 @@ class IotCarePlanFR200 extends Component {
},
{
name: "a",
- data: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
+ data: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
type: "bar",
- barWidth: 22,
+ barWidth: 12,
z: 2,
stack: "x",
visualMap: false,
@@ -267,7 +267,7 @@ class IotCarePlanFR200 extends Component {
},
{
name: "b",
- data: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
+ data: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
type: "bar",
z: 2,
stack: "x",
@@ -278,7 +278,7 @@ class IotCarePlanFR200 extends Component {
},
{
name: "c",
- data: [0, 1, 1, 1, 1, 1, 1, 1, 1, 1],
+ data: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
type: "bar",
z: 2,
stack: "x",
@@ -289,7 +289,7 @@ class IotCarePlanFR200 extends Component {
},
{
name: "d",
- data: [0, 0, 1, 0, 1, 1, 1, 1, 1, 1],
+ data: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
type: "bar",
z: 2,
stack: "x",
@@ -300,7 +300,7 @@ class IotCarePlanFR200 extends Component {
},
{
name: "e",
- data: [0, 0, 1, 0, 1, 1, 1, 1, 1, 0],
+ data: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
type: "bar",
z: 2,
stack: "x",
@@ -311,7 +311,7 @@ class IotCarePlanFR200 extends Component {
},
{
name: "f",
- data: [0, 0, 0, 0, 0, 1, 1, 0, 1, 0],
+ data: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
type: "bar",
z: 2,
stack: "x",
@@ -322,7 +322,7 @@ class IotCarePlanFR200 extends Component {
},
{
name: "h",
- data: [0, 0, 0, 0, 0, 0, 1, 0, 0, 0],
+ data: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
type: "bar",
z: 2,
stack: "x",
@@ -333,7 +333,7 @@ class IotCarePlanFR200 extends Component {
},
{
name: "i",
- data: [0, 0, 0, 0, 0, 0, 1, 0, 0, 0],
+ data: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
type: "bar",
z: 2,
stack: "x",
@@ -343,6 +343,12 @@ class IotCarePlanFR200 extends Component {
},
},
],
+ time: {
+ min: 0,
+ second: 0
+ },
+ timeArr: [],
+ videoVoiceStatus: false
};
}
bluetoothContainer: any = null;
@@ -403,9 +409,9 @@ class IotCarePlanFR200 extends Component {
this.getInstrumentClockSummary();
this.getInstrumentClockDetail();
}
- componentDidMount() {}
+ componentDidMount() { }
- componentWillUnmount() {}
+ componentWillUnmount() { }
componentDidShow() {
console.log("页面显示了");
@@ -435,6 +441,24 @@ class IotCarePlanFR200 extends Component {
title: obj.name,
});
+ let sendParams: any = {
+ // ...deviceCommandSamples.pause,
+ // workMode: 'moistureTest', // 使用模式
+ commandType: "DeviceStatusSync",
+ deviceSyncCommandType: 'onlySyncStatusToDevice',
+ totalWorkingSeconds: 0,
+ workStatus: "pause",
+ workMode: 'face',
+ };
+ sendParams.gear = 1;
+ let pauseArrayBuffer = deviceToolKitInstance.toBleCommand(
+ sendParams as any
+ );
+ sendCommand({
+ value: pauseArrayBuffer,
+ }).then((res) => console.log("同步为0=====》", res));
+
+
await this.GetModeList(obj?.id);
// 如果不存在设备模式值,则判断为首次进入,弹窗提示
@@ -448,7 +472,7 @@ class IotCarePlanFR200 extends Component {
const platform = Taro.getSystemInfoSync().platform;
if (platform !== "devtools") {
// 仅手机端初始化蓝牙
- // this.init();
+ this.init();
}
}
@@ -573,7 +597,7 @@ class IotCarePlanFR200 extends Component {
* @name 选中/切换护理模式
* */
modeCurrentFun = async (data, isNotCheck = false) => {
- let { isShowNurse, activeModeID } = this.state;
+ let { isShowNurse, activeModeID, series } = this.state;
// 护理检查改变模式,是否提示切换护理模式
// isNotCheck为真时,不进行校验,直接切换
this.tempModeCurrent = data;
@@ -603,6 +627,15 @@ class IotCarePlanFR200 extends Component {
currentWorkModeType = 2;
}
+ series.map(item => {
+ if (item.type == 'line') {
+ item.data = []
+ } else {
+ item.data = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
+ }
+ })
+
+
this.setState({
ActiveModeItem: data,
activeModeID: data?.id,
@@ -612,6 +645,7 @@ class IotCarePlanFR200 extends Component {
MaskModeStepIndex: 0, // 面膜促渗步骤
ModeType: this.ModeTypeArray[data.modeClass],
currentWorkModeType,
+ series
});
// 切换模式时:重新设置视频地址
@@ -860,36 +894,53 @@ class IotCarePlanFR200 extends Component {
let textshow = this.state.textshow;
this.setState({ textshow: !textshow });
}
- updata() {
- let that = this;
- let stop = 0;
- let time = setInterval(function () {
- stop++;
- let series = JSON.parse(JSON.stringify(that.state.series));
- let num = Math.floor(Math.random() * 9);
- let count = 0;
- series.map((item) => {
- if (item.type === "line") {
+ updata(level = 1, min = 0, seconds = 0) {
+ if (seconds == 0 && min == 0) {
+ return
+ }
+ // let that = this;
+ // let stop = 0;
+ // let time = setInterval(function () {
+ // stop++;
+ let series = JSON.parse(JSON.stringify(this.state.series));
+ let num = level
+ let count = 0;
+ series.map((item) => {
+ if (item.type === "line") {
+ if (item.data.length >= 10) {
item.data.splice(0, 1);
- item.data.push(num);
}
- if (item.type === "bar") {
- count++;
+ item.data.push(num);
+ }
+ if (item.type === "bar") {
+ count++;
+ if (seconds > 10) {
item.data.splice(0, 1);
if (count <= num) {
item.data.push(1);
} else {
item.data.push(0);
}
+ } else {
+ if (count <= num) {
+ item.data.splice(seconds - 1, 1, 1)
+ } else {
+ item.data.splice(seconds - 1, 1, 0)
+ }
}
- });
-
- // 更新图表数据
- that.setState({ series });
- if (stop >= 20) {
- clearInterval(time);
}
- }, 1000);
+ });
+ let time = JSON.parse(JSON.stringify(this.state.time));
+ time.min = min
+ time.second = seconds
+ // 更新图表数据
+ this.setState({ series });
+ this.setState({ time });
+
+ // if (stop >= 20) {
+ // clearInterval(time);
+ // }
+ // }, 1000);
}
full() {
@@ -1040,6 +1091,7 @@ class IotCarePlanFR200 extends Component {
// 更新界面倒计时
this.resetTimer();
+
if (
sceneTime > totalTime &&
this.isRuning &&
@@ -1329,6 +1381,15 @@ class IotCarePlanFR200 extends Component {
}
}
+
+ /**
+ * 视频声音切换
+ */
+ videoVoiceStatusChange() {
+ let { videoVoiceStatus } = this.state;
+ this.setState({ videoVoiceStatus: !videoVoiceStatus })
+
+ }
/** @name 精华促渗下一步,根据时间自动调用 */
essencePenetrationNext() {
let {
@@ -1843,8 +1904,27 @@ class IotCarePlanFR200 extends Component {
Taro.setStorageSync("FR200NursingHistory", params);
console.log("保存setFR200NursingHistory");
};
+
+
+ formatTime(min, sec) {
+ let mins
+ if (min < 10) {
+ mins = '0' + min;
+ } else {
+ mins = min;
+ }
+ let secs
+ if (sec < 10) {
+ secs = '0' + sec;
+ } else {
+ secs = sec;
+ }
+ return `${mins.toString()}:${secs.toString()}`;
+ }
/** 更新WL200护理历史运行时间 */
updateFR200NursingHistory = (data: any = null, jsonStatus: any = null) => {
+ console.log(11111111);
+
this.FR200NursingHistory = Taro.getStorageSync("FR200NursingHistory");
if (this.FR200NursingHistory) {
@@ -1857,6 +1937,19 @@ class IotCarePlanFR200 extends Component {
// 设置正确封面
if (!data) {
if (jsonStatus) {
+ let { timeArr } = this.state
+ let newTime = this.formatTime(jsonStatus.totalWorkingMinutes, jsonStatus.totalWorkingSeconds)
+ let flag = false
+ timeArr.map(item => {
+ if (newTime === item) {
+ flag = true
+ }
+ })
+ if (flag) {
+ return
+ }
+ timeArr.push(newTime)
+ this.setState({ timeArr })
// 缓存每秒数据
if (!params.dataArray) params.dataArray = [];
params.dataArray.push(jsonStatus);
@@ -1864,8 +1957,17 @@ class IotCarePlanFR200 extends Component {
params.workMode = jsonStatus?.workMode;
params.modeId = this.state.ActiveModeItem?.id;
params.modeName = this.state.ActiveModeItem.modeName;
+ let impedance = jsonStatus.impedance
+ let level = impedance - 200
+ if (level < 0) {
+ level = 1
+ } else {
+ level = Math.ceil(level / 80) + 1
+ }
+ console.log('min:', jsonStatus.totalWorkingMinutes, ' ', 'sec', jsonStatus.totalWorkingSeconds);
+
+ this.updata(level, jsonStatus.totalWorkingMinutes, jsonStatus.totalWorkingSeconds)
- console.log(jsonStatus, 555555555555);
}
} else {
params.jsonStatus = jsonStatus;
@@ -2180,11 +2282,11 @@ class IotCarePlanFR200 extends Component {
let report = true;
go(
"/recoding/pages/face_report_one/face_report_one?id=" +
- ids +
- "&report=" +
- report +
- "&obj=" +
- JSON.stringify(obj)
+ ids +
+ "&report=" +
+ report +
+ "&obj=" +
+ JSON.stringify(obj)
);
} else if ("moistureTest" === nursingData.workMode) {
console.log("水分测试");
@@ -2195,11 +2297,11 @@ class IotCarePlanFR200 extends Component {
go(
"/recoding/pages/face_report/face_report?id=" +
- deviceid +
- "&recordId=" +
- currentDevice +
- "&report=" +
- report
+ deviceid +
+ "&recordId=" +
+ currentDevice +
+ "&report=" +
+ report
);
}
};
@@ -2387,7 +2489,9 @@ class IotCarePlanFR200 extends Component {
echartsData,
isShowReReadRecordConnect,
series,
+ time,
isFullScreen,
+ videoVoiceStatus
} = this.state;
return (
@@ -2406,19 +2510,19 @@ class IotCarePlanFR200 extends Component {
{
isLarge
isClose
isShow={isEndCarePlan}
- title="提示"
- content="是否结束护理"
- textAlgin="center"
- cancelButtonText="取消"
- confirmButtonText="确定"
+ title='提示'
+ content='是否结束护理'
+ textAlgin='center'
+ cancelButtonText='取消'
+ confirmButtonText='确定'
close={this.cancelEndBtn}
confirm={this.confirmEndBtn}
/>
@@ -2442,7 +2546,7 @@ class IotCarePlanFR200 extends Component {
isLarge
isClose
isShow={isSwitchActiveMode}
- title="护理模式切换"
+ title='护理模式切换'
content={
{
onModeLockOpen={this.onModeLockOpen}
/>
}
- textAlgin="center"
- cancelButtonText="取消"
- confirmButtonText="确定"
+ textAlgin='center'
+ cancelButtonText='取消'
+ confirmButtonText='确定'
close={this.cancelModeSwitchBtn}
confirm={this.confirmModeSwitchBtn}
/>
@@ -2468,7 +2572,7 @@ class IotCarePlanFR200 extends Component {
isShow={isShowStepTips}
isLarge
isFirstEntry={false}
- confirmButtonText="知道了"
+ confirmButtonText='知道了'
data={ActiveModeItem.openSourceData}
close={this.closeStepTips}
/>
@@ -2477,10 +2581,10 @@ class IotCarePlanFR200 extends Component {
@@ -2489,11 +2593,11 @@ class IotCarePlanFR200 extends Component {
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}
/>
@@ -2502,17 +2606,17 @@ class IotCarePlanFR200 extends Component {
isShow={isShowTipsSave}
isClose
zIndex={10020}
- myClassName="level-up"
- title="提示"
+ myClassName='level-up'
+ title='提示'
content={
当前模式已护理部分时间
是否保存护理记录
}
- cancelButtonText="取消"
- confirmButtonText="确认"
- textAlgin="center"
+ cancelButtonText='取消'
+ confirmButtonText='确认'
+ textAlgin='center'
close={this.closeTipsSave}
cancel={this.cancelTipsSave}
confirm={this.confirmTipsSave}
@@ -2521,11 +2625,11 @@ class IotCarePlanFR200 extends Component {
{
/*不需要做处理*/
}}
@@ -2536,32 +2640,33 @@ class IotCarePlanFR200 extends Component {
deviceInfo={currentDevice}
close={this.connectionClose}
isDisconnect={!isConnectionBlutoot}
- offlineChange={() => {}}
+ offlineChange={() => { }}
pairingChange={this.pairingChange}
- upgradeFun={() => {}}
+ upgradeFun={() => { }}
/>
)}
- 正在同步护理记录...
+ 正在同步护理记录...
-
+
{isFullScreen && (
-
+
-
-
-
-
+
+
+
+
+
+
倒计时:
- {currentTime}
+ {currentTime}
-
-
- 档位:{currentGear}档
+
+
+ 档位:{currentGear}档
-
+
{
onModeLockOpen={this.onModeLockOpen}
/>
)}
-
-
-
+ {/* */}
+
+
+
{(ActiveModeItem?.modeType === "maskPenetration" ||
diff --git a/src/moduleIOT/pages/iotCarePlan/components/Bluetoot/FR200.ts b/src/moduleIOT/pages/iotCarePlan/components/Bluetoot/FR200.ts
index 20d5e7c..8988d20 100644
--- a/src/moduleIOT/pages/iotCarePlan/components/Bluetoot/FR200.ts
+++ b/src/moduleIOT/pages/iotCarePlan/components/Bluetoot/FR200.ts
@@ -136,6 +136,7 @@ export default class BluetoothContainer {
workMode: jsonStatus?.workMode, // 仅当设备上报模式与小程序一致时,才允许改变小程序变量缓存
});
}
+ console.log("this.that.isRuning",this.that.isRuning)
// 判断设备是否在运行中(护理中)
// 仅当设备模式与小程序是否一致,才允许更改设备运行时间
if (this.that.isRuning) {
diff --git a/src/moduleIOT/pages/iotCarePlan/components/Echart/index.less b/src/moduleIOT/pages/iotCarePlan/components/Echart/index.less
index 2c746aa..e7b08df 100644
--- a/src/moduleIOT/pages/iotCarePlan/components/Echart/index.less
+++ b/src/moduleIOT/pages/iotCarePlan/components/Echart/index.less
@@ -7,86 +7,106 @@
padding: 35rpx 25rpx 25rpx 35rpx;
box-sizing: border-box;
position: relative;
+}
+
+.fullscreen {
+ position: fixed;
+ top: 450rpx;
+ left: -450rpx;
+ right: 0;
+ bottom: 0;
+ width: 100vh;
+ height: 100vw;
+ z-index: 9999;
+ background-color: rgba(0, 0, 0, 0.5); /* 背景色 */
+ transform: rotate(90deg);
+ // animation: rotate 0s linear;
+}
- .fullscreen {
- position: fixed;
- top: 450rpx;
- left: -450rpx;
- right: 0;
- bottom: 0;
+@keyframes echartRotate {
+ from {
+ width: 690rpx;
+ height: 320rpx;
+ transform: rotate(0deg);
+ }
+ to {
width: 100vh;
height: 100vw;
- z-index: 9999;
- background-color: rgba(0, 0, 0, 0.5); /* 背景色 */
- transform: rotate(90deg);
- // animation: rotate 0s linear;
+ transform: rotate(0deg);
}
+}
- @keyframes echartRotate {
- from {
- width: 690rpx;
- height: 320rpx;
- transform: rotate(0deg);
- }
- to {
- width: 100vh;
- height: 100vw;
- transform: rotate(0deg);
- }
+.box_background {
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 690rpx;
+ height: 320rpx;
+ border-radius: 30rpx;
+ background-color: #fff;
+ .power {
+ margin: 34rpx 0 28rpx 28rpx;
+ font-family: PingFang-SC;
+ font-weight: 500;
+ font-size: 18rpx;
+ color: #cccccc;
}
-
- .box_background {
+ .full {
+ width: 24rpx;
+ height: 24rpx;
position: absolute;
- top: 0;
- left: 0;
- width: 690rpx;
- height: 320rpx;
- border-radius: 30rpx;
- background-color: #fff;
- .power {
- margin: 34rpx 0 28rpx 28rpx;
- font-family: PingFang-SC;
- font-weight: 500;
- font-size: 18rpx;
- color: #cccccc;
- }
- .full {
- width: 24rpx;
- height: 24rpx;
- position: absolute;
- top: 32rpx;
- right: 26rpx;
- z-index: 2;
- }
- .line {
- margin: 0 0 6rpx 35rpx;
- font-family: PingFang-SC;
- font-size: 14rpx;
- color: #cccccc;
- display: flex;
- position: relative;
- height: 18rpx;
- .bottom_line {
- // border-bottom: 1rpx #ccc dashed;
- width: 550rpx;
- margin-left: 20rpx;
- position: absolute;
- bottom: -6rpx;
- right: 74rpx;
- height: 4rpx;
- color: #fff;
- }
- }
-
- .time {
+ top: 32rpx;
+ right: 26rpx;
+ z-index: 2;
+ }
+ .line {
+ margin: 0 0 6rpx 35rpx;
+ font-family: PingFang-SC;
+ font-size: 14rpx;
+ color: #cccccc;
+ display: flex;
+ position: relative;
+ height: 18rpx;
+ .bottom_line {
+ // border-bottom: 1rpx #ccc dashed;
+ width: 550rpx;
+ margin-left: 20rpx;
position: absolute;
- bottom: 22rpx;
- right: 24rpx;
- font-family: PingFang-SC;
- font-size: 18rpx;
- color: #cccccc;
+ bottom: -6rpx;
+ right: 74rpx;
+ height: 4rpx;
+ color: #fff;
}
}
+ .time_list {
+ position: absolute;
+ bottom: 28rpx;
+ left: 72rpx;
+ font-family: PingFang-SC;
+ font-size: 15rpx;
+ color: #cccccc;
+ width: 540rpx;
+ justify-content: space-around;
+ }
+ .time {
+ position: absolute;
+ bottom: 22rpx;
+ right: 24rpx;
+ font-family: PingFang-SC;
+ font-size: 18rpx;
+ color: #cccccc;
+ }
+}
+
+.echart-component-full {
+ width: 690rpx;
+ height: 320rpx;
+ margin: 0rpx auto;
+ background-color: #fff;
+ border-radius: 30rpx;
+ padding: 35rpx 25rpx 25rpx 35rpx;
+ box-sizing: border-box;
+ position: relative;
}
page {
diff --git a/src/moduleIOT/pages/iotCarePlan/components/Echart/index.tsx b/src/moduleIOT/pages/iotCarePlan/components/Echart/index.tsx
index a068416..0ffc012 100644
--- a/src/moduleIOT/pages/iotCarePlan/components/Echart/index.tsx
+++ b/src/moduleIOT/pages/iotCarePlan/components/Echart/index.tsx
@@ -11,9 +11,10 @@ import "./index.less";
interface Props {
series: any;
full: any;
+ time: any
}
-function Index({ series, full }: Props) {
+function Index({ series, full, time }: Props) {
const echartsRef = useRef(null);
const [options, setOptions] = useState({
animation: false,
@@ -49,24 +50,13 @@ function Index({ series, full }: Props) {
},
axisLabel: {
//坐标轴刻度标签的相关设置
- color: "#cccccc",
- fontSize: 8,
+ color: "#fff",
+ fontSize: 1,
},
axisTick: {
show: false,
},
- data: [
- "00:01",
- "00:02",
- "00:03",
- "00:04",
- "00:05",
- "00:06",
- "00:07",
- "00:08",
- "00:09",
- "00:10",
- ],
+ data: [],
},
yAxis: {
type: "value",
@@ -282,9 +272,25 @@ function Index({ series, full }: Props) {
// }
const level = [8, 7, 6, 5, 4, 3, 2];
+ const [isFull, setIsfull] = useState(false)
+ const [data, setData] = useState([
+ "00:01",
+ "00:02",
+ "00:03",
+ "00:04",
+ "00:05",
+ "00:06",
+ "00:07",
+ "00:08",
+ "00:09",
+ "00:10",
+ ],)
const [newOptions, setNewOptions] = useState(options);
- const updata = useCallback((res) => {
+ const updata = useCallback((res, times) => {
+ if (times.second == 0) {
+ return
+ }
// let option
// if (data) {
// option = JSON.parse(JSON.stringify(newParams))
@@ -292,19 +298,41 @@ function Index({ series, full }: Props) {
// option = JSON.parse(JSON.stringify(options))
// }
let option = JSON.parse(JSON.stringify(options))
+ let datas = JSON.parse(JSON.stringify(data))
+ if (times.min > 0 || times.second > 10) {
+ datas.splice(0, 1)
+ datas.push(formatTime(times))
+ }
+ setData(JSON.parse(JSON.stringify(datas)))
+ // option.xAxis.data = data
option.series = JSON.parse(JSON.stringify(res))
// 更新图表数据
setNewOptions(option);
- }, []);
+ }, [data]);
+
+
+
+ function formatTime(times: any) {
+ let mins
+ if (times.min < 10) {
+ mins = '0' + times.min;
+ } else {
+ mins = times.min;
+ }
+ let secs
+ if (times.second < 10) {
+ secs = '0' + times.second;
+ } else {
+ secs = times.second;
+ }
+ return `${mins.toString()}:${secs.toString()}`;
+ }
const cancelFull = useCallback((res) => {
- // let option = JSON.parse(JSON.stringify(newParams))
- // setNewOptions(option)
- // console.log(data, 88888);
- // data = !data
- // console.log(data, 88888);
full()
- }, [])
+ setIsfull(!isFull)
+
+ }, [isFull])
@@ -313,14 +341,14 @@ function Index({ series, full }: Props) {
}, [newOptions]);
useEffect(() => {
- updata(series);
+ updata(series, time);
}, [series]);
return (
-
+
-
+
- 实时能量
+ 实时能量
{level.map((item) => (
-
- {item}
-
+
+ {item}
+
))}
-
- 1
+
+ 1
+
+
+ {
+ data.map((times, index) => (
+ {times}
+ ))
+ }
- 时间
+ 时间
From 3589191eef974aae25d45f117596e18352f8f366 Mon Sep 17 00:00:00 2001
From: rongweikang <1174906669@qq.com>
Date: Fri, 29 Mar 2024 13:51:01 +0800
Subject: [PATCH 7/7] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=A3=B0=E9=9F=B3?=
=?UTF-8?q?=E6=8E=A7=E5=88=B6=E5=B9=B6=E4=BF=AE=E6=94=B9ui=E9=97=AE?=
=?UTF-8?q?=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/moduleIOT/pages/iotCarePlan/WL200.less | 24 ++--
src/moduleIOT/pages/iotCarePlan/WL200.tsx | 128 +++++++++++----------
2 files changed, 78 insertions(+), 74 deletions(-)
diff --git a/src/moduleIOT/pages/iotCarePlan/WL200.less b/src/moduleIOT/pages/iotCarePlan/WL200.less
index 5b0d95d..c3385c4 100644
--- a/src/moduleIOT/pages/iotCarePlan/WL200.less
+++ b/src/moduleIOT/pages/iotCarePlan/WL200.less
@@ -10,33 +10,29 @@
height: 790rpx;
background-color: #fff;
border-radius: 30rpx;
- .music-btn {
- position: absolute;
- top: 17rpx;
- right: 17rpx;
+ .music {
width: 54rpx;
height: 54rpx;
- background: #f8f8f8;
+ background: rgba(255, 255, 255, 0.6);
border-radius: 50%;
- z-index: 10;
- display: flex;
- justify-content: center;
- align-items: center;
- .music-btn_icon {
- width: 54rpx;
- height: 54rpx;
+ position: absolute;
+ right: 20rpx;
+ top: 20rpx;
+ image {
+ width: 100%;
+ height: 100%;
}
}
.video-or-image {
display: block;
width: 690rpx;
- height: 640rpx;
+ height: 690rpx;
border-radius: 30rpx;
animation-iteration-count: 1; // gif只播放一次
}
.iot-device {
width: 690rpx;
- height: 150rpx;
+ height: 100rpx;
display: flex;
align-items: center;
justify-content: center;
diff --git a/src/moduleIOT/pages/iotCarePlan/WL200.tsx b/src/moduleIOT/pages/iotCarePlan/WL200.tsx
index 32cc37f..86815d7 100644
--- a/src/moduleIOT/pages/iotCarePlan/WL200.tsx
+++ b/src/moduleIOT/pages/iotCarePlan/WL200.tsx
@@ -241,9 +241,9 @@ class IotCarePlanWL200 extends Component {
this.getWL200NursingHistory();
this.initData();
}
- componentDidMount() {}
+ componentDidMount() { }
- componentWillUnmount() {}
+ componentWillUnmount() { }
componentDidShow() {
console.log("页面显示了");
@@ -588,7 +588,7 @@ class IotCarePlanWL200 extends Component {
this.onNursingTap();
// 倒计时弹窗: 倒计时完成后,自动开始,并判断弹窗
let downNum = CountDownTime[this.state.ActiveModeItem.modeType] || 3;
- this.showCountdownFun(downNum, () => {});
+ this.showCountdownFun(downNum, () => { });
}, 500);
return;
@@ -620,7 +620,7 @@ class IotCarePlanWL200 extends Component {
};
// 绘制能量图
- drawProwerPicture() {}
+ drawProwerPicture() { }
/** 切换光照 */
onSwitchChange = async () => {
@@ -1385,7 +1385,7 @@ class IotCarePlanWL200 extends Component {
// 仅在切换模式的时候,弹窗倒计时.
if (type === "switch") {
let downNum = CountDownTime[ActiveModeItem.modeType] || 3;
- this.showCountdownFun(downNum, () => {}); // 倒计时弹窗
+ this.showCountdownFun(downNum, () => { }); // 倒计时弹窗
}
// 开始执行护理
@@ -1935,7 +1935,7 @@ class IotCarePlanWL200 extends Component {
if (currentTimeTimer) clearInterval(currentTimeTimer);
go(
"/recording/pages/face_report/face_report?id=" +
- this.state.currentDevice.id
+ this.state.currentDevice.id
);
};
@@ -2128,11 +2128,11 @@ class IotCarePlanWL200 extends Component {
{
{
isLarge
isClose
isShow={isEndCarePlan}
- title="提示"
- content="是否结束护理"
- textAlgin="center"
- cancelButtonText="取消"
- confirmButtonText="确定"
+ title='提示'
+ content='是否结束护理'
+ textAlgin='center'
+ cancelButtonText='取消'
+ confirmButtonText='确定'
close={this.cancelEndBtn}
confirm={this.confirmEndBtn}
/>
@@ -2165,7 +2165,7 @@ class IotCarePlanWL200 extends Component {
isLarge
isClose
isShow={isSwitchActiveMode}
- title="护理模式切换"
+ title='护理模式切换'
content={
{
onModeLockOpen={this.onModeLockOpen}
/>
}
- textAlgin="center"
- cancelButtonText="取消"
- confirmButtonText="确定"
+ textAlgin='center'
+ cancelButtonText='取消'
+ confirmButtonText='确定'
close={this.cancelModeSwitchBtn}
confirm={this.confirmModeSwitchBtn}
/>
@@ -2191,7 +2191,7 @@ class IotCarePlanWL200 extends Component {
isShow={isShowStepTips}
isLarge
isFirstEntry={false}
- confirmButtonText="知道了"
+ confirmButtonText='知道了'
data={ActiveModeItem.openSourceData}
close={this.closeStepTips}
/>
@@ -2200,10 +2200,10 @@ class IotCarePlanWL200 extends Component {
@@ -2212,11 +2212,11 @@ class IotCarePlanWL200 extends Component {
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}
/>
@@ -2225,17 +2225,17 @@ class IotCarePlanWL200 extends Component {
isShow={isShowTipsSave}
isClose
zIndex={10020}
- myClassName="level-up"
- title="提示"
+ myClassName='level-up'
+ title='提示'
content={
当前模式已护理部分时间
是否保存护理记录
}
- cancelButtonText="取消"
- confirmButtonText="确认"
- textAlgin="center"
+ cancelButtonText='取消'
+ confirmButtonText='确认'
+ textAlgin='center'
close={this.closeTipsSave}
cancel={this.cancelTipsSave}
confirm={this.confirmTipsSave}
@@ -2244,11 +2244,11 @@ class IotCarePlanWL200 extends Component {
{
/*不需要做处理*/
}}
@@ -2259,31 +2259,31 @@ class IotCarePlanWL200 extends Component {
deviceInfo={currentDevice}
close={this.connectionClose}
isDisconnect={!isConnectionBlutoot}
- offlineChange={() => {}}
+ offlineChange={() => { }}
pairingChange={this.pairingChange}
- upgradeFun={() => {}}
+ upgradeFun={() => { }}
/>
)}
- 正在同步护理记录...
+ 正在同步护理记录...
-
-
+
+
{!isShowNurse && (
-
-
-
-
+
+
+
+
+
+
护理时间:
- {currentTime}
+ {currentTime}
-
+