index.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. <template>
  2. <div class="body">
  3. <div class="db_header">
  4. <!-- <div class="logoTop">Logo</div> -->
  5. <div class="db_header_title">
  6. <div v-if="type == 1">综合数据中心</div>
  7. <div v-if="type == 2">课程数据中心</div>
  8. <div v-if="type == 3">学生数据中心</div>
  9. <div v-if="type == 4">教师数据中心</div>
  10. </div>
  11. <div class="db_check">
  12. <div :class="{ active: type == 1 }" @click="setType(1)">综合数据</div>
  13. <div :class="{ active: type == 2 }" @click="setType(2)">课程数据</div>
  14. <div :class="{ active: type == 5 }" @click="setType(5)">项目数据</div>
  15. <div :class="{ active: type == 3 }" @click="setType(3)">学生数据</div>
  16. <div :class="{ active: type == 4 }" @click="setType(4)">教师数据</div>
  17. </div>
  18. </div>
  19. <div class="db_body">
  20. <school v-if="type == 1" :oid="oid" :org="org"></school>
  21. <course v-if="type == 2" :oid="oid" :org="org"></course>
  22. <project v-if="type == 5" :oid="oid" :org="org"></project>
  23. <student v-if="type == 3" :oid="oid" :org="org"></student>
  24. <teacher v-if="type == 4" :oid="oid" :org="org"></teacher>
  25. </div>
  26. </div>
  27. </template>
  28. <script>
  29. import school from "./school";
  30. import course from "./course";
  31. import student from "./student";
  32. import teacher from "./teacher";
  33. import project from "./project";
  34. export default {
  35. components: {
  36. school,
  37. course,
  38. student,
  39. teacher,
  40. project,
  41. },
  42. data() {
  43. return {
  44. type: 1,
  45. oid: this.$route.query.oid,
  46. org: this.$route.query.org,
  47. };
  48. },
  49. methods: {
  50. setType(type) {
  51. this.type = type;
  52. },
  53. },
  54. };
  55. </script>
  56. <style scoped>
  57. .body {
  58. height: 100%;
  59. width: 100%;
  60. min-width: 1200px;
  61. min-height: 750px;
  62. }
  63. .db_header {
  64. width: 100%;
  65. height: 50px;
  66. display: flex;
  67. justify-content: center;
  68. position: relative;
  69. background: #fff;
  70. align-items: center;
  71. }
  72. .logoTop {
  73. position: absolute;
  74. left: 30px;
  75. }
  76. .db_header_title {
  77. font-weight: bold;
  78. font-size: 20px;
  79. }
  80. .db_header_title > div {
  81. position: relative;
  82. z-index: 9;
  83. }
  84. .db_header_title > div:after {
  85. content: "";
  86. position: absolute;
  87. width: 250px;
  88. height: 10px;
  89. bottom: -30px;
  90. left: -85px;
  91. border-top: 20px solid #fff;
  92. border-left: 20px solid transparent;
  93. border-right: 20px solid transparent;
  94. -webkit-transform: skew(20deg);
  95. transform: skew(359deg);
  96. z-index: 1;
  97. }
  98. .db_check {
  99. display: flex;
  100. align-items: center;
  101. position: absolute;
  102. right: 30px;
  103. height: 100%;
  104. }
  105. .db_check > div {
  106. padding: 14px 20px;
  107. cursor: pointer;
  108. }
  109. .db_check > div:hover {
  110. background: #edf4ff;
  111. }
  112. .db_check > div.active {
  113. font-weight: 700;
  114. color: #297bff;
  115. background: #edf4ff;
  116. border-top: 2px solid #297bff;
  117. box-sizing: border-box;
  118. }
  119. /* .db_check > div + div {
  120. margin-left: 30px;
  121. } */
  122. .db_body {
  123. height: calc(100% - 50px);
  124. width: 100%;
  125. overflow: auto;
  126. background: rgb(231, 242, 252);
  127. }
  128. </style>