mainWell.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792
  1. <template>
  2. <div class="mainWell">
  3. <!-- 光钎测温 -->
  4. <div class="work-nav" v-if="listData.bundletube.length == 0">
  5. <div class="nav" v-for="(item, index) in topOutList" :key="index">
  6. <div class="pic" v-if="item.imgSrc">
  7. <img :src="imgUrl" alt="" />
  8. </div>
  9. <div class="content" v-if="item.label && item.value">
  10. <span>{{ item.label }}</span>
  11. <span>{{ item.value }}</span>
  12. </div>
  13. <div class="text" v-if="item.text">{{ item.text }}</div>
  14. </div>
  15. </div>
  16. <!-- 束管监测 -->
  17. <div class="work-nav" v-else>
  18. <div class="box">
  19. <div class="contents">
  20. <img src="../../../../../assets/images/fire/pie.png" alt="" />
  21. <span class="text">{{ topContent.temperature }}</span>
  22. <span class="dw">°C</span>
  23. </div>
  24. <div class="contents">
  25. <div class="text">
  26. <span class="label">位置 : </span>
  27. <span class="value">{{ topContent.position }}</span>
  28. </div>
  29. <div class="text">
  30. <span class="label">时间 : </span>
  31. <span class="value">{{ topContent.time }}</span>
  32. </div>
  33. </div>
  34. </div>
  35. <div class="box">
  36. <div class="text1">{{ topContent.warn }}</div>
  37. </div>
  38. </div>
  39. <div class="center-box">
  40. <div class="box" v-for="(items, index) in tabList" :key="index">
  41. <div class="title">
  42. <span class="label">{{ items.label }}</span>
  43. <span class="details">{{ `${items.details}>>` }}</span>
  44. </div>
  45. <div class="content">
  46. <a-table v-if="index == 0" ref="table" size="small" :scroll="{ x: 0, y: 273 }" :columns="columns"
  47. :data-source="monitorlistYw" :pagination="false">
  48. <span slot="action" slot-scope="text, record"></span>
  49. </a-table>
  50. <a-table v-if="index == 1" ref="table1" size="small" :columns="columns" :data-source="monitorlistHy"
  51. :pagination="false" :scroll="{ y: 273 }">
  52. <span slot="action" slot-scope="text, record"> </span>
  53. </a-table>
  54. <a-table v-if="index == 2" ref="table" size="small" :scroll="{ y: 273 }" :columns="columns"
  55. :data-source="monitorlistPl" :pagination="false">
  56. <span slot="action" slot-scope="text, record"> </span>
  57. </a-table>
  58. </div>
  59. </div>
  60. </div>
  61. <div class="footer-box" v-if="listData.bundletube.length == 0">
  62. <div class="footer-title">
  63. <div class="echart-label">光钎测温系统实时温度监测</div>
  64. <!-- <a-select style="width: 240px; margin-left: 10px" v-model="pointCode" allowClear class="code-mode-select"
  65. placeholder="请选择" @change="handleChange">
  66. <a-select-option v-for="device in pointOutList" :key="device.value" :value="device.value">{{
  67. device.label
  68. }}
  69. </a-select-option>
  70. </a-select> -->
  71. </div>
  72. <div class="echart-content">
  73. <echartLine2 :echartDataWd="echartDataWd"></echartLine2>
  74. </div>
  75. </div>
  76. <!-- 束管监测 -->
  77. <div class="content-s" v-else>
  78. <div class="title-b">采空区密闭参数</div>
  79. <div class="card-btn">
  80. <div :class="activeIndex == index ? 'box1' : 'box'" v-for="(item, index) in mbList" :key="index"
  81. @click="btnClick(item, index)">
  82. <div class="label">{{ item.label }}</div>
  83. <div class="box-item box-item1">
  84. <span class="text-t">{{ `${item.label1}:` }}</span>
  85. <span class="text-v">{{ `${item.nd}%` }}</span>
  86. </div>
  87. <div class="box-item box-item2">
  88. <span class="text-t">{{ `${item.label2}:` }}</span>
  89. <span class="text-v">{{ item.time1 }}</span>
  90. </div>
  91. <div class="box-item box-item3">
  92. <span class="text-t">{{ `${item.label3}:` }}</span>
  93. <span class="text-v">{{ item.address }}</span>
  94. </div>
  95. </div>
  96. </div>
  97. <div class="echart-box">
  98. <div class="title-f">
  99. <div class="title-text">{{ `${type}趋势` }}</div>
  100. </div>
  101. <div class="echarts-box">
  102. <echartLine1 :echartDataSg="echartDataSg1"></echartLine1>
  103. </div>
  104. </div>
  105. </div>
  106. </div>
  107. </template>
  108. <script lang="ts" setup>
  109. import { ref, computed, reactive, watch, defineProps } from 'vue';
  110. import { topOutList, tabList, columns, } from '../fire.data'
  111. import imgUrl from '../../../../../assets/images/fire/pie.png'
  112. import echartLine2 from './common/echartLine2.vue'
  113. import echartLine1 from './common/echartLine1.vue'
  114. let props = defineProps({
  115. listData: Object,
  116. });
  117. //束管监测-顶部区域数据
  118. let topContent = reactive({
  119. temperature: 0,
  120. position: '',
  121. time: '',
  122. warn: '',
  123. })
  124. //束管监测当前密闭参数激活选项
  125. let activeIndex = ref(0)
  126. //束管监测当前激活密闭参数类型
  127. let type = ref('O₂')
  128. //束管监测密闭参数列表
  129. let mbList = reactive([
  130. {
  131. label: 'O₂',
  132. label1: '浓度',
  133. label2: '时间',
  134. label3: '位置',
  135. nd: 0,
  136. time1: '',
  137. address: '',
  138. },
  139. {
  140. label: 'CO',
  141. label1: '浓度',
  142. label2: '时间',
  143. label3: '位置',
  144. nd: 0,
  145. time1: '',
  146. address: '',
  147. },
  148. {
  149. label: 'CO₂',
  150. label1: '浓度',
  151. label2: '时间',
  152. label3: '位置',
  153. nd: 0,
  154. time1: '',
  155. address: '',
  156. },
  157. {
  158. label: 'CH₄',
  159. label1: '浓度',
  160. label2: '时间',
  161. label3: '位置',
  162. nd: 0,
  163. time1: '',
  164. address: '',
  165. },
  166. {
  167. label: 'C₂H₂',
  168. label1: '浓度',
  169. label2: '时间',
  170. label3: '位置',
  171. nd: 0,
  172. time1: '',
  173. address: '',
  174. },
  175. {
  176. label: 'C₂H₄',
  177. label1: '浓度',
  178. label2: '时间',
  179. label3: '位置',
  180. nd: 0,
  181. time1: '',
  182. address: '',
  183. },
  184. ])
  185. let echartDataSg1 = reactive({
  186. xData: [],
  187. yData: [],
  188. lengedData: 'O₂',
  189. })
  190. let echartDataSgList = reactive<any[]>([])
  191. //外因火灾温度监测-图表数据
  192. let echartDataWd = reactive({
  193. xData: [],
  194. maxData: {
  195. data: [],
  196. lengedData: '实时温度',
  197. },
  198. })
  199. //烟雾传感器列表数据
  200. let monitorlistYw = reactive([])
  201. //火焰传感器列表数据
  202. let monitorlistHy = reactive([])
  203. //喷淋装置列表数据
  204. let monitorlistPl = reactive([])
  205. //温度监测-测点编码
  206. // let pointCode = ref('')
  207. //束管监测密闭参数选项切换
  208. function btnClick(item, ind) {
  209. activeIndex.value = ind
  210. type.value = item.label
  211. echartDataSg1.xData.length = 0
  212. echartDataSg1.yData.length = 0
  213. echartDataSg1.lengedData = type.value
  214. switch (type.value) {
  215. case 'O₂':
  216. echartDataSgList.forEach(el => {
  217. echartDataSg1.xData.push(el.time)
  218. echartDataSg1.yData.push(el.o2val)
  219. })
  220. break;
  221. case 'C₂H₄':
  222. echartDataSgList.forEach(el => {
  223. echartDataSg1.xData.push(el.time)
  224. echartDataSg1.yData.push(el.ch2val)
  225. })
  226. break;
  227. case 'CO':
  228. echartDataSgList.forEach(el => {
  229. echartDataSg1.xData.push(el.time)
  230. echartDataSg1.yData.push(el.coval)
  231. })
  232. break;
  233. case 'CH₄':
  234. echartDataSgList.forEach(el => {
  235. echartDataSg1.xData.push(el.time)
  236. echartDataSg1.yData.push(el.chval)
  237. })
  238. break;
  239. case 'CO₂':
  240. echartDataSgList.forEach(el => {
  241. echartDataSg1.xData.push(el.time)
  242. echartDataSg1.yData.push(el.co2val)
  243. })
  244. break;
  245. case 'C₂H₂':
  246. echartDataSgList.forEach(el => {
  247. echartDataSg1.xData.push(el.time)
  248. echartDataSg1.yData.push(el.gasval)
  249. })
  250. break;
  251. }
  252. }
  253. //温度监测测点编号选项切换
  254. // function handleChange(val) {
  255. // pointCode.value = val
  256. // }
  257. watch(() => props.listData, (val) => {
  258. console.log(val, 'val---------------')
  259. props.listData = val
  260. if (JSON.stringify(val) != '{}') {
  261. echartDataSg1.xData.length = 0
  262. echartDataSg1.yData.length = 0
  263. echartDataSgList.length = 0
  264. echartDataWd.xData.length = 0
  265. echartDataWd.maxData.data.length = 0
  266. monitorlistYw.length = 0
  267. monitorlistHy.length = 0
  268. monitorlistPl.length = 0
  269. if (val.fiber.length != 0) {
  270. topOutList[0].value = val.fiber[0].readData.fmax
  271. topOutList[1].value = val.fiber[0].readData.fmin
  272. topOutList[2].value = val.fiber[0].readData.favg
  273. topOutList[3].text = val.fiber[0].warnFlag ? '存在风险' : '正常'
  274. JSON.parse(val.fiber[0].readData.fibreTemperature).forEach(el => {
  275. echartDataWd.xData.push(el.pos)
  276. echartDataWd.maxData.data.push(el.value)
  277. })
  278. }
  279. if (val.bundletube.length != 0) {
  280. topContent.temperature = val.temperature[0] ? val.temperature[0].readData.temperature : '--'
  281. topContent.position = val.bundletube[0].strinstallpos || '--'
  282. topContent.time = val.bundletube[0].readTime || '--'
  283. topContent.warn = val.bundletube[0].warnLevel == 0 ? '正常' : val.bundletube[0].warnLevel == 101 ? '较低风险' : val.bundletube[0].warnLevel == 102 ? '低风险' : val.bundletube[0].warnLevel == 103 ? '中风险' : val.bundletube[0].warnLevel == 104 ? '高风险' : val.bundletube[0].warnLevel == 201 ? '报警' : '正常'
  284. val.bundletube[0].history.forEach(v => {
  285. echartDataSg1.xData.push(v.time)
  286. if (echartDataSg1.lengedData == 'O₂') {
  287. echartDataSg1.yData.push(v.o2val)
  288. } else if (echartDataSg1.lengedData == 'C₂H₄') {
  289. echartDataSg1.yData.push(v.ch2val)
  290. } else if (echartDataSg1.lengedData == 'CO') {
  291. echartDataSg1.yData.push(v.coval)
  292. } else if (echartDataSg1.lengedData == 'CH₄') {
  293. echartDataSg1.yData.push(v.chval)
  294. } else if (echartDataSg1.lengedData == 'CO₂') {
  295. echartDataSg1.yData.push(v.co2val)
  296. } else if (echartDataSg1.lengedData == 'C₂H₂') {
  297. echartDataSg1.yData.push(v.gasval)
  298. }
  299. echartDataSgList.push(v)
  300. })
  301. }
  302. if (val.smoke.length != 0) {
  303. val.smoke.forEach(el => {
  304. el.warnFlag = el.warnFlag ? '存在风险' : '正常'
  305. monitorlistYw.push(el)
  306. })
  307. }
  308. if (val.fire.length != 0) {
  309. val.fire.forEach(el => {
  310. el.warnFlag = el.warnFlag ? '存在风险' : '正常'
  311. monitorlistHy.push(el)
  312. })
  313. }
  314. if (val.spray.length != 0) {
  315. val.spray.forEach(el => {
  316. el.warnFlag = el.warnFlag ? '存在风险' : '正常'
  317. monitorlistPl.push(el)
  318. })
  319. }
  320. }
  321. }, { immediate: true, deep: true })
  322. </script>
  323. <style lang="less" scoped>
  324. .mainWell {
  325. width: 100%;
  326. height: 100%;
  327. padding: 20px;
  328. box-sizing: border-box;
  329. overflow-y: auto;
  330. .work-nav {
  331. height: 15%;
  332. width: 100%;
  333. margin-bottom: 20px;
  334. background: url('../../../../../assets/images/fire/bj1.png') no-repeat center;
  335. background-size: 100% 100%;
  336. display: flex;
  337. justify-content: space-between;
  338. align-items: center;
  339. .nav {
  340. display: flex;
  341. justify-content: center;
  342. align-items: center;
  343. &:nth-child(1) {
  344. flex: 1;
  345. height: 100%;
  346. border-right: 2px solid;
  347. border-image: linear-gradient(to bottom, transparent, rgba(2, 70, 136, 1), transparent) 1 1 1;
  348. }
  349. &:nth-child(2) {
  350. flex: 1;
  351. height: 100%;
  352. border-right: 2px solid;
  353. border-image: linear-gradient(to bottom, transparent, rgba(2, 70, 136, 1), transparent) 1 1 1;
  354. }
  355. &:nth-child(3) {
  356. flex: 1;
  357. height: 100%;
  358. border-right: 2px solid;
  359. border-image: linear-gradient(to bottom, transparent, rgba(2, 70, 136, 1), transparent) 1 1 1;
  360. }
  361. &:nth-child(4) {
  362. flex: 1.2;
  363. color: #b3b8cc;
  364. font-size: 16px;
  365. height: 100%;
  366. border-right: 2px solid;
  367. border-image: linear-gradient(to bottom, transparent, rgba(2, 70, 136, 1), transparent) 1 1 1;
  368. }
  369. &:nth-child(5) {
  370. flex: 0.8;
  371. color: #2b87ff;
  372. font-size: 14px;
  373. height: 100%;
  374. }
  375. .pic {
  376. width: 26%;
  377. height: 84%;
  378. img {
  379. width: 100%;
  380. height: 100%;
  381. }
  382. }
  383. .content {
  384. height: 84%;
  385. margin-left: 15px;
  386. color: #fff;
  387. display: flex;
  388. flex-direction: column;
  389. justify-content: space-around;
  390. span {
  391. font-size: 14px;
  392. &:nth-child(1) {
  393. padding: 5px 0px;
  394. color: #b3b8cc;
  395. }
  396. &:nth-child(2) {
  397. font-family: 'douyuFont';
  398. font-size: 20px;
  399. color: #3df6ff;
  400. }
  401. }
  402. }
  403. }
  404. .nav:nth-child(1) .pic {
  405. background: url('../../../../../assets/images/fire/max.svg') no-repeat center;
  406. background-size: 50% 50%;
  407. }
  408. .nav:nth-child(2) .pic {
  409. background: url('../../../../../assets/images/fire/min.svg') no-repeat center;
  410. background-size: 50% 50%;
  411. }
  412. .nav:nth-child(3) .pic {
  413. background: url('../../../../../assets/images/fire/pj.svg') no-repeat center;
  414. background-size: 50% 50%;
  415. }
  416. .box {
  417. display: flex;
  418. &:nth-child(1) {
  419. justify-content: space-around;
  420. align-items: center;
  421. flex: 2;
  422. height: 100%;
  423. border-right: 2px solid;
  424. border-image: linear-gradient(to bottom, transparent, rgba(2, 70, 136, 1), transparent) 1 1 1;
  425. }
  426. &:nth-child(2) {
  427. flex: 1;
  428. justify-content: center;
  429. align-items: center;
  430. height: 100%;
  431. }
  432. .contents {
  433. height: 73%;
  434. &:nth-child(1) {
  435. width: 40%;
  436. display: flex;
  437. justify-content: center;
  438. align-items: center;
  439. img {
  440. position: relative;
  441. width: 23%;
  442. height: 100%;
  443. background: url('../../../../../assets/images/fire/pj.svg') no-repeat center;
  444. background-size: 50% 50%;
  445. }
  446. .text {
  447. font-family: 'douyuFont';
  448. font-size: 36px;
  449. margin: 0px 15px;
  450. color: #3df6ff;
  451. }
  452. .dw {
  453. font-size: 16px;
  454. color: #b3b8cc;
  455. }
  456. }
  457. &:nth-child(2) {
  458. width: 60%;
  459. display: flex;
  460. flex-direction: column;
  461. justify-content: space-around;
  462. .text {
  463. font-size: 18px;
  464. .label {
  465. color: #b3b8cc;
  466. font-weight: bold;
  467. }
  468. .value {
  469. font-family: 'douyuFont';
  470. color: #3df6ff;
  471. margin-left: 10px;
  472. }
  473. }
  474. }
  475. }
  476. .text1 {
  477. font-size: 18px;
  478. color: #b3b8cc;
  479. font-weight: bold;
  480. }
  481. }
  482. }
  483. .center-box {
  484. height: 47%;
  485. margin-bottom: 20px;
  486. display: flex;
  487. justify-content: space-between;
  488. align-items: center;
  489. .box {
  490. display: flex;
  491. flex-direction: column;
  492. width: 32%;
  493. height: 100%;
  494. background: url('../../../../../assets/images/fire/bj1.png') no-repeat center;
  495. background-size: 100% 100%;
  496. &:nth-child(2) {
  497. margin: 0px 20px;
  498. }
  499. .title {
  500. width: 100%;
  501. height: 40px;
  502. padding: 0px 15px;
  503. margin-bottom: 10px;
  504. border-bottom: 1px solid #0c3c88;
  505. box-sizing: border-box;
  506. display: flex;
  507. justify-content: space-between;
  508. align-items: center;
  509. .label {
  510. // font-family: 'douyuFont';
  511. font-size: 16px;
  512. color: #fff;
  513. }
  514. .details {
  515. font-size: 14px;
  516. color: #1f81df;
  517. }
  518. }
  519. .content {
  520. height: calc(100% - 40px);
  521. margin-bottom: 10px;
  522. }
  523. }
  524. }
  525. .footer-box {
  526. height: calc(38% - 40px);
  527. background: url('../../../../../assets/images/fire/bj1.png') no-repeat center;
  528. background-size: 100% 100%;
  529. .footer-title {
  530. height: 30px;
  531. padding: 0px 15px;
  532. display: flex;
  533. justify-content: space-between;
  534. align-items: center;
  535. .echart-label {
  536. font-size: 16px;
  537. color: #fff;
  538. }
  539. }
  540. .echart-content {
  541. height: calc(100% - 30px);
  542. }
  543. }
  544. .content-s{
  545. width: 100%;
  546. height: 608px;
  547. padding: 15px 20px 0px 20px;
  548. background: url('../../../../../assets/images/fire/bj1.png') no-repeat center;
  549. background-size: 100% 100%;
  550. box-sizing: border-box;
  551. .title-b {
  552. height: 30px;
  553. line-height: 30px;
  554. font-family: 'douyuFont';
  555. font-size: 16px;
  556. color: #3df6ff;
  557. }
  558. .card-btn {
  559. height: 28%;
  560. margin-bottom: 10px;
  561. display: flex;
  562. justify-content: space-between;
  563. .box {
  564. position: relative;
  565. width: 16%;
  566. height: 100%;
  567. background: url('../../../../../assets/images/fire/1.png') no-repeat center;
  568. background-size: 100% 100%;
  569. cursor: pointer;
  570. .label {
  571. position: absolute;
  572. left: 50%;
  573. top: 0;
  574. transform: translate(-50%);
  575. font-size: 16px;
  576. color: #fff;
  577. }
  578. .box-item {
  579. position: absolute;
  580. left: 50%;
  581. transform: translate(-50%, 0);
  582. width: 89%;
  583. height: 16%;
  584. padding: 0px 10px;
  585. display: flex;
  586. justify-content: space-between;
  587. align-items: center;
  588. background: url('../../../../../assets/images/fire/contetn.png') no-repeat center;
  589. background-size: 100% 100%;
  590. .text-t {
  591. width: 17%;
  592. color: #fff;
  593. font-size: 12px;
  594. }
  595. .text-v {
  596. width: 83%;
  597. font-family: 'douyuFont';
  598. font-size: 10px;
  599. color: #3df6ff;
  600. display: flex;
  601. justify-content: flex-end;
  602. }
  603. }
  604. .box-item1 {
  605. top: 24%;
  606. }
  607. .box-item2 {
  608. top: 50%;
  609. }
  610. .box-item3 {
  611. top: 75%;
  612. }
  613. }
  614. .box1 {
  615. position: relative;
  616. width: 16%;
  617. height: 100%;
  618. background: url('../../../../../assets/images/fire/2.png') no-repeat center;
  619. background-size: 100% 100%;
  620. cursor: pointer;
  621. .label {
  622. position: absolute;
  623. left: 50%;
  624. top: 0;
  625. transform: translate(-50%);
  626. font-size: 16px;
  627. color: #fff;
  628. }
  629. .box-item {
  630. position: absolute;
  631. left: 50%;
  632. transform: translate(-50%, 0);
  633. width: 89%;
  634. height: 16%;
  635. padding: 0px 10px;
  636. display: flex;
  637. justify-content: space-between;
  638. align-items: center;
  639. background: url('../../../../../assets/images/fire/contetn.png') no-repeat center;
  640. background-size: 100% 100%;
  641. .text-t {
  642. width: 17%;
  643. color: #fff;
  644. font-size: 12px;
  645. }
  646. .text-v {
  647. width: 83%;
  648. font-family: 'douyuFont';
  649. font-size: 10px;
  650. color: #3df6ff;
  651. display: flex;
  652. justify-content: flex-end;
  653. }
  654. }
  655. .box-item1 {
  656. top: 19%;
  657. }
  658. .box-item2 {
  659. top: 41%;
  660. }
  661. .box-item3 {
  662. top: 63%;
  663. }
  664. }
  665. }
  666. .echart-box {
  667. height: calc(72% - 41px);
  668. border: 1px solid #114aac;
  669. .title-f {
  670. height: 40px;
  671. padding: 0px 10px;
  672. box-sizing: border-box;
  673. display: flex;
  674. justify-content: space-between;
  675. align-items: center;
  676. .title-text {
  677. font-family: 'douyuFont';
  678. font-size: 16px;
  679. color: #3df6ff;
  680. }
  681. }
  682. .echarts-box {
  683. height: calc(100% - 40px);
  684. }
  685. }
  686. }
  687. }
  688. </style>