You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

DataAnalysis.vue 3.9 kB

4 years ago
4 years ago
4 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. <template>
  2. <div style="height:100%">
  3. <el-tabs tab-position="left" v-model="activeName" style="height:100%" @tab-click="handleClick" >
  4. <el-tab-pane label="概览" name="first" >
  5. <span slot="label">
  6. <el-image style="width: 13px; height: 13px" src="/img/overview.png">
  7. </el-image>
  8. 概览
  9. </span>
  10. <div >概览.......</div>
  11. <div >概览.......</div>
  12. <div >概览.......</div><div >概览.......</div>
  13. <div >概览.......</div>
  14. </el-tab-pane>
  15. <el-tab-pane label="项目分析" name="second" id="second" >
  16. <ProAnalysis ref='ProAnalysis'id="pro" v-if="isRouterAlive"></ProAnalysis>
  17. <span slot="label">
  18. <el-image style="width: 13px; height: 13px" src="/img/pro.svg">
  19. </el-image>
  20. 项目分析
  21. </span>
  22. </el-tab-pane>
  23. <el-tab-pane name="third" >
  24. <span slot='label'>
  25. <el-image style="width: 13px; height: 13px" src="/img/name.png">
  26. </el-image>
  27. 用户分析
  28. </span>
  29. <UserAnalysis ref='UserAnalysis' id ="usr"></UserAnalysis>
  30. </el-tab-pane>
  31. </el-tabs>
  32. </div>
  33. </template>
  34. <script>
  35. import ProAnalysis from './ProAnalysis.vue'
  36. import UserAnalysis from './UserAnalysis.vue'
  37. export default {
  38. components:{
  39. 'ProAnalysis':ProAnalysis,
  40. 'UserAnalysis':UserAnalysis,
  41. },
  42. data() {
  43. return {
  44. activeName:"second",
  45. loading:true,
  46. loading1:true,
  47. isRouterAlive: true,
  48. isSecond:true,
  49. isThird:false,
  50. }
  51. },
  52. methods:{
  53. handleClick(tab, event){
  54. if(tab.name=="second"){
  55. this.reload()
  56. //document.getElementById('usr').style.display="none"
  57. //document.getElementById("pro").style.display='block'
  58. //this.$refs.ProAnalysis.getAllProList("all",7)
  59. this.isSecond = true
  60. this.isThird = false
  61. this.$refs.ProAnalysis.getAllProList("all",7)
  62. }
  63. if(tab.name=="third"){
  64. // document.getElementById('usr').style.display="block"
  65. // document.getElementById("pro").style.display='none'
  66. this.$refs.UserAnalysis.getUserList("all_usr",7)
  67. this.isSecond = false
  68. this.isThird = true
  69. }
  70. },
  71. reload () {
  72. this.isRouterAlive = false
  73. this.$nextTick(() => (this.isRouterAlive = true))
  74. }
  75. },
  76. }
  77. </script>
  78. <style scoped>
  79. /deep/ .is-active{
  80. color: #238BFC ;
  81. background-color: #FFFF ;
  82. }
  83. /deep/ .ui-container{
  84. background-color: #FFFF;
  85. }
  86. /deep/ .el-tabs--left .el-tabs__header.is-left{
  87. background-color:#F5F5F6;
  88. width: 12.43%;
  89. }
  90. .el-tabs--left .el-tabs__header.is-left
  91. html,
  92. body,
  93. /deep/ .el-container {
  94. padding: 0px;
  95. margin: 0px;
  96. height: 100%;
  97. }
  98. /deep/ .el-tabs--left .el-tabs__item.is-left {
  99. text-align: left;
  100. }
  101. /deep/ .el-tabs__item {
  102. padding: 0px 20px 0px 20px;
  103. }
  104. </style>