diff --git a/README.md b/README.md index d18f0fc..a172c98 100644 --- a/README.md +++ b/README.md @@ -786,4 +786,14 @@ update fix - 心理监测详情 - 修复 图表连线点颜色显示不正确的问题 - - 修复 选项菜单显示异常的问题 \ No newline at end of file + - 修复 选项菜单显示异常的问题 + + +## v1.0.99 +`2023.11.9` +fix +- 心理监测详情 + - 周报列表 + - 优化 列表显示 + - 周报详情 + - 增加 对比比例显示 \ No newline at end of file diff --git a/package.json b/package.json index c3e55b7..6afb87f 100644 --- a/package.json +++ b/package.json @@ -15,8 +15,10 @@ "@vant/area-data": "^1.2.2", "amfe-flexible": "^2.2.1", "axios": "^0.26.0", + "clipboard": "^2.0.11", "core-js": "^3.6.5", "dayjs": "^1.11.7", + "echarts": "^5.4.1", "html2canvas": "^1.4.1", "nprogress": "^0.2.0", "rxjs": "^7.8.0", @@ -24,9 +26,7 @@ "vue": "^2.6.11", "vue-router": "^3.2.0", "vuex": "^3.4.0", - "weixin-js-sdk": "^1.6.0", - "clipboard": "^2.0.11", - "echarts": "^5.4.1" + "weixin-js-sdk": "^1.6.0" }, "devDependencies": { "@vue/cli-plugin-babel": "^4.5.0", diff --git a/src/config/models.js b/src/config/models.js index a21a90e..60decfd 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.98F'; //版本号 +export const VERSION_MODEL = '1.0.99F'; //版本号 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 b99b7ef..af422bb 100644 --- a/src/views/health/psychological/index.vue +++ b/src/views/health/psychological/index.vue @@ -1325,7 +1325,7 @@ export default { summaryLevel: item.SummaryLevel, type: this.emoType } - }); + }).reverse(); this.$toast.success('数据加载完成'); }) }, diff --git a/src/views/health/psychological/report/index.scss b/src/views/health/psychological/report/index.scss index 302b71b..bbc99d4 100644 --- a/src/views/health/psychological/report/index.scss +++ b/src/views/health/psychological/report/index.scss @@ -163,9 +163,16 @@ } .item-right { - display: flex; - justify-content: center; - align-items: center; + @include center(); + } + .status { + padding: 0 5px; + @include center(); + img { + height: 15px; + width: 9px; + padding: 0 5px ; + } } } } @@ -279,14 +286,20 @@ font-size: 14px; padding: 0; color: #666666; - + @include center(); + /* align-items: flex-end; */ .day { /* padding: 5px; */ font-size: 28px; } .day-text { - font-size: 12px + font-size: 12px; + padding: 0 5px; + } + img { + height: 15px; + width: 9px; } } } diff --git a/src/views/health/psychological/report/index.vue b/src/views/health/psychological/report/index.vue index 7ef1b8c..c18c5b5 100644 --- a/src/views/health/psychological/report/index.vue +++ b/src/views/health/psychological/report/index.vue @@ -59,6 +59,11 @@ :style="{color: item.color}" >{{ item.percentage ? '(' + item.percentage + '%' + ')' : '(0%)'}} + +
{{ item.days }} 天 + + {{ calcWeekImg(item.days, item.lastDay, true) }}
{{ item.text }}
@@ -221,6 +228,8 @@ export default { ], params: {}, weekResult: {}, + upImg: require("@/assets/img/psychological/up.png"), + downImg: require("@/assets/img/psychological/down.png") } }, created() { @@ -506,6 +515,30 @@ export default { }, }, methods: { + calcWeekImg(cur, last, callBackText) { + let imgurl = ''; + let text = ''; + if(isNotNull(cur) && isNotNull(last) && this.weekAndMonData.length > 0) { + let curNumber = Number(cur); + let latNumber = Number(last); + if(curNumber - latNumber == 0) { + text = '持平'; + } else { + imgurl = curNumber < latNumber ? this.downImg : this.upImg; + text = Math.abs(curNumber - latNumber) + '天'; + } + if(callBackText) { + return text + } else { + return imgurl + } + } + }, + calcImg(value) { + let imgUrl = ''; + imgUrl = value > 0 ? this.upImg : value == 0 ? '' : this.downImg + return imgUrl; + }, async loadParams() { let params = this.$route.query; if (params) { @@ -592,10 +625,8 @@ export default { params: { ...reqParams }, /* headers: { 'AccessToken': this.$store.getters.ssjlToken } */ }).then(res => { - console.log("res", res); const data = res.data.response; let chartData = data.ChartData ? (JSON.parse(data.ChartData)).filter(item => {return item.Key}) : []; - console.log("图表数据", chartData); if(data) { this.monitoringCount = data.Total; this.pieRightList = []; @@ -608,37 +639,41 @@ export default { count: data.None, percentage: this.calcPercentage( data.None, - data.Count + data.Total ), text: `无${this.emoName}倾向`, - color: "#62BD48" + color: "#62BD48", + scale: data.NoneRatio }; let Mild = { count: data.Mild, percentage: this.calcPercentage( data.Mild, - data.Count + data.Total ), text: `轻度${this.emoName}倾向`, - color: "#ffde00" + color: "#ffde00", + scale: data.MildRatio }; let Moderate = { count: data.Moderate, percentage: this.calcPercentage( data.Moderate, - data.Count + data.Total ), text: `中度${this.emoName}倾向`, - color: "#ff8a00" + color: "#ff8a00", + scale: data.ModerateRatio }; let Severe = { count: data.Severe, percentage: this.calcPercentage( data.Severe, - data.Count + data.Total ), text: `重度${this.emoName}倾向`, - color: "#d70d0d" + color: "#d70d0d", + scale: data.SevereRatio }; // 饼状图右边数据 this.pieRightList.push(None); @@ -682,22 +717,30 @@ export default { let NoneDay = { days: data.NoneDay, text: `无${this.emoName}倾向`, - color: "#62BD48" + color: "#62BD48", + lastDay: data.LastNoneDay, + scale: data.NoneDayRatio }; let MildDay = { days: data.MildDay, text: `轻度${this.emoName}倾向`, - color: "#ffde00" + color: "#ffde00", + lastDay: data.LastMildDay, + scale: data.MildDayRatio }; let ModerateDay = { days: data.ModerateDay, text: `中度${this.emoName}倾向`, - color: "#ff8a00" + color: "#ff8a00", + lastDay: data.LastModerateDay, + scale: data.ModerateDayRatio }; let SevereDay = { days: data.SevereDay, text: `重度${this.emoName}倾向`, - color: "#d70d0d" + color: "#d70d0d", + lastDay: data.LastSevereDay, + scale: data.SevereDayRatio }; this.emotionList.push(NoneDay); this.emotionList.push(MildDay); @@ -718,7 +761,6 @@ export default { }; }); this.xAxisData = chartData.map(item => { - console.log("item", item); return item.Key ? this.$dayjs(item.Key.replace(/-/g, "/")).format( "MM/DD" ) : item.key;