dataBoard.vue 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295
  1. <template>
  2. <div class="main">
  3. <div class="header">
  4. <div class="select-veido">
  5. <el-select
  6. style="margin-top: 10px"
  7. v-model="currentComId"
  8. placeholder="请选择"
  9. @change="selectChart"
  10. :popper-append-to-body="false"
  11. >
  12. <el-option
  13. v-for="item in pumpOptions"
  14. :key="item.id"
  15. :label="item.label"
  16. :value="item.id"
  17. >
  18. </el-option>
  19. </el-select>
  20. </div>
  21. </div>
  22. <div class="top">
  23. <el-row :gutter="10">
  24. <el-col :span="8">
  25. <div class="top_left">
  26. <!-- 电机电压 -->
  27. <oneline
  28. ref="voltage"
  29. :id="92"
  30. title="电机电压"
  31. unit="V"
  32. type="dianya_after"
  33. ></oneline>
  34. </div>
  35. </el-col>
  36. <el-col :span="8">
  37. <div class="top_center">
  38. <!-- 电机电流 -->
  39. <oneline
  40. ref="current"
  41. :id="92"
  42. title="电机电流"
  43. unit="A"
  44. type="dianliu_after"
  45. ></oneline>
  46. </div>
  47. </el-col>
  48. <el-col :span="8">
  49. <div class="top_right">
  50. <!-- 电机前后轴温 -->
  51. <twoline
  52. ref="bearing"
  53. :id="92"
  54. title="电机前后轴温"
  55. unit="°C"
  56. :type="bearingType"
  57. :legend="bearingLegand"
  58. ></twoline>
  59. </div>
  60. </el-col>
  61. </el-row>
  62. </div>
  63. <div class="center">
  64. <el-row :gutter="10">
  65. <el-col :span="8">
  66. <div class="center_left">
  67. <!-- 电机振动 -->
  68. <oneline
  69. ref="virbrate"
  70. :id="92"
  71. title="电机振动"
  72. unit="mm/s"
  73. type="zhendong_after"
  74. ></oneline>
  75. </div>
  76. </el-col>
  77. <el-col :span="8">
  78. <div class="center_center">
  79. <!-- 水泵出口管道压力 -->
  80. <twoline
  81. ref="pressure"
  82. :id="93"
  83. title="水泵出口管道压力"
  84. unit="Mpa"
  85. :type="pressureType"
  86. :legend="pressureLegand"
  87. ></twoline>
  88. </div>
  89. </el-col>
  90. <el-col :span="8">
  91. <div class="center_right">
  92. <!-- 水仓水位 -->
  93. <oneline
  94. ref="water_level"
  95. :id="94"
  96. title="水仓水位"
  97. unit="m"
  98. type="shuiwei_after"
  99. ></oneline>
  100. </div>
  101. </el-col>
  102. </el-row>
  103. </div>
  104. <div class="bottom">
  105. <el-row :gutter="130">
  106. <el-col :span="12">
  107. <div class="bottom_left">
  108. <!-- 故障记录 -->
  109. <fault-alarm></fault-alarm>
  110. </div>
  111. </el-col>
  112. <el-col :span="12">
  113. <div class="bottom_right">
  114. <!-- 启停记录 -->
  115. <running-msg></running-msg>
  116. </div>
  117. </el-col>
  118. </el-row>
  119. </div>
  120. </div>
  121. </template>
  122. <script>
  123. import oneline from "@/common/oneline";
  124. import twoline from "@/common/twoline";
  125. import threeline from "@/common/threeline";
  126. import faultAlarm from "./faultAlarm";
  127. import runningMsg from "./runningMsg";
  128. export default {
  129. data() {
  130. return {
  131. currentComId: this.title,
  132. pumpOptions: [
  133. {
  134. id: "1",
  135. label: "1号水泵",
  136. },
  137. {
  138. id: "2",
  139. label: "2号水泵",
  140. },
  141. {
  142. id: "3",
  143. label: "3号水泵",
  144. },
  145. ],
  146. pressureType: ["zhengya_after", "fuya_after"],
  147. pressureLegand: ["正压", "负压"],
  148. bearingType: ["qianzhouwen_after", "houzhouwen_after"],
  149. bearingLegand: ["电机前轴温", "电机后轴温"],
  150. };
  151. },
  152. props: ["title"],
  153. methods: {
  154. selectChart(val) {
  155. this.$bus.$emit("changeDrainId", String(val));
  156. let chartRefs = [
  157. "voltage",
  158. "current",
  159. "bearing",
  160. "virbrate",
  161. "pressure",
  162. "water_level",
  163. ];
  164. for (let i = 0; i < chartRefs.length; i++) {
  165. this.$refs[chartRefs[i]].clearData();
  166. this.$refs[chartRefs[i]].idChange(val);
  167. }
  168. // this.$refs.faultAlarm.idChange(val);
  169. // this.$refs.runningMsg.idChange(val);
  170. },
  171. },
  172. components: {
  173. oneline,
  174. twoline,
  175. threeline,
  176. faultAlarm,
  177. runningMsg,
  178. },
  179. };
  180. </script>
  181. <style scoped>
  182. .select-veido .el-select {
  183. width: 140px;
  184. margin-left: 10px;
  185. }
  186. .select-veido >>> .el-input--small .el-input__inner {
  187. background: none;
  188. color: #4adefe;
  189. font-size: 20px;
  190. }
  191. .select-veido >>> .el-input__inner {
  192. border: 0;
  193. }
  194. .select-veido >>> .el-scrollbar {
  195. background: rgba(255, 255, 255, 1);
  196. border: 0;
  197. }
  198. .main {
  199. width: 100%;
  200. height: 900px;
  201. position: relative;
  202. background: linear-gradient(to bottom, #323232 0%, #3f3f3f 40%, #1c1c1c 150%),
  203. linear-gradient(
  204. to top,
  205. rgba(255, 255, 255, 0.4) 0%,
  206. rgba(0, 0, 0, 0.25) 200%
  207. );
  208. /* 正片叠底模式。 */
  209. background-blend-mode: multiply;
  210. /* background-color: antiquewhite; */
  211. }
  212. .header {
  213. margin: 0 auto;
  214. position: relative;
  215. width: 100%;
  216. height: 10%;
  217. max-width: 1920px;
  218. background: url("../../../assets/img/gas/header.png") center no-repeat;
  219. box-sizing: border-box;
  220. }
  221. .select-veido {
  222. margin: 0;
  223. padding: 0;
  224. line-height: 50px;
  225. text-align: center;
  226. font-size: 22px;
  227. color: #ffffff;
  228. }
  229. .top {
  230. height: 30%;
  231. }
  232. .top_left {
  233. background: url(../../../assets/img/tunneling/dataBg.png) no-repeat;
  234. background-size: 100%;
  235. height: 210px;
  236. }
  237. .top_center {
  238. background: url(../../../assets/img/tunneling/dataBg.png) no-repeat;
  239. background-size: 100%;
  240. height: 210px;
  241. }
  242. .top_right {
  243. background: url(../../../assets/img/tunneling/dataBg.png) no-repeat;
  244. background-size: 100%;
  245. height: 210px;
  246. }
  247. .center {
  248. height: 30%;
  249. }
  250. .center_left {
  251. width: 100%;
  252. height: 210px;
  253. background: url(../../../assets/img/tunneling/dataBg.png) no-repeat;
  254. background-size: 100%;
  255. }
  256. .center_center {
  257. width: 100%;
  258. height: 210px;
  259. background: url(../../../assets/img/tunneling/dataBg.png) no-repeat;
  260. background-size: 100%;
  261. }
  262. .center_right {
  263. width: 100%;
  264. height: 210px;
  265. background: url(../../../assets/img/tunneling/dataBg.png) no-repeat;
  266. background-size: 100%;
  267. }
  268. .bottom {
  269. /* height: 30%; */
  270. /* display: inline; */
  271. /* height: 400px; */
  272. margin-top: -60px;
  273. display: flex;
  274. justify-content: space-around;
  275. }
  276. .bottom_left {
  277. width: 500px;
  278. height: 210px;
  279. background: url(../../../assets/img/tunneling/dataBg.png) no-repeat;
  280. background-size: 100%;
  281. }
  282. .bottom_right {
  283. width: 500px;
  284. height: 210px;
  285. background: url(../../../assets/img/tunneling/dataBg.png) no-repeat;
  286. background-size: 100%;
  287. }
  288. </style>