index.vue 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. <template>
  2. <div class="i_body">
  3. <div class="i_body_title">
  4. <div class="title_box">
  5. <div
  6. @click="checkType(1)"
  7. :class="{ active: type == 1 }"
  8. class="title_item"
  9. >
  10. <div></div>
  11. <div>观察日记</div>
  12. </div>
  13. <div
  14. @click="checkType(2)"
  15. :class="{ active: type == 2 }"
  16. class="title_item"
  17. >
  18. <div></div>
  19. <div>期末打分</div>
  20. </div>
  21. <div
  22. @click="checkType(3)"
  23. :class="{ active: type == 3 }"
  24. class="title_item"
  25. >
  26. <div></div>
  27. <div>期末打分</div>
  28. </div>
  29. </div>
  30. </div>
  31. <div class="i_body_contant">
  32. <Diary v-if="type == 1" :oid="oid" :userid="userid"></Diary>
  33. <Score v-if="type == 2" :oid="oid" :userid="userid"></Score>
  34. <Report v-if="type == 3" :oid="oid" :userid="userid"></Report>
  35. </div>
  36. </div>
  37. </template>
  38. <script>
  39. import Diary from "./diary.vue";
  40. import Score from "./score.vue";
  41. import Report from "./report.vue";
  42. export default {
  43. props: {
  44. userid: {
  45. type: String,
  46. },
  47. oid: {
  48. type: String,
  49. },
  50. },
  51. components: {
  52. Diary,
  53. Score,
  54. Report,
  55. },
  56. data() {
  57. return {
  58. type: 1,
  59. };
  60. },
  61. methods: {
  62. checkType(type) {
  63. this.type = type;
  64. },
  65. },
  66. mounted() {},
  67. };
  68. </script>
  69. <style scoped>
  70. .i_body {
  71. width: calc(100% - 20px);
  72. height: calc(100% - 20px);
  73. background: #fff;
  74. border-radius: 10px;
  75. margin-bottom: 10px;
  76. overflow: hidden;
  77. display: flex;
  78. flex-direction: column;
  79. flex-wrap: nowrap;
  80. align-items: flex-start;
  81. padding: 20px 10px 0 10px;
  82. }
  83. .i_body_title {
  84. font-size: 20px;
  85. display: flex;
  86. align-items: center;
  87. justify-content: space-between;
  88. margin-left: 20px;
  89. }
  90. .i_body_title > .title_box {
  91. display: flex;
  92. flex-direction: row;
  93. flex-wrap: nowrap;
  94. align-items: center;
  95. }
  96. .i_body_title > .title_box > .title_item {
  97. cursor: pointer;
  98. color: #666666;
  99. background: #fff;
  100. display: flex;
  101. flex-direction: row;
  102. flex-wrap: nowrap;
  103. justify-content: center;
  104. align-items: center;
  105. width: 150px;
  106. height: 70px;
  107. border-radius: 10px;
  108. }
  109. .i_body_title > .title_box > .title_item > div:last-child {
  110. margin-left: 10px;
  111. }
  112. .i_body_title > .title_box > .title_item:nth-child(1) div:first-child,
  113. .i_body_title > .title_box > .active:nth-child(1) div:first-child {
  114. width: 20px;
  115. height: 20px;
  116. background-size: 100% 100%;
  117. background-image: url("../../../../assets/icon/studentEva/diary.png");
  118. }
  119. .i_body_title > .title_box > .title_item:nth-child(2) div:first-child,
  120. .i_body_title > .title_box > .active:nth-child(2) div:first-child {
  121. width: 20px;
  122. height: 20px;
  123. background-size: 100% 100%;
  124. background-image: url("../../../../assets/icon/studentEva/score.png");
  125. }
  126. .i_body_title > .title_box > .title_item:nth-child(3) div:first-child,
  127. .i_body_title > .title_box > .active:nth-child(3) div:first-child {
  128. width: 20px;
  129. height: 20px;
  130. background-size: 100% 100%;
  131. background-image: url("../../../../assets/icon/studentEva/report.png");
  132. }
  133. .i_body_title > .title_box > .active {
  134. background: #f8fafe;
  135. }
  136. .i_body_title > .title_box > .active:nth-child(1) div:first-child {
  137. background-image: url("../../../../assets/icon/studentEva/isDiary.png") !important;
  138. }
  139. .i_body_title > .title_box > .active:nth-child(2) div:first-child {
  140. background-image: url("../../../../assets/icon/studentEva/isScore.png") !important;
  141. }
  142. .i_body_title > .title_box > .active:nth-child(3) div:first-child {
  143. background-image: url("../../../../assets/icon/studentEva/isReport.png") !important;
  144. }
  145. .i_body_title > .title_box > .active > div:last-child {
  146. color: #4288fc;
  147. }
  148. .i_body_contant {
  149. margin: 0 auto;
  150. width: calc(100% - 40px);
  151. height: calc(100% - 90px);
  152. background: #f8fafe;
  153. border-radius: 10px;
  154. }
  155. </style>