| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954 |
- <!--
- * @Title:
- * @Description: 管理工作台
- * @Author: swp
- * @Date: 2022-08-24 10:49:21
- * @LastEditors:
- * @LastEditTime: 2022-08-24 10:49:21
- -->
- <template>
- <view class="container">
- <uni-nav-bar :fixed="true" backgroundColor="#3F9EFF" statusBar="false" height="75px">
- <view style="width:100%;display: flex;flex-direction: row;justify-content: center;align-items: center;">
- <text style="color: #ffffff; font-size: 1rem;font-family: Microsoft YaHei;">{{title}}</text>
- </view>
- </uni-nav-bar>
- <view v-if="subSystem == 1">
- <uni-section title="查询" type="line">
- <view class="search-block">
- <view class="adcd-adnm">
- <uni-data-picker placeholder="请选择地区" popup-title="请选择所在地区" :localdata="regionTree"
- v-model="selectedTreeNode" @change="onTreeChange" @nodeclick="onTreeNodeClick"
- @popupopened="onTreePopupOpened" @popupclosed="onTreePopupClosed" :clear-icon="false">
- </uni-data-picker>
- </view>
- <view class="rtu-code">
- <uni-easyinput :styles="inputStyles" @input="searchRtuCodeValClear" prefixIcon="search"
- v-model="searchRtuCodeVal" placeholder="请输入测站编码">
- </uni-easyinput>
- </view>
- <view class="rtu-name">
- <uni-easyinput :styles="inputStyles" @input="searchRtuNameValClear" prefixIcon="search"
- v-model="searchRtuNameVal" placeholder="请输入测站名称">
- </uni-easyinput>
- </view>
- <view class="submit-btn">
- <button type="default" @click="search">查 询</button>
- </view>
- </view>
- </uni-section>
- <view class="count-info-line">
- <view class="rtuCount">
- <span class="name">测站数量: </span>
- <span v-if="countInfo.rtuCount" class="count">{{ countInfo.rtuCount }}</span>
- </view>
- <view class="warnRtuCount">
- <span class="name">异常测站数量: </span>
- <span v-if="countInfo.warningRtuCount" class="count">{{
- countInfo.warningRtuCount }}</span>
- </view>
- </view>
- <view style="padding-left: 0px;padding-right: 0px;">
- <uni-collapse v-model="value">
- <uni-collapse-item title="异常类别筛选条件" :show-animation="true">
- <view class="select-checkbox">
- <uni-data-checkbox v-model="warnKindOption" :localdata="warnKindItems"
- @change="warnKindOptionChange">
- </uni-data-checkbox>
- </view>
- </uni-collapse-item>
- </uni-collapse>
- </view>
- <uni-list>
- <uni-list-item v-for="item in list" :key="item.id">
- <template v-slot:body>
- <view class="list-item-block">
- <uni-row>
- <uni-col :span="20">
- <view class="items-line">
- <image v-if="item.runStatusId==1" class="item-title-run-status-icon"
- mode="widthFix" src="/static/images/icon_warning.png">
- </image>
- <image v-else class="item-title-run-status-icon" mode="widthFix"
- src="/static/images/icon_ok.png">
- </image>
- <text class="item-title-rtu-name">{{item.rtuName}}</text>
- <text class="item-title-rtu-code">[{{item.rtuCode}}]</text>
- </view>
- </uni-col>
- <uni-col :span="4">
- <view class="items-line" style="padding-top: 5px;"
- @click="onRtuDetailClick(item.rtuCode)">
- <text
- style="text-decoration-line: underline;font-size: 0.6rem;color:gray;">测站信息</text>
- </view>
- </uni-col>
- </uni-row>
- <view class="items-line">
- <uni-icons class="input-uni-icon" type="calendar" size="18" color="lightblue" />
- <text class="item-up-time-text">最后上线时间:</text>
- <text class="item-up-time-text">{{item.lastUpTime}}</text>
- </view>
- <view v-if="item.runStatusId==1" class="items-line">
- <uni-icons class="input-uni-icon" type="bars" size="18" color="lightblue" />
- <text class="item-up-time-text">异常类型:</text>
- <text class="item-up-time-text">{{item.warnKindInfo}}</text>
- </view>
- <view class="items-line">
- <uni-icons class="input-uni-icon" type="location" size="18" color="lightblue" />
- <text class="item-adcd-adnm-text">{{item.areaName}}</text>
- </view>
- <view class="item-button-group">
- <view class="item-button" @click="onLocationClick(item)">
- <view class="items-line">
- <uni-icons class="input-uni-icon" type="location" size="18" color="coral" />
- <text class="button-text">导航</text>
- </view>
- </view>
- <view class="item-button" @click="onWarningPageClick(item.rtuCode)">
- <view class="items-line">
- <uni-icons class="input-uni-icon" type="gear" size="18" color="coral" />
- <text class="button-text">异常信息</text>
- </view>
- </view>
- <view class="item-button" @click="onCheckOrderPageClick(item.rtuCode)">
- <view class="items-line">
- <uni-icons class="input-uni-icon" type="gear" size="18" color="coral" />
- <text class="button-text">维修任务</text>
- </view>
- </view>
- <view class="item-button" @click="onInspectionReportClick(item.rtuCode)">
- <view class="items-line">
- <uni-icons class="input-uni-icon" type="reload" size="18" color="coral" />
- <text class="button-text">设备巡检</text>
- </view>
- </view>
- <view class="item-button" @click="onSiteRealDataClick(item)">
- <view class="items-line">
- <uni-icons class="input-uni-icon" type="info" size="18" color="coral" />
- <text class="button-text">实时数据</text>
- </view>
- </view>
- <view v-if="permission.admin || permission.orgAdmin" class="item-button"
- @click="onManuallyOrderClick(item.rtuCode)">
- <view class="items-line">
- <uni-icons class="input-uni-icon" type="email" size="18" color="coral" />
- <text class="button-text">人工派单</text>
- </view>
- </view>
- </view>
- </view>
- </template>
- </uni-list-item>
- </uni-list>
- <uni-group>
- <view class="pagination-block">
- <uni-pagination show-icon :page-size="pageSize" :current="pageCurrent" :total="total"
- @change="pageChange" />
- </view>
- </uni-group>
- </view>
- <!-- 应急系统 -->
- <view v-else-if="subSystem == 2">
- <view style="width: 100%;">
- <map id="myMap" ref="myMap" :style="mapStyles" :latitude="latitude" :longitude="longitude"
- :markers="markets" :polygons="polygons" :scale="scale" :polyline="polylines">
- <cover-view style="line-height: normal;width: 100%;">
- <cover-view style="width:50px;height:50px;position: absolute;top: 20px;right: 10px;">
- <cover-view v-if="mapScreenMin" style="width:50px;height:50px;background-color: orange;">
- <cover-image style="width: 50px;height: 50px;" src="/static/images/icon_quanping.png"
- @click="onMapScreenMax"></cover-image>
- </cover-view>
- <cover-view v-if="mapScreenMax" style="width:50px;height:50px;background-color: orange;">
- <cover-image style="width: 50px;height: 50px;" src="/static/images/icon_feiquanping.png"
- @click="onMapScreenMin"></cover-image>
- </cover-view>
- </cover-view>
- </cover-view>
- </map>
- <view :style="popViewStyles">
- <view :style="searchViewStyles">
- <uni-section title="实时监测数据" titleFontSize="1rem" type="circle">
- <template v-slot:right>
- <view v-if="contentViewStatus==0" class="view-flex-inline" style="margin-right: 10px;"
- @click="onYjRainDataRefreshClick">
- <uni-icons class="input-uni-icon" type="refresh" size="18" color="skyblue" />
- <view style="color: gray;font-size: 0.9rem;margin-left: 5px;margin-right: 5px;">
- 刷新</view>
- </view>
- <view v-else-if="contentViewStatus==1" class="view-flex-inline"
- style="margin-right: 10px;" @click="onYjWarnBackClick">
- <uni-icons class="input-uni-icon" type="close" size="18" color="skyblue" />
- <view style="color: gray;font-size: 0.9rem;margin-left: 5px;margin-right: 5px;">
- 关闭预警</view>
- </view>
- <view v-else-if="contentViewStatus==2" class="view-flex-inline"
- style="margin-right: 10px;" @click="onYjDangerAreaBackClick">
- <uni-icons class="input-uni-icon" type="close" size="18" color="skyblue" />
- <view style="color: gray;font-size: 0.9rem;margin-left: 5px;margin-right: 5px;">
- 关闭危险区</view>
- </view>
- </template>
- </uni-section>
- </view>
- <scroll-view scroll-y="true" :style="popScrollViewStyles">
- <view v-if="contentViewStatus==0">
- <view class="search-block">
- <uni-collapse @change="searchAreaStatus"
- style="padding-left: 10px;padding-right: 10px;">
- <uni-collapse-item :show-animation="true">
- <template v-slot:title>
- <view class="view-flex-block-center" style="height: 40px;width: 100%;">
- <view class="view-flex-inline-center">
- <text v-if="showSearch"
- style="color: orange;font-size: 0.8rem;">点击收起</text>
- <text v-else
- style="color: orange;font-size: 0.8rem;">点击展开录入查询</text>
- </view>
- </view>
- </template>
- </uni-collapse-item>
- </uni-collapse>
- <view v-if="showSearch">
- <view style="padding-left: 10px;padding-right: 10px;">
- <uni-data-select v-model="cityRegionValue" :localdata="cityRegionData"
- @change="cityRegionChange" placeholder="请选择盟市"></uni-data-select>
- </view>
- <view style="margin-top: 10px;padding-left: 10px;padding-right: 10px;">
- <uni-data-select v-model="districtRegionValue" :localdata="districtRegionData"
- @change="districtRegionChange" placeholder="请选择区旗县"></uni-data-select>
- </view>
- <view style="margin-top: 10px;padding-left: 10px;padding-right: 10px;">
- <uni-data-select v-model="townRegionValue" :localdata="townRegionData"
- @change="townRegionChange" placeholder="请选择乡镇"></uni-data-select>
- </view>
- <view style="margin-top: 10px;padding-left: 10px;padding-right: 10px;">
- <uni-data-select v-model="countryRegionValue" :localdata="countryRegionData"
- @change="countryRegionChange" placeholder="请选择村"></uni-data-select>
- </view>
- <view class="rtu-code">
- <uni-easyinput :styles="inputStyles" @input="yjSearchRtuCodeValClear"
- prefixIcon="search" v-model="searchRtuCodeVal" placeholder="请输入测站编码">
- </uni-easyinput>
- </view>
- <view class="rtu-name">
- <uni-easyinput :styles="inputStyles" @input="yjSearchRtuNameValClear"
- prefixIcon="search" v-model="searchRtuNameVal" placeholder="请输入测站名称">
- </uni-easyinput>
- </view>
- <view class="submit-btn">
- <button type="default" @click="onSearch">查询</button>
- </view>
- </view>
- <uni-group>
- <radio-group @change="onYjRainCountTypeRadioChange" class="view-flex-rs">
- <label style="margin-right: 5px;margin-bottom: 5px;;width:100px;"
- class="view-flex-inline" v-for="(item, index) in yjRainCountType.items"
- :key="item.id">
- <view>
- <radio :value="item.id" :checked="index === yjRainCountType.value" />
- </view>
- <view style="font-size: 0.7rem;">{{item.dictValue}}</view>
- </label>
- </radio-group>
- </uni-group>
- </view>
- <uni-list style="min-height: 40px;">
- <uni-list-item v-for="item in list" :key="item.id">
- <template v-slot:body>
- <view class="list-item-block">
- <view class="line" @click="onYjRainDataRtuClick(item)">
- <view class="title text-ellipsis text-underline "
- style="color: royalblue;">
- {{item.rtuName}}/{{item.rtuCode}}
- </view>
- </view>
- <view class="line">
- <text class="title" style="color: black;">上报时间:</text>
- <text class="text"
- style="color: gray;margin-left: 5px;">{{item.tm}}</text>
- </view>
- <view class="line">
- <text class="title" style="color: black;">累计雨量(mm):</text>
- <text class="text"
- style="color: gray;margin-left: 5px;">{{item.drp}}</text>
- </view>
- <view v-if="item.isWarn ==1">
- <view class="line">
- <text class="title" style="color: black;">预警信息:</text>
- <view class="text text-underline" style="color: coral;"
- @click="onYjWarnClick(item)">{{item.warnName}}</view>
- </view>
- </view>
- <view v-else>
- <view class="line">
- <text class="title" style="color: black;">预警信息:</text>
- <text class="text" style="color: coral;">暂无预警</text>
- </view>
- </view>
- <view v-if="item.isLinkDanger==1">
- <view class="line">
- <text class="title" style="color: black;">危险区信息:</text>
- <view v-for="da in item.dangerAreaList" :key="da.id"
- class="text text-underline" style="color: coral;"
- @click="onYjDangerAreaDataClick(da)">{{da.dangerAreaName}}
- </view>
- </view>
- </view>
- <view v-else>
- <view class="line">
- <text class="title" style="color: black;">危险区信息:</text>
- <view class="text" style="color: coral;">暂无数据</view>
- </view>
- </view>
- </view>
- </template>
- </uni-list-item>
- </uni-list>
- <uni-group>
- <view class="pagination-block" style="margin-top: 5px;">
- <uni-pagination :page-size="pageSize" :current="pageCurrent" :total="total"
- @change="yjPageChange" prevText="前一页" nextText="后一页" />
- </view>
- </uni-group>
- </view>
- <view v-else-if="contentViewStatus==1">
- <view style="padding-left: 10px;padding-right: 10px;padding-top: 10px;">
- <view v-if="warnData.warnResponseStatus==1">
- <view class="point">
- <view class="dot">
- 4
- </view>
- <view class="time-title">响应反馈【{{warnData.replyTm}}】</view>
- </view>
- <view class="time-info">
- <view class="time-line">
- <uni-list style="width: 100%;">
- <uni-list-item v-for="(r,index) in warnData.warnResponseInfoList"
- :key="index" direction="column">
- <template v-slot:body>
- <view class="list-item-block">
- <view class="line">
- <view class="text">责任人:<span
- style="color: deepskyblue;"></span></view>
- </view>
- <view class="line">
- <view class="text">责任人类型:<span
- style="color: deepskyblue;"></span></view>
- </view>
- <view class="line">
- <view class="text">反馈情况:<span
- style="color: deepskyblue;">{{r.repltStatus}}</span>
- </view>
- </view>
- <view class="line">
- <view class="text">反馈时间:<span
- style="color: deepskyblue;">{{r.replyTm}}</span>
- </view>
- </view>
- <!-- <view>反馈内容:<span style="color: skyblue;"></span></view> -->
- <view class="line">
- <view class="text">是否收到预警短信:<span
- style="color: deepskyblue;">{{r.isReceive}}</span>
- </view>
- </view>
- <view class="line">
- <view class="text">是否发生沟道山洪:<span
- style="color: deepskyblue;">{{r.isFloodBoot}}</span>
- </view>
- </view>
- <view class="line">
- <view class="text">山洪是否出沟:<span
- style="color: deepskyblue;">{{r.isFloodOut}}</span>
- </view>
- </view>
- <view class="line">
- <view class="text">降雨是否持续:<span
- style="color: deepskyblue;">{{r.isRainContu}}</span>
- </view>
- </view>
- <view class="line">
- <view class="text">是否人员转移:<span
- style="color: deepskyblue;">{{r.isTrans}}</span>
- </view>
- </view>
- <view class="line">
- <view class="text">有无人员伤亡:<span
- style="color: deepskyblue;">{{r.isDeady}}</span>
- </view>
- </view>
- </view>
- </template>
- </uni-list-item>
- </uni-list>
- </view>
- </view>
- </view>
- <view v-if="warnData.ousideWarnStatus==1">
- <view class="point">
- <view class="dot">
- 3
- </view>
- <view class="time-title">外部预警【{{warnData.extTime}}】</view>
- </view>
- <view class="time-info">
- <view class="time-line">
- <uni-list style="width: 100%;">
- <uni-list-item v-for="(out,index) in warnData.outsideWarnInfoList"
- :key="index" direction="column">
- <template v-slot:body>
- <view class="list-item-block">
- <view class="line">
- <view class="text ">发布单位:<span
- style="color: deepskyblue;">{{out.deptName}}</span>
- </view>
- </view>
- <view class="line">
- <view class="text ">发布人:<span
- style="color: deepskyblue;">{{out.senderName}}</span>
- </view>
- </view>
- <view class="line">
- <view class="text">发布内容:<span
- style="color: deepskyblue;">{{out.messageInfo}}</span>
- </view>
- </view>
- </view>
- </template>
- </uni-list-item>
- </uni-list>
- </view>
- </view>
- </view>
- <view>
- <view class="point">
- <view class="dot">
- 2
- </view>
- <view class="time-title">内部预警【{{warnData.warnTime}}】</view>
- </view>
- <view class="time-info">
- <view class="time-line">
- <uni-list style="width: 100%;">
- <uni-list-item direction="column">
- <template v-slot:body>
- <view class="list-item-block">
- <view class="line">
- <view class="text">发布单位:<span
- style="color: deepskyblue;">系统自动</span></view>
- </view>
- </view>
- </template>
- </uni-list-item>
- <uni-list-item direction="column">
- <template v-slot:body>
- <view class="list-item-block">
- <view class="line">
- <view class="text">预警名称:<span
- style="color: deepskyblue;">{{warnData.warnName}}</span>
- </view>
- </view>
- </view>
- </template>
- </uni-list-item>
- <uni-list-item v-for="(inside,index) in warnData.insideWarnInfoList"
- :key="index" direction="column">
- <template v-slot:body>
- <view class="list-item-block">
- <view class="line">
- <view class="text ">类型:<span
- style="color: deepskyblue;">{{inside.sendObjectName}}</span>
- </view>
- </view>
- <view class="line">
- <view class="text ">接收人:<span
- style="color: deepskyblue;">{{inside.userName}}</span>
- </view>
- </view>
- <view class="line">
- <view class="text">所在单位:<span
- style="color: deepskyblue;">{{inside.deptName}}</span>
- </view>
- </view>
- <view class="line">
- <view class="text">职务:<span
- style="color: deepskyblue;">{{inside.posiTion}}</span>
- </view>
- </view>
- <view class="line">
- <view class="text">电话:<span
- style="color: deepskyblue;">{{inside.userTel}}</span>
- </view>
- </view>
- <view class="line">
- <view class="text">短信内容:<span
- style="color: deepskyblue;">{{inside.messageInfo}}</span>
- </view>
- </view>
- <view class="line">
- <view class="text">发送时间:<span
- style="color: deepskyblue;">{{inside.sendTime}}</span>
- </view>
- </view>
- <view class="line">
- <view class="text">发送单位:<span
- style="color: deepskyblue;"></span></view>
- </view>
- <view class="line">
- <view class="text">发送人:<span
- style="color: deepskyblue;">{{inside.senderName}}</span>
- </view>
- </view>
- <view class="line">
- <view v-if="inside.sendStatus ==0" class="text">
- 发送状态:<span style="color: deepskyblue;">失败</span>
- </view>
- <view v-else-if="inside.sendStatus ==1" class="text">
- 发送状态:<span style="color: deepskyblue;">成功</span>
- </view>
- </view>
- </view>
- </template>
- </uni-list-item>
- </uni-list>
- </view>
- </view>
- </view>
- <view>
- <view class="point">
- <view class="dot">
- 1
- </view>
- <view class="time-title">产生预警【{{warnData.warnTime}}】</view>
- </view>
- <view class="time-info">
- <view class="time-line">
- <uni-list style="width: 100%;">
- <uni-list-item direction="column">
- <template v-slot:body>
- <view class="list-item-block">
- <view class="line">
- <view class="text"><span
- style="color: deepskyblue;">{{warnData.warnInfo}}</span>
- </view>
- </view>
- </view>
- </template>
- </uni-list-item>
- </uni-list>
- </view>
- </view>
- </view>
- </view>
- </view>
- <view v-else-if="contentViewStatus==2">
- <view class="view-flex-inline" style="color: gray;margin-left: 10px;font-size: 0.9rem;">
- 图层选择: </view>
- <view class="view-flex-inline" style="margin-top: 0px;padding-left: 10px;">
- <uni-data-checkbox :multiple="true" mode="button" v-model="mapCheck"
- :localdata="mapItems" @change="mapChange"></uni-data-checkbox>
- </view>
- <view class="list-item-block" style="color: gray;padding-left: 10px;">
- <view class="line">
- <text class="title" style="color: gray;">危险区:</text>
- </view>
- <view class="line">
- <view class="view-flex-block-center view-border"
- style="border-radius: 5px;;margin-top: 2px;" @click="moveToYjDangerArea()">
- <view class="view-btn-text text-under-line"
- style="color: deepskyblue;font-size: 0.7rem;padding-left: 10px;padding-right: 10px;padding-bottom: 2px;">
- {{dangerAreaData.dangerAreaName}}
- </view>
- </view>
- </view>
- </view>
- <view class="list-item-block" style="color: gray;padding-left: 10px;margin-top: 5px;">
- <view class="line">
- <text class="title" style="color: gray;">关联站点:</text>
- </view>
- <view class="line">
- <view v-for="rtu in dangerAreaData.rtus" :key="rtu.id"
- class="view-flex-block-center view-border"
- style="border-radius: 5px; padding-right: 10px;margin-top: 2px;"
- @click="moveToYjDangerAreaLinkRtu(rtu)">
- <view class="view-btn-text text-under-line"
- style="color: deepskyblue;font-size: 0.7rem;padding-left: 10px;padding-right: 10px;padding-bottom: 2px;">
- {{rtu.stName}}
- </view>
- </view>
- </view>
- </view>
- <view class="list-item-block" style="color: gray;padding-left: 10px;margin-top: 5px;">
- <view class="line">
- <text class="title" style="color: gray;">关联转移路线:</text>
- </view>
- <view class="line">
- <view v-for="leaveline in dangerAreaData.leaveLines" :key="leaveline.id"
- class="view-flex-block-center view-border"
- style="border-radius: 5px; padding-right: 10px;margin-top: 2px;"
- @click="moveToYjDangerAreaLinkLine(leaveline)">
- <view class="view-btn-text text-under-line"
- style="color: deepskyblue;font-size: 0.7rem;padding-left: 10px;padding-right: 10px;padding-bottom: 2px;">
- {{leaveline.leaveLineName}}
- </view>
- </view>
- </view>
- </view>
- <view class="list-item-block" style="color: gray;padding-left: 10px;">
- <view class="line">
- <text class="title" style="color: gray;">关联家庭户:</text>
- </view>
- <view class="line">
- <view v-if="dangerAreaData.familyCount>0" class="view-flex-block-center view-border"
- style="border-radius: 5px;;margin-top: 2px;"
- @click="moveToYjDangerAreaFamily()">
- <view class="view-btn-text text-under-line"
- style="color: deepskyblue;font-size: 0.7rem;padding-left: 10px;padding-right: 10px;padding-bottom: 2px;">
- 共有{{dangerAreaData.familyCount}}户
- </view>
- </view>
- <view v-else>
- <view class="text" style="color: deepskyblue;font-size: 0.7rem;">暂无关联家庭户</view>
- </view>
- </view>
- </view>
- </view>
- <view v-else></view>
- </scroll-view>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- import {
- gcoord
- } from '@/static/js/gcoord.global.prod.js'
- import
- navBtns
- from "@/api/home.js";
- import {
- role
- } from "@/api/role.js";
- import http from '@/http/api.js';
- export default {
- name: 'rtuManageView',
- components: {},
- data() {
- return {
- title: '管理工作台',
- permission: {
- 'admin': false,
- 'orgAdmin': false,
- 'companyAdmin': false,
- 'companyServciePerson': false,
- 'yjServicePerson': false,
- },
- subSystem: 0,
- pageSize: 10,
- pageCurrent: 1,
- total: 0,
- list: [],
- searchRtuNameVal: '',
- searchRtuCodeVal: '',
- query: {},
- inputStyles: {
- color: '#808080',
- borderColor: '#d3d3d3'
- },
- //以下为运维系统参数
- currentRole: '',
- regionTree: [],
- regionCode: '',
- selectedTreeNode: '',
- countInfo: {},
- loading: false,
- value: [],
- warnKindItems: [{
- 'value': 0,
- 'text': '全部'
- }, {
- 'value': 1,
- 'text': '离线'
- }, {
- 'value': 2,
- 'text': '时钟异常'
- }, {
- 'value': 3,
- 'text': '雨量漏报'
- }, {
- 'value': 4,
- 'text': '水位漏报'
- }, {
- 'value': 5,
- 'text': '5分钟上报延时'
- }, {
- 'value': 6,
- 'text': '雨量小时上报延时'
- }, {
- 'value': 7,
- 'text': '水位小时上报延时'
- }, {
- 'value': 8,
- 'text': '雨量疑似异常值'
- }],
- warnKindOption: 0,
- //以下为应急参数
- mapScreenMax: false,
- mapScreenMin: true,
- showSearch: false,
- contentViewStatus: 0,
- cityRegionValue: '',
- cityRegionData: [],
- districtRegionValue: '',
- districtRegionData: [],
- townRegionValue: '',
- townRegionData: [],
- countryRegionValue: '',
- countryRegionData: [],
- latitude: 40.848119,
- longitude: 111.755426,
- zoom: true,
- scale: 13,
- markets: [],
- polygons: [],
- polylines: [],
- includepoints: [],
- mapStyles: {
- width: '100%',
- height: '200px'
- },
- popViewStyles: {
- width: '100%',
- height: '500px'
- },
- popScrollViewStyles: {
- width: '100%',
- height: '100px'
- },
- searchViewStyles: {
- width: '100%',
- height: '40px'
- },
- mapHeight: 200,
- popViewHeight: 500,
- //应急雨量参数
- yjRainCountType: {
- items: [{
- 'id': '0',
- 'dictValue': '默认'
- }, {
- 'id': '1',
- 'dictValue': '近1小时'
- }, {
- 'id': '2',
- 'dictValue': '近3小时'
- }, {
- 'id': '3',
- 'dictValue': '近6小时'
- }, {
- 'id': '4',
- 'dictValue': '近12小时'
- }, {
- 'id': '5',
- 'dictValue': '近24小时'
- }],
- value: 0,
- },
- mapContext: null,
- mapCheck: [0, 1, 2, 3],
- mapItems: [{
- text: '危险区',
- value: 0
- },
- {
- text: '转移路线',
- value: 1
- },
- {
- text: '站点',
- value: 2
- },
- {
- text: '家庭户',
- value: 3
- }
- ],
- isShowDangerArea: true,
- isShowLine: true,
- isShowSite: true,
- isShowFamily: true,
- warnData: {},
- dangerAreaData: {},
- }
- },
- computed: {
- toLocation(l) {
- return new Number(l).toFixed(6);
- }
- },
- onInit(option) {
- console.log("onInit" + JSON.stringify(uni.getWindowInfo()))
- },
- onLoad(option) {
- let subSystemSelectInfo = uni.getStorageSync("SubSystemSelectInfo");
- this.subSystem = subSystemSelectInfo.subSystem;
- if (this.$u.func.checkLogin()) {
- if (this.userInfo.role_name === role.admin) {
- this.permission.admin = true;
- this.currentRole = role.admin;
- } else if (this.userInfo.role_name === role.orgAdmin) {
- this.permission.orgAdmin = true;
- this.currentRole = role.orgAdmin;
- } else if (this.userInfo.role_name === role.companyAdmin) {
- this.permission.companyAdmin = true;
- this.currentRole = role.companyAdmin;
- } else if (this.userInfo.role_name === role.companyServciePerson) {
- this.permission.companyServciePerson = true;
- this.currentRole = role.companyServciePerson;
- } else if (this.userInfo.role_name === role.yjServicePerson) {
- this.permission.yjServicePerson = true;
- this.currentRole = role.yjServicePerson;
- }
- if (this.subSystem == 1) {
- this.title = "管理工作台";
- this.getRegionTree();
- } else if (this.subSystem == 2) {
- this.title = "实时监测预警";
- this.getCityRegion({});
- this.$nextTick(() => {
- this.getYjPage({});
- })
- }
- } else {
- this.$u.func.logout();
- }
- },
- onShow() {
- if (this.$u.func.checkLogin()) {
- if (this.subSystem == 1) {
- this.title = "管理工作台";
- } else if (this.subSystem == 2) {
- this.title = "实时监测预警";
- }
- if (this.userInfo.role_name !== this.currentRole) {
- this.permission.admin = false;
- this.permission.orgAdmin = false;
- this.permission.companyAdmin = false;
- this.permission.companyServciePerson = false;
- this.permission.yjServicePerson = false;
- if (this.userInfo.role_name === role.admin) {
- this.permission.admin = true;
- this.currentRole = role.admin;
- } else if (this.userInfo.role_name === role.orgAdmin) {
- this.permission.orgAdmin = true;
- this.currentRole = role.orgAdmin;
- } else if (this.userInfo.role_name === role.companyAdmin) {
- this.permission.companyAdmin = true;
- this.currentRole = role.companyAdmin;
- } else if (this.userInfo.role_name === role.companyServciePerson) {
- this.permission.companyServciePerson = true;
- this.currentRole = role.companyServciePerson;
- } else if (this.userInfo.role_name === role.yjServicePerson) {
- this.permission.yjServicePerson = true;
- this.currentRole = role.yjServicePerson;
- }
- if (this.subSystem == 1) {
- this.getRegionTree();
- } else if (this.subSystem == 2) {
- }
- }
- } else {
- this.$u.func.logout();
- }
- },
- onReady() {
- //console.log("onReady" + JSON.stringify(uni.getWindowInfo()))
- //this.mapStyles.height = (uni.getWindowInfo().windowHeight - 75 - 20) + "px";
- if (this.subSystem == 2) {
- //console.log("onReady" + JSON.stringify(uni.getWindowInfo()))
- this.mapHeight = 200;
- //uni.getWindowInfo().windowHeight - 50 - 500;
- this.mapStyles.height = this.mapHeight + "px";
- this.popViewHeight = uni.getWindowInfo().windowHeight - 50 - 200;
- this.popScrollViewStyles.height = (this.popViewHeight - 40) + "px";
- this.mapContext = uni.createMapContext('myMap', this);
- }
- },
- methods: {
- // 分页触发
- pageChange(e) {
- this.pageCurrent = e.current;
- this.getPage()
- },
- //行政区划选择
- onTreeNodeClick(node) {
- console.log(JSON.stringify(node))
- },
- onTreePopupOpened(e) {
- console.log(JSON.stringify(e))
- },
- onTreePopupClosed(e) {
- console.log(JSON.stringify(e))
- },
- onTreeChange(e) {
- console.log(JSON.stringify(e))
- let nodes = e.detail.value;
- if (nodes.length > 0) {
- let node = nodes[nodes.length - 1];
- this.regionCode = node.value;
- this.query = {};
- this.query['adCode'] = this.regionCode;
- this.searchRtuNameVal = '';
- this.searchRtuCodeVal = '';
- this.pageCurrent = 1;
- this.getPage();
- this.getCountInfo(this.regionCode);
- } else {
- this.regionCode = '';
- this.query = {};
- this.searchRtuNameVal = '';
- this.searchRtuCodeVal = '';
- this.pageCurrent = 1;
- this.getPage();
- this.getCountInfo(this.regionCode);
- }
- },
- //录入查询
- search() {
- this.pageCurrent = 1;
- // console.log(JSON.stringify(res))
- let params = {};
- if (this.searchRtuCodeVal.length > 0) {
- params['rtuCode'] = this.searchRtuCodeVal;
- }
- if (this.searchRtuNameVal.length > 0) {
- params['rtuName'] = this.searchRtuNameVal;
- }
- this.getPage(params);
- },
- searchRtuNameValClear(e) {
- if (e == null || e.length == 0) {
- this.searchRtuNameVal = '';
- let params = {};
- if (this.searchRtuCodeVal.length > 0) {
- params['rtuCode'] = this.searchRtuCodeVal;
- }
- this.getPage(params);
- }
- },
- searchRtuCodeValClear(e) {
- if (e == null || e.length == 0) {
- this.searchRtuCodeVal = '';
- let params = {};
- if (this.searchRtuNameVal.length > 0) {
- params['rtuName'] = this.searchRtuNameVal;
- }
- this.getPage(params);
- }
- },
- onBackPress() {
- // #ifdef APP-PLUS
- plus.key.hideSoftKeybord();
- // #endif
- },
- onRtuDetailClick(rtuCode) {
- uni.navigateTo({
- url: '/pages/rtu-manage/rtudetail?rtuCode=' + rtuCode
- })
- },
- onWarningPageClick(rtuCode) {
- uni.navigateTo({
- url: '/pages/warning/rtuwarninglist?rtuCode=' + rtuCode
- })
- },
- onLocationClick(item) {
- let lat = item.lat;
- let lng = item.lng;
- let name = item.rtuName;
- let add = item.locationDesc;
- uni.openLocation({
- latitude: Number(lat),
- longitude: Number(lng),
- name: name,
- address: "",
- success() {}
- })
- },
- onCheckOrderPageClick(rtuCode) {
- uni.navigateTo({
- url: '/pages/check-order/rtu/rtucheckorderlist?rtuCode=' + rtuCode
- })
- },
- onInspectionReportClick(rtuCode) {
- console.log("onInspectionReportClick")
- uni.navigateTo({
- url: '/pages/equipment-inspection/rtuinspectionreportview?rtuCode=' + rtuCode
- })
- },
- onSiteRealDataClick(item) {
- uni.navigateTo({
- url: '/pages/rtu-manage/rturealdatadetail?rtuCode=' + item.rtuCode + '&isRain=' + item.isRain +
- '&isRiver=' + item.isRiver + '&isRes=' + item.isRes + '&isGround=' + item.isGround,
- })
- },
- onManuallyOrderClick(rtuCode) {
- uni.navigateTo({
- url: '/pages/check-order/manuallyaddcheckorder?rtuCode=' + rtuCode
- })
- },
- warnKindOptionChange: function(evt) {
- let params = {};
- this.getPage(params);
- },
- getSiteData(val) {
- let htmltext = '';
- if (val.isRain === 1) {
- htmltext = htmltext + "降水:";
- if (val.drp) {
- htmltext = htmltext + val.drp;
- } else {
- htmltext = htmltext + "--";
- }
- }
- if (val.isRiver == 1) {
- if (htmltext.length > 0) {
- htmltext = htmltext + ' / ';
- }
- htmltext = htmltext + '水位:';
- if (val.rz) {
- htmltext = htmltext + val.rz;
- } else {
- htmltext = htmltext + "--";
- }
- } else if (val.isRes == 1) {
- if (htmltext.length > 0) {
- htmltext = htmltext + ' / ';
- }
- htmltext = htmltext + '水位:';
- if (val.z) {
- htmltext = htmltext + val.z;
- } else {
- htmltext = htmltext + "--";
- }
- }
- if (val.isGround == 1) {
- if (htmltext.length > 0) {
- htmltext = htmltext + ' / ';
- }
- htmltext = htmltext + '墒情含水层:';
- if (val.ground) {
- htmltext = htmltext + val.ground;
- } else {
- htmltext = htmltext + "--";
- }
- }
- return htmltext;
- },
- getRegionTree() {
- var that = this;
- http.request({
- url: '/galaxy-business/baseinfo/region/tree',
- method: 'GET',
- }).then(res => {
- if (res.data != null) {
- that.regionTree = res.data;
- that.regionCode = that.regionTree[0].id;
- that.selectedTreeNode = that.regionTree[0].id;
- that.query = {};
- that.query['adCode'] = that.regionCode;
- that.getPage();
- that.getCountInfo(that.regionCode);
- }
- }).catch(err => {
- console.log(err)
- })
- },
- getCountInfo(adCode) {
- let that = this;
- http.request({
- url: '/galaxy-business/rtu/manage/count',
- method: 'GET',
- data: {
- adCode
- }
- }).then(res => {
- that.countInfo = res.data;
- })
- },
- getPage(params = {}) {
- this.loading = true
- if (this.warnKindOption == 0) {} else {
- params['warnKind'] = this.warnKindOption;
- }
- const current = this.pageCurrent;
- const size = this.pageSize;
- let postData = Object.assign(params, this.query);
- var that = this;
- http.request({
- url: '/galaxy-business/rtu/manage/page',
- method: 'GET',
- params: {
- current,
- size,
- },
- data: postData,
- }).then(res => {
- // console.log(JSON.stringify(res.data))
- if (res.data.records != null) {
- that.list = res.data.records;
- }
- that.total = res.data.total;
- this.loading = false
- }).catch(err => {
- console.log(err)
- this.loading = false
- })
- },
- //以下为应急系统业务功能
- onMapScreenMax() {
- console.log("max")
- this.mapScreenMax = true;
- this.mapScreenMin = false;
- this.mapHeight = uni.getWindowInfo().windowHeight - 50 - 200;
- this.mapStyles.height = this.mapHeight + "px";
- this.popViewHeight = 200;
- this.popScrollViewStyles.height = (this.popViewHeight - 40) + "px";
- },
- onMapScreenMin() {
- console.log("min")
- this.mapScreenMax = false;
- this.mapScreenMin = true;
- this.mapHeight = 200;
- this.mapStyles.height = this.mapHeight + "px";
- this.popViewHeight = uni.getWindowInfo().windowHeight - 50 - 200;
- this.popScrollViewStyles.height = (this.popViewHeight - 40) + "px";
- },
- searchAreaStatus(e) {
- console.log(JSON.stringify(e))
- if (e.length > 0 && e[0] == '0') {
- this.showSearch = true;
- } else {
- this.showSearch = false;
- }
- },
- onYjRainDataRefreshClick() {
- this.pageCurrent = 1;
- this.query = {};
- this.searchRtuNameVal = '';
- this.searchRtuCodeVal = '';
- this.getYjPage({});
- },
- onYjWarnBackClick() {
- this.contentViewStatus = 0;
- },
- onYjDangerAreaBackClick() {
- this.contentViewStatus = 0;
- },
- //定位到测站
- onYjRainDataRtuClick(item) {
- this.isShowSite = true;
- this.mapCheck = [2];
- this.$nextTick(() => {
- this.markets = [];
- let marker = {};
- let c = gcoord.transform(
- [item.lng, item.lat],
- gcoord.WGS84,
- gcoord.GCJ02
- );
- marker['id'] = item.id;
- marker['latitude'] = c[1];
- marker['longitude'] = c[0];
- let label = {};
- label['content'] = item.rtuName + "(" + item.drp + "mm)";
- label['color'] = '#ff0000';
- label['bgColor'] = '#ffffff';
- label['anchorY'] = -40;
- marker['label'] = label;
- marker['iconPath'] = "/static/images/icon_warning.png";
- this.markets.push(marker)
- this.mapContext.moveToLocation({
- longitude: c[0],
- latitude: c[1],
- success: (res) => {
- }
- });
- })
- },
- //打开预警信息子页面
- onYjWarnClick(item) {
- let that = this;
- this.contentViewStatus = 1;
- this.$nextTick(() => {
- this.getWarnInfoDetail(item.warnId);
- })
- },
- //打开危险区信息子页面
- onYjDangerAreaDataClick(item) {
- let that = this;
- this.dangerAreaData.dangerAreaName = item.dangerAreaName;
- this.isShowDangerArea = true;
- this.isShowLine = true;
- this.isShowSite = true;
- this.isShowFamily = true;
- this.mapCheck = [0, 1, 2, 3];
- this.markets = [];
- this.polygons = [];
- this.polylines = [];
- this.contentViewStatus = 2;
- this.$nextTick(() => {
- let postData = {};
- postData['dangerAreaPid'] = item.dangerAreaPid;
- http.request({
- url: '/galaxy-business/map/dangerarea/detail',
- method: 'GET',
- data: postData
- }).then(res => {
- if (res.data != null) {
- //console.log(JSON.stringify(res.data))
- that.dangerAreaData = res.data;
- let centerPointLng = res.data.centerPointLng;
- let centerPointLat = res.data.centerPointLat;
- let dangerStatus = res.data.dangerStatus;
- if (that.isShowDangerArea) {
- let dangerAreaPoints = res.data.points;
- let p = {};
- let ps = dangerAreaPoints.map(item => {
- let l = gcoord.transform(
- [item.pointLng, item.pointLat],
- gcoord.WGS84,
- gcoord.GCJ02
- );
- return {
- latitude: l[1],
- longitude: l[0],
- }
- })
- p['points'] = ps;
- let dashArray = [];
- dashArray.push(4);
- dashArray.push(10);
- p['dashArray'] = dashArray;
- if (dangerStatus == '1') {
- p['strokeColor'] = '#FF0000';
- p['fillColor'] = '#F72C5B7D';
- } else {
- p['strokeColor'] = '#FC8452';
- p['fillColor'] = '#FAC8587D';
- }
- that.polygons.push(p);
- }
- if (that.isShowLine) {
- if (that.dangerAreaData.leaveLines != undefined && that.dangerAreaData
- .leaveLines != null && that
- .dangerAreaData.leaveLines.length > 0) {
- let line = that.dangerAreaData.leaveLines[0];
- that.getYjDangerAreaLineDetail(line);
- }
- }
- let rtus = [];
- if (that.isShowSite) {
- rtus = that.dangerAreaData.rtus.map(item => {
- let rtu = {};
- rtu['iconPath'] = '/static/images/icon_warning.png';
- rtu['id'] = parseInt(item.id);
- let r = gcoord.transform(
- [item.stLong, item.stLat],
- gcoord.WGS84,
- gcoord.GCJ02
- );
- rtu['latitude'] = r[1];
- rtu['longitude'] = r[0];
- rtu['width'] = 20;
- rtu['height'] = 20;
- let label = {};
- label['content'] = item.stName;
- label['color'] = '#000000';
- label['bgColor'] = '#ffffff';
- label['anchorY'] = -40;
- label['borderWidth'] = 1;
- label['borderColor'] = '#ff0000';
- label['padding'] = 4;
- rtu['label'] = label;
- return rtu;
- });
- }
- let familys = [];
- if (that.isShowFamily) {
- familys = that.dangerAreaData.familyPoints.map(item => {
- let rtu = {};
- rtu['iconPath'] = '/static/images/home.png';
- rtu['id'] = parseInt(item.id);
- let r = gcoord.transform(
- [item.longitude, item.latitude],
- gcoord.WGS84,
- gcoord.GCJ02
- );
- rtu['latitude'] = r[1];
- rtu['longitude'] = r[0];
- rtu['width'] = 20;
- rtu['height'] = 20;
- let label = {};
- label['content'] = item.personName;
- label['color'] = '#000000';
- label['bgColor'] = '#ffffff';
- label['anchorY'] = -40;
- label['borderWidth'] = 1;
- label['borderColor'] = '#ff0000';
- label['padding'] = 4;
- rtu['label'] = label;
- return rtu;
- });
- }
- let markets = rtus.concat(familys)
- that.markets = markets;
- let c = gcoord.transform(
- [centerPointLng, centerPointLat],
- gcoord.WGS84,
- gcoord.GCJ02
- );
- that.latitude = c[1];
- that.longitude = c[0];
- }
- }).catch(err => {
- console.log(err)
- })
- })
- },
- moveToYjDangerArea() {
- if (this.isShowDangerArea) {
- this.$nextTick(() => {
- let c = gcoord.transform(
- [this.dangerAreaData.centerPointLng, this.dangerAreaData.centerPointLat],
- gcoord.WGS84,
- gcoord.GCJ02
- );
- this.latitude = c[1];
- this.longitude = c[0];
- this.mapContext.moveToLocation({
- longitude: this.longitude,
- latitude: this.latitude,
- success: (res) => {
- }
- });
- })
- }
- },
- moveToYjDangerAreaLinkRtu(rtu) {
- if (this.isShowSite) {
- this.$nextTick(() => {
- let c = gcoord.transform(
- [rtu.stLong, rtu.stLat],
- gcoord.WGS84,
- gcoord.GCJ02
- );
- let lat = c[1];
- let long = c[0];
- this.mapContext.moveToLocation({
- longitude: long,
- latitude: lat,
- success: (res) => {
- }
- });
- })
- }
- },
- moveToYjDangerAreaLinkLine(line) {
- //console.log(JSON.stringify(line))
- //let that = this;
- if (this.isShowLine) {
- this.$nextTick(() => {
- let c = gcoord.transform(
- [line.centerPointLng, line.centerPointLat],
- gcoord.WGS84,
- gcoord.GCJ02
- );
- let lat = c[1];
- let long = c[0];
- this.mapContext.moveToLocation({
- longitude: long,
- latitude: lat,
- success: (res) => {
- }
- });
- this.getYjDangerAreaLineDetail(line);
- })
- }
- },
- moveToYjDangerAreaFamily() {
- if (this.isShowFamily) {
- this.$nextTick(() => {
- if (this.dangerAreaData.familyPoints != undefined && this.dangerAreaData.familyPoints !=
- null && this
- .dangerAreaData.familyPoints.length > 0) {
- let f = this.dangerAreaData.familyPoints[0];
- let c = gcoord.transform(
- [f.longitude, f.latitude],
- gcoord.WGS84,
- gcoord.GCJ02
- );
- this.mapContext.moveToLocation({
- longitude: c[0],
- latitude: c[1],
- success: (res) => {
- }
- });
- }
- })
- }
- },
- mapChange(e) {
- let selectDangerArea = false;
- let selectLine = false;
- let selectSite = false;
- let selectFamily = false;
- for (let i = 0; i < this.mapCheck.length; i++) {
- let value = this.mapCheck[i];
- if (value == 0) {
- selectDangerArea = true;
- } else if (value == 1) {
- selectLine = true;
- } else if (value == 2) {
- selectSite = true;
- } else if (value == 3) {
- selectFamily = true;
- }
- }
- if (selectDangerArea) {
- if (!this.isShowDangerArea) {
- let p = {};
- let ps = this.dangerAreaData.points.map(item => {
- let l = gcoord.transform(
- [item.pointLng, item.pointLat],
- gcoord.WGS84,
- gcoord.GCJ02
- );
- return {
- latitude: l[1],
- longitude: l[0],
- }
- })
- p['points'] = ps;
- let dashArray = [];
- dashArray.push(4);
- dashArray.push(10);
- p['dashArray'] = dashArray;
- if (this.dangerStatus == '1') {
- p['strokeColor'] = '#FF0000';
- p['fillColor'] = '#F72C5B7D';
- } else {
- p['strokeColor'] = '#FC8452';
- p['fillColor'] = '#FAC8587D';
- }
- this.polygons.push(p);
- this.isShowDangerArea = true;
- }
- } else {
- this.polygons = [];
- this.isShowDangerArea = false;
- }
- if (selectLine) {
- if (!this.isShowLine) {
- if (this.dangerAreaData.leaveLines != undefined && this.dangerAreaData.leaveLines != null && this
- .dangerAreaData.leaveLines.length > 0) {
- let line = this.dangerAreaData.leaveLines[0];
- this.getYjDangerAreaLineDetail(line);
- }
- this.isShowLine = true;
- }
- } else {
- this.polylines = [];
- this.isShowLine = false;
- }
- let rtus = [];
- if (selectSite) {
- rtus = this.dangerAreaData.rtus.map(item => {
- let rtu = {};
- rtu['iconPath'] = '/static/images/icon_warning.png';
- rtu['id'] = parseInt(item.id);
- let r = gcoord.transform(
- [item.stLong, item.stLat],
- gcoord.WGS84,
- gcoord.GCJ02
- );
- rtu['latitude'] = r[1];
- rtu['longitude'] = r[0];
- rtu['width'] = 20;
- rtu['height'] = 20;
- let label = {};
- label['content'] = item.stName;
- label['color'] = '#000000';
- label['bgColor'] = '#ffffff';
- label['anchorY'] = -40;
- label['borderWidth'] = 1;
- label['borderColor'] = '#ff0000';
- label['padding'] = 4;
- rtu['label'] = label;
- return rtu;
- });
- this.isShowSite = true;
- } else {
- this.isShowSite = false;
- }
- let familys = [];
- if (selectFamily) {
- console.log(JSON.stringify(this.dangerAreaData.familyPoints))
- familys = this.dangerAreaData.familyPoints.map(item => {
- let rtu = {};
- rtu['iconPath'] = '/static/images/home.png';
- rtu['id'] = parseInt(item.id);
- let r = gcoord.transform(
- [item.longitude, item.latitude],
- gcoord.WGS84,
- gcoord.GCJ02
- );
- rtu['latitude'] = r[1];
- rtu['longitude'] = r[0];
- rtu['width'] = 20;
- rtu['height'] = 20;
- let label = {};
- label['content'] = item.personName;
- label['color'] = '#000000';
- label['bgColor'] = '#ffffff';
- label['anchorY'] = -40;
- label['borderWidth'] = 1;
- label['borderColor'] = '#ff0000';
- label['padding'] = 4;
- rtu['label'] = label;
- return rtu;
- });
- this.isShowFamily = true;
- } else {
- this.isShowFamily = false;
- }
- let markets = rtus.concat(familys)
- this.markets = markets;
- },
- cityRegionChange(e) {
- this.cityRegionValue = e;
- this.districtRegionData = [];
- this.districtRegionValue = '';
- this.townRegionData = [];
- this.townRegionValue = '';
- this.countryRegionData = [];
- this.countryRegionValue = '';
- let p = {
- 'parentCode': this.cityRegionValue
- }
- this.getDistrictRegion(p);
- this.query['adCode'] = this.cityRegionValue;
- },
- districtRegionChange(e) {
- if (e == undefined || e == null || e == '') {
- this.districtRegionValue = '';
- this.townRegionData = [];
- this.townRegionValue = '';
- this.countryRegionData = [];
- this.countryRegionValue = '';
- this.query['adCode'] = this.cityRegionValue;
- } else {
- this.districtRegionValue = e;
- this.townRegionData = [];
- this.townRegionValue = '';
- this.countryRegionData = [];
- this.countryRegionValue = '';
- let p = {
- 'parentCode': this.districtRegionValue
- }
- this.getTownRegion(p);
- this.query['adCode'] = this.districtRegionValue;
- }
- },
- townRegionChange(e) {
- if (e == undefined || e == null || e == '') {
- this.townRegionValue = '';
- this.countryRegionData = [];
- this.countryRegionValue = '';
- this.query['adCode'] = this.districtRegionValue;
- } else {
- this.townRegionValue = e;
- this.countryRegionData = [];
- this.countryRegionValue = '';
- let p = {
- 'parentCode': this.townRegionValue
- }
- this.getCountryRegion(p);
- this.query['adCode'] = this.townRegionValue;
- }
- },
- countryRegionChange(e) {
- if (e == undefined || e == null || e == '') {
- this.countryRegionValue = '';
- this.query['adCode'] = this.townRegionValue;
- } else {
- this.countryRegionValue = e;
- this.query['adCode'] = this.countryRegionValue;
- }
- },
- getCityRegion(params = {}) {
- let that = this;
- http.request({
- url: '/galaxy-business/baseinfo/region/whole/yj/list',
- method: 'GET',
- data: params,
- }).then(res => {
- //console.log(JSON.stringify(res.data))
- that.cityRegionData = res.data.map(item => {
- return {
- value: item.adcd,
- text: item.adnm,
- }
- })
- }).catch(err => {
- console.log(err)
- })
- },
- getDistrictRegion(params = {}) {
- let that = this;
- http.request({
- url: '/galaxy-business/baseinfo/region/whole/yj/list',
- method: 'GET',
- data: params,
- }).then(res => {
- that.districtRegionData = res.data.map(item => {
- return {
- value: item.adcd,
- text: item.adnm,
- }
- })
- }).catch(err => {
- console.log(err)
- })
- },
- getTownRegion(params = {}) {
- let that = this;
- http.request({
- url: '/galaxy-business/baseinfo/region/whole/yj/list',
- method: 'GET',
- data: params,
- }).then(res => {
- that.townRegionData = res.data.map(item => {
- return {
- value: item.adcd,
- text: item.adnm,
- }
- })
- }).catch(err => {
- console.log(err)
- })
- },
- getCountryRegion(params = {}) {
- let that = this;
- http.request({
- url: '/galaxy-business/baseinfo/region/whole/yj/list',
- method: 'GET',
- data: params,
- }).then(res => {
- that.countryRegionData = res.data.map(item => {
- return {
- value: item.adcd,
- text: item.adnm,
- }
- })
- }).catch(err => {
- console.log(err)
- })
- },
- getWarnInfoDetail(warnId) {
- let that = this;
- http.request({
- url: '/galaxy-business/yj/warn/detail/all?warnId=' + warnId,
- method: 'GET'
- }).then(res => {
- if (res && res.success) {
- that.warnData = res.data;
- }
- }).catch(err => {
- console.log(JOSN.stringify(err))
- })
- },
- // openRainDataView() {
- // let that = this;
- // this.mapStyles.height = "200px";
- // this.yjWarnInfoCoverView = false;
- // this.yjDangerAreaCoverView = false;
- // if (this.yjPreCoverView != 1) {
- // this.yjMapMarkers = [];
- // this.polygons = [];
- // this.polylines = [];
- // }
- // this.yjPreCoverView = 1;
- // this.yjRainDataCoverView = true;
- // this.$nextTick(() => {
- // let p = {};
- // that.getYjRainDataPage(p);
- // })
- // },
- // openWarnInfoView() {
- // let that = this;
- // this.mapStyles.height = "200px";
- // this.yjRainDataCoverView = false;
- // this.yjDangerAreaCoverView = false;
- // if (this.yjPreCoverView != 2) {
- // this.yjMapMarkers = [];
- // this.polygons = [];
- // this.polylines = [];
- // }
- // this.yjPreCoverView = 2;
- // this.yjWarnInfoCoverView = true;
- // this.$nextTick(() => {
- // let p = {};
- // that.getYjWarnDataPage(p);
- // })
- // },
- // openDangerAreaView() {
- // let that = this;
- // this.mapStyles.height = "200px";
- // this.yjRainDataCoverView = false;
- // this.yjWarnInfoCoverView = false;
- // if (this.yjPreCoverView != 3) {
- // this.yjMapMarkers = [];
- // this.polygons = [];
- // this.polylines = [];
- // }
- // this.yjPreCoverView = 3;
- // this.yjDangerAreaCoverView = true;
- // this.$nextTick(() => {
- // let p = {};
- // that.getYjDangerAreaDataPage(p);
- // })
- // },
- // yjPopMenuClose() {
- // this.mapStyles.height = this.mapHeight + "px";
- // this.yjRainDataCoverView = false;
- // this.yjWarnInfoCoverView = false;
- // this.yjDangerAreaCoverView = false;
- // },
- //雨量数据业务
- yjPageChange(e) {
- this.pageCurrent = e.current;
- let params = {};
- if (this.searchRtuCodeVal.length > 0) {
- params['rtuCode'] = this.searchRtuCodeVal;
- }
- if (this.searchRtuNameVal.length > 0) {
- params['rtuName'] = this.searchRtuNameVal;
- }
- this.getYjPage(params)
- },
- onSearch() {
- this.pageCurrent = 1;
- this.tableData = [];
- let params = {};
- if (this.searchRtuCodeVal.length > 0) {
- params['rtuCode'] = this.searchRtuCodeVal;
- }
- if (this.searchRtuNameVal.length > 0) {
- params['rtuName'] = this.searchRtuNameVal;
- }
- this.getYjPage(params);
- // this.$nextTick(() => {
- // this.showSearch = false;
- // })
- },
- getYjPage(params = {}) {
- const current = this.pageCurrent;
- const size = this.pageSize;
- const isSubmit = '0';
- if (this.yjRainCountType.value == 1) {
- params['rainCountType'] = 1;
- } else if (this.yjRainCountType.value == 2) {
- params['rainCountType'] = 3;
- } else if (this.yjRainCountType.value == 3) {
- params['rainCountType'] = 6;
- } else if (this.yjRainCountType.value == 4) {
- params['rainCountType'] = 12;
- } else if (this.yjRainCountType.value == 5) {
- params['rainCountType'] = 24;
- } else {
- params['rainCountType'] = 0;
- }
- let postData = Object.assign(params, this.query);
- //console.log(JSON.stringify(postData))
- var that = this;
- http.request({
- url: '/galaxy-business/yj/rain/page',
- method: 'GET',
- params: {
- current,
- size,
- isSubmit
- },
- data: postData,
- }).then(res => {
- console.log(JSON.stringify(res))
- if (res.data.records != null) {
- that.list = res.data.records;
- }
- that.total = res.data.total;
- if (that.listTotal == 0) {
- that.pageCurrent = 1;
- }
- }).catch(err => {
- console.log(err)
- })
- },
- onYjRainCountTypeRadioChange: function(evt) {
- for (let i = 0; i < this.yjRainCountType.items.length; i++) {
- if (this.yjRainCountType.items[i].id === evt.detail.value) {
- this.yjRainCountType.value = i;
- break;
- }
- }
- this.getYjPage({});
- },
- yjSearchRtuNameValClear(e) {
- if (e == null || e.length == 0) {
- this.searchRtuNameVal = '';
- }
- },
- yjSearchRtuCodeValClear(e) {
- if (e == null || e.length == 0) {
- this.searchRtuCodeVal = '';
- }
- },
- getYjDangerAreaLineDetail(line) {
- let that = this;
- let postData = {};
- postData['id'] = line.id;
- http.request({
- url: '/galaxy-business/map/leaveline/detail',
- method: 'GET',
- data: postData
- }).then(res => {
- if (res.data != null) {
- that.polylines = [];
- let p = {};
- let ps = res.data.points.map(item => {
- let l = gcoord.transform(
- [item.pointLng, item.pointLat],
- gcoord.WGS84,
- gcoord.GCJ02
- );
- return {
- latitude: l[1],
- longitude: l[0],
- }
- })
- p['points'] = ps;
- if (that.dangerAreaData.dangerStatus == '1') {
- p['color'] = '#FAC858FF';
- } else {
- p['color'] = '#F72C5BFF';
- }
- p['width'] = 4;
- that.polylines.push(p);
- }
- }).catch(err => {
- console.log(err)
- })
- },
- }
- }
- </script>
- <style lang="scss" scoped>
- $nav-height: 75px;
- .tag {
- display: flex;
- flex-direction: row;
- justify-content: flex-start;
- align-items: center;
- margin-bottom: 10px;
- padding-left: 10px;
- flex-wrap: wrap;
- view {
- margin: 5px;
- }
- }
- .select-checkbox {
- margin-top: 0px;
- margin-bottom: 5px;
- padding-left: 15px;
- }
- .count-info-line {
- padding-top: 5px;
- padding-bottom: 5px;
- padding-left: 10px;
- padding-right: 10px;
- display: flex;
- flex-direction: row;
- align-items: center;
- }
- .count-info-line .rtuCount {
- display: flex;
- flex-direction: row;
- align-items: center;
- .name {
- color: dimgray;
- font-size: 0.7rem;
- }
- .count {
- margin-left: 5px;
- color: dodgerblue;
- font-size: 0.7rem;
- }
- }
- .count-info-line .warnRtuCount {
- margin-left: 10px;
- display: flex;
- flex-direction: row;
- align-items: center;
- .name {
- color: dimgray;
- font-size: 0.7rem;
- }
- .count {
- margin-left: 5px;
- color: red;
- font-size: 0.7rem;
- }
- }
- .scroll-view {
- /* #ifndef APP-NVUE */
- width: 100%;
- height: 100%;
- /* #endif */
- flex: 1
- }
- // 处理抽屉内容滚动
- .scroll-view-box {
- flex: 1;
- position: absolute;
- top: 0;
- right: 0;
- bottom: 0;
- left: 0;
- }
- </style>
|