index.vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  1. <template>
  2. <view>
  3. <!-- 头部导航 -->
  4. <view class="tesx">
  5. <view :class="tobu == 1 ? 'con' : ''" @click="to(1)" style="margin-right: 20rpx;">概览</view>
  6. <view :class="tobu == 2 ? 'con' : ''" @click="to(2)">记录</view>
  7. </view>
  8. <!-- 概览 -->
  9. <view v-if="tobu == 1">
  10. <view class="choice" style="border: 0;">
  11. <view class="choice-left">全校</view>
  12. <view>2022.10.19 ~ 2022.12.09</view>
  13. </view>
  14. <!-- 总人数 -->
  15. <view class="total">
  16. 总请假人数
  17. <br>
  18. <text class="total-txt" style="font-size: 49rpx;">152</text>人
  19. <view class="line"></view>
  20. </view>
  21. </view>
  22. <!-- 记录 -->
  23. <view v-if="tobu == 2">
  24. <view class="choice">
  25. <view class="choice-left">全校</view>
  26. <view>2022.10.19 ~ 2022.12.09</view>
  27. </view>
  28. <view class="record" v-for="item in dato">
  29. <view style="color: #000; font-weight: 600; margin-bottom: 23rpx;">
  30. Messis的请假
  31. <text style="color: rgba(0,0,0,0.60); font-weight: 500; float: right; display: inline-block;">2022.12.01</text>
  32. </view>
  33. <view class="information">
  34. <text>请假类型:</text>
  35. <text>病假</text>
  36. </view>
  37. <view class="information">
  38. <text>学生姓名:</text>
  39. <text>Messis</text>
  40. </view>
  41. <view class="information">
  42. <text>所在班级:</text>
  43. <text>一年级(1)班</text>
  44. </view>
  45. <view class="information">
  46. <text>开始时间:</text>
  47. <text>2020-09-04 上午</text>
  48. </view>
  49. <view class="information">
  50. <text>结束时间:</text>
  51. <text>2020-09-04 下午</text>
  52. </view>
  53. <view class="information">
  54. <text>请假天数:</text>
  55. <text>1天</text>
  56. </view>
  57. </view>
  58. </view>
  59. <!-- 悬浮按钮 -->
  60. <view class="suspension" @click="toAdd" v-if="tobu == 1">
  61. <image src="../../static/icon.svg"></image>
  62. </view>
  63. </view>
  64. </template>
  65. <script>
  66. export default {
  67. data() {
  68. return {
  69. providerList: [],
  70. version: '',
  71. handle: 'Mba',
  72. tobu: '1',
  73. dato: [{}, {}]
  74. }
  75. },
  76. onLoad() {
  77. },
  78. methods: {
  79. // 点击改变是否观察或者处理记录
  80. to(data){
  81. this.tobu = data
  82. },
  83. // 跳转新增
  84. toAdd(){
  85. uni.navigateTo({
  86. url: '/pages/addLeave/index'
  87. })
  88. }
  89. }
  90. }
  91. </script>
  92. <style lang="scss" scoped>
  93. page{
  94. // padding: 0 32rpx;
  95. /* background-color: #D9D9D9; */
  96. background-color: #F5F5F5 !important;
  97. }
  98. .tesx{
  99. display: flex;
  100. align-items: center;
  101. font-size: 32rpx;
  102. color: rgba(0,0,0,0.60);
  103. height: 128rpx;
  104. padding: 0 32rpx;
  105. box-sizing: border-box;
  106. }
  107. .con{
  108. font-size: 40rpx;
  109. font-weight: 600;
  110. color: #000;
  111. }
  112. .choice{
  113. height: 96rpx;
  114. line-height: 96rpx;
  115. padding: 0 32rpx;
  116. box-sizing: border-box;
  117. border-bottom: 1px solid rgba(0,0,0,0.10);
  118. }
  119. .choice-left{
  120. float: left;
  121. margin-right: 114rpx;
  122. }
  123. // 概览
  124. .total{
  125. height: 302rpx;
  126. box-sizing: border-box;
  127. padding: 36rpx 22rpx;
  128. background-color: #fff;
  129. border-radius: 32rpx;
  130. margin: 20rpx 32rpx 0;
  131. font-size: 25rpx;
  132. }
  133. .total-txt{
  134. font-weight: 600;
  135. margin-top: 6rpx;
  136. margin-right: 15rpx;
  137. display: inline-block;
  138. }
  139. // 记录
  140. .record{
  141. padding: 32rpx 37rpx;
  142. box-sizing: border-box;
  143. font-size: 28rpx;
  144. color: rgba(0,0,0,0.60);
  145. border-bottom: 1px solid rgba(0,0,0,0.10);
  146. }
  147. .information{
  148. height: 47rpx;
  149. line-height: 47rpx;
  150. }
  151. .suspension{
  152. width: 96rpx;
  153. height: 96rpx;
  154. border-radius: 50px;
  155. background-color: #7b5df0;
  156. position:fixed;
  157. right: 32rpx;
  158. bottom: 168rpx;
  159. }
  160. .suspension image{
  161. width: 100%;
  162. height: 100%;
  163. }
  164. </style>