|
|
|
@ -33,7 +33,7 @@
|
|
|
|
|
},
|
|
|
|
|
watch: {
|
|
|
|
|
$route: {
|
|
|
|
|
handler(val, oldval){
|
|
|
|
|
handler: function (val, oldval) {
|
|
|
|
|
if (val.path === '/partyCenter/party') {
|
|
|
|
|
this.isPartyPage = true;
|
|
|
|
|
} else {
|
|
|
|
@ -41,6 +41,7 @@
|
|
|
|
|
}
|
|
|
|
|
this.changeMenu();
|
|
|
|
|
},
|
|
|
|
|
deep: true
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
props: {
|
|
|
|
@ -50,37 +51,43 @@
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
mounted(){
|
|
|
|
|
this.changeMenu();
|
|
|
|
|
let path = this.$route.path;
|
|
|
|
|
if (path === '/partyCenter/party') {
|
|
|
|
|
this.isPartyPage = true;
|
|
|
|
|
} else {
|
|
|
|
|
this.isPartyPage = false;
|
|
|
|
|
}
|
|
|
|
|
this.changeMenu();
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
menuClick: function () {
|
|
|
|
|
this.$emit("menuClick", this.menu)
|
|
|
|
|
},
|
|
|
|
|
changeMenu:function () {
|
|
|
|
|
changeMenu: function () {
|
|
|
|
|
switch (this.$props.menu.name) {
|
|
|
|
|
case "partyCenterPage":
|
|
|
|
|
this.imgUrl = this.isPartyPage?this.partyRedImg:this.partyImg;
|
|
|
|
|
this.imgUrl = this.isPartyPage ? this.partyRedImg : this.partyImg;
|
|
|
|
|
break;
|
|
|
|
|
case "adminCenterPage":
|
|
|
|
|
this.imgUrl = this.isPartyPage?this.adminRedImg:this.adminImg;
|
|
|
|
|
this.imgUrl = this.isPartyPage ? this.adminRedImg : this.adminImg;
|
|
|
|
|
break;
|
|
|
|
|
case "safeCenterPage":
|
|
|
|
|
this.imgUrl = this.isPartyPage?this.safeRedImg:this.safeImg;
|
|
|
|
|
this.imgUrl = this.isPartyPage ? this.safeRedImg : this.safeImg;
|
|
|
|
|
break;
|
|
|
|
|
case "teachingCenterPage":
|
|
|
|
|
this.imgUrl = this.isPartyPage?this.teachingRedImg:this.teachingImg;
|
|
|
|
|
this.imgUrl = this.isPartyPage ? this.teachingRedImg : this.teachingImg;
|
|
|
|
|
break;
|
|
|
|
|
case "moralEducationCenterPage":
|
|
|
|
|
this.imgUrl = this.isPartyPage?this.deyuRedImg:this.deyuImg;
|
|
|
|
|
this.imgUrl = this.isPartyPage ? this.deyuRedImg : this.deyuImg;
|
|
|
|
|
break;
|
|
|
|
|
case "teacherAdminCenterPage":
|
|
|
|
|
this.imgUrl = this.isPartyPage?this.teacherRedImg:this.teacherImg;
|
|
|
|
|
this.imgUrl = this.isPartyPage ? this.teacherRedImg : this.teacherImg;
|
|
|
|
|
break;
|
|
|
|
|
case "monitorCenterPage":
|
|
|
|
|
this.imgUrl = this.isPartyPage?this.dataRedImg:this.dataImg;
|
|
|
|
|
this.imgUrl = this.isPartyPage ? this.dataRedImg : this.dataImg;
|
|
|
|
|
break;
|
|
|
|
|
case "serviceCenterPage":
|
|
|
|
|
this.imgUrl = this.isPartyPage?this.serviceRedImg:this.serviceImg;
|
|
|
|
|
this.imgUrl = this.isPartyPage ? this.serviceRedImg : this.serviceImg;
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
break;
|
|
|
|
|