my-correction.vue 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256
  1. <template>
  2. <view>
  3. <view class="list-contains">
  4. <!-- 列表 -->
  5. <view class="">
  6. <block v-for="(item, index) in list" :key="index">
  7. <view class="article-shadow tn-margin">
  8. <view class="tn-flex">
  9. <view class="tn-margin-sm tn-padding-top-xs" style="width: 100%;">
  10. <view class="tn-flex">
  11. <view class="tn-text-lg tn-text-bold clamp-text-1 tn-text-justify tn-flex-basic-lg">
  12. <text class="">{{ item.createtime_text }}</text>
  13. </view>
  14. <view class="tn-flex-basic-sm text-right">
  15. <view
  16. style="transform: translate(0rpx,6rpx);"
  17. class="justify-content-item tn-tag-content__item tn-margin-right-xs tn-round tn-text-sm tn-text-bold tn-bg-blue--light tn-color-blue"
  18. >
  19. <text class="tn-tag-content__item--prefix">#</text>
  20. {{ item.type_names }}
  21. </view>
  22. </view>
  23. </view>
  24. <view class="tn-padding-top-xs" style="min-height: 90rpx; line-height: 50rpx;">
  25. <view class="text-content tn-color-gray clamp-text-2 tn-text-justify">试题ID:{{ item.question_id }}</view>
  26. <view class="text-content tn-color-gray clamp-text-2 tn-text-justify">试题题目:{{ item.question ? item.question.title : '试题可能被删除了' }}</view>
  27. <view class="text-content tn-color-gray clamp-text-2 tn-text-justify">所属题库:{{ item.question && item.question.cates ? item.question.cates.name : '题库可能被删除了' }}</view>
  28. <view class="text-content tn-color-gray clamp-text-2 tn-text-justify">反馈内容:{{ item.remark }}</view>
  29. <view class="text-content text-red" v-if="item.message">处理说明:{{ item.message }}</view>
  30. </view>
  31. <view class="tn-flex tn-flex-row-between tn-flex-col-between margin-top">
  32. <view v-if="item.status == 0"
  33. style="transform: translate(0rpx,6rpx);"
  34. class="justify-content-item tn-tag-content__item tn-margin-right-xs tn-round tn-text-sm tn-text-bold tn-bg-orange--light tn-color-orange"
  35. >未处理</view>
  36. <view v-if="item.status == 1"
  37. style="transform: translate(0rpx,6rpx);"
  38. class="justify-content-item tn-tag-content__item tn-margin-right-xs tn-round tn-text-sm tn-text-bold tn-bg-cyan--light tn-color-cyan"
  39. >已处理</view>
  40. <view v-if="item.status == 2"
  41. style="transform: translate(0rpx,6rpx);"
  42. class="justify-content-item tn-tag-content__item tn-margin-right-xs tn-round tn-text-sm tn-text-bold tn-bg-red--light tn-color-red"
  43. >忽略</view>
  44. <view class="justify-content-item tn-color-gray tn-text-center" style="padding-top: 15rpx;">
  45. <block>
  46. <view v-if="item.message">处理时间:{{ item.updatetime | format_date }}</view>
  47. </block>
  48. </view>
  49. </view>
  50. </view>
  51. </view>
  52. </view>
  53. </block>
  54. </view>
  55. <!-- 加载状态条 -->
  56. <view class="cu-load bg-grey" :class="loadFlag" v-show="!has_more"></view>
  57. </view>
  58. <tabbar></tabbar>
  59. </view>
  60. </template>
  61. <script>
  62. import TuiCard from '@/components/tui-card/tui-card.vue';
  63. import correctionApi from "@/common/api/correction.js"
  64. export default {
  65. components: {
  66. 'tui-card': TuiCard
  67. },
  68. data() {
  69. return {
  70. list: [],
  71. has_more: false,
  72. current_page: 1,
  73. loadFlag: 'loading',
  74. };
  75. },
  76. onLoad(e) {
  77. this.ajax();
  78. },
  79. onReachBottom() {
  80. console.log('onReachBottom');
  81. if (this.has_more) {
  82. this.current_page++;
  83. this.getData();
  84. }
  85. },
  86. methods: {
  87. ajax() {
  88. this.getData();
  89. },
  90. // 获取试卷
  91. getData() {
  92. this.loadFlag = 'loading';
  93. let params = {
  94. page: this.current_page
  95. };
  96. correctionApi.getCorrectionList(this, {}).then(res => {
  97. if (res && res.code == 1) {
  98. this.list = this.list.concat(res.data.data);
  99. console.log('list', this.list);
  100. this.has_more = res.data.has_more;
  101. this.current_page = res.data.current_page;
  102. this.loadFlag = 'over';
  103. } else {
  104. this.uitls.toast('获取数据失败')
  105. }
  106. })
  107. },
  108. }
  109. };
  110. </script>
  111. <style lang="scss">
  112. page {
  113. background-color: #fff;
  114. }
  115. .list-contains {
  116. margin-top: 20px;
  117. padding-bottom: 100px;
  118. }
  119. .list-card {
  120. margin: 20rpx 0;
  121. }
  122. .tui-title {
  123. width: 100%;
  124. padding: 70rpx 30rpx 30rpx 30rpx;
  125. box-sizing: border-box;
  126. font-size: 30rpx;
  127. line-height: 30rpx;
  128. color: #666;
  129. }
  130. .tui-default {
  131. padding: 20rpx 30rpx;
  132. }
  133. .tui-article {
  134. position: relative;
  135. }
  136. .tui-article-img {
  137. width: 100%;
  138. height: 300rpx;
  139. display: block;
  140. }
  141. .tui-article-title {
  142. position: absolute;
  143. left: 0;
  144. bottom: 0;
  145. color: #fff;
  146. font-size: 32rpx;
  147. font-weight: 500;
  148. box-sizing: border-box;
  149. padding: 20rpx 30rpx;
  150. background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.6));
  151. }
  152. .tui-cell-title {
  153. font-size: 32rpx;
  154. font-weight: 500;
  155. padding: 0 10rpx;
  156. word-break: break-all;
  157. word-wrap: break-word;
  158. }
  159. .tui-cell-img {
  160. height: 160rpx;
  161. width: 160rpx;
  162. }
  163. .tui-flex {
  164. display: flex;
  165. align-items: center;
  166. justify-content: space-between;
  167. }
  168. .tui-mr {
  169. margin-right: 20rpx;
  170. }
  171. .tui-flex-pic {
  172. display: flex;
  173. display: -webkit-flex;
  174. justify-content: space-between;
  175. flex-direction: row;
  176. flex-wrap: wrap;
  177. box-sizing: border-box;
  178. background: #fff;
  179. padding: 0 120rpx;
  180. }
  181. .tui-flex-pic image {
  182. width: 32%;
  183. margin-bottom: 2%;
  184. }
  185. .tui-content {
  186. padding: 0rpx 30rpx 20rpx 120rpx;
  187. box-sizing: border-box;
  188. font-size: 34rpx;
  189. font-weight: 400;
  190. color: #333;
  191. }
  192. .tui-color-gray {
  193. color: #ccc;
  194. }
  195. .tui-pleft {
  196. padding-left: 120rpx;
  197. }
  198. .article-shadow {
  199. border-radius: 15rpx;
  200. box-shadow: 0rpx 0rpx 50rpx 0rpx rgba(0, 0, 0, 0.07);
  201. }
  202. /* 标签内容 start*/
  203. .tn-tag-content {
  204. &__item {
  205. display: inline-block;
  206. line-height: 35rpx;
  207. padding: 7rpx 25rpx 5rpx 25rpx;
  208. &--prefix {
  209. padding-right: 10rpx;
  210. }
  211. }
  212. }
  213. /* 标签内容 end*/
  214. .text-del-line {
  215. text-decoration: line-through;
  216. }
  217. .text-content {
  218. word-break: break-all;
  219. word-wrap: break-word;
  220. white-space: pre-wrap;
  221. }
  222. </style>