tobeReport.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. <template>
  2. <div class="m-container">
  3. <div class="cellWrap">
  4. <div class="mcell" v-for="(item, index) in reportList" :key="index">
  5. <div class="left">
  6. <img :src="item.studentAvatar?item.studentAvatar:nomorlIcon" class="titleIcon" alt="" />
  7. <div class="textWrap">
  8. <span class="title">{{ item.groupName?item.groupName:'暂无课程名' }}</span>
  9. <span class="timer">{{ item.month }}</span>
  10. </div>
  11. </div>
  12. <div class="cellBtn" @click="submitReport(item)">提交报告</div>
  13. </div>
  14. <!-- 空 -->
  15. <MEmpty v-if="!reportList.length" msg='暂无待评价月报' :full='true'/>
  16. </div>
  17. </div>
  18. </template>
  19. <script>
  20. import { getNeedPost } from "@/api/teacher";
  21. import MEmpty from "@/components/MEmpty";
  22. export default {
  23. components:{
  24. MEmpty
  25. },
  26. data() {
  27. return {
  28. reportList: [],
  29. nomorlIcon:require("@/assets/images/icon_student.png")
  30. };
  31. },
  32. created() {
  33. let params = this.$route.query;
  34. if (params.Authorization) {
  35. localStorage.setItem("Authorization", decodeURI(params.Authorization));
  36. localStorage.setItem("userInfo", decodeURI(params.Authorization));
  37. }
  38. },
  39. mounted() {
  40. document.title = "待评价月报";
  41. getNeedPost().then((res) => {
  42. if (res.data.code == 200) {
  43. if (res.data.data.length > 0) {
  44. this.reportList = res.data.data;
  45. } else {
  46. this.$toast("当前没有待填写报告");
  47. }
  48. }
  49. });
  50. },
  51. methods: {
  52. submitReport(item) {
  53. this.$router.push({
  54. path: "/studyReportNew",
  55. query: { id: item.id, classGroupId: item.classGroupId },
  56. });
  57. },
  58. },
  59. };
  60. </script>
  61. <style lang="less" scoped>
  62. @import url("../../assets/commonLess/variable.less");
  63. .m-container {
  64. min-height: 100vh;
  65. background-color: #f3f4f8;
  66. .titleIcon {
  67. width: .42rem;
  68. height: .42rem;
  69. border-radius: 50%;
  70. margin-right: .09rem;
  71. }
  72. .cellWrap {
  73. background-color: #fff;
  74. .mcell {
  75. display: flex;
  76. flex-direction: row;
  77. justify-content: space-between;
  78. background-color: #fff;
  79. margin-left: 0.16rem;
  80. height: 0.82rem;
  81. border-bottom: 1px solid #f0f0f0;
  82. align-items: center;
  83. .left {
  84. display: flex;
  85. flex-direction: row;
  86. justify-content: flex-start;
  87. .timer {
  88. font-size: 0.14rem;
  89. color: #666666;
  90. margin-right: 0.3rem;
  91. }
  92. .title {
  93. font-size: 0.16rem;
  94. color: #1a1a1a;
  95. display: block;
  96. width: 1.45rem;
  97. white-space: nowrap;
  98. overflow: hidden;
  99. text-overflow: ellipsis;
  100. }
  101. }
  102. .cellBtn {
  103. text-align: center;
  104. width: 0.8rem;
  105. height: 0.28rem;
  106. line-height: 0.28rem;
  107. color: #fff;
  108. background-color: @mColor;
  109. border-radius: 0.22rem;
  110. font-size: 0.14rem;
  111. margin-right: 0.12rem;
  112. }
  113. }
  114. }
  115. }
  116. </style>