Merge remote-tracking branch 'origin/init' into init

init
zhusiyu 3 years ago
commit 19a9e5ce2a

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

@ -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);
@ -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);
}, },
@ -260,7 +274,11 @@
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,6 +4,7 @@ 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",//主题
@ -12,6 +13,7 @@ export default {
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