water-sources.vue 66 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346
  1. <template>
  2. <el-row class="contentBox">
  3. <transition name="el-fade-in-linear">
  4. <el-col class="leftBox" v-show="stroes.$state.leftBtn">
  5. <div class="leftCenter">
  6. <h4>消防水源数量</h4>
  7. <div class="leftCenterContent">
  8. <div class="contentEcharts">
  9. <water-gauge
  10. ref="waterGauge"
  11. :dataMap="
  12. fireWaterStatisticsObj.waterIntact || 0
  13. "
  14. ></water-gauge>
  15. </div>
  16. <el-row>
  17. <el-col>
  18. <span>市政消火栓</span
  19. ><span>{{
  20. fireWaterStatisticsObj.municipalFireCode
  21. }}</span>
  22. </el-col>
  23. <el-col>
  24. <span>社区消火栓</span
  25. ><span>{{
  26. fireWaterStatisticsObj.communityFireCode
  27. }}</span>
  28. </el-col>
  29. <el-col>
  30. <span>单位消火栓</span
  31. ><span>{{
  32. fireWaterStatisticsObj.unitFireCode
  33. }}</span>
  34. </el-col>
  35. <el-col>
  36. <!-- <span>天然水源</span><span>{{ fireWaterStatisticsObj.naturalWater }}</span> -->
  37. <span>天然水源</span><span>11</span>
  38. </el-col>
  39. </el-row>
  40. </div>
  41. </div>
  42. <div class="leftCenter2">
  43. <h4>各街镇消防水源情况</h4>
  44. <div class="leftCenterContent">
  45. <el-table
  46. :data="tableData3"
  47. class="transparentTableRow table1"
  48. height="100%"
  49. style="width: 100%; margin: 0 auto"
  50. >
  51. <el-table-column
  52. v-for="item in headerData3"
  53. :key="item.prop"
  54. :prop="item.prop"
  55. align="center"
  56. style="margin: 0 auto"
  57. min-width="20"
  58. :label="item.name"
  59. >
  60. <template
  61. v-if="
  62. item.prop === 'type' ||
  63. item.prop === 'lasj2' ||
  64. item.prop === 'ajzt' ||
  65. item.prop === 'afdz' ||
  66. item.prop === 'czdx' ||
  67. item.prop === 'zhongdui'
  68. "
  69. #default="scope"
  70. >
  71. <el-tooltip placement="right">
  72. <template #content>
  73. <div class="tableTooltip" ref="ff">
  74. <div class="tableTitle">
  75. <div>案件详情</div>
  76. </div>
  77. <img
  78. src="~@a/img/icon/close.png"
  79. alt=""
  80. class="close"
  81. @click="closeIsTooltip"
  82. />
  83. <el-row class="tableContent">
  84. <el-col
  85. :span="20"
  86. v-if="scope.row.ajbh"
  87. >案件编号:{{
  88. scope.row.ajbh
  89. }}</el-col
  90. >
  91. <el-col
  92. :span="24"
  93. v-if="scope.row.bcxx"
  94. >案件描述:{{
  95. scope.row.bcxx
  96. }}</el-col
  97. >
  98. <el-col
  99. :span="24"
  100. v-if="scope.row.tzsj"
  101. >报警时间:{{
  102. scope.row.tzsj
  103. }}</el-col
  104. >
  105. <el-col
  106. :span="24"
  107. v-if="scope.row.ajlx"
  108. >案件类型:{{
  109. scope.row.ajlx
  110. }}</el-col
  111. >
  112. <el-col
  113. :span="24"
  114. v-if="scope.row.type"
  115. >警情类别:{{
  116. scope.row.type
  117. }}</el-col
  118. >
  119. <el-col
  120. :span="24"
  121. v-if="scope.row.ajdj"
  122. >警情等级:{{
  123. scope.row.ajdj
  124. }}</el-col
  125. >
  126. <el-col
  127. :span="24"
  128. v-if="scope.row.afdz"
  129. >案发地址:{{
  130. scope.row.afdz
  131. }}</el-col
  132. >
  133. <el-col
  134. :span="24"
  135. v-if="scope.row.cdcl"
  136. >调动车辆:{{
  137. scope.row.cdcl
  138. }}</el-col
  139. >
  140. <el-col
  141. :span="24"
  142. v-if="scope.row.czdx"
  143. >处置对象:{{
  144. scope.row.czdx
  145. }}</el-col
  146. >
  147. <el-col
  148. :span="12"
  149. v-if="
  150. scope.row.zhongdui
  151. "
  152. >主责中队:{{
  153. scope.row.zhongdui
  154. }}</el-col
  155. >
  156. <el-col
  157. :span="12"
  158. v-if="scope.row.ajzt"
  159. >案件状态:{{
  160. scope.row.ajzt
  161. }}</el-col
  162. >
  163. <el-col
  164. :span="24"
  165. v-if="scope.row.dcsj"
  166. >到场时间:{{
  167. scope.row.dcsj
  168. }}</el-col
  169. >
  170. <el-col
  171. :span="24"
  172. v-if="scope.row.cssj"
  173. >出水时间:{{
  174. scope.row.cssj
  175. }}</el-col
  176. >
  177. <el-col
  178. :span="24"
  179. v-if="scope.row.kzsj"
  180. >控制时间:{{
  181. scope.row.kzsj
  182. }}</el-col
  183. >
  184. <el-col
  185. :span="24"
  186. v-if="scope.row.xmsj"
  187. >熄灭时间:{{
  188. scope.row.xmsj
  189. }}</el-col
  190. >
  191. <el-col
  192. :span="24"
  193. v-if="scope.row.fdsj"
  194. >返队时间:{{
  195. scope.row.fdsj
  196. }}</el-col
  197. >
  198. <el-col
  199. :span="24"
  200. v-if="
  201. scope.row.streettown
  202. "
  203. >所属街道:{{
  204. scope.row.streettown
  205. }}</el-col
  206. >
  207. </el-row>
  208. <el-row class="tablePersonnel">
  209. <el-col :span="7"> </el-col>
  210. </el-row>
  211. </div>
  212. </template>
  213. <template>
  214. <i
  215. class="iconfont"
  216. :class="
  217. scope.row['ajlxdm'] == '1'
  218. ? 'icon-huozai'
  219. : scope.row['ajlxdm'] ==
  220. '2'
  221. ? 'icon-jiuyuan'
  222. : scope.row['ajlxdm'] ==
  223. '3'
  224. ? 'icon-shehuijiuzhu'
  225. : 'icon-pbaj'
  226. "
  227. :style="{
  228. color:
  229. scope.row['ajdj'] ==
  230. '零级'
  231. ? '#49b8ff'
  232. : scope.row[
  233. 'ajdj'
  234. ] == '一级'
  235. ? '#eec10d'
  236. : scope.row[
  237. 'ajdj'
  238. ] == '二级'
  239. ? '#ff730c'
  240. : scope.row[
  241. 'ajdj'
  242. ] == '三级'
  243. ? '#ff0012'
  244. : '#2e98f2',
  245. }"
  246. v-if="item.prop === 'type'"
  247. ></i>
  248. <div class="name-wrapper" v-else>
  249. {{ scope.row[item.prop] }}
  250. </div>
  251. </template>
  252. </el-tooltip>
  253. </template>
  254. </el-table-column>
  255. </el-table>
  256. </div>
  257. </div>
  258. </el-col>
  259. </transition>
  260. <transition name="el-fade-in-linear">
  261. <el-col class="centerBox" style="width: 100%">
  262. <div
  263. :class="
  264. stroes.$state.leftBtn ? 'leftBtn btnW' : 'leftBtn0 btnW'
  265. "
  266. @click="stroes.leftBtnClick()"
  267. >
  268. <img src="@/assets/img/svg/left.svg" alt="" class="img" />
  269. </div>
  270. <el-col class="centerContent" id="mapF"></el-col>
  271. <div
  272. :class="
  273. stroes.$state.rightBtn
  274. ? 'rightBtn btnW'
  275. : 'rightBtn0 btnW'
  276. "
  277. @click="stroes.rightBtnClick()"
  278. >
  279. <img src="@/assets/img/svg/left.svg" alt="" class="img" />
  280. </div>
  281. <div class="mapTips_type">
  282. <img
  283. src="@/assets/img/svg/danweitop.svg"
  284. alt=""
  285. class="img"
  286. />
  287. <div class="content">
  288. <p>街镇筛选</p>
  289. <el-select
  290. class="mtb-12"
  291. v-model="stroes.$state.streetTown"
  292. placeholder="请选择街镇"
  293. @change="checkStreetTown"
  294. >
  295. <el-option
  296. v-for="item in stroes.$state.streetTownList"
  297. :key="item.value"
  298. :label="item.label"
  299. :value="item.value"
  300. >
  301. </el-option>
  302. </el-select>
  303. <p>类型筛选</p>
  304. <div class="selectType">
  305. <div
  306. @click="checkboxChange(1)"
  307. :class="
  308. checkedArray.checkedData[0] == 1
  309. ? 'checkTypeSelect'
  310. : ''
  311. "
  312. >
  313. <img :src="stores.sadianIcon.xhs" alt="" />
  314. <span>消火栓(可用)</span>
  315. </div>
  316. <div
  317. @click="checkboxChange(3)"
  318. :class="
  319. checkedArray.checkedData[0] == 3
  320. ? 'checkTypeSelect'
  321. : ''
  322. "
  323. >
  324. <img :src="stores.sadianIcon.xhsH" alt="" />
  325. <span>消火栓(不可用)</span>
  326. </div>
  327. <div
  328. @click="checkboxChange(2)"
  329. :class="
  330. checkedArray.checkedData[0] == 2
  331. ? 'checkTypeSelect'
  332. : ''
  333. "
  334. >
  335. <img :src="stores.sadianIcon.trsy" alt="" />
  336. <span>天然水源</span>
  337. </div>
  338. </div>
  339. </div>
  340. </div>
  341. </el-col>
  342. </transition>
  343. <transition name="el-fade-in-linear">
  344. <el-col class="rightBox" v-show="stroes.$state.rightBtn">
  345. <div class="rightTop">
  346. <h4>水源性质占比</h4>
  347. <div class="rightBoxContent">
  348. <el-row class="funnelCon">
  349. <el-col :span="16">
  350. <funnel
  351. ref="funnel"
  352. :dataMap="
  353. fireWaterStatisticsObj.funnelList || []
  354. "
  355. ></funnel>
  356. </el-col>
  357. <el-col :span="8">
  358. <el-col
  359. v-for="item in fireWaterStatisticsObj.funnelList ||
  360. []"
  361. :key="item.name"
  362. >
  363. <span>{{ item.name }}</span>
  364. <span>{{ item.data }}</span>
  365. </el-col>
  366. </el-col>
  367. </el-row>
  368. <el-row class="gaugeCon">
  369. <el-col :span="12">
  370. <el-row>
  371. <el-col :span="12">
  372. <gauge
  373. ref="gauge1"
  374. :dataMap="
  375. fireWaterStatisticsObj.municipalGetWaterRadio ||
  376. 0
  377. "
  378. color="#1AF3FD"
  379. ></gauge>
  380. </el-col>
  381. <el-col :span="12">
  382. <div>
  383. <div style="color: #1af3fd">
  384. {{
  385. fireWaterStatisticsObj.municipalGetWater
  386. }}
  387. </div>
  388. <div>市政取水</div>
  389. </div>
  390. </el-col>
  391. </el-row>
  392. </el-col>
  393. <el-col :span="12">
  394. <el-row>
  395. <el-col :span="12">
  396. <gauge
  397. ref="gauge2"
  398. :dataMap="
  399. fireWaterStatisticsObj.landGetWaterRadio ||
  400. 0
  401. "
  402. color="#FDC51A"
  403. ></gauge>
  404. </el-col>
  405. <el-col :span="12">
  406. <div>
  407. <div style="color: #fdc51a">
  408. {{
  409. fireWaterStatisticsObj.landGetWater
  410. }}
  411. </div>
  412. <div>地上取水</div>
  413. </div>
  414. </el-col>
  415. </el-row>
  416. </el-col>
  417. </el-row>
  418. </div>
  419. </div>
  420. <div class="rightCenter">
  421. <h4>水源情况</h4>
  422. <div class="rightCenterContent">
  423. <el-table
  424. :data="tableData"
  425. class="transparentTableRow"
  426. height="100%"
  427. @row-click="FireWaterListClick"
  428. >
  429. <el-table-column
  430. v-for="item in headerData"
  431. show-overflow-tooltip
  432. :key="item.prop"
  433. :prop="item.prop"
  434. align="center"
  435. min-width="20"
  436. :label="item.name"
  437. >
  438. <template
  439. v-if="item.prop === 'type'"
  440. #default="scope"
  441. >
  442. <el-popover
  443. trigger="hover"
  444. placement="left"
  445. >
  446. <template #default>
  447. <div class="tableTooltip">
  448. <div class="tableTitle">
  449. <div>
  450. {{ scope.row.type }}
  451. </div>
  452. </div>
  453. <el-row class="tableContent">
  454. <el-col
  455. :span="24"
  456. v-if="scope.row.address"
  457. >水源位置:{{
  458. scope.row.address
  459. }}</el-col
  460. >
  461. <el-col
  462. :span="12"
  463. v-if="
  464. scope.row.dutyPerson
  465. "
  466. >责任人:{{
  467. scope.row.dutyPerson
  468. }}</el-col
  469. >
  470. <el-col
  471. :span="12"
  472. v-if="scope.row.phone"
  473. >电话:{{
  474. scope.row.phone
  475. }}</el-col
  476. >
  477. <el-col
  478. :span="24"
  479. v-if="
  480. scope.row
  481. .detachmentName
  482. "
  483. >支队名称:{{
  484. scope.row
  485. .detachmentName
  486. }}</el-col
  487. >
  488. <el-col
  489. :span="12"
  490. v-if="
  491. scope.row
  492. .jurisdictionalAgency
  493. "
  494. >管辖机构:{{
  495. scope.row
  496. .jurisdictionalAgency
  497. }}</el-col
  498. >
  499. <el-col
  500. :span="12"
  501. v-if="scope.row.type"
  502. >水源类型:{{
  503. scope.row.type
  504. }}</el-col
  505. >
  506. <el-col
  507. :span="12"
  508. v-if="
  509. scope.row
  510. .getWaterType
  511. "
  512. >取水形式:{{
  513. scope.row
  514. .getWaterType
  515. }}</el-col
  516. >
  517. <el-col
  518. :span="12"
  519. v-if="
  520. scope.row.waterGage
  521. "
  522. >水压(Mpa):{{
  523. scope.row.waterGage
  524. }}</el-col
  525. >
  526. <el-col
  527. :span="12"
  528. v-if="
  529. scope.row
  530. .waterAdministrative
  531. "
  532. >水源性质:{{
  533. scope.row
  534. .waterAdministrative
  535. }}</el-col
  536. >
  537. <el-col
  538. :span="24"
  539. v-if="
  540. scope.row.waterUnit
  541. "
  542. >供水单位:{{
  543. scope.row.waterUnit
  544. }}</el-col
  545. >
  546. <el-col
  547. :span="12"
  548. v-if="
  549. scope.row.waterUnit
  550. "
  551. >状态:<span
  552. :class="
  553. scope.row
  554. .status ==
  555. '1'
  556. ? 'color1'
  557. : 'color2'
  558. "
  559. >{{
  560. scope.row
  561. .status == 1
  562. ? "可用"
  563. : "不可用"
  564. }}</span
  565. ></el-col
  566. >
  567. </el-row>
  568. </div>
  569. </template>
  570. <template #reference>
  571. <div>
  572. {{ scope.row.type }}
  573. </div>
  574. </template>
  575. </el-popover>
  576. </template>
  577. <template v-else #default="scope">
  578. <img
  579. style="width: 0.4rem"
  580. v-if="item.prop === 'status'"
  581. :src="
  582. item.prop === 'status'
  583. ? scope.row[item.prop] == '1'
  584. ? stores.sadianIcon.xhs
  585. : stores.sadianIcon.xhsH
  586. : stores.sadianIcon.xhs
  587. "
  588. alt=""
  589. />
  590. <span
  591. v-else
  592. :class="
  593. item.prop === 'status'
  594. ? scope.row[item.prop] == '1'
  595. ? 'color1'
  596. : 'color2'
  597. : ''
  598. "
  599. >
  600. {{
  601. item.prop === "status"
  602. ? scope.row[item.prop] == 1
  603. ? "可用"
  604. : "不可用"
  605. : scope.row[item.prop]
  606. }}</span
  607. >
  608. </template>
  609. </el-table-column>
  610. </el-table>
  611. </div>
  612. </div>
  613. </el-col>
  614. </transition>
  615. </el-row>
  616. </template>
  617. <script>
  618. import linstener from "@c/mixins/linstener";
  619. import map from "@c/mixins/map-data1";
  620. // import map from "@c/mixins/map-gaode-public";
  621. import waterGauge from "@c/water-gauge";
  622. import gauge from "@c/gauge/index4";
  623. // import seTable from "@c/se-table/index2";
  624. import funnel from "@c/funnel";
  625. import { getYearMonthDateSFN, getMonthStartAndEnd } from "../assets/js/dataFormate";
  626. // TODO 高德地图
  627. // import AMap from 'AMap'
  628. export default {
  629. mixins: [linstener, map],
  630. components: { waterGauge, funnel, gauge },
  631. data() {
  632. return {
  633. stores: this.$useStore(),
  634. checkedArray: {
  635. checkedData: [3],
  636. checkedList: [
  637. { value: 1, label: "市政取水点" },
  638. { value: 2, label: "社区取水点" },
  639. { value: 3, label: "单位取水点" },
  640. ],
  641. }, //类型筛选-数据存储
  642. cldt:[],//车辆动态
  643. timeArea: "day",
  644. unitBeOnDutyList: [],
  645. tableData: [],
  646. headerData: [
  647. { prop: "type", name: "类型" },
  648. { prop: "address", name: "位置" },
  649. { prop: "jurisdictionalAgency", name: "管辖机构" },
  650. { prop: "getWaterType", name: "取水形式" },
  651. { prop: "waterGage", name: "水压(Mpa)" },
  652. { prop: "status", name: "状态" },
  653. ],
  654. fireWaterStatisticsObj: {
  655. funnelList: [
  656. { data: 0, reaVal: 0, value: 20 },
  657. { data: 0, reaVal: 0, value: 40 },
  658. { data: 0, reaVal: 0, value: 60 },
  659. { data: 0, reaVal: 0, value: 80 },
  660. ],
  661. },
  662. tableData3: [
  663. {
  664.                        a0:"申虹",
  665.                        a1:"864",
  666.                        a2:"234",
  667.                        a3:"521",
  668.                        a4:"0",
  669.                        a5:"100%",
  670.                 },
  671. {
  672.                        a0:"支队",
  673.                        a1:"654",
  674.                        a2:"95",
  675.                        a3:"452",
  676.                        a4:"0",
  677.                        a5:"100%",
  678.                 },
  679. {
  680.                        a0:"七宝",
  681.                        a1:"354",
  682.                        a2:"267",
  683.                        a3:"431",
  684.                        a4:"0",
  685.                        a5:"99%",
  686.                 },
  687. {
  688.                        a0:"光华",
  689.                        a1:"942",
  690.                        a2:"324",
  691.                        a3:"368",
  692.                        a4:"0",
  693.                        a5:"100%",
  694.                 },
  695. {
  696.                        a0:"华漕",
  697.                        a1:"854",
  698.                        a2:"354",
  699.                        a3:"269",
  700.                        a4:"0",
  701.                        a5:"99%",
  702.                 },
  703. {
  704.                        a0:"吴泾",
  705.                        a1:"651",
  706.                        a2:"524",
  707.                        a3:"459",
  708.                        a4:"8",
  709.                        a5:"98%",
  710.                 },
  711. {
  712.                        a0:"新虹",
  713.                        a1:"324",
  714.                        a2:"268",
  715.                        a3:"410",
  716.                        a4:"0",
  717.                        a5:"99%",
  718.                 },
  719. {
  720.                        a0:"杜行",
  721.                        a1:"964",
  722.                        a2:"352",
  723.                        a3:"425",
  724.                        a4:"1",
  725.                        a5:"100%",
  726.                 },
  727. {
  728.                        a0:"浦江",
  729.                        a1:"568",
  730.                        a2:"265",
  731.                        a3:"423",
  732.                        a4:"0",
  733.                        a5:"100%",
  734.                 },
  735. {
  736.                        a0:"莘庄",
  737.                        a1:"569",
  738.                        a2:"346",
  739.                        a3:"426",
  740.                        a4:"0",
  741.                        a5:"100%",
  742.                 },
  743. {
  744.                        a0:"闵行",
  745.                        a1:"864",
  746.                        a2:"265",
  747.                        a3:"402",
  748.                        a4:"1",
  749.                        a5:"100%",
  750.                 },
  751. {
  752.                        a0:"颛桥",
  753.                        a1:"864",
  754.                        a2:"325",
  755.                        a3:"201",
  756.                        a4:"0",
  757.                        a5:"98%",
  758.                 },
  759. {
  760.                        a0:"马桥",
  761.                        a1:"864",
  762.                        a2:"319",
  763.                        a3:"401",
  764.                        a4:"1",
  765.                        a5:"99%",
  766.                 },
  767. ],
  768. headerData3: [
  769. { prop: "a0", name: "支队名称" },
  770. { prop: "a1", name: "市政消火栓" },
  771. { prop: "a2", name: "社区消火栓" },
  772. { prop: "a3", name: "单位消火栓" },
  773. { prop: "a4", name: "天然水源" },
  774. { prop: "a5", name: "水源完好率" },
  775. ],
  776. };
  777. },
  778. created() {
  779. this.getData();
  780. },
  781. mounted() {
  782. this.initMap();
  783. window.addEventListener("resize", () => this.resizeTimeActions([this.$refs.funnel, this.$refs.waterGauge, this.$refs.gauge1, this.$refs.gauge2]), true);
  784. },
  785. methods: {
  786. async getData() {
  787. this.getFireWaterStatistics();
  788. this.getFireWater(3);
  789. this.getPage()
  790. },
  791. /* 历史警情 */
  792. async getPage() {
  793. let yearDay = dayjs()
  794. .subtract(1, "day")
  795. .format("YYYY-MM-DD HH:mm:ss")
  796. .slice(0, 10);
  797. let res = await this.$axios.get(
  798. this.$api.jqzhcz.page2 +
  799. "?" +
  800. this.$qs.stringify({
  801. streetTown: this.stroes.$state.streetTown, //街镇
  802. current: 1,
  803. size: 150,
  804. startTime: yearDay + " 00:00:00",
  805. endTime: yearDay + " 23:59:59",
  806. })
  807. );
  808. if (res) {
  809. let data = res.data.records;
  810. for (let i = 0; i < data.length; i++) {
  811. data[i].lasj2 = data[i].lasj.slice(0, 10);
  812. }
  813. // this.tableData3 = data;
  814. }
  815. },
  816. /**
  817. * 撒点街镇选择
  818. */
  819. checkStreetTown(value) {
  820. let data = undefined;
  821. for (let i = 0; i < this.stroes.$state.mhjz.length; i++) {
  822. if (
  823. this.stroes.$state.streetTown ==
  824. this.stroes.$state.mhjz[i].streetTown
  825. ) {
  826. data = this.stroes.$state.mhjz[i];
  827. break;
  828. }
  829. }
  830. if (!this.stroes.$state.streetTown) {
  831. data = this.stroes.$state.mhjz[0];
  832. }
  833. if (this.stroes.$state.mapBool == 2) {
  834. this.streetTownSwitch(data);
  835. }
  836. // this.sadianSelect(this.checkedArray.checkedData[0]);
  837. },
  838. /* 水源情况表格 */
  839. async getFireWater(val) {
  840. if(val ==1 || val ==3){
  841. await this.$axios
  842. .get(
  843. this.$api.water.fireWater +
  844. "?" +
  845. this.$qs.stringify({
  846. current: 1,
  847. size: 50000,
  848. // startTime: this.stores.$state.timeList[0] || "",
  849. // endTime: this.stores.$state.timeList[1] || "",
  850. })
  851. )
  852. .then((res) => {
  853. if (res) {
  854. let data = res.data.records.map((val) => {
  855. return {
  856. ...val,
  857. waterGage: (+val.waterGage).toFixed(2) || 0,
  858. };
  859. });
  860. let data1 = []
  861. let data2 = []
  862. for(let i =0;i<data.length;i++){
  863. if(data[i].status == "0"){
  864. data1.push(data[i])
  865. }else{
  866. data2.push(data[i])
  867. }
  868. }
  869. this.tableData = data1.concat(data2)
  870. let arr = []
  871. if(val){
  872. if (this.stroes.$state.mapBool == 1) {
  873. if(val == "1") {
  874. for(let i = 0;i<this.tableData.length;i++){
  875. if(this.tableData[i].type == "消火栓" && this.tableData[i].status == "1"){
  876. arr.push(this.tableData[i])
  877. }
  878. }
  879. if(arr.length>0){
  880. this.initMarkers(arr, "water-sources","消火栓可用");
  881. }else{
  882. this.initMarkers([], "water-sources","消火栓可用");
  883. }
  884. }
  885. if(val == "3") {
  886. for(let i = 0;i<this.tableData.length;i++){
  887. if(this.tableData[i].type == "消火栓" && this.tableData[i].status == "0"){
  888. arr.push(this.tableData[i])
  889. }
  890. }
  891. if(arr.length>0){
  892. this.initMarkers(arr, "water-sources","消火栓不可用");
  893. }else{
  894. this.initMarkers([], "water-sources","消火栓不可用");
  895. }
  896. }
  897. }else{
  898. if(val == "1") {
  899. for(let i = 0;i<this.tableData.length;i++){
  900. if(this.tableData[i].type == "消火栓" && this.tableData[i].status == "1"){
  901. arr.push(this.tableData[i])
  902. }
  903. }
  904. if(arr.length>0){
  905. this.addMarker(arr, "water-sources","消火栓可用");
  906. }else{
  907. this.addMarker([], "water-sources","消火栓可用");
  908. }
  909. }
  910. if(val == "3") {
  911. for(let i = 0;i<this.tableData.length;i++){
  912. if(this.tableData[i].type == "消火栓" && this.tableData[i].status == "0"){
  913. arr.push(this.tableData[i])
  914. }
  915. }
  916. if(arr.length>0){
  917. this.addMarker(arr, "water-sources","消火栓不可用");
  918. }else{
  919. this.addMarker([], "water-sources","消火栓不可用");
  920. }
  921. }
  922. }
  923. }else{
  924. for(let i = 0;i<this.tableData.length;i++){
  925. if(this.tableData[i].type == "消火栓" && this.tableData[i].status == "1"){
  926. arr.push(this.tableData[i])
  927. }
  928. }
  929. setTimeout(()=>{
  930. this.addMarker(arr, "water-sources","消火栓可用");
  931. },500)
  932. }
  933. }
  934. })
  935. }else if(val ==2){
  936. await this.$axios.post(this.$api.water.baseGgpFacilityList,
  937. {
  938. facilityType:[1]
  939. }
  940. ).then((res) => {
  941. let arr = []
  942. if (res.data.length>0) {
  943. for(let i = 0;i<res.data.length;i++){
  944. arr.push(res.data[i])
  945. }
  946. if (this.stroes.$state.mapBool == 1) {
  947. this.initMarkers(arr, "water-sources","天然水源");
  948. }else{
  949. this.addMarker(arr, "water-sources","天然水源");
  950. }
  951. }else{
  952. if (this.stroes.$state.mapBool == 1) {
  953. this.initMarkers([], "water-sources","天然水源");
  954. }else{
  955. this.addMarker([], "water-sources","天然水源");
  956. }
  957. }
  958. })
  959. }
  960. },
  961. /* 水源情况 交互待定 */
  962. FireWaterListClick(row, event, column) {
  963. let arr = [];
  964. arr.push(row);
  965. // this.addMarker(arr,'water')
  966. },
  967. /* 消防水源数量 水源性质占比 (2模块)*/
  968. async getFireWaterStatistics() {
  969. let res = await this.$axios
  970. .get(
  971. this.$api.water.fireWaterStatistics +
  972. "?" +
  973. this.$qs.stringify({
  974. // startTime: this.stores.$state.timeList[0] || "",
  975. // endTime: this.stores.$state.timeList[1] || "",
  976. })
  977. )
  978. .then((res) => {
  979. if (res) {
  980. this.fireWaterStatisticsObj = res.data;
  981. this.fireWaterStatisticsObj.waterIntact = parseFloat(res.data.waterIntact.toFixed(2));
  982. let total = res.data.municipalWater + res.data.residentWater + res.data.unitWater; + 11 //市政用水 + 居民水源 + 单位用水
  983. let funnelList = [
  984. { name: "市政水源", reaVal: Number(((this.fireWaterStatisticsObj.municipalWater / total) * 100).toFixed(2)), data: this.fireWaterStatisticsObj.municipalWater },
  985. { name: "居民水源", reaVal: Number(((this.fireWaterStatisticsObj.residentWater / total) * 100).toFixed(2)), data: this.fireWaterStatisticsObj.residentWater },
  986. { name: "单位水源", reaVal: Number(((this.fireWaterStatisticsObj.unitWater / total) * 100).toFixed(2)), data: this.fireWaterStatisticsObj.unitWater },
  987. // { name: "天然水源", reaVal: Number(((this.fireWaterStatisticsObj.unitFireCode / total) * 100).toFixed(2)), data: this.fireWaterStatisticsObj.unitFireCode },
  988. { name: "天然水源", reaVal: Number(((11 / total) * 100).toFixed(2)), data: 11 },
  989. ].sort((a, b) => {
  990. return a.data - b.data;
  991. });
  992. // let funnelList = [
  993. // { name: "市政水源", reaVal: 50.62, data: 10047 },
  994. // { name: "居民水源", reaVal: 21.48, data: 4263 },
  995. // { name: "单位水源", reaVal: 27.84, data: 5526 },
  996. // { name: "天然水源", reaVal: 0.06, data: 11 },
  997. // ].sort((a, b) => {
  998. // return a.data - b.data;
  999. // });
  1000. funnelList.map((val, ind) => (val.value = ind * 20 + 20));
  1001. this.fireWaterStatisticsObj.funnelList = funnelList;
  1002. }
  1003. })
  1004. },
  1005. searchTime(val) {
  1006. this.timeArea = val;
  1007. this.getSiAeAllCollect();
  1008. },
  1009. /**
  1010. * @类型事件
  1011. */
  1012. checkboxChange(val) {
  1013. this.checkedArray.checkedData[0] = val
  1014. this.getFireWater(val)
  1015. },
  1016. },
  1017. };
  1018. </script>
  1019. <style lang="scss" scoped>
  1020. .contentBox {
  1021. .leftBox {
  1022. .leftTop {
  1023. height: 50%;
  1024. max-height: 50%;
  1025. .leftTopContent {
  1026. > .el-row {
  1027. margin-top: 1vh;
  1028. > .el-col {
  1029. margin-top: 0.5vh;
  1030. font-size: 0.2rem;
  1031. .c1 {
  1032. color: rgba(255, 199, 6, 0.5);
  1033. }
  1034. .c2 {
  1035. color: rgba(11, 255, 109, 0.6);
  1036. }
  1037. .c3 {
  1038. color: #fd0018;
  1039. }
  1040. .c4 {
  1041. color: rgba(255, 199, 6, 0.8);
  1042. }
  1043. }
  1044. }
  1045. }
  1046. }
  1047. .leftCenter {
  1048. height: calc(40% - 0.125rem);
  1049. max-height: calc(40% - 0.125rem);
  1050. margin-top: 0.125rem;
  1051. justify-content: space-between;
  1052. align-items: center;
  1053. box-sizing: border-box;
  1054. .leftCenterContent {
  1055. height: calc(100% - 0.4375rem);
  1056. display: flex;
  1057. .contentEcharts {
  1058. width: 50%;
  1059. padding-right: 0.25rem;
  1060. }
  1061. & > .el-row:last-child {
  1062. width: 50%;
  1063. display: flex;
  1064. justify-content: space-between;
  1065. align-items: center;
  1066. margin: auto 0;
  1067. & > .el-col {
  1068. width: 100%;
  1069. //height: 0.6875rem;
  1070. height: 0.5rem; //大屏
  1071. // background: url(~@a/img/enforce/bg5.png) no-repeat;
  1072. background-size: 100% 100%;
  1073. border-radius: 0.125rem;
  1074. padding: 0 0.3rem;
  1075. margin-bottom: 0.15rem;
  1076. display: flex;
  1077. justify-content: space-between;
  1078. align-items: center;
  1079. box-shadow: inset 0 0 0.2rem 0.0125rem #30cfff;
  1080. border: 1px solid transparent;
  1081. span {
  1082. background-image: linear-gradient(
  1083. 0deg,
  1084. #82b5ea 0%,
  1085. #52ffff 0%,
  1086. #2aacfa 100%
  1087. );
  1088. font-weight: 500;
  1089. color: #52ffff;
  1090. -webkit-background-clip: text;
  1091. -webkit-text-fill-color: transparent;
  1092. }
  1093. & > span:first-child {
  1094. font-size: 0.225rem;
  1095. }
  1096. & > span:last-child {
  1097. font-size: 0.35rem;
  1098. }
  1099. }
  1100. }
  1101. // & > .el-col:nth-child(1) {
  1102. // & > span:last-child {
  1103. // color: #fd0018;
  1104. // }
  1105. // }
  1106. // & > .el-col:nth-child(2) {
  1107. // & > span:last-child {
  1108. // color: #04e7ef;
  1109. // }
  1110. // }
  1111. // & > .el-col:nth-child(1) {
  1112. // & > span:last-child {
  1113. // color: #53fd00;
  1114. // }
  1115. // }
  1116. }
  1117. }
  1118. .leftCenter2 {
  1119. height: calc(60% - 0.125rem);
  1120. max-height: calc(60% - 0.125rem);
  1121. margin-top: 0.125rem;
  1122. justify-content: space-between;
  1123. align-items: center;
  1124. box-sizing: border-box;
  1125. .leftCenterContent {
  1126. height: calc(100% - 0.4375rem);
  1127. display: flex;
  1128. .contentEcharts {
  1129. width: 50%;
  1130. padding-right: 0.25rem;
  1131. }
  1132. & > .el-row:last-child {
  1133. width: 50%;
  1134. display: flex;
  1135. justify-content: space-between;
  1136. align-items: center;
  1137. margin: auto 0;
  1138. & > .el-col {
  1139. width: 100%;
  1140. //height: 0.6875rem;
  1141. height: 0.5rem; //大屏
  1142. // background: url(~@a/img/enforce/bg5.png) no-repeat;
  1143. background-size: 100% 100%;
  1144. border-radius: 0.125rem;
  1145. padding: 0 0.3rem;
  1146. margin-bottom: 0.15rem;
  1147. display: flex;
  1148. justify-content: space-between;
  1149. align-items: center;
  1150. box-shadow: inset 0 0 0.2rem 0.0125rem #30cfff;
  1151. border: 1px solid transparent;
  1152. span {
  1153. background-image: linear-gradient(
  1154. 0deg,
  1155. #82b5ea 0%,
  1156. #52ffff 0%,
  1157. #2aacfa 100%
  1158. );
  1159. font-weight: 500;
  1160. color: #52ffff;
  1161. -webkit-background-clip: text;
  1162. -webkit-text-fill-color: transparent;
  1163. }
  1164. & > span:first-child {
  1165. font-size: 0.225rem;
  1166. }
  1167. & > span:last-child {
  1168. font-size: 0.35rem;
  1169. }
  1170. }
  1171. }
  1172. }
  1173. }
  1174. }
  1175. .rightBox {
  1176. .rightTop {
  1177. height: 50%;
  1178. max-height: 50%;
  1179. .rightBoxContent {
  1180. width: 100%;
  1181. height: calc(100% - 0.4375rem);
  1182. display: flex;
  1183. flex-direction: column;
  1184. justify-content: space-between;
  1185. padding: 0.125rem 0;
  1186. box-sizing: border-box;
  1187. .funnelCon {
  1188. flex: 1;
  1189. width: 100%;
  1190. box-sizing: border-box;
  1191. padding: 0.125rem 0;
  1192. & > .el-col:last-child {
  1193. height: 100%;
  1194. display: flex;
  1195. flex-direction: column;
  1196. justify-content: space-between;
  1197. align-items: center;
  1198. flex-wrap: wrap;
  1199. & > .el-col {
  1200. width: 100%;
  1201. height: 0.625rem;
  1202. flex: none;
  1203. background-image: linear-gradient(
  1204. 90deg,
  1205. transparent 0%,
  1206. transparent 50%,
  1207. #06305a 80%,
  1208. #0e6dcc 100%
  1209. );
  1210. padding: 0 0.3rem;
  1211. display: flex;
  1212. justify-content: space-between;
  1213. align-items: center;
  1214. span {
  1215. font-weight: 500;
  1216. color: #fff;
  1217. }
  1218. & > span:first-child {
  1219. font-size: 0.2rem;
  1220. }
  1221. & > span:last-child {
  1222. font-size: 0.3rem;
  1223. }
  1224. }
  1225. & > .el-col:nth-child(1) {
  1226. & > span:last-child {
  1227. color: #ffe118;
  1228. }
  1229. }
  1230. & > .el-col:nth-child(2) {
  1231. & > span:last-child {
  1232. color: #0bff72;
  1233. }
  1234. }
  1235. & > .el-col:nth-child(3) {
  1236. & > span:last-child {
  1237. color: #00d4ff;
  1238. }
  1239. }
  1240. & > .el-col:nth-child(4) {
  1241. & > span:last-child {
  1242. color: rgba(12, 210, 0, 1);
  1243. }
  1244. }
  1245. }
  1246. }
  1247. .gaugeCon {
  1248. height: 1.25rem;
  1249. width: 100%;
  1250. & > .el-col {
  1251. height: 100%;
  1252. padding: 0.0625rem 0;
  1253. & > .el-row {
  1254. width: 100%;
  1255. height: 100%;
  1256. & > .el-col {
  1257. height: 100%;
  1258. background-image: linear-gradient(
  1259. 0deg,
  1260. rgba(9, 114, 156, 0.2),
  1261. transparent 20%,
  1262. transparent 80%,
  1263. rgba(9, 114, 156, 0.2)
  1264. );
  1265. // &:first-child {
  1266. // }
  1267. &:last-child {
  1268. display: flex;
  1269. align-items: flex-end;
  1270. justify-content: space-between;
  1271. flex-direction: column;
  1272. // padding: 0.25rem 0.375rem;
  1273. box-sizing: border-box;
  1274. div {
  1275. color: #fff;
  1276. margin: auto;
  1277. div:first-child {
  1278. font-size: 0.3rem;
  1279. }
  1280. div:last-child {
  1281. font-size: 0.2rem;
  1282. }
  1283. }
  1284. }
  1285. }
  1286. }
  1287. &:first-child {
  1288. padding-right: 0.125rem;
  1289. }
  1290. &:last-child {
  1291. padding-left: 0.125rem;
  1292. }
  1293. }
  1294. }
  1295. }
  1296. }
  1297. .rightCenter {
  1298. height: calc(50% - 0.125rem);
  1299. max-height: calc(50% - 0.125rem);
  1300. margin-top: 0.125rem;
  1301. flex: 1;
  1302. box-sizing: border-box;
  1303. .rightCenterContent {
  1304. height: calc(100% - 0.4375rem);
  1305. }
  1306. }
  1307. }
  1308. }
  1309. .color2 {
  1310. color:#fd0018;
  1311. }
  1312. .color1 {
  1313. color: #04e7ef;
  1314. }
  1315. // }
  1316. // & > .el-col:nth-child(2) {
  1317. // & > span:last-child {
  1318. // color: #04e7ef;
  1319. // }
  1320. // }
  1321. // & > .el-col:nth-child(1) {
  1322. // & > span:last-child {
  1323. // color: #53fd00;
  1324. // }
  1325. // }
  1326. </style>