| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435 |
- <!--
- * @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 class="page-body">
- <uni-drawer ref="yjDrawerRef" :width="yjDrawerWidth" mode="left">
- <view v-if="popBoxIndex ===1">
- <view class="scroll-view">
- <scroll-view class="scroll-view-box" scroll-y="true">
- <uni-section title="实时雨情" titleFontSize="0.8rem" type="line">
- <template v-slot:right>
- <view class="view-flex-inline" style="margin-right: 10px;"
- @click="yjPopMenuClose">
- <view class="text-under-line" style="color: blue;">关闭</view>
- </view>
- </template>
- <view class="search-block">
- <view class="rtu-code">
- <uni-easyinput :styles="inputStyles" @input="yjRainSearchRtuCodeValClear"
- prefixIcon="search" v-model="yjRainSearchRtuCodeVal"
- placeholder="请输入测站编码">
- </uni-easyinput>
- </view>
- <view class="rtu-name">
- <uni-easyinput :styles="inputStyles" @input="yjRainSearchRtuNameValClear"
- prefixIcon="search" v-model="yjRainSearchRtuNameVal"
- placeholder="请输入测站名称">
- </uni-easyinput>
- </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 class="submit-btn">
- <button type="default" @click="yjRainDataSearch">查 询</button>
- </view>
- </view>
- <uni-list style="min-height: 40px;">
- <uni-list-item v-for="item in yjRainTableData" :key="item.id">
- <template v-slot:body>
- <view class="list-item-block">
- <view class="view-flex-inline" @click="onYjRainDataRtuClick(item)">
- <view
- class="list-item-title list-item-text-ellipsis text-under-line"
- style="color: blue;">
- {{item.rtuName}}
- </view>
- </view>
- <view class="view-flex-inline">
- <text class="list-item-text" style="color: gray;">累计雨量:</text>
- <text class="list-item-text"
- style="color: coral;margin-left: 5px;">{{item.drp}}
- mm</text>
- </view>
- </view>
- </template>
- </uni-list-item>
- </uni-list>
- <uni-group>
- <view class="pagination-block" style="margin-top: 5px;">
- <uni-pagination :page-size="yjRainListPageSize"
- :current="yjRainListPageCurrent" :total="yjRainListTotal"
- @change="yjRainListPageChange" prevText="前一页" nextText="后一页" />
- </view>
- </uni-group>
- </uni-section>
- </scroll-view>
- </view>
- </view>
- <view v-if="popBoxIndex ===2">
- <view class="scroll-view">
- <scroll-view class="scroll-view-box" scroll-y="true">
- <uni-section title="预警信息" titleFontSize="0.8rem" type="line">
- <template v-slot:right>
- <view class="view-flex-inline" style="margin-right: 10px;"
- @click="yjPopMenuClose">
- <view class="text-under-line" style="color: blue;">关闭</view>
- </view>
- </template>
- <view class="search-block">
- <view class="rtu-name">
- <uni-easyinput :styles="inputStyles" @input="yjSearchWarnNameValClear"
- prefixIcon="search" v-model="yjSearchWarnNameVal" placeholder="请输入预警名称">
- </uni-easyinput>
- </view>
- <view class="rtu-name">
- <uni-easyinput :styles="inputStyles" @input="yjSearchAdNameValClear"
- prefixIcon="search" v-model="yjSearchAdNameVal" placeholder="请输入行政区名称">
- </uni-easyinput>
- </view>
- <view class="submit-btn">
- <button type="default" @click="yjWarnDataSearch">查 询</button>
- </view>
- </view>
- <uni-list style="min-height: 40px;">
- <uni-list-item v-for="item in yjWarnTableData" :key="item.id">
- <template v-slot:body>
- <view class="list-item-block">
- <view class="view-flex-inline" @click="onYjWarnDataRtuClick(item)">
- <view
- class="list-item-title list-item-text-ellipsis text-under-line"
- style="color: blue;">
- {{item.warnName}}
- </view>
- </view>
- <view class="view-flex-inline">
- <text class="list-item-text"
- style="margin-left: 0px;color: gray;">预警信息:{{item.warnInfo}}</text>
- </view>
- <view class="view-flex-inline">
- <text class="list-item-text"
- style="color: gray;">预警时间:{{item.warnTime}}</text>
- </view>
- <view class="view-flex-inline">
- <text class="list-item-text"
- style="color: gray;">行政区:</text>
- </view>
- </view>
- </template>
- </uni-list-item>
- </uni-list>
- <uni-group>
- <view class="pagination-block" style="margin-top: 5px;">
- <uni-pagination :page-size="yjWarnPageSize" :current="yjWarnPageCurrent"
- :total="yjWarnTotal" @change="yjWarnPageChange" prevText="前一页"
- nextText="后一页" />
- </view>
- </uni-group>
- </uni-section>
- </scroll-view>
- </view>
- </view>
- <view v-if="popBoxIndex ===3">
- <view class="scroll-view">
- <scroll-view class="scroll-view-box" scroll-y="true">
- <uni-section title="危险区信息" titleFontSize="0.8rem" type="line">
- <template v-slot:right>
- <view class="view-flex-inline" style="margin-right: 10px;"
- @click="yjPopMenuClose">
- <view class="text-under-line" style="color: blue;">关闭</view>
- </view>
- </template>
- <view class="search-block">
- <view class="rtu-name">
- <uni-easyinput :styles="inputStyles" @input="yjDangerAreaNameValClear"
- prefixIcon="search" v-model="yjDangerAreaNameVal"
- placeholder="请输入危险区名称">
- </uni-easyinput>
- </view>
- <view class="rtu-name">
- <uni-easyinput :styles="inputStyles" @input="yjDangerAreaAdNameValClear"
- prefixIcon="search" v-model="yjDangerAreaAdNameVal"
- placeholder="请输入行政区名称">
- </uni-easyinput>
- </view>
- <view class="submit-btn">
- <button type="default" @click="yjDangerAreaDataSearch">查 询</button>
- </view>
- </view>
- <uni-list style="min-height: 40px;">
- <uni-list-item v-for="item in yjDangerAreaTableData" :key="item.id">
- <template v-slot:body>
- <view class="list-item-block">
- <view class="view-flex-inline" @click="yjDangerAreaDataClick(item)">
- <view
- class="list-item-title list-item-text-ellipsis text-under-line"
- style="color: blue;">
- {{item.dangerAreaName}}
- </view>
- </view>
- <view class="view-flex-inline">
- <text class="list-item-text list-item-text-ellipsis"
- style="color: gray;">测站名称:{{item.rtuName}}</text>
- </view>
- <view class="view-flex-inline">
- <text class="list-item-text list-item-text-ellipsis"
- style="color: gray;">行政区:{{item.adnm}}</text>
- </view>
- <!-- <view class="view-flex-inline">
- <text class="list-item-text"
- style="color: gray;">经纬度:{{item.centerPointLng)}},{{toLocation(item.centerPointLat)}}</text>
- </view> -->
- </view>
- </template>
- </uni-list-item>
- </uni-list>
- <uni-group>
- <view class="pagination-block" style="margin-top: 5px;">
- <uni-pagination :page-size="yjDangerAreaPageSize"
- :current="yjDangerAreaPageCurrent" :total="yjDangerAreaTotal"
- @change="yjDangerAreaPageChange" prevText="前一页" nextText="后一页" />
- </view>
- </uni-group>
- </uni-section>
- </scroll-view>
- </view>
- </view>
- </uni-drawer>
- <view class="page-section page-section-gap">
- <map ref="mapId" :style="mapStyles" :latitude="latitude" :longitude="longitude"
- :markers="yjMapMarkers" :polygons="polygons" :scale="scale" :polyline="polylines">
- <cover-view v-if="yjDangerAreaCoverView==1" style="width: 200px;background-color: gray;">
- <uni-section title="危险区" type="line">
- <uni-list style="min-height: 40px;">
- <uni-list-item v-for="item in yjDangerAreas" :key="item.id">
- <template v-slot:body>
- <view class="list-item-block">
- <view class="view-flex-inline" @click="yjDangerAreaClick(item)">
- <view
- class="list-item-title list-item-text-ellipsis text-under-line"
- style="color: blue;">
- {{item.dangerAreaName}}
- </view>
- </view>
- </view>
- </template>
- </uni-list-item>
- </uni-list>
- </uni-section>
- </cover-view>
- <cover-view v-if="yjRtuCoverView==1" style="width: 200px;background-color: gray;">
- <uni-section title="关联站点" type="line">
- <uni-list style="min-height: 40px;">
- <uni-list-item v-for="item in yjDangerAreaRtus" :key="item.id">
- <template v-slot:body>
- <view class="list-item-block">
- <view class="view-flex-inline" @click="yjDangerAreaLinkRtuClick(item)">
- <view
- class="list-item-title list-item-text-ellipsis text-under-line"
- style="color: blue;">
- {{item.rtuName}}
- </view>
- </view>
- </view>
- </template>
- </uni-list-item>
- </uni-list>
- </uni-section>
- </cover-view>
- <cover-view v-if="yjDangerAreaLineCoverView==1" style="width: 200px;background-color: gray;">
- <uni-section title="转移路线" type="line">
- <uni-list style="min-height: 40px;">
- <uni-list-item v-for="item in yjDangerAreaLeaveLines" :key="item.id">
- <template v-slot:body>
- <view class="list-item-block">
- <view class="view-flex-inline" @click="yjDangerAreaLinkLineClick(item)">
- <view
- class="list-item-title list-item-text-ellipsis text-under-line"
- style="color: blue;">
- {{item.leaveLineName}}
- </view>
- </view>
- </view>
- </template>
- </uni-list-item>
- </uni-list>
- </uni-section>
- </cover-view>
- </map>
- </view>
- <uni-fab ref="fab" :pattern="pattern" :content="content" :horizontal="horizontal" :vertical="vertical"
- :direction="direction" @trigger="trigger" @fabClick="fabClick" />
- </view>
- </view>
- <view v-else></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: '',
- components: {
- },
- data() {
- return {
- title: '管理工作台',
- permission: {
- 'admin': false,
- 'orgAdmin': false,
- 'companyAdmin': false,
- 'companyServciePerson': false,
- 'yjServicePerson': false,
- },
- currentRole: '',
- subSystem: 0,
- barcurrent: 1,
- pageSize: 10,
- pageCurrent: 1,
- total: 0,
- list: [],
- regionTree: [],
- regionCode: '',
- selectedTreeNode: '',
- searchRtuNameVal: '',
- searchRtuCodeVal: '',
- query: {},
- inputStyles: {
- color: '#808080',
- borderColor: '#d3d3d3'
- },
- 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,
- //以下为应急参数
- yjDangerAreaCoverView: 0,
- yjRtuCoverView: 0,
- yjDangerAreaLineCoverView: 0,
- latitude: 40.848119,
- longitude: 111.755426,
- zoom: true,
- scale: 14,
- polygons: [],
- polylines: [],
- includepoints: [],
- mapStyles: {
- width: '100%',
- height: '600px'
- },
- horizontal: 'right',
- vertical: 'bottom',
- direction: 'horizontal',
- pattern: {
- color: '#7A7E83',
- backgroundColor: '#fff',
- selectedColor: '#007AFF',
- buttonColor: '#007AFF',
- iconColor: '#fff'
- },
- content: [{
- iconPath: '/static/images/tabbar/home.png',
- selectedIconPath: '/static/images/tabbar/home_selected.png',
- text: '雨情',
- active: false
- },
- {
- iconPath: '/static/images/tabbar/warn.png',
- selectedIconPath: '/static/images/tabbar/warn_selected.png',
- text: '预警',
- active: false
- },
- {
- iconPath: '/static/images/tabbar/workbench.png',
- selectedIconPath: '/static/images/tabbar/workbench_selected.png',
- text: '危险区',
- active: false
- }
- ],
- popMenu: false,
- popBoxIndex: 0,
- yjMapMarkers: [],
- yjDrawerWidth: 200,
- //应急雨量参数
- 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,
- },
- yjRainListPageSize: 10,
- yjRainListPageCurrent: 1,
- yjRainListTotal: 0,
- yjRainTableData: [],
- yjRainSearchRtuNameVal: '',
- yjRainSearchRtuCodeVal: '',
- //应急预警参数
- yjSearchWarnNameVal: '',
- yjSearchAdNameVal: '',
- yjWarnPageSize: 10,
- yjWarnPageCurrent: 1,
- yjWarnTotal: 0,
- yjWarnTableData: [],
- //应急危险区参数
- yjDangerAreaNameVal: '',
- yjDangerAreaAdNameVal: '',
- yjDangerAreaPageSize: 10,
- yjDangerAreaPageCurrent: 1,
- yjDangerAreaTotal: 0,
- yjDangerAreaTableData: [],
- yjDangerAreaRtus: [],
- yjDangerAreaLeaveLines: [],
- yjDangerAreas: [],
- }
- },
- 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.subSystem == 1) {
- this.title = "管理工作台";
- } else if (this.subSystem == 2) {
- this.title = "监测预警管理";
- this.yjDrawerWidth = uni.getWindowInfo().windowWidth - 100;
- this.mapStyles.height = (uni.getWindowInfo().windowHeight - 75 - 20) + "px";
- }
- 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.getRegionTree();
- } else if (this.subSystem == 2) {
- }
- } 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";
- this.$refs.fab.open()
- },
- 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
- })
- },
- //以下为应急系统业务功能
- trigger(e) {
- let that = this;
- this.content[0].active = false;
- this.content[1].active = false;
- this.content[2].active = false;
- this.content[e.index].active = !e.item.active
- this.popBoxIndex = e.index + 1;
- this.$refs.yjDrawerRef.open()
- // if (this.$refs.fab.isShow) {
- // this.$refs.fab.close()
- // }
- this.$nextTick(() => {
- if (that.popBoxIndex == 1) {
- that.yjDangerAreaCoverView = 0;
- that.yjRtuCoverView = 0;
- that.yjDangerAreaLineCoverView = 0;
- that.getYjRainDataPage();
- } else if (that.popBoxIndex == 2) {
- that.yjDangerAreaCoverView = 0;
- that.yjRtuCoverView = 0;
- that.yjDangerAreaLineCoverView = 0;
- that.getYjWarnDataPage();
- } else if (that.popBoxIndex == 3) {
- that.yjDangerAreaCoverView = 1;
- that.yjRtuCoverView = 1;
- that.yjDangerAreaLineCoverView = 1;
- that.getYjDangerAreaDataPage();
- }
- })
- },
- fabClick() {
- // this.popMenu = !this.popMenu
- // if (!this.popMenu) {
- // this.content[0].active = false;
- // this.content[1].active = false;
- // this.content[2].active = false;
- // }
- },
- yjPopMenuClose() {
- // this.popMenu = false;
- // this.content[0].active = false;
- // this.content[1].active = false;
- // this.content[2].active = false;
- // if (this.$refs.fab.isShow) {
- // this.$refs.fab.close()
- // }
- this.$refs.yjDrawerRef.close();
- },
- //雨量数据业务
- yjRainListPageChange(e) {
- this.yjRainListPageCurrent = e.current;
- this.getYjRainDataPage()
- },
- yjRainDataSearch() {
- let params = {};
- if (this.yjRainSearchRtuCodeVal.length > 0) {
- params['rtuCode'] = this.yjRainSearchRtuCodeVal;
- }
- if (this.yjRainSearchRtuNameVal.length > 0) {
- params['rtuName'] = this.yjRainSearchRtuNameVal;
- }
- this.getYjRainDataPage(params);
- },
- getYjRainDataPage(params = {}) {
- const current = this.yjRainListPageCurrent;
- const size = this.yjRainListPageSize;
- 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/rtu/data/rain/yj/page',
- method: 'GET',
- params: {
- current,
- size,
- isSubmit
- },
- data: postData,
- }).then(res => {
- if (res.data.records != null) {
- that.yjRainTableData = res.data.records;
- }
- that.yjRainListTotal = res.data.total;
- if (that.yjRainListTotal == 0) {
- that.yjRainListPageCurrent = 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;
- //this.getYjRainDataPage();
- break;
- }
- }
- },
- yjRainSearchRtuNameValClear(e) {
- if (e == null || e.length == 0) {
- this.yjRainSearchRtuNameVal = '';
- }
- },
- yjRainSearchRtuCodeValClear(e) {
- if (e == null || e.length == 0) {
- this.yjRainSearchRtuCodeValL = '';
- }
- },
- onYjRainDataRtuClick(item) {
- this.$refs.yjDrawerRef.close();
- let that = this;
- this.$nextTick(() => {
- that.yjMapMarkers = [];
- let marker = {};
- marker['id'] = item.id;
- marker['latitude'] = item.lat;
- marker['longitude'] = item.lng;
- 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";
- that.yjMapMarkers.push(marker)
- that.latitude = item.lat;
- that.longitude = item.lng;
- })
- },
- //应急预警信息
- yjSearchWarnNameValClear(e) {
- if (e == null || e.length == 0) {
- this.yjSearchWarnNameVal = '';
- }
- },
- yjSearchAdNameValClear(e) {
- if (e == null || e.length == 0) {
- this.yjSearchAdNameVal = '';
- }
- },
- yjWarnPageChange(e) {
- this.yjDangerAreaPageCurrent = e.current;
- this.getYjWarnDataPage()
- },
- onYjWarnDataRtuClick(item) {
- this.$refs.yjDrawerRef.close();
- let that = this;
- this.$nextTick(() => {
- that.yjMapMarkers = [];
- let marker = {};
- marker['id'] = item.id;
- marker['latitude'] = item.warnLttd;
- marker['longitude'] = item.warnLgtd;
- let label = {};
- label['content'] = item.warnName;
- label['color'] = '#ff0000';
- label['bgColor'] = '#ffffff';
- label['anchorY'] = -40;
- marker['label'] = label;
- marker['iconPath'] = "/static/images/icon_warning.png";
- that.yjMapMarkers.push(marker)
- that.latitude = item.warnLttd;
- that.longitude = item.warnLgtd;
- })
- },
- yjWarnDataSearch() {
- let params = {};
- if (this.yjSearchWarnNameVal.length > 0) {
- params['warnName'] = this.yjSearchWarnNameVal;
- }
- if (this.yjSearchAdNameVal.length > 0) {
- params['dangerAreaName'] = this.yjSearchAdNameVal;
- }
- this.getYjWarnDataPage(params);
- },
- getYjWarnDataPage(params = {}) {
- const current = this.yjWarnPageCurrent;
- const size = this.yjWarnPageSize;
- const isSubmit = '0';
- let postData = Object.assign(params, this.query);
- let that = this;
- http.request({
- url: '/galaxy-business/yj/warn/page',
- method: 'GET',
- params: {
- current,
- size,
- },
- data: postData,
- }).then(res => {
- if (res.data.records != null) {
- that.yjWarnTableData = res.data.records;
- }
- that.yjWarnTotal = res.data.total;
- if (that.yjWarnTotal == 0) {
- that.yjWarnPageCurrent = 1;
- }
- }).catch(err => {
- console.log(err)
- })
- },
- //应急危险区业务
- yjDangerAreaNameValClear(e) {
- if (e == null || e.length == 0) {
- this.yjDangerAreaNameVal = '';
- }
- },
- yjDangerAreaAdNameValClear(e) {
- if (e == null || e.length == 0) {
- this.yjDangerAreaAdNameVal = '';
- }
- },
- yjDangerAreaDataSearch() {
- let params = {};
- if (this.yjDangerAreaNameVal.length > 0) {
- params['dangerAreaName'] = this.yjDangerAreaNameVal;
- }
- if (this.yjDangerAreaAdNameVal.length > 0) {
- params['adName'] = this.yjDangerAreaAdNameVal;
- }
- this.getYjDangerAreaDataPage(params);
- },
- yjDangerAreaPageChange(e) {
- this.yjDangerAreaPageCurrent = e.current;
- this.getYjDangerAreaDataPage()
- },
- getYjDangerAreaDataPage(params = {}) {
- const current = this.yjDangerAreaPageCurrent;
- const size = this.yjDangerAreaPageSize;
- const isSubmit = '0';
- let postData = Object.assign(params, this.query);
- let that = this;
- http.request({
- url: '/galaxy-business/map/dangerarea/page',
- method: 'GET',
- params: {
- current,
- size,
- },
- data: postData,
- }).then(res => {
- if (res.data.records != null) {
- that.yjDangerAreaTableData = res.data.records;
- }
- that.yjDangerAreaTotal = res.data.total;
- if (that.yjDangerAreaTotal == 0) {
- that.yjDangerAreaPageCurrent = 1;
- }
- }).catch(err => {
- console.log(err)
- })
- },
- yjDangerAreaDataClick(item) {
- this.$refs.yjDrawerRef.close();
- let that = this;
- this.yjDangerAreas = [];
- let d = {};
- d['id'] = item.id;
- d['dangerAreaName'] = item.dangerAreaName;
- d['lng'] = item.centerPointLng;
- d['lat'] = item.centerPointLat;
- this.yjDangerAreas.push(d);
- this.$nextTick(() => {
- let c = gcoord.transform(
- [item.centerPointLng, item.centerPointLat],
- gcoord.WGS84,
- gcoord.GCJ02
- );
- that.latitude = c[1];
- that.longitude = c[0];
- this.scale = 14;
- that.getDangerAreaDataGcoord(item.id);
- })
- },
- getDangerAreaDataGcoord(id) {
- let that = this;
- let postData = {};
- postData['id'] = id;
- http.request({
- url: '/galaxy-business/map/dangerarea/detail',
- method: 'GET',
- data: postData
- }).then(res => {
- if (res.data != null) {
- that.includepoints = [];
- that.polygons = [];
- 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;
- that.includepoints.push(ps[0]);
- let dashArray = [];
- dashArray.push(4);
- dashArray.push(10);
- p['dashArray'] = dashArray;
- if (res.data.dangerStatus == '1') {
- p['strokeColor'] = '#FF0000';
- p['fillColor'] = '#F72C5B7D';
- } else {
- p['strokeColor'] = '#FC8452';
- p['fillColor'] = '#FAC8587D';
- }
- that.polygons.push(p);
- that.yjMapMarkers = [];
- let rtus = res.data.rtus.map(item => {
- let rtu = {};
- rtu['id'] = item.id;
- rtu['latitude'] = item.lat;
- rtu['longitude'] = item.lng;
- rtu['rtuName'] = item.rtuName;
- rtu['rtuCode'] = item.rtuCode;
- return rtu;
- });
- that.yjDangerAreaRtus = rtus;
- let leaveLines = res.data.leaveLines.map(item => {
- let line = {};
- line['id'] = item.id;
- line['latitude'] = new Number(item.centerPointLat).toFixed(6);
- line['longitude'] = new Number(item.centerPointLng).toFixed(6);
- line['leaveLineName'] = item.leaveLineName;
- return line;
- });
- that.yjDangerAreaLeaveLines = leaveLines;
- that.scale = 14;
- }
- }).catch(err => {
- console.log(err)
- })
- },
- yjDangerAreaLinkRtuClick(item) {
- this.yjMapMarkers = [];
- let marker = {};
- marker['id'] = item.id;
- let l = gcoord.transform(
- [item.longitude, item.latitude],
- gcoord.WGS84,
- gcoord.GCJ02
- );
- marker['latitude'] = l[1];
- marker['longitude'] = l[0];
- let label = {};
- label['content'] = item.rtuName;
- label['color'] = '#ff0000';
- label['bgColor'] = '#ffffff';
- label['anchorY'] = -40;
- marker['label'] = label;
- marker['iconPath'] = "/static/images/icon_warning.png";
- this.yjMapMarkers.push(marker)
- this.latitude = item.latitude;
- this.longitude = item.longitude;
- this.scale = 12;
- },
- yjDangerAreaLinkLineClick(item) {
- let that = this;
- this.polylines = [];
- this.yjMapMarkers = [];
- this.polygons = [];
- let c = gcoord.transform(
- [item.longitude, item.latitude],
- gcoord.WGS84,
- gcoord.GCJ02
- );
- this.latitude = c[1];
- this.longitude = c[0];
- this.scale = 16;
- let id = item.id;
- this.$nextTick(() => {
- that.getYjDangerAreaLineDetail(id);
- })
- },
- getYjDangerAreaLineDetail(id) {
- let that = this;
- let postData = {};
- postData['id'] = id;
- http.request({
- url: '/galaxy-business/map/leaveline/detail',
- method: 'GET',
- data: postData
- }).then(res => {
- if (res.data != null) {
- 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;
- p['color'] = '#ee0000';
- that.polylines.push(p);
- }
- }).catch(err => {
- console.log(err)
- })
- },
- yjDangerAreaClick(item) {
- let that = this;
- this.polylines = [];
- this.yjMapMarkers = [];
- this.polygons = [];
- this.$nextTick(() => {
- let c = gcoord.transform(
- [item.lng, item.lat],
- gcoord.WGS84,
- gcoord.GCJ02
- );
- that.latitude = c[1];
- that.longitude = c[0];
- this.scale = 14;
- that.getDangerAreaDataGcoord(item.id);
- })
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- $nav-height: 75px;
- .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>
|