Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 
 
 
 

180 linhas
4.0 KiB

  1. <template>
  2. <view class="page">
  3. <view class="mainpage" :class="sideOpen ? 'show' : ''" style="padding-top: 40px;">
  4. <!-- <l-customlist-banner></l-customlist-banner> -->
  5. <view class="records">共 {{ records }} 条数据</view>
  6. <l-scroll-list v-if="ready" @pullDown="pullDown" @toBottom="fetchList()" ref="data">
  7. <l-customlist :tips="loadState" showTips>
  8. <view></view>
  9. <view class="pageBox customlist-item" showDelete="true" v-for="(item, ind) in data" :key="item.MakeDate" @click="tapClick(item)">
  10. <view class="">
  11. <text>问卷编号:</text>
  12. {{ item.VSerial }}
  13. </view>
  14. <view class="">
  15. <text>标题:</text>
  16. {{ item.VTitle }}
  17. </view>
  18. <view class="">
  19. <text>开始时间:</text>
  20. {{ item.VStartTime }}
  21. </view>
  22. <view class="">
  23. <text>结束时间:</text>
  24. {{ item.VStopTime }}
  25. </view>
  26. <view class="">
  27. <text>考核学年:</text>
  28. {{ item.AcademicYearNo }}
  29. </view>
  30. <view class="">
  31. <text>考核学期:</text>
  32. {{ item.Semester }}
  33. </view>
  34. <view class="">
  35. <text>考核评分:</text>
  36. {{ item.TotalScore }}
  37. </view>
  38. <view class="">
  39. <text>提交时间:</text>
  40. {{ item.CreateDate }}
  41. </view>
  42. <view class="">
  43. <text>是否交卷:</text>
  44. {{ item.IsAnswer != undefined && item.IsAnswer === true ? "已交" : "未交" }}
  45. </view>
  46. </view>
  47. </l-customlist>
  48. </l-scroll-list>
  49. </view>
  50. </view>
  51. </template>
  52. <script>
  53. export default {
  54. data() {
  55. return {
  56. weekChina: ['一', '二', '三', '四', '五', '六', '日'],
  57. user: null,
  58. data: [],
  59. total: 1,
  60. records: 0,
  61. ready: false,
  62. page: 1,
  63. rows: 10,
  64. multipleData: {},
  65. sideOpen: false,
  66. loadState: '向下翻以加载更多'
  67. };
  68. },
  69. onUnload() {
  70. this.OFF('askList');
  71. },
  72. methods: {
  73. init() {
  74. this.ON('askList', this.refreshList);
  75. // 拉取加载列表和数据源
  76. Promise.all([() => {}]);
  77. var _this = this;
  78. this.user = this.GET_GLOBAL('loginUser');
  79. this.fetchList();
  80. this.ready = true;
  81. },
  82. // 拉取列表
  83. async fetchList() {
  84. if (this.page > this.total) {
  85. return;
  86. }
  87. let _this = this;
  88. let _postParam = {
  89. pagination: {
  90. rows: _this.rows,
  91. page: _this.page
  92. },
  93. queryJson: JSON.stringify(_this.multipleData)
  94. };
  95. _this.LOADING('加载数据中…')
  96. _this.HTTP_GET('/learun/ask/studentlist', _postParam, '加载数据时出错').then(res => {
  97. _this.HIDE_LOADING();
  98. console.log(res);
  99. this.data = this.data.concat(res.rows);
  100. _this.total = res.total;
  101. _this.records = res.records;
  102. this.page = res.page + 1;
  103. this.loadState = res.page >= res.total ? '已加载所有项目' : '向下翻以加载更多';
  104. // console.log(_this.data);
  105. });
  106. },
  107. // 列表下拉
  108. pullDown() {
  109. this.refreshList().then(() => {
  110. this.$refs.data.stopPullDown();
  111. });
  112. },
  113. async refreshList() {
  114. this.page = 1;
  115. this.total = 1;
  116. this.data = [];
  117. this.fetchList();
  118. },
  119. tapClick(item) {
  120. if (item.IsAnswer === true || item.IsAnswer === 'true') {
  121. this.TOAST('当前项目已交卷!', 'success');
  122. return;
  123. }
  124. this.NAV_TO('./from', { VID: item.VID }, true);
  125. }
  126. },
  127. computed:{
  128. },
  129. created() {
  130. this.init();
  131. }
  132. };
  133. </script>
  134. <style lang="less" scoped>
  135. @import '~@/common/css/sidepage.less';
  136. @import '~@/common/css/customlist.less';
  137. .page {
  138. background-color: #fff;
  139. }
  140. .page-content {
  141. margin-top: 39px;
  142. }
  143. .records {
  144. color: #8f8f94;
  145. background: #ffffff;
  146. padding: 10px 12px;
  147. width: 100%;
  148. vertical-align: middle;
  149. border-bottom: 0.5px solid #ddd;
  150. position: fixed;
  151. top: var(--window-top);
  152. z-index: 1024;
  153. border-bottom: 0.5px solid #ddd;
  154. height: 40px;
  155. width: 100%;
  156. box-shadow: 0 0.5px 3px rgba(0, 0, 0, 0.1);
  157. // background: #f1f1f1;
  158. }
  159. .pageBox {
  160. // margin-top: 34px;
  161. padding: 5px 15px;
  162. line-height: 24px;
  163. border-bottom: 5px solid #f5f5f5;
  164. }
  165. .delbtn {
  166. position: absolute;
  167. right: 15px;
  168. bottom: 7px;
  169. padding: 3px 10px;
  170. background: #dd524d;
  171. color: #fff;
  172. border-radius: 3px;
  173. }
  174. </style>