index.vue 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <template>
  2. <div class="container">
  3. <el-row :gutter="20" class="normal-margin">
  4. <el-col :span="6" v-for="o in 4" :key="o">
  5. <div class="normal-card"></div>
  6. </el-col>
  7. </el-row>
  8. <div class="normal-card normal-margin " shadow="none" v-for="item in modulesList" :key="item.systemid">
  9. <p class="title">{{item.systemname}}</p>
  10. <el-row :gutter="20">
  11. <el-col style="margin-top:16px" :span="4" v-for="modules in item.modules" :key="modules.systemmoduleid" @click.native="redictToModules(modules)">
  12. <div class="modules-item flex-align-center">
  13. <img width="50" height="50" src="../../assets/modules_icon.png" alt="">
  14. <p>{{modules.systemmodulename}}<br><small class="info">{{(modules.systemmodule).toUpperCase()}}</small></p>
  15. </div>
  16. </el-col>
  17. </el-row>
  18. </div>
  19. </div>
  20. </template>
  21. <script>
  22. export default {
  23. data () {
  24. return {
  25. modulesList:[]
  26. }
  27. },
  28. methods:{
  29. redictToModules (item) {
  30. this.$router.push({path:item.apps[0].path})
  31. sessionStorage.setItem('active_modules',JSON.stringify(item))
  32. }
  33. },
  34. mounted () {
  35. this.modulesList = JSON.parse(sessionStorage.getItem('module_info'))
  36. }
  37. }
  38. </script>
  39. <style>
  40. </style>
  41. <style scoped>
  42. .title{
  43. font-size: 16px;
  44. font-weight: bold;
  45. }
  46. .modules-item{
  47. padding: 20px;
  48. border-radius: 8px;
  49. cursor: pointer;
  50. }
  51. .modules-item > p{
  52. margin-left: 15px;
  53. }
  54. .modules-item:hover{
  55. background: #EAF1FE;
  56. }
  57. </style>