Bladeren bron

Merge branch 'feat' into test

test
chenJinxu 1 jaar geleden
bovenliggende
commit
2e12503a70
3 gewijzigde bestanden met toevoegingen van 51 en 12 verwijderingen
  1. +9
    -1
      README.md
  2. +1
    -1
      src/config/models.js
  3. +41
    -10
      src/views/health/psychological/report/index.vue

+ 9
- 1
README.md Bestand weergeven

@@ -802,4 +802,12 @@ fix
`2023.11.10`
fix
- 设备功耗查看
- 修复 监护角色数据解析错误导致相关页面显示错误的问题
- 修复 监护角色数据解析错误导致相关页面显示错误的问题


## v1.0.101
`2023.11.13`
update
- 心理监测详情
- 周报详情
- 优化 上周跟本周比例显示

+ 1
- 1
src/config/models.js Bestand weergeven

@@ -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/',


+ 41
- 10
src/views/health/psychological/report/index.vue Bestand weergeven

@@ -35,7 +35,7 @@
<p>{{ resetDate(weekResult.StartDate,weekResult.EndDate) || '--' }}</p>
</div>
<div class="count">
<p>监测次数:{{ weekResult.Total || '--' }}次</p>
<p>监测次数:{{ weekResult.LastTotal || '--' }}次</p>
</div>
<!-- 趋势对比-饼状图 -->
<div class="pie-chart-con">
@@ -61,8 +61,8 @@
</div>

<div class="status">
<img :src="calcImg(item.scale)" alt="" />
<span v-if="item.scale != 0" :style="{color: item.color}">{{ Math.abs(item.scale)}}%</span>
<img :src="calcImg(item.percentage, item.lastPercentage)" alt="" />
<span :style="{color: calcImg(item.percentage, item.lastPercentage, true) != 0 ? item.color : ''}">{{ calcImg(item.percentage, item.lastPercentage, true) ? Math.abs(calcImg(item.percentage, item.lastPercentage, true)) + '%' : '持平'}}</span>
</div>
</div>
</div>
@@ -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);


Laden…
Annuleren
Opslaan