From 355b1f7268e7be3b6e94c82da94898ce71d34a98 Mon Sep 17 00:00:00 2001
From: chenJinxu <2183691628@qq.com>
Date: Mon, 25 Mar 2024 16:51:33 +0800
Subject: [PATCH] =?UTF-8?q?fix=20-=20=E4=BF=AE=E5=A4=8D=20=E5=BF=83?=
=?UTF-8?q?=E7=90=86=E7=9B=91=E6=B5=8B=E8=AF=A6=E6=83=85=E4=B8=AD=E9=97=B4?=
=?UTF-8?q?=E7=BB=84=E4=BB=B6=E9=A2=9C=E8=89=B2=E4=B8=8E=E6=8E=A5=E5=8F=A3?=
=?UTF-8?q?=E8=BF=94=E5=9B=9E=E7=9A=84=E7=AD=89=E7=BA=A7=E9=A2=9C=E8=89=B2?=
=?UTF-8?q?=E4=B8=8D=E4=B8=80=E8=87=B4=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 | 8 +++++-
src/config/models.js | 2 +-
src/views/health/psychological-main/index.vue | 26 ++++++++++++++++++-
src/views/health/psychological/index.vue | 6 ++++-
.../health/psychological/report/index.vue | 19 +++++++++-----
5 files changed, 50 insertions(+), 11 deletions(-)
diff --git a/README.md b/README.md
index d0a13d4..eb806e1 100644
--- a/README.md
+++ b/README.md
@@ -914,4 +914,10 @@ update
## v1.0.117
`2024.3.21`
update
-- ‘抑郁’文字 通过页面传过来的参数 改成‘焦虑’,否则不变
\ No newline at end of file
+- ‘抑郁’文字 通过页面传过来的参数 改成‘焦虑’,否则不变
+
+
+## v1.0.118
+`2024.3.25`
+fix
+- 修复 心理监测详情中间组件颜色与接口返回的等级颜色不一致的问题
\ No newline at end of file
diff --git a/src/config/models.js b/src/config/models.js
index cf89513..9237bce 100644
--- a/src/config/models.js
+++ b/src/config/models.js
@@ -8,7 +8,7 @@
import store from "@/store";
// 情绪模型
const appTypeList = ['1'];
-export const VERSION_MODEL = '1.0.117F'; //版本号
+export const VERSION_MODEL = '1.0.118F'; //版本号
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 2229cd4..c644abe 100644
--- a/src/views/health/psychological-main/index.vue
+++ b/src/views/health/psychological-main/index.vue
@@ -13,7 +13,7 @@
-
+
{{ item.value || "--" }}
@@ -236,6 +236,30 @@ export default {
}
return color;
},
+ // 计算结果采用哪种颜色
+ calcResultColor(value, isCallBackClass) {
+ let color = "";
+ let className = "";
+ switch (Number(value)) {
+ case 0:
+ color = "#62BD48";
+ className = "none";
+ break;
+ case 1:
+ color = "#ffde00";
+ className = "mild";
+ break;
+ case 2:
+ color = "#ff8a00";
+ className = "moderate";
+ break;
+ case 3:
+ color = "#d70d0d";
+ className = "severe";
+ break;
+ }
+ return isCallBackClass ? className : color;
+ },
},
};
diff --git a/src/views/health/psychological/index.vue b/src/views/health/psychological/index.vue
index 65ac5ab..b4f60d0 100644
--- a/src/views/health/psychological/index.vue
+++ b/src/views/health/psychological/index.vue
@@ -102,7 +102,7 @@
- {{
+ {{
item.value || "--"
}}
@@ -926,6 +926,7 @@ export default {
? this.$dayjs(data.MaxDesc).format("HH:mm")
: this.$dayjs(data.MaxDesc).format("MM/DD HH:mm")
: "",
+ level: data.MaxLevel
};
let Min = {
label: "最小值",
@@ -935,6 +936,7 @@ export default {
? this.$dayjs(data.MinDesc).format("HH:mm")
: this.$dayjs(data.MinDesc).format("MM/DD HH:mm")
: "",
+ level: data.MinLevel
};
let Avg = {
label: "平均值",
@@ -944,6 +946,7 @@ export default {
? this.$dayjs(data.AvgDesc).format("HH:mm")
: this.$dayjs(data.AvgDesc).format("MM/DD HH:mm")
: "",
+ level: data.AvgLevel
};
let Current = {
label: "最近值",
@@ -953,6 +956,7 @@ export default {
? this.$dayjs(data.CurrentDesc).format("HH:mm")
: this.$dayjs(data.CurrentDesc).format("MM/DD HH:mm")
: "",
+ level: data.CurrentLevel
};
this.statisticsList.push(Max);
this.statisticsList.push(Min);
diff --git a/src/views/health/psychological/report/index.vue b/src/views/health/psychological/report/index.vue
index b851f4c..2e193eb 100644
--- a/src/views/health/psychological/report/index.vue
+++ b/src/views/health/psychological/report/index.vue
@@ -90,7 +90,7 @@
- {{
+ {{
item.value || "--"
}}
@@ -681,6 +681,7 @@ export default {
return item.Key;
})
: [];
+ console.log("chartData", chartData);
if (data) {
this.monitoringCount = data.Total;
this.pieRightList = [];
@@ -750,6 +751,7 @@ export default {
? this.$dayjs(data.MaxDesc).format("HH:mm")
: this.$dayjs(data.MaxDesc).format("MM/DD HH:mm")
: "",
+ level: data.MaxLevel
};
let Min = {
label: "最小值",
@@ -759,6 +761,7 @@ export default {
? this.$dayjs(data.MinDesc).format("HH:mm")
: this.$dayjs(data.MinDesc).format("MM/DD HH:mm")
: "",
+ level: data.MinLevel
};
let Avg = {
label: "平均值",
@@ -768,6 +771,7 @@ export default {
? this.$dayjs(data.AvgDesc).format("HH:mm")
: this.$dayjs(data.AvgDesc).format("MM/DD HH:mm")
: "",
+ level: data.AvgLevel
};
this.statisticsList.push(Max);
this.statisticsList.push(Min);
@@ -805,7 +809,7 @@ export default {
this.emotionList.push(ModerateDay);
this.emotionList.push(SevereDay);
// 图表数据
- this.emotionData = chartData.map((item) => {
+ this.emotionData = chartData.map(item => {
return {
value: item.Value,
itemStyle: {
@@ -813,6 +817,7 @@ export default {
},
};
});
+ console.log("emotionData", this.emotionData);
this.weekAndMonData = chartData.map((item, index) => {
return {
value: [index, item.MinValue, item.MaxValue],
@@ -1001,20 +1006,20 @@ export default {
calcResultColor(value, isCallBackClass) {
let color = "";
let className = "";
- switch (value) {
- case ("0", 0):
+ switch (Number(value)) {
+ case 0:
color = "#62BD48";
className = "none";
break;
- case ("1", 1):
+ case 1:
color = "#ffde00";
className = "mild";
break;
- case ("2", 2):
+ case 2:
color = "#ff8a00";
className = "moderate";
break;
- case ("3", 3):
+ case 3:
color = "#d70d0d";
className = "severe";
break;