App.vue 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <template>
  2. <div id="app">
  3. <router-view/>
  4. </div>
  5. </template>
  6. <script>
  7. import {mapGetters} from 'vuex'
  8. export default{
  9. data () {
  10. return {
  11. system:null
  12. }
  13. },
  14. computed:{
  15. ...mapGetters({
  16. searchValue:'searchValue',
  17. })
  18. },
  19. methods:{
  20. },
  21. created () {
  22. },
  23. watch: {
  24. $route(val) {
  25. this.system = JSON.parse(sessionStorage.getItem('module_info'))
  26. this.system.forEach(sys => {
  27. sys.modules.forEach(md=>{
  28. md.apps.forEach(app=>{
  29. if (val.name == app.name) {
  30. sessionStorage.setItem('active_modules',JSON.stringify(md))
  31. this.$store.dispatch('setActiveApp',{app:app,val:this.searchValue})
  32. this.$store.dispatch('setSSystemModules',sys.modules)
  33. }
  34. })
  35. })
  36. });
  37. }
  38. }
  39. }
  40. </script>
  41. <style>
  42. body{
  43. font:16px/1.5 Helvetica Neue,Helvetica,Arial,Microsoft Yahei,Hiragino Sans GB,Heiti SC,WenQuanYi Micro Hei,sans-serif;
  44. font-family: "阿里巴巴普惠体 2.0 35 Thin";
  45. min-width: 1200px;
  46. }
  47. .rightBar{
  48. width:60px;
  49. height:100vh;
  50. background: rgba(255,255,255,.5);
  51. box-shadow: 0 2px 5px rgb(0 0 0 / 10%);
  52. }
  53. .el-drawer__header{
  54. padding: 10px !important;
  55. margin-bottom: 0 !important;
  56. font-size: 16px !important;
  57. font-family: PingFang SC-Bold, PingFang SC;
  58. font-weight: bold !important;
  59. color: #333333 !important;
  60. }
  61. </style>