stationsListLine.vue 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244
  1. <template>
  2. <view>
  3. <ujp-navbar title="摄像头管理"></ujp-navbar>
  4. <view class="deviceList" >
  5. <view style="text-align: center;margin-top: 100px" v-if="!list.length">
  6. <img src="@/assets/img/blankpage.png">
  7. <view>查询为空</view>
  8. </view>
  9. <view v-for="(item ,index) in list" :key="item.id"
  10. @click="gotoUrl('pagesFinance/user/deviceListLine?id='+item.id)"
  11. class="deviceList-item deviceList-bg1" >
  12. <view class="deviceList-main">
  13. <!-- <span class="btn12 " v-if="item.type=='1,2'" >快/慢</span>
  14. <span class="btn12 btn1" v-if="item.type=='1'" >慢冲</span>
  15. <span class="btn12 btn2" v-if="item.type=='2'" >快冲</span> -->
  16. {{item.name}}</view>
  17. <view class="deviceList-head">{{item.address}}<span style="float: right;" class="iconfont more">&#xe600;</span></view>
  18. <view class="deviceList-foot">
  19. <view class="deviceList-label" style="color: #333333;" >摄像头总数<b>{{item.cameraNum}}</b></view>
  20. <!-- <view class="deviceList-label">{{item.roleName}}</view> -->
  21. </view>
  22. </view>
  23. <u-divider v-if="list.length&&list.length==recordsTotal" color="#B6BDC3" style="margin-top:20px;" bg-color="#f7f7f7">已经到底了</u-divider>
  24. </view>
  25. </view>
  26. </template>
  27. <script>
  28. import * as API from '@/apis/finance.js'
  29. export default {
  30. data() {
  31. return {
  32. form: {
  33. },
  34. startDate:'',
  35. endDate:'',
  36. pageIndex: 1,
  37. recordsTotal: 0,
  38. list: [],
  39. value1: -1,
  40. value2: -1,
  41. value3: -1,
  42. stationList:[],
  43. options0: [
  44. {
  45. label: '全部',
  46. value: -1,
  47. },
  48. {
  49. label: '自行车充电',
  50. value: 0,
  51. },
  52. {
  53. label: '交流慢充',
  54. value: 2,
  55. },
  56. {
  57. label: '直流快充',
  58. value: 1,
  59. }
  60. ],
  61. options1: [{
  62. label: '全部',
  63. value: '-1',
  64. },
  65. {
  66. label: '自行车充电',
  67. value: 0,
  68. },
  69. {
  70. label: '交流慢充',
  71. value: 2,
  72. },
  73. {
  74. label: '直流快充',
  75. value: 1,
  76. }
  77. ],
  78. options2: [
  79. ],
  80. options3: [
  81. {
  82. label: '全部',
  83. value: -1,
  84. },
  85. {
  86. label: '在线',
  87. value: 1,
  88. },
  89. {
  90. label: '离线',
  91. value: 0,
  92. },
  93. ],
  94. }
  95. },
  96. onReachBottom() {
  97. if (this.list.length < this.recordsTotal) {
  98. this.myLoadmore();
  99. }
  100. },
  101. methods: {
  102. change1(e){
  103. this.form.type=e
  104. if(e==-1){
  105. this.form.type=""
  106. }
  107. this.getList(true)
  108. },
  109. change2(e){
  110. this.form.stationId=e
  111. if(e==-1){
  112. this.form.stationId=""
  113. }
  114. this.getList(true)
  115. },
  116. change3(e){
  117. this.form.onlineStatus=e
  118. if(e==-1){
  119. this.form.onlineStatus=""
  120. }
  121. this.getList(true)
  122. },
  123. myLoadmore() {
  124. this.pageIndex += 1;
  125. this.getList()
  126. },
  127. getList(bl) {
  128. uni.showLoading({
  129. title: "加载中",
  130. mask: true,
  131. })
  132. if (bl) {
  133. this.list = [];
  134. this.pageIndex = 1;
  135. }
  136. this.form.pageIndex= this.pageIndex
  137. API.stationsListLine(this.form).then((res) => {
  138. this.list = [
  139. ...this.list,
  140. ...res.data.data
  141. ];
  142. uni.hideLoading()
  143. }).catch(error => {
  144. uni.showToast({
  145. title: error
  146. })
  147. })
  148. },
  149. onReady() {
  150. //this.getStation()
  151. this.getList()
  152. }
  153. }
  154. }
  155. </script>
  156. <style>
  157. page{
  158. background-color: #F7F7F7;
  159. }
  160. </style>
  161. <style lang="scss" scoped>
  162. .btn12{
  163. color: #fff;
  164. background-color: #449ca8;
  165. font-size: 16px;
  166. border-radius: 50px;
  167. padding: 1px 5px;
  168. }
  169. .btn1{
  170. background-color: #5cbe7d;
  171. }
  172. .btn2{
  173. background-color: #7a68f6;
  174. }
  175. .deviceDropdown{
  176. background-color: #fff;
  177. }
  178. .deviceList-item{
  179. margin: 16px;
  180. border-radius: 8px;
  181. .deviceList-head{
  182. color: #9e9e9e;
  183. font-size: 16px;
  184. padding: 8px 16px;
  185. }
  186. .deviceList-main{
  187. font-size: 20px/* */;
  188. padding:5px 16px 0px 16px;
  189. font-weight: bold;
  190. }
  191. .deviceList-foot{
  192. display: flex;
  193. align-items: center;
  194. flex-wrap: wrap;
  195. padding: 0 16px 16px;
  196. .deviceList-label{
  197. // background-color: #F0F2F4 ;
  198. // padding: 4px 10px;
  199. margin: 1px;
  200. border-radius: 4px;
  201. }
  202. }
  203. }
  204. .deviceList-bg1{
  205. //background:url(../../assets/img/charging_type_fast.png) no-repeat #fff;
  206. background-size:100%;
  207. background-color: #ffffff ;
  208. }
  209. .deviceList-bg2{
  210. background:url(../../assets/img/charging_type_slow.png) no-repeat #fff;
  211. background-size:100%;
  212. }
  213. .deviceList-bg3{
  214. background:url(../../assets/img/charging_type_bike.png) no-repeat #fff;
  215. background-size:100%;
  216. }
  217. </style>