index.vue 3.1 KB

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