matrixBlock.vue 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723
  1. <template>
  2. <div style="display: flex; flex-direction: row; flex-wrap: wrap;">
  3. <div :class="item.active?'box-' + item.status:'unbox-' + item.status" v-for="(item, index) in dataList"
  4. :key="index" @click="onSelectHandler(item)" @dblclick="sendMsg(item)" style="margin-right: 15px;">
  5. <div :class="item.active?'left-' + item.status:'unleft-' + item.status">
  6. <div>{{ item.windturbineId.slice(0, 2) }}</div>
  7. <div>{{ item.windturbineId.slice(5) }}</div>
  8. </div>
  9. <div :class="item.active?'right-' + item.status:'unright-' + item.status">
  10. <div class="rightrow">{{ item.windSpeed.toFixed(2) }} m/s</div>
  11. <div class="rightrow">{{ item.power.toFixed(2) }} kw</div>
  12. <div class="rightrow">{{ (item.modelId.indexOf("105") >= 0)?(item.rollSpeed *
  13. 9.55).toFixed(2):item.rollSpeed.toFixed(2) }} rpm</div>
  14. </div>
  15. <div class="locks" v-if="item.lockValue > 0">
  16. <el-popover placement="bottom-start" :width="150" trigger="hover" class="popoverBack"
  17. :show-arrow="false">
  18. <template #reference>
  19. <img class="lock" src="../assets/img/type/lock.png" alt="">
  20. </template>
  21. <input class="lock_input" type="text" placeholder="" :value="item.lockValue ===9 ? item.lockValues:options[item.lockValue]" disabled>
  22. </el-popover>
  23. </div>
  24. <div class="locks" v-if="item.reasonType">
  25. <img class="lock" src="../assets/img/type/electricityRestrictions.png" alt="">
  26. </div>
  27. </div>
  28. </div>
  29. <WindturbineDetailPages v-model="dialogVisible" :showSvg="showSvg" @close="handleClose"
  30. :windturbine="currentWindturbine"></WindturbineDetailPages>
  31. </template>
  32. <script>
  33. import WindturbineDetailPages from "./WindturbineDetailPages.vue";
  34. export default {
  35. components: {
  36. WindturbineDetailPages,
  37. },
  38. props: {
  39. dataList: {
  40. type: Array,
  41. default: () => {
  42. return []
  43. },
  44. },
  45. area: String,
  46. },
  47. mounted() {
  48. },
  49. updated() {
  50. },
  51. methods: {
  52. onSelectHandler(values) {
  53. if (this.area === 'problem') {
  54. this.$emit('problem-click', values);
  55. } else {
  56. this.$emit('choose-click', values);
  57. }
  58. // values.active = !values.active;
  59. },
  60. sendMsg: function (itm) {
  61. // this.dialogVisible = true;
  62. this.$emit('on-click', itm);
  63. // this.currentWindturbine = itm;
  64. },
  65. handleClose() {
  66. this.dialogVisible = false
  67. this.showSvg = false
  68. },
  69. },
  70. data() {
  71. return {
  72. dialogVisible: false,
  73. showSvg: false,
  74. currentWindturbine: {},
  75. options: {
  76. 8: '检修',
  77. 7: '故障维修',
  78. 2: '场内受累检修',
  79. 3: '场内受累故障',
  80. 4: '场外受累电网',
  81. 5: '场外受累天气',
  82. },
  83. };
  84. },
  85. }
  86. </script>
  87. <style scoped>
  88. .lock {
  89. width: 10px;
  90. height: 10px;
  91. position: relative;
  92. right: 6px;
  93. top: -15px;
  94. }
  95. .lock-on {
  96. width: 0px;
  97. height: 0px;
  98. opacity: 0;
  99. }
  100. .locks:hover .lock-on {
  101. position: fixed;
  102. display: flex;
  103. align-items: center;
  104. width: 80px;
  105. height: 30px;
  106. border: 1px solid #999999;
  107. background-color: #999999;
  108. opacity: 1;
  109. color: #ffffff;
  110. z-index: 999;
  111. }
  112. .lock_input {
  113. width: 140px;
  114. background-color: #292929;
  115. height: 40px;
  116. color: #ffffff;
  117. }
  118. .box-0 {
  119. width: 135px;
  120. height: 50px;
  121. color: #ffffff;
  122. border: 1px solid rgba(255, 255, 255, 1);
  123. background-color: rgba(255, 255, 255, .05);
  124. display: flex;
  125. flex-direction: row;
  126. align-items: center;
  127. margin-right: 5px;
  128. margin-top: 10px;
  129. box-shadow: 0px 0px 6px #ffffff;
  130. }
  131. .unbox-0 {
  132. width: 135px;
  133. height: 50px;
  134. color: #ffffff;
  135. border: 1px solid rgba(255, 255, 255, 1);
  136. background-color: rgba(255, 255, 255, .2);
  137. display: flex;
  138. flex-direction: row;
  139. align-items: center;
  140. margin-right: 5px;
  141. margin-top: 10px;
  142. }
  143. .left-0 {
  144. width: 40%;
  145. height: 100%;
  146. font-size: 12px;
  147. color: rgba(255, 255, 255, 1);
  148. font-weight: 600;
  149. line-height: 20px;
  150. display: flex;
  151. flex-direction: column;
  152. justify-content: center;
  153. align-items: center;
  154. }
  155. .unleft-0 {
  156. width: 40%;
  157. height: 100%;
  158. font-size: 12px;
  159. color: rgba(255, 255, 255, 1);
  160. font-weight: 600;
  161. line-height: 20px;
  162. display: flex;
  163. flex-direction: column;
  164. justify-content: center;
  165. align-items: center;
  166. }
  167. .right-0 {
  168. width: 60%;
  169. height: 100%;
  170. font-size: 12px;
  171. color: rgba(255, 255, 255, 1);
  172. line-height: 15px;
  173. display: flex;
  174. flex-direction: column;
  175. justify-content: center;
  176. }
  177. .unright-0 {
  178. width: 60%;
  179. height: 100%;
  180. font-size: 12px;
  181. color: rgba(255, 255, 255, 1);
  182. line-height: 15px;
  183. display: flex;
  184. flex-direction: column;
  185. justify-content: center;
  186. }
  187. .box-1 {
  188. width: 135px;
  189. height: 50px;
  190. color: #ffffff;
  191. border: 1px solid rgba(197, 48, 200, 1);
  192. background-color: rgba(197, 48, 200, .05);
  193. display: flex;
  194. flex-direction: row;
  195. align-items: center;
  196. margin-right: 5px;
  197. margin-top: 10px;
  198. box-shadow: 0px 0px 6px #ef3af2;
  199. }
  200. .unbox-1 {
  201. width: 135px;
  202. height: 50px;
  203. color: #ffffff;
  204. border: 1px solid rgba(197, 48, 200, 1);
  205. background-color: rgba(197, 48, 200, .2);
  206. display: flex;
  207. flex-direction: row;
  208. align-items: center;
  209. margin-right: 5px;
  210. margin-top: 10px;
  211. }
  212. .left-1 {
  213. width: 40%;
  214. height: 100%;
  215. font-size: 12px;
  216. color: rgba(197, 48, 200, 1);
  217. font-weight: 600;
  218. line-height: 20px;
  219. display: flex;
  220. flex-direction: column;
  221. justify-content: center;
  222. align-items: center;
  223. }
  224. .unleft-1 {
  225. width: 40%;
  226. height: 100%;
  227. font-size: 12px;
  228. color: rgba(197, 48, 200, 1);
  229. font-weight: 600;
  230. line-height: 20px;
  231. display: flex;
  232. flex-direction: column;
  233. justify-content: center;
  234. align-items: center;
  235. }
  236. .right-1 {
  237. width: 60%;
  238. height: 100%;
  239. font-size: 12px;
  240. color: rgba(197, 48, 200, 1);
  241. line-height: 15px;
  242. display: flex;
  243. flex-direction: column;
  244. justify-content: center;
  245. }
  246. .unright-1 {
  247. width: 60%;
  248. height: 100%;
  249. font-size: 12px;
  250. color: rgba(197, 48, 200, 1);
  251. line-height: 15px;
  252. display: flex;
  253. flex-direction: column;
  254. justify-content: center;
  255. }
  256. .box-2 {
  257. width: 135px;
  258. height: 50px;
  259. color: #ffffff;
  260. border: 1px solid rgba(05, 187, 76, 1);
  261. background-color: rgba(05, 187, 76, .05);
  262. display: flex;
  263. flex-direction: row;
  264. align-items: center;
  265. margin-right: 5px;
  266. margin-top: 10px;
  267. box-shadow: 0px 0px 6px #09e45e;
  268. }
  269. .unbox-2 {
  270. width: 135px;
  271. height: 50px;
  272. color: #ffffff;
  273. border: 1px solid rgba(05, 187, 76, 1);
  274. background-color: rgba(05, 187, 76, .2);
  275. display: flex;
  276. flex-direction: row;
  277. align-items: center;
  278. margin-right: 5px;
  279. margin-top: 10px;
  280. }
  281. .left-2 {
  282. width: 40%;
  283. height: 100%;
  284. font-size: 12px;
  285. color: rgba(05, 187, 76, 1);
  286. font-weight: 600;
  287. line-height: 20px;
  288. display: flex;
  289. flex-direction: column;
  290. justify-content: center;
  291. align-items: center;
  292. }
  293. .unleft-2 {
  294. width: 40%;
  295. height: 100%;
  296. font-size: 12px;
  297. color: rgba(05, 187, 76, 1);
  298. font-weight: 600;
  299. line-height: 20px;
  300. display: flex;
  301. flex-direction: column;
  302. justify-content: center;
  303. align-items: center;
  304. }
  305. .right-2 {
  306. width: 60%;
  307. height: 100%;
  308. font-size: 12px;
  309. color: rgba(05, 187, 76, 1);
  310. line-height: 15px;
  311. display: flex;
  312. flex-direction: column;
  313. justify-content: center;
  314. }
  315. .unright-2 {
  316. width: 60%;
  317. height: 100%;
  318. font-size: 12px;
  319. color: rgba(05, 187, 76, 1);
  320. line-height: 15px;
  321. display: flex;
  322. flex-direction: column;
  323. justify-content: center;
  324. }
  325. .box-3 {
  326. width: 135px;
  327. height: 50px;
  328. color: #ffffff;
  329. border: 1px solid rgba(05, 187, 76, 1);
  330. background-color: rgba(05, 187, 76, .05);
  331. display: flex;
  332. flex-direction: row;
  333. align-items: center;
  334. margin-right: 5px;
  335. margin-top: 10px;
  336. box-shadow: 0px 0px 6px #09e45e;
  337. }
  338. .unbox-3 {
  339. width: 135px;
  340. height: 50px;
  341. color: #ffffff;
  342. border: 1px solid rgba(05, 187, 76, 1);
  343. background-color: rgba(05, 187, 76, .2);
  344. display: flex;
  345. flex-direction: row;
  346. align-items: center;
  347. margin-right: 5px;
  348. margin-top: 10px;
  349. }
  350. .left-3 {
  351. width: 40%;
  352. height: 100%;
  353. font-size: 12px;
  354. color: rgba(05, 187, 76, 1);
  355. font-weight: 600;
  356. line-height: 20px;
  357. display: flex;
  358. flex-direction: column;
  359. justify-content: center;
  360. align-items: center;
  361. }
  362. .unleft-3 {
  363. width: 40%;
  364. height: 100%;
  365. font-size: 12px;
  366. color: rgba(05, 187, 76, 1);
  367. font-weight: 600;
  368. line-height: 20px;
  369. display: flex;
  370. flex-direction: column;
  371. justify-content: center;
  372. align-items: center;
  373. }
  374. .right-3 {
  375. width: 60%;
  376. height: 100%;
  377. font-size: 12px;
  378. color: rgba(05, 187, 76, 1);
  379. line-height: 15px;
  380. display: flex;
  381. flex-direction: column;
  382. justify-content: center;
  383. }
  384. .unright-3 {
  385. width: 60%;
  386. height: 100%;
  387. font-size: 12px;
  388. color: rgba(05, 187, 76, 1);
  389. line-height: 15px;
  390. display: flex;
  391. flex-direction: column;
  392. justify-content: center;
  393. }
  394. .box-4 {
  395. width: 135px;
  396. height: 50px;
  397. color: #ffffff;
  398. border: 1px solid rgba(75, 85, 174, 1);
  399. background-color: rgba(75, 85, 174, .05);
  400. display: flex;
  401. flex-direction: row;
  402. align-items: center;
  403. margin-right: 5px;
  404. margin-top: 10px;
  405. box-shadow: 0px 0px 6px #6876f2;
  406. }
  407. .unbox-4 {
  408. width: 135px;
  409. height: 50px;
  410. color: #ffffff;
  411. border: 1px solid rgba(75, 85, 174, 1);
  412. background-color: rgba(75, 85, 174, .2);
  413. display: flex;
  414. flex-direction: row;
  415. align-items: center;
  416. margin-right: 5px;
  417. margin-top: 10px;
  418. }
  419. .left-4 {
  420. width: 40%;
  421. height: 100%;
  422. font-size: 12px;
  423. color: rgba(75, 85, 174, 1);
  424. font-weight: 600;
  425. line-height: 20px;
  426. display: flex;
  427. flex-direction: column;
  428. justify-content: center;
  429. align-items: center;
  430. }
  431. .unleft-4 {
  432. width: 40%;
  433. height: 100%;
  434. font-size: 12px;
  435. color: rgba(75, 85, 174, 1);
  436. font-weight: 600;
  437. line-height: 20px;
  438. display: flex;
  439. flex-direction: column;
  440. justify-content: center;
  441. align-items: center;
  442. }
  443. .right-4 {
  444. width: 60%;
  445. height: 100%;
  446. font-size: 12px;
  447. color: rgba(75, 85, 174, 1);
  448. line-height: 15px;
  449. display: flex;
  450. flex-direction: column;
  451. justify-content: center;
  452. }
  453. .unright-4 {
  454. width: 60%;
  455. height: 100%;
  456. font-size: 12px;
  457. color: rgba(75, 85, 174, 1);
  458. line-height: 15px;
  459. display: flex;
  460. flex-direction: column;
  461. justify-content: center;
  462. }
  463. .box-5 {
  464. width: 133px;
  465. height: 48px;
  466. color: #ffffff;
  467. border: 2px solid rgba(186, 50, 55, 1);
  468. background-color: rgba(186, 50, 55, .05);
  469. display: flex;
  470. flex-direction: row;
  471. align-items: center;
  472. margin-right: 5px;
  473. margin-top: 10px;
  474. box-shadow: 0px 0px 6px #ff1313;
  475. }
  476. .unbox-5 {
  477. width: 135px;
  478. height: 50px;
  479. color: #ffffff;
  480. border: 1px solid rgba(186, 50, 55, 1);
  481. background-color: rgba(186, 50, 55, .2);
  482. display: flex;
  483. flex-direction: row;
  484. align-items: center;
  485. margin-right: 5px;
  486. margin-top: 10px;
  487. }
  488. .left-5 {
  489. width: 40%;
  490. height: 100%;
  491. font-size: 12px;
  492. color: rgba(186, 50, 55, 1);
  493. font-weight: 600;
  494. line-height: 20px;
  495. display: flex;
  496. flex-direction: column;
  497. justify-content: center;
  498. align-items: center;
  499. }
  500. .unleft-5 {
  501. width: 40%;
  502. height: 100%;
  503. font-size: 12px;
  504. color: rgba(186, 50, 55, 1);
  505. font-weight: 600;
  506. line-height: 20px;
  507. display: flex;
  508. flex-direction: column;
  509. justify-content: center;
  510. align-items: center;
  511. }
  512. .right-5 {
  513. width: 60%;
  514. height: 100%;
  515. font-size: 12px;
  516. color: rgba(186, 50, 55, 1);
  517. line-height: 15px;
  518. display: flex;
  519. flex-direction: column;
  520. justify-content: center;
  521. }
  522. .unright-5 {
  523. width: 60%;
  524. height: 100%;
  525. font-size: 12px;
  526. color: rgba(186, 50, 55, 1);
  527. line-height: 15px;
  528. display: flex;
  529. flex-direction: column;
  530. justify-content: center;
  531. }
  532. .box-6 {
  533. width: 135px;
  534. height: 50px;
  535. color: #ffffff;
  536. border: 1px solid rgba(225, 125, 36, 1);
  537. background-color: rgba(225, 125, 36, .05);
  538. display: flex;
  539. flex-direction: row;
  540. align-items: center;
  541. margin-right: 5px;
  542. margin-top: 10px;
  543. box-shadow: 0px 0px 6px #f28627;
  544. }
  545. .unbox-6 {
  546. width: 135px;
  547. height: 50px;
  548. color: #ffffff;
  549. border: 1px solid rgba(225, 125, 36, 1);
  550. background-color: rgba(225, 125, 36, .2);
  551. display: flex;
  552. flex-direction: row;
  553. align-items: center;
  554. margin-right: 5px;
  555. margin-top: 10px;
  556. }
  557. .left-6 {
  558. width: 40%;
  559. height: 100%;
  560. font-size: 12px;
  561. color: rgba(225, 125, 36, 1);
  562. font-weight: 600;
  563. line-height: 20px;
  564. display: flex;
  565. flex-direction: column;
  566. justify-content: center;
  567. align-items: center;
  568. }
  569. .unleft-6 {
  570. width: 40%;
  571. height: 100%;
  572. font-size: 12px;
  573. color: rgba(225, 125, 36, 1);
  574. font-weight: 600;
  575. line-height: 20px;
  576. display: flex;
  577. flex-direction: column;
  578. justify-content: center;
  579. align-items: center;
  580. }
  581. .right-6 {
  582. width: 60%;
  583. height: 100%;
  584. font-size: 12px;
  585. color: rgba(225, 125, 36, 1);
  586. line-height: 15px;
  587. display: flex;
  588. flex-direction: column;
  589. justify-content: center;
  590. }
  591. .unright-6 {
  592. width: 60%;
  593. height: 100%;
  594. font-size: 12px;
  595. color: rgba(225, 125, 36, 1);
  596. line-height: 15px;
  597. display: flex;
  598. flex-direction: column;
  599. justify-content: center;
  600. }
  601. .box-7 {
  602. width: 135px;
  603. height: 50px;
  604. color: #ffffff;
  605. border: 1px solid rgba(96, 103, 105, 1);
  606. background-color: rgba(96, 103, 105, .05);
  607. display: flex;
  608. flex-direction: row;
  609. align-items: center;
  610. margin-right: 5px;
  611. margin-top: 10px;
  612. box-shadow: 0px 0px 6px #ffffff;
  613. }
  614. .unbox-7 {
  615. width: 135px;
  616. height: 50px;
  617. color: #ffffff;
  618. border: 1px solid rgba(96, 103, 105, 1);
  619. background-color: rgba(96, 103, 105, .2);
  620. display: flex;
  621. flex-direction: row;
  622. align-items: center;
  623. margin-right: 5px;
  624. margin-top: 10px;
  625. }
  626. .left-7 {
  627. width: 40%;
  628. height: 100%;
  629. font-size: 12px;
  630. color: rgba(96, 103, 105, 1);
  631. font-weight: 600;
  632. line-height: 20px;
  633. display: flex;
  634. flex-direction: column;
  635. justify-content: center;
  636. align-items: center;
  637. }
  638. .unleft-7 {
  639. width: 40%;
  640. height: 100%;
  641. font-size: 12px;
  642. color: rgba(96, 103, 105, 1);
  643. font-weight: 600;
  644. line-height: 20px;
  645. display: flex;
  646. flex-direction: column;
  647. justify-content: center;
  648. align-items: center;
  649. }
  650. .right-7 {
  651. width: 60%;
  652. height: 100%;
  653. font-size: 12px;
  654. color: rgba(96, 103, 105, 1);
  655. line-height: 15px;
  656. display: flex;
  657. flex-direction: column;
  658. justify-content: center;
  659. }
  660. .unright-7 {
  661. width: 60%;
  662. height: 100%;
  663. font-size: 12px;
  664. color: rgba(96, 103, 105, 1);
  665. line-height: 15px;
  666. display: flex;
  667. flex-direction: column;
  668. justify-content: center;
  669. }
  670. </style>