leaveRecord.vue 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  1. <template>
  2. <view class="content">
  3. <!-- <view class="filter-box">
  4. <u-search placeholder="请输入关键字" v-model="filterText" @search="setFilterText" @custom="setFilterText"></u-search>
  5. </view> -->
  6. <template v-if="tableList.length">
  7. <scroll-view scroll-y class="scroll-box" :refresher-enabled="true" refresher-background="white">
  8. <u-card :show-head="false" :foot-border-top="false" margin="10px 15px" borderRadius="40" :foot-style="{padding: '0 10px 5px 0'}" v-for="(site, index2) in tableList"
  9. :key="index2" class="card-box">
  10. <view slot="body" class="card-content">
  11. <view class="student-info">
  12. <view style="width: 100%;margin-bottom: 5px;">
  13. <text class="info-name" style="margin-right: 10px;">{{site.studentName}}</text>
  14. <text class="info-name">{{site.className}}</text>
  15. </view>
  16. <view style="width: 100%;margin-bottom: 5px;">
  17. <text class="info-name" style="margin-right: 10px;">{{site.leaveReason}}</text>
  18. <text class="info-name">{{site.time}}</text>
  19. </view>
  20. <view class="info-phone" style="margin-bottom: 5px;">{{ site.type == 1 ? '事假' : '病假' }}</view>
  21. <view class="info-phone">{{ site.agreeType == 1 ? '同意' : '不同意' }}</view>
  22. </view>
  23. </view>
  24. </u-card>
  25. <u-divider v-if="item.isOver" bg-color="transparent" :style="{paddingTop : tabList[0].tableList.length == 0 ? '10px' : ''}">没有更多了</u-divider>
  26. </scroll-view>
  27. </template>
  28. <template v-else>
  29. <u-empty mode="data"></u-empty>
  30. </template>
  31. </u-popup>
  32. <u-top-tips ref="uTips"></u-top-tips>
  33. </view>
  34. </template>
  35. <script>
  36. import {
  37. mapGetters
  38. } from 'vuex'
  39. const NET = require('@/utils/request')
  40. const API = require('@/config/api')
  41. export default {
  42. computed: {
  43. ...mapGetters([
  44. 'customStyle',
  45. 'handleCustomStyle',
  46. ])
  47. },
  48. data() {
  49. return {
  50. customerId: '',
  51. tableList: [],
  52. }
  53. },
  54. onShow() {
  55. this.tabList = Object.assign([], this.$options.data().tabList)
  56. this.getTableList()
  57. },
  58. methods: {
  59. // 获取列表数据
  60. getTableList() {
  61. NET.request(API.stuLeaveLessonsList, {
  62. page: 1,
  63. size: 100,
  64. }, 'POST').then(res => {
  65. this.triggered = false
  66. this.tableList = res.data.row
  67. })
  68. },
  69. },
  70. }
  71. </script>
  72. <style>
  73. page {
  74. width: 100%;
  75. height: 100%;
  76. background-color: #f7f7f7;
  77. }
  78. </style>
  79. <style lang="scss" scoped>
  80. @import "@/static/css/themes.scss";
  81. .content {
  82. width: 100%;
  83. float: left;
  84. .filter-box {
  85. height: 48px;
  86. padding: 10px 15px;
  87. background-color: #FFFFFF;
  88. }
  89. .swiper-box {
  90. height: calc(100vh - 82px);
  91. .swiper-item {
  92. height: calc(100vh - 82px);
  93. .scroll-box {
  94. width: 100%;
  95. height: calc(100vh - 82px);
  96. .card-box {
  97. .card-content {
  98. display: flex;
  99. align-items: center;
  100. .student-info {
  101. flex: 1;
  102. .info-name {
  103. // width: 64px;
  104. // float: left;
  105. line-height: 28px;
  106. font-size: 14px;
  107. font-weight: bold;
  108. }
  109. .info-type {
  110. padding: 0 10px;
  111. margin-top: 3px;
  112. border-radius: 20px;
  113. float: left;
  114. line-height: 20px;
  115. font-size: 10px;
  116. color: #FFFFFF;
  117. background-color: #999999;
  118. }
  119. .info-type-active {
  120. background-color: $mainColor;
  121. }
  122. }
  123. }
  124. }
  125. }
  126. }
  127. }
  128. }
  129. .menber-box {
  130. width: 100%;
  131. // float: left;
  132. padding: 10px 15px;
  133. margin-bottom: 10px;
  134. .menber-col {
  135. width: 100%;
  136. padding: 15px;
  137. margin-bottom: 10px;
  138. display: inline-block;
  139. background-color: #FFFFFF;
  140. border-radius: 15px;
  141. box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.2);
  142. position: relative;
  143. overflow: hidden;
  144. box-sizing: border-box;
  145. .menber-label {
  146. width: 100%;
  147. margin-bottom: 5px;
  148. float: left;
  149. font-size: 14px;
  150. // line-height: 20px;
  151. }
  152. .menber-num {
  153. width: 100%;
  154. float: left;
  155. font-size: 26px;
  156. line-height: 28px;
  157. color: $mainColor;
  158. }
  159. .menber-icon {
  160. font-size: 100px;
  161. color: $mainColor;
  162. position: absolute;
  163. right: -5px;
  164. bottom: -30px;
  165. opacity: 0.5;
  166. }
  167. }
  168. }
  169. .common-title {
  170. width:100%;
  171. text-align: center;
  172. font-size: 20px;
  173. margin: 10px 0;
  174. }
  175. .fix-add-icon {
  176. position: fixed;
  177. bottom: 15px;
  178. right: 15px;
  179. }
  180. .button-box {
  181. // width: 100%;
  182. padding: 10px 15px;
  183. box-sizing: border-box;
  184. }
  185. .info-phone {
  186. font-size: 12px;
  187. color: #999999;
  188. }
  189. </style>