workList.vue 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <template>
  2. <div id="leaveList">
  3. <el-row>
  4. <el-col :span="24" class="list" v-for="(item, index) in workLists" :key="index">
  5. <el-col :span="14" class="time">
  6. <el-col>科目:{{ item.name }}</el-col>
  7. <el-col>标题{{ item.title }}</el-col>
  8. <el-col :span="24" class="anniu">
  9. <el-button type="primary" size="small" @click="clickBtn(item.id)">在线作答</el-button>
  10. <el-button type="primary" size="small" @click="clickzy(item.id)">上传作业</el-button>
  11. </el-col>
  12. </el-col>
  13. </el-col>
  14. </el-row>
  15. </div>
  16. </template>
  17. <script>
  18. export default {
  19. name: 'leaveList',
  20. props: {
  21. workLists: null,
  22. },
  23. components: {},
  24. data: () => ({}),
  25. created() {},
  26. computed: {},
  27. methods: {
  28. clickBtn(id) {
  29. console.log(id);
  30. this.$router.push({ path: '/user/dati', query: { id: id } });
  31. },
  32. clickzy(id) {
  33. console.log(id);
  34. this.$router.push({ path: '/user/chuanzuoye', query: { id: id } });
  35. },
  36. },
  37. };
  38. </script>
  39. <style lang="less" scoped>
  40. p {
  41. padding: 0;
  42. margin: 0;
  43. }
  44. .list {
  45. width: 97%;
  46. padding: 15px;
  47. background-color: #fff;
  48. border-radius: 15px;
  49. margin: 0 5px 5px 5px;
  50. }
  51. .list .time p {
  52. padding: 5px 0;
  53. }
  54. .list .ispass {
  55. padding: 20px 0;
  56. }
  57. .anniu {
  58. padding: 20px 0 0 0;
  59. }
  60. </style>