Merge branch 'develop' of http://xearth.cn:6600/r/wuyushui/SewerAndRainNetwork into develop
| | |
| | | // 测试环境IP:http://10.238.221.113 |
| | | import axios from '@utils/axios' |
| | | import * as mapUrl from './mapUrl' |
| | | import qs from 'qs' // 解析参数 |
| | | |
| | | /** |
| | | * 该方法配置 |
| | |
| | | }, |
| | | // 废水点 |
| | | getWasteWater (data) { |
| | | return axios.get(mapUrl.getWasteWater, data) |
| | | return axios.post(mapUrl.getWasteWater, qs.stringify(data), { 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8' }) |
| | | }, |
| | | // 废水点明细表 |
| | | getWasteWaterMonitoringDetails (data) { |
| | | return axios.get(mapUrl.getWasteWaterMonitoringDetails, data) |
| | | }, |
| | | // 废水日数据和小时数据及明细表 |
| | | getQueryOnlineMonData (data) { |
| | | return axios.get(mapUrl.getQueryOnlineMonData, data) |
| | | getQueryOnlineMonData (data, setHeaders) { |
| | | return axios.post(mapUrl.getQueryOnlineMonData, qs.stringify(data), { 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8' }) |
| | | }, |
| | | // 废水人工数据 |
| | | getQueryLabMonData (data) { |
| | | return axios.get(mapUrl.getQueryLabMonData, data) |
| | | return axios.post(mapUrl.getQueryLabMonData, qs.stringify(data), { 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8' }) |
| | | }, |
| | | // 废水实时数据 |
| | | getDataItems (data) { |
| | |
| | | export const getWasteGasManualData = $HOST + '/wasteGas/QueryLabMonData' |
| | | |
| | | // 废水 |
| | | export const getWasteWater = $HOST + '/wasteWater/getWasteWater' // 废水点信息 |
| | | export const getWasteWater = 'http://10.246.162.140:8080/EPInterface/DataService/EPMapService.asmx/ObtainningConInfo' // 废水点信息 |
| | | export const getWasteWaterMonitoring = $HOST + '/wasteWater/getWasteWaterMonitoring' // 废水监测数据 |
| | | export const getWasteWaterMonitoringDetails = $HOST + '/wasteWater/getWasteWaterMonitoringDetails' // 废水监测数据明细表 |
| | | export const getQueryOnlineMonData = $HOST + '/wasteWater/QueryOnlineMonData' // 废水日数据小时数据及明细表数据 |
| | | export const getQueryLabMonData = $HOST + '/wasteWater/QueryLabMonData' // 人工数据 |
| | | export const getQueryOnlineMonData = 'http://10.246.162.140:8080/EPInterface/DataService/EPMapService.asmx/QueryOnlineMonData' // 废水日数据小时数据及明细表数据 |
| | | export const getQueryLabMonData = 'http://10.246.162.140:8080/EPInterface/DataService/EPMapService.asmx/QueryLabMonData' // 人工数据 |
| | | export const getDataItems = $HOST + '/wasteWater/RTDB/DataItems' // 实时数据 |
| | | |
| | | // 公司 |
| | |
| | | } |
| | | }) |
| | | } |
| | | export function reportLocationSearch (data = {}) { |
| | | return $http.get('http://10.246.133.164//api/search?', data) |
| | | } |
| | |
| | | L: L, |
| | | layer: layer |
| | | }) |
| | | const res = await mapApi.getWasteWater() |
| | | const res = await mapApi.getWasteWater({ |
| | | companyId: 3900100145, // 企业名称 |
| | | id: '', |
| | | monType: 1, // 值为1查询废水 |
| | | userCode: 'wenchun.deng', // 角色名称 |
| | | monDuration: '', |
| | | epName: '', |
| | | secdDeptId: '', |
| | | contrLevel: '', |
| | | dataStatus: '', |
| | | dataFlag: '', |
| | | runStatus: '', |
| | | emissTypeId: '' |
| | | }) |
| | | const data = res.Result.DataInfo || {} |
| | | for (let i = 0; i < data.length; i++) { |
| | | // 经纬度 位置 |
| | |
| | | methods: { |
| | | async initdetail () { |
| | | const timeEnd = dayjs().format('YYYY-MM-DD HH:mm:ss') |
| | | const timeStart = dayjs().subtract(3, 'minute').format('YYYY-MM-DD HH:mm:ss') |
| | | var timeStart = null |
| | | var oDate = new Date() |
| | | var year = oDate.getFullYear() |
| | | if ((year % 4 === 0 && year % 100 !== 0) || year % 400 === 0) { // 判断是平年还是闰年 |
| | | timeStart = dayjs().subtract(366, 'day').format('YYYY-MM-DD HH:mm:ss') |
| | | } else { |
| | | timeStart = dayjs().subtract(365, 'day').format('YYYY-MM-DD HH:mm:ss') |
| | | } |
| | | const data = { |
| | | poltSourceId: '', |
| | | poltMtrlId: '', |
| | | companyCode: '', |
| | | emissTypeId: '', |
| | | monItemId: 28, |
| | | companyId: 3900100145, |
| | | labMonPointId: 219, |
| | | beginTime: timeStart, |
| | |
| | | // console.log(result) |
| | | this.tableData = result |
| | | for (let i = 0; i < result.length; i++) { |
| | | console.log(result[i].LabMonValue) |
| | | if (result[i].LabMonValue === '0') { |
| | | return '-' |
| | | } |
| | |
| | | }, |
| | | async draw24Chart () { |
| | | const data = { |
| | | poltSourceId: '', |
| | | poltMtrlId: '', |
| | | emissTypeId: '', |
| | | onLineMonEmissPointId: 23, |
| | | monItemId: 28, |
| | | beginTime: this.formData.timeStart, |
| | |
| | | formData: { |
| | | region: '25', |
| | | regionList: [25, 50, 75, 100], |
| | | startTime: dayjs().subtract(16, 'hour').format('YYYY-MM-DD HH'), |
| | | endTime: dayjs().format('YYYY-MM-DD HH') |
| | | startTime: dayjs().subtract(24, 'hour').format('YYYY-MM-DD HH:mm:ss'), |
| | | endTime: dayjs().format('YYYY-MM-DD HH:mm:ss') |
| | | }, |
| | | chart: null, |
| | | jcdID: 1, |
| | |
| | | // 初始化数据请求 |
| | | async draw24Chart () { |
| | | const data = { |
| | | poltSourceId: '', |
| | | poltMtrlId: '', |
| | | emissTypeId: '', |
| | | onLineMonEmissPointId: 23, |
| | | monItemId: 28, |
| | | beginTime: this.formData.startTime, |
| | |
| | | biaozhuiz = bzzList[i].bzhui |
| | | } |
| | | } |
| | | if (c.value) { |
| | | if (c.value[1] > biaozhuiz) { |
| | | return zdcbcolor |
| | | } else if (c.value[1] > biaozhuiz * 0.9) { |
| | |
| | | } else { |
| | | return '#33c95f' |
| | | } |
| | | } |
| | | }, |
| | | lineStyle: { // 折线的颜色 |
| | | color: ydatas[i].zxcolor, |
| | |
| | | </el-form-item> |
| | | </el-form> |
| | | <el-dialog |
| | | custom-class="el-dialog--center" |
| | | custom-class="event-report-dialog" |
| | | title="事发位置定位" |
| | | :visible.sync="dialogLocation" |
| | | :append-to-body="true" |
| | | :modal="false" |
| | |
| | | /* margin-left: 6.4rem !important;*/ |
| | | /*}*/ |
| | | |
| | | /deep/ .el-dialog--center { |
| | | /deep/ .event-report-dialog { |
| | | left: 5rem; |
| | | top: 1rem; |
| | | margin-top: 2rem; |
| | |
| | | } |
| | | |
| | | /deep/ .el-dialog { |
| | | left: 5rem; |
| | | top: 1rem; |
| | | width: 3.087834rem; |
| | | } |
| | | |
| | |
| | | <template> |
| | | <div class="report-location-box"> |
| | | <div class="report-location"> |
| | | <el-tabs v-model="activeName"> |
| | | <el-tab-pane label="点击定位" name="first"> |
| | | <div class="click-location"> |
| | | <el-row> |
| | | <el-input type="text" v-model="clickLocation" clearable @focus="focusLocation"></el-input> |
| | | </el-row> |
| | | <el-row> |
| | | <el-button type="primary" @click="confirm">确认</el-button> |
| | | </el-row> |
| | | </div> |
| | | <el-tab-pane label="搜索定位" name="first"> |
| | | <ReportLocationSearch></ReportLocationSearch> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="管段定位" name="second"> |
| | | <ReportLocationSection></ReportLocationSection> |
| | |
| | | <el-button type="primary" @click="mapPoints">定位</el-button> |
| | | </div> |
| | | </el-row> |
| | | <div class="place-bottom" style="text-align: center;margin: 10px"> |
| | | <div class="place-bottom" style="text-align: center;margin: 5px"> |
| | | <el-button type="primary" @click="confirm">确认</el-button> |
| | | </div> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | // import eventBus from '../../../../eventBus' |
| | | // 管段定位组件 |
| | | import ReportLocationSection from './ReportLocationSection' |
| | | import ReportLocationSearch from './ReportLocationSearch' |
| | | |
| | | import iconUrl from '../../../../../public/assets/images/map/loc.png' |
| | | |
| | | export default { |
| | | name: 'ReportLocation', |
| | | components: { |
| | | ReportLocationSearch, |
| | | ReportLocationSection |
| | | }, |
| | | data () { |
| | | return { |
| | | // active tab切换 |
| | | activeName: 'first', |
| | | // 点击定位绑定数据 |
| | | clickLocation: '', |
| | | // 经纬度定位 |
| | | LongLatPos: { |
| | | longPos: '', |
| | |
| | | // const point = [e.latlng.lng, e.latlng.lat] |
| | | const pointX = e.latlng.lng |
| | | const pointY = e.latlng.lat |
| | | // let marker = window.L.marker(point,{ |
| | | // |
| | | // }) |
| | | this.clickLocation = '\'' + pointX + '\'' + pointY + '' |
| | | this.mapPointResult(e) |
| | | }, |
| | |
| | | console.log(e) |
| | | this.LongLatPos.longPos = e.latlng.lng |
| | | this.LongLatPos.latPos = e.latlng.lat |
| | | const as = [e.latlng.lat, e.latlng.lng] |
| | | // console.log(as) |
| | | const marker = window.L.marker(as, { |
| | | icon: window.L.icon({ |
| | | iconUrl: iconUrl, |
| | | iconSize: [30, 30], |
| | | iconAnchor: [15, 15] |
| | | }) |
| | | }) |
| | | window.map.addLayer(marker) |
| | | }, |
| | | // 获得焦点 进行定位 |
| | | focusLocation () { |
| | |
| | | align-items: center; |
| | | justify-content: space-around; |
| | | } |
| | | .click-location { |
| | | margin: 0 auto; |
| | | text-align: center; |
| | | |
| | | .el-input { |
| | | width: 80%; |
| | | margin: 15px auto; |
| | | } |
| | | |
| | | .el-button { |
| | | margin: 15px auto; |
| | | } |
| | | } |
| | | .place { |
| | | text-align: center; |
| | | |
New file |
| | |
| | | <template> |
| | | <div class="click-location"> |
| | | <el-row> |
| | | <el-input type="text" v-model="clickLocation" clearable @change="focusLocation"></el-input> |
| | | </el-row> |
| | | <el-row> |
| | | <el-button type="primary" @click="confirm" style="text-align: right">确认</el-button> |
| | | </el-row> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import { reportLocationSearch } from '../../../../api/request' |
| | | import { pulseEffect } from '../../../../utils/utils' |
| | | export default { |
| | | name: 'ReportLocationSearch', |
| | | data () { |
| | | return { |
| | | // 点击定位绑定数据 |
| | | clickLocation: '' |
| | | } |
| | | }, |
| | | methods: { |
| | | // 获得焦点 进行定位 |
| | | focusLocation () { |
| | | // console.log(this.clickLocation) |
| | | // console.log(window.map.getZoom()) |
| | | // console.log(window.map.getBounds()) |
| | | const getBoundsData = '' + window.map.getBounds()._southWest.lng + ',' + window.map.getBounds()._southWest.lat + ',' + window.map.getBounds()._northEast.lng + ',' + window.map.getBounds()._northEast.lat |
| | | const data = { |
| | | postStr: { |
| | | keyWord: this.clickLocation, |
| | | level: window.map.getZoom(), |
| | | mapBound: getBoundsData, |
| | | queryType: 7, |
| | | count: 14, |
| | | start: 0, |
| | | queryTerminal: 10000 |
| | | }, |
| | | type: 'query' |
| | | } |
| | | // console.log(data) |
| | | reportLocationSearch(data).then(res => { |
| | | console.log(res) |
| | | // const as = res.pois[0].lonlat.trim().split(' ') |
| | | // window.map.setView([as[1], as[0]], 17) |
| | | // pulseEffect([as[1], as[0]]) |
| | | for (let i = 0; i < res.pois.length; i++) { |
| | | const as = res.pois[i].lonlat.trim().split(' ') |
| | | if (res.pois[i].name.indexOf(this.clickLocation) >= 0) { |
| | | window.map.setView([as[1], as[0]], 17) |
| | | pulseEffect([as[1], as[0]]) |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | // 点击确认按钮事件 |
| | | confirm () { |
| | | // 通过子组件向父组件传递数据 |
| | | this.$emit('locationClick', this.LongLatPos) |
| | | console.log('搜索定位') |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="less" scoped> |
| | | .click-location { |
| | | margin: 0 auto; |
| | | text-align: center; |
| | | |
| | | .el-input { |
| | | width: 80%; |
| | | margin: 15px auto; |
| | | } |
| | | |
| | | .el-button { |
| | | margin: 15px auto; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-button type="primary" size="small" icon="el-icon-search" @click="pipeClickLocation">定位</el-button> |
| | | <el-button type="primary" size="small" icon="el-icon-location-outline" @click="pipeClickLocation">定位 |
| | | </el-button> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | |
| | | </el-form> |
| | | <div class="pipe-table" v-show="this.tableList.length>=1"> |
| | | <el-card> |
| | | <span class="fixed-style">管线名称</span> |
| | | <span class="fixed-style" style="display: block">管线名称</span> |
| | | <el-table |
| | | :data="tableList" |
| | | border |
| | | height="240" |
| | | max-height="280" |
| | | height="120" |
| | | max-height="140" |
| | | @row-click="sectionShowClick" |
| | | style="width: 100%"> |
| | | <el-table-column |
| | |
| | | </el-table-column> |
| | | <el-table-column |
| | | show-overflow-tooltip |
| | | prop="properties.subchaname" |
| | | label="支线名称"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | show-overflow-tooltip |
| | | prop="properties.mediumtype" |
| | | label="管线类型"> |
| | | </el-table-column> |
| | |
| | | </el-table> |
| | | </el-card> |
| | | <el-card> |
| | | <span class="fixed-style">管段列表</span> |
| | | <span class="fixed-style" style="display: block">管段列表</span> |
| | | <el-table |
| | | :data="tableListSection" |
| | | border |
| | | @row-click="sectionCode" |
| | | height="100" |
| | | max-height="120" |
| | | max-height="100" |
| | | style="width: 100%"> |
| | | <el-table-column |
| | | show-overflow-tooltip |
| | |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <span class="fixed-style">附属设施列表</span> |
| | | <span class="fixed-style" style="display: block">附属设施列表</span> |
| | | <el-table |
| | | :data="tableDataAffFac" |
| | | border |
| | | @row-click="affFacName" |
| | | height="100" |
| | | max-height="120" |
| | | style="width: 120%"> |
| | | max-height="100" |
| | | style="width: 100%"> |
| | | <el-table-column |
| | | show-overflow-tooltip |
| | | prop="properties.code" |
| | | label="附属设施编号"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | show-overflow-tooltip |
| | | prop="properties.name" |
| | | label="附属设施名称"> |
| | | </el-table-column> |
| | | <!-- <el-table-column--> |
| | | <!-- show-overflow-tooltip--> |
| | | <!-- prop="properties.measattribute"--> |
| | | <!-- label="附属设施名称">--> |
| | | <!-- </el-table-column>--> |
| | | <el-table-column |
| | | show-overflow-tooltip |
| | | prop="properties.type" |
| | |
| | | </el-table> |
| | | </el-card> |
| | | </div> |
| | | <el-row style="text-align: center;margin: 10px"> |
| | | <el-row style="text-align: right;margin: 10px"> |
| | | <el-button type="primary" @click="confirm">确认</el-button> |
| | | </el-row> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import WfsHelper from '@components/helpers/WfsHelper' |
| | | import AjaxUtils from '@utils/AjaxUtils' |
| | | |
| | | // import { pulseEffect } from '../../../../utils/utils' |
| | | // import mapApi from '../../../../api/mapApi' |
| | | |
| | | import WfsHelper from '@components/helpers/WfsHelper' |
| | | import AjaxUtils from '@utils/AjaxUtils' |
| | | import { fitBounds, highlight } from '../../../../components/helpers/LocateHelper' |
| | | import eventBus from '../../../../eventBus' |
| | | // import MapManager from '../../../helpers/MapManager' |
| | | import { WMS_URL } from '../../../../conf/Constants' |
| | | |
| | | export default { |
| | | name: 'ReportLocationSection', |
| | |
| | | tableListSection: [], |
| | | // 附属设施查询列表数据 |
| | | tableDataAffFac: [], |
| | | // 分页功能 |
| | | pageSize: 3, |
| | | total: 0, |
| | | currentPage: 1 |
| | | // 定义类型判断 if 是搜索到的数据可以进行管线选择 else 点击定位选择的管线不可以进行选择 |
| | | SectionAndAffFacTableJudge: false, |
| | | locateJudgmentSearch: false |
| | | } |
| | | }, |
| | | mounted () { |
| | | this.wfsHelper = new WfsHelper() |
| | | }, |
| | | methods: { |
| | | // 点击管线列表 展示管段内容 |
| | | // 点击管线列表 展示管段内容 和附属设施内容 |
| | | async sectionShowClick (val) { |
| | | console.log(val) |
| | | // 如果 SectionAndAffFacTableJudge === true 是搜索数据结果的列表 可以进行 管段 附属设施交互 点击定位查询结果 不进行点击交互 |
| | | if (this.SectionAndAffFacTableJudge === true) { |
| | | // 管段查询 |
| | | const sectionNameSearch = val.properties.pipename |
| | | this.tableListSection = [] |
| | |
| | | this.wfsHelper = new WfsHelper() |
| | | // 附属设施查询 |
| | | this.tableDataAffFac = [] |
| | | const AffFacSearch = val.properties.pipename |
| | | const AffFacSearch = val.properties.pipecode |
| | | console.log(AffFacSearch) |
| | | this.wfsHelper.clearFilter() |
| | | this.wfsHelper.setTypeName(['sewer:view_pipeline']) |
| | | this.wfsHelper.addLike('name', AffFacSearch) |
| | | this.wfsHelper.addEquals('name', '\'' + AffFacSearch + '\'') |
| | | this.wfsHelper.addLike('pipecode', AffFacSearch) |
| | | // this.wfsHelper.addEquals('type', '\'' + AffFacSearch + '\'') |
| | | const resAffFac = await AjaxUtils.GetDataAsynByUrl(this.wfsHelper.getUrl(), {}) |
| | | console.log(resAffFac) |
| | | if (resAffFac instanceof Object && Object.prototype.hasOwnProperty.call(resAffFac, 'features')) { |
| | | // console.log(resAffFac.features) |
| | | // for (let i = 0; i < resAffFac.features.length; i++) { |
| | | // console.log(resAffFac.features[i]) |
| | | // } |
| | | this.tableDataAffFac = resAffFac.features |
| | | } |
| | | this.wfsHelper = new WfsHelper() |
| | | } |
| | | }, |
| | | // 点击管段列表 管段编码传递 |
| | | sectionCode (val) { |
| | | console.log(val) |
| | | // console.log(val) |
| | | this.form.sectionName = val.properties.pipecode |
| | | }, |
| | | // 点击附属设施列表 管段编码传递 |
| | | affFacName (val) { |
| | | console.log(val) |
| | | // console.log(val) |
| | | this.form.affiliatedFacilities = val.properties.name |
| | | }, |
| | | // 定位功能 |
| | | localAdr (val) { |
| | | console.log(val) |
| | | fitBounds(val) |
| | | highlight(val) |
| | | }, |
| | | // 管线点击点击定位功能 |
| | | // 管线 点击定位管段的选择功能 |
| | | pipeClickLocation () { |
| | | // console.log('val') |
| | | // this.selectPipeLine() |
| | | // 设施不进行 管线表格数据的点击交互 |
| | | this.SectionAndAffFacTableJudge = false |
| | | window.mapManager.clickDialogSwitch = false |
| | | this.tableList = [] |
| | | // this.tableList = [] |
| | | // 点击获取数据 |
| | | window.map.on('click', (e) => { |
| | | window.mapManager.loadWfsDatas(e.latlng).then((res) => { |
| | | // window.mapManager.loadWfsDatas(e.latlng).then((res) => { |
| | | // console.log(res) |
| | | for (let i = 0; i < res.features.length; i++) { |
| | | // console.log(res.features[i].properties) |
| | | this.tableList.push(res.features[i]) |
| | | } |
| | | // console.log(this.tableList) |
| | | // for (let i = 0; i < res.features.length; i++) { |
| | | // this.tableList.push(res.features[i]) |
| | | // this.tableListSection.push(res.features[i]) |
| | | // this.tableDataAffFac.push(res.features[i]) |
| | | // } |
| | | // }) |
| | | // return new Promise((resolve, reject) => { |
| | | const size = window.map.getSize() |
| | | var point = window.map.latLngToContainerPoint(e.latlng, window.map.getZoom()) |
| | | const wmsParams = Object.assign({ |
| | | LAYERS: 'sewer:pipeline', |
| | | QUERY_LAYERS: 'sewer:pipeline', |
| | | WIDTH: size.x, |
| | | HEIGHT: size.y, |
| | | X: Math.round(point.x), |
| | | Y: Math.round(point.y), |
| | | BBOX: window.map.getBounds().toBBoxString() |
| | | }, { |
| | | VERSION: '1.1.1', |
| | | SERVICE: 'WMS', |
| | | REQUEST: 'GetFeatureInfo', |
| | | // bbox: bbox, |
| | | FORMAT: 'image/png', |
| | | INFO_FORMAT: 'application/json', |
| | | TRANSPARENT: true, |
| | | FEATURE_COUNT: 50, |
| | | SRS: 'EPSG:4326', |
| | | EXCEPTIONS: 'application/vnd.ogc.se_inimage' |
| | | }) |
| | | AjaxUtils.get4JsonDataByUrl(WMS_URL, wmsParams, (res) => { |
| | | // console.log(res) |
| | | for (let i = 0; i < res.data.features.length; i++) { |
| | | // console.log(res.data.features[i]) |
| | | this.tableList.push(res.data.features[i]) |
| | | } |
| | | }) |
| | | // 管段 |
| | | this.sectionData(e) |
| | | // 附属设施 |
| | | this.affFacData(e) |
| | | // }) |
| | | }) |
| | | // 数据 重新获取 进行置空 |
| | | this.tableList = [] |
| | | this.tableListSection = [] |
| | | this.form.pipeName = '' |
| | | this.tableDataAffFac = [] |
| | | this.form.sectionName = '' |
| | | this.form.affiliatedFacilities = '' |
| | | }, |
| | | // 点击定位 擦寻管段 |
| | | sectionData (e) { |
| | | const size = window.map.getSize() |
| | | var point = window.map.latLngToContainerPoint(e.latlng, window.map.getZoom()) |
| | | const wmsParams = Object.assign({ |
| | | LAYERS: 'sewer:pipesegment', |
| | | QUERY_LAYERS: 'sewer:pipesegment', |
| | | WIDTH: size.x, |
| | | HEIGHT: size.y, |
| | | X: Math.round(point.x), |
| | | Y: Math.round(point.y), |
| | | BBOX: window.map.getBounds().toBBoxString() |
| | | }, { |
| | | VERSION: '1.1.1', |
| | | SERVICE: 'WMS', |
| | | REQUEST: 'GetFeatureInfo', |
| | | // bbox: bbox, |
| | | FORMAT: 'image/png', |
| | | INFO_FORMAT: 'application/json', |
| | | TRANSPARENT: true, |
| | | FEATURE_COUNT: 50, |
| | | SRS: 'EPSG:4326', |
| | | EXCEPTIONS: 'application/vnd.ogc.se_inimage' |
| | | }) |
| | | AjaxUtils.get4JsonDataByUrl(WMS_URL, wmsParams, (res) => { |
| | | // console.log(res) |
| | | for (let i = 0; i < res.data.features.length; i++) { |
| | | this.tableListSection.push(res.data.features[i]) |
| | | } |
| | | }) |
| | | }, |
| | | // 附属设施 |
| | | affFacData (e) { |
| | | const size = window.map.getSize() |
| | | var point = window.map.latLngToContainerPoint(e.latlng, window.map.getZoom()) |
| | | const wmsParams = Object.assign({ |
| | | LAYERS: 'sewer:view_pipeline', |
| | | QUERY_LAYERS: 'sewer:view_pipeline', |
| | | WIDTH: size.x, |
| | | HEIGHT: size.y, |
| | | X: Math.round(point.x), |
| | | Y: Math.round(point.y), |
| | | BBOX: window.map.getBounds().toBBoxString() |
| | | }, { |
| | | VERSION: '1.1.1', |
| | | SERVICE: 'WMS', |
| | | REQUEST: 'GetFeatureInfo', |
| | | // bbox: bbox, |
| | | FORMAT: 'image/png', |
| | | INFO_FORMAT: 'application/json', |
| | | TRANSPARENT: true, |
| | | FEATURE_COUNT: 50, |
| | | SRS: 'EPSG:4326', |
| | | EXCEPTIONS: 'application/vnd.ogc.se_inimage' |
| | | }) |
| | | AjaxUtils.get4JsonDataByUrl(WMS_URL, wmsParams, (res) => { |
| | | // console.log(res) |
| | | for (let i = 0; i < res.data.features.length; i++) { |
| | | this.tableDataAffFac.push(res.data.features[i]) |
| | | } |
| | | }) |
| | | }, |
| | | // 管线搜索 |
| | | async pipelineSearch () { |
| | | // this.pipeTable = !this.pipeTable |
| | | this.SectionAndAffFacTableJudge = true |
| | | this.tableList = [] |
| | | this.tableListSection = [] |
| | | this.tableDataAffFac = [] |
| | | this.wfsHelper.clearFilter() |
| | | this.wfsHelper.setTypeName(['sewer:pipeline']) |
| | | if (this.form.pipeName) { |
| | | this.wfsHelper.addLike('name', this.form.pipeName) |
| | | this.wfsHelper.addLike('pipename', this.form.pipeName) |
| | | } |
| | | // this.wfsHelper.addEquals('type', '\'' + this.form.pipeName + '\'') |
| | | // this.wfsHelper.addEquals('pipename', '\'' + this.form.pipeName + '\'') |
| | | const res = await AjaxUtils.GetDataAsynByUrl(this.wfsHelper.getUrl(), {}) |
| | | console.log(res) |
| | | // console.log(res) |
| | | if (res instanceof Object && Object.prototype.hasOwnProperty.call(res, 'features')) { |
| | | this.total = res.totalFeatures |
| | | // console.log(res.features) |
| | | this.tableList = res.features |
| | | } |
| | | this.wfsHelper = new WfsHelper() |
| | | }, |
| | | // 分页功能 currentPage 改变时会触发 |
| | | handlePage (val) { |
| | | // console.log(val) |
| | | this.currentPage = val |
| | | }, |
| | | // 分页功能 pageSize 改变时会触发 |
| | | handleSizeChange (val) { |
| | | // console.log(val) |
| | | this.pageSize = val |
| | | // this.form.pipeName = '' |
| | | this.form.sectionName = '' |
| | | this.form.affiliatedFacilities = '' |
| | | }, |
| | | // 点击确认 |
| | | confirm () { |
| | | console.log('点击确定选择完成') |
| | | // console.log('点击确定选择完成') |
| | | eventBus.$emit('section-search', true) |
| | | this.form.pipeName = '' |
| | | this.form.sectionName = '' |
| | | this.form.affiliatedFacilities = '' |
| | | this.tableList = [] |
| | | this.tableListSection = [] |
| | | this.tableDataAffFac = [] |
| | | this.SectionAndAffFacTableJudge = false |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | .pipe-table { |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-around; |
| | | /*display: flex;*/ |
| | | /*align-items: center;*/ |
| | | /*justify-content: space-around;*/ |
| | | |
| | | /deep/ .el-card { |
| | | width: 1.39523rem; |
| | | max-width: 1.39523rem; |
| | | height: 1.9343rem; |
| | | max-height: 1.9343rem; |
| | | /*width: 1.39523rem;*/ |
| | | /*max-width: 1.39523rem;*/ |
| | | /*height: 0.9343rem;*/ |
| | | /*max-height: 0.9343rem;*/ |
| | | |
| | | .el-table { |
| | | margin: 0.07345rem auto; |
| | | margin: 0.05345rem auto; |
| | | } |
| | | } |
| | | } |
| | |
| | | params: $T.filterParams(params) |
| | | }) |
| | | } |
| | | $http.post = function (url, data = {}) { |
| | | $http.post = function (url, data = {}, setHeaders) { |
| | | return Service({ |
| | | url: url, |
| | | method: 'post', |
| | | data: data |
| | | data: data, |
| | | headers: setHeaders || { 'Content-Type': 'application/json; charset=UTF-8' } |
| | | }) |
| | | } |
| | | $http.put = function (url, data = {}) { |