index.vue 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  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 style="display: flex;">
  31. <!-- <div class="backClassCss" @click="saveScore" v-if="type == 2">保存评分</div> -->
  32. <div class="backClassCss" @click="backClaBtn">返回</div>
  33. </div>
  34. </div>
  35. <div class="i_body_contant">
  36. <Diary
  37. v-if="type == 1"
  38. :oid="oid"
  39. :userid="userid"
  40. :org="org"
  41. :cid="cid"
  42. @updatePanelA="updatePanelA"
  43. ></Diary>
  44. <Score
  45. ref="score"
  46. v-if="type == 2"
  47. :oid="oid"
  48. :userid="userid"
  49. :org="org"
  50. :cid="cid"
  51. ></Score>
  52. <Report v-if="type == 3" :oid="oid" :userid="userid" :org="org" :cid="cid"></Report>
  53. </div>
  54. </div>
  55. </template>
  56. <script>
  57. import Diary from "./diary.vue";
  58. import Score from "./score.vue";
  59. import Report from "./report.vue";
  60. export default {
  61. props: {
  62. userid: {
  63. type: String
  64. },
  65. oid: {
  66. type: String
  67. },
  68. org: {
  69. type: String
  70. },
  71. cid: {
  72. type: String
  73. }
  74. },
  75. components: {
  76. Diary,
  77. Score,
  78. Report
  79. },
  80. data() {
  81. return {
  82. type: 1,
  83. role: ""
  84. };
  85. },
  86. methods: {
  87. // saveScore(){
  88. // this.$refs.score.saveSRJson();
  89. // },
  90. checkType(type) {
  91. this.type = type;
  92. },
  93. updatePanelA(e){
  94. this.$emit("updatePanelA",e);
  95. },
  96. backClaBtn() {
  97. this.$router.push(
  98. `/studentEva?userid=${this.userid}&oid=${this.oid}&org=${this.org}&cid=${this.cid}&role=${this.role}`
  99. );
  100. }
  101. },
  102. mounted() {
  103. this.role = this.$route.query.role;
  104. // console.log('this.$route.query',this.$route.query);
  105. }
  106. };
  107. </script>
  108. <style scoped>
  109. .i_body {
  110. width: calc(100% - 20px);
  111. height: calc(100% - 20px);
  112. background: #fff;
  113. border-radius: 10px;
  114. margin-bottom: 10px;
  115. overflow: hidden;
  116. display: flex;
  117. flex-direction: column;
  118. flex-wrap: nowrap;
  119. align-items: flex-start;
  120. padding: 20px 10px 0 10px;
  121. }
  122. .i_body_title {
  123. font-size: 20px;
  124. display: flex;
  125. align-items: center;
  126. justify-content: space-between;
  127. margin-left: 20px;
  128. box-sizing: border-box;
  129. width: calc(100% - 25px);
  130. padding-right: 45px;
  131. }
  132. .i_body_title > .title_box {
  133. display: flex;
  134. flex-direction: row;
  135. flex-wrap: nowrap;
  136. align-items: center;
  137. }
  138. .i_body_title > div > .backClassCss {
  139. background-color: #3681fc;
  140. font-size: 16px;
  141. color: #fff;
  142. padding: 5px 20px;
  143. display: flex;
  144. justify-content: center;
  145. align-items: center;
  146. border-radius: 3px;
  147. cursor: pointer;
  148. margin-left: 20px;
  149. }
  150. .i_body_title > .title_box > .title_item {
  151. cursor: pointer;
  152. color: #666666;
  153. background: #fff;
  154. display: flex;
  155. flex-direction: row;
  156. flex-wrap: nowrap;
  157. justify-content: center;
  158. align-items: center;
  159. width: 150px;
  160. height: 70px;
  161. border-radius: 10px;
  162. }
  163. .i_body_title > .title_box > .title_item > div:last-child {
  164. margin-left: 10px;
  165. }
  166. .i_body_title > .title_box > .title_item:nth-child(1) div:first-child,
  167. .i_body_title > .title_box > .active:nth-child(1) div:first-child {
  168. width: 20px;
  169. height: 20px;
  170. background-size: 100% 100%;
  171. background-image: url("../../../../assets/icon/studentEva/diary.png");
  172. }
  173. .i_body_title > .title_box > .title_item:nth-child(2) div:first-child,
  174. .i_body_title > .title_box > .active:nth-child(2) div:first-child {
  175. width: 20px;
  176. height: 20px;
  177. background-size: 100% 100%;
  178. background-image: url("../../../../assets/icon/studentEva/score.png");
  179. }
  180. .i_body_title > .title_box > .title_item:nth-child(3) div:first-child,
  181. .i_body_title > .title_box > .active:nth-child(3) div:first-child {
  182. width: 20px;
  183. height: 20px;
  184. background-size: 100% 100%;
  185. background-image: url("../../../../assets/icon/studentEva/report.png");
  186. }
  187. .i_body_title > .title_box > .active {
  188. background: #f8fafe;
  189. border-radius: 10px 10px 0 0;
  190. }
  191. .i_body_title > .title_box > .active:nth-child(1) div:first-child {
  192. background-image: url("../../../../assets/icon/studentEva/isDiary.png") !important;
  193. }
  194. .i_body_title > .title_box > .active:nth-child(2) div:first-child {
  195. background-image: url("../../../../assets/icon/studentEva/isScore.png") !important;
  196. }
  197. .i_body_title > .title_box > .active:nth-child(3) div:first-child {
  198. background-image: url("../../../../assets/icon/studentEva/isReport.png") !important;
  199. }
  200. .i_body_title > .title_box > .active > div:last-child {
  201. color: #4288fc;
  202. }
  203. .i_body_contant {
  204. margin: 0 auto;
  205. width: calc(100% - 40px);
  206. height: calc(100% - 90px);
  207. background: #f8fafe;
  208. border-radius: 0 10px 10px 10px;
  209. overflow: hidden;
  210. }
  211. </style>