matrixBlock.vue 17 KB

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