|
@@ -38,6 +38,7 @@ import { data } from "@utils/data.js";
|
|
|
import Toast from "../common/Toast.vue";
|
|
|
import { mapState } from "vuex";
|
|
|
export default {
|
|
|
+ name: 'ScaleDetail',
|
|
|
data() {
|
|
|
return {
|
|
|
list: [],
|
|
@@ -73,11 +74,15 @@ export default {
|
|
|
return score;
|
|
|
},
|
|
|
getresult() {
|
|
|
- if (this.score < 20) {
|
|
|
+ let score = 0;
|
|
|
+ for (let i in this.list.list) {
|
|
|
+ score += parseInt(this.list.list[i].checked);
|
|
|
+ }
|
|
|
+ if (score < 20) {
|
|
|
return "未达到目标在过去4周内,哮喘可能没有得到控制。可以制订一个哮喘管理计划,帮助改善哮喘控制。";
|
|
|
- } else if (this.score < 25 && this.score > 19) {
|
|
|
+ } else if (score < 25 && score > 19) {
|
|
|
return "接近目标在过去4周内,哮喘已得到良好控制,但还没有完全控制。";
|
|
|
- } else if (this.score >= 25) {
|
|
|
+ } else if (score > 24) {
|
|
|
return "在过去4周内,哮喘已得到完全控制。没有哮喘症状,生活也不受哮喘所限制。";
|
|
|
}
|
|
|
},
|
|
@@ -109,12 +114,13 @@ export default {
|
|
|
const scaleList = [
|
|
|
{
|
|
|
dataJson: JSON.stringify(this.list.list),
|
|
|
- result: this.getresult(),
|
|
|
- scaleName: this.list.title,
|
|
|
score: this.getscore(),
|
|
|
+ scaleName: this.list.title,
|
|
|
+ result: this.getresult(),
|
|
|
},
|
|
|
];
|
|
|
this.$store.commit("saveScaleInfo", scaleList);
|
|
|
+ console.log(this.istrue);
|
|
|
if (this.istrue) {
|
|
|
this.$router.push({
|
|
|
path: "/preview",
|