index.vue 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <template>
  2. <div class="container">
  3. <h3 style="text-align: center;color:#ffffff;margin-bottom: 5px;margin-top:35px">数据导航</h3>
  4. <div class="wrapper" v-for="route in routes" :key="route.label">
  5. <el-button type="info" plain @click="goRouter($event,route.link)">{{route.label}}
  6. <i class="el-icon-right"></i>
  7. </el-button>
  8. </div>
  9. </div>
  10. </template>
  11. <script>
  12. export default {
  13. data(){
  14. return {
  15. routes:[
  16. {label:'业绩报表', link:'/?path=results'},
  17. {label:'利润看板', link:'/?path=report'},
  18. {label:'应收账款', link:'/?path=accountsReceivable'},
  19. {label:'订单情况', link:'/?path=newReport'},
  20. {label:'库存情况', link:'/?path=stock'}
  21. ]
  22. }
  23. },
  24. mounted(){
  25. document.title = "数据导航"
  26. },
  27. methods:{
  28. goRouter(e,link){
  29. e.stopPropagation()
  30. window.location.hash = link
  31. }
  32. }
  33. }
  34. </script>
  35. <style lang="scss">
  36. .container {
  37. width:100%;
  38. height: 100vh;
  39. position: fixed;
  40. background-image: url(/wel.jpg);
  41. background-size: cover;
  42. background-position: 35%;
  43. }
  44. .wrapper{
  45. display: flex;
  46. padding: 10px;
  47. flex-direction: column;
  48. margin-bottom: 5px;
  49. button{
  50. margin: 0px !important;
  51. }
  52. }
  53. </style>