|
|
@@ -892,38 +892,41 @@ export default { |
|
|
|
deep: true, |
|
|
|
} |
|
|
|
}, |
|
|
|
created() { |
|
|
|
// 读取路由传过来的参数,根据路由传过来的参数判断是哪种情绪 |
|
|
|
this.loadParams(); |
|
|
|
this.initEchartText(); |
|
|
|
this.getCalendarData(); |
|
|
|
|
|
|
|
}, |
|
|
|
created() {}, |
|
|
|
mounted() { |
|
|
|
this.getPsychologiclData(); |
|
|
|
this.getWeekResultDetail(); |
|
|
|
this.getWeekResult(); |
|
|
|
/* this.initEchart(); */ |
|
|
|
if(this.params.current) { |
|
|
|
this.current = Number(this.params.current); |
|
|
|
this.currentDays = this.calcDaysByTabClick( |
|
|
|
Number(this.params.current) |
|
|
|
); |
|
|
|
} else { |
|
|
|
this.current = Number(this.$store.getters.tabClick) || 0; |
|
|
|
this.currentDays = this.calcDaysByTabClick( |
|
|
|
Number(this.$store.getters.tabClick) |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
|
this.psyCurrent = this.calcPsyTabindex(EmotionModel[this.params.name].type); |
|
|
|
window.document.title = "心理监测"; |
|
|
|
/* window.addEventListener("resize", this.onResize, false); */ |
|
|
|
}, |
|
|
|
destroyed(){ |
|
|
|
/* window.removeEventListener("resize", this.onResize, false); */ |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
async initData(){ |
|
|
|
// 读取路由传过来的参数,根据路由传过来的参数判断是哪种情绪 |
|
|
|
await this.loadParams(); |
|
|
|
this.initEchartText(); |
|
|
|
this.getCalendarData(); |
|
|
|
|
|
|
|
this.$nextTick(()=>{ |
|
|
|
this.getPsychologiclData(); |
|
|
|
this.getWeekResultDetail(); |
|
|
|
this.getWeekResult(); |
|
|
|
/* this.initEchart(); */ |
|
|
|
if(this.params.current) { |
|
|
|
this.current = Number(this.params.current); |
|
|
|
this.currentDays = this.calcDaysByTabClick( |
|
|
|
Number(this.params.current) |
|
|
|
); |
|
|
|
} else { |
|
|
|
this.current = Number(this.$store.getters.tabClick) || 0; |
|
|
|
this.currentDays = this.calcDaysByTabClick( |
|
|
|
Number(this.$store.getters.tabClick) |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
|
this.psyCurrent = this.calcPsyTabindex(EmotionModel[this.params.name].type); |
|
|
|
window.document.title = "心理监测"; |
|
|
|
}) |
|
|
|
}, |
|
|
|
/* onResize(){ |
|
|
|
if(this.pieEcharts){ |
|
|
|
this.pieEcharts.resize(); |
|
|
@@ -976,7 +979,11 @@ export default { |
|
|
|
if (params) { |
|
|
|
// 获取token |
|
|
|
if (!params.accessToken) { |
|
|
|
this.$toast.loading({ |
|
|
|
message: "数据加载中", |
|
|
|
}); |
|
|
|
let authToken = await this.getAuth(); |
|
|
|
this.$toast.clear() |
|
|
|
this.$store.commit("ssjlToken", authToken); |
|
|
|
} else { |
|
|
|
this.$store.commit("ssjlToken", params.accessToken); |
|
|
|