index.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  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 - 100px)'"></page-empty>
  23. </template>
  24. </view>
  25. </template>
  26. <script>
  27. import pageEmpty from '@/components/pageEmpty/index.vue'
  28. export default {
  29. components:{
  30. pageEmpty
  31. },
  32. data(){
  33. return {
  34. list:[
  35. {
  36. title:'谷锐特前台门禁',
  37. no:'F11149069',
  38. status:1
  39. },
  40. {
  41. title:'办公室门禁',
  42. no:'F11149078',
  43. status:2
  44. }
  45. ]
  46. }
  47. },
  48. methods:{
  49. }
  50. }
  51. </script>
  52. <style scoped lang="less">
  53. .page{
  54. background: #F4F8FB;
  55. padding: 0 24rpx 20rpx;
  56. box-sizing: border-box;
  57. .boxs{
  58. width: 100%;
  59. .box{
  60. width: 100%;
  61. background: #FFFFFF;
  62. box-shadow: 0rpx 4rpx 14rpx 0rpx rgba(0,0,0,0.08);
  63. border-radius: 16rpx;
  64. position: relative;
  65. margin-top: 20rpx;
  66. .info{
  67. width: 100%;
  68. padding: 40rpx 24rpx;
  69. box-sizing: border-box;
  70. display: flex;
  71. flex-direction: column;
  72. text{
  73. font-family: PingFang-SC, PingFang-SC;
  74. font-weight: bold;
  75. font-size: 36rpx;
  76. color: #1D2129;
  77. line-height: 36rpx;
  78. text-align: left;
  79. &.no{
  80. font-weight: 400;
  81. font-size: 32rpx;
  82. color: #657588;
  83. margin-top: 24rpx;
  84. }
  85. }
  86. }
  87. .btns{
  88. width: 100%;
  89. background: #F5F9FF;
  90. border-radius: 0rpx 0rpx 16rpx 16rpx;
  91. display: flex;
  92. .pre{
  93. width: 25%;
  94. padding: 26rpx 0;
  95. font-family: PingFangSC, PingFang SC;
  96. font-weight: 400;
  97. font-size: 30rpx;
  98. color: #198CFF;
  99. line-height: 36rpx;
  100. text-align: center;
  101. position: relative;
  102. &.line::after{
  103. content: '';
  104. width: 1rpx;
  105. height: 48rpx;
  106. background: #B9C0C8;
  107. position: absolute;
  108. right: 0;
  109. top: 50%;
  110. margin-top: -24rpx;
  111. }
  112. }
  113. }
  114. .status{
  115. width: 90rpx;
  116. height: 48rpx;
  117. border-radius: 0rpx 16rpx 0rpx 16rpx;
  118. font-family: PingFangSC, PingFang SC;
  119. font-weight: 400;
  120. font-size: 26rpx;
  121. color: #FFFFFF;
  122. line-height: 48rpx;
  123. text-align: center;
  124. position: absolute;
  125. top: 0;
  126. right: 0;
  127. &.on{
  128. background: #14CC8C;
  129. }
  130. &.off{
  131. background: #CCCCCC;
  132. }
  133. &.mr{
  134. background: #666666;
  135. }
  136. }
  137. }
  138. }
  139. }
  140. </style>