瀏覽代碼

fix

- 心理监测详情
    - 周报列表
        - 优化 列表显示
    - 周报详情
        - 增加 对比比例显示
test
chenJinxu 1 年之前
父節點
當前提交
f2a89a3d0c
共有 6 個文件被更改,包括 91 次插入26 次删除
  1. +11
    -1
      README.md
  2. +3
    -3
      package.json
  3. +1
    -1
      src/config/models.js
  4. +1
    -1
      src/views/health/psychological/index.vue
  5. +18
    -5
      src/views/health/psychological/report/index.scss
  6. +57
    -15
      src/views/health/psychological/report/index.vue

+ 11
- 1
README.md 查看文件

@@ -786,4 +786,14 @@ update
fix
- 心理监测详情
- 修复 图表连线点颜色显示不正确的问题
- 修复 选项菜单显示异常的问题
- 修复 选项菜单显示异常的问题


## v1.0.99
`2023.11.9`
fix
- 心理监测详情
- 周报列表
- 优化 列表显示
- 周报详情
- 增加 对比比例显示

+ 3
- 3
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",


+ 1
- 1
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/',


+ 1
- 1
src/views/health/psychological/index.vue 查看文件

@@ -1325,7 +1325,7 @@ export default {
summaryLevel: item.SummaryLevel,
type: this.emoType
}
});
}).reverse();
this.$toast.success('数据加载完成');
})
},


+ 18
- 5
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;
}
}
}


+ 57
- 15
src/views/health/psychological/report/index.vue 查看文件

@@ -59,6 +59,11 @@
:style="{color: item.color}"
>{{ item.percentage ? '(' + item.percentage + '%' + ')' : '(0%)'}}</label>
</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>
</div>
</div>
</div>
</div>
@@ -103,6 +108,8 @@
<p>
<span :style="{color: item.color}" class="day">{{ item.days }}</span>
<span class="day-text">天</span>
<img :src="calcWeekImg(item.days, item.lastDay)" alt="">
<span class="day-text status">{{ calcWeekImg(item.days, item.lastDay, true) }}</span>
</p>
<p>{{ item.text }}</p>
</div>
@@ -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;


Loading…
取消
儲存