measurePoint.vue 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. <template>
  2. <div class="content">
  3. <div class="title">
  4. <div class="text">{{ title }}</div>
  5. <!-- <a-radio-group v-model:value="shown" button-style="solid">
  6. <a-radio-button value="default">测点信息</a-radio-button>
  7. <a-radio-button value="chart">预测曲线</a-radio-button>
  8. </a-radio-group> -->
  9. <BaseTab
  10. style="width: 200px"
  11. :tabs="[
  12. { name: '测点信息', id: 'default' },
  13. { name: '预测曲线', id: 'chart' },
  14. ]"
  15. v-model:id="shown"
  16. />
  17. </div>
  18. <div v-if="shown === 'default'" class="content-item">
  19. <div class="card-content" v-for="(item, index) in cards" :key="index">
  20. <div class="item-l">
  21. <div class="label-l">{{ item.label }}</div>
  22. <div class="value-l">{{ `${item.value}%` }}</div>
  23. </div>
  24. <div class="item-r">
  25. <div class="content-r" v-for="(items, ind) in item.listR" :key="ind">
  26. <span>{{ `${items.label} : ` }}</span>
  27. <span
  28. :class="{
  29. 'status-f': items.value == 1,
  30. 'status-l': items.value == 0,
  31. }"
  32. >{{ items.value == 1 ? '异常' : items.value == 0 ? '正常' : items.value }}</span
  33. >
  34. </div>
  35. </div>
  36. </div>
  37. </div>
  38. <div v-if="shown === 'chart'" class="chart-item">
  39. <div v-for="(item, index) in charts" :key="`acmt${index}`">
  40. <EchartLine3 style="height: 270px; width: 350px; margin: 0 5px" />
  41. <div class="text-center">
  42. {{ item.label }}
  43. </div>
  44. </div>
  45. </div>
  46. </div>
  47. </template>
  48. <script setup lang="ts">
  49. import { ref } from 'vue';
  50. import EchartLine3 from './echartLine3.vue';
  51. import BaseTab from '../../../gas/components/tab/baseTab.vue';
  52. defineProps<{
  53. cards: { label: string; value: any; listR: { id: number; label: string; dw: string; value: any }[] }[];
  54. charts: { label: string; data: { x: string; y: number }[] }[];
  55. title: string;
  56. }>();
  57. const shown = ref('default');
  58. </script>
  59. <style lang="less">
  60. @import '/@/design/theme.less';
  61. @{theme-deepblue} {
  62. .content {
  63. --image-bot-area: url('/@/assets/images/themify/deepblue/fire/bot-area.png');
  64. --image-bot-area1: url('/@/assets/images/themify/deepblue/fire/bot-area1.png');
  65. }
  66. }
  67. .content {
  68. --image-bot-area: url('/@/assets/images/fire/bot-area.png');
  69. --image-bot-area1: url('/@/assets/images/fire/bot-area1.png');
  70. height: 100%;
  71. color: var(--vent-font-color);
  72. .title {
  73. height: 30px;
  74. margin-bottom: 10px;
  75. display: flex;
  76. justify-content: space-between;
  77. align-items: center;
  78. .text {
  79. font-family: 'douyuFont';
  80. font-size: 14px;
  81. }
  82. }
  83. .content-item {
  84. display: flex;
  85. justify-content: flex-start;
  86. align-items: flex-start;
  87. flex-wrap: wrap;
  88. height: calc(100% - 50px);
  89. overflow-y: auto;
  90. .card-content {
  91. position: relative;
  92. width: 30%;
  93. height: 128px;
  94. margin: 0px 15px 15px 15px;
  95. background: var(--image-bot-area) no-repeat center;
  96. background-size: 100% 100%;
  97. .item-l {
  98. position: absolute;
  99. left: 32px;
  100. top: 50%;
  101. transform: translate(0, -50%);
  102. width: 89px;
  103. height: 98px;
  104. background: var(--image-bot-area1) no-repeat center;
  105. .label-l {
  106. position: absolute;
  107. left: 50%;
  108. top: 7px;
  109. color: var(--vent-font-color);
  110. font-size: 14px;
  111. transform: translate(-50%, 0);
  112. }
  113. .value-l {
  114. position: absolute;
  115. left: 50%;
  116. top: 50px;
  117. transform: translate(-50%, 0);
  118. font-family: 'douyuFont';
  119. font-size: 14px;
  120. color: var(--vent-table-action-link);
  121. }
  122. }
  123. .item-r {
  124. position: absolute;
  125. left: 132px;
  126. top: 50%;
  127. transform: translate(0, -50%);
  128. height: 128px;
  129. padding: 5px 0px;
  130. display: flex;
  131. flex-direction: column;
  132. justify-content: space-around;
  133. box-sizing: border-box;
  134. .content-r {
  135. display: flex;
  136. span {
  137. font-size: 14px;
  138. color: var(--vent-font-color);
  139. &:first-child {
  140. display: inline-block;
  141. width: 68px;
  142. }
  143. &:last-child {
  144. display: inline-block;
  145. width: calc(100% - 68px);
  146. }
  147. }
  148. .status-f {
  149. color: #ff0000;
  150. }
  151. .status-l {
  152. color: var(--vent-table-action-link);
  153. }
  154. }
  155. }
  156. }
  157. }
  158. .chart-item {
  159. display: flex;
  160. justify-content: flex-start;
  161. align-items: flex-start;
  162. flex-wrap: wrap;
  163. height: calc(100% - 50px);
  164. overflow-y: auto;
  165. }
  166. }
  167. </style>