leaveRecord.vue 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219
  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">{{ computedAgreeType(site.agreeType) }}</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. computedAgreeType() {
  48. return function(agreeType) {
  49. switch(agreeType) {
  50. case 0:
  51. return '未处理'
  52. case 1:
  53. return '同意'
  54. case 2:
  55. return '不同意'
  56. }
  57. }
  58. }
  59. },
  60. data() {
  61. return {
  62. customerId: '',
  63. tableList: [],
  64. }
  65. },
  66. onShow() {
  67. this.tabList = Object.assign([], this.$options.data().tabList)
  68. this.getTableList()
  69. },
  70. methods: {
  71. // 获取列表数据
  72. getTableList() {
  73. NET.request(API.stuLeaveLessonsList, {
  74. page: 1,
  75. size: 100,
  76. }, 'POST').then(res => {
  77. this.triggered = false
  78. this.tableList = res.data.row
  79. })
  80. },
  81. },
  82. }
  83. </script>
  84. <style>
  85. page {
  86. width: 100%;
  87. height: 100%;
  88. background-color: #f7f7f7;
  89. }
  90. </style>
  91. <style lang="scss" scoped>
  92. @import "@/static/css/themes.scss";
  93. .content {
  94. width: 100%;
  95. float: left;
  96. .filter-box {
  97. height: 48px;
  98. padding: 10px 15px;
  99. background-color: #FFFFFF;
  100. }
  101. .swiper-box {
  102. height: calc(100vh - 82px);
  103. .swiper-item {
  104. height: calc(100vh - 82px);
  105. .scroll-box {
  106. width: 100%;
  107. height: calc(100vh - 82px);
  108. .card-box {
  109. .card-content {
  110. display: flex;
  111. align-items: center;
  112. .student-info {
  113. flex: 1;
  114. .info-name {
  115. // width: 64px;
  116. // float: left;
  117. line-height: 28px;
  118. font-size: 14px;
  119. font-weight: bold;
  120. }
  121. .info-type {
  122. padding: 0 10px;
  123. margin-top: 3px;
  124. border-radius: 20px;
  125. float: left;
  126. line-height: 20px;
  127. font-size: 10px;
  128. color: #FFFFFF;
  129. background-color: #999999;
  130. }
  131. .info-type-active {
  132. background-color: $mainColor;
  133. }
  134. }
  135. }
  136. }
  137. }
  138. }
  139. }
  140. }
  141. .menber-box {
  142. width: 100%;
  143. // float: left;
  144. padding: 10px 15px;
  145. margin-bottom: 10px;
  146. .menber-col {
  147. width: 100%;
  148. padding: 15px;
  149. margin-bottom: 10px;
  150. display: inline-block;
  151. background-color: #FFFFFF;
  152. border-radius: 15px;
  153. box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.2);
  154. position: relative;
  155. overflow: hidden;
  156. box-sizing: border-box;
  157. .menber-label {
  158. width: 100%;
  159. margin-bottom: 5px;
  160. float: left;
  161. font-size: 14px;
  162. // line-height: 20px;
  163. }
  164. .menber-num {
  165. width: 100%;
  166. float: left;
  167. font-size: 26px;
  168. line-height: 28px;
  169. color: $mainColor;
  170. }
  171. .menber-icon {
  172. font-size: 100px;
  173. color: $mainColor;
  174. position: absolute;
  175. right: -5px;
  176. bottom: -30px;
  177. opacity: 0.5;
  178. }
  179. }
  180. }
  181. .common-title {
  182. width:100%;
  183. text-align: center;
  184. font-size: 20px;
  185. margin: 10px 0;
  186. }
  187. .fix-add-icon {
  188. position: fixed;
  189. bottom: 15px;
  190. right: 15px;
  191. }
  192. .button-box {
  193. // width: 100%;
  194. padding: 10px 15px;
  195. box-sizing: border-box;
  196. }
  197. .info-phone {
  198. font-size: 12px;
  199. color: #999999;
  200. }
  201. </style>