index.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. <template>
  2. <view class="page" :style="{'min-height':h+'px', 'padding-top':mt+'px'}">
  3. <cus-header title='门禁管理'></cus-header>
  4. <div class="boxs" v-if="list.length">
  5. <div class="box" v-for="(item,index) in list" :key="index">
  6. <div class="info">
  7. <text>{{item.title}}</text>
  8. <text class="no">{{item.no}}</text>
  9. </div>
  10. <div class="btns">
  11. <div class="pre line">开启</div>
  12. <div class="pre line">关闭</div>
  13. <div class="pre line">常开</div>
  14. <div class="pre">常关</div>
  15. </div>
  16. <div class="status" :class="item.status==1?'on':(item.status==2?'off':'mr')">
  17. {{item.status==1?'在线':(item.status==2?'离线':'异常')}}
  18. </div>
  19. </div>
  20. </div>
  21. <template v-else>
  22. <page-empty :height="'calc(100vh - '+mt+'px)'"></page-empty>
  23. </template>
  24. </view>
  25. </template>
  26. <script>
  27. export default {
  28. data(){
  29. return {
  30. list:[
  31. {
  32. title:'谷锐特前台门禁',
  33. no:'F11149069',
  34. status:1
  35. },
  36. {
  37. title:'办公室门禁',
  38. no:'F11149078',
  39. status:2
  40. }
  41. ]
  42. }
  43. },
  44. methods:{
  45. }
  46. }
  47. </script>
  48. <style scoped lang="less">
  49. .page{
  50. background: #F4F8FB;
  51. padding: 0 24rpx 20rpx;
  52. box-sizing: border-box;
  53. .boxs{
  54. width: 100%;
  55. .box{
  56. width: 100%;
  57. background: #FFFFFF;
  58. box-shadow: 0rpx 4rpx 14rpx 0rpx rgba(0,0,0,0.08);
  59. border-radius: 16rpx;
  60. position: relative;
  61. margin-top: 20rpx;
  62. .info{
  63. width: 100%;
  64. padding: 40rpx 24rpx;
  65. box-sizing: border-box;
  66. display: flex;
  67. flex-direction: column;
  68. text{
  69. font-family: PingFang-SC, PingFang-SC;
  70. font-weight: bold;
  71. font-size: 36rpx;
  72. color: #1D2129;
  73. line-height: 36rpx;
  74. text-align: left;
  75. &.no{
  76. font-weight: 400;
  77. font-size: 32rpx;
  78. color: #657588;
  79. margin-top: 24rpx;
  80. }
  81. }
  82. }
  83. .btns{
  84. width: 100%;
  85. background: #F5F9FF;
  86. border-radius: 0rpx 0rpx 16rpx 16rpx;
  87. display: flex;
  88. .pre{
  89. width: 25%;
  90. padding: 26rpx 0;
  91. font-family: PingFangSC, PingFang SC;
  92. font-weight: 400;
  93. font-size: 30rpx;
  94. color: #198CFF;
  95. line-height: 36rpx;
  96. text-align: center;
  97. position: relative;
  98. &.line::after{
  99. content: '';
  100. width: 1rpx;
  101. height: 48rpx;
  102. background: #B9C0C8;
  103. position: absolute;
  104. right: 0;
  105. top: 50%;
  106. margin-top: -24rpx;
  107. }
  108. }
  109. }
  110. .status{
  111. width: 90rpx;
  112. height: 48rpx;
  113. border-radius: 0rpx 16rpx 0rpx 16rpx;
  114. font-family: PingFangSC, PingFang SC;
  115. font-weight: 400;
  116. font-size: 26rpx;
  117. color: #FFFFFF;
  118. line-height: 48rpx;
  119. text-align: center;
  120. position: absolute;
  121. top: 0;
  122. right: 0;
  123. &.on{
  124. background: #14CC8C;
  125. }
  126. &.off{
  127. background: #CCCCCC;
  128. }
  129. &.mr{
  130. background: #666666;
  131. }
  132. }
  133. }
  134. }
  135. }
  136. </style>