my-temperature.vue 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216
  1. <template>
  2. <view class="container">
  3. <view class="tabs" style="width: 420rpx;margin: 0rpx auto;padding-top: 20rpx;">
  4. <scroll-view scroll-x class="nav" >
  5. <view class="flex text-center">
  6. <view style="border: 1rpx solid #59a5f0;padding:15rpx 20rpx;" class="flex-sub" :class="index==subsectionCurrent?'nav-checked':'nav-unchecked'" v-for="(item,index) in subsectionList" :key="index" @tap="subsectionChange(index)" >
  7. {{item.name}}
  8. </view>
  9. </view>
  10. </scroll-view>
  11. </view>
  12. <view style="height: 100%;">
  13. <swiper style="height: 100%;" :current="subsectionCurrent" @change="swiperChange"
  14. @animationfinish="animationfinish">
  15. <swiper-item >
  16. <scroll-view scroll-y style="height: 100%;">
  17. <view @click="goDetail(item)" class="mine_order_statue" >
  18. <view class="flex justify-between" style="padding: 10rpx 0 10rpx 10rpx ;">
  19. <view class="flex">
  20. <image src="http://139.9.103.171:1888/miniofile/xlyq/del/cewen1.jpg" ></image>
  21. <view class="flex flex-direction justify-around padding-left-30">
  22. <view class="">
  23. <text class="text-bold">姓名:</text>
  24. <text>李德希</text>
  25. </view>
  26. <view class="">
  27. <text class="text-bold">温度:</text>
  28. <text>36.2 ℃ </text>
  29. </view>
  30. <view class="">
  31. <text class="text-bold">测温时间:</text>
  32. <text>2020-12-15 14:18:56</text>
  33. </view>
  34. </view>
  35. </view>
  36. <view class="flex align-center justify-center">
  37. <text class="cuIcon-right"></text>
  38. </view>
  39. </view>
  40. </view>
  41. <view @click="goDetail(item)" class="mine_order_statue" >
  42. <view class="flex justify-between" style="padding: 10rpx 0 10rpx 10rpx ;">
  43. <view class="flex">
  44. <image src="http://139.9.103.171:1888/miniofile/xlyq/del/cewen2.jpg" ></image>
  45. <view class="flex flex-direction justify-around padding-left-30">
  46. <view class="">
  47. <text class="text-bold">姓名:</text>
  48. <text>李德希</text>
  49. </view>
  50. <view class="">
  51. <text class="text-bold">温度:</text>
  52. <text>37.5 ℃ </text>
  53. <text class="text-red">【异常】</text>
  54. </view>
  55. <view class="">
  56. <text class="text-bold">测温时间:</text>
  57. <text>2020-12-17 14:18:56</text>
  58. </view>
  59. </view>
  60. </view>
  61. <view class="flex align-center justify-center">
  62. <text class="cuIcon-right"></text>
  63. </view>
  64. </view>
  65. </view>
  66. </scroll-view>
  67. </swiper-item>
  68. <swiper-item >
  69. <scroll-view scroll-y style="height: 100%;">
  70. <view @click="goDetail(item)" class="mine_order_statue" >
  71. <view class="flex justify-between" style="padding: 10rpx 0 10rpx 10rpx ;">
  72. <view class="flex">
  73. <image src="http://139.9.103.171:1888/miniofile/xlyq/del/cewen1.jpg" ></image>
  74. <view class="flex flex-direction justify-around padding-left-30">
  75. <view class="">
  76. <text class="text-bold">姓名:</text>
  77. <text>李德希</text>
  78. </view>
  79. <view class="">
  80. <text class="text-bold">温度:</text>
  81. <text>37.5 ℃ </text>
  82. <text class="text-red">【异常】</text>
  83. </view>
  84. <view class="">
  85. <text class="text-bold">测温时间:</text>
  86. <text>2020-12-17 14:18:56</text>
  87. </view>
  88. </view>
  89. </view>
  90. <view class="flex align-center justify-center">
  91. <text class="cuIcon-right"></text>
  92. </view>
  93. </view>
  94. </view>
  95. </scroll-view>
  96. </swiper-item>
  97. </swiper>
  98. </view>
  99. </view>
  100. </template>
  101. <script>
  102. export default {
  103. components:{
  104. },
  105. data() {
  106. return {
  107. subsectionCurrent:0,
  108. swiperCurrent:0,
  109. subsectionList:[
  110. {
  111. name: '全部记录'
  112. },
  113. {
  114. name: '异常记录'
  115. }
  116. ]
  117. }
  118. },
  119. methods: {
  120. goDetail(item){
  121. uni.navigateTo({
  122. url:"/pages/index/staff-temperature/detail"
  123. })
  124. },
  125. subsectionChange(index){
  126. this.subsectionCurrent=index
  127. },
  128. swiperChange(e) {
  129. uni.pageScrollTo({
  130. scrollTop: 0,
  131. duration: 0
  132. });
  133. this.subsectionCurrent = e.detail.current
  134. },
  135. animationfinish({detail: { current }}) {
  136. this.swiperCurrent = current;
  137. this.subsectionCurrent = current;
  138. },
  139. }
  140. }
  141. </script>
  142. <style lang="scss">
  143. .container {
  144. height: calc(100vh);
  145. background-color: #F6F6F6;
  146. padding: 90rpx 0rpx 0rpx;
  147. .tabs {
  148. height: 90rpx;
  149. position: fixed;
  150. top: 0rpx;
  151. left: 0;
  152. right: 0;
  153. width: 100%;
  154. z-index: 3;
  155. }
  156. }
  157. .nav-checked{
  158. background-color: #59a5f0;
  159. color: #FFFFFF;
  160. font-weight: 800;
  161. }
  162. .nav-unchecked{
  163. background-color: #FFFFFF;
  164. color: #59a5f0;
  165. }
  166. .text-checked{
  167. font-weight: 800;
  168. background-color: #FFFFFF;
  169. color: #2f7ff5;
  170. font-size: 800;
  171. }
  172. view{
  173. box-sizing: border-box;
  174. }
  175. .scroll-view {
  176. height: 150rpx;
  177. white-space: nowrap;
  178. width: 100%;
  179. position: relative;
  180. top: -30rpx;
  181. }
  182. .scroll-view-item {
  183. color: #FFFFFF;
  184. background-image: linear-gradient(to right, #2f7ff5, #2f7ff5);
  185. display: inline-block;
  186. text-align: left;
  187. padding: 20rpx 40rpx;
  188. margin:0 8rpx;
  189. width:24%;
  190. border-radius: 12rpx;
  191. }
  192. .scroll-view-item:first-child{
  193. margin-left: 30rpx;
  194. }
  195. .scroll-view-item:last-child{
  196. margin-right: 30rpx;
  197. }
  198. .mine_order_statue {
  199. margin: 18upx 14upx 0;
  200. background: #fff;
  201. padding: 10upx 20upx;
  202. border-radius: 20rpx;
  203. image{
  204. background-color: #FFFFFF;
  205. width: 160rpx;
  206. height: 160rpx;
  207. }
  208. }
  209. </style>