App.vue 1.5 KB

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