diff --git a/README.md b/README.md
index c4762ed..21103b4 100644
--- a/README.md
+++ b/README.md
@@ -802,4 +802,12 @@ fix
`2023.11.10`
fix
- 设备功耗查看
- - 修复 监护角色数据解析错误导致相关页面显示错误的问题
\ No newline at end of file
+ - 修复 监护角色数据解析错误导致相关页面显示错误的问题
+
+
+## v1.0.101
+`2023.11.13`
+update
+- 心理监测详情
+ - 周报详情
+ - 优化 上周跟本周比例显示
\ No newline at end of file
diff --git a/src/config/models.js b/src/config/models.js
index 12d3283..b4d1df5 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.100F'; //版本号
+export const VERSION_MODEL = '1.0.101F'; //版本号
export const IMAGE_URL = {
production: 'http://zfb.ssjlai.com/web/',
test: 'http://zfb.ssjlai.com/web/',
diff --git a/src/views/health/psychological/report/index.vue b/src/views/health/psychological/report/index.vue
index c18c5b5..45f6fb2 100644
--- a/src/views/health/psychological/report/index.vue
+++ b/src/views/health/psychological/report/index.vue
@@ -35,7 +35,7 @@
{{ resetDate(weekResult.StartDate,weekResult.EndDate) || '--' }}
-
监测次数:{{ weekResult.Total || '--' }}次
+
监测次数:{{ weekResult.LastTotal || '--' }}次
@@ -61,8 +61,8 @@
-
-
{{ Math.abs(item.scale)}}%
+
+
{{ calcImg(item.percentage, item.lastPercentage, true) ? Math.abs(calcImg(item.percentage, item.lastPercentage, true)) + '%' : '持平'}}
@@ -534,10 +534,25 @@ export default {
}
}
},
- calcImg(value) {
+ // 计算显示是上升or下降的图片
+ /**
+ *
+ * @param { 本周情绪比例} current
+ * @param { 上周情绪比例 } last
+ * @param { 是否返回对比比例 } isCallBackCompare
+ */
+ calcImg(current, last, isCallBackCompare) {
let imgUrl = '';
- imgUrl = value > 0 ? this.upImg : value == 0 ? '' : this.downImg
- return imgUrl;
+ let compare = '';
+ if(isNotNull(current) && isNotNull(last)) {
+ compare = Number(current) - Number(last);
+ imgUrl = compare > 0 ? this.upImg : compare == 0 ? '' : this.downImg
+ }
+ if(isCallBackCompare) {
+ return compare
+ } else {
+ return imgUrl;
+ }
},
async loadParams() {
let params = this.$route.query;
@@ -643,7 +658,11 @@ export default {
),
text: `无${this.emoName}倾向`,
color: "#62BD48",
- scale: data.NoneRatio
+ scale: data.NoneRatio,
+ lastPercentage: this.calcPercentage(
+ data.LastNone,
+ data.LastTotal
+ )
};
let Mild = {
count: data.Mild,
@@ -653,7 +672,11 @@ export default {
),
text: `轻度${this.emoName}倾向`,
color: "#ffde00",
- scale: data.MildRatio
+ scale: data.MildRatio,
+ lastPercentage: this.calcPercentage(
+ data.LastMild,
+ data.LastTotal
+ )
};
let Moderate = {
count: data.Moderate,
@@ -663,7 +686,11 @@ export default {
),
text: `中度${this.emoName}倾向`,
color: "#ff8a00",
- scale: data.ModerateRatio
+ scale: data.ModerateRatio,
+ lastPercentage: this.calcPercentage(
+ data.LastModerate,
+ data.LastTotal
+ )
};
let Severe = {
count: data.Severe,
@@ -673,7 +700,11 @@ export default {
),
text: `重度${this.emoName}倾向`,
color: "#d70d0d",
- scale: data.SevereRatio
+ scale: data.SevereRatio,
+ lastPercentage: this.calcPercentage(
+ data.LastSevere,
+ data.LastTotal
+ )
};
// 饼状图右边数据
this.pieRightList.push(None);