home.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. <template>
  2. <el-container class="homePage">
  3. <el-container class="homeBody">
  4. <el-aside width="12%" class="aside">
  5. <div class="btns" v-for="item in navList" :key="item.id" @click="goto(item.goto)" :style="{background: !$route.path.indexOf(item.goto)?'#3D67BC':'',color:!$route.path.indexOf(item.goto)?'#fff':''}">
  6. <span>
  7. <i :class="item.icon"></i>
  8. {{ item.label }}
  9. </span>
  10. </div>
  11. </el-aside>
  12. <el-main class="main core_dialogue">
  13. <router-view></router-view>
  14. </el-main>
  15. </el-container>
  16. </el-container>
  17. </template>
  18. <script>
  19. // import { BackgroundClass } from 'quill';
  20. // import App from '../App.vue'
  21. export default {
  22. data() {
  23. return {
  24. navList:[
  25. {id:1,label:"项目立项申请",goto:"/projectApplication",icon:"iconfont icon-shuben"},
  26. {id:2,label:"活动管理",goto:"/makerActvity",icon:"iconfont icon-yinliang"},
  27. {id:3,label:"资金使用管理",goto:"/makerfund",icon:"iconfont icon-zijinguanli"},
  28. {id:4,label:"项目管理",goto:"/ProjectManagement",icon:"iconfont icon-project_management"},
  29. {id:5,label:"项目结项",goto:"/projectSettlement",icon:"iconfont icon-_yuanhuanchong"},
  30. {id:6,label:"学分登记",goto:"/credit",icon:"iconfont icon-yonghu"},
  31. {id:7,label:"成果展示",goto:"/resultsShow",icon:"iconfont icon-xiangmuguanli2"},
  32. {id:8,label:"创业公司登记",goto:"/firm",icon:"iconfont icon-zuzhijiegou"},
  33. {id:9,label:"消息通知",goto:"/messageNotification",icon:"iconfont icon-xiaoxitongzhi3"},
  34. ]
  35. }
  36. },
  37. methods:{
  38. goto(url){
  39. // console.log(this.$route.path);
  40. this.$router.push(url)
  41. },
  42. homeExit(){
  43. // console.log(this.$route.path)
  44. this.$router.push('/login')
  45. }
  46. },
  47. mounted(){
  48. // console.log(this.$route.path)
  49. }
  50. }
  51. </script>
  52. <style lang="less" scoped>
  53. .homePage{
  54. // 减去公共部分使页面铺满浏览器
  55. height: calc(100% - 60px);
  56. width: 100%;
  57. .homeBody{
  58. margin: 20px 20px;
  59. .aside{
  60. background-color: #fff;
  61. color: #909399;
  62. height: 100%;
  63. border-radius: 5px;
  64. display: flex;
  65. align-items: center;
  66. flex-direction: column;
  67. .btns{
  68. display: flex;
  69. width: 100%;
  70. height: 80px;
  71. align-items: center;
  72. font-size: 16px;
  73. cursor: pointer;
  74. box-sizing: border-box;
  75. padding-left: 20%;
  76. span{
  77. display: flex;
  78. // background: red;
  79. align-items: center;
  80. i{
  81. position: relative;
  82. top: 1px;
  83. font-size: 16px;
  84. margin-right: 3px;
  85. }
  86. }
  87. }
  88. }
  89. .main {
  90. // height: 100%;
  91. background-color: #fff;
  92. color: #333;
  93. text-align: center;
  94. margin-left: 20px;
  95. }
  96. }
  97. }
  98. </style>