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
literal 0
HcmV?d00001
diff --git a/src/config/models.js b/src/config/models.js
index 53c7907..86d0f77 100644
--- a/src/config/models.js
+++ b/src/config/models.js
@@ -1,11 +1,11 @@
/*
* @Date: 2021-11-20 10:26:39
* @LastEditors: JinxChen
- * @LastEditTime: 2023-05-13 22:16:53
+ * @LastEditTime: 2023-05-29 17:10:20
* @FilePath: \TelpoH5FrontendWeb\src\config\models.js
* @description:
*/
-export const VERSION_MODEL = '1.0.51F'; //版本号
+export const VERSION_MODEL = '1.0.52F'; //版本号
export const IMAGE_URL = {
production: 'http://zfb.ssjlai.com/web/',
test: 'http://zfb.ssjlai.com/web/',
@@ -23,4 +23,22 @@ export const BaiduStatisticsModel = {
production: "https://hm.baidu.com/hm.js?b33e6f07636c9fd9ec8cfe04979f1664", // 随手精灵百度流量统计 正式环境
test: "https://hm.baidu.com/hm.js?edb76b471e997167b7782c1513382771", // 随手精灵百度流量统计 测试环境
development: "https://hm.baidu.com/hm.js?edb76b471e997167b7782c1513382771", // 随手精灵百度流量统计 测试环境
-}
\ No newline at end of file
+};
+// 情绪模型
+export const EmotionModel = {
+ // 抑郁
+ depression: {
+ name: '抑郁',
+ type: 2
+ },
+ // 压力
+ stress: {
+ name: '压力',
+ type: 1
+ },
+ // 疲劳
+ tiredness: {
+ name: '疲劳',
+ type: 3
+ }
+};
\ No newline at end of file
diff --git a/src/main.js b/src/main.js
index d507f3e..b0b0fc5 100644
--- a/src/main.js
+++ b/src/main.js
@@ -1,7 +1,7 @@
/*
* @Date: 2022-01-19 10:08:26
* @LastEditors: JinxChen
- * @LastEditTime: 2023-05-10 09:15:16
+ * @LastEditTime: 2023-05-30 10:58:58
* @FilePath: \TelpoH5FrontendWeb\src\main.js
* @description:
*/
@@ -14,6 +14,8 @@ import '@/assets/css/reset.scss';
import dayjs from 'dayjs';
// ui库按需引入
import 'vant/lib/index.css';
+// 引入echarts
+import * as echarts from 'echarts';
import { BaiduStatisticsModel } from '@/config/models';
import {
Button,
@@ -100,13 +102,14 @@ Vue
Vue.config.productionTip = false;
Vue.config.devtools = true;
+
// 全局配置 loading
Toast.setDefaultOptions('success', {
- duration: 2500,
+ duration: 1500,
forbidClick: true,
});
Toast.setDefaultOptions('loading', {
- duration: 0,
+ duration: 1500,
forbidClick: true,
});
Dialog.setDefaultOptions({
@@ -115,6 +118,7 @@ Dialog.setDefaultOptions({
});
Vue.config.productionTip = false;
Vue.prototype.$dayjs = dayjs;
+Vue.prototype.$echarts = echarts;
Vue.prototype.$bus = new Vue();
router.afterEach((to, from, next) => {
// 创建百度统计js
diff --git a/src/router/index.js b/src/router/index.js
index 88fa066..c106406 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -1,7 +1,7 @@
/*
* @Date: 2023-02-25 16:34:35
* @LastEditors: JinxChen
- * @LastEditTime: 2023-03-24 14:40:54
+ * @LastEditTime: 2023-05-29 17:04:22
* @FilePath: \TelpoH5FrontendWeb\src\router\index.js
* @description:
*/
@@ -31,6 +31,8 @@ const routes = [
{ path: '/cardActive', name: 'cardActive', component: resolve => require(['@/views/card-active'], resolve) },
{ path: '/alarmDetails', name: 'alarmDetails', component: resolve => require(['@/views/alarm/alarm-details'], resolve) },
+ // 健康-心理监测详情,抑郁,压力和疲劳
+ { path: '/psychological', name: 'psychological', component: resolve => require(['@/views/health/psychological'], resolve) },
];
const router = new VueRouter({
diff --git a/src/views/health/psychological/index.scss b/src/views/health/psychological/index.scss
new file mode 100644
index 0000000..0d3f1fc
--- /dev/null
+++ b/src/views/health/psychological/index.scss
@@ -0,0 +1,312 @@
+$newBlue: #638EE4;
+.psychological-container{
+ height: 100vh;
+ width: 100%;
+ overflow: hidden;
+ background-color: #fff;
+ .main {
+ height: calc(100vh - 45px);
+ overflow: scroll;
+ .top {
+ flex: 1;
+
+ .tab-bar {
+ padding: 23px 13px 0 13px;
+ .date-tab-con {
+ padding: 10px 0;
+ height: 35px;
+ display: flex;
+ justify-content: flex-start;
+ align-items: center;
+ .date-tab-list {
+ display: flex;
+ justify-content: flex-start;
+ align-items: center;
+ flex: 1;
+ border-radius: 15px;
+ color: #fff;
+ .date-tab-item {
+ height: 35px;
+ width: 100%;
+ color: #6D6D6D;
+ font-size: 18px;
+ @include center();
+ border: 1px solid $newBlue;
+ &.active {
+ background-color: $newBlue;
+ color: #fff;
+ }
+ &.notClick {
+ background-color: $border_color;
+ color: #fff;
+ border: 1px solid #fff;
+ }
+ }
+ .date-tab-item:first-child {
+ border-top-left-radius: 15px;
+ border-bottom-left-radius: 15px;
+ }
+ .date-tab-item:last-child {
+ border-top-right-radius: 15px;
+ border-bottom-right-radius: 15px;
+ }
+ }
+ }
+ }
+ .title {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding: 27px 16px 16px 13px;
+ font-size: 18px;
+ .title-left {
+ font-weight: bold;
+ }
+ }
+ .monitoring-count {
+ text-align: left;
+ padding: 3px 14px;
+ line-height: 20px;
+ p {
+ font-size: 12px;
+ color: #8B8B8B;
+ }
+ }
+ .pie-chart-con {
+ flex: 1;
+ padding: 17px 0 45px 0;
+ display: flex;
+ justify-content: space-between;
+ align-items: flex-start;
+ .pie-chart-left {
+ position: relative;
+ height: 180px;
+ padding-left: 23px;
+ width: 40%;
+ @include center();
+ #pieChart {
+ height: 106px;
+ width: 106px;
+ }
+ }
+ .pie-chart-right {
+ height: 180px;
+ width: 55%;
+ padding-right: 20px;
+ @include center();
+ .list {
+ flex-direction: column;
+ .item {
+ width: 100%;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ font-size: 15px;
+ padding: 9px 0;
+ .item-left {
+ display: flex;
+ justify-content: flex-start;
+ align-items: center;
+ padding-right: 10px;
+ .circle {
+ height: 12px;
+ width: 12px;
+ margin: 0 4px;
+ }
+ span {
+ font-size: 15px;
+ }
+ .text {
+ color: #000;
+ }
+ }
+ .item-right {
+ display: flex;
+ justify-content: flex-end;
+ align-items: center;
+ }
+ }
+ }
+ }
+ }
+ .statistics {
+ position: relative;
+ padding: 0 12px 36px 36px;
+ .list {
+ flex: 1;
+ width: 100%;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ font-size: 16px;
+ .item {
+ @include center();
+ width: 58px;
+ /* height: px2rem(136); */
+ flex-direction: column;
+ .top {
+ font-size: 12px;
+ }
+ .middle {
+ font-size: 24px;
+ font-weight: bold;
+ padding: 16px 5px 11px 5px;
+ }
+ .bottom {
+ font-size: 9px
+ }
+ }
+ }
+ }
+ }
+ .line {
+ position: relative;
+ height: 11px;
+ background-color: $lineGray;
+ }
+ .bottom {
+ flex: 1;
+ .echart-container {
+ height: 400px;
+ background-color:#fff;
+ padding: 0 5px;
+ .echart {
+ height: 400px;
+ padding: 0 5px;
+ }
+ }
+ .line-gray {
+ height: 11px;
+ width: 100%;
+ background-color: $lineGray;
+ margin-top: 30px;
+ }
+ .result {
+ .result-con {
+ height: 100%;
+ background-color: #fff;
+ border-radius: 10px;
+ &.reminder {
+ padding: 0 16px 20px 16px;
+ }
+ .title {
+ display: flex;
+ justify-content: flex-start;
+ align-items: flex-start;
+ flex-direction: column;
+ margin-bottom: 10px;
+ span {
+ font-size: 18px;
+ font-weight: bold;
+ }
+ .font-28 {
+ font-weight: 400;
+ font-size: 13px;
+ color: #8B8B8B;
+ text-align: left;
+ }
+ .title-no-data {
+ padding: 34px 0 13px 15px;
+ }
+ p {
+ font-size: 12px;
+ color: $newBlue;
+ }
+ .title-emo {
+ font-size: 24px;
+ padding: 14px 0 21px 0;
+ }
+ .no-data {
+ height: 250px;
+ width: 100%;
+ @include center();
+ flex-direction: column;
+ img {
+ height: 110px;
+ width: 175px;
+ }
+ p {
+ color: #999;
+ font-size: 12px;
+ padding: 20px 0 65px 0;
+ }
+ }
+ }
+ .title-text {
+ padding: 34px 0 13px 15px;
+ }
+ .title-reminder {
+ padding: 34px 0 0 0;
+ }
+ .friendly-reminder, .warm-reminder {
+ display: flex;
+ justify-content: flex-start;
+ align-items: flex-start;
+ flex-direction: column;
+ margin-bottom: 10px;
+ background-color: #F2F2F2;
+ padding: 20px 19px 19px 14px;
+ p {
+ font-weight: bold;
+ text-align: left;
+ padding-bottom: 11px;
+ font-size: 15px;
+ }
+ span {
+ text-align: left;
+ font-size: 12px;
+ }
+ }
+ .mood-list {
+ display: grid;
+ grid-template-columns: repeat(2, 1fr); //定义了一个 2x2 的网格布
+ grid-template-rows: repeat(2, 1fr);
+ gap: 21px;
+ //width: 100%;
+ padding: 0 44px 20px 37px;
+ .item {
+ width: 137px;
+ height: 94px;
+ /* padding: px2rem(47) px2rem(57) px2rem(49) px2rem(57); */
+ background-color: #F2F6FF;
+ @include center();
+ flex-direction: column;
+ p {
+ font-size: 14px;
+ padding: 0;
+ color: #666666;
+ .day {
+ padding: 5px;
+ font-size: 28px;
+ }
+ .day-text {
+ font-size: 12px
+ }
+ }
+ }
+ }
+ .mood-list-no-data {
+ height: 250px;
+ width: 100%;
+ .no-data {
+ @include center();
+ flex-direction: column;
+ img {
+ height: 110px;
+ width: 175px;
+ }
+ p {
+ color: #999;
+ font-size: 12px;
+ padding: 20px 0 65px 0;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ .title {
+ font-size: 16px;
+ }
+}
\ No newline at end of file
diff --git a/src/views/health/psychological/index.vue b/src/views/health/psychological/index.vue
new file mode 100644
index 0000000..a9d466c
--- /dev/null
+++ b/src/views/health/psychological/index.vue
@@ -0,0 +1,1077 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
监测次数:{{ monitoringCount || '--' }}次
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{ item.text || '--' }}
+
+
+
+ {{ item.count ? item.count + '次' : '--'}}
+ {{ item.percentage ? item.percentage + '%' : '--'}}
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.label || '--' }}
+
+
+
+ {{ item.value || '--' }}
+
+
+
+ {{ item.time || '--' }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
结果解读
+
+
+
暂无数据
+
+
+
+
+
+
+
+
+
结果解读
+
+
{{ result }}
+
+
继续保持积极乐观,培养健康的生活习惯,预防消极事件对情绪带来的不良影响。
+
+
+
+
友情提示:
+
+
继续保持积极乐观,培养健康的生活习惯,预防消极事件对情绪带来的不良影响。
+
+
+
+
温馨提示:
+
+
继续保持积极乐观,培养健康的生活习惯,预防消极事件对情绪带来的不良影响。
+
+
+
+
+
+
本周概览
+
+
+
+ {{ item.days }}
+ 天
+
+
+
{{ item.text }}
+
+
+
+
+
+
暂无数据
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
From fbd292f25609289ebec37e8e876348ee3d38f6a6 Mon Sep 17 00:00:00 2001
From: JinxChen <2183691628@qq.com>
Date: Tue, 30 May 2023 11:08:57 +0800
Subject: [PATCH 05/27] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20readme?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
README.md | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 0979f76..3e85027 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
@@ -431,3 +431,6 @@ update
feature
- 增加 心理监测详情页面,抑郁,压力和疲劳当天图表展示
- 增加 echarts图表依赖
+- 王泽林
+ - 增加 心理监测-问卷调查页面
+ - 增加 心理监测-建模查询页面
\ No newline at end of file
From 15ba4efca54c677962f46e70efb86fa23e373bb5 Mon Sep 17 00:00:00 2001
From: JinxChen <2183691628@qq.com>
Date: Tue, 30 May 2023 15:39:51 +0800
Subject: [PATCH 06/27] =?UTF-8?q?update=20-=20=E5=BF=83=E7=90=86=E7=9B=91?=
=?UTF-8?q?=E6=B5=8B=E8=AF=A6=E6=83=85=E9=A1=B5=E9=9D=A2=20=20=20=20=20-?=
=?UTF-8?q?=20=E5=A2=9E=E5=8A=A0=20=E8=BF=94=E5=9B=9E=E5=8A=9F=E8=83=BD=20?=
=?UTF-8?q?=20=20=20=20-=20=E4=BF=AE=E6=94=B9=20=E9=A1=B5=E9=9D=A2?=
=?UTF-8?q?=E6=A0=87=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
README.md | 9 ++++++++-
src/config/models.js | 2 +-
src/views/health/psychological/index.vue | 2 +-
3 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/README.md b/README.md
index 3e85027..6b574e7 100644
--- a/README.md
+++ b/README.md
@@ -433,4 +433,11 @@ feature
- 增加 echarts图表依赖
- 王泽林
- 增加 心理监测-问卷调查页面
- - 增加 心理监测-建模查询页面
\ No newline at end of file
+ - 增加 心理监测-建模查询页面
+
+## v1.0.53
+`2023.5.30`
+update
+- 心理监测详情页面
+ - 增加 返回功能
+ - 修改 页面标题
\ No newline at end of file
diff --git a/src/config/models.js b/src/config/models.js
index 86d0f77..9e7aed7 100644
--- a/src/config/models.js
+++ b/src/config/models.js
@@ -5,7 +5,7 @@
* @FilePath: \TelpoH5FrontendWeb\src\config\models.js
* @description:
*/
-export const VERSION_MODEL = '1.0.52F'; //版本号
+export const VERSION_MODEL = '1.0.53F'; //版本号
export const IMAGE_URL = {
production: 'http://zfb.ssjlai.com/web/',
test: 'http://zfb.ssjlai.com/web/',
diff --git a/src/views/health/psychological/index.vue b/src/views/health/psychological/index.vue
index a9d466c..f2b6b2f 100644
--- a/src/views/health/psychological/index.vue
+++ b/src/views/health/psychological/index.vue
@@ -1,6 +1,6 @@
-
+
From 84d4e46cf2e49d0a62aa743e63a703930e6c3e7d Mon Sep 17 00:00:00 2001
From: JinxChen <2183691628@qq.com>
Date: Wed, 31 May 2023 09:13:23 +0800
Subject: [PATCH 07/27] =?UTF-8?q?update=20-=20=E5=BF=83=E7=90=86=E7=9B=91?=
=?UTF-8?q?=E6=B5=8B=E8=AF=A6=E6=83=85=E9=A1=B5=E9=9D=A2=20=20=20=20=20-?=
=?UTF-8?q?=20=E4=BC=98=E5=8C=96=20=E5=9B=BE=E8=A1=A8=E6=98=BE=E7=A4=BA?=
=?UTF-8?q?=E5=86=85=E5=AE=B9=EF=BC=8C=E4=B8=A4=E8=BE=B9=E5=A2=9E=E5=8A=A0?=
=?UTF-8?q?=E7=95=99=E7=99=BD=E5=8C=BA=E5=9F=9F=20=20=20=20=20-=20?=
=?UTF-8?q?=E4=BC=98=E5=8C=96=207=E5=A4=A9=E5=92=8C30=E5=A4=A9=E5=9B=BE?=
=?UTF-8?q?=E8=A1=A8=E5=9C=86=E8=A7=92=E6=9F=B1=E5=BD=A2=E5=9B=BE=E5=B1=95?=
=?UTF-8?q?=E7=A4=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
README.md | 9 ++++++++-
src/config/models.js | 2 +-
src/views/health/psychological/index.vue | 13 +++++++------
3 files changed, 16 insertions(+), 8 deletions(-)
diff --git a/README.md b/README.md
index 6b574e7..6690104 100644
--- a/README.md
+++ b/README.md
@@ -440,4 +440,11 @@ feature
update
- 心理监测详情页面
- 增加 返回功能
- - 修改 页面标题
\ No newline at end of file
+ - 修改 页面标题
+
+## v1.0.54
+`2023.5.31`
+update
+- 心理监测详情页面
+ - 优化 图表显示内容,两边增加留白区域
+ - 优化 7天和30天图表圆角柱形图展示
\ No newline at end of file
diff --git a/src/config/models.js b/src/config/models.js
index 9e7aed7..aa77313 100644
--- a/src/config/models.js
+++ b/src/config/models.js
@@ -5,7 +5,7 @@
* @FilePath: \TelpoH5FrontendWeb\src\config\models.js
* @description:
*/
-export const VERSION_MODEL = '1.0.53F'; //版本号
+export const VERSION_MODEL = '1.0.54F'; //版本号
export const IMAGE_URL = {
production: 'http://zfb.ssjlai.com/web/',
test: 'http://zfb.ssjlai.com/web/',
diff --git a/src/views/health/psychological/index.vue b/src/views/health/psychological/index.vue
index f2b6b2f..15f9c1a 100644
--- a/src/views/health/psychological/index.vue
+++ b/src/views/health/psychological/index.vue
@@ -407,7 +407,6 @@ export default {
axisLine: {
show: false
},
- boundaryGap: false,
textStyle: {
fontSize: 13
},
@@ -423,12 +422,14 @@ export default {
},
showMinLabel: true, //显示最小值
showMaxLabel: true, //显示最大值
+ nameLocation: 'center',
+ boundaryGap: ['20%', '20%'],
axisLabel: {
show: true,
fontSize: 12,
- padding: [0, -15, -20, 0], //表示 [上, 右, 下, 左] 的边距
- //margin: 10,
- verticalAlign: "bottom"
+ /* padding: [0, -15, -20, 0], */ //表示 [上, 右, 下, 左] 的边距
+ margin: 10,
+ /* verticalAlign: "bottom" */
},
data: this.xAxisData
},
@@ -895,8 +896,8 @@ export default {
name: `轻度${this.emoName}倾向`,
type: "scatter",
data: [60, 60, 50, 60, 59, 60, 60],
- symbol: "rect",
- symbolSize: [15, 40],
+ symbol: "path://M9 0h0a9 9 0 0 2 9 9v55a9 9 0 0 2-9 9h0a9 9 0 0 2-9-9v-55a9 9 0 0 2 10-9z",
+ symbolSize: [60, 60],
symbolKeepAspect: true,
itemStyle: {
borderColor: "#6CE463", // 圆点边框颜色
From d87387441e2eb16b39f506c80d8f428efdd75184 Mon Sep 17 00:00:00 2001
From: JinxChen <2183691628@qq.com>
Date: Wed, 31 May 2023 21:40:21 +0800
Subject: [PATCH 08/27] =?UTF-8?q?update=20-=20=E5=BF=83=E7=90=86=E7=9B=91?=
=?UTF-8?q?=E6=B5=8B=E8=AF=A6=E6=83=85=E9=A1=B5=E9=9D=A2=20=20=20=20=20-?=
=?UTF-8?q?=20=E5=A2=9E=E5=8A=A0=20=E5=8A=A8=E6=80=81=E5=A1=AB=E5=85=85uid?=
=?UTF-8?q?=20-=20=E9=97=AE=E5=8D=B7=E8=B0=83=E6=9F=A5=E9=A1=B5=E9=9D=A2?=
=?UTF-8?q?=20=20=20=20=20-=20=E4=BF=AE=E5=A4=8D=20toast=E6=97=A0=E9=99=90?=
=?UTF-8?q?=E5=8A=A0=E8=BD=BD=E7=9A=84=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
README.md | 10 +++++++++-
src/config/models.js | 2 +-
src/views/health/psychological/index.vue | 6 ++++--
src/views/psychological-questionnaire/index.vue | 4 ++--
4 files changed, 16 insertions(+), 6 deletions(-)
diff --git a/README.md b/README.md
index 6690104..b7ab751 100644
--- a/README.md
+++ b/README.md
@@ -447,4 +447,12 @@ update
update
- 心理监测详情页面
- 优化 图表显示内容,两边增加留白区域
- - 优化 7天和30天图表圆角柱形图展示
\ No newline at end of file
+ - 优化 7天和30天图表圆角柱形图展示
+
+## v1.0.55
+`2023.5.31`
+update
+- 心理监测详情页面
+ - 增加 动态填充uid
+- 问卷调查页面
+ - 修复 toast无限加载的问题
\ No newline at end of file
diff --git a/src/config/models.js b/src/config/models.js
index aa77313..424451a 100644
--- a/src/config/models.js
+++ b/src/config/models.js
@@ -5,7 +5,7 @@
* @FilePath: \TelpoH5FrontendWeb\src\config\models.js
* @description:
*/
-export const VERSION_MODEL = '1.0.54F'; //版本号
+export const VERSION_MODEL = '1.0.55F'; //版本号
export const IMAGE_URL = {
production: 'http://zfb.ssjlai.com/web/',
test: 'http://zfb.ssjlai.com/web/',
diff --git a/src/views/health/psychological/index.vue b/src/views/health/psychological/index.vue
index 15f9c1a..6b46e75 100644
--- a/src/views/health/psychological/index.vue
+++ b/src/views/health/psychological/index.vue
@@ -309,6 +309,7 @@ export default {
],
// 选中的日历日期
selectDate: '',
+ uid: ''
};
},
computed: {
@@ -630,6 +631,7 @@ export default {
if (params) {
this.emoName = EmotionModel[params.name].name;
this.emoType = EmotionModel[params.name].type;
+ this.uid = params.uid;
console.log("当前情绪是", EmotionModel[params.name].name);
}
},
@@ -637,7 +639,7 @@ export default {
getCalendarData() {
let reqUrl = `https://dbmq.rzliot.com/heart/api/Data/GetCalendarData`;
let reqParams = {
- uid: "tenghao",
+ uid: this.uid,
month: this.$dayjs(new Date()).format('YYYY-MM')
};
axios.get(reqUrl, {
@@ -672,7 +674,7 @@ export default {
? this.$dayjs(date).format("YYYY-MM-DD")
: this.$dayjs(this.defaultDate).format("YYYY-MM-DD") /* "2023-05-23" */;
let reqParams = {
- uid: "tenghao",
+ uid: this.uid,
startDate: reqDate,
endDate: reqDate,
type: this.emoType
diff --git a/src/views/psychological-questionnaire/index.vue b/src/views/psychological-questionnaire/index.vue
index 6880cb6..beb0c1e 100644
--- a/src/views/psychological-questionnaire/index.vue
+++ b/src/views/psychological-questionnaire/index.vue
@@ -177,7 +177,7 @@ export default {
}
} else {
this.$toast(re.msg)
- }
+ }
},
async submit() {
let temp = {
@@ -226,7 +226,7 @@ export default {
this.$toast.loading({
message: '',
forbidClick: true,
- duration: 0,
+ duration: 1500,
})
}, 100)
let baseUrl = 'https://dbmq.rzliot.com/heart'
From c1935ed419a9e640abc3b2966e96093149428821 Mon Sep 17 00:00:00 2001
From: JinxChen <2183691628@qq.com>
Date: Thu, 1 Jun 2023 14:52:11 +0800
Subject: [PATCH 09/27] =?UTF-8?q?feature=20-=20=E5=A2=9E=E5=8A=A0=20?=
=?UTF-8?q?=E4=B8=80=E4=B8=AA=E5=BF=83=E7=90=86=E8=AF=A6=E6=83=85=E6=B1=87?=
=?UTF-8?q?=E6=80=BB=E9=A1=B5=E9=9D=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
README.md | 9 +-
src/assets/img/moderate.png | Bin 0 -> 1904 bytes
src/assets/img/regardless.png | Bin 0 -> 1383 bytes
src/config/models.js | 2 +-
src/router/index.js | 9 ++
.../health/psychological-main/index.scss | 92 ++++++++++++
src/views/health/psychological-main/index.vue | 140 ++++++++++++++++++
7 files changed, 249 insertions(+), 3 deletions(-)
create mode 100644 src/assets/img/moderate.png
create mode 100644 src/assets/img/regardless.png
create mode 100644 src/views/health/psychological-main/index.scss
create mode 100644 src/views/health/psychological-main/index.vue
diff --git a/README.md b/README.md
index b7ab751..6defcdc 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
@@ -455,4 +455,9 @@ update
- 心理监测详情页面
- 增加 动态填充uid
- 问卷调查页面
- - 修复 toast无限加载的问题
\ No newline at end of file
+ - 修复 toast无限加载的问题
+
+## v1.0.56
+`2023.6.1`
+feature
+- 增加 一个心理详情汇总页面
\ No newline at end of file
diff --git a/src/assets/img/moderate.png b/src/assets/img/moderate.png
new file mode 100644
index 0000000000000000000000000000000000000000..d106db9ad7fb49c193ddc84a9ab138a79004df52
GIT binary patch
literal 1904
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
literal 0
HcmV?d00001
diff --git a/src/config/models.js b/src/config/models.js
index 424451a..59f0f71 100644
--- a/src/config/models.js
+++ b/src/config/models.js
@@ -5,7 +5,7 @@
* @FilePath: \TelpoH5FrontendWeb\src\config\models.js
* @description:
*/
-export const VERSION_MODEL = '1.0.55F'; //版本号
+export const VERSION_MODEL = '1.0.56F'; //版本号
export const IMAGE_URL = {
production: 'http://zfb.ssjlai.com/web/',
test: 'http://zfb.ssjlai.com/web/',
diff --git a/src/router/index.js b/src/router/index.js
index cf7fb38..83e6896 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -1,3 +1,10 @@
+/*
+ * @Date: 2023-05-30 15:37:06
+ * @LastEditors: JinxChen
+ * @LastEditTime: 2023-06-01 09:48:23
+ * @FilePath: \TelpoH5FrontendWeb\src\router\index.js
+ * @description:
+ */
/*
* @Date: 2023-02-25 16:34:35
* @LastEditors: JinxChen
@@ -38,6 +45,8 @@ const routes = [
// 健康-心理监测详情,抑郁,压力和疲劳
{ path: '/psychological', name: 'psychological', component: resolve => require(['@/views/health/psychological'], resolve) },
+ // 健康-抑郁,压力和疲劳汇总入口
+ { path: '/psychologicalMain', name: 'psychologicalMain', component: resolve => require(['@/views/health/psychological-main'], resolve) },
];
const router = new VueRouter({
diff --git a/src/views/health/psychological-main/index.scss b/src/views/health/psychological-main/index.scss
new file mode 100644
index 0000000..1d9511c
--- /dev/null
+++ b/src/views/health/psychological-main/index.scss
@@ -0,0 +1,92 @@
+.psychological-main-container {
+ height: 100vh;
+ width: 100%;
+ overflow: hidden;
+ background-color: #F4F8FB;
+ .main {
+ height: calc(100vh - 45px);
+ background-color: #F4F8FB;
+ padding: 15px;
+ .list {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ background-color: #FFFFFF;
+ border-radius: 15px;
+ padding: 10px;
+ .item {
+ display: flex;
+ justify-content: center;
+ align-items: flex-start;
+ flex-direction: column;
+ height: 103px;
+ width: 93px;
+ /* margin: 0 5px;
+ padding: 5px; */
+ padding: 5px;
+ border-radius: 10px;
+ &.depression {
+ background: linear-gradient(-29deg, #F2F9FE, #D7E8FD);
+ }
+ &.stress {
+ background: linear-gradient(-29deg, #F9E2E6, #FEF8F4);
+ }
+ &.tiredness {
+ background: linear-gradient(-29deg, #FDFBEE, #FAE4CC);
+ }
+ p {
+ font-size: 16px;
+ }
+ .health-value {
+ font-size: 24px;
+ font-weight: bold;
+ }
+ .health-name {
+ color: #282828;
+ font-size: 14px;
+ }
+ .health-result {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ .left {
+ @include center();
+ border-radius: 8px;
+ padding: 2px 5px;
+ margin: 6px 0;
+ &.depression {
+ background: #BCCDE5;
+ }
+ &.stress {
+ background: #F0D1D4;
+ }
+ &.tiredness {
+ background: #EAD9C5;
+ }
+ .result {
+ font-size: 12px;
+ color: #ffffff;
+ }
+ }
+ .right {
+ @include center();
+ img {
+ height: 18px;
+ width: 18px;
+ margin-left: 3px
+ }
+ }
+ }
+ .health-time {
+ display: flex;
+ justify-content: flex-start;
+ align-items: flex-start;
+ .time {
+ font-size: 12px;
+ color: #8B8B8B;
+ }
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/views/health/psychological-main/index.vue b/src/views/health/psychological-main/index.vue
new file mode 100644
index 0000000..10e84e2
--- /dev/null
+++ b/src/views/health/psychological-main/index.vue
@@ -0,0 +1,140 @@
+
+
+
+
+
+
+
+ {{ item.value || '--' }}
+
+
+ {{ item.name || '--'}}
+
+
+
+
+ {{ item.result || '暂无数据'}}
+
+
+
+
+
+
+
+
+
+
{{ item.time || '--' }}
+
+
+
+
+
+
+
+
+
+
From 4d4d3e7188d24da04c9e8ef76c2a4f5c448b3bea Mon Sep 17 00:00:00 2001
From: JinxChen <2183691628@qq.com>
Date: Thu, 1 Jun 2023 18:08:42 +0800
Subject: [PATCH 10/27] =?UTF-8?q?update=20-=20=E5=BF=83=E7=90=86=E5=81=A5?=
=?UTF-8?q?=E5=BA=B7=20=20=20=20=20-=20=E5=BB=BA=E6=A8=A1=E8=BF=9B?=
=?UTF-8?q?=E5=BA=A6=E6=9F=A5=E8=AF=A2=EF=BC=8C=E9=97=AE=E5=8D=B7=E8=B0=83?=
=?UTF-8?q?=E6=9F=A5=EF=BC=8C=E5=BF=83=E7=90=86=E8=AF=A6=E6=83=85=E6=B1=87?=
=?UTF-8?q?=E6=80=BB=E5=92=8C=E5=BF=83=E7=90=86=E5=81=A5=E5=BA=B7=E6=8A=91?=
=?UTF-8?q?=E9=83=81=EF=BC=8C=E5=8E=8B=E5=8A=9B=E5=92=8C=E7=96=B2=E5=8A=B3?=
=?UTF-8?q?=E8=AF=A6=E6=83=85=E9=A1=B5=E9=9D=A2=20=20=20=20=20=20=20=20=20?=
=?UTF-8?q?-=20=E5=A2=9E=E5=8A=A0=20=E6=8E=A5=E5=8F=A3=E8=AF=B7=E6=B1=82?=
=?UTF-8?q?=E6=97=B6=E5=B8=A6=E4=B8=8A=E4=BB=8E=E9=9A=8F=E6=89=8B=E7=B2=BE?=
=?UTF-8?q?=E7=81=B5=E4=BC=A0=E8=BF=87=E6=9D=A5=E7=9A=84token?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
README.md | 9 ++++++-
src/config/models.js | 4 +--
src/store/index.js | 13 ++++++++--
src/views/health/psychological-main/index.vue | 4 ++-
src/views/health/psychological/index.vue | 6 +++--
src/views/psychological-modeling/index.vue | 25 +++++++++++++------
.../psychological-questionnaire/index.vue | 14 +++++++----
7 files changed, 54 insertions(+), 21 deletions(-)
diff --git a/README.md b/README.md
index 6defcdc..6774579 100644
--- a/README.md
+++ b/README.md
@@ -460,4 +460,11 @@ update
## v1.0.56
`2023.6.1`
feature
-- 增加 一个心理详情汇总页面
\ No newline at end of file
+- 增加 一个心理详情汇总页面
+
+## v1.0.57
+`2023.6.1`
+update
+- 心理健康
+ - 建模进度查询,问卷调查,心理详情汇总和心理健康抑郁,压力和疲劳详情页面
+ - 增加 接口请求时带上从随手精灵传过来的token
\ No newline at end of file
diff --git a/src/config/models.js b/src/config/models.js
index 59f0f71..fd39a14 100644
--- a/src/config/models.js
+++ b/src/config/models.js
@@ -1,11 +1,11 @@
/*
* @Date: 2021-11-20 10:26:39
* @LastEditors: JinxChen
- * @LastEditTime: 2023-05-29 17:10:20
+ * @LastEditTime: 2023-06-01 18:06:38
* @FilePath: \TelpoH5FrontendWeb\src\config\models.js
* @description:
*/
-export const VERSION_MODEL = '1.0.56F'; //版本号
+export const VERSION_MODEL = '1.0.57F'; //版本号
export const IMAGE_URL = {
production: 'http://zfb.ssjlai.com/web/',
test: 'http://zfb.ssjlai.com/web/',
diff --git a/src/store/index.js b/src/store/index.js
index 46ea7a6..10c23ad 100644
--- a/src/store/index.js
+++ b/src/store/index.js
@@ -1,7 +1,7 @@
/*
* @Date: 2022-08-17 16:18:02
* @LastEditors: JinxChen
- * @LastEditTime: 2023-02-25 15:23:43
+ * @LastEditTime: 2023-06-01 17:45:48
* @FilePath: \TelpoH5FrontendWeb\src\store\index.js
* @description:
*/
@@ -19,7 +19,8 @@ export default new Vuex.Store({
wxAuthCode: '',
openId: '',
appId: '',
- isFromWx: null
+ isFromWx: null,
+ ssjlToken: '',
},
mutations: {
imei(state, imei) {
@@ -50,6 +51,10 @@ export default new Vuex.Store({
state.isFromWx = isFromWx;
window.localStorage[prefix + 'isFromWx'] = isFromWx;
},
+ ssjlToken(state, ssjlToken) {
+ state.ssjlToken = ssjlToken;
+ window.localStorage[prefix + 'ssjlToken'] = ssjlToken;
+ },
},
getters: {
imei: state => {
@@ -80,6 +85,10 @@ export default new Vuex.Store({
if (state.isFromWx != '') return state.isFromWx;
return window.localStorage[prefix + 'isFromWx'] == null ? '' : window.localStorage[prefix + 'isFromWx'];
},
+ ssjlToken: state => {
+ if (state.ssjlToken != '') return state.ssjlToken;
+ return window.localStorage[prefix + 'ssjlToken'] == null ? '' : window.localStorage[prefix + 'ssjlToken'];
+ },
},
actions: {},
modules: {}
diff --git a/src/views/health/psychological-main/index.vue b/src/views/health/psychological-main/index.vue
index 10e84e2..c8e4afe 100644
--- a/src/views/health/psychological-main/index.vue
+++ b/src/views/health/psychological-main/index.vue
@@ -62,13 +62,15 @@ export default {
},
getHomeData() {
this.$toast.loading('数据加载中');
+ console.log("this.$store.getters.ssjlToken", this.$store.getters.ssjlToken);
let reqUrl = `https://dbmq.rzliot.com/heart/api/Data/GetHomeData`;
let reqParams = {
uid: this.uid,
date: this.$dayjs(new Date()).format('YYYY-MM-DD')
};
axios.get(reqUrl, {
- params: { ...reqParams }
+ params: { ...reqParams },
+ headers: { 'AuthToken': this.$store.getters.ssjlToken }
}).then(res => {
console.log("res", res);
const data = res.data.response;
diff --git a/src/views/health/psychological/index.vue b/src/views/health/psychological/index.vue
index 6b46e75..3b3f5ba 100644
--- a/src/views/health/psychological/index.vue
+++ b/src/views/health/psychological/index.vue
@@ -643,7 +643,8 @@ export default {
month: this.$dayjs(new Date()).format('YYYY-MM')
};
axios.get(reqUrl, {
- params: { ...reqParams }
+ params: { ...reqParams },
+ headers: { 'AuthToken': this.$store.getters.ssjlToken }
}).then(res => {
console.log("res", res);
if (res.data) {
@@ -683,7 +684,8 @@ export default {
let reqUrl = `https://dbmq.rzliot.com/heart/api/Data/GetHisData`;
axios
.get(reqUrl, {
- params: { ...reqParams }
+ params: { ...reqParams },
+ headers: { 'AuthToken': this.$store.getters.ssjlToken }
})
.then(res => {
console.log("res", res);
diff --git a/src/views/psychological-modeling/index.vue b/src/views/psychological-modeling/index.vue
index 7a57929..403c6ed 100644
--- a/src/views/psychological-modeling/index.vue
+++ b/src/views/psychological-modeling/index.vue
@@ -73,7 +73,7 @@ export default {
name: 'PsychologicalModeling',
data() {
return {
- info: null,
+ info: null,
}
},
mounted() {
@@ -84,8 +84,9 @@ export default {
let params = { ...this.$route.query }
if (params.uid) {
- this.uid = params.uid
-
+ this.uid = params.uid;
+ // 缓存从随后精灵传过来的token
+ this.$store.commit('ssjlToken', params.token);
//初始化
this.init()
} else {
@@ -94,18 +95,22 @@ export default {
},
methods: {
async init() {
+ let ssjlToken = this.$store.getters.ssjlToken;
let re = await this.api('/api/Question/Progress', {
method: 'GET',
sslVerify: false,
withCredentials: false,
params: {
uid: this.uid,
- },
- })
+ },
+ }, ssjlToken)
if (re.success) {
if (re.response && re.response.state === -1) {
this.$toast('用户不存在或未绑定手表')
- } else {
+ } else if (re.response && re.response.state === 1) {
+ // 2023.6.1 需求变更,建模完成直接跳到心理健康汇总页面
+ this.$router.push(`/psychologicalMain?uid=${this.uid}`);
+ } else {
this.info = re.response
}
} else {
@@ -115,7 +120,7 @@ export default {
toQuestion() {
this.$router.push(`/PsychologicalQuestionnaire?uid=${this.uid}`)
},
- api(url, config) {
+ api(url, config, token) {
let baseUrl = 'https://dbmq.rzliot.com/heart'
setTimeout(() => {
this.$toast.loading({
@@ -127,7 +132,11 @@ export default {
return new Promise((res) => {
axios({
url: `${baseUrl}${url}`,
- ...config,
+ ...config,
+ // 增加请求头部 token
+ headers: {
+ 'AuthToken': token
+ }
})
.then((re) => {
if (re) {
diff --git a/src/views/psychological-questionnaire/index.vue b/src/views/psychological-questionnaire/index.vue
index beb0c1e..74b1752 100644
--- a/src/views/psychological-questionnaire/index.vue
+++ b/src/views/psychological-questionnaire/index.vue
@@ -133,7 +133,7 @@ export default {
params: {
// uid: this.uid,
},
- })
+ }, this.$store.getters.ssjlToken)
if (re.success) {
if (re.response && re.response.length) {
let temp = re.response[0]
@@ -147,7 +147,7 @@ export default {
params: {
code: code,
},
- })
+ }, this.$store.getters.ssjlToken)
if (re1.success) {
if (re1.response && re1.response.length) {
let topic = []
@@ -199,7 +199,7 @@ export default {
sslVerify: false,
withCredentials: false,
data: temp,
- })
+ }, this.$store.getters.ssjlToken)
if (re.success) {
this.$toast('问卷提交成功', 3000)
setTimeout(() => {
@@ -221,7 +221,7 @@ export default {
console.log(error)
}
},
- api(url, config) {
+ api(url, config, token) {
setTimeout(() => {
this.$toast.loading({
message: '',
@@ -233,7 +233,11 @@ export default {
return new Promise((res) => {
axios({
url: `${baseUrl}${url}`,
- ...config,
+ ...config,
+ // 增加请求头部 token
+ headers: {
+ 'AuthToken': token
+ }
})
.then((re) => {
if (re) {
From 35323c8a1228de407d0a2365570bd2c3c51c2923 Mon Sep 17 00:00:00 2001
From: JinxChen <2183691628@qq.com>
Date: Thu, 1 Jun 2023 18:19:40 +0800
Subject: [PATCH 11/27] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20=E5=BB=BA=E6=A8=A1?=
=?UTF-8?q?=E5=AE=8C=E6=88=90=E7=8A=B6=E6=80=81=E5=88=A4=E6=96=AD=E9=94=99?=
=?UTF-8?q?=E8=AF=AF=E7=9A=84=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/psychological-modeling/index.vue | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/views/psychological-modeling/index.vue b/src/views/psychological-modeling/index.vue
index 403c6ed..4e53f71 100644
--- a/src/views/psychological-modeling/index.vue
+++ b/src/views/psychological-modeling/index.vue
@@ -107,7 +107,7 @@ export default {
if (re.success) {
if (re.response && re.response.state === -1) {
this.$toast('用户不存在或未绑定手表')
- } else if (re.response && re.response.state === 1) {
+ } else if (re.response && re.response.initScaleState === 1) {
// 2023.6.1 需求变更,建模完成直接跳到心理健康汇总页面
this.$router.push(`/psychologicalMain?uid=${this.uid}`);
} else {
From b19e37f2297d32a5594bbf2bb499cc6aa50a5eb4 Mon Sep 17 00:00:00 2001
From: JinxChen <2183691628@qq.com>
Date: Thu, 1 Jun 2023 18:21:25 +0800
Subject: [PATCH 12/27] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=20=E4=BD=A9=E6=88=B4?=
=?UTF-8?q?=E8=BF=9B=E5=BA=A6=E6=9D=A1=E7=8A=B6=E6=80=81=E5=88=A4=E6=96=AD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/psychological-modeling/index.vue | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/views/psychological-modeling/index.vue b/src/views/psychological-modeling/index.vue
index 4e53f71..3165538 100644
--- a/src/views/psychological-modeling/index.vue
+++ b/src/views/psychological-modeling/index.vue
@@ -107,7 +107,7 @@ export default {
if (re.success) {
if (re.response && re.response.state === -1) {
this.$toast('用户不存在或未绑定手表')
- } else if (re.response && re.response.initScaleState === 1) {
+ } else if (re.response && re.response.initScaleState === 1 && re.response.progress === 1) {
// 2023.6.1 需求变更,建模完成直接跳到心理健康汇总页面
this.$router.push(`/psychologicalMain?uid=${this.uid}`);
} else {
From 0f36b2367e646bab8046c88ad76a49b894ce4ae5 Mon Sep 17 00:00:00 2001
From: JinxChen <2183691628@qq.com>
Date: Wed, 7 Jun 2023 14:16:56 +0800
Subject: [PATCH 13/27] =?UTF-8?q?update=20-=20ai=E8=AF=AD=E9=9F=B3?=
=?UTF-8?q?=E5=91=8A=E8=AD=A6=20=20=20=20=20-=20=E5=A2=9E=E5=8A=A0=20?=
=?UTF-8?q?=E4=B8=80=E4=B8=AAai=E8=AF=AD=E9=9F=B3=E5=91=BC=E5=8F=AB?=
=?UTF-8?q?=E4=B8=AD=E9=97=B4=E9=A1=B5=20=20=20=20=20-=20=E5=A2=9E?=
=?UTF-8?q?=E5=8A=A0=20=E8=8E=B7=E5=8F=96long=5Flink=E7=9A=84=E6=8E=A5?=
=?UTF-8?q?=E5=8F=A3=20-=20vue.config.js=20=20=20=20=20-=20=E5=A2=9E?=
=?UTF-8?q?=E5=8A=A0=20=E5=85=B3=E4=BA=8Eai=E6=B0=B4=E5=9F=9F=E5=91=8A?=
=?UTF-8?q?=E8=AD=A6=E6=8E=A5=E5=8F=A3=E8=B7=A8=E5=9F=9F=E4=BB=A3=E7=90=86?=
=?UTF-8?q?=E8=AE=BE=E7=BD=AE=20=20=20=20=20-=20=E5=9B=A0=E9=A1=B9?=
=?UTF-8?q?=E7=9B=AE=E6=8E=A5=E5=8F=A3=E5=9C=B0=E5=9D=80=E4=B8=8D=E5=90=8C?=
=?UTF-8?q?=EF=BC=8C=E5=8F=91=E5=B8=83=E7=BA=BF=E4=B8=8A=E6=97=B6=E5=8F=96?=
=?UTF-8?q?=E6=B6=88ai=E6=B0=B4=E5=9F=9F=E5=91=8A=E8=AD=A6=E6=8E=A5?=
=?UTF-8?q?=E5=8F=A3=E8=B7=A8=E5=9F=9F=E4=BB=A3=E7=90=86=EF=BC=8C=E4=BB=85?=
=?UTF-8?q?=E5=9C=A8=E6=9C=AC=E5=9C=B0=E8=B0=83=E8=AF=95=E5=BC=80=E5=90=AF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
README.md | 14 +++++-
src/config/models.js | 4 +-
src/router/index.js | 10 ++++
src/views/ai-call-alarm/index.vue | 77 +++++++++++++++++++++++++++++++
vue.config.js | 23 +++++++--
5 files changed, 121 insertions(+), 7 deletions(-)
create mode 100644 src/views/ai-call-alarm/index.vue
diff --git a/README.md b/README.md
index 6774579..f66b61b 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
@@ -467,4 +467,14 @@ feature
update
- 心理健康
- 建模进度查询,问卷调查,心理详情汇总和心理健康抑郁,压力和疲劳详情页面
- - 增加 接口请求时带上从随手精灵传过来的token
\ No newline at end of file
+ - 增加 接口请求时带上从随手精灵传过来的token
+
+## v1.0.58
+`2023.6.7`
+update
+- ai语音告警
+ - 增加 一个ai语音呼叫中间页
+ - 增加 获取long_link的接口
+- vue.config.js
+ - 增加 关于ai水域告警接口跨域代理设置
+ - 因项目接口地址不同,发布线上时取消ai水域告警接口跨域代理,仅在本地调试开启
\ No newline at end of file
diff --git a/src/config/models.js b/src/config/models.js
index fd39a14..c0cd22d 100644
--- a/src/config/models.js
+++ b/src/config/models.js
@@ -1,11 +1,11 @@
/*
* @Date: 2021-11-20 10:26:39
* @LastEditors: JinxChen
- * @LastEditTime: 2023-06-01 18:06:38
+ * @LastEditTime: 2023-06-07 11:25:02
* @FilePath: \TelpoH5FrontendWeb\src\config\models.js
* @description:
*/
-export const VERSION_MODEL = '1.0.57F'; //版本号
+export const VERSION_MODEL = '1.0.58F'; //版本号
export const IMAGE_URL = {
production: 'http://zfb.ssjlai.com/web/',
test: 'http://zfb.ssjlai.com/web/',
diff --git a/src/router/index.js b/src/router/index.js
index 83e6896..56885cd 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -1,3 +1,10 @@
+/*
+ * @Date: 2023-06-01 18:41:50
+ * @LastEditors: JinxChen
+ * @LastEditTime: 2023-06-07 10:40:03
+ * @FilePath: \TelpoH5FrontendWeb\src\router\index.js
+ * @description:
+ */
/*
* @Date: 2023-05-30 15:37:06
* @LastEditors: JinxChen
@@ -47,6 +54,9 @@ const routes = [
{ path: '/psychological', name: 'psychological', component: resolve => require(['@/views/health/psychological'], resolve) },
// 健康-抑郁,压力和疲劳汇总入口
{ path: '/psychologicalMain', name: 'psychologicalMain', component: resolve => require(['@/views/health/psychological-main'], resolve) },
+
+ // 告警详情-中间页
+ { path: '/aiCallAlarm', name: 'aiCallAlarm', component: resolve => require(['@/views/ai-call-alarm'], resolve) },
];
const router = new VueRouter({
diff --git a/src/views/ai-call-alarm/index.vue b/src/views/ai-call-alarm/index.vue
new file mode 100644
index 0000000..82c5e85
--- /dev/null
+++ b/src/views/ai-call-alarm/index.vue
@@ -0,0 +1,77 @@
+
+
+
+
+
+
+
diff --git a/vue.config.js b/vue.config.js
index 9e5efb5..d23b1c6 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -1,7 +1,7 @@
/*
* @Author: your name
* @Date: 2020-04-15 10:00:32
- * @LastEditTime: 2023-02-26 09:19:56
+ * @LastEditTime: 2023-06-07 11:21:38
* @LastEditors: JinxChen
* @Description: In User Settings Edit
* @FilePath: \TelpoH5FrontendWeb\vue.config.js
@@ -14,7 +14,24 @@ const pxtorem = require('postcss-pxtorem'); // 把代码中px转为rem
const CompressionPlugin = require("compression-webpack-plugin");
const port = process.env.port || process.env.npm_config_port || 8080;/* 7788 */ // dev port
-
+const proxy = process.env.NODE_ENV === 'development' ?{
+ // 调试完毕需要把这个代理注释掉,否则发布到线上会有问题产生
+ /* '/api/id': {
+ target: 'https://id.ssjlai.com/watersoutboundapi/',
+ changeOrigin: true,
+ pathRewrite: {
+ '^/api/id': ''
+ }
+ },
+ '/api/ai': {
+ target: 'https://ai.ssjlai.com/watersoutboundapi/',
+ changeOrigin: true,
+ pathRewrite: {
+ '^/api/ai': ''
+ }
+ } */
+}
+: null;
module.exports = {
// 注意: 多页面配置 不再使用全路径,单页面时可以开启
publicPath: './',
@@ -29,7 +46,7 @@ module.exports = {
warnings: false,
errors: true
},
- /* proxy: proxy, */
+ proxy: proxy,
/* host: '192.168.3.186', */// 原为: hotst: 'localhost', 可在同一ip局域网下通过网址生成二维码的方式调试h5, 注意:调试完毕请注释
//disableHostCheck: true, //真机调试开启
},
From 83f1b67d722e05c08517cedb46e797b2ba81e688 Mon Sep 17 00:00:00 2001
From: JinxChen <2183691628@qq.com>
Date: Wed, 7 Jun 2023 14:52:15 +0800
Subject: [PATCH 14/27] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20=E6=97=B6=E9=97=B4?=
=?UTF-8?q?=E6=88=B3=E8=BD=AC=E6=8D=A2=E9=94=99=E8=AF=AF=E7=9A=84=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/views/ai-call-alarm/index.vue | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/views/ai-call-alarm/index.vue b/src/views/ai-call-alarm/index.vue
index 82c5e85..7bc92c4 100644
--- a/src/views/ai-call-alarm/index.vue
+++ b/src/views/ai-call-alarm/index.vue
@@ -28,8 +28,8 @@ export default {
code: this.code
};
let baseUrl = process.env.NODE_ENV === "production" ? 'https://ai.ssjlai.com' : 'https://id.ssjlai.com';
- //let proxyUrl = '/api/id/';
- let reqUrl = `${baseUrl}/watersoutboundapi/getLongLink`;
+ let reqUrl = '/api/id/getLongLink';
+ //let reqUrl = `${baseUrl}/watersoutboundapi/getLongLink`;
axios.get(reqUrl, {
params: { ...reqParams },
}).then(res =>{
@@ -48,17 +48,17 @@ export default {
longLink = data[0].long_link;
}
const createTime = data[0].create_time;
- const nowTime = new Date().getTime();
+ // 13位时间戳 除以 1000 再取整
+ const nowTime = (new Date().getTime() / 1000).toFixed();
const twoHours = 7200;
- if(nowTime - createTime > twoHours) {
+ if(nowTime - createTime < twoHours) {
// 增加过期失效判断,根据接口返回的创建时间与现在时间比较,超过两个小时提示链接过期并且不再跳转
- console.log("::已经超过两个小时");
this.$dialog.confirm({
message: '链接已失效',
showCancelButton: false
})
} else {
- window.location.href = longLink;
+ window.open(longLink);
}
} else {
this.$dialog.confirm({
From bf6021369257d0de921a52363b3ffd21df9cdbf4 Mon Sep 17 00:00:00 2001
From: JinxChen <2183691628@qq.com>
Date: Wed, 7 Jun 2023 14:58:30 +0800
Subject: [PATCH 15/27] =?UTF-8?q?=E5=85=B3=E9=97=AD=20=E6=9C=AC=E5=9C=B0?=
=?UTF-8?q?=E4=BB=A3=E7=90=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/ai-call-alarm/index.vue | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/views/ai-call-alarm/index.vue b/src/views/ai-call-alarm/index.vue
index 7bc92c4..3691c9b 100644
--- a/src/views/ai-call-alarm/index.vue
+++ b/src/views/ai-call-alarm/index.vue
@@ -28,8 +28,8 @@ export default {
code: this.code
};
let baseUrl = process.env.NODE_ENV === "production" ? 'https://ai.ssjlai.com' : 'https://id.ssjlai.com';
- let reqUrl = '/api/id/getLongLink';
- //let reqUrl = `${baseUrl}/watersoutboundapi/getLongLink`;
+ //let reqUrl = '/api/id/getLongLink';
+ let reqUrl = `${baseUrl}/watersoutboundapi/getLongLink`;
axios.get(reqUrl, {
params: { ...reqParams },
}).then(res =>{
From 58462f748d4be5f4fe5e13676aaba710a6e577e7 Mon Sep 17 00:00:00 2001
From: JinxChen <2183691628@qq.com>
Date: Wed, 7 Jun 2023 15:10:47 +0800
Subject: [PATCH 16/27] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20=E5=88=A4=E6=96=AD?=
=?UTF-8?q?=E6=9D=A1=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/ai-call-alarm/index.vue | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/views/ai-call-alarm/index.vue b/src/views/ai-call-alarm/index.vue
index 3691c9b..509c61a 100644
--- a/src/views/ai-call-alarm/index.vue
+++ b/src/views/ai-call-alarm/index.vue
@@ -51,7 +51,7 @@ export default {
// 13位时间戳 除以 1000 再取整
const nowTime = (new Date().getTime() / 1000).toFixed();
const twoHours = 7200;
- if(nowTime - createTime < twoHours) {
+ if(nowTime - createTime > twoHours) {
// 增加过期失效判断,根据接口返回的创建时间与现在时间比较,超过两个小时提示链接过期并且不再跳转
this.$dialog.confirm({
message: '链接已失效',
From 398c2c412a7c4932021f0c2a9de8a8debf349bbc Mon Sep 17 00:00:00 2001
From: JinxChen <2183691628@qq.com>
Date: Fri, 9 Jun 2023 09:29:26 +0800
Subject: [PATCH 17/27] =?UTF-8?q?update=20-=20=E5=8A=A0=E6=B2=B9=E5=8C=85?=
=?UTF-8?q?=E5=85=85=E5=80=BC=E8=B4=AD=E4=B9=B0=20=20=20=20=20-=20?=
=?UTF-8?q?=E4=BF=AE=E6=94=B9=20=E6=94=AF=E4=BB=98=E6=88=90=E5=8A=9F?=
=?UTF-8?q?=E6=8F=90=E7=A4=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
README.md | 10 ++++++++--
src/config/models.js | 4 ++--
src/views/package-buy/index.vue | 3 ++-
3 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/README.md b/README.md
index f66b61b..ca767ce 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
@@ -477,4 +477,10 @@ update
- 增加 获取long_link的接口
- vue.config.js
- 增加 关于ai水域告警接口跨域代理设置
- - 因项目接口地址不同,发布线上时取消ai水域告警接口跨域代理,仅在本地调试开启
\ No newline at end of file
+ - 因项目接口地址不同,发布线上时取消ai水域告警接口跨域代理,仅在本地调试开启
+
+## v1.0.59
+`2023.6.9`
+update
+- 加油包充值购买
+ - 修改 支付成功提示
\ No newline at end of file
diff --git a/src/config/models.js b/src/config/models.js
index c0cd22d..eeee738 100644
--- a/src/config/models.js
+++ b/src/config/models.js
@@ -1,11 +1,11 @@
/*
* @Date: 2021-11-20 10:26:39
* @LastEditors: JinxChen
- * @LastEditTime: 2023-06-07 11:25:02
+ * @LastEditTime: 2023-06-09 09:19:02
* @FilePath: \TelpoH5FrontendWeb\src\config\models.js
* @description:
*/
-export const VERSION_MODEL = '1.0.58F'; //版本号
+export const VERSION_MODEL = '1.0.59F'; //版本号
export const IMAGE_URL = {
production: 'http://zfb.ssjlai.com/web/',
test: 'http://zfb.ssjlai.com/web/',
diff --git a/src/views/package-buy/index.vue b/src/views/package-buy/index.vue
index 1b20390..ef9f37c 100644
--- a/src/views/package-buy/index.vue
+++ b/src/views/package-buy/index.vue
@@ -356,8 +356,9 @@ export default {
//res.err_msg将在用户支付成功后返回ok,但并不保证它绝对可靠。
if(packageType === 1) {
// 加油包不用跳转,直接提示支付成功
+ // 2023.06.09 修改充值成功提示如下:
that.$toast.success({
- message: '支付成功'
+ message: '充值成功,请重启设备后,恢复正常使用。'
});
} else {
that.$router.replace({
From 6053ace7db2e83fd06397e6f48341683ecd4114c Mon Sep 17 00:00:00 2001
From: JinxChen <2183691628@qq.com>
Date: Wed, 14 Jun 2023 17:21:43 +0800
Subject: [PATCH 18/27] =?UTF-8?q?update=20-=20=E5=BF=83=E7=90=86=E5=81=A5?=
=?UTF-8?q?=E5=BA=B7=E8=AF=A6=E6=83=85=E9=A1=B5=E9=9D=A2=20=20=20=20=20-?=
=?UTF-8?q?=20=E4=BF=AE=E5=A4=8D=20=E5=8E=86=E5=8F=B2=E7=9B=91=E6=B5=8B?=
=?UTF-8?q?=E9=80=89=E4=B8=AD=E9=9D=9E=E4=BB=8A=E5=A4=A9=E7=9A=84=E6=97=A5?=
=?UTF-8?q?=E6=9C=9F=E5=90=8E=E6=97=A5=E6=9C=9F=E6=98=BE=E7=A4=BA=E4=BB=8A?=
=?UTF-8?q?=E5=A4=A9=E7=9A=84=E9=97=AE=E9=A2=98=20-=20vue.config.js=20=20?=
=?UTF-8?q?=20=20=20-=20=E6=B3=A8=E9=87=8A=20proxy=E4=BB=A3=E7=90=86?=
=?UTF-8?q?=E7=9B=B8=E5=85=B3=E4=BB=A3=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
README.md | 13 +++++++++++--
src/config/models.js | 4 ++--
src/views/health/psychological/index.vue | 1 +
vue.config.js | 12 ++++++------
4 files changed, 20 insertions(+), 10 deletions(-)
diff --git a/README.md b/README.md
index ca767ce..6a14b8c 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
@@ -483,4 +483,13 @@ update
`2023.6.9`
update
- 加油包充值购买
- - 修改 支付成功提示
\ No newline at end of file
+ - 修改 支付成功提示
+
+
+## v1.0.60
+`2023.6.14`
+update
+- 心理健康详情页面
+ - 修复 历史监测选中非今天的日期后日期显示今天的问题
+- vue.config.js
+ - 注释 proxy代理相关代码
\ No newline at end of file
diff --git a/src/config/models.js b/src/config/models.js
index eeee738..9671b34 100644
--- a/src/config/models.js
+++ b/src/config/models.js
@@ -1,11 +1,11 @@
/*
* @Date: 2021-11-20 10:26:39
* @LastEditors: JinxChen
- * @LastEditTime: 2023-06-09 09:19:02
+ * @LastEditTime: 2023-06-14 17:20:38
* @FilePath: \TelpoH5FrontendWeb\src\config\models.js
* @description:
*/
-export const VERSION_MODEL = '1.0.59F'; //版本号
+export const VERSION_MODEL = '1.0.60F'; //版本号
export const IMAGE_URL = {
production: 'http://zfb.ssjlai.com/web/',
test: 'http://zfb.ssjlai.com/web/',
diff --git a/src/views/health/psychological/index.vue b/src/views/health/psychological/index.vue
index 3b3f5ba..ec11198 100644
--- a/src/views/health/psychological/index.vue
+++ b/src/views/health/psychological/index.vue
@@ -1018,6 +1018,7 @@ export default {
// 选择日历具体某一个日期
onSelect(value) {
const selectDate = this.$dayjs(value).format("YYYY-MM-DD");
+ this.dateList[0].text = this.$dayjs(value).format("YYYY-MM-DD") === this.$dayjs(new Date()).format("YYYY-MM-DD") ? '今天' : this.$dayjs(value).format("YYYY-MM-DD");
this.calendarDialogShow = false;
this.getPsychologiclData(selectDate);
},
diff --git a/vue.config.js b/vue.config.js
index d23b1c6..088b3fd 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -1,7 +1,7 @@
/*
* @Author: your name
* @Date: 2020-04-15 10:00:32
- * @LastEditTime: 2023-06-07 11:21:38
+ * @LastEditTime: 2023-06-14 17:10:10
* @LastEditors: JinxChen
* @Description: In User Settings Edit
* @FilePath: \TelpoH5FrontendWeb\vue.config.js
@@ -14,9 +14,9 @@ const pxtorem = require('postcss-pxtorem'); // 把代码中px转为rem
const CompressionPlugin = require("compression-webpack-plugin");
const port = process.env.port || process.env.npm_config_port || 8080;/* 7788 */ // dev port
-const proxy = process.env.NODE_ENV === 'development' ?{
+/* const proxy = process.env.NODE_ENV === 'development' ?{
// 调试完毕需要把这个代理注释掉,否则发布到线上会有问题产生
- /* '/api/id': {
+ '/api/id': {
target: 'https://id.ssjlai.com/watersoutboundapi/',
changeOrigin: true,
pathRewrite: {
@@ -29,9 +29,9 @@ const proxy = process.env.NODE_ENV === 'development' ?{
pathRewrite: {
'^/api/ai': ''
}
- } */
+ }
}
-: null;
+: null; */
module.exports = {
// 注意: 多页面配置 不再使用全路径,单页面时可以开启
publicPath: './',
@@ -46,7 +46,7 @@ module.exports = {
warnings: false,
errors: true
},
- proxy: proxy,
+ /* proxy: proxy, */
/* host: '192.168.3.186', */// 原为: hotst: 'localhost', 可在同一ip局域网下通过网址生成二维码的方式调试h5, 注意:调试完毕请注释
//disableHostCheck: true, //真机调试开启
},
From c6e38aa3f4f9a7ae015acae3bf8633e089a9b4a2 Mon Sep 17 00:00:00 2001
From: JinxChen <2183691628@qq.com>
Date: Wed, 14 Jun 2023 17:23:21 +0800
Subject: [PATCH 19/27] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20=E9=A1=B5=E9=9D=A2?=
=?UTF-8?q?=E6=A0=87=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/health/psychological-main/index.vue | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/views/health/psychological-main/index.vue b/src/views/health/psychological-main/index.vue
index c8e4afe..fa155a9 100644
--- a/src/views/health/psychological-main/index.vue
+++ b/src/views/health/psychological-main/index.vue
@@ -51,7 +51,7 @@ export default {
this.getHomeData();
},
mounted() {
-
+ window.document.title = '心理监测';
},
methods: {
loadParams() {
From 02f4b395c29b902603ef4e003ae3aa6b85f786ef Mon Sep 17 00:00:00 2001
From: JinxChen <2183691628@qq.com>
Date: Fri, 16 Jun 2023 17:20:23 +0800
Subject: [PATCH 20/27] =?UTF-8?q?update=20-=20=E5=BF=83=E7=90=86=E5=BB=BA?=
=?UTF-8?q?=E6=A8=A1=E8=BF=9B=E5=BA=A6=E6=9F=A5=E8=AF=A2=20=20=20=20=20-?=
=?UTF-8?q?=20=E5=A2=9E=E5=8A=A0=20=E8=BF=94=E5=9B=9E=E6=8C=89=E9=92=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
README.md | 8 +++++++-
src/config/models.js | 4 ++--
src/views/psychological-modeling/index.vue | 4 ++++
3 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/README.md b/README.md
index 6a14b8c..b37ab0b 100644
--- a/README.md
+++ b/README.md
@@ -492,4 +492,10 @@ update
- 心理健康详情页面
- 修复 历史监测选中非今天的日期后日期显示今天的问题
- vue.config.js
- - 注释 proxy代理相关代码
\ No newline at end of file
+ - 注释 proxy代理相关代码
+
+## v1.0.61
+`2023.6.16`
+update
+- 心理建模进度查询
+ - 增加 返回按钮
\ No newline at end of file
diff --git a/src/config/models.js b/src/config/models.js
index 9671b34..5387502 100644
--- a/src/config/models.js
+++ b/src/config/models.js
@@ -1,11 +1,11 @@
/*
* @Date: 2021-11-20 10:26:39
* @LastEditors: JinxChen
- * @LastEditTime: 2023-06-14 17:20:38
+ * @LastEditTime: 2023-06-16 17:19:45
* @FilePath: \TelpoH5FrontendWeb\src\config\models.js
* @description:
*/
-export const VERSION_MODEL = '1.0.60F'; //版本号
+export const VERSION_MODEL = '1.0.61F'; //版本号
export const IMAGE_URL = {
production: 'http://zfb.ssjlai.com/web/',
test: 'http://zfb.ssjlai.com/web/',
diff --git a/src/views/psychological-modeling/index.vue b/src/views/psychological-modeling/index.vue
index 3165538..c839257 100644
--- a/src/views/psychological-modeling/index.vue
+++ b/src/views/psychological-modeling/index.vue
@@ -1,5 +1,6 @@
+
@@ -94,6 +95,9 @@ export default {
}
},
methods: {
+ onNavBack() {
+ this.$router.go(-1);
+ },
async init() {
let ssjlToken = this.$store.getters.ssjlToken;
let re = await this.api('/api/Question/Progress', {
From d2cf5f8db04da9fed73985198dff4e39a78738e8 Mon Sep 17 00:00:00 2001
From: JinxChen <2183691628@qq.com>
Date: Sat, 17 Jun 2023 10:00:33 +0800
Subject: [PATCH 21/27] =?UTF-8?q?feature=20-=20=E5=BF=83=E7=90=86=E5=BB=BA?=
=?UTF-8?q?=E6=A8=A1=E8=BF=9B=E5=BA=A6=E6=9F=A5=E8=AF=A2=20=20=20=20=20-?=
=?UTF-8?q?=20=E5=A2=9E=E5=8A=A0=20=E5=85=B7=E4=BD=93=E8=BF=94=E5=9B=9Eurl?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
README.md | 8 +++++++-
src/config/models.js | 2 +-
src/views/psychological-modeling/index.vue | 3 ++-
3 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/README.md b/README.md
index b37ab0b..a3a608f 100644
--- a/README.md
+++ b/README.md
@@ -498,4 +498,10 @@ update
`2023.6.16`
update
- 心理建模进度查询
- - 增加 返回按钮
\ No newline at end of file
+ - 增加 返回按钮
+
+## v1.0.62
+`2023.6.17`
+feature
+- 心理建模进度查询
+ - 增加 具体返回url
\ No newline at end of file
diff --git a/src/config/models.js b/src/config/models.js
index 5387502..525f496 100644
--- a/src/config/models.js
+++ b/src/config/models.js
@@ -5,7 +5,7 @@
* @FilePath: \TelpoH5FrontendWeb\src\config\models.js
* @description:
*/
-export const VERSION_MODEL = '1.0.61F'; //版本号
+export const VERSION_MODEL = '1.0.62F'; //版本号
export const IMAGE_URL = {
production: 'http://zfb.ssjlai.com/web/',
test: 'http://zfb.ssjlai.com/web/',
diff --git a/src/views/psychological-modeling/index.vue b/src/views/psychological-modeling/index.vue
index c839257..17ac2fd 100644
--- a/src/views/psychological-modeling/index.vue
+++ b/src/views/psychological-modeling/index.vue
@@ -96,7 +96,8 @@ export default {
},
methods: {
onNavBack() {
- this.$router.go(-1);
+ let baseUrl = process.env.NODE_ENV === "production" ? 'https://ai.ssjlai.com/parentweb' : 'https://id.ssjlai.com/parentweb';
+ window.location.href = `${baseUrl}/#/device`;
},
async init() {
let ssjlToken = this.$store.getters.ssjlToken;
From c3b4608dae8ea88e88b84b3f5b2e160e67b5be6b Mon Sep 17 00:00:00 2001
From: JinxChen <2183691628@qq.com>
Date: Mon, 19 Jun 2023 17:29:17 +0800
Subject: [PATCH 22/27] =?UTF-8?q?update=20-=20=E5=BF=83=E7=90=86=E5=BB=BA?=
=?UTF-8?q?=E6=A8=A1=E8=BF=9B=E5=BA=A6=E6=9F=A5=E8=AF=A2=20=20=20=20=20-?=
=?UTF-8?q?=20=E4=BF=AE=E6=94=B9=20=E8=BF=94=E5=9B=9E=E9=80=BB=E8=BE=91?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
README.md | 10 ++++++++--
src/config/models.js | 2 +-
src/store/index.js | 11 ++++++++++-
src/views/psychological-modeling/index.vue | 18 ++++++++++++++----
4 files changed, 33 insertions(+), 8 deletions(-)
diff --git a/README.md b/README.md
index a3a608f..d44c3e4 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
@@ -504,4 +504,10 @@ update
`2023.6.17`
feature
- 心理建模进度查询
- - 增加 具体返回url
\ No newline at end of file
+ - 增加 具体返回url
+
+## v1.0.63
+`2023.6.19`
+update
+- 心理建模进度查询
+ - 修改 返回逻辑
\ No newline at end of file
diff --git a/src/config/models.js b/src/config/models.js
index 525f496..10bf327 100644
--- a/src/config/models.js
+++ b/src/config/models.js
@@ -5,7 +5,7 @@
* @FilePath: \TelpoH5FrontendWeb\src\config\models.js
* @description:
*/
-export const VERSION_MODEL = '1.0.62F'; //版本号
+export const VERSION_MODEL = '1.0.63F'; //版本号
export const IMAGE_URL = {
production: 'http://zfb.ssjlai.com/web/',
test: 'http://zfb.ssjlai.com/web/',
diff --git a/src/store/index.js b/src/store/index.js
index 10c23ad..99df87e 100644
--- a/src/store/index.js
+++ b/src/store/index.js
@@ -1,7 +1,7 @@
/*
* @Date: 2022-08-17 16:18:02
* @LastEditors: JinxChen
- * @LastEditTime: 2023-06-01 17:45:48
+ * @LastEditTime: 2023-06-19 11:26:22
* @FilePath: \TelpoH5FrontendWeb\src\store\index.js
* @description:
*/
@@ -21,6 +21,7 @@ export default new Vuex.Store({
appId: '',
isFromWx: null,
ssjlToken: '',
+ fromSsjl: '',
},
mutations: {
imei(state, imei) {
@@ -55,6 +56,10 @@ export default new Vuex.Store({
state.ssjlToken = ssjlToken;
window.localStorage[prefix + 'ssjlToken'] = ssjlToken;
},
+ fromSsjl(state, fromSsjl) {
+ state.fromSsjl = fromSsjl;
+ window.localStorage[prefix + 'fromSsjl'] = fromSsjl;
+ },
},
getters: {
imei: state => {
@@ -89,6 +94,10 @@ export default new Vuex.Store({
if (state.ssjlToken != '') return state.ssjlToken;
return window.localStorage[prefix + 'ssjlToken'] == null ? '' : window.localStorage[prefix + 'ssjlToken'];
},
+ fromSsjl: state => {
+ if (state.fromSsjl != '') return state.fromSsjl;
+ return window.localStorage[prefix + 'fromSsjl'] == null ? '' : window.localStorage[prefix + 'fromSsjl'];
+ },
},
actions: {},
modules: {}
diff --git a/src/views/psychological-modeling/index.vue b/src/views/psychological-modeling/index.vue
index 17ac2fd..3adbcb1 100644
--- a/src/views/psychological-modeling/index.vue
+++ b/src/views/psychological-modeling/index.vue
@@ -1,6 +1,6 @@
-
+
@@ -75,6 +75,7 @@ export default {
data() {
return {
info: null,
+ showLeftArrow: null,
}
},
mounted() {
@@ -86,8 +87,12 @@ export default {
if (params.uid) {
this.uid = params.uid;
- // 缓存从随后精灵传过来的token
+ // 缓存从随手精灵传过来的token
this.$store.commit('ssjlToken', params.token);
+ // 缓存从随手精灵传过来的标识
+ this.$store.commit('fromSsjl', params.fromSsjl);
+ // 是否显示 返回标签
+ this.showLeftArrow = this.$store.getters.fromSsjl === 'true';
//初始化
this.init()
} else {
@@ -96,8 +101,13 @@ export default {
},
methods: {
onNavBack() {
- let baseUrl = process.env.NODE_ENV === "production" ? 'https://ai.ssjlai.com/parentweb' : 'https://id.ssjlai.com/parentweb';
- window.location.href = `${baseUrl}/#/device`;
+ let fromSsjl = this.$store.getters.fromSsjl === 'true';
+ if(fromSsjl) {
+ let baseUrl = process.env.NODE_ENV === "production" ? 'https://ai.ssjlai.com/parentweb' : 'https://id.ssjlai.com/parentweb';
+ window.location.href = `${baseUrl}/#/device`;
+ } else {
+ this.$router.go(-1);
+ }
},
async init() {
let ssjlToken = this.$store.getters.ssjlToken;
From 2ea7ff98562354dbad6c55428b1fb8254a8f9d17 Mon Sep 17 00:00:00 2001
From: JinxChen <2183691628@qq.com>
Date: Wed, 21 Jun 2023 15:23:25 +0800
Subject: [PATCH 23/27] =?UTF-8?q?update=20-=20=E5=BF=83=E7=90=86=E5=BB=BA?=
=?UTF-8?q?=E6=A8=A1=E8=BF=9B=E5=BA=A6=E6=9F=A5=E8=AF=A2=20=20=20=20=20-?=
=?UTF-8?q?=20=E5=A2=9E=E5=8A=A0=20=E5=BB=BA=E6=A8=A1=E4=B8=AD=EF=BC=8C?=
=?UTF-8?q?=E6=9C=892=E4=B8=AA=E6=AD=A5=E9=AA=A4=EF=BC=8C=E5=A6=82?=
=?UTF-8?q?=E6=9E=9C=E4=BB=BB=E4=B8=80=E6=AD=A5=E9=AA=A4=E5=B7=B2=E7=BB=8F?=
=?UTF-8?q?=E5=AE=8C=E6=88=90=EF=BC=8C=E5=88=99=E8=AF=A5=E6=AD=A5=E9=AA=A4?=
=?UTF-8?q?=E5=8F=AF=E4=BB=A5=E9=9A=90=E8=97=8F=E6=98=BE=E7=A4=BA=E3=80=82?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
README.md | 9 ++++++++-
src/config/models.js | 2 +-
src/views/health/psychological-main/index.vue | 2 +-
src/views/psychological-modeling/index.vue | 4 ++--
4 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/README.md b/README.md
index d44c3e4..8c659ad 100644
--- a/README.md
+++ b/README.md
@@ -510,4 +510,11 @@ feature
`2023.6.19`
update
- 心理建模进度查询
- - 修改 返回逻辑
\ No newline at end of file
+ - 修改 返回逻辑
+
+
+## v1.0.64
+`2023.6.21`
+update
+- 心理建模进度查询
+ - 增加 建模中,有2个步骤,如果任一步骤已经完成,则该步骤可以隐藏显示。
\ No newline at end of file
diff --git a/src/config/models.js b/src/config/models.js
index 10bf327..033de92 100644
--- a/src/config/models.js
+++ b/src/config/models.js
@@ -5,7 +5,7 @@
* @FilePath: \TelpoH5FrontendWeb\src\config\models.js
* @description:
*/
-export const VERSION_MODEL = '1.0.63F'; //版本号
+export const VERSION_MODEL = '1.0.64F'; //版本号
export const IMAGE_URL = {
production: 'http://zfb.ssjlai.com/web/',
test: 'http://zfb.ssjlai.com/web/',
diff --git a/src/views/health/psychological-main/index.vue b/src/views/health/psychological-main/index.vue
index fa155a9..8fc613b 100644
--- a/src/views/health/psychological-main/index.vue
+++ b/src/views/health/psychological-main/index.vue
@@ -1,6 +1,6 @@
-
+
diff --git a/src/views/psychological-modeling/index.vue b/src/views/psychological-modeling/index.vue
index 3adbcb1..70b9178 100644
--- a/src/views/psychological-modeling/index.vue
+++ b/src/views/psychological-modeling/index.vue
@@ -13,7 +13,7 @@
-
+
第一步
连续佩戴两小时
@@ -37,7 +37,7 @@
请连续佩戴不低于2小时,有助于为您输出更加精准的情绪分析指标。
-
+
第二步
情绪初始化评估
From cf830b894469deda7983f2c4f2a7d7318264b45e Mon Sep 17 00:00:00 2001
From: JinxChen <2183691628@qq.com>
Date: Wed, 21 Jun 2023 16:31:31 +0800
Subject: [PATCH 24/27] =?UTF-8?q?=20=20=20=20-=20=E4=BF=AE=E5=A4=8D=20?=
=?UTF-8?q?=E5=9B=BE=E8=A1=A8=E6=97=B6=E9=97=B4=E6=A0=BC=E5=BC=8F=E8=BD=AC?=
=?UTF-8?q?=E6=8D=A2=E9=94=99=E8=AF=AF=E7=9A=84=E9=97=AE=E9=A2=98=20=20=20?=
=?UTF-8?q?=20=20-=20=E5=A2=9E=E5=8A=A0=20Advice=E5=AD=97=E6=AE=B5?=
=?UTF-8?q?=E6=98=BE=E7=A4=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
README.md | 6 ++++--
src/views/health/psychological/index.vue | 8 +++++---
2 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/README.md b/README.md
index 8c659ad..0b27fac 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
@@ -517,4 +517,6 @@ update
`2023.6.21`
update
- 心理建模进度查询
- - 增加 建模中,有2个步骤,如果任一步骤已经完成,则该步骤可以隐藏显示。
\ No newline at end of file
+ - 增加 建模中,有2个步骤,如果任一步骤已经完成,则该步骤可以隐藏显示。
+ - 修复 图表时间格式转换错误的问题
+ - 增加 Advice字段显示
\ No newline at end of file
diff --git a/src/views/health/psychological/index.vue b/src/views/health/psychological/index.vue
index ec11198..49af96a 100644
--- a/src/views/health/psychological/index.vue
+++ b/src/views/health/psychological/index.vue
@@ -143,7 +143,7 @@
{{ result }}
-
继续保持积极乐观,培养健康的生活习惯,预防消极事件对情绪带来的不良影响。
+
{{ advice }}
@@ -309,7 +309,8 @@ export default {
],
// 选中的日历日期
selectDate: '',
- uid: ''
+ uid: '',
+ advice: ''
};
},
computed: {
@@ -801,11 +802,12 @@ export default {
// x轴显示数据
this.xAxisData = data.ChartDatas.map(item => {
return this.$dayjs(item.Key.replace(/-/g, "/")).format(
- "hh:mm"
+ "HH:mm"
);
});
// 结果解读
this.result = data.Result;
+ this.advice = data.Advice;
this.$toast.loading({
message: '数据加载完成'
});
From 9683363d11b64dde6d2ecbbcf81b363a14ad4bbb Mon Sep 17 00:00:00 2001
From: JinxChen <2183691628@qq.com>
Date: Thu, 22 Jun 2023 17:29:56 +0800
Subject: [PATCH 25/27] =?UTF-8?q?update=20-=20=E5=BF=83=E7=90=86=E7=9B=91?=
=?UTF-8?q?=E6=B5=8B=E8=AF=A6=E6=83=85=20=20=20=20=20-=20=E4=BB=8A?=
=?UTF-8?q?=E5=A4=A9=E8=B6=8B=E5=8A=BF=E9=A5=BC=E7=8A=B6=E5=9B=BE=20=20=20?=
=?UTF-8?q?=20=20=20=20=20=20-=20=E4=BF=AE=E6=94=B9=20=E7=99=BE=E5=88=86?=
=?UTF-8?q?=E6=AF=94=E6=98=BE=E7=A4=BA=E5=80=BC=EF=BC=8C=E5=8F=96=E5=B0=8F?=
=?UTF-8?q?=E6=95=B0=E7=82=B9=E5=90=8E=E9=9D=A2=E4=B8=80=E4=BD=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
README.md | 9 ++++++++-
src/config/models.js | 2 +-
src/views/health/psychological/index.vue | 2 +-
3 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/README.md b/README.md
index 0b27fac..575ade1 100644
--- a/README.md
+++ b/README.md
@@ -519,4 +519,11 @@ update
- 心理建模进度查询
- 增加 建模中,有2个步骤,如果任一步骤已经完成,则该步骤可以隐藏显示。
- 修复 图表时间格式转换错误的问题
- - 增加 Advice字段显示
\ No newline at end of file
+ - 增加 Advice字段显示
+
+## v1.0.65
+`2023.6.22`
+update
+- 心理监测详情
+ - 今天趋势饼状图
+ - 修改 百分比显示值,取小数点后面一位
\ No newline at end of file
diff --git a/src/config/models.js b/src/config/models.js
index 033de92..c5ff508 100644
--- a/src/config/models.js
+++ b/src/config/models.js
@@ -5,7 +5,7 @@
* @FilePath: \TelpoH5FrontendWeb\src\config\models.js
* @description:
*/
-export const VERSION_MODEL = '1.0.64F'; //版本号
+export const VERSION_MODEL = '1.0.65F'; //版本号
export const IMAGE_URL = {
production: 'http://zfb.ssjlai.com/web/',
test: 'http://zfb.ssjlai.com/web/',
diff --git a/src/views/health/psychological/index.vue b/src/views/health/psychological/index.vue
index 49af96a..3e655ad 100644
--- a/src/views/health/psychological/index.vue
+++ b/src/views/health/psychological/index.vue
@@ -823,7 +823,7 @@ export default {
) {
return 0;
}
- return (value / total).toFixed(2) * 100;
+ return Math.floor((value / total) * 1000) / 10;
},
// 初始化图表的文字内容
initEchartText() {
From f0c300d1be81394c04b65c966d5120200fdde6ca Mon Sep 17 00:00:00 2001
From: JinxChen <2183691628@qq.com>
Date: Sun, 25 Jun 2023 16:09:50 +0800
Subject: [PATCH 26/27] =?UTF-8?q?update=20-=20=E5=BF=83=E7=90=86=E7=9B=91?=
=?UTF-8?q?=E6=B5=8B=E8=AF=A6=E6=83=85=20=20=20=20=20-=20=E5=A2=9E?=
=?UTF-8?q?=E5=8A=A0=207=E5=A4=A9=20=E5=92=8C=2030=E5=A4=A9=E6=95=B0?=
=?UTF-8?q?=E6=8D=AE=E6=9F=A5=E7=9C=8B=E5=8A=9F=E8=83=BD=20=20=20=20=20-?=
=?UTF-8?q?=20=E4=BC=98=E5=8C=96=20=E9=A1=B5=E9=9D=A2=E6=A0=B7=E5=BC=8F?=
=?UTF-8?q?=E5=86=85=E5=AE=B9=20=20=20=20=20-=20=E5=A2=9E=E5=8A=A0=20?=
=?UTF-8?q?=E8=BF=94=E5=9B=9E=E5=88=B0=E9=9A=8F=E6=89=8B=E7=B2=BE=E7=81=B5?=
=?UTF-8?q?=E9=80=BB=E8=BE=91?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
README.md | 12 +-
src/config/models.js | 2 +-
.../health/psychological-main/index.scss | 6 +
src/views/health/psychological-main/index.vue | 22 ++-
src/views/health/psychological/index.scss | 10 +-
src/views/health/psychological/index.vue | 166 ++++++++++++++----
src/views/psychological-modeling/index.vue | 23 ++-
7 files changed, 186 insertions(+), 55 deletions(-)
diff --git a/README.md b/README.md
index 575ade1..9f221da 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
@@ -526,4 +526,12 @@ update
update
- 心理监测详情
- 今天趋势饼状图
- - 修改 百分比显示值,取小数点后面一位
\ No newline at end of file
+ - 修改 百分比显示值,取小数点后面一位
+
+## v1.0.66
+`2023.6.25`
+update
+- 心理监测详情
+ - 增加 7天 和 30天数据查看功能
+ - 优化 页面样式内容
+ - 增加 返回到随手精灵逻辑
\ No newline at end of file
diff --git a/src/config/models.js b/src/config/models.js
index c5ff508..b3c84c4 100644
--- a/src/config/models.js
+++ b/src/config/models.js
@@ -5,7 +5,7 @@
* @FilePath: \TelpoH5FrontendWeb\src\config\models.js
* @description:
*/
-export const VERSION_MODEL = '1.0.65F'; //版本号
+export const VERSION_MODEL = '1.0.66F'; //版本号
export const IMAGE_URL = {
production: 'http://zfb.ssjlai.com/web/',
test: 'http://zfb.ssjlai.com/web/',
diff --git a/src/views/health/psychological-main/index.scss b/src/views/health/psychological-main/index.scss
index 1d9511c..f132716 100644
--- a/src/views/health/psychological-main/index.scss
+++ b/src/views/health/psychological-main/index.scss
@@ -3,6 +3,12 @@
width: 100%;
overflow: hidden;
background-color: #F4F8FB;
+ .nav-bar-title {
+ display: flex;
+ -webkit-box-align: center;
+ -ms-flex-align: center;
+ align-items: center;
+ }
.main {
height: calc(100vh - 45px);
background-color: #F4F8FB;
diff --git a/src/views/health/psychological-main/index.vue b/src/views/health/psychological-main/index.vue
index 8fc613b..441a6d6 100644
--- a/src/views/health/psychological-main/index.vue
+++ b/src/views/health/psychological-main/index.vue
@@ -1,6 +1,15 @@
-
+
+
+
+ 返回
+
+
+
+ 今日情绪
+
+
@@ -46,6 +55,11 @@ export default {
}
},
+ computed: {
+ isShowLeft() {
+ return this.$route.query.fromUrl !== undefined;
+ }
+ },
created() {
this.loadParams();
this.getHomeData();
@@ -96,7 +110,11 @@ export default {
})
},
onNavBack() {
- this.$router.go(-1);
+ if(this.isShowLeft && this.$route.query.fromUrl !== undefined) {
+ window.location.href = `${this.$route.query.fromUrl}/#/device`;
+ } else {
+ this.$router.go(-1);
+ }
},
// 计算表情
calcImg(level) {
diff --git a/src/views/health/psychological/index.scss b/src/views/health/psychological/index.scss
index 0d3f1fc..ab3c915 100644
--- a/src/views/health/psychological/index.scss
+++ b/src/views/health/psychological/index.scss
@@ -11,7 +11,7 @@ $newBlue: #638EE4;
flex: 1;
.tab-bar {
- padding: 23px 13px 0 13px;
+ padding: 0 13px 0 13px;
.date-tab-con {
padding: 10px 0;
height: 35px;
@@ -57,7 +57,7 @@ $newBlue: #638EE4;
display: flex;
justify-content: space-between;
align-items: center;
- padding: 27px 16px 16px 13px;
+ padding: 16px 16px 16px 13px;
font-size: 18px;
.title-left {
font-weight: bold;
@@ -81,7 +81,7 @@ $newBlue: #638EE4;
.pie-chart-left {
position: relative;
height: 180px;
- padding-left: 23px;
+ padding-left: 15px;
width: 40%;
@include center();
#pieChart {
@@ -122,7 +122,7 @@ $newBlue: #638EE4;
}
.item-right {
display: flex;
- justify-content: flex-end;
+ justify-content: center;
align-items: center;
}
}
@@ -131,7 +131,7 @@ $newBlue: #638EE4;
}
.statistics {
position: relative;
- padding: 0 12px 36px 36px;
+ padding: 10px 14px;
.list {
flex: 1;
width: 100%;
diff --git a/src/views/health/psychological/index.vue b/src/views/health/psychological/index.vue
index 3e655ad..0cab189 100644
--- a/src/views/health/psychological/index.vue
+++ b/src/views/health/psychological/index.vue
@@ -1,6 +1,10 @@
-
+
+
+
+
+
@@ -22,7 +26,7 @@
{{ titleLeft }}
-
@@ -58,7 +62,7 @@
-
监测次数:{{ monitoringCount || '--' }}次
+
监测次数:{{ monitoringCount || '0' }}次
@@ -78,10 +82,8 @@
- {{ item.count ? item.count + '次' : '--'}}
- {{ item.percentage ? item.percentage + '%' : '--'}}
+ {{ item.count ? item.count + '次' : '0次'}}
+
@@ -201,8 +203,8 @@ export default {
// 日期选择标签
dateList: [
{ name: "today", text: "今天", value: 0 },
- /* { name: "week", text: "7天", value: 7 },
- { name: "month", text: "30天", value: 30 } */
+ { name: "week", text: "7天", value: 7 },
+ { name: "month", text: "30天", value: 30 }
],
current: 0, // 日期选择标签-当前选中的标签
currentDays: 0, //日期选择标签-日期参数
@@ -334,39 +336,40 @@ export default {
legend: {
width: "60%",
orient: "horizontal",
- right: "right",
+ left: 'right',
top: "3%",
bottom: "3%",
itemHeight: 12,
itemWidth: 12,
itemGap: 14,
+ align: 'auto',
selectedMode: false,
data: [
+
{
- name: `无${this.emoName}倾向`,
+ name: `轻度${this.emoName}倾向`,
icon: "rect",
itemStyle: {
- color: "#62BD48"
+ color: "#FFB481"
},
textStyle: {
- // 项目遗留问题,新项目不需重新转换文字大小
fontSize: 12
}
},
{
- name: `轻度${this.emoName}倾向`,
- icon: "rect",
+ name: `中度${this.emoName}倾向`,
itemStyle: {
- color: "#FFB481"
+ color: "#F86825"
},
+ icon: "rect",
textStyle: {
fontSize: 12
}
},
{
- name: `中度${this.emoName}倾向`,
+ name: `重度${this.emoName}倾向`,
itemStyle: {
- color: "#F86825"
+ color: "#F86825",
},
icon: "rect",
textStyle: {
@@ -374,15 +377,16 @@ export default {
}
},
{
- name: `重度${this.emoName}倾向`,
+ name: `无${this.emoName}倾向`,
+ icon: "rect",
itemStyle: {
- color: "#F86825"
+ color: "#62BD48"
},
- icon: "rect",
textStyle: {
+ // 项目遗留问题,新项目不需重新转换文字大小
fontSize: 12
}
- }
+ },
],
formatter: function(name) {
// 自定义显示内容
@@ -666,7 +670,7 @@ export default {
];
},
// 获取情绪数据
- getPsychologiclData(date) {
+ getPsychologiclData(date, startDate, endDate) {
this.$toast.loading({
message: '数据加载中'
@@ -677,8 +681,8 @@ export default {
: this.$dayjs(this.defaultDate).format("YYYY-MM-DD") /* "2023-05-23" */;
let reqParams = {
uid: this.uid,
- startDate: reqDate,
- endDate: reqDate,
+ startDate: startDate || reqDate,
+ endDate: endDate || reqDate,
type: this.emoType
};
console.log("请求参数", reqParams);
@@ -750,25 +754,37 @@ export default {
label: "最大值",
value: data.Max,
time: data.MaxDesc
- ? this.$dayjs(data.MaxDesc).format("hh:mm")
+ ? this.currentDays === 0 ? this.$dayjs(data.MaxDesc).format("HH:mm")
+ : this.$dayjs(data.MaxDesc).format("MM/DD HH:mm")
: ""
};
let Min = {
label: "最小值",
value: data.Min,
time: data.MinDesc
- ? this.$dayjs(data.MinDesc).format("hh:mm")
+ ? this.currentDays === 0 ? this.$dayjs(data.MinDesc).format("HH:mm")
+ : this.$dayjs(data.MinDesc).format("MM/DD HH:mm")
+ : ""
+ };
+ let Avg = {
+ label: "平均值",
+ value: data.Avg,
+ time: data.AvgDesc
+ ? this.currentDays === 0 ? this.$dayjs(data.AvgDesc).format("HH:mm")
+ : this.$dayjs(data.AvgDesc).format("MM/DD HH:mm")
: ""
};
let Current = {
label: "最近值",
value: data.Current,
time: data.CurrentDesc
- ? this.$dayjs(data.CurrentDesc).format("hh:mm")
+ ? this.currentDays === 0 ? this.$dayjs(data.CurrentDesc).format("HH:mm")
+ : this.$dayjs(data.CurrentDesc).format("MM/DD HH:mm")
: ""
};
this.statisticsList.push(Max);
this.statisticsList.push(Min);
+ this.statisticsList.push(Avg);
this.statisticsList.push(Current);
// 周报月报底部显示数据
let NoneDay = {
@@ -800,11 +816,20 @@ export default {
return item.Value;
});
// x轴显示数据
- this.xAxisData = data.ChartDatas.map(item => {
- return this.$dayjs(item.Key.replace(/-/g, "/")).format(
- "HH:mm"
- );
- });
+ if(this.currentDays === 0) {
+ // 显示今天数据
+ this.xAxisData = data.ChartDatas.map(item => {
+ return this.$dayjs(item.Key.replace(/-/g, "/")).format(
+ "HH:mm"
+ );
+ });
+ } else {
+ this.xAxisData = data.ChartDatas.map(item => {
+ return this.$dayjs(item.Key.replace(/-/g, "/")).format(
+ "MM/DD"
+ );
+ });
+ }
// 结果解读
this.result = data.Result;
this.advice = data.Advice;
@@ -958,9 +983,12 @@ export default {
const month = day.date.getMonth() + 1;
const date = day.date.getDate();
const formatDate = this.$dayjs(day.date).format("YYYY-MM-DD");
+ const currentDate = this.$dayjs(new Date()).format("YYYY-MM-DD");
day.className = "custom-calendar";
if (this.highlightDates.includes(formatDate)) {
day.className = "highlight-border";
+ }else if (formatDate === currentDate) {
+ day.text = '今天'
}
return day;
},
@@ -971,8 +999,11 @@ export default {
// 点击日期选择
onTabClick(value, index) {
this.current = index;
- this.currentDays = index;
- if (index !== 0) {
+ this.currentDays = value;
+ let currentDate = new Date();
+ let leftText = value === 0 ? '今天' : value === 7 ? '7天' : '30天';
+ this.titleLeft = `${leftText}${this.emoName}倾向趋势`;
+ if (value === 7) {
this.defaultOptions.xAxis.data = [
"周一",
"周二",
@@ -983,13 +1014,67 @@ export default {
"周日"
];
this.defaultOptions.series = this.weekAndMonthSeries;
- this.initEchart();
+ let dateList = this.getPostDate(currentDate, 6, true);
+ console.log("dateList", dateList);
+ this.getPsychologiclData('', dateList[0], dateList[1]);
+ } else if (value === 0) {
+ // 今天
+ this.defaultOptions.xAxis.data = this.xAxisData;
+ this.defaultOptions.series = this.defaultSeries;
+ this.defaultOptions.series[0].data = this.emotionData;
+ this.getPsychologiclData(this.selectDate ? this.selectDate : this .$dayjs(currentDate).format("YYYY-MM-DD"));
} else {
+ // 30天
this.defaultOptions.xAxis.data = this.xAxisData;
this.defaultOptions.series = this.defaultSeries;
this.defaultOptions.series[0].data = this.emotionData;
- this.initEchart();
+ let dateList = this.getCurrentMonthStaAndEnd(currentDate);
+ console.log("dateList", dateList);
+ this.getPsychologiclData('', dateList[0], dateList[1]);
+ }
+ },
+ getCurrentMonthStaAndEnd(currentDate) {
+ let list = [];
+ let monthStart = new Date(currentDate.getFullYear(), currentDate.getMonth(), 1); // 获取本月第一天的日期时间
+ let monthEnd = new Date(currentDate.getFullYear(), currentDate.getMonth() + 1, 0, 23, 59, 59); // 获取本月最后一天的日期时间(时间为23:59:59)
+ list.push(this.$dayjs(monthStart).format("YYYY-MM-DD"));
+ list.push(this.$dayjs(monthEnd).format("YYYY-MM-DD"));
+ return list;
+ },
+ // 获取指定天数的起始日期
+ /**
+ *
+ * @param dateNow :Date类
+ * @param intervalDays :间隔天数
+ * @param bolPastTime :Boolean,判断在参数date之前,还是之后,
+ */
+ getPostDate(dateNow,intervalDays,bolPastTime) {
+ let oneDayTime = 24 * 60 * 60 * 1000;
+ let list = [];
+ let lastDay;
+
+ if(bolPastTime == true){
+ lastDay = new Date(dateNow.getTime() - intervalDays * oneDayTime);
+ list.push(this.formateDate(lastDay));
+ list.push(this.formateDate(dateNow));
+ }else{
+ lastDay = new Date(dateNow.getTime() + intervalDays * oneDayTime);
+ list.push(this.formateDate(dateNow));
+ list.push(this.formateDate(lastDay));
}
+ return list;
+ },
+ formateDate(time){
+ let year = time.getFullYear();
+ let month = time.getMonth() + 1;
+ let day = time.getDate();
+ if (month < 10) {
+ month = '0' + month
+ };
+ if (day < 10) {
+ day = '0' + day
+ };
+ return year + '-' + month + '-' + day + '';
},
// 字体大小转化
fontChar(res) {
@@ -1020,8 +1105,9 @@ export default {
// 选择日历具体某一个日期
onSelect(value) {
const selectDate = this.$dayjs(value).format("YYYY-MM-DD");
- this.dateList[0].text = this.$dayjs(value).format("YYYY-MM-DD") === this.$dayjs(new Date()).format("YYYY-MM-DD") ? '今天' : this.$dayjs(value).format("YYYY-MM-DD");
+ this.dateList[0].text = this.$dayjs(value).format("YYYY-MM-DD") === this.$dayjs(new Date()).format("YYYY-MM-DD") ? '今天' : this.$dayjs(value).format("MM-DD");
this.calendarDialogShow = false;
+ this.selectDate = selectDate;
this.getPsychologiclData(selectDate);
},
// 计算字体显示的颜色
@@ -1058,7 +1144,9 @@ export default {
.van-calendar {
height: 300px;
.van-calendar__days .van-calendar__day {
-
+ width: 27px;
+ height: 27px;
+ font-size: 12px;
&.custom-calendar {
width: 27px;
height: 27px;
diff --git a/src/views/psychological-modeling/index.vue b/src/views/psychological-modeling/index.vue
index 70b9178..2f7b90e 100644
--- a/src/views/psychological-modeling/index.vue
+++ b/src/views/psychological-modeling/index.vue
@@ -1,6 +1,10 @@
-
-
+
+
+
+ 返回
+
+
@@ -76,6 +80,8 @@ export default {
return {
info: null,
showLeftArrow: null,
+ isSHowPage: false,
+ fromUrl: '',
}
},
mounted() {
@@ -93,6 +99,8 @@ export default {
this.$store.commit('fromSsjl', params.fromSsjl);
// 是否显示 返回标签
this.showLeftArrow = this.$store.getters.fromSsjl === 'true';
+ this.fromUrl = params.fromUrl;
+ console.log("fromUrl", this.fromUrl);
//初始化
this.init()
} else {
@@ -103,7 +111,7 @@ export default {
onNavBack() {
let fromSsjl = this.$store.getters.fromSsjl === 'true';
if(fromSsjl) {
- let baseUrl = process.env.NODE_ENV === "production" ? 'https://ai.ssjlai.com/parentweb' : 'https://id.ssjlai.com/parentweb';
+ let baseUrl = this.fromUrl;
window.location.href = `${baseUrl}/#/device`;
} else {
this.$router.go(-1);
@@ -124,16 +132,19 @@ export default {
this.$toast('用户不存在或未绑定手表')
} else if (re.response && re.response.initScaleState === 1 && re.response.progress === 1) {
// 2023.6.1 需求变更,建模完成直接跳到心理健康汇总页面
- this.$router.push(`/psychologicalMain?uid=${this.uid}`);
+ this.$router.replace(`/psychologicalMain?uid=${this.uid}&fromUrl=${this.fromUrl}`);
} else {
this.info = re.response
}
} else {
this.$toast(re.msg)
- }
+ }
+ setTimeout(() => {
+ this.isSHowPage = true;
+ }, 800)
},
toQuestion() {
- this.$router.push(`/PsychologicalQuestionnaire?uid=${this.uid}`)
+ this.$router.replace(`/PsychologicalQuestionnaire?uid=${this.uid}`)
},
api(url, config, token) {
let baseUrl = 'https://dbmq.rzliot.com/heart'
From 8496f31127f02011b7c0ccc7fc1cc4db64092a7f Mon Sep 17 00:00:00 2001
From: JinxChen <2183691628@qq.com>
Date: Sun, 25 Jun 2023 16:52:17 +0800
Subject: [PATCH 27/27] =?UTF-8?q?=E4=BC=98=E5=8C=96=20=E5=9B=BE=E8=A1=A8?=
=?UTF-8?q?=E6=8A=98=E7=BA=BF=E5=9B=BE=E9=A2=9C=E8=89=B2=E5=B1=95=E7=A4=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/health/psychological/index.vue | 69 +++++++++++-------------
1 file changed, 31 insertions(+), 38 deletions(-)
diff --git a/src/views/health/psychological/index.vue b/src/views/health/psychological/index.vue
index 0cab189..bb651f6 100644
--- a/src/views/health/psychological/index.vue
+++ b/src/views/health/psychological/index.vue
@@ -163,7 +163,7 @@
-
本周概览
+
{{ surveyTitle }}
@@ -312,7 +312,8 @@ export default {
// 选中的日历日期
selectDate: '',
uid: '',
- advice: ''
+ advice: '',
+ surveyTitle: '' || '本周概览'
};
},
computed: {
@@ -506,11 +507,18 @@ export default {
itemStyle: {
color: function(params) {
// 动态设置折线图远点颜色
- if (params.data > 140) {
- return "red";
- } else {
- return "#62BD48";
+ let value = params.data;
+ let color = '';
+ if (value <= 40) {
+ color = "#62BD48";
+ } else if (value > 40 && value <= 65) {
+ color = "#FEC350";
+ } else if (value > 65 && value <= 80) {
+ color = "#F86825";
+ } else if (value > 80) {
+ color = "#EB1D15";
}
+ return color;
}
}
},
@@ -521,16 +529,6 @@ export default {
data: "",
symbol: "circle",
symbolSize: 15, // 拐点圆的大小
- itemStyle: {
- color: function(params) {
- // 动态设置折线图远点颜色
- if (params.data > 140) {
- return "red";
- } else {
- return "#62BD48";
- }
- }
- }
},
{
name: `中度${this.emoName}倾向`,
@@ -867,11 +865,19 @@ export default {
itemStyle: {
color: function(params) {
// 动态设置折线图远点颜色
- if (params.data > 140) {
- return "red";
- } else {
- return "#62BD48";
- }
+ this.calcColor(params.data);
+ /* let value = params.data;
+ let color = '';
+ if (value <= 40) {
+ color = "#62BD48";
+ } else if (value > 40 && value <= 65) {
+ color = "#FEC350";
+ } else if (value > 65 && value <= 80) {
+ color = "#F86825";
+ } else if (value > 80) {
+ color = "#EB1D15";
+ }
+ return color; */
}
}
},
@@ -885,11 +891,6 @@ export default {
itemStyle: {
color: function(params) {
// 动态设置折线图远点颜色
- if (params.data > 140) {
- return "red";
- } else {
- return "#62BD48";
- }
}
}
},
@@ -908,25 +909,21 @@ export default {
{
name: `无${this.emoName}倾向`,
type: "scatter",
- data: /* this.emotionData */ [60, 60, 50, 60, 59, 60, 60],
+ data: '',
symbolSize: 15,
symbol: "circle",
itemStyle: {
borderColor: "#6CE463",
color: function(params) {
// 动态设置折线图远点颜色
- if (params.data > 140) {
- return "red";
- } else {
- return "#6CE463";
- }
+ this.calcColor(params.data);
}
}
},
{
name: `轻度${this.emoName}倾向`,
type: "scatter",
- data: [60, 60, 50, 60, 59, 60, 60],
+ /* data: [60, 60, 50, 60, 59, 60, 60], */
symbol: "path://M9 0h0a9 9 0 0 2 9 9v55a9 9 0 0 2-9 9h0a9 9 0 0 2-9-9v-55a9 9 0 0 2 10-9z",
symbolSize: [60, 60],
symbolKeepAspect: true,
@@ -936,11 +933,6 @@ export default {
opacity: 0.5,
color: function(params) {
// 动态设置折线图远点颜色
- if (params.data > 140) {
- return "red";
- } else {
- return "#6CE463";
- }
}
}
},
@@ -1003,6 +995,7 @@ export default {
let currentDate = new Date();
let leftText = value === 0 ? '今天' : value === 7 ? '7天' : '30天';
this.titleLeft = `${leftText}${this.emoName}倾向趋势`;
+ this.surveyTitle = value === 7 ? '本周概览' : '本月概览';
if (value === 7) {
this.defaultOptions.xAxis.data = [
"周一",