From 57f9b01d8062e46e76147954aae9ab267770c1e8 Mon Sep 17 00:00:00 2001 From: chenzeping <ChenZeping02609@163.com> Date: 星期一, 12 四月 2021 09:55:27 +0800 Subject: [PATCH] Merge branch 'develop' of http://xearth.cn:6600/r/wuyushui/SewerAndRainNetwork into develop --- src/components/plugin/MeaSure.js | 2 src/components/BaseNav/PublicBounced/GasComponents/PublicChart.vue | 52 +++++++++++++++++ src/components/LayerController/service/WfsLayerService.js | 5 - src/conf/MapConfig.js | 4 - src/components/BaseNav/PublicBounced/GasComponents/EChartsDate.vue | 14 ++++ src/components/LayerController/logic/WasteWater.js | 2 src/components/LayerController/service/LayerFactory.js | 44 +++++++++----- src/components/plugin/FullScreen.js | 3 src/Sgis.js | 2 9 files changed, 102 insertions(+), 26 deletions(-) diff --git a/src/Sgis.js b/src/Sgis.js index 3104d7e..8c5b3c9 100644 --- a/src/Sgis.js +++ b/src/Sgis.js @@ -1,7 +1,7 @@ import BasemapHelper from '@components/helpers/BasemapHelper' import VectorLayerHelper from '@components/helpers/VectorLayerHelper' // 鍒濆鍖栨樉绀� -// import '@components/plugin/PathDrag' +import '@components/plugin/PathDrag' import MapConfig from '@/conf/MapConfig' import '@components/plugin/PathDashFlow' // 娴佸姩绾垮浘 import DownLoad from '@components/plugin/DownLoad' diff --git a/src/components/BaseNav/PublicBounced/GasComponents/EChartsDate.vue b/src/components/BaseNav/PublicBounced/GasComponents/EChartsDate.vue index 8130287..492d4f2 100644 --- a/src/components/BaseNav/PublicBounced/GasComponents/EChartsDate.vue +++ b/src/components/BaseNav/PublicBounced/GasComponents/EChartsDate.vue @@ -2,6 +2,9 @@ <template> <div id="Tab"> <div class="infomation"> + <ul> + <li></li> + </ul> <el-row> <el-col :span="6"><div class="grid-content bg-purple">姘哀鍖栫墿:29.93鏍囧噯:100</div></el-col> <el-col :span="6"><div class="grid-content bg-purple">浜屾哀鍖栫~:17.34鏍囧噯:50</div></el-col> @@ -69,6 +72,7 @@ <script> import PublicDetailedList from '@components/BaseNav/PublicBounced/GasComponents/PublicDetailedList' +// import dayjs from 'dayjs' export default { name: 'ECharts', @@ -86,7 +90,8 @@ formInline: { user: '', region: '' - } + }, + info: this.series } }, methods: { @@ -277,7 +282,12 @@ data: data[k] }) } - console.log(series) + // -------------------------- + var arr = [] + for (var x = 0; x < dataWatch.length; x++) { + arr.push(dataWatch[x].MonTimeStr) + } + console.log(arr) const opitons = this.initOptions(dateDate, series) this.myChart = this.$echarts.init(this.$refs.main) this.myChart.setOption(opitons) diff --git a/src/components/BaseNav/PublicBounced/GasComponents/PublicChart.vue b/src/components/BaseNav/PublicBounced/GasComponents/PublicChart.vue index b2788bb..facffbb 100644 --- a/src/components/BaseNav/PublicBounced/GasComponents/PublicChart.vue +++ b/src/components/BaseNav/PublicBounced/GasComponents/PublicChart.vue @@ -10,6 +10,15 @@ <li @click='tabTaggle("EChartsDate")'>鏃ユ暟鎹�</li> <li @click='tabTaggle("ECharts")'>浜哄伐鏁版嵁</li> </ul> + <div id="title" > + <span><strong> </strong></span> + <span >姝e父</span> + <span ></span> + <span >棰勮</span> + <span ></span> + <span >瓒呮爣</span> + <span ></span> + </div> <component :is="currentTab" v-bind="$attrs"></component> </div> </template> @@ -113,4 +122,47 @@ color: #682000; cursor: pointer; } +#title{ + height: 30px; + /* margin-top: 30px; */ + color: #ffffff; + margin-top: 5px; +} + +#title span:nth-child(1){ + /*margin-left: 478px*/ +} +#title span:nth-child(2){ + /*margin-left: 177px*/ +} +#title span:nth-child(3){ + display: inline-block; + background-color: #4ec99c; + height: 15px; + width: 35px; + margin-left: 10px; + border-radius: 5px; +} +#title span:nth-child(6){ + /*margin-left: 21px*/ +} +#title span:nth-child(7){ + display: inline-block; + background-color: red; + height: 15px; + width: 35px; + margin-left: 7px; + border-radius: 5px; +} +#title span:nth-child(4){ + margin-left: 17px; +} +#title span:nth-child(5){ + display: inline-block; + background-color: orange; + height: 15px; + width: 35px; + margin-left: 9px; + border-radius: 5px; +} </style> diff --git a/src/components/LayerController/logic/WasteWater.js b/src/components/LayerController/logic/WasteWater.js index af239fe..671df7b 100644 --- a/src/components/LayerController/logic/WasteWater.js +++ b/src/components/LayerController/logic/WasteWater.js @@ -45,6 +45,8 @@ } } + // 鍒嗗壊绾�------------------------------------------------------------------------------- + // this. this.bindTooltip = (layer) => { return layer.options.test.Name } diff --git a/src/components/LayerController/service/LayerFactory.js b/src/components/LayerController/service/LayerFactory.js index d12719b..b617ae5 100644 --- a/src/components/LayerController/service/LayerFactory.js +++ b/src/components/LayerController/service/LayerFactory.js @@ -11,13 +11,17 @@ init (layerConfig) { // 1. 閬嶅巻layer config - for (var i = 0, l = layerConfig.length; i < l; i++) { - var config = layerConfig[i] - var layers = config.layers - layers && this.init(config.layers) + if (layerConfig) { + for (var i = 0, l = layerConfig.length; i < l; i++) { + var config = layerConfig[i] + var layers = config.layers + var childLayer = config.childLayer + layers && this.init(config.layers) + childLayer && this.init(config.childLayer) - var checked = config.checked - checked && this.load(config) + var checked = config.checked + checked && this.load(config) + } } } @@ -72,17 +76,25 @@ } /** - * 璁剧疆index,绾垮湪鏈�涓嬮潰锛岀偣鍦ㄤ笂闈� - * @param layerGroup 鍥惧眰缁� - */ - setZIndex (layerGroup) { - var layers = layerGroup.getLayers() - if (layers.length > 0) { - var layer = layers[0] - if (layer.feature && (layer.feature.geometry.type === 'LineString' || layer.feature.geometry.type === 'MultiLineString')) { - layerGroup.bringToBack() + * todo 杩欓噷鏃犳晥锛岃矊浼兼槸鍥犱负geojson鍔犺浇鍒板湴鍥句篃鏄釜layergroup + * + * 璁剧疆index,绾垮湪鏈�涓嬮潰锛岀偣鍦ㄤ笂闈� + * @param layerGroup 鍥惧眰缁� + */ + setZIndex (layer) { + if (Array.isArray(layer)) { + for (var i = 0; i < layer.length; i++) { + this.setZIndex(layer[i]) + } + } else { + if (layer.getLayers) { + this.setZIndex(layer.getLayers()) } else { - layerGroup.bringToFront() + if (layer.feature && (layer.feature.geometry.type === 'LineString' || layer.feature.geometry.type === 'MultiLineString')) { + layer.bringToBack() + } else { + layer.bringToFront() + } } } } diff --git a/src/components/LayerController/service/WfsLayerService.js b/src/components/LayerController/service/WfsLayerService.js index b263e46..f00eaeb 100644 --- a/src/components/LayerController/service/WfsLayerService.js +++ b/src/components/LayerController/service/WfsLayerService.js @@ -1,7 +1,6 @@ /** * 鍔犺浇涓氬姟鏁版嵁鍥惧眰 */ - import { STYLES } from '../../../conf/Constants' import AjaxUtils from '../../../utils/AjaxUtils' @@ -30,14 +29,13 @@ loadData (wfsUrl) { AjaxUtils.get4JsonDataByUrl(wfsUrl, this.params, (res) => { - console.log(res) this.draw(res.data.features) }) } draw (features) { const icon = this.config.icon - this.L.geoJSON(features, { + const geojsonLayer = this.L.geoJSON(features, { style: function (feature) { return { fill: STYLES.FILL, @@ -75,6 +73,7 @@ .on('mouseover', (e) => this.mouseOverListener(e, layer)).on('mouseout', (e) => this.mouseOutListener(e, layer)) } }).addTo(this.layer) + window.layerFactory.setZIndex(geojsonLayer) } mouseOverListener (e, layer) { diff --git a/src/components/plugin/FullScreen.js b/src/components/plugin/FullScreen.js index 9ef7d5a..d9a3d32 100644 --- a/src/components/plugin/FullScreen.js +++ b/src/components/plugin/FullScreen.js @@ -48,7 +48,8 @@ }, _toggleTitle: function () { - this.link.title = this.optionsthis._map.isFullscreen()] + this.link.title = this.options + this._map.isFullscreen() } }) diff --git a/src/components/plugin/MeaSure.js b/src/components/plugin/MeaSure.js index a540743..703ff73 100644 --- a/src/components/plugin/MeaSure.js +++ b/src/components/plugin/MeaSure.js @@ -52,6 +52,7 @@ areaMeasure.points.pop() }, dblclick: function (e) { // 鍙屽嚮缁撴潫 + console.log(areaMeasure.polygon.dragging) console.log('鍙屽嚮缁撴潫', e) areaMeasure.polygon.enableEdit() areaMeasure.polygon.dragging.disable() @@ -128,6 +129,7 @@ distanceMeasure.points.pop() }, dblclick: function (e) { // 鍙屽嚮缁撴潫 + console.log(distanceMeasure.polyline.dragging) console.log('鍙屽嚮缁撴潫', e) distanceMeasure.polyline.enableEdit() distanceMeasure.polyline.dragging.disable() diff --git a/src/conf/MapConfig.js b/src/conf/MapConfig.js index a89c954..6e6ea34 100644 --- a/src/conf/MapConfig.js +++ b/src/conf/MapConfig.js @@ -1,6 +1,5 @@ 锘縤mport * as L from 'leaflet' import TDT from './TDT' -import { LayerSewersPoint } from './layers/LayerSewers' import { LayerTopic } from './LayerTopic' import { LayerBasin } from './layers/LayerBasin' @@ -42,8 +41,7 @@ IntranetBaseMaps: TDT.intranet, InternetBaseMaps: TDT.internet, Layers: { - LayerSewersLine: [LayerBasin, LayerTopic], - layerSewersPoint: LayerSewersPoint + LayerSewersLine: [LayerBasin, LayerTopic] } // 姹¢洦姘村浘灞傞厤缃� } -- Gitblit v1.8.0