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 4.1 kB

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  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" id='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.reload()
  67. this.isSecond = false
  68. this.isThird = true
  69. this.$refs.UserAnalysis.resetPage()
  70. this.$refs.UserAnalysis.getUpdateTime()
  71. this.$refs.UserAnalysis.getUserList("all_usr",7)
  72. }
  73. },
  74. reload () {
  75. this.isRouterAlive = false
  76. this.$nextTick(() => (this.isRouterAlive = true))
  77. }
  78. },
  79. }
  80. </script>
  81. <style scoped>
  82. /deep/ .is-active{
  83. color: #238BFC ;
  84. background-color: #FFFF ;
  85. }
  86. /deep/ .ui-container{
  87. background-color: #FFFF;
  88. }
  89. /deep/ .el-tabs--left .el-tabs__header.is-left{
  90. background-color:#F5F5F6;
  91. width: 12.43%;
  92. }
  93. .el-tabs--left .el-tabs__header.is-left
  94. html,
  95. body,
  96. /deep/ .el-container {
  97. padding: 0px;
  98. margin: 0px;
  99. height: 100%;
  100. }
  101. /deep/ .el-tabs--left .el-tabs__item.is-left {
  102. text-align: left;
  103. }
  104. /deep/ .el-tabs__item {
  105. padding: 0px 20px 0px 20px;
  106. }
  107. </style>