12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346 |
- <template>
- <el-row class="contentBox">
- <transition name="el-fade-in-linear">
- <el-col class="leftBox" v-show="stroes.$state.leftBtn">
- <div class="leftCenter">
- <h4>消防水源数量</h4>
- <div class="leftCenterContent">
- <div class="contentEcharts">
- <water-gauge
- ref="waterGauge"
- :dataMap="
- fireWaterStatisticsObj.waterIntact || 0
- "
- ></water-gauge>
- </div>
- <el-row>
- <el-col>
- <span>市政消火栓</span
- ><span>{{
- fireWaterStatisticsObj.municipalFireCode
- }}</span>
- </el-col>
- <el-col>
- <span>社区消火栓</span
- ><span>{{
- fireWaterStatisticsObj.communityFireCode
- }}</span>
- </el-col>
- <el-col>
- <span>单位消火栓</span
- ><span>{{
- fireWaterStatisticsObj.unitFireCode
- }}</span>
- </el-col>
- <el-col>
- <!-- <span>天然水源</span><span>{{ fireWaterStatisticsObj.naturalWater }}</span> -->
- <span>天然水源</span><span>11</span>
- </el-col>
- </el-row>
- </div>
- </div>
- <div class="leftCenter2">
- <h4>各街镇消防水源情况</h4>
- <div class="leftCenterContent">
- <el-table
- :data="tableData3"
- class="transparentTableRow table1"
- height="100%"
- style="width: 100%; margin: 0 auto"
- >
- <el-table-column
- v-for="item in headerData3"
- :key="item.prop"
- :prop="item.prop"
- align="center"
- style="margin: 0 auto"
- min-width="20"
- :label="item.name"
- >
- <template
- v-if="
- item.prop === 'type' ||
- item.prop === 'lasj2' ||
- item.prop === 'ajzt' ||
- item.prop === 'afdz' ||
- item.prop === 'czdx' ||
- item.prop === 'zhongdui'
- "
- #default="scope"
- >
- <el-tooltip placement="right">
- <template #content>
- <div class="tableTooltip" ref="ff">
- <div class="tableTitle">
- <div>案件详情</div>
- </div>
- <img
- src="~@a/img/icon/close.png"
- alt=""
- class="close"
- @click="closeIsTooltip"
- />
- <el-row class="tableContent">
- <el-col
- :span="20"
- v-if="scope.row.ajbh"
- >案件编号:{{
- scope.row.ajbh
- }}</el-col
- >
- <el-col
- :span="24"
- v-if="scope.row.bcxx"
- >案件描述:{{
- scope.row.bcxx
- }}</el-col
- >
- <el-col
- :span="24"
- v-if="scope.row.tzsj"
- >报警时间:{{
- scope.row.tzsj
- }}</el-col
- >
- <el-col
- :span="24"
- v-if="scope.row.ajlx"
- >案件类型:{{
- scope.row.ajlx
- }}</el-col
- >
- <el-col
- :span="24"
- v-if="scope.row.type"
- >警情类别:{{
- scope.row.type
- }}</el-col
- >
- <el-col
- :span="24"
- v-if="scope.row.ajdj"
- >警情等级:{{
- scope.row.ajdj
- }}</el-col
- >
- <el-col
- :span="24"
- v-if="scope.row.afdz"
- >案发地址:{{
- scope.row.afdz
- }}</el-col
- >
- <el-col
- :span="24"
- v-if="scope.row.cdcl"
- >调动车辆:{{
- scope.row.cdcl
- }}</el-col
- >
- <el-col
- :span="24"
- v-if="scope.row.czdx"
- >处置对象:{{
- scope.row.czdx
- }}</el-col
- >
- <el-col
- :span="12"
- v-if="
- scope.row.zhongdui
- "
- >主责中队:{{
- scope.row.zhongdui
- }}</el-col
- >
- <el-col
- :span="12"
- v-if="scope.row.ajzt"
- >案件状态:{{
- scope.row.ajzt
- }}</el-col
- >
- <el-col
- :span="24"
- v-if="scope.row.dcsj"
- >到场时间:{{
- scope.row.dcsj
- }}</el-col
- >
- <el-col
- :span="24"
- v-if="scope.row.cssj"
- >出水时间:{{
- scope.row.cssj
- }}</el-col
- >
- <el-col
- :span="24"
- v-if="scope.row.kzsj"
- >控制时间:{{
- scope.row.kzsj
- }}</el-col
- >
- <el-col
- :span="24"
- v-if="scope.row.xmsj"
- >熄灭时间:{{
- scope.row.xmsj
- }}</el-col
- >
- <el-col
- :span="24"
- v-if="scope.row.fdsj"
- >返队时间:{{
- scope.row.fdsj
- }}</el-col
- >
- <el-col
- :span="24"
- v-if="
- scope.row.streettown
- "
- >所属街道:{{
- scope.row.streettown
- }}</el-col
- >
- </el-row>
- <el-row class="tablePersonnel">
- <el-col :span="7"> </el-col>
- </el-row>
- </div>
- </template>
- <template>
- <i
- class="iconfont"
- :class="
- scope.row['ajlxdm'] == '1'
- ? 'icon-huozai'
- : scope.row['ajlxdm'] ==
- '2'
- ? 'icon-jiuyuan'
- : scope.row['ajlxdm'] ==
- '3'
- ? 'icon-shehuijiuzhu'
- : 'icon-pbaj'
- "
- :style="{
- color:
- scope.row['ajdj'] ==
- '零级'
- ? '#49b8ff'
- : scope.row[
- 'ajdj'
- ] == '一级'
- ? '#eec10d'
- : scope.row[
- 'ajdj'
- ] == '二级'
- ? '#ff730c'
- : scope.row[
- 'ajdj'
- ] == '三级'
- ? '#ff0012'
- : '#2e98f2',
- }"
- v-if="item.prop === 'type'"
- ></i>
- <div class="name-wrapper" v-else>
- {{ scope.row[item.prop] }}
- </div>
- </template>
- </el-tooltip>
- </template>
- </el-table-column>
- </el-table>
- </div>
- </div>
- </el-col>
- </transition>
- <transition name="el-fade-in-linear">
- <el-col class="centerBox" style="width: 100%">
- <div
- :class="
- stroes.$state.leftBtn ? 'leftBtn btnW' : 'leftBtn0 btnW'
- "
- @click="stroes.leftBtnClick()"
- >
- <img src="@/assets/img/svg/left.svg" alt="" class="img" />
- </div>
- <el-col class="centerContent" id="mapF"></el-col>
- <div
- :class="
- stroes.$state.rightBtn
- ? 'rightBtn btnW'
- : 'rightBtn0 btnW'
- "
- @click="stroes.rightBtnClick()"
- >
- <img src="@/assets/img/svg/left.svg" alt="" class="img" />
- </div>
- <div class="mapTips_type">
- <img
- src="@/assets/img/svg/danweitop.svg"
- alt=""
- class="img"
- />
- <div class="content">
- <p>街镇筛选</p>
- <el-select
- class="mtb-12"
- v-model="stroes.$state.streetTown"
- placeholder="请选择街镇"
- @change="checkStreetTown"
- >
- <el-option
- v-for="item in stroes.$state.streetTownList"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- >
- </el-option>
- </el-select>
- <p>类型筛选</p>
- <div class="selectType">
- <div
- @click="checkboxChange(1)"
- :class="
- checkedArray.checkedData[0] == 1
- ? 'checkTypeSelect'
- : ''
- "
- >
- <img :src="stores.sadianIcon.xhs" alt="" />
- <span>消火栓(可用)</span>
- </div>
- <div
- @click="checkboxChange(3)"
- :class="
- checkedArray.checkedData[0] == 3
- ? 'checkTypeSelect'
- : ''
- "
- >
- <img :src="stores.sadianIcon.xhsH" alt="" />
- <span>消火栓(不可用)</span>
- </div>
- <div
- @click="checkboxChange(2)"
- :class="
- checkedArray.checkedData[0] == 2
- ? 'checkTypeSelect'
- : ''
- "
- >
- <img :src="stores.sadianIcon.trsy" alt="" />
- <span>天然水源</span>
- </div>
- </div>
- </div>
- </div>
- </el-col>
- </transition>
- <transition name="el-fade-in-linear">
- <el-col class="rightBox" v-show="stroes.$state.rightBtn">
- <div class="rightTop">
- <h4>水源性质占比</h4>
- <div class="rightBoxContent">
- <el-row class="funnelCon">
- <el-col :span="16">
- <funnel
- ref="funnel"
- :dataMap="
- fireWaterStatisticsObj.funnelList || []
- "
- ></funnel>
- </el-col>
- <el-col :span="8">
- <el-col
- v-for="item in fireWaterStatisticsObj.funnelList ||
- []"
- :key="item.name"
- >
- <span>{{ item.name }}</span>
- <span>{{ item.data }}</span>
- </el-col>
- </el-col>
- </el-row>
- <el-row class="gaugeCon">
- <el-col :span="12">
- <el-row>
- <el-col :span="12">
- <gauge
- ref="gauge1"
- :dataMap="
- fireWaterStatisticsObj.municipalGetWaterRadio ||
- 0
- "
- color="#1AF3FD"
- ></gauge>
- </el-col>
- <el-col :span="12">
- <div>
- <div style="color: #1af3fd">
- {{
- fireWaterStatisticsObj.municipalGetWater
- }}
- </div>
- <div>市政取水</div>
- </div>
- </el-col>
- </el-row>
- </el-col>
- <el-col :span="12">
- <el-row>
- <el-col :span="12">
- <gauge
- ref="gauge2"
- :dataMap="
- fireWaterStatisticsObj.landGetWaterRadio ||
- 0
- "
- color="#FDC51A"
- ></gauge>
- </el-col>
- <el-col :span="12">
- <div>
- <div style="color: #fdc51a">
- {{
- fireWaterStatisticsObj.landGetWater
- }}
- </div>
- <div>地上取水</div>
- </div>
- </el-col>
- </el-row>
- </el-col>
- </el-row>
- </div>
- </div>
- <div class="rightCenter">
- <h4>水源情况</h4>
- <div class="rightCenterContent">
- <el-table
- :data="tableData"
- class="transparentTableRow"
- height="100%"
- @row-click="FireWaterListClick"
- >
- <el-table-column
- v-for="item in headerData"
- show-overflow-tooltip
- :key="item.prop"
- :prop="item.prop"
- align="center"
- min-width="20"
- :label="item.name"
- >
- <template
- v-if="item.prop === 'type'"
- #default="scope"
- >
- <el-popover
- trigger="hover"
- placement="left"
- >
- <template #default>
- <div class="tableTooltip">
- <div class="tableTitle">
- <div>
- {{ scope.row.type }}
- </div>
- </div>
- <el-row class="tableContent">
- <el-col
- :span="24"
- v-if="scope.row.address"
- >水源位置:{{
- scope.row.address
- }}</el-col
- >
- <el-col
- :span="12"
- v-if="
- scope.row.dutyPerson
- "
- >责任人:{{
- scope.row.dutyPerson
- }}</el-col
- >
- <el-col
- :span="12"
- v-if="scope.row.phone"
- >电话:{{
- scope.row.phone
- }}</el-col
- >
- <el-col
- :span="24"
- v-if="
- scope.row
- .detachmentName
- "
- >支队名称:{{
- scope.row
- .detachmentName
- }}</el-col
- >
- <el-col
- :span="12"
- v-if="
- scope.row
- .jurisdictionalAgency
- "
- >管辖机构:{{
- scope.row
- .jurisdictionalAgency
- }}</el-col
- >
- <el-col
- :span="12"
- v-if="scope.row.type"
- >水源类型:{{
- scope.row.type
- }}</el-col
- >
- <el-col
- :span="12"
- v-if="
- scope.row
- .getWaterType
- "
- >取水形式:{{
- scope.row
- .getWaterType
- }}</el-col
- >
- <el-col
- :span="12"
- v-if="
- scope.row.waterGage
- "
- >水压(Mpa):{{
- scope.row.waterGage
- }}</el-col
- >
- <el-col
- :span="12"
- v-if="
- scope.row
- .waterAdministrative
- "
- >水源性质:{{
- scope.row
- .waterAdministrative
- }}</el-col
- >
- <el-col
- :span="24"
- v-if="
- scope.row.waterUnit
- "
- >供水单位:{{
- scope.row.waterUnit
- }}</el-col
- >
- <el-col
- :span="12"
- v-if="
- scope.row.waterUnit
- "
- >状态:<span
- :class="
- scope.row
- .status ==
- '1'
- ? 'color1'
- : 'color2'
- "
- >{{
- scope.row
- .status == 1
- ? "可用"
- : "不可用"
- }}</span
- ></el-col
- >
- </el-row>
- </div>
- </template>
- <template #reference>
- <div>
- {{ scope.row.type }}
- </div>
- </template>
- </el-popover>
- </template>
- <template v-else #default="scope">
- <img
- style="width: 0.4rem"
- v-if="item.prop === 'status'"
- :src="
- item.prop === 'status'
- ? scope.row[item.prop] == '1'
- ? stores.sadianIcon.xhs
- : stores.sadianIcon.xhsH
- : stores.sadianIcon.xhs
- "
- alt=""
- />
- <span
- v-else
- :class="
- item.prop === 'status'
- ? scope.row[item.prop] == '1'
- ? 'color1'
- : 'color2'
- : ''
- "
- >
- {{
- item.prop === "status"
- ? scope.row[item.prop] == 1
- ? "可用"
- : "不可用"
- : scope.row[item.prop]
- }}</span
- >
- </template>
- </el-table-column>
- </el-table>
- </div>
- </div>
- </el-col>
- </transition>
- </el-row>
- </template>
- <script>
- import linstener from "@c/mixins/linstener";
- import map from "@c/mixins/map-data1";
- // import map from "@c/mixins/map-gaode-public";
- import waterGauge from "@c/water-gauge";
- import gauge from "@c/gauge/index4";
- // import seTable from "@c/se-table/index2";
- import funnel from "@c/funnel";
- import { getYearMonthDateSFN, getMonthStartAndEnd } from "../assets/js/dataFormate";
- // TODO 高德地图
- // import AMap from 'AMap'
- export default {
- mixins: [linstener, map],
- components: { waterGauge, funnel, gauge },
- data() {
- return {
- stores: this.$useStore(),
- checkedArray: {
- checkedData: [3],
- checkedList: [
- { value: 1, label: "市政取水点" },
- { value: 2, label: "社区取水点" },
- { value: 3, label: "单位取水点" },
- ],
- }, //类型筛选-数据存储
- cldt:[],//车辆动态
- timeArea: "day",
- unitBeOnDutyList: [],
- tableData: [],
- headerData: [
- { prop: "type", name: "类型" },
- { prop: "address", name: "位置" },
- { prop: "jurisdictionalAgency", name: "管辖机构" },
- { prop: "getWaterType", name: "取水形式" },
- { prop: "waterGage", name: "水压(Mpa)" },
- { prop: "status", name: "状态" },
- ],
- fireWaterStatisticsObj: {
- funnelList: [
- { data: 0, reaVal: 0, value: 20 },
- { data: 0, reaVal: 0, value: 40 },
- { data: 0, reaVal: 0, value: 60 },
- { data: 0, reaVal: 0, value: 80 },
- ],
- },
- tableData3: [
- {
- a0:"申虹",
- a1:"864",
- a2:"234",
- a3:"521",
- a4:"0",
- a5:"100%",
- },
- {
- a0:"支队",
- a1:"654",
- a2:"95",
- a3:"452",
- a4:"0",
- a5:"100%",
- },
- {
- a0:"七宝",
- a1:"354",
- a2:"267",
- a3:"431",
- a4:"0",
- a5:"99%",
- },
- {
- a0:"光华",
- a1:"942",
- a2:"324",
- a3:"368",
- a4:"0",
- a5:"100%",
- },
- {
- a0:"华漕",
- a1:"854",
- a2:"354",
- a3:"269",
- a4:"0",
- a5:"99%",
- },
- {
- a0:"吴泾",
- a1:"651",
- a2:"524",
- a3:"459",
- a4:"8",
- a5:"98%",
- },
- {
- a0:"新虹",
- a1:"324",
- a2:"268",
- a3:"410",
- a4:"0",
- a5:"99%",
- },
- {
- a0:"杜行",
- a1:"964",
- a2:"352",
- a3:"425",
- a4:"1",
- a5:"100%",
- },
- {
- a0:"浦江",
- a1:"568",
- a2:"265",
- a3:"423",
- a4:"0",
- a5:"100%",
- },
- {
- a0:"莘庄",
- a1:"569",
- a2:"346",
- a3:"426",
- a4:"0",
- a5:"100%",
- },
- {
- a0:"闵行",
- a1:"864",
- a2:"265",
- a3:"402",
- a4:"1",
- a5:"100%",
- },
- {
- a0:"颛桥",
- a1:"864",
- a2:"325",
- a3:"201",
- a4:"0",
- a5:"98%",
- },
- {
- a0:"马桥",
- a1:"864",
- a2:"319",
- a3:"401",
- a4:"1",
- a5:"99%",
- },
- ],
- headerData3: [
- { prop: "a0", name: "支队名称" },
- { prop: "a1", name: "市政消火栓" },
- { prop: "a2", name: "社区消火栓" },
- { prop: "a3", name: "单位消火栓" },
- { prop: "a4", name: "天然水源" },
- { prop: "a5", name: "水源完好率" },
-
- ],
- };
- },
- created() {
- this.getData();
- },
- mounted() {
- this.initMap();
- window.addEventListener("resize", () => this.resizeTimeActions([this.$refs.funnel, this.$refs.waterGauge, this.$refs.gauge1, this.$refs.gauge2]), true);
- },
- methods: {
- async getData() {
- this.getFireWaterStatistics();
- this.getFireWater(3);
- this.getPage()
- },
- /* 历史警情 */
- async getPage() {
- let yearDay = dayjs()
- .subtract(1, "day")
- .format("YYYY-MM-DD HH:mm:ss")
- .slice(0, 10);
- let res = await this.$axios.get(
- this.$api.jqzhcz.page2 +
- "?" +
- this.$qs.stringify({
- streetTown: this.stroes.$state.streetTown, //街镇
- current: 1,
- size: 150,
- startTime: yearDay + " 00:00:00",
- endTime: yearDay + " 23:59:59",
- })
- );
- if (res) {
- let data = res.data.records;
- for (let i = 0; i < data.length; i++) {
- data[i].lasj2 = data[i].lasj.slice(0, 10);
- }
- // this.tableData3 = data;
- }
- },
- /**
- * 撒点街镇选择
- */
- checkStreetTown(value) {
- let data = undefined;
- for (let i = 0; i < this.stroes.$state.mhjz.length; i++) {
- if (
- this.stroes.$state.streetTown ==
- this.stroes.$state.mhjz[i].streetTown
- ) {
- data = this.stroes.$state.mhjz[i];
- break;
- }
- }
- if (!this.stroes.$state.streetTown) {
- data = this.stroes.$state.mhjz[0];
- }
- if (this.stroes.$state.mapBool == 2) {
- this.streetTownSwitch(data);
- }
- // this.sadianSelect(this.checkedArray.checkedData[0]);
- },
- /* 水源情况表格 */
- async getFireWater(val) {
- if(val ==1 || val ==3){
- await this.$axios
- .get(
- this.$api.water.fireWater +
- "?" +
- this.$qs.stringify({
- current: 1,
- size: 50000,
- // startTime: this.stores.$state.timeList[0] || "",
- // endTime: this.stores.$state.timeList[1] || "",
- })
- )
- .then((res) => {
- if (res) {
- let data = res.data.records.map((val) => {
- return {
- ...val,
- waterGage: (+val.waterGage).toFixed(2) || 0,
- };
- });
- let data1 = []
- let data2 = []
- for(let i =0;i<data.length;i++){
- if(data[i].status == "0"){
- data1.push(data[i])
- }else{
- data2.push(data[i])
- }
- }
- this.tableData = data1.concat(data2)
- let arr = []
- if(val){
- if (this.stroes.$state.mapBool == 1) {
- if(val == "1") {
- for(let i = 0;i<this.tableData.length;i++){
- if(this.tableData[i].type == "消火栓" && this.tableData[i].status == "1"){
- arr.push(this.tableData[i])
- }
- }
- if(arr.length>0){
- this.initMarkers(arr, "water-sources","消火栓可用");
- }else{
- this.initMarkers([], "water-sources","消火栓可用");
- }
- }
- if(val == "3") {
- for(let i = 0;i<this.tableData.length;i++){
- if(this.tableData[i].type == "消火栓" && this.tableData[i].status == "0"){
- arr.push(this.tableData[i])
- }
- }
- if(arr.length>0){
- this.initMarkers(arr, "water-sources","消火栓不可用");
- }else{
- this.initMarkers([], "water-sources","消火栓不可用");
- }
- }
- }else{
- if(val == "1") {
- for(let i = 0;i<this.tableData.length;i++){
- if(this.tableData[i].type == "消火栓" && this.tableData[i].status == "1"){
- arr.push(this.tableData[i])
- }
- }
- if(arr.length>0){
- this.addMarker(arr, "water-sources","消火栓可用");
- }else{
- this.addMarker([], "water-sources","消火栓可用");
- }
- }
- if(val == "3") {
- for(let i = 0;i<this.tableData.length;i++){
- if(this.tableData[i].type == "消火栓" && this.tableData[i].status == "0"){
- arr.push(this.tableData[i])
- }
- }
- if(arr.length>0){
- this.addMarker(arr, "water-sources","消火栓不可用");
- }else{
- this.addMarker([], "water-sources","消火栓不可用");
- }
- }
- }
- }else{
- for(let i = 0;i<this.tableData.length;i++){
- if(this.tableData[i].type == "消火栓" && this.tableData[i].status == "1"){
- arr.push(this.tableData[i])
- }
- }
- setTimeout(()=>{
- this.addMarker(arr, "water-sources","消火栓可用");
- },500)
- }
- }
- })
- }else if(val ==2){
- await this.$axios.post(this.$api.water.baseGgpFacilityList,
- {
- facilityType:[1]
- }
- ).then((res) => {
- let arr = []
- if (res.data.length>0) {
- for(let i = 0;i<res.data.length;i++){
- arr.push(res.data[i])
- }
- if (this.stroes.$state.mapBool == 1) {
- this.initMarkers(arr, "water-sources","天然水源");
- }else{
- this.addMarker(arr, "water-sources","天然水源");
- }
- }else{
- if (this.stroes.$state.mapBool == 1) {
- this.initMarkers([], "water-sources","天然水源");
- }else{
- this.addMarker([], "water-sources","天然水源");
- }
- }
- })
- }
-
- },
- /* 水源情况 交互待定 */
- FireWaterListClick(row, event, column) {
- let arr = [];
- arr.push(row);
- // this.addMarker(arr,'water')
- },
- /* 消防水源数量 水源性质占比 (2模块)*/
- async getFireWaterStatistics() {
- let res = await this.$axios
- .get(
- this.$api.water.fireWaterStatistics +
- "?" +
- this.$qs.stringify({
- // startTime: this.stores.$state.timeList[0] || "",
- // endTime: this.stores.$state.timeList[1] || "",
- })
- )
- .then((res) => {
- if (res) {
- this.fireWaterStatisticsObj = res.data;
- this.fireWaterStatisticsObj.waterIntact = parseFloat(res.data.waterIntact.toFixed(2));
- let total = res.data.municipalWater + res.data.residentWater + res.data.unitWater; + 11 //市政用水 + 居民水源 + 单位用水
- let funnelList = [
- { name: "市政水源", reaVal: Number(((this.fireWaterStatisticsObj.municipalWater / total) * 100).toFixed(2)), data: this.fireWaterStatisticsObj.municipalWater },
- { name: "居民水源", reaVal: Number(((this.fireWaterStatisticsObj.residentWater / total) * 100).toFixed(2)), data: this.fireWaterStatisticsObj.residentWater },
- { name: "单位水源", reaVal: Number(((this.fireWaterStatisticsObj.unitWater / total) * 100).toFixed(2)), data: this.fireWaterStatisticsObj.unitWater },
- // { name: "天然水源", reaVal: Number(((this.fireWaterStatisticsObj.unitFireCode / total) * 100).toFixed(2)), data: this.fireWaterStatisticsObj.unitFireCode },
- { name: "天然水源", reaVal: Number(((11 / total) * 100).toFixed(2)), data: 11 },
- ].sort((a, b) => {
- return a.data - b.data;
- });
- // let funnelList = [
- // { name: "市政水源", reaVal: 50.62, data: 10047 },
- // { name: "居民水源", reaVal: 21.48, data: 4263 },
- // { name: "单位水源", reaVal: 27.84, data: 5526 },
- // { name: "天然水源", reaVal: 0.06, data: 11 },
- // ].sort((a, b) => {
- // return a.data - b.data;
- // });
- funnelList.map((val, ind) => (val.value = ind * 20 + 20));
- this.fireWaterStatisticsObj.funnelList = funnelList;
- }
- })
- },
- searchTime(val) {
- this.timeArea = val;
- this.getSiAeAllCollect();
- },
- /**
- * @类型事件
- */
- checkboxChange(val) {
- this.checkedArray.checkedData[0] = val
- this.getFireWater(val)
- },
- },
- };
- </script>
- <style lang="scss" scoped>
- .contentBox {
- .leftBox {
- .leftTop {
- height: 50%;
- max-height: 50%;
- .leftTopContent {
- > .el-row {
- margin-top: 1vh;
- > .el-col {
- margin-top: 0.5vh;
- font-size: 0.2rem;
- .c1 {
- color: rgba(255, 199, 6, 0.5);
- }
- .c2 {
- color: rgba(11, 255, 109, 0.6);
- }
- .c3 {
- color: #fd0018;
- }
- .c4 {
- color: rgba(255, 199, 6, 0.8);
- }
- }
- }
- }
- }
- .leftCenter {
- height: calc(40% - 0.125rem);
- max-height: calc(40% - 0.125rem);
- margin-top: 0.125rem;
- justify-content: space-between;
- align-items: center;
- box-sizing: border-box;
- .leftCenterContent {
- height: calc(100% - 0.4375rem);
- display: flex;
- .contentEcharts {
- width: 50%;
- padding-right: 0.25rem;
- }
- & > .el-row:last-child {
- width: 50%;
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin: auto 0;
- & > .el-col {
- width: 100%;
- //height: 0.6875rem;
- height: 0.5rem; //大屏
- // background: url(~@a/img/enforce/bg5.png) no-repeat;
- background-size: 100% 100%;
- border-radius: 0.125rem;
- padding: 0 0.3rem;
- margin-bottom: 0.15rem;
- display: flex;
- justify-content: space-between;
- align-items: center;
- box-shadow: inset 0 0 0.2rem 0.0125rem #30cfff;
- border: 1px solid transparent;
- span {
- background-image: linear-gradient(
- 0deg,
- #82b5ea 0%,
- #52ffff 0%,
- #2aacfa 100%
- );
- font-weight: 500;
- color: #52ffff;
- -webkit-background-clip: text;
- -webkit-text-fill-color: transparent;
- }
- & > span:first-child {
- font-size: 0.225rem;
- }
- & > span:last-child {
- font-size: 0.35rem;
- }
- }
- }
- // & > .el-col:nth-child(1) {
- // & > span:last-child {
- // color: #fd0018;
- // }
- // }
- // & > .el-col:nth-child(2) {
- // & > span:last-child {
- // color: #04e7ef;
- // }
- // }
- // & > .el-col:nth-child(1) {
- // & > span:last-child {
- // color: #53fd00;
- // }
- // }
- }
- }
- .leftCenter2 {
- height: calc(60% - 0.125rem);
- max-height: calc(60% - 0.125rem);
- margin-top: 0.125rem;
- justify-content: space-between;
- align-items: center;
- box-sizing: border-box;
- .leftCenterContent {
- height: calc(100% - 0.4375rem);
- display: flex;
- .contentEcharts {
- width: 50%;
- padding-right: 0.25rem;
- }
- & > .el-row:last-child {
- width: 50%;
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin: auto 0;
- & > .el-col {
- width: 100%;
- //height: 0.6875rem;
- height: 0.5rem; //大屏
- // background: url(~@a/img/enforce/bg5.png) no-repeat;
- background-size: 100% 100%;
- border-radius: 0.125rem;
- padding: 0 0.3rem;
- margin-bottom: 0.15rem;
- display: flex;
- justify-content: space-between;
- align-items: center;
- box-shadow: inset 0 0 0.2rem 0.0125rem #30cfff;
- border: 1px solid transparent;
- span {
- background-image: linear-gradient(
- 0deg,
- #82b5ea 0%,
- #52ffff 0%,
- #2aacfa 100%
- );
- font-weight: 500;
- color: #52ffff;
- -webkit-background-clip: text;
- -webkit-text-fill-color: transparent;
- }
- & > span:first-child {
- font-size: 0.225rem;
- }
- & > span:last-child {
- font-size: 0.35rem;
- }
- }
- }
- }
- }
- }
- .rightBox {
- .rightTop {
- height: 50%;
- max-height: 50%;
- .rightBoxContent {
- width: 100%;
- height: calc(100% - 0.4375rem);
- display: flex;
- flex-direction: column;
- justify-content: space-between;
- padding: 0.125rem 0;
- box-sizing: border-box;
- .funnelCon {
- flex: 1;
- width: 100%;
- box-sizing: border-box;
- padding: 0.125rem 0;
- & > .el-col:last-child {
- height: 100%;
- display: flex;
- flex-direction: column;
- justify-content: space-between;
- align-items: center;
- flex-wrap: wrap;
- & > .el-col {
- width: 100%;
- height: 0.625rem;
- flex: none;
- background-image: linear-gradient(
- 90deg,
- transparent 0%,
- transparent 50%,
- #06305a 80%,
- #0e6dcc 100%
- );
- padding: 0 0.3rem;
- display: flex;
- justify-content: space-between;
- align-items: center;
- span {
- font-weight: 500;
- color: #fff;
- }
- & > span:first-child {
- font-size: 0.2rem;
- }
- & > span:last-child {
- font-size: 0.3rem;
- }
- }
- & > .el-col:nth-child(1) {
- & > span:last-child {
- color: #ffe118;
- }
- }
- & > .el-col:nth-child(2) {
- & > span:last-child {
- color: #0bff72;
- }
- }
- & > .el-col:nth-child(3) {
- & > span:last-child {
- color: #00d4ff;
- }
- }
- & > .el-col:nth-child(4) {
- & > span:last-child {
- color: rgba(12, 210, 0, 1);
- }
- }
- }
- }
- .gaugeCon {
- height: 1.25rem;
- width: 100%;
- & > .el-col {
- height: 100%;
- padding: 0.0625rem 0;
- & > .el-row {
- width: 100%;
- height: 100%;
- & > .el-col {
- height: 100%;
- background-image: linear-gradient(
- 0deg,
- rgba(9, 114, 156, 0.2),
- transparent 20%,
- transparent 80%,
- rgba(9, 114, 156, 0.2)
- );
- // &:first-child {
- // }
- &:last-child {
- display: flex;
- align-items: flex-end;
- justify-content: space-between;
- flex-direction: column;
- // padding: 0.25rem 0.375rem;
- box-sizing: border-box;
- div {
- color: #fff;
- margin: auto;
- div:first-child {
- font-size: 0.3rem;
- }
- div:last-child {
- font-size: 0.2rem;
- }
- }
- }
- }
- }
- &:first-child {
- padding-right: 0.125rem;
- }
- &:last-child {
- padding-left: 0.125rem;
- }
- }
- }
- }
- }
- .rightCenter {
- height: calc(50% - 0.125rem);
- max-height: calc(50% - 0.125rem);
- margin-top: 0.125rem;
- flex: 1;
- box-sizing: border-box;
- .rightCenterContent {
- height: calc(100% - 0.4375rem);
- }
- }
- }
- }
- .color2 {
- color:#fd0018;
- }
- .color1 {
- color: #04e7ef;
- }
- // }
- // & > .el-col:nth-child(2) {
- // & > span:last-child {
- // color: #04e7ef;
- // }
- // }
- // & > .el-col:nth-child(1) {
- // & > span:last-child {
- // color: #53fd00;
- // }
- // }
- </style>
|