CaiMeiJi.vue 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <template>
  2. <div class="container">
  3. <div class="fankui">{{info_number}}采煤机运行反馈&nbsp;<i id="green" v-show="true" class="fa fa-circle"></i> <i id="red" v-show="false" class="fa fa-circle"></i></div>
  4. <div class="bgi"></div>
  5. <!-- @click="change" -->
  6. <div class="info">{{info_number}}采煤区</div>
  7. <ul class="msg" :style="{height:h}">
  8. <li v-for="(value,key) in msg" :key="key">{{key}}:{{value}}</li>
  9. </ul>
  10. </div>
  11. </template>
  12. <script>
  13. export default {
  14. name:'CaiMeiJi',
  15. data() {
  16. return {
  17. h:"0px",
  18. show:false,
  19. msg:{
  20. '割煤刀数':2,
  21. '回采米数':1300,
  22. '出煤量':2
  23. }
  24. }
  25. },
  26. props:['info_number'],
  27. methods:{
  28. change(){
  29. if(this.h==="0px"){
  30. this.h = "200px"
  31. }else if(this.h = "200px"){
  32. this.h = "0px"
  33. }
  34. },
  35. getData(msg){
  36. this.msg = msg
  37. }
  38. }
  39. }
  40. </script>
  41. <style lang='less' scoped>
  42. .container{
  43. width: 100%;
  44. height: 100%;
  45. position: relative;
  46. color: #fff;
  47. left:60px;
  48. .fankui{
  49. text-align: center;
  50. font-size: 12px;
  51. padding-bottom: 2px;
  52. }
  53. .bgi{
  54. height: 60px;
  55. background-size:cover;
  56. background-image: url(采煤机.png);
  57. }
  58. .info{
  59. box-sizing: border-box;
  60. height: 50px;
  61. font-size: 14px;
  62. border: 2px solid rgb(219,208,10);
  63. padding-top: 12%;
  64. text-align: center;
  65. color: rgb(219,208,10);
  66. }
  67. .msg{
  68. padding: 0;
  69. list-style: none;
  70. position: absolute;
  71. overflow: hidden;
  72. width: 200px;
  73. height: 0;
  74. top:-10px;
  75. right: -220px;
  76. border-radius: 20%;
  77. background-color: rgba(88, 240, 227, 1);
  78. box-shadow: 0 0 10px rgba(255, 255, 255, 1);
  79. transition: 0.5s;
  80. li{
  81. color: rgb(236, 74, 74);
  82. font-size: 20px;
  83. text-align: center;
  84. padding: 20px 0;
  85. }
  86. }
  87. }
  88. #green{
  89. color: green;
  90. }
  91. #red{
  92. color: red;
  93. }
  94. </style>