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

init
gongdi 3 years ago
parent 5372c0562e
commit d1772f8a3d

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

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

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

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

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

Loading…
Cancel
Save