diff --git a/.env.development b/.env.development
index 3d2e7c3..b8dcfd2 100644
--- a/.env.development
+++ b/.env.development
@@ -1,7 +1,7 @@
# 王昊地址
#VITE_GLOB_API_URL=http://192.168.1.98
#开发环境
-VITE_GLOB_API_URL=https://api-jkglpt.iosp.ydpt.tech
+VITE_GLOB_API_URL=http://api-xj.tri.dt.io
#VITE_GLOB_API_URL=https://api.cqygjk.com
#健康监测工具报警-websocket
#VITE_GLOB_API_YIN_JI=ws://cqyt.dev.yg.dt.io/health-watch/websocket/watchMonitor
diff --git a/src/views/indexSun.vue b/src/views/indexSun.vue
index 6470a8f..2cf7ed1 100644
--- a/src/views/indexSun.vue
+++ b/src/views/indexSun.vue
@@ -20,7 +20,7 @@
![]()
{{ tabList[chooseType].label }}
-
参考范围: {{ tabList[chooseType].tips }}
+
{{ tabList[chooseType].tips }}
+
参考范围: {{ tabList[chooseType].tips }}
@@ -66,6 +67,7 @@
import item4Png from '/@/assets/images/threeLeftNew/item4.png';
import item5Png from '/@/assets/images/threeLeftNew/item5.png';
import item6Png from '/@/assets/images/threeLeftNew/item6.png';
+ import dayjs from 'dayjs';
const { getCenterInfo } = useUserStore();
const props = defineProps({
@@ -79,12 +81,13 @@
{
label: '心率',
value: 0,
- tips: '正常60~100次/分',
+ // tips: localStorage.getItem('monitorDataOne') ? JSON.parse(localStorage.getItem('monitorDataOne') || '{}')[0].tips : '',
+ tips: localStorage.getItem('monitorDataOne') ? JSON.parse(localStorage.getItem('monitorDataOne') || '{}')[0].tips : '',
},
{
label: '血氧',
value: 1,
- tips: '血氧饱和度95%~100%',
+ tips: '血氧饱和度90%~100%',
},
{
label: '压力',
@@ -145,6 +148,93 @@
// getData();
// });
+ const emit = defineEmits(['handleView']);
+
+ function clickPie(params: any) {
+ let p: any = {
+ endTime: dayjs().format('YYYY-MM-DD'),
+ };
+ switch (selectValue1.value) {
+ case 'week':
+ p['startTime'] = dayjs().subtract(1, 'week').format('YYYY-MM-DD');
+ break;
+ case 'month':
+ p['startTime'] = dayjs().subtract(1, 'month').format('YYYY-MM-DD');
+ break;
+ case 'year':
+ p['startTime'] = dayjs().subtract(1, 'year').format('YYYY-MM-DD');
+ break;
+ }
+ switch (chooseType.value) {
+ case 0:
+ p['type'] = 1;
+ p['search'] = heart(params);
+ p['title'] = `心率${params.name}`;
+ break;
+ case 1:
+ p['type'] = 2;
+ p['search'] = oxygen(params);
+ p['title'] = `血氧${params.name}`;
+ break;
+ case 2:
+ p['type'] = 3;
+ p['search'] = pressure(params);
+ p['title'] = `压力${params.name}`;
+ break;
+ case 3:
+ p['type'] = 5;
+ p['search'] = temperature(params);
+ p['title'] = `体温${params.name}`;
+ break;
+ case 5:
+ p['type'] = 7;
+ p['search'] = step(params);
+ p['title'] = `步数${params.name}`;
+ break;
+ }
+
+ if (p['search'] !== -1) {
+ emit('handleView', p);
+ }
+ }
+
+ function heart(params: any) {
+ if (params.dataIndex === 1) {
+ return 0;
+ }
+ return -1;
+ }
+ function oxygen(params: any) {
+ if (params.dataIndex === 1) {
+ return 0;
+ }
+ return -1;
+ }
+ function pressure(params: any) {
+ if (params.dataIndex === 3) {
+ return 0;
+ }
+ if (params.dataIndex === 2) {
+ return 1;
+ }
+ return -1;
+ }
+ function temperature(params: any) {
+ if (params.dataIndex === 2) {
+ return 0;
+ }
+ if (params.dataIndex === 1) {
+ return 1;
+ }
+ return -1;
+ }
+ function step(params: any) {
+ if (params.dataIndex === 0) {
+ return 0;
+ }
+ return -1;
+ }
+
function setTimer() {
if (timer.value) {
clearInterval(timer.value);
@@ -225,10 +315,6 @@
// });
// });
// }
- const emit = defineEmits(['handleView']);
- function handleView() {
- emit('handleView');
- }