works.vue 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230
  1. <template>
  2. <div class="pb_content">
  3. <div class="pb_content_body">
  4. <div class="body_student">
  5. <div class="student_head">
  6. <div class="box_course">
  7. <div class="wheel">
  8. <img
  9. :src="
  10. studentMessage.headportrait != null
  11. ? studentMessage.headportrait
  12. : tx
  13. "
  14. alt=""
  15. />
  16. </div>
  17. <div class="right_box">
  18. <div class="right_box_title">{{ studentMessage.name }}</div>
  19. <div class="people">
  20. <div>
  21. <span>班级:</span><span>{{ studentMessage.cname }}</span>
  22. </div>
  23. <div style="margin-left: 50px">
  24. <span>所属学校:</span><span>{{ studentMessage.sname }}</span>
  25. </div>
  26. </div>
  27. <div>
  28. <span>手机号码:</span
  29. ><span>{{ studentMessage.phonenumber }}</span>
  30. </div>
  31. </div>
  32. </div>
  33. </div>
  34. <div class="student_body">
  35. <div class="project_box">
  36. <div
  37. class="three_box_inthis"
  38. v-for="(item, index) in myCourse"
  39. :key="index"
  40. >
  41. <div class="project">
  42. <!-- <img
  43. :src="
  44. item.cover != null && item.cover != ''
  45. ? JSON.parse(item.cover)[0].url
  46. : mpj
  47. "
  48. alt=""
  49. /> -->
  50. <img
  51. :src="
  52. mpj
  53. "
  54. alt=""
  55. />
  56. </div>
  57. <div class="projct_nav">
  58. <div style="font-size: 18px">
  59. {{ item.title }} -
  60. {{ JSON.parse(item.chapters)[item.stage].dyName }}
  61. </div>
  62. <div>
  63. <span style="color: #999">{{ item.createTime }}</span>
  64. </div>
  65. <div style="color: #999">
  66. <span>提交人:</span><span>{{ studentMessage.name }}</span>
  67. </div>
  68. </div>
  69. <div
  70. class="look_score"
  71. @click="
  72. goTo(
  73. '/score?courseId=' +
  74. item.courseId +
  75. '&userid=' +
  76. userid +
  77. '&stage=' +
  78. item.stage
  79. )
  80. "
  81. >
  82. 查看评分
  83. </div>
  84. </div>
  85. </div>
  86. </div>
  87. </div>
  88. </div>
  89. </div>
  90. </template>
  91. <script>
  92. export default {
  93. data() {
  94. return {
  95. myCourse: [],
  96. studentMessage: [],
  97. tx: require("../assets/tx.png"),
  98. mpj: require("../assets/project.png"),
  99. userid: this.$route.query.userid,
  100. };
  101. },
  102. methods: {
  103. goTo(path) {
  104. this.$router.push(path);
  105. },
  106. selectSDetail() {
  107. let params = {
  108. uid: this.userid,
  109. };
  110. this.ajax
  111. .get(this.$store.state.api + "selectSDetail", params)
  112. .then((res) => {
  113. this.studentMessage = res.data[0][0];
  114. })
  115. .catch((err) => {
  116. this.isLoading = false;
  117. console.error(err);
  118. });
  119. },
  120. selectMyCourse() {
  121. let params = {
  122. uid: this.userid,
  123. };
  124. this.ajax
  125. .get(this.$store.state.api + "selectMyCourse", params)
  126. .then((res) => {
  127. this.myCourse = res.data[0];
  128. })
  129. .catch((err) => {
  130. console.error(err);
  131. });
  132. },
  133. },
  134. created() {
  135. this.selectSDetail();
  136. this.selectMyCourse();
  137. document.scrollingElement.scrollTop = 0;
  138. },
  139. };
  140. </script>
  141. <style scoped>
  142. .body_student {
  143. margin: 0px auto;
  144. width: 98%;
  145. height: 100%;
  146. }
  147. .student_head {
  148. width: 100%;
  149. margin: 0 auto;
  150. height: 30%;
  151. background-image: linear-gradient(90deg, #30c499, #75ceba);
  152. color: #fff;
  153. }
  154. .wheel > img,
  155. .project > img {
  156. width: 100%;
  157. height: 100%;
  158. }
  159. .box_course {
  160. display: flex;
  161. padding: 35px 0 25px 60px;
  162. align-items: center;
  163. }
  164. .wheel {
  165. width: 210px;
  166. }
  167. .right_box {
  168. display: flex;
  169. flex-direction: column;
  170. margin-left: 30px;
  171. /* justify-content: space-around; */
  172. }
  173. .right_box_title {
  174. font-size: 23px;
  175. }
  176. .people {
  177. display: flex;
  178. margin: 30px 0 20px 0px;
  179. }
  180. .student_body {
  181. width: 100%;
  182. margin: 0 auto;
  183. background: #fff;
  184. margin-top: 20px;
  185. padding: 0 0 20px;
  186. min-height: 1000px;
  187. }
  188. .project {
  189. width: 100%;
  190. }
  191. .project_box {
  192. display: flex;
  193. width: 100%;
  194. flex-direction: row;
  195. flex-wrap: wrap;
  196. }
  197. .three_box_inthis {
  198. display: flex;
  199. width: 21%;
  200. flex-direction: column;
  201. height: 360px;
  202. align-items: flex-start;
  203. border: 1px solid #ccc;
  204. margin: 15px;
  205. }
  206. .projct_nav {
  207. margin-left: 5px;
  208. display: flex;
  209. flex-direction: column;
  210. flex-wrap: nowrap;
  211. justify-content: space-around;
  212. }
  213. .projct_nav>div{
  214. margin-bottom: 5px;
  215. }
  216. .look_score {
  217. border-radius: 0px 0px 5px 5px;
  218. text-align: center;
  219. background: #41CDA6;
  220. width: 100%;
  221. height: 35px;
  222. font-size: 14px;
  223. color: #fff;
  224. line-height: 35px;
  225. cursor: pointer;
  226. margin-top: 10px;
  227. }
  228. </style>