From 204b8af237555feb1af83250dfdc28a5dc0a467c Mon Sep 17 00:00:00 2001
From: chenyabin <Chenab123!>
Date: 星期一, 10 五月 2021 17:22:07 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/develop' into develop
---
src/conf/layers/LayerPipeLines.js | 77 ++-
src/conf/Topic.js | 12
src/components/layer/src/layer.vue | 14
src/components/panel/topicSearch/SewersSelect/EnterpriseEmergency/ResourcesQuery.vue | 116 +++++
src/components/panel/topicSearch/SewersSelect/SewersAnalysis.vue | 11
src/views/popup/Popup.vue | 2
src/components/LayerController/service/WmsLayerService.js | 50 +-
src/conf/layers/LayerHbss.js | 11
src/utils/List.js | 96 ++++
src/conf/Constants.js | 6
src/components/helpers/WfsHelper.js | 39 +
src/components/panel/RightSearchPanel.vue | 7
src/components/panel/topicSearch/SewersSelect/EnterpriseEmergency/ReportPopup.vue | 222 +++++++++++
src/api/host.js | 6
src/components/panel/topicSearch/SewersSelect/EnterpriseEmergency/EventQuery.vue | 119 +++++
src/conf/layers/LayerFsss.js | 31 +
src/components/table/Public.vue | 4
src/views/MapTemplate.vue | 133 +++---
src/components/LayerController/service/LayerFactory.js | 19
src/components/panel/topicSearch/ReportSearch.vue | 45 ++
src/api/mapUrl.js | 12
src/components/panel/topicSearch/SolidWasteSearch.vue | 8
src/components/panel/topicSearch/SewersSelect/AnalysisChoose/PublicWay.js | 17
src/conf/MapConfig.js | 8
src/components/panel/topicSearch/SewersSearch.vue | 7
src/components/layer/src/layer.js | 1
src/conf/layers/LayerEntEmer.js | 68 +++
27 files changed, 940 insertions(+), 201 deletions(-)
diff --git a/src/api/host.js b/src/api/host.js
index d2b8228..ec065c4 100644
--- a/src/api/host.js
+++ b/src/api/host.js
@@ -4,3 +4,9 @@
import { getSchemeHost } from '../utils/tools'
export const $HOST = getSchemeHost()
+
+// 绠$嚎鍒嗘瀽-绾夸笂
+export const $HOSTANALYSE = 'http://xearth.cn:6202'
+
+// 绠$嚎鍒嗘瀽-鏈湴
+// export const $HOSTANALYSE = 'http://10.238.105.124:8089'
diff --git a/src/api/mapUrl.js b/src/api/mapUrl.js
index 98b9986..bb12e82 100644
--- a/src/api/mapUrl.js
+++ b/src/api/mapUrl.js
@@ -1,7 +1,7 @@
/**
* 璇ユ枃浠堕厤缃帴鍙g殑URL鍦板潃
*/
-import { $HOST } from './host'
+import { $HOST, $HOSTANALYSE } from './host'
export const GetUser = $HOST + '/user/getUser'
@@ -30,8 +30,8 @@
export const getCompany = $HOST + '/company/getCompany'
// 绠$嚎鍒嗘瀽
-export const findPipelineByClickPoint = 'http://xearth.cn:6202' + '/findPipelineByClickPoint'
-export const findConnectedPipelines = 'http://xearth.cn:6202' + '/findConnectedPipelines'
-export const findFlowDirection = 'http://xearth.cn:6202' + '/findFlowDirection'
-export const findLeakages = 'http://xearth.cn:6202' + '/findLeakages'
-export const getCrossSection = 'http://xearth.cn:6202' + '/getCrossSection'
+export const findPipelineByClickPoint = $HOSTANALYSE + '/findPipelineByClickPoint'
+export const findConnectedPipelines = $HOSTANALYSE + '/findConnectedPipelines'
+export const findFlowDirection = $HOSTANALYSE + '/findFlowDirection'
+export const findLeakages = $HOSTANALYSE + '/findLeakages'
+export const getCrossSection = $HOSTANALYSE + '/getCrossSection'
diff --git a/src/components/LayerController/service/LayerFactory.js b/src/components/LayerController/service/LayerFactory.js
index f9810db..f781247 100644
--- a/src/components/LayerController/service/LayerFactory.js
+++ b/src/components/LayerController/service/LayerFactory.js
@@ -1,6 +1,6 @@
import WfsLayerService from './WfsLayerService'
import { clone } from '../../../utils/utils'
-import { logicMapper } from '../../../conf/Constants'
+import { logicMapper, SERVICE_TYPE } from '../../../conf/Constants'
import WmsLayerService from './WmsLayerService'
/**
@@ -65,8 +65,7 @@
loadLogic (config) {
var code = config.code
- var wfs = config.wfs
- var wmsLayers = config.wmsLayers
+ var type = config.type
const file = logicMapper[code]
var logic = this.layersLogic[code]
@@ -74,9 +73,9 @@
if (file) {
var BusiLayer = require('../logic/' + file)
logic = new BusiLayer()
- } else if (wfs) {
+ } else if (type === SERVICE_TYPE.WFS) {
logic = new WfsLayerService(config)
- } else if (wmsLayers) {
+ } else if (type === SERVICE_TYPE.WMS) {
var layer = {}
layer[config.code] = config
this.wmsLayers.push(layer)
@@ -184,9 +183,17 @@
break
case 'MultiLineString':
var coordinates = feature.geometry.coordinates
- point = coordinates[parseInt(coordinates.length / 2)][0]
+ var coordinate = coordinates[parseInt(coordinates.length / 2)][0]
+ if (coordinate.length > 2) {
+ point = [coordinate[0], coordinate[1]]
+ }
+ break
+ case 'LineString':
+ var lineString = feature.geometry.coordinates
+ point = lineString[parseInt(lineString.length / 2)][0]
break
}
+ console.log(point)
window.map.flyTo(point.reverse(), 17)
code && this.openPopup(code, feature.id)
}
diff --git a/src/components/LayerController/service/WmsLayerService.js b/src/components/LayerController/service/WmsLayerService.js
index 8c0d5dc..36aba46 100644
--- a/src/components/LayerController/service/WmsLayerService.js
+++ b/src/components/LayerController/service/WmsLayerService.js
@@ -1,6 +1,7 @@
import AjaxUtils from '../../../utils/AjaxUtils'
import { PIPELINE_WMS } from '../../../conf/Constants'
import Popup from '@views/popup/Popup'
+import List from '../../../utils/List'
/**
* todo 寰楄�冭檻涓�涓浘灞傞厤缃簡澶氫釜 wmsLayers鐨勬儏鍐�
@@ -27,13 +28,12 @@
// 瀛樻斁getfeatureinfo鐨勫浘灞傜粍
this.featureGroup = this.L.featureGroup({}).addTo(this.map)
- this.layers = []
+ this.layers = new List()
for (var i = 0; i < layersConfig.length; i++) {
const config = layersConfig[i]
- for (var k in config) {
- if (k === 'wmsLayers') {
- this.layers.push(config[k])
- }
+ const typeName = config.typeName
+ if (typeName) {
+ this.layers.add(config.index, typeName)
}
}
}
@@ -46,23 +46,18 @@
}
add (config) {
- const wmsLayers = config.wmsLayers
- if (wmsLayers) {
- if (this.layers.indexOf(wmsLayers) < 0) {
- this.layers.push(config.wmsLayers)
+ const typeName = config.typeName
+ if (typeName) {
+ if (!this.layers.contains(typeName)) {
+ this.layers.add(config.index, typeName)
this.wmsLayer.setParams({ layers: this.layers.join(',') })
}
}
}
remove (config) {
- const wmsLayers = config.wmsLayers
- for (var i = 0; i < this.layers.length; i++) {
- const layerName = this.layers[i]
- if (wmsLayers === layerName) {
- this.layers.splice(i, 1)
- }
- }
+ const typeName = config.typeName
+ this.layers.remove(typeName)
this.wmsLayer.setParams({ layers: this.layers.join(',') })
}
@@ -70,18 +65,19 @@
this.wmsLayer = this.L.tileLayer.wms(PIPELINE_WMS, {
format: 'image/png', // 杩斿洖鐨勬暟鎹牸寮�
transparent: true,
- layers: layers.join(',')
+ layers: this.layers.join(',')
}).addTo(this.map)
}
clickListener () {
window.map.on('click', (e) => {
+ console.log(e)
this.featureGroup.clearLayers()
var point = this.map.latLngToContainerPoint(e.latlng, this.map.getZoom())
var size = this.map.getSize()
// const bbox = this.L.latLngBounds(this.L.latLng(e.latlng.lng, e.latlng.lat)).toBBoxString()
- if (this.layers && this.layers.length > 0) {
+ if (this.layers.length() > 0) {
const params = Object.assign({
LAYERS: this.layers.join(','),
QUERY_LAYERS: this.layers.join(','),
@@ -94,13 +90,13 @@
AjaxUtils.get4JsonDataByUrl(PIPELINE_WMS, params, (res) => {
const features = res.data.features
/**
- * {
- * title: 'New Tab',
- * name: newTabName,
- * content: 'New Tab content'
- * }
- * @type {*[]}
- */
+ * {
+ * title: 'New Tab',
+ * name: newTabName,
+ * content: 'New Tab content'
+ * }
+ * @type {*[]}
+ */
const popupDatas = []
if (features) {
for (var i = 0; i < features.length; i++) {
@@ -140,7 +136,9 @@
datas: popupDatas
}
},
- title: '' // 鏍囬
+ title: '', // 鏍囬
+ left: e.originalEvent.clientX,
+ top: e.originalEvent.clientY
})
}
// this.popupComp.setDatas(popupDatas)
diff --git a/src/components/helpers/WfsHelper.js b/src/components/helpers/WfsHelper.js
index 20093e6..9f9b781 100644
--- a/src/components/helpers/WfsHelper.js
+++ b/src/components/helpers/WfsHelper.js
@@ -1,14 +1,14 @@
/**
* 鍔犺浇WMS,鎷兼帴FILTER,LAYERS鍙傛暟绛�
*/
-import { PIPELINE_WFS } from '../../conf/Constants'
+import { WFS_URL } from '../../conf/Constants'
function WfsHelper () {
this.filters = []
this.typeNames = []
- this.url = PIPELINE_WFS
+ this.url = WFS_URL
this.params = {
REQUEST: 'getfeature',
- OUTPUTFORMAT: 'JSON',
+ OUTPUTFORMAT: 'application/json',
maxFeatures: 20000,
version: '1.0.0'
}
@@ -17,16 +17,19 @@
this.typeNames.push(typeName)
}
- this.addEquals = (property, literal) => {
- var filter = '<PropertyIsEqualTo><PropertyName>' + property + '</PropertyName><Literal>' + literal + '</Literal></PropertyIsEqualTo>'
+ this.addEquals = (property, equals) => {
+ // var filter = '<PropertyIsEqualTo><PropertyName>' + property + '</PropertyName><Literal>' + literal + '</Literal></PropertyIsEqualTo>'
+ var filter = property + '=' + equals
this.filters.push(filter)
}
this.addLike = (property, literal) => {
- if (property && literal) {
- var filter = '<PropertyIsLike><PropertyName>' + property + '</PropertyName><Literal>*' + literal + '*</Literal></PropertyIsLike>'
- this.filters.push(filter)
- }
+ // if (property && literal) {
+ // var filter = '<PropertyIsLike><PropertyName>' + property + '</PropertyName><Literal>*' + literal + '*</Literal></PropertyIsLike>'
+ // this.filters.push(filter)
+ // }
+ var filter = property + ' like \'%' + literal + '%\''
+ this.filters.push(filter)
}
/**
@@ -34,7 +37,7 @@
* @returns {string|null}
*/
this.getFilterParams = () => {
- var head = '<Filter xmlns="http://www.opengis.net/ogc">'
+ /* var head = '<Filter xmlns="http://www.opengis.net/ogc">'
var end = '</Filter>'
var filter = ''
if (this.filters.length > 0) {
@@ -46,8 +49,19 @@
return ('FILTER=' + head + '<And>' + filter + '</And>' + end)
}
return ('FILTER=' + head + filter + end)
+ } */
+ var filter = ''
+ if (this.filters.length > 0) {
+ filter = 'CQL_FILTER='
+ for (var i = 0; i < this.filters.length; i++) {
+ filter += this.filters[i]
+ if (i !== this.filters.length - 1) {
+ filter += ' AND '
+ }
+ }
+ return filter
}
- return null
+ return filter
}
this.getUrlParams = () => {
@@ -62,7 +76,8 @@
if (filterParam) {
params += '&' + filterParam
}
- return encodeURI(params)
+ // return encodeURI(params)
+ return params
}
this.getUrl = () => {
diff --git a/src/components/layer/src/layer.js b/src/components/layer/src/layer.js
index 5e2600b..b0581c1 100644
--- a/src/components/layer/src/layer.js
+++ b/src/components/layer/src/layer.js
@@ -20,6 +20,7 @@
* @return {[type]} [description]
*/
self.open = function (opt) {
+ console.log(opt)
self.closeAll()
var options = mergeJson(opt, defOptions)
const id = `notification_${new Date().getTime()}_${seed++}`
diff --git a/src/components/layer/src/layer.vue b/src/components/layer/src/layer.vue
index 3b25a3a..3221a11 100644
--- a/src/components/layer/src/layer.vue
+++ b/src/components/layer/src/layer.vue
@@ -28,6 +28,18 @@
},
computed: {},
mounted () {
+ let left = this.left
+ let top = this.top
+ if (left > 0) {
+ left = left + 'px'
+ }
+ if (top > 0) {
+ top = top + 'px'
+ }
+ this.style = {
+ left: left || '25%',
+ top: top || '35%'
+ }
},
methods: {
close () {
@@ -72,8 +84,6 @@
.public-bounced {
z-index: 2000;
position: absolute;
- top: 35%;
- left: 20%;
.public-bounced-title {
cursor: move;
diff --git a/src/components/panel/RightSearchPanel.vue b/src/components/panel/RightSearchPanel.vue
index 33a4380..b025a43 100644
--- a/src/components/panel/RightSearchPanel.vue
+++ b/src/components/panel/RightSearchPanel.vue
@@ -60,6 +60,7 @@
import SoilGroundWaterSearch from '@components/panel/topicSearch/SoilGroundWaterSearch.vue'
import PipeChangesSearch from '@components/panel/topicSearch/pipeChangesSearch.vue'
import PipeInformationSearch from '@components/panel/topicSearch/pipeInformationSearch.vue'
+import ReportSearch from './topicSearch/ReportSearch'
import bus from '@/eventBus'
@@ -70,7 +71,8 @@
WaterWasteSearch,
SolidWasteSearch,
EnvRiskSearch,
- DischargeSearch
+ DischargeSearch,
+ ReportSearch
},
data () {
return {
@@ -153,6 +155,9 @@
case '绠¢亾淇℃伅':
this.gcComp = PipeInformationSearch
break
+ case '浼佷笟搴旀��':
+ this.gcComp = ReportSearch
+ break
}
},
handlePage (page) {
diff --git a/src/components/panel/topicSearch/ReportSearch.vue b/src/components/panel/topicSearch/ReportSearch.vue
new file mode 100644
index 0000000..047b86a
--- /dev/null
+++ b/src/components/panel/topicSearch/ReportSearch.vue
@@ -0,0 +1,45 @@
+<template>
+ <div class="sewers-search" v-if="judgeVisible">
+ <div class="panel-title">{{ title }}</div>
+ <el-tabs v-model="activeName" @tab-click="handleClick">
+ <el-tab-pane label="浜嬩欢鏌ヨ" name="first">
+ <EventQuery></EventQuery>
+ </el-tab-pane>
+ <el-tab-pane label="璧勬簮鏌ヨ" name="second">
+ <ResourcesQuery></ResourcesQuery>
+ </el-tab-pane>
+ </el-tabs>
+ <!-- <ReportPopup></ReportPopup>-->
+ </div>
+</template>
+
+<script>
+import EventQuery from './SewersSelect/EnterpriseEmergency/EventQuery'
+import ResourcesQuery from './SewersSelect/EnterpriseEmergency/ResourcesQuery'
+// import ReportPopup from './SewersSelect/EnterpriseEmergency/ReportPopup'
+
+export default {
+ name: 'ReportSearch',
+ props: ['title'],
+ components: {
+ EventQuery,
+ ResourcesQuery
+ // ReportPopup
+ },
+ data () {
+ return {
+ judgeVisible: true,
+ activeName: 'first'
+ }
+ },
+ methods: {
+ handleClick (tab) {
+ console.log(tab)
+ }
+ }
+}
+</script>
+
+<style lang="less" scoped>
+
+</style>
diff --git a/src/components/panel/topicSearch/SewersSearch.vue b/src/components/panel/topicSearch/SewersSearch.vue
index f667fe9..99842ad 100644
--- a/src/components/panel/topicSearch/SewersSearch.vue
+++ b/src/components/panel/topicSearch/SewersSearch.vue
@@ -144,11 +144,12 @@
this.list = []
var wfsHelper = new WfsHelper()
// todo 鐜板湪绠$綉杩樻病鍖哄垎寮�绫诲瀷锛屽悗闈㈡敼
- wfsHelper.addTypeName(this.form.dataType.sname)
- wfsHelper.addLike('name', this.form.keyword)
+ wfsHelper.addTypeName(this.form.dataType.typeName)
+ if (this.form.keyword) {
+ wfsHelper.addLike('name', this.form.keyword)
+ }
// const _this = this
const res = await AjaxUtils.GetDataAsynByUrl(wfsHelper.getUrl(), {})
- console.log(res)
if (res instanceof Object && Object.prototype.hasOwnProperty.call(res, 'features')) {
this.list = res.features
}
diff --git a/src/components/panel/topicSearch/SewersSelect/AnalysisChoose/PublicWay.js b/src/components/panel/topicSearch/SewersSelect/AnalysisChoose/PublicWay.js
index 332249f..b55c90a 100644
--- a/src/components/panel/topicSearch/SewersSelect/AnalysisChoose/PublicWay.js
+++ b/src/components/panel/topicSearch/SewersSelect/AnalysisChoose/PublicWay.js
@@ -1,18 +1,5 @@
export default {
- // 鐖嗙
- bgClick () {
- this.selectPipeLine()
- },
- // 娴佸悜鍦板浘涓婄偣鍑�
- selectPipeLine () {
- // console.log(map)
- window.on('click', this.selectClick)
- },
- // 鍦板浘涓婄偣鍑诲洖璋�
- selectClick (e) {
- console.log(e)
- // window.map.off('click', this.selectClick)
- // const point = [e.latlng.lng, e.latlng.lat]
- // console.log(point)
+ clickPopup () {
+ console.log('鍏叡鏂规硶')
}
}
diff --git a/src/components/panel/topicSearch/SewersSelect/EnterpriseEmergency/EventQuery.vue b/src/components/panel/topicSearch/SewersSelect/EnterpriseEmergency/EventQuery.vue
new file mode 100644
index 0000000..26a82d7
--- /dev/null
+++ b/src/components/panel/topicSearch/SewersSelect/EnterpriseEmergency/EventQuery.vue
@@ -0,0 +1,119 @@
+<template>
+ <div class="search-panel">
+ <el-form ref="form" :model="form" label-width="90px" class="search-form">
+ <el-form ref="form" :model="form" label-width="90px" class="search-form">
+ <el-form-item label="浼佷笟鍚嶇О锛�" size="mini" class="search-panel-item">
+ <el-select style="width: 100%" v-model="form.pipelineType" @change="handlePipelineType"
+ :popper-class="'select-down'">
+ <el-option
+ v-for="item in items"
+ :key="item.code"
+ :label="item.name"
+ :value="item.name">
+ </el-option>
+ </el-select>
+ </el-form-item>
+ <el-form-item label="浜嬩欢鐘舵�侊細" size="mini">
+ <el-select style="width: 100%" v-model="form.dataType" value-key="code"
+ :popper-class="'select-down'" @change="handleDataType">
+ <el-option
+ v-for="item in subItems"
+ :key="item.code"
+ :label="item.name"
+ :value="item">
+ </el-option>
+ </el-select>
+ </el-form-item>
+ <el-form-item label="浜嬩欢绫诲瀷锛�">
+ <el-radio-group v-model="form.transferData" class="levelOfRisk">
+ <el-radio v-for="(item,index) in form.levelOfRisk" :label="item.value" :key="index">
+ <span class="levelOfRisk-type">{{ item.name }}</span>
+ </el-radio>
+ </el-radio-group>
+ </el-form-item>
+ <div class="rightButtonSearch">
+ <el-input v-model="form.keyword" size="mini" placeholder="鍦ㄦ杈撳叆鍏抽敭瀛楁悳绱�"></el-input>
+ <el-button class="el-icon-search" @click="handleSearch"></el-button>
+ </div>
+ </el-form>
+ </el-form>
+ <el-scrollbar style="height:286.22px">
+ <div class="environmental-risk-list">
+ <i class="state"></i>
+ <div>
+ <h3>浜嬩欢鍚嶇О:XXX浜嬩欢</h3>
+ <h5>浜嬩欢浜嬩欢:2021骞�3鏈�21鏃�</h5>
+ <p>浜嬩欢鐘舵�侊細<span>瀹℃壒闃舵</span></p>
+ <p>浜嬩欢绫诲瀷锛�<span>鐪熷疄浜嬩欢</span></p>
+ </div>
+ </div>
+ <div class="environmental-risk-list">
+ <i class="state"></i>
+ <div>
+ <h3>浜嬩欢鍚嶇О:XXX浜嬩欢</h3>
+ <h5>浜嬩欢浜嬩欢:2021骞�3鏈�21鏃�</h5>
+ <p>浜嬩欢鐘舵�侊細<span>瀹℃壒闃舵</span></p>
+ <p>浜嬩欢绫诲瀷锛�<span>鐪熷疄浜嬩欢</span></p>
+ </div>
+ </div>
+ <div class="environmental-risk-list">
+ <i class="state"></i>
+ <div>
+ <h3>浜嬩欢鍚嶇О:XXX浜嬩欢</h3>
+ <h5>浜嬩欢浜嬩欢:2021骞�3鏈�21鏃�</h5>
+ <p>浜嬩欢鐘舵�侊細<span>瀹℃壒闃舵</span></p>
+ <p>浜嬩欢绫诲瀷锛�<span>鐪熷疄浜嬩欢</span></p>
+ </div>
+ </div>
+ </el-scrollbar>
+ </div>
+</template>
+
+<script>
+import { LayerEntEmer } from '../../../../../conf/layers/LayerEntEmer'
+
+export default {
+ name: 'EventQuery',
+ data () {
+ return {
+ list: [],
+ items: [
+ { name: '閲戦櫟鐭冲寲' },
+ { name: '鍗椾含鍖栧' }
+ ],
+ subItems: LayerEntEmer.layers,
+ form: {
+ pipelineType: '',
+ dataType: '',
+ keyword: '',
+ transferData: 1,
+ levelOfRisk: [
+ {
+ name: '鐪熷疄浜嬩欢',
+ value: 1
+ },
+ {
+ name: '妯℃嫙婕旂粌',
+ value: 2
+ }
+ ]
+ }
+ }
+ },
+ methods: {
+ handleDataType () {
+ console.log('ite')
+ },
+ handlePipelineType () {
+ console.log('鏁版嵁鏌ヨ')
+ },
+ handleSearch () {
+ console.log('item')
+ }
+ }
+}
+</script>
+
+<style scoped>
+
+</style>
diff --git a/src/components/panel/topicSearch/SewersSelect/EnterpriseEmergency/ReportPopup.vue b/src/components/panel/topicSearch/SewersSelect/EnterpriseEmergency/ReportPopup.vue
new file mode 100644
index 0000000..2cabece
--- /dev/null
+++ b/src/components/panel/topicSearch/SewersSelect/EnterpriseEmergency/ReportPopup.vue
@@ -0,0 +1,222 @@
+<template>
+ <div class="report-popup map-background" v-drag>
+ <div class="public-bounced-title panel-title">
+ <span>涓婃姤浜嬩欢</span>
+ <i class="el-icon-circle-close" @click="closePopup"></i>
+ </div>
+ <div class="report-content">
+ <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="search-form">
+ <el-form-item label="浜嬩欢鍚嶇О" prop="nameEvent">
+ <el-input v-model="ruleForm.nameEvent" class="report-input"></el-input>
+ </el-form-item>
+ <el-form-item label="浜嬩欢绫诲瀷" prop="eventType">
+ <el-radio-group v-model="ruleForm.eventType">
+ <el-radio v-for="(item,index) in ruleForm.eventTypeList" :label="item.value" :key="index">
+ <span>{{ item.name }}</span>
+ </el-radio>
+ </el-radio-group>
+ </el-form-item>
+ <el-form-item label="浜嬩欢绛夌骇" prop="eventLevel">
+ <el-radio-group v-model="ruleForm.eventLevel">
+ <el-radio v-for="(item,index) in ruleForm.eventLevelList" :label="item.value" :key="index">
+ <span>{{ item.name }}</span>
+ </el-radio>
+ </el-radio-group>
+ </el-form-item>
+ <el-row>
+ <el-col :span="12">
+ <el-form-item label="浜嬪彂鍗曚綅" prop="region">
+ <el-select v-model="ruleForm.region" placeholder="璇烽�夋嫨娲诲姩鍖哄煙">
+ <el-option label="鍗曚綅浣嶇疆1" value="shanghai"></el-option>
+ <el-option label="鍗曚綅浣嶇疆2" value="beijing"></el-option>
+ </el-select>
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="浜嬪彂鏃堕棿" prop="region" class="search-panel-item">
+ <el-date-picker
+ v-model="ruleForm.atTime"
+ type="datetime"
+ placeholder="閫夋嫨鏃ユ湡鏃堕棿">
+ </el-date-picker>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="12">
+ <el-form-item label="浜嬪彂浣嶇疆" prop="region" class="search-panel-item">
+ <el-input v-model="ruleForm.name" class="report-input"></el-input>
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="浣嶇疆鎻忚堪" prop="name">
+ <el-input v-model="ruleForm.name" class="report-input"></el-input>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-form-item>
+ <el-upload
+ class="upload-demo"
+ action="https://jsonplaceholder.typicode.com/posts/"
+ :on-preview="handlePreview"
+ :on-remove="handleRemove"
+ :before-remove="beforeRemove"
+ multiple
+ :limit="3"
+ :on-exceed="handleExceed"
+ :file-list="fileList">
+ <el-button size="small" type="primary">鐐瑰嚮涓婁紶</el-button>
+ </el-upload>
+ </el-form-item>
+ <el-form-item label="娑堟伅鎺ㄩ��" prop="resource">
+ <el-radio-group v-model="ruleForm.resource">
+ <el-radio label="鐭俊鎺ㄩ��"></el-radio>
+ <el-radio label="鎵嬫満搴旂敤鎺ㄩ��"></el-radio>
+ </el-radio-group>
+ </el-form-item>
+ <el-form-item label="浜嬩欢鎻忚堪" prop="desc">
+ <el-input type="textarea" v-model="ruleForm.desc"></el-input>
+ </el-form-item>
+ <el-form-item label="鎺ユ敹浜哄憳" prop="desc">
+ <el-input type="textarea" v-model="ruleForm.desc"></el-input>
+ </el-form-item>
+ <el-form-item>
+ <el-button type="primary" @click="submitForm('ruleForm')">纭</el-button>
+ <el-button @click="resetForm('ruleForm')">鍙栨秷</el-button>
+ </el-form-item>
+ </el-form>
+ </div>
+ </div>
+</template>
+
+<script>
+import '@utils/dragBoxes'
+
+export default {
+ name: 'ReportPopup',
+ data () {
+ return {
+ flag: false,
+ ruleForm: {
+ nameEvent: '',
+ eventType: '',
+ eventTypeList: [
+ {
+ name: '寰呰ˉ鍏�',
+ value: 1
+ },
+ {
+ name: '寰呰ˉ鍏�',
+ value: 2
+ },
+ {
+ name: '寰呰ˉ鍏�',
+ value: 3
+ }
+ ],
+ eventLevel: '',
+ eventLevelList: [
+ {
+ name: '寰呰ˉ鍏�',
+ value: 1
+ },
+ {
+ name: '寰呰ˉ鍏�',
+ value: 2
+ },
+ {
+ name: '寰呰ˉ鍏�',
+ value: 3
+ }
+ ],
+ atTime: ''
+ },
+ fileList: [],
+ rules: {
+ name: [
+ {
+ required: true,
+ message: '璇疯緭鍏ユ椿鍔ㄥ悕绉�',
+ trigger: 'blur'
+ },
+ {
+ min: 3,
+ max: 5,
+ message: '闀垮害鍦� 3 鍒� 5 涓瓧绗�',
+ trigger: 'blur'
+ }
+ ],
+ region: [
+ {
+ required: true,
+ message: '璇烽�夋嫨娲诲姩鍖哄煙',
+ trigger: 'change'
+ }
+ ],
+ resource: [
+ {
+ required: true,
+ message: '璇烽�夋嫨娲诲姩璧勬簮',
+ trigger: 'change'
+ }
+ ],
+ desc: [
+ {
+ required: true,
+ message: '璇峰~鍐欐椿鍔ㄥ舰寮�',
+ trigger: 'blur'
+ }
+ ]
+ }
+ }
+ },
+ methods: {
+ handleRemove (file, fileList) {
+ console.log(file, fileList)
+ },
+ handlePreview (file) {
+ console.log(file)
+ },
+ handleExceed (files, fileList) {
+ this.$message.warning(`褰撳墠闄愬埗閫夋嫨 3 涓枃浠讹紝鏈閫夋嫨浜� ${files.length} 涓枃浠讹紝鍏遍�夋嫨浜� ${files.length + fileList.length} 涓枃浠禶)
+ },
+ beforeRemove (file, fileList) {
+ return this.$confirm(`纭畾绉婚櫎 ${file.name}锛焋)
+ },
+ closePopup () {
+ this.flag = false
+ },
+ submitForm (formName) {
+ this.$refs[formName].validate((valid) => {
+ if (valid) {
+ alert('submit!')
+ } else {
+ console.log('error submit!!')
+ return false
+ }
+ })
+ },
+ resetForm (formName) {
+ this.$refs[formName].resetFields()
+ }
+ }
+}
+</script>
+
+<style lang="less" scoped>
+ /deep/ .el-form-item__label {
+ color: @color;
+ }
+
+ /deep/ .el-radio__label {
+ color: @color;
+ }
+
+ .report-popup {
+ width: 35%;
+ z-index: 999;
+ position: absolute;
+ top: 35%;
+ left: 20%;
+ }
+</style>
diff --git a/src/components/panel/topicSearch/SewersSelect/EnterpriseEmergency/ResourcesQuery.vue b/src/components/panel/topicSearch/SewersSelect/EnterpriseEmergency/ResourcesQuery.vue
new file mode 100644
index 0000000..e9ef1a5
--- /dev/null
+++ b/src/components/panel/topicSearch/SewersSelect/EnterpriseEmergency/ResourcesQuery.vue
@@ -0,0 +1,116 @@
+<template>
+ <div class="search-panel">
+ <el-form ref="form" :model="form" label-width="90px" class="search-form">
+ <el-form-item label="浼佷笟鍚嶇О锛�" size="mini" class="search-panel-item">
+ <el-select style="width: 100%" v-model="form.eventName" @change="handlePipelineType"
+ :popper-class="'select-down'">
+ <el-option
+ v-for="item in form.eventNameList"
+ :key="item.code"
+ :label="item.name"
+ :value="item.name">
+ </el-option>
+ </el-select>
+ </el-form-item>
+ <el-form-item label="璧勬簮鐜锛�" size="mini" class="search-panel-item">
+ <el-select style="width: 100%" v-model="form.pipelineType" @change="handlePipelineType"
+ :popper-class="'select-down'">
+ <el-option
+ v-for="item in items"
+ :key="item.code"
+ :label="item.name"
+ :value="item.name">
+ </el-option>
+ </el-select>
+ </el-form-item>
+ <el-form-item :label="form.pipelineType+'锛�'" size="mini">
+ <el-select style="width: 100%" v-model="form.dataType" value-key="code"
+ :popper-class="'select-down'" @change="handleDataType">
+ <el-option
+ v-for="item in subItems"
+ :key="item.code"
+ :label="item.name"
+ :value="item">
+ </el-option>
+ </el-select>
+ </el-form-item>
+ <div class="rightButtonSearch">
+ <el-input v-model="form.keyword" size="mini" placeholder="鍦ㄦ杈撳叆鍏抽敭瀛楁悳绱�"></el-input>
+ <el-button class="el-icon-search" @click="handleSearch"></el-button>
+ </div>
+ </el-form>
+ <el-scrollbar style="height:286.22px">
+ <div class="environmental-risk-list">
+ <!-- v-for="(item,index) in searchDataDisplay" :key="index" @click="setBounced(item)"-->
+ <i class="state"></i>
+ <div>
+ <h3>浜嬩欢鍚嶇О:XXX浜嬩欢</h3>
+ <h5>浜嬩欢浜嬩欢:2021骞�3鏈�21鏃�</h5>
+ <p>浜嬩欢鐘舵�侊細<span>瀹℃壒闃舵</span></p>
+ <p>浜嬩欢绫诲瀷锛�<span>鐪熷疄浜嬩欢</span></p>
+ </div>
+ </div>
+ <div class="environmental-risk-list">
+ <i class="state"></i>
+ <div>
+ <h3>浜嬩欢鍚嶇О:XXX浜嬩欢</h3>
+ <h5>浜嬩欢浜嬩欢:2021骞�3鏈�21鏃�</h5>
+ <p>浜嬩欢鐘舵�侊細<span>瀹℃壒闃舵</span></p>
+ <p>浜嬩欢绫诲瀷锛�<span>鐪熷疄浜嬩欢</span></p>
+ </div>
+ </div>
+ <div class="environmental-risk-list">
+ <i class="state"></i>
+ <div>
+ <h3>浜嬩欢鍚嶇О:XXX浜嬩欢</h3>
+ <h5>浜嬩欢浜嬩欢:2021骞�3鏈�21鏃�</h5>
+ <p>浜嬩欢鐘舵�侊細<span>瀹℃壒闃舵</span></p>
+ <p>浜嬩欢绫诲瀷锛�<span>鐪熷疄浜嬩欢</span></p>
+ </div>
+ </div>
+ </el-scrollbar>
+ </div>
+</template>
+
+<script>
+import { LayerEntEmer } from '../../../../../conf/layers/LayerEntEmer'
+
+export default {
+ name: 'ResourcesQuery',
+ data () {
+ return {
+ form: {
+ eventName: '',
+ pipelineType: '璧勬簮绫诲瀷',
+ dataType: '',
+ keyword: '',
+ eventNameList: [
+ { name: '閲戦櫟鐭冲寲' },
+ { name: '鍗椾含鍖栧' }
+ ]
+ },
+ items: [LayerEntEmer],
+ subItems: LayerEntEmer.layers,
+ searchDataDisplay: []
+ }
+ },
+ methods: {
+ handlePipelineType () {
+ console.log('item')
+ },
+ handleDataType () {
+ console.log('item')
+ },
+ handleSearch () {
+ console.log('鏁版嵁鏌ヨ')
+ },
+ setBounced (item) {
+ console.log(item)
+ }
+ }
+}
+</script>
+
+<style scoped>
+
+</style>
diff --git a/src/components/panel/topicSearch/SewersSelect/SewersAnalysis.vue b/src/components/panel/topicSearch/SewersSelect/SewersAnalysis.vue
index ba5c909..a717a7a 100644
--- a/src/components/panel/topicSearch/SewersSelect/SewersAnalysis.vue
+++ b/src/components/panel/topicSearch/SewersSelect/SewersAnalysis.vue
@@ -166,7 +166,9 @@
myChart: null,
options: [],
+ echartsList: [],
myChartShow: false,
+
flowPipeLine: null,
// 鐢ㄤ簬鍒ゆ柇
@@ -205,9 +207,7 @@
lxTableDataResult: [],
// 妯柇闈� 绠℃鏌ヨ缁撴灉 鐨則able琛ㄦ牸鏁版嵁
- tableData: [],
-
- echartsList: []
+ tableData: []
}
},
@@ -222,7 +222,8 @@
methods: {
// tab鍒囨崲
handleClick (tab, event) {
- // console.log(tab, event)
+ console.log(event)
+ // console.log(tab)
this.clearLinkPipe()
this.clearLX()
this.linkClear()
@@ -298,7 +299,6 @@
// 杩為�氭�� ===> 鍦板浘鐐瑰嚮璧峰绠℃e
linkClickStart (e) {
- // console.log(e)
// console.log('鍦板浘鐐瑰嚮璧峰绠℃')
this.linkType = 1
this.selectPipeLine()
@@ -379,6 +379,7 @@
// 鍒ゆ柇鏁版嵁缁撴灉 === 0 鍒欐病鏈夎姹傚埌鏁版嵁
if (res.data.length === 0) {
this.$message('娌℃湁鎵惧埌杩為�氱殑绠℃')
+ // 杩涜鍒ゆ柇
// if (this.tableDataLinkStart === [] && this.tableDataLinkEnd === []) {
this.currentLinkIsTrue = '涓嶈繛閫�'
// }
diff --git a/src/components/panel/topicSearch/SolidWasteSearch.vue b/src/components/panel/topicSearch/SolidWasteSearch.vue
index a57c29f..5814b50 100644
--- a/src/components/panel/topicSearch/SolidWasteSearch.vue
+++ b/src/components/panel/topicSearch/SolidWasteSearch.vue
@@ -73,12 +73,6 @@
],
// 鏁版嵁鎼滅储涔嬪悗锛屽瓨鍌ㄦ暟鎹殑
searchDataDisplay: [],
- instance: null,
- intervals: [],
- layer: window.map,
- L: window.L,
- times: 5,
- colors: ['#98FB98', '#ff0000'],
solidWasteTypeOptions: [{
value: '1',
label: '鍖哄煙',
@@ -163,7 +157,7 @@
},
// 鏁版嵁灞曠ず,鐐瑰嚮杩涜寮规鍙婄偣鐨勫睍绀�
setBounced (val) {
- console.log(val)
+ // console.log(val)
const pos = [val.Latitude, val.Longitude]
window.map.flyTo(pos, 15)
window.$layer.open({
diff --git a/src/components/table/Public.vue b/src/components/table/Public.vue
index fec41b2..e0da037 100644
--- a/src/components/table/Public.vue
+++ b/src/components/table/Public.vue
@@ -12,8 +12,8 @@
<script>
-// 寮曞叆鎷栨嫿
-import '@/utils/dragBoxes'
+// 寮规澶撮儴鎷栨嫿
+// import '@/utils/dragBoxes'
export default {
name: 'Public'
diff --git a/src/conf/Constants.js b/src/conf/Constants.js
index e7fcd49..867a58c 100644
--- a/src/conf/Constants.js
+++ b/src/conf/Constants.js
@@ -4,6 +4,12 @@
POLYGON: 'polygon'
}
+export const SERVICE_TYPE = {
+ WFS: 'wfs',
+ WMS: 'wms'
+}
+
+export const WFS_URL = 'http://xearth.cn:6240/geoserver/sewer/ows?service=WFS'
export const PIPELINE_WFS = 'http://xearth.cn:8088/server/ogcserver/PipeLine2/wfs'
export const PIPELINE_WMS = 'http://xearth.cn:6240/geoserver/sewer/wms'
diff --git a/src/conf/MapConfig.js b/src/conf/MapConfig.js
index 2343ab8..0acc40f 100644
--- a/src/conf/MapConfig.js
+++ b/src/conf/MapConfig.js
@@ -22,10 +22,10 @@
minZoom: 3,
maxZoom: 17,
// center: [26, 104],
- center: [34.828558921813965, 117.41676807403564],
- zoom: 5,
- // center: [32.25853085517883, 118.78592848777771],
- // zoom: 15,
+ // center: [34.828558921813965, 117.41676807403564],
+ // zoom: 5,
+ center: [32.25853085517883, 118.78592848777771],
+ zoom: 15,
worldCopyJump: true,
inertia: true,
zoomControl: false,
diff --git a/src/conf/Topic.js b/src/conf/Topic.js
index 9bc0bb5..b343be2 100644
--- a/src/conf/Topic.js
+++ b/src/conf/Topic.js
@@ -8,7 +8,8 @@
dischargeSearch: () => import('@components/panel/topicSearch/DischargeSearch'),
envProtectSearch: () => import('@components/panel/topicSearch/EnvRiskSearch'),
soilGroundWaterSearch: () => import('@components/panel/topicSearch/SoilGroundWaterSearch'),
- sewersSearch: () => import('@components/panel/topicSearch/SewersSearch.vue')
+ sewersSearch: () => import('@components/panel/topicSearch/SewersSearch.vue'),
+ ReportSearchL: () => import('@components/panel/topicSearch/ReportSearch.vue')
}
export const TopicList = [{
@@ -60,7 +61,14 @@
isShow: true,
icon: 'iconguanxianxuncha',
comp: ''
-} /* {
+}, {
+ name: '浼佷笟搴旀��',
+ id: 8,
+ checked: false,
+ isShow: true,
+ icon: 'iconguanxianxuncha',
+ comp: ''
+}/* {
name: '绠¢亾鍙樻洿',
id: 8,
checked: false,
diff --git a/src/conf/layers/LayerEntEmer.js b/src/conf/layers/LayerEntEmer.js
new file mode 100644
index 0000000..283e161
--- /dev/null
+++ b/src/conf/layers/LayerEntEmer.js
@@ -0,0 +1,68 @@
+/**
+ * 浼佷笟棰勮
+ */
+import { LayerHbss } from './LayerHbss'
+import { LayerFsss } from './LayerFsss'
+
+import { PIPELINE_WFS } from '../Constants'
+const WFS_URL = PIPELINE_WFS
+
+export const LayerEntEmer = {
+ code: 'reportEntemeage',
+ name: '浼佷笟棰勮',
+ checked: false,
+ type: 0,
+ childLayer: [LayerFsss, LayerHbss],
+ layers: [
+ {
+ code: 'rainline',
+ name: '浜嬪墠闃舵',
+ sname: '鍏ㄩ儴璧勬簮',
+ checked: false,
+ type: 0,
+ wmsLayers: 'sewer:pipeline_rain',
+ // wfs: WFS_URL + '?TYPENAME=绠$綉&FILTER=<Filter xmlns="http://www.opengis.net/ogc"><PropertyIsEqualTo><PropertyName>mediumtype</PropertyName><Literal>闆ㄦ按绠$嚎</Literal></PropertyIsEqualTo></Filter>',
+ icon: 'sewers/闆ㄦ按绾�.png',
+ color: '#0070ff',
+ minZoom: 13,
+ styles: {
+ COLOR: '#0070ff',
+ FILL_COLOR: '#0070ff'
+ }
+ },
+ {
+ code: 'accidentline',
+ name: '搴旀�ョ墿璧勫湪',
+ sname: '浜嬫晠姘�',
+ checked: false,
+ // wmsLayers: 'sewer:pipeline_accident',
+ type: 0,
+ minZoom: 13,
+ wfs: WFS_URL + '?TYPENAME=浜嬫晠姘�'
+ },
+ {
+ code: 'oilline',
+ name: '搴旀�ヨ溅杈�',
+ sname: '鍚补姹℃按',
+ checked: false,
+ type: 0,
+ minZoom: 13,
+ color: '#ffaa00',
+ wmsLayers: 'sewer:pipeline_sewer',
+ // wfs: 'http://xearth.cn:6240/geoserver/sewer/wfs?typeName=sewer:pipeline&maxFeatures=500&outputFormat=application%2Fjson&cql_filter=mediumtype=\'鍚补姹℃按\'',
+ styles: {
+ COLOR: '#ffaa00',
+ FILL_COLOR: '#ffaa00'
+ }
+ },
+ {
+ code: 'saltline',
+ name: '搴旀�ラ槦浼�',
+ sname: '鍚洂姹℃按',
+ checked: false,
+ type: 0,
+ minZoom: 13,
+ wfs: WFS_URL + '?TYPENAME=鍚洂姹℃按'
+ }
+ ]
+}
diff --git a/src/conf/layers/LayerFsss.js b/src/conf/layers/LayerFsss.js
index 86cc169..6cc183a 100644
--- a/src/conf/layers/LayerFsss.js
+++ b/src/conf/layers/LayerFsss.js
@@ -1,30 +1,32 @@
/**
* 鍖哄煙
*/
-import { PIPELINE_WFS } from '../Constants'
+import { PIPELINE_WFS, SERVICE_TYPE } from '../Constants'
const WFS_URL = PIPELINE_WFS
export const LayerFsss = {
code: 'sewersFsss',
name: '闄勫睘璁炬柦',
checked: false, // 榛樿閫変腑鐘舵��
layers: [
- {
+ /* {
code: 'pipeSection',
name: '绠℃',
sname: '绠℃',
checked: false,
wmsLayers: 'sewer:pipesegment'
// wfs: 'http://xearth.cn:6240/geoserver/sewer/wfs?typeName=sewer:pipesegment&maxFeatures=50&outputFormat=application%2Fjson&cql_filter=orgname=\'宸撮櫟鐭冲寲\''
- },
+ }, */
{
code: 'fourlink',
name: '鍥涢��',
sname: '鍥涢��',
checked: true,
minZoom: 16,
- wmsLayers: 'sewer:fourlink',
+ type: SERVICE_TYPE.WMS,
+ typeName: 'sewer:fourlink',
// wfs: WFS_URL + '?TYPENAME=鍥涢��',
- icon: 'sewers/鍥涢��.png'
+ icon: 'sewers/鍥涢��.png',
+ index: 3
},
{
code: 'tee',
@@ -32,16 +34,19 @@
sname: '涓夐��',
checked: false,
minZoom: 16,
- wmsLayers: 'sewer:tee',
+ typeName: 'sewer:tee',
+ type: SERVICE_TYPE.WMS,
// wfs: WFS_URL + '?TYPENAME=涓夐��',
- icon: 'sewers/涓夐��.png'
+ icon: 'sewers/涓夐��.png',
+ index: 3
},
{
code: 'piperack',
name: '绠℃灦(澧�)',
sname: 'PipeRack',
minZoom: 16,
- wfs: WFS_URL + '?TYPENAME=绠℃灦',
+ type: SERVICE_TYPE.WMS,
+ typeName: WFS_URL + '?TYPENAME=绠℃灦',
checked: false
},
{
@@ -49,13 +54,15 @@
name: '绠″粖(甯�)',
sname: 'PipeGallery',
minZoom: 16,
- wfs: WFS_URL + '?TYPENAME=绠″粖',
+ type: SERVICE_TYPE.WMS,
+ typeName: '?TYPENAME=绠″粖',
checked: false
},
{
code: 'pipesegment',
name: '娴佸悜',
sname: 'ywslx',
+ type: SERVICE_TYPE.WMS,
checked: false
},
{
@@ -64,7 +71,8 @@
minZoom: 10,
sname: '闃�闂�',
checked: false,
- wmsLayers: 'sewer:valve',
+ type: SERVICE_TYPE.WMS,
+ typeName: 'sewer:valve',
// wfs: WFS_URL + '?TYPENAME=闃�闂�',
icon: 'sewers/闃�闂�.png'
},
@@ -74,7 +82,8 @@
sname: '寮ご',
minZoom: 16,
checked: false,
- wmsLayers: 'sewer:elbow',
+ type: SERVICE_TYPE.WMS,
+ typeName: 'sewer:elbow',
// wfs: WFS_URL + '?TYPENAME=寮ご',
icon: 'sewers/寮ご.png'
}
diff --git a/src/conf/layers/LayerHbss.js b/src/conf/layers/LayerHbss.js
index 97054d7..dafb46d 100644
--- a/src/conf/layers/LayerHbss.js
+++ b/src/conf/layers/LayerHbss.js
@@ -1,7 +1,7 @@
/**
* 鍖哄煙
*/
-import { PIPELINE_WFS } from '../Constants'
+import { PIPELINE_WFS, SERVICE_TYPE } from '../Constants'
const WFS_URL = PIPELINE_WFS
export const LayerHbss = {
code: 'sewersHbss',
@@ -14,6 +14,7 @@
sname: '绐ㄤ簳',
checked: false,
minZoom: 16,
+ type: SERVICE_TYPE.WMS,
wmsLayers: 'sewer:manhole',
icon: 'sewers/绐ㄤ簳.png'
},
@@ -23,7 +24,8 @@
sname: '闆ㄧ瀛�',
checked: false,
minZoom: 16,
- wmsLayers: 'sewer:raingate',
+ type: SERVICE_TYPE.WMS,
+ typeName: 'sewer:raingate',
// wfs: WFS_URL + '?TYPENAME=闆ㄧ瀛�',
icon: 'sewers/闆ㄧ瀛�.png'
},
@@ -32,6 +34,7 @@
name: '闃茬伀鍫�',
sname: '闃茬伀鍫�',
minZoom: 16,
+ type: SERVICE_TYPE.WMS,
wfs: WFS_URL + '?TYPENAME=闃茬伀鍫�',
checked: false
},
@@ -42,12 +45,14 @@
minZoom: 16,
wfs: WFS_URL + '?TYPENAME=闆嗘按姹�',
checked: false,
+ type: SERVICE_TYPE.WMS,
icon: 'sewers/闆嗘按姹�.png'
},
{
code: 'jlz',
name: '鎴祦闂�',
sname: '鎴祦闂�',
+ type: SERVICE_TYPE.WMS,
wfs: WFS_URL + '?TYPENAME=鎴祦闂�',
checked: false
},
@@ -56,6 +61,7 @@
name: '婧㈡祦鍫�',
sname: '婧㈡祦鍫�',
minZoom: 16,
+ type: SERVICE_TYPE.WMS,
wfs: WFS_URL + '?TYPENAME=婧㈡祦鍫�',
checked: false
},
@@ -65,6 +71,7 @@
sname: '闅旀补姹�',
minZoom: 16,
checked: false,
+ type: SERVICE_TYPE.WMS,
wfs: WFS_URL + '?TYPENAME=闅旀补姹�',
icon: 'sewers/闅旀补姹�.png'
}
diff --git a/src/conf/layers/LayerPipeLines.js b/src/conf/layers/LayerPipeLines.js
index bb746d9..8dea07c 100644
--- a/src/conf/layers/LayerPipeLines.js
+++ b/src/conf/layers/LayerPipeLines.js
@@ -4,8 +4,7 @@
import { LayerHbss } from './LayerHbss'
import { LayerFsss } from './LayerFsss'
-import { PIPELINE_WFS } from '../Constants'
-const WFS_URL = PIPELINE_WFS
+import { SERVICE_TYPE } from '../Constants'
export const LayerPipeLines = {
code: 'sewersPipeLines',
@@ -19,110 +18,126 @@
name: '闆ㄦ按绾�',
sname: '绠$綉',
checked: false,
- type: 0,
- wmsLayers: 'sewer:pipeline_rain',
- // wfs: WFS_URL + '?TYPENAME=绠$綉&FILTER=<Filter xmlns="http://www.opengis.net/ogc"><PropertyIsEqualTo><PropertyName>mediumtype</PropertyName><Literal>闆ㄦ按绠$嚎</Literal></PropertyIsEqualTo></Filter>',
+ type: SERVICE_TYPE.WMS,
+ typeName: 'sewer:pipeline',
icon: 'sewers/闆ㄦ按绾�.png',
color: '#0070ff',
minZoom: 13,
styles: {
COLOR: '#0070ff',
FILL_COLOR: '#0070ff'
- }
+ },
+ filter: 'mediumtype = \'闆ㄦ按\'',
+ index: 1
},
{
code: 'accidentline',
name: '浜嬫晠姘�',
sname: '浜嬫晠姘�',
checked: false,
- // wmsLayers: 'sewer:pipeline_accident',
- type: 0,
+ type: SERVICE_TYPE.WMS,
+ typeName: 'sewer:pipeline',
minZoom: 13,
- wfs: WFS_URL + '?TYPENAME=浜嬫晠姘�'
+ filter: 'mediumtype = \'浜嬫晠姘碶'',
+ index: 1
},
{
code: 'oilline',
name: '鍚补姹℃按',
sname: '鍚补姹℃按',
checked: false,
- type: 0,
+ type: SERVICE_TYPE.WMS,
+ typeName: 'sewer:pipeline',
minZoom: 13,
color: '#ffaa00',
- wmsLayers: 'sewer:pipeline_sewer',
- // wfs: 'http://xearth.cn:6240/geoserver/sewer/wfs?typeName=sewer:pipeline&maxFeatures=500&outputFormat=application%2Fjson&cql_filter=mediumtype=\'鍚补姹℃按\'',
+ filter: 'mediumtype = \'鍚补\'',
styles: {
COLOR: '#ffaa00',
FILL_COLOR: '#ffaa00'
- }
+ },
+ index: 1
},
{
code: 'saltline',
name: '鍚洂姹℃按',
sname: '鍚洂姹℃按',
checked: false,
- type: 0,
+ type: SERVICE_TYPE.WMS,
+ typeName: 'sewer:pipeline',
minZoom: 13,
- wfs: WFS_URL + '?TYPENAME=鍚洂姹℃按'
+ filter: 'mediumtype = \'鍚洂\'',
+ index: 1
},
{
code: 'alkaliline',
name: '鍚⒈姹℃按',
sname: '鍚⒈姹℃按',
checked: false,
- type: 0,
- wfs: WFS_URL + '?TYPENAME=鍚⒈姹℃按',
- minZoom: 10
+ type: SERVICE_TYPE.WMS,
+ typeName: 'sewer:pipeline',
+ filter: 'mediumtype = \'鍚⒈\'',
+ minZoom: 10,
+ index: 1
},
{
code: 'sulfurline',
name: '鍚~姹℃按',
sname: '鍚~姹℃按',
checked: false,
- type: 0,
- wmsLayers: 'sewer:pipeline_sulfur',
- // wfs: WFS_URL + '?TYPENAME=鍚⒈姹℃按',
- minZoom: 10
+ type: SERVICE_TYPE.WMS,
+ typeName: 'sewer:pipeline',
+ filter: 'mediumtype = \'鍚~\'',
+ minZoom: 10,
+ index: 1
},
{
code: 'lifeline',
name: '鐢熸椿姹℃按',
sname: '鐢熸椿姹℃按',
checked: false,
- type: 0,
+ type: SERVICE_TYPE.WMS,
+ typeName: 'sewer:pipeline',
+ filter: 'mediumtype = \'鐢熸椿姹℃按\'',
minZoom: 13,
- wfs: WFS_URL + '?TYPENAME=鐢熸椿姹℃按'
+ index: 1
},
{
code: 'purifyline',
name: '鍑�鍖栨按',
sname: '鍑�鍖栨按',
checked: false,
- type: 0,
+ type: SERVICE_TYPE.WMS,
+ typeName: 'sewer:pipeline',
+ filter: 'mediumtype = \'鍑�鍖栨按\'',
minZoom: 13,
- wfs: WFS_URL + '?TYPENAME=鍑�鍖栨按'
+ index: 1
},
{
code: 'loopline',
name: '寰幆姘�',
sname: '寰幆姘�',
- type: 0,
+ type: SERVICE_TYPE.WMS,
+ typeName: 'sewer:pipeline',
+ filter: 'mediumtype = \'寰幆姘碶'',
checked: false,
minZoom: 13,
- wfs: WFS_URL + '?TYPENAME=寰幆姘�'
+ index: 1
},
{
code: 'buildline',
name: '鐢熶骇姹℃按',
sname: '鐢熶骇姹℃按',
checked: false,
- type: 0,
+ type: SERVICE_TYPE.WMS,
+ typeName: 'sewer:pipeline',
+ filter: 'mediumtype = \'鐢熶骇姹℃按\'',
minZoom: 13,
color: '#a8a800',
- wfs: 'http://xearth.cn:6240/geoserver/sewer/wfs?typeName=sewer:pipeline&maxFeatures=500&outputFormat=application%2Fjson&cql_filter=mediumtype=\'鐢熶骇姹℃按\'',
styles: {
COLOR: '#a8a800',
FILL_COLOR: '#a8a800'
- }
+ },
+ index: 1
}
]
}
diff --git a/src/utils/List.js b/src/utils/List.js
new file mode 100644
index 0000000..178cdc7
--- /dev/null
+++ b/src/utils/List.js
@@ -0,0 +1,96 @@
+class List {
+ constructor () {
+ this.dataSouce = []
+ }
+
+ add (index, element) {
+ if (!index) {
+ this.addEnd(element)
+ } else if (index >= this.dataSouce.length) {
+ this.addEnd(element)
+ } else if (index === 1) {
+ this.addFront(element)
+ } else {
+ this._add(index, element)
+ }
+ }
+
+ /**
+ * 鍦ㄥ垪琛ㄧ殑鏈熬娣诲姞鏂板厓绱�
+ * @param {*} element 瑕佹坊鍔犵殑鍏冪礌
+ */
+ addEnd (element) {
+ this.dataSouce[this.dataSouce.length] = element
+ }
+
+ /**
+ * 鍦ㄥ垪琛ㄥご閮ㄦ坊鍔犳柊鍏冪礌
+ * @param {*} element
+ * @param {*} after
+ */
+ addFront (element) {
+ this._add(0, element)
+ }
+
+ _add (index, element) {
+ const newArr = []
+ for (var i = this.dataSouce.length - 1; i > index - 1; i--) {
+ newArr[i + 1] = this.dataSouce[i]
+ }
+ newArr[index] = element
+ this.dataSouce = newArr
+ }
+
+ /**
+ * 鍦ㄥ垪琛ㄤ腑绉婚櫎涓�涓厓绱�
+ * @param {*} element 瑕佸垹闄ょ殑鍏冪礌
+ */
+ remove (element) {
+ // 鏌ユ壘褰撳墠鍏冪礌鐨勭储寮�
+ const index = this.dataSouce.indexOf(element)
+ if (index >= 0) {
+ this.dataSouce.splice(index, 1)
+ return true
+ }
+ return false
+ }
+
+ /**
+ * 鍒ゆ柇缁欏畾鐨勫�兼槸鍚﹀湪鍒楄〃涓�
+ */
+ contains (element) {
+ return this.dataSouce.indexOf(element) > -1
+ }
+
+ /**
+ * 娓呮鍒楄〃涓殑鍏冪礌
+ */
+ clear () {
+ delete this.dataSouce
+ this.dataSouce = []
+ }
+
+ /**
+ * 鍒楄〃鐨勯暱搴�
+ */
+ length () {
+ return this.dataSouce.length
+ }
+
+ join (comma) {
+ this.removeBlank()
+ return this.dataSouce.join(comma)
+ }
+
+ removeBlank () {
+ const arr = this.dataSouce
+ console.log(arr)
+ for (const k in arr) {
+ if (!arr[k]) {
+ this.dataSouce.splice(k, 1)
+ }
+ }
+ }
+}
+
+export default List
diff --git a/src/views/MapTemplate.vue b/src/views/MapTemplate.vue
index d0bffe7..38605bf 100644
--- a/src/views/MapTemplate.vue
+++ b/src/views/MapTemplate.vue
@@ -1,23 +1,24 @@
<template>
- <div class="full-screen">
- <!--<popup ref="popup" @callPopup="callPopup"></popup>-->
- <div id="map" ref="rootmap">
+ <div class="full-screen">
+ <!--<popup ref="popup" @callPopup="callPopup"></popup>-->
+ <div id="map" ref="rootmap">
+ </div>
+ <sgis-layer-controller></sgis-layer-controller>
+ <monitor-panel></monitor-panel>
+ <!-- <top-enterprise-panel></top-enterprise-panel>-->
+ <tool-box-panel ref="toolBox"></tool-box-panel>
+ <!-- <menu-special></menu-special>-->
+ <legend-panel></legend-panel>
+ <!-- <summary-sheets></summary-sheets>-->
+ <SummarySheet></SummarySheet>
+ <!-- <enterprise></enterprise> -->
+ <!-- <el-button id="map-btn" el-icon-c-scale-to-original icon="el-icon-c-scale-to-original" circle @click="isShowHidden"></el-button>-->
+ <!-- <el-button type="primary" @click="ChangeState" class="solid-waste">鍥哄簾</el-button>-->
+ <!-- <el-button type="primary" @click="ChangeWaterState" class="Waste-water">搴熸按</el-button>-->
+ <!-- <el-button type="primary" @click="AddGasHelper" class="flue-gas">搴熸皵</el-button>-->
+ <PublicBounced ref="PublicBounced"></PublicBounced>
+ <!-- <ReportPopup></ReportPopup>-->
</div>
- <sgis-layer-controller></sgis-layer-controller>
- <monitor-panel></monitor-panel>
- <!-- <top-enterprise-panel></top-enterprise-panel>-->
- <tool-box-panel ref="toolBox"></tool-box-panel>
- <!-- <menu-special></menu-special>-->
- <legend-panel></legend-panel>
-<!-- <summary-sheets></summary-sheets>-->
- <SummarySheet></SummarySheet>
- <!-- <enterprise></enterprise> -->
- <!-- <el-button id="map-btn" el-icon-c-scale-to-original icon="el-icon-c-scale-to-original" circle @click="isShowHidden"></el-button>-->
- <!-- <el-button type="primary" @click="ChangeState" class="solid-waste">鍥哄簾</el-button>-->
- <!-- <el-button type="primary" @click="ChangeWaterState" class="Waste-water">搴熸按</el-button>-->
- <!-- <el-button type="primary" @click="AddGasHelper" class="flue-gas">搴熸皵</el-button>-->
- <PublicBounced ref="PublicBounced"></PublicBounced>
- </div>
</template>
<script>
@@ -37,6 +38,7 @@
import PublicBounced from '@components/BaseNav/PublicBounced/PublicBounced'
import LayerFactory from '@components/LayerController/service/LayerFactory'
import EventHandler from '../components/LayerController/event/EventHandler'
+// import ReportPopup from '../components/panel/topicSearch/SewersSelect/EnterpriseEmergency/ReportPopup'
export default {
name: 'MapTemplate',
@@ -51,6 +53,7 @@
// summarySheets,
SummarySheet,
PublicBounced
+ // ReportPopup
},
data () {
return {
@@ -121,59 +124,59 @@
</script>
<style lang="less">
-.flue-gas {
- position: fixed;
- top: 88px;
- left: 180px;
- z-index: 500;
-}
+ .flue-gas {
+ position: fixed;
+ top: 88px;
+ left: 180px;
+ z-index: 500;
+ }
-.solid-waste {
- position: absolute;
- top: 88px;
- left: 88px;
- z-index: 999;
-}
+ .solid-waste {
+ position: absolute;
+ top: 88px;
+ left: 88px;
+ z-index: 999;
+ }
-.full-screen {
- width: 100%;
- height: 100%;
- margin: 0;
- padding: 0;
- position: absolute;
+ .full-screen {
+ width: 100%;
+ height: 100%;
+ margin: 0;
+ padding: 0;
+ position: absolute;
- #map {
- height: 100%;
- width: 100%;
- }
+ #map {
+ height: 100%;
+ width: 100%;
+ }
- .barline {
- //width: 100%;
- //height: 1px;
- //background-color: #0661AE;
- border-top: 1px solid #0661AE;
- }
+ .barline {
+ //width: 100%;
+ //height: 1px;
+ //background-color: #0661AE;
+ border-top: 1px solid #0661AE;
+ }
- #map-btn {
- position: fixed;
- top: 20px;
- left: 100px;
- z-index: 9999;
- }
+ #map-btn {
+ position: fixed;
+ top: 20px;
+ left: 100px;
+ z-index: 9999;
+ }
- .leaflet-custom-icon {
- background: white;
- }
+ .leaflet-custom-icon {
+ background: white;
+ }
- .leaflet-marker-icon {
- background: none;
- }
+ .leaflet-marker-icon {
+ background: none;
+ }
- #migic {
- width: 48px;
- height: 48px;
- margin: -18px -20px;
- z-index: 999;
- }
-}
+ #migic {
+ width: 48px;
+ height: 48px;
+ margin: -18px -20px;
+ z-index: 999;
+ }
+ }
</style>
diff --git a/src/views/popup/Popup.vue b/src/views/popup/Popup.vue
index a67a49f..d29196c 100644
--- a/src/views/popup/Popup.vue
+++ b/src/views/popup/Popup.vue
@@ -1,6 +1,6 @@
<template>
<div id="popup" class="s-map-popup-panel" style="min-width: 280px;max-width: 280px;padding: 0 10px">
- <el-tabs :value="0" type="card">
+ <el-tabs value="0" type="card">
<el-tab-pane
:key="item.name"
v-for="(item,index) in datas"
--
Gitblit v1.8.0