CurriculaManager.vue 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  1. <template>
  2. <div>
  3. <div class="curricula-manager-header">
  4. <el-button>搜索</el-button>
  5. </div>
  6. <div class="curricula-manager-body">
  7. <el-button
  8. v-for="item in completion"
  9. :key="item.status"
  10. class="bgcolor"
  11. @click="taskstatus(item.status)"
  12. >{{ item.val }}</el-button
  13. >
  14. </div>
  15. <div class="sort">
  16. <span>排序:</span>
  17. <div class="sort-body" v-for="item in time" :key="item.id">
  18. {{ item.createTime }}
  19. {{ item.editTime }}
  20. {{ item.onclassTime }}
  21. <i class="el-icon-sort"></i>
  22. </div>
  23. </div>
  24. <div class="curricula-manager-body_">
  25. <el-button class="bgcolor">新建课程</el-button>
  26. </div>
  27. <div>
  28. <div v-for="(item, index) in obj" :key="index" class="circulation">
  29. <div class="curricula-manager-foot">
  30. <span>{{ item.subject }}</span>
  31. <span>{{ item.status }}</span>
  32. </div>
  33. <div class="_curricula-manager-foot">
  34. <span>{{ item.createTime }}</span>
  35. <span class="curricula-manager-foot_">{{ item.onclassTime }}</span>
  36. <span class="curricula-manager-foot_">授课教师:{{ item.teacher }}</span>
  37. </div>
  38. </div>
  39. </div>
  40. </div>
  41. </template>
  42. <script>
  43. export default {
  44. name: 'CurriculaManager',
  45. data() {
  46. return {
  47. time: [
  48. {
  49. id: '1',
  50. createTime: '创建时间',
  51. },
  52. {
  53. id: '2',
  54. editTime: '编辑时间',
  55. },
  56. {
  57. id: '3',
  58. onclassTime: '开课时间',
  59. },
  60. ],
  61. sort: [
  62. {
  63. sortType: 'createtime', // 数组对象中的哪一个属性进行排序
  64. order: false, //升序还是降序
  65. },
  66. {
  67. sortType: 'editTime',
  68. order: false,
  69. },
  70. {
  71. sortType: 'onclasstime',
  72. order: false,
  73. },
  74. ],
  75. completion: [
  76. {
  77. status: '1',
  78. val: '进行中',
  79. },
  80. {
  81. status: '2',
  82. val: '报名中',
  83. },
  84. {
  85. status: '3',
  86. val: '已结束',
  87. },
  88. ],
  89. obj: [
  90. {
  91. subject: '中文 轻松学中文初段 暑假 0813',
  92. createTime: '2021/3/28',
  93. onclassTime: '2021/4/25',
  94. teacher: '张一三',
  95. status: '1',
  96. },
  97. {
  98. subject: '中文 轻松学中文初段 暑假 0813',
  99. createTime: '2021/3/12',
  100. onclassTime: '2021/4/23',
  101. teacher: '张一三',
  102. status: '1',
  103. },
  104. {
  105. subject: '中文 轻松学中文初段 暑假 0813',
  106. createTime: '2021/3/22',
  107. onclassTime: '2021/4/17',
  108. teacher: '张一三',
  109. status: '2',
  110. },
  111. {
  112. subject: '中文 轻松学中文初段 暑假 0813',
  113. createTime: '2021/3/2',
  114. onclassTime: '2021/4/28',
  115. teacher: '张一三',
  116. status: '3',
  117. },
  118. {
  119. subject: '中文 轻松学中文初段 暑假 0813',
  120. createTime: '2021/3/6',
  121. onclassTime: '2021/4/1',
  122. teacher: '张一三',
  123. status: '2',
  124. },
  125. {
  126. subject: '中文 轻松学中文初段 暑假 0813',
  127. createTime: '2021/3/19',
  128. onclassTime: '2021/4/9',
  129. teacher: '张一三',
  130. status: '2',
  131. },
  132. {
  133. subject: '中文 轻松学中文初段 暑假 0813',
  134. createTime: '2021/3/16',
  135. onclassTime: '2021/4/25',
  136. teacher: '张一三',
  137. status: '3',
  138. },
  139. {
  140. subject: '中文 轻松学中文初段 暑假 0813',
  141. createTime: '2021/3/21',
  142. onclassTime: '2021/4/11',
  143. teacher: '张一三',
  144. status: '1',
  145. },
  146. ],
  147. };
  148. },
  149. methods: {
  150. taskstatus(status) {
  151. console.log(status);
  152. },
  153. },
  154. };
  155. </script>
  156. <style>
  157. .curricula-manager-header .el-button {
  158. width: 300px;
  159. margin-top: 50px;
  160. margin-left: 360px;
  161. }
  162. .curricula-manager-body .el-button {
  163. width: 120px;
  164. margin-top: 50px;
  165. margin-left: 330px;
  166. }
  167. .bgcolor {
  168. background-color: #c4c4c4;
  169. border: 1px solid #c4c4c4;
  170. border-radius: 0;
  171. color: #0c0c0c;
  172. margin-bottom: 20px;
  173. }
  174. .el-button + .el-button {
  175. margin-left: 0;
  176. }
  177. .sort {
  178. display: flex;
  179. margin-top: 30px;
  180. margin-bottom: -35px;
  181. }
  182. .sort-body {
  183. margin-left: 20px;
  184. }
  185. .curricula-manager-body_ {
  186. margin-top: 5px;
  187. margin-left: 930px;
  188. }
  189. .curricula-manager-foot {
  190. display: flex;
  191. justify-content: space-between;
  192. }
  193. ._curricula-manager-foot {
  194. padding: 20px 0 0 0;
  195. }
  196. .curricula-manager-foot_ {
  197. margin-left: 20px;
  198. }
  199. .circulation {
  200. margin: 0 0 20px 0;
  201. width: 1030px;
  202. height: 100px;
  203. background-color: #eee;
  204. padding: 20px 20px 0 20px;
  205. }
  206. </style>