test.vue 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. <template>
  2. <view class="">
  3. <view class="data" v-for="(item, index) in list" :key="index">
  4. <view class="top">
  5. <view class="left">
  6. <view class="title ">
  7. <text class="text-bold">IEMI:</text>
  8. <text>{{item.imei}}</text>
  9. <text @click="copy(item.imei)" style="text-decoration: underline;padding-left: 10rpx;color: #007AFF;">复制</text>
  10. </view>
  11. </view>
  12. <view class="right">
  13. <view v-if="item.defenseStatus==1" class="radius sm cu-btn line-green">
  14. 已上线
  15. </view>
  16. <view v-if="item.defenseStatus==2" class="radius sm cu-btn line-red">
  17. 已下线
  18. </view>
  19. </view>
  20. </view>
  21. <view class="item padding-left-20">
  22. <view class="content flex">
  23. <u-icon size="36" name="http://139.9.103.171:1888/miniofile/xlyq/xiaofangshuang.png"></u-icon>
  24. <text class="text-bold padding-left-10">设备名称:</text>
  25. <text>{{item.deviceName}}</text>
  26. </view>
  27. <view class="content flex">
  28. <view class="flex">
  29. <u-icon size="36" name="http://139.9.103.171:1888/miniofile/xlyq/dianchi.png"></u-icon>
  30. <text class="text-bold padding-left-10">电池电量:</text>
  31. </view>
  32. <view class="striped active cu-progress round margin-top-sm sm" style="width: 60%;">
  33. <view style="width: 68%;background-color: #16c60c;color: #FFFFFF;">
  34. {{item.battery?item.battery:0}}%
  35. </view>
  36. </view>
  37. </view>
  38. <view class="content flex">
  39. <view class="flex">
  40. <u-icon size="36" name="http://139.9.103.171:1888/miniofile/xlyq/wifi.png"></u-icon>
  41. <text class="text-bold padding-left-10">信号强弱:</text>
  42. </view>
  43. <view class="striped active cu-progress round margin-top-sm sm" style="width: 60%;">
  44. <view style="width: 58%;background-color: #fc5f44;color: #FFFFFF;">
  45. {{item.signalIntensity?item.signalIntensity:0}}%
  46. </view>
  47. </view>
  48. </view>
  49. <view class="content flex">
  50. <u-icon size="36" name="http://139.9.103.171:1888/miniofile/xlyq/jiance.png"></u-icon>
  51. <text class="text-bold padding-left-10">监测值:</text>
  52. <text class="text-bold" style="color: #1296db;padding-top: 6rpx;">{{item.monitorValue}}</text>
  53. </view>
  54. <view class="content flex">
  55. <u-icon size="36" name="http://139.9.103.171:1888/miniofile/xlyq/updateTime2.png"></u-icon>
  56. <text class="text-bold padding-left-10">更新时间:</text>
  57. <text style="padding-top: 6rpx;">{{item.lastUpdateTime}}</text>
  58. </view>
  59. </view>
  60. <view class="bottom" >
  61. <view class="cu-btn round sm line-blue" >
  62. 查看详情
  63. </view>
  64. <view class="cu-btn round sm line-blue" style="margin: 0 20rpx;">
  65. 告警记录
  66. </view>
  67. </view>
  68. </view>
  69. <u-divider height="100" bgColor="#f1f1f1">到底了</u-divider>
  70. </view>
  71. </template>
  72. <script>
  73. export default {
  74. name: 'card',
  75. props:{
  76. list:{
  77. type:Array,
  78. default:()=>{
  79. [
  80. {
  81. id:'1337708672083709954',
  82. imei:'861878041367316',
  83. defenseStatus:'1',
  84. deviceName:'无线智能消防栓检测终端',
  85. battery:'52',
  86. signalIntensity:'90',
  87. monitorValue:'0.0009Mpa',
  88. lastUpdateTime:'2020-12-19 15:51:45'
  89. }
  90. ]
  91. }
  92. }
  93. },
  94. data() {
  95. return {
  96. };
  97. },
  98. onLoad() {
  99. },
  100. methods:{
  101. copy(data){
  102. uni.setClipboardData({
  103. data:data
  104. })
  105. },
  106. goDetail(item){
  107. uni.navigateTo({
  108. })
  109. },
  110. }
  111. };
  112. </script>
  113. <style lang="scss">
  114. .bg-blue{
  115. background-color: #59a5f0;
  116. color: #FFFFFF;
  117. }
  118. .data {
  119. width: 720rpx;
  120. background-color: #ffffff;
  121. margin: 20rpx auto;
  122. border-radius: 6rpx;
  123. box-sizing: border-box;
  124. padding: 20rpx;
  125. font-size: 28rpx;
  126. .top {
  127. display: flex;
  128. justify-content: space-between;
  129. padding-bottom: 20rpx;
  130. border-bottom: 1rpx dashed #DDDDDD;
  131. .left {
  132. display: flex;
  133. align-items: center;
  134. .title {
  135. margin: 0 10rpx;
  136. font-size: 30rpx;
  137. }
  138. }
  139. .right{
  140. margin-right: 10rpx;
  141. }
  142. }
  143. .item {
  144. margin: 5rpx 0 20rpx 0;
  145. .content {
  146. padding: 30rpx 0 ;
  147. border-bottom: 1rpx dashed #DDDDDD;
  148. }
  149. }
  150. .bottom {
  151. display: flex;
  152. padding-top: 10rpx;
  153. margin-top: 30rpx;
  154. justify-content: flex-end;
  155. align-items: center;
  156. }
  157. }
  158. </style>