staff-temperature.vue 6.0 KB

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