洋浦学校八大中心 德育管理前端

init
gongdi 3 years ago
parent 5372c0562e
commit d1772f8a3d

@ -118,9 +118,11 @@
if (result[0].status === 200) {
let data = result[0].data;
if (data.code === 2000) {
console.log(data.data)
//cookie
this.Cookie.set("person_id", data.data.person_id);
this.Cookie.set("identity_id", data.data.identity_id);
this.Cookie.set("token", data.data.access_token);
//BaseConfig
this.buildBaseInfo();

@ -17,6 +17,10 @@
data(){
return {}
},
created(){
document.documentElement.style.setProperty('--modTitleOne', '#094193');
document.documentElement.style.setProperty('--modTitleTwo', '#094193');
},
components:{
StudentManage,
classManage,

@ -64,7 +64,7 @@
@import '../../assets/scss/index.scss';
.business{
padding: 0!important;
/*background-image: url("../../assets/pageBg.jpg");*/
background-image: url("../../assets/pageBg.jpg");
.host-body{
.body-box{
position: relative;

@ -84,7 +84,7 @@
},
systemData: [],
layoutData: {},
showWorkBenchButton:true,//
showWorkBenchButton: true,//
}
},
computed: {
@ -105,6 +105,15 @@
deep: true
}
},
beforeMount(){
//
let menuOptions = this.$store.state.userStore.menuOptions;
if (menuOptions) {
this.title = menuOptions.title;
this.menuAry = menuOptions.menuAry;
this.menuPath = menuOptions.menuPath;
}
},
mounted(){
this.emitRouteChange(this.$route.path);
this.$bus.on("topCountChange", this.changeCount);
@ -136,7 +145,7 @@
return path !== ""
})
}
if(routePathAry.length > 1){
if (routePathAry.length > 1) {
//
this.menuPath = routePath;
this.changeBackImg(this.menuPath);
@ -149,6 +158,11 @@
}
this.menuAry = this.filterMenuAry(routePath);
this.menuPath = this.menuAry && this.menuAry.length > 0 ? this.menuAry[0].path : "";
this.$store.commit('userStore/setMenuOptions', {
title: this.title,
menuAry: this.menuAry,
menuPath: this.menuPath
});
this.changeBackImg(this.menuPath);
this.$emit("modelChange", this.menuPath);
},
@ -160,19 +174,19 @@
}
},
changeBackImg: function (path) {
if(path.indexOf("workBench") > 0){
if (path.indexOf("workBench") > 0) {
//
if(path === "/workBench/application"){
if (path === "/workBench/application") {
//
this.rightWidth = 30;
this.topImgUrl = topImg01;
this.showWorkBenchButton = false;
}else {
} else {
this.rightWidth = 40;
this.topImgUrl = topImg02;
this.showWorkBenchButton = true;
}
}else {
} else {
this.rightWidth = 30;
this.topImgUrl = topImg01;
this.showWorkBenchButton = false;
@ -257,10 +271,14 @@
this.$bus.emit("accessSubsystem", systemData);
},
//
servicePlatform:function (systemData) {
servicePlatform: function (systemData) {
this.$refs.systemListRef.clicked = false;
//this.$router.replace({name:"servicePlatform",params:{id:systemData.id,name:systemData.title}});
this.$router.push({path:'/workBench/servicePlatform/:id/:name',name:'servicePlatform',params:{id:systemData.id,name:systemData.title}});
this.$router.push({
path: '/workBench/servicePlatform/:id/:name',
name: 'servicePlatform',
params: {id: systemData.id, name: systemData.title}
});
}
},
beforeDestroy(){

@ -4,14 +4,16 @@ export default {
user: null,//人员信息
roles: null,//角色信息
menus: null,//菜单信息
menuOptions: null,//菜单配置
portraitUrl: "",//头像路径
showLoginBox:false,//是否弹出登录框
theme:"systemTheme",//主题
showLoginBox: false,//是否弹出登录框
theme: "systemTheme",//主题
},
getter: {
user: state => state.user,
roles: state => state.roles,
menus: state => state.menus,
menuOptions: state => state.menuOptions,
portraitUrl: state => state.portraitUrl,
showLoginBox: state => state.showLoginBox,
theme: state => state.theme,
@ -26,6 +28,9 @@ export default {
setMenus (state, menus) {
state.menus = menus;
},
setMenuOptions (state, menuOptions) {
state.menuOptions = menuOptions;
},
setPortraitUrl (state, portraitUrl) {
state.portraitUrl = portraitUrl;
},
@ -39,6 +44,7 @@ export default {
state.user = null;
state.roles = null;
state.menus = null;
state.menuOptions = null;
state.portraitUrl = null;
state.showLoginBox = false;
state.theme = "systemTheme";

Loading…
Cancel
Save