|
@@ -1,63 +1,68 @@
|
|
|
<template>
|
|
|
<div id="app">
|
|
|
- <router-view/>
|
|
|
+ <router-view />
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
- import {mapGetters} from 'vuex'
|
|
|
- export default{
|
|
|
- data () {
|
|
|
- return {
|
|
|
- system:null
|
|
|
- }
|
|
|
- },
|
|
|
- computed:{
|
|
|
+import { mapGetters } from "vuex";
|
|
|
+export default {
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ system: null,
|
|
|
+ };
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
...mapGetters({
|
|
|
- searchValue:'searchValue',
|
|
|
- isRouterAlive:'isRouterAlive'
|
|
|
- })
|
|
|
+ searchValue: "searchValue",
|
|
|
+ isRouterAlive: "isRouterAlive",
|
|
|
+ }),
|
|
|
},
|
|
|
- methods:{
|
|
|
- },
|
|
|
- created () {
|
|
|
- },
|
|
|
- watch: {
|
|
|
- $route(val) {
|
|
|
- this.system = JSON.parse(sessionStorage.getItem('module_info'))
|
|
|
- this.system?this.system.forEach(sys => {
|
|
|
- sys.modules.forEach(md=>{
|
|
|
- md.apps.forEach(app=>{
|
|
|
- if (val.name == app.name) {
|
|
|
- sessionStorage.setItem('active_modules',JSON.stringify(md))
|
|
|
- this.$store.dispatch('setActiveApp',{app:app,val:this.searchValue})
|
|
|
- this.$store.dispatch('setSSystemModules',sys.modules)
|
|
|
- }
|
|
|
- })
|
|
|
+ methods: {},
|
|
|
+ created() {
|
|
|
+ store.state._this = this;
|
|
|
+ },
|
|
|
+ watch: {
|
|
|
+ $route(val) {
|
|
|
+ this.system = JSON.parse(sessionStorage.getItem("module_info"));
|
|
|
+ this.system
|
|
|
+ ? this.system.forEach((sys) => {
|
|
|
+ sys.modules.forEach((md) => {
|
|
|
+ md.apps.forEach((app) => {
|
|
|
+ if (val.name == app.name) {
|
|
|
+ sessionStorage.setItem("active_modules", JSON.stringify(md));
|
|
|
+ this.$store.dispatch("setActiveApp", {
|
|
|
+ app: app,
|
|
|
+ val: this.searchValue,
|
|
|
+ });
|
|
|
+ this.$store.dispatch("setSSystemModules", sys.modules);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
})
|
|
|
- }):"";
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+ : "";
|
|
|
+ },
|
|
|
+ },
|
|
|
+};
|
|
|
</script>
|
|
|
<style>
|
|
|
-
|
|
|
-body{
|
|
|
- font:16px/1.5 Helvetica Neue,Helvetica,Arial,Microsoft Yahei,Hiragino Sans GB,Heiti SC,WenQuanYi Micro Hei,sans-serif;
|
|
|
+body {
|
|
|
+ font: 16px/1.5 Helvetica Neue, Helvetica, Arial, Microsoft Yahei,
|
|
|
+ Hiragino Sans GB, Heiti SC, WenQuanYi Micro Hei, sans-serif;
|
|
|
font-family: "微软雅黑";
|
|
|
min-width: 1200px;
|
|
|
}
|
|
|
-.rightBar{
|
|
|
- width:60px;
|
|
|
- height:100vh;
|
|
|
- background: rgba(255,255,255,.5);
|
|
|
+.rightBar {
|
|
|
+ width: 60px;
|
|
|
+ height: 100vh;
|
|
|
+ background: rgba(255, 255, 255, 0.5);
|
|
|
box-shadow: 0 2px 5px rgb(0 0 0 / 10%);
|
|
|
}
|
|
|
-.el-drawer__header{
|
|
|
+.el-drawer__header {
|
|
|
padding: 10px !important;
|
|
|
margin-bottom: 0 !important;
|
|
|
- font-size: 16px !important;
|
|
|
+ font-size: 16px !important;
|
|
|
font-family: PingFang SC-Bold, PingFang SC;
|
|
|
- font-weight: bold !important;
|
|
|
- color: #333333 !important;
|
|
|
+ font-weight: bold !important;
|
|
|
+ color: #333333 !important;
|
|
|
}
|
|
|
</style>
|