wzl pirms 3 mēnešiem
vecāks
revīzija
791cf417ae
1 mainītis faili ar 32 papildinājumiem un 25 dzēšanām
  1. +32
    -25
      src/views/health/psychological/reportDetails/index.vue

+ 32
- 25
src/views/health/psychological/reportDetails/index.vue Parādīt failu

@@ -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);


Notiek ielāde…
Atcelt
Saglabāt