dialog-modal.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597
  1. <template>
  2. <div class="dialogModal" id="detailModal">
  3. <div class="modal-top">
  4. <i>
  5. <SvgIcon class="icon" size="14" name="inner-kd" />
  6. </i>
  7. <span class="modal-title"> {{ modalTitle }}</span>
  8. <span class="close" @click="getClose">✕</span>
  9. </div>
  10. <div class="modal-card">
  11. <div class="card-box" v-for="(item, index) in modalCard" :key="index">
  12. <div class="card-pic">
  13. <img :src="item.imgSrc" alt="" />
  14. </div>
  15. <div class="card-content">
  16. <div class="content-label">{{ item.label }}</div>
  17. <div class="content-value">{{ item.value }}</div>
  18. </div>
  19. </div>
  20. </div>
  21. <div class="modal-card1">
  22. <div class="left-modal">
  23. <div class="value-m">{{ valueM }}</div>
  24. <div class="label-m">{{ labelM }}</div>
  25. </div>
  26. <div class="right-modal">
  27. <div class="modal-zl" v-for="(item, index) in zlList" :key="index">
  28. <div class="left-zl">
  29. <div class="label-left">
  30. <span class="pic"></span>
  31. <span>{{ item.label }}</span>
  32. </div>
  33. <div class="value-left">
  34. <span class="text">{{ item.value }}</span>
  35. <span>Pa</span>
  36. </div>
  37. </div>
  38. <div class="right-zl">
  39. <span class="text"> {{ item.percent }}</span>
  40. <span>%</span>
  41. </div>
  42. </div>
  43. </div>
  44. </div>
  45. <div class="modal-card2">
  46. <div class="modal-wind" v-for="(item, index) in windLfList" :key="index">
  47. <span class="text">{{ item.label }}</span>
  48. <span class="num">{{ item.value }}</span>
  49. <span class="dw">%</span>
  50. </div>
  51. </div>
  52. <div class="modal-card3">
  53. <div class="warn-left">
  54. <div class="vent-l">
  55. <span class="warn-label">{{ vent.value }}</span>
  56. <span class="warn-value">{{ vent.label }}</span>
  57. </div>
  58. <div class="gas-l">
  59. <span class="warn-label">{{ gas.value }}</span>
  60. <span class="warn-value">{{ gas.label }}</span>
  61. </div>
  62. </div>
  63. <div class="warn-c">
  64. <div class="warn-icon"></div>
  65. </div>
  66. <div class="warn-right">
  67. <div class="fire-r">
  68. <span class="warn-value">{{ fire.label }}</span>
  69. <span class="warn-label">{{ fire.value }}</span>
  70. </div>
  71. <!-- <div class="dust-r">
  72. <span class="warn-value">{{ dust.label }}</span>
  73. <span class="warn-label">{{ dust.value }}</span>
  74. </div> -->
  75. </div>
  76. </div>
  77. </div>
  78. </template>
  79. <script lang="ts" setup>
  80. import { ref, reactive, defineProps, watch } from 'vue';
  81. import { SvgIcon } from '/@/components/Icon';
  82. import { getAssetURL } from '/@/utils/ui';
  83. let props = defineProps({
  84. centerDetail: {
  85. type: Object,
  86. default: () => {
  87. return {};
  88. },
  89. },
  90. });
  91. // let modalTitle = ref('榆家梁矿');
  92. let modalTitle = ref('yjl');
  93. let modalCard = reactive([
  94. { imgSrc: getAssetURL('company/home/hang.png'), label: '巷道长度', value: 0 },
  95. { imgSrc: getAssetURL('company/home/people.png'), label: '人员总数', value: 0 },
  96. { imgSrc: getAssetURL('company/home/car.png'), label: '车辆总数', value: 0 },
  97. ]);
  98. let valueM = ref(0);
  99. let labelM = ref('');
  100. let zlList = reactive([
  101. { label: '关键阻力——进风', value: 0, percent: 0 },
  102. { label: '关键阻力——用风', value: 0, percent: 0 },
  103. { label: '关键阻力——回风', value: 0, percent: 0 },
  104. ]);
  105. let windLfList = reactive([
  106. { label: '有效风量率', value: 0 },
  107. { label: '矿井漏风率', value: 0 },
  108. ]);
  109. // let vent = reactive({
  110. // label: '通风风险性',
  111. // value: '低风险',
  112. // });
  113. // let gas = reactive({
  114. // label: '瓦斯风险性',
  115. // value: '低风险',
  116. // });
  117. // let fire = reactive({
  118. // label: '火灾风险性',
  119. // value: '低风险',
  120. // });
  121. // let dust = reactive({
  122. // label: '粉尘风险性',
  123. // value: '低风险',
  124. // });
  125. let vent = reactive({
  126. label: '总进风',
  127. value: 0,
  128. });
  129. let gas = reactive({
  130. label: '总风量',
  131. value: 0,
  132. });
  133. let fire = reactive({
  134. label: '等积孔',
  135. value: 0,
  136. });
  137. // let dust = reactive({
  138. // label: '粉尘风险性',
  139. // value: '低风险',
  140. // });
  141. const emit = defineEmits(['closeDialog']);
  142. function getClose() {
  143. emit('closeDialog', false);
  144. }
  145. watch(
  146. () => props.centerDetail,
  147. (newC, oldC) => {
  148. console.log(newC, '地图区域详情数据-------');
  149. if (JSON.stringify(newC) != '{}') {
  150. modalCard[0]['value'] = newC.sys_data.totallength;
  151. modalCard[1]['value'] = 0;
  152. modalCard[2]['value'] = 0;
  153. labelM.value = newC.majorpath_data[0].deviceName;
  154. valueM.value = newC.majorpath_data[0].majorpath.drag_total;
  155. zlList[0]['value'] = newC.majorpath_data[0].majorpath.drag_1;
  156. zlList[1]['value'] = newC.majorpath_data[0].majorpath.drag_2;
  157. zlList[2]['value'] = newC.majorpath_data[0].majorpath.drag_3;
  158. zlList[0]['percent'] = ((zlList[0]['value'] / valueM.value) * 100).toFixed(2);
  159. zlList[1]['percent'] = ((zlList[1]['value'] / valueM.value) * 100).toFixed(2);
  160. zlList[2]['percent'] = ((zlList[2]['value'] / valueM.value) * 100).toFixed(2);
  161. windLfList[0].value = ((newC.sys_data.xufengliang / parseFloat(newC.sys_data.zongfengliang)) * 100).toFixed(2);
  162. windLfList[1].value = (
  163. ((parseFloat(newC.sys_data.zongfengliang) - parseFloat(newC.sys_data.zonghuifeng)) / parseFloat(newC.sys_data.zonghuifeng)) *
  164. 100
  165. ).toFixed(2);
  166. vent.value = newC.majorpath_data[0].majorpath.drag_total;
  167. gas.value = newC.majorpath_data[0].majorpath.m3_total;
  168. fire.value = Math.round(((1.19 * gas.value) / 60 / Math.sqrt(vent.value)) * 100) / 100;
  169. }
  170. },
  171. {
  172. immediate: true,
  173. deep: true,
  174. }
  175. );
  176. </script>
  177. <style lang="less" scoped>
  178. @font-face {
  179. font-family: 'douyuFont';
  180. src: url('/@/assets/font/douyuFont.otf');
  181. }
  182. .dialogModal {
  183. position: relative;
  184. width: 568px;
  185. height: 437px;
  186. background: url('/@/assets/images/company/area-card2.png') no-repeat;
  187. background-size: 100% 100%;
  188. pointer-events: none;
  189. z-index: 999999;
  190. .modal-top {
  191. position: absolute;
  192. left: 32px;
  193. top: 15px;
  194. height: 30px;
  195. line-height: 30px;
  196. width: 90%;
  197. .modal-title {
  198. font-size: 14px;
  199. font-family: 'douyuFont';
  200. color: #fff;
  201. margin-left: 10px;
  202. }
  203. .close {
  204. position: absolute;
  205. right: 12px;
  206. color: #2cb6ff;
  207. cursor: pointer;
  208. pointer-events: auto;
  209. }
  210. }
  211. .modal-card {
  212. position: absolute;
  213. top: 45px;
  214. left: 50%;
  215. transform: translate(-50%, 0);
  216. height: 46px;
  217. width: 90%;
  218. margin-top: 15px;
  219. display: flex;
  220. justify-content: space-between;
  221. background: url('../../../../../assets/images/company/modal-card.png') no-repeat center;
  222. background-size: 100% 100%;
  223. .card-box {
  224. display: flex;
  225. flex: 1;
  226. height: 100%;
  227. justify-content: center;
  228. align-items: center;
  229. &:first-child {
  230. margin-left: 15px;
  231. }
  232. &:last-child {
  233. margin-right: 10px;
  234. }
  235. .card-pic {
  236. margin-right: 10px;
  237. }
  238. .card-content {
  239. display: flex;
  240. flex-direction: column;
  241. justify-content: space-between;
  242. .content-label {
  243. font-size: 10px;
  244. color: #ccd6df;
  245. }
  246. .content-value {
  247. font-family: 'douyuFont';
  248. font-size: 14px;
  249. color: #fff;
  250. }
  251. }
  252. }
  253. }
  254. .modal-card1 {
  255. position: absolute;
  256. top: 121px;
  257. left: 50%;
  258. transform: translate(-50%, 0);
  259. height: 110px;
  260. width: 90%;
  261. padding: 0px 10px;
  262. box-sizing: border-box;
  263. display: flex;
  264. justify-content: space-between;
  265. align-items: center;
  266. background: url('../../../../../assets/images/company/area3.png') no-repeat center;
  267. background-size: 100% 100%;
  268. .left-modal {
  269. position: relative;
  270. width: 95px;
  271. height: 95px;
  272. background: url('../../../../../assets/images/company/zfx.png') no-repeat center;
  273. background-size: 100% 100%;
  274. .value-m {
  275. position: absolute;
  276. top: 50%;
  277. left: 50%;
  278. transform: translate(-50%, -50%);
  279. font-family: 'douyuFont';
  280. font-size: 14px;
  281. color: #3df6ff;
  282. }
  283. .label-m {
  284. position: absolute;
  285. bottom: 2px;
  286. width: 100%;
  287. font-size: 10px;
  288. text-align: center;
  289. color: #fff;
  290. }
  291. }
  292. .right-modal {
  293. width: calc(100% - 105px);
  294. height: 95px;
  295. margin-left: 10px;
  296. display: flex;
  297. flex-direction: column;
  298. justify-content: space-around;
  299. .modal-zl {
  300. height: 24px;
  301. display: flex;
  302. justify-content: space-between;
  303. .left-zl {
  304. display: flex;
  305. justify-content: space-between;
  306. align-items: center;
  307. width: calc(80% - 10px);
  308. padding: 0px 10px;
  309. margin-right: 10px;
  310. box-sizing: border-box;
  311. background-color: rgba(6, 57, 97, 0.3);
  312. .label-left {
  313. .pic {
  314. display: inline-block;
  315. width: 6px;
  316. height: 6px;
  317. border-radius: 50%;
  318. margin-right: 5px;
  319. }
  320. span {
  321. color: #ccd6df;
  322. font-size: 14px;
  323. }
  324. }
  325. .value-left {
  326. .text {
  327. font-family: 'douyuFont';
  328. font-size: 14px;
  329. margin-right: 5px;
  330. }
  331. span {
  332. font-size: 12px;
  333. color: #ccd6df;
  334. }
  335. }
  336. }
  337. &:nth-child(1) .left-zl .pic {
  338. background-color: #51cfff;
  339. }
  340. &:nth-child(2) .left-zl .pic {
  341. background-color: #ffb85b;
  342. }
  343. &:nth-child(3) .left-zl .pic {
  344. background-color: #a091ff;
  345. }
  346. &:nth-child(1) .left-zl .text {
  347. color: #51cfff;
  348. }
  349. &:nth-child(2) .left-zl .text {
  350. color: #ffb85b;
  351. }
  352. &:nth-child(3) .left-zl .text {
  353. color: #a091ff;
  354. }
  355. .right-zl {
  356. width: 20%;
  357. display: flex;
  358. justify-content: center;
  359. align-items: center;
  360. background-color: rgba(6, 57, 97, 0.3);
  361. .text {
  362. font-family: 'douyuFont';
  363. font-size: 14px;
  364. }
  365. span {
  366. margin-left: 5px;
  367. }
  368. }
  369. &:nth-child(1) .right-zl {
  370. color: #51cfff;
  371. }
  372. &:nth-child(2) .right-zl {
  373. color: #ffb85b;
  374. }
  375. &:nth-child(3) .right-zl {
  376. color: #a091ff;
  377. }
  378. }
  379. }
  380. }
  381. .modal-card2 {
  382. position: absolute;
  383. top: 231px;
  384. left: 50%;
  385. transform: translate(-50%, 0);
  386. height: 50px;
  387. width: 90%;
  388. margin: 10px 0px;
  389. padding: 0px 10px;
  390. display: flex;
  391. justify-content: space-between;
  392. align-items: center;
  393. box-sizing: border-box;
  394. background: url('../../../../../assets/images/company/area3.png') no-repeat center;
  395. background-size: 100% 100%;
  396. .modal-wind {
  397. position: relative;
  398. width: 50%;
  399. height: 34px;
  400. .text {
  401. position: absolute;
  402. top: 50%;
  403. left: 40px;
  404. transform: translate(0, -50%);
  405. color: #fff;
  406. font-size: 14px;
  407. }
  408. .num {
  409. position: absolute;
  410. top: 50%;
  411. right: 45px;
  412. transform: translate(0, -50%);
  413. color: #fff;
  414. font-family: 'douyuFont';
  415. font-size: 14px;
  416. }
  417. .dw {
  418. position: absolute;
  419. top: 50%;
  420. right: 12px;
  421. transform: translate(0, -50%);
  422. color: #fff;
  423. }
  424. &:nth-child(1) {
  425. background: url('../../../../../assets/images/company/green.png') no-repeat center;
  426. background-size: 100% 100%;
  427. }
  428. &:nth-child(2) {
  429. background: url('../../../../../assets/images/company/purple.png') no-repeat center;
  430. background-size: 100% 100%;
  431. }
  432. &:nth-child(1) .num {
  433. color: #31fbcc;
  434. }
  435. &:nth-child(2) .num {
  436. color: #97a3fa;
  437. }
  438. }
  439. }
  440. .modal-card3 {
  441. position: absolute;
  442. top: 302px;
  443. left: 50%;
  444. transform: translate(-50%, 0);
  445. height: 110px;
  446. width: 90%;
  447. padding: 0px 10px;
  448. box-sizing: border-box;
  449. display: flex;
  450. justify-content: space-between;
  451. align-items: center;
  452. background: url('../../../../../assets/images/company/area3.png') no-repeat center;
  453. background-size: 100% 100%;
  454. .warn-left {
  455. position: relative;
  456. width: 206px;
  457. height: 85px;
  458. background: url('../../../../../assets/images/company/warn-left.png') no-repeat center;
  459. .vent-l {
  460. position: absolute;
  461. top: 10px;
  462. left: 0;
  463. width: 80%;
  464. display: flex;
  465. justify-content: space-around;
  466. }
  467. .gas-l {
  468. position: absolute;
  469. top: 52px;
  470. left: 0;
  471. width: 80%;
  472. display: flex;
  473. justify-content: space-around;
  474. }
  475. }
  476. .warn-c {
  477. position: relative;
  478. width: 90px;
  479. height: 92px;
  480. background: url('../../../../../assets/images/company/warn-center.png') no-repeat center;
  481. .warn-icon {
  482. position: absolute;
  483. left: 50%;
  484. top: 50%;
  485. transform: translate(-50%, -85%);
  486. width: 50px;
  487. height: 50px;
  488. background: url('../../../../../assets/images/company/icon1.png') no-repeat center;
  489. }
  490. }
  491. .warn-right {
  492. position: relative;
  493. width: 206px;
  494. height: 85px;
  495. background: url('../../../../../assets/images/company/warn-right.png') no-repeat center;
  496. .fire-r {
  497. position: absolute;
  498. top: 10px;
  499. right: 0;
  500. width: 80%;
  501. display: flex;
  502. justify-content: space-around;
  503. }
  504. .dust-r {
  505. position: absolute;
  506. top: 52px;
  507. right: 0;
  508. width: 80%;
  509. display: flex;
  510. justify-content: space-around;
  511. }
  512. }
  513. .warn-label {
  514. font-family: 'douyuFont';
  515. font-size: 14px;
  516. color: #31fbcc;
  517. line-height: 27px;
  518. }
  519. .warn-value {
  520. color: #fff;
  521. font-size: 14px;
  522. }
  523. }
  524. }
  525. </style>