WindturbineMinCard.vue 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. /* 风机矩阵小卡片 */
  2. <template>
  3. <div :class="cardStyle">
  4. <el-row>
  5. <el-col span="12">
  6. <div :class="leftStyle">
  7. <el-row>
  8. <div :class="titleStyle">SG</div>
  9. </el-row>
  10. <el-row>
  11. <div :class="titleStyle">223</div>
  12. </el-row>
  13. </div>
  14. </el-col>
  15. <el-col span="12">
  16. <div :class="rightStyle">
  17. <el-row>
  18. <div :class="contentStyle">123.54 kw</div>
  19. </el-row>
  20. <el-row>
  21. <div :class="contentStyle">8.23 m/s</div>
  22. </el-row>
  23. <el-row>
  24. <div :class="contentStyle">1234.56 rpm</div>
  25. </el-row>
  26. </div>
  27. </el-col>
  28. </el-row>
  29. </div>
  30. </template>
  31. <script>
  32. export default {
  33. name: "WindturbineMinCard",
  34. props: {
  35. status: String,
  36. },
  37. computed: {
  38. cardStyle: function () {
  39. return "card-style-" + this.status;
  40. },
  41. leftStyle: function () {
  42. return "card-left-style-" + this.status;
  43. },
  44. rightStyle: function () {
  45. return "card-right-style-" + this.status;
  46. },
  47. titleStyle: function () {
  48. return "card-title-style-" + this.status;
  49. },
  50. contentStyle: function () {
  51. return "card-content-style-" + this.status;
  52. }
  53. },
  54. };
  55. </script>
  56. <style scoped>
  57. .card-style-1 {
  58. position: relative;
  59. width: 120px;
  60. height: 50px;
  61. border: 2px solid #4952a6;
  62. background-color: rgba(73, 82, 166, 0.5);
  63. box-sizing: border-box;
  64. display: inline-block;
  65. }
  66. .card-left-style-1 {
  67. position: relative;
  68. width: 25px;
  69. height: 41px;
  70. background-color: rgba(73, 82, 166, 0.7);
  71. box-sizing: border-box;
  72. margin: 3px;
  73. display: inline-block;
  74. }
  75. .card-right-style-1 {
  76. position: relative;
  77. width: calc(120px - 4px - 6px - 25px);
  78. height: calc(50px - 2px);
  79. border-left: 2px dashed #4952a6;
  80. box-sizing: border-box;
  81. display: inline-block;
  82. }
  83. .card-title-style-1 {
  84. font-size: 10px;
  85. text-align: center;
  86. }
  87. .card-content-style-1 {
  88. width: 100%;
  89. text-align: right;
  90. font-size: 5px;
  91. }
  92. </style>