abnormalList.vue 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273
  1. <template>
  2. <view>
  3. <u-navbar title="异常告警记录"></u-navbar>
  4. <view class="main">
  5. <view class="tabs">
  6. <u-picker v-model="tabsFrom.show1" :default-selector="[tabsFrom.show1Index]" mode="selector"
  7. :range="tabsFrom.selector1" range-key="label" @confirm="selector1confirm"></u-picker>
  8. <u-picker-select title="日期选择" v-model="tabsFrom.show2" :defaultTime="tabsFrom.show2Index"
  9. :endYear="endYear" mode="time" :params="params" @confirm="selector2confirm"
  10. @reset="selector2reset"></u-picker-select>
  11. <view class="tabsItem" @click="tabsFrom.show1=!tabsFrom.show1">{{tabsFrom.show1Text}} <u-icon
  12. name="arrow-up" v-if="tabsFrom.show1"></u-icon><u-icon v-else name="arrow-down"></u-icon></view>
  13. <view class="tabsItem" @click="tabsFrom.show2=!tabsFrom.show2">{{tabsFrom.show2Text}} <u-icon
  14. name="arrow-up" v-if="tabsFrom.show2"></u-icon><u-icon v-else name="arrow-down"></u-icon></view>
  15. <view class="tabsItem" @click="tabsFrom.show3=!tabsFrom.show3">{{tabsFrom.show3Text}} <u-icon
  16. name="arrow-up" v-if="tabsFrom.show3"></u-icon><u-icon v-else name="arrow-down"></u-icon></view>
  17. </view>
  18. <view class="list" v-if="0">
  19. <view class="line" @click="gotoUrl('/pages/myTab/abnormalInfo?id=1')">
  20. <view class="body">
  21. <view class="imgclass">
  22. <image class="img" src="@/assets/img/deviceTab/index2-1.svg" mode=""></image>
  23. </view>
  24. <view class="item">
  25. <view class="name">
  26. <view class="text1">软件园</view>
  27. <view class="text2">私人地锁</view>
  28. </view>
  29. <view class="value">
  30. <view class="text1">2024-02-14 09:00:01</view>
  31. <view class="text2">私人地锁</view>
  32. </view>
  33. </view>
  34. </view>
  35. <view class="goto">
  36. <u-icon name="arrow-right" size="24" color="#BBBBBB"></u-icon>
  37. </view>
  38. </view>
  39. <view class="line" @click="gotoUrl('/pages/myTab/abnormalInfo?id=1')">
  40. <view class="body">
  41. <view class="imgclass">
  42. <image class="img" src="@/assets/img/deviceTab/index2-1.svg" mode=""></image>
  43. </view>
  44. <view class="item">
  45. <view class="name">
  46. <view class="text1">软件园</view>
  47. <view class="text2">私人地锁</view>
  48. </view>
  49. <view class="value">
  50. <view class="text1">软件园</view>
  51. <view class="text2">私人地锁</view>
  52. </view>
  53. </view>
  54. </view>
  55. <view class="goto">
  56. <u-icon name="arrow-right" size="24" color="#BBBBBB"></u-icon>
  57. </view>
  58. </view>
  59. </view>
  60. </view>
  61. <u-divider :isnone="list.length==0" nonetext="没有找到相关内容" border-color="#CFD2D5">已经到底了</u-divider>
  62. </view>
  63. </template>
  64. <script>
  65. import * as API from '@/apis/pagejs/deviceTab.js'
  66. export default {
  67. data() {
  68. return {
  69. title: "场站列表",
  70. list: [],
  71. listForm: {
  72. pageIndex: 1,
  73. pageSize: 20,
  74. recordsTotal: 1,
  75. },
  76. tabsFrom: {
  77. show1: false,
  78. show1Index: 0,
  79. show2Index: '',
  80. show2: false,
  81. show1Text: "全部场站",
  82. show2Text: "全部类型",
  83. show3Text: "全部状态",
  84. selector1: [{
  85. label: '全部类型',
  86. value: '',
  87. },
  88. {
  89. label: '线上充值',
  90. value: '1',
  91. },
  92. {
  93. label: '线下充值',
  94. value: '2',
  95. },
  96. ]
  97. },
  98. };
  99. },
  100. onLoad(op) {
  101. this.getList()
  102. },
  103. onReachBottom() {
  104. if (this.list.length < this.listForm.recordsTotal) {
  105. this.myLoadmore();
  106. }
  107. },
  108. methods: {
  109. myLoadmore() {
  110. this.listForm.pageIndex += 1;
  111. this.getList()
  112. },
  113. getList() {
  114. return
  115. uni.showLoading({
  116. title: "加载中",
  117. mask: true,
  118. })
  119. API.floorlockList(this.listForm).then((res) => {
  120. var list = []
  121. if (this.listForm.pageIndex == 1) {
  122. list = res.data.data;
  123. } else {
  124. list = [
  125. ...list,
  126. ...res.data.data
  127. ];
  128. }
  129. this.list = res.data.data
  130. uni.hideLoading();
  131. }).catch(error => {
  132. uni.hideLoading();
  133. uni.showToast({
  134. title: error,
  135. icon: "none"
  136. })
  137. })
  138. },
  139. }
  140. }
  141. </script>
  142. <style scoped lang="scss">
  143. .main {
  144. background-color: #fff;
  145. .line {
  146. display: flex;
  147. justify-content: space-between;
  148. align-items: center;
  149. padding: 32rpx;
  150. border-bottom: 1px solid rgba(245, 245, 245, 1);
  151. .goto {
  152. margin-left: 16rpx;
  153. }
  154. .body {
  155. display: flex;
  156. align-items: center;
  157. width: 100%;
  158. .imgclass {
  159. display: flex;
  160. align-items: center;
  161. justify-content: center;
  162. width: 72rpx;
  163. height: 72rpx;
  164. border-radius: 4px;
  165. background-color: rgba(219, 234, 255, 1);
  166. }
  167. .item {
  168. margin-left: 16rpx;
  169. width: 100%;
  170. .name {
  171. color: rgba(51, 51, 51, 1);
  172. font-weight: bold;
  173. font-size: 28rpx;
  174. display: flex;
  175. align-items: center;
  176. justify-content: space-between;
  177. }
  178. .value {
  179. color: rgba(119, 119, 119, 1);
  180. font-size: 24rpx;
  181. display: flex;
  182. align-items: center;
  183. justify-content: space-between;
  184. }
  185. }
  186. }
  187. }
  188. .img {
  189. width: 48rpx;
  190. height: 48rpx;
  191. }
  192. }
  193. .tabs {
  194. border-bottom: 1px solid rgba(232, 232, 232, 1);
  195. height: 96rpx;
  196. line-height: 96rpx;
  197. background-color: #fff;
  198. border-top: 1px solid rgba(241, 241, 241, 1);
  199. display: flex;
  200. justify-content: space-around;
  201. .tabsItem {
  202. color: rgba(51, 51, 51, 1);
  203. font-size: 14px;
  204. }
  205. }
  206. .floating-button {
  207. position: fixed;
  208. bottom: 120rpx;
  209. width: 100%;
  210. display: flex;
  211. justify-content: center;
  212. .button {
  213. border-radius: 50px;
  214. background-color: rgba(49, 51, 52, 1);
  215. color: rgba(255, 255, 255, 1);
  216. font-size: 28rpx;
  217. width: 240rpx;
  218. display: flex;
  219. align-items: center;
  220. justify-content: center;
  221. padding: 12rpx;
  222. .img {
  223. width: 40rpx;
  224. height: 40rpx;
  225. margin-right: 8rpx;
  226. }
  227. }
  228. }
  229. </style>