From 97e8d550c9867f7a92c56060835db2969e6fca2e Mon Sep 17 00:00:00 2001 From: chenyabin <Chenab123!> Date: 星期三, 31 三月 2021 15:44:53 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/develop' into develop --- src/conf/layers/LayerArea.js | 36 +++ src/conf/layers/LayerPk.js | 26 ++ src/api/mapApi.js | 6 public/assets/images/map/exhaust/fq_orange.png | 0 public/assets/images/map/exhaust/fq_green.png | 0 src/components/BaseNav/SolidWaste/SolidWaste.js | 15 src/conf/layers/LayerHbss.js | 79 +++++++ src/utils/axios.js | 2 public/assets/images/map/exhaust/fq_yellow.png | 0 public/assets/images/map/exhaust/fq_red.png | 0 public/assets/images/map/exhaust/fq_bright_green.png | 0 src/components/LayerController/logic/WasteGas.js | 69 ++++-- src/api/request.js | 9 src/conf/layers/LayerFsss.js | 79 +++++++ public/assets/images/map/exhaust/fq_green_xc.png | 0 src/conf/layers/LayerPipeLine.js | 77 +++++++ src/components/LayerController/logic/Sample.js | 44 ++++ src/views/MapTemplate.vue | 16 + src/components/BaseNav/PublicBounced/GasComponents/GasTabs.vue | 8 src/api/mapUrl.js | 3 public/assets/images/map/exhaust/fq_blue.png | 0 src/components/BaseNav/PublicBounced/PublicBounced.vue | 34 ++- src/components/LayerController/modules/LcServiceLayer.vue | 5 src/main.js | 1 src/conf/MapConfig.js | 11 src/components/LayerController/service/BusiLayerService.js | 2 public/assets/images/map/exhaust/fq_gray.png | 0 src/components/LayerController/logic/SolidWaste.js | 43 ++- 28 files changed, 476 insertions(+), 89 deletions(-) diff --git a/src/assets/images/map-pages/basenav/flugas/exhaust/fq_blue.png b/public/assets/images/map/exhaust/fq_blue.png similarity index 100% rename from src/assets/images/map-pages/basenav/flugas/exhaust/fq_blue.png rename to public/assets/images/map/exhaust/fq_blue.png Binary files differ diff --git a/src/assets/images/map-pages/basenav/flugas/exhaust/fq_bright_green.png b/public/assets/images/map/exhaust/fq_bright_green.png similarity index 100% rename from src/assets/images/map-pages/basenav/flugas/exhaust/fq_bright_green.png rename to public/assets/images/map/exhaust/fq_bright_green.png Binary files differ diff --git a/src/assets/images/map-pages/basenav/flugas/exhaust/fq_gray.png b/public/assets/images/map/exhaust/fq_gray.png similarity index 100% rename from src/assets/images/map-pages/basenav/flugas/exhaust/fq_gray.png rename to public/assets/images/map/exhaust/fq_gray.png Binary files differ diff --git a/src/assets/images/map-pages/basenav/flugas/exhaust/fq_green.png b/public/assets/images/map/exhaust/fq_green.png similarity index 100% rename from src/assets/images/map-pages/basenav/flugas/exhaust/fq_green.png rename to public/assets/images/map/exhaust/fq_green.png Binary files differ diff --git a/src/assets/images/map-pages/basenav/flugas/exhaust/fq_green_xc.png b/public/assets/images/map/exhaust/fq_green_xc.png similarity index 100% rename from src/assets/images/map-pages/basenav/flugas/exhaust/fq_green_xc.png rename to public/assets/images/map/exhaust/fq_green_xc.png Binary files differ diff --git a/src/assets/images/map-pages/basenav/flugas/exhaust/fq_orange.png b/public/assets/images/map/exhaust/fq_orange.png similarity index 100% rename from src/assets/images/map-pages/basenav/flugas/exhaust/fq_orange.png rename to public/assets/images/map/exhaust/fq_orange.png Binary files differ diff --git a/src/assets/images/map-pages/basenav/flugas/exhaust/fq_red.png b/public/assets/images/map/exhaust/fq_red.png similarity index 100% rename from src/assets/images/map-pages/basenav/flugas/exhaust/fq_red.png rename to public/assets/images/map/exhaust/fq_red.png Binary files differ diff --git a/src/assets/images/map-pages/basenav/flugas/exhaust/fq_yellow.png b/public/assets/images/map/exhaust/fq_yellow.png similarity index 100% rename from src/assets/images/map-pages/basenav/flugas/exhaust/fq_yellow.png rename to public/assets/images/map/exhaust/fq_yellow.png Binary files differ diff --git a/src/api/mapApi.js b/src/api/mapApi.js index 2784a8e..ef9ea26 100644 --- a/src/api/mapApi.js +++ b/src/api/mapApi.js @@ -15,6 +15,12 @@ getSolidWaste (data) { return axios.get(mapUrl.getSolidWaste, data) }, + getSolidWasteBaseInfo (data) { + return axios.get(mapUrl.getSolidWasteBaseInfo, data) + }, + GetWasteGas (data) { + return axios.get(mapUrl.GetWasteGas, data) + }, getCompany (data) { return axios.get(mapUrl.getCompany, data) } diff --git a/src/api/mapUrl.js b/src/api/mapUrl.js index 77cb202..e45c1d5 100644 --- a/src/api/mapUrl.js +++ b/src/api/mapUrl.js @@ -5,6 +5,9 @@ export const GetUser = $HOST + '/user/getUser' +export const GetWasteGas = $HOST + '/wasteGas/getWasteGas' + export const getSolidWaste = $HOST + '/wasteSolid/getSolidWaste' +export const getSolidWasteBaseInfo = $HOST + '/wasteSolid/getSolidWasteBaseInfo' export const getCompany = $HOST + '/company/getCompany' diff --git a/src/api/request.js b/src/api/request.js index bceceb3..5db8fa9 100644 --- a/src/api/request.js +++ b/src/api/request.js @@ -2,19 +2,12 @@ import Qs from 'qs' export const QueryStoragePlaceListByCompanyAndName = (data = {}) => { - return $http.post('/EPInterface/DataService/EPMapService.asmx/QueryStoragePlaceListByCompanyAndName', Qs.stringify(data), { + return $http.post('http://10.246.162.140:8080/EPInterface/DataService/EPMapService.asmx/QueryStoragePlaceListByCompanyAndName', Qs.stringify(data), { headers: { 'Content-Type': 'application/json' } }) } -// export const QueryStoragePlaceListByCompanyAndName = (data = {}) => { -// return $http.get('http://xearth.cn:3000/wasteSolid/getSolidWaste', Qs.stringify(data), { -// headers: { -// 'Content-Type': 'application/json' -// } -// }) -// } export const FlueGas = (data = {}) => { return $http.post('/EPInterface/DataService/EPMapService.asmx/ObtainningConInfo', Qs.stringify(data), { headers: { diff --git a/src/components/BaseNav/PublicBounced/GasComponents/GasTabs.vue b/src/components/BaseNav/PublicBounced/GasComponents/GasTabs.vue index 1df30fe..3d868a1 100644 --- a/src/components/BaseNav/PublicBounced/GasComponents/GasTabs.vue +++ b/src/components/BaseNav/PublicBounced/GasComponents/GasTabs.vue @@ -1,10 +1,10 @@ <template> <div> <el-tabs v-model="activeName"> - <el-tab-pane label="鐢ㄦ埛绠$悊" name="first">鐢ㄦ埛绠$悊</el-tab-pane> - <el-tab-pane label="閰嶇疆绠$悊" name="second">閰嶇疆绠$悊</el-tab-pane> - <el-tab-pane label="瑙掕壊绠$悊" name="third">瑙掕壊绠$悊</el-tab-pane> - <el-tab-pane label="瀹氭椂浠诲姟琛ュ伩" name="fourth">瀹氭椂浠诲姟琛ュ伩</el-tab-pane> + <el-tab-pane label="瀹炴椂鏁版嵁" name="first">鐢ㄦ埛绠$悊</el-tab-pane> + <el-tab-pane label="鏃ユ暟鎹�" name="second">閰嶇疆绠$悊</el-tab-pane> + <el-tab-pane label="鏈堟暟鎹�" name="third">瑙掕壊绠$悊</el-tab-pane> + <el-tab-pane label="浜哄伐鏁版嵁" name="fourth">瀹氭椂浠诲姟琛ュ伩</el-tab-pane> </el-tabs> </div> </template> diff --git a/src/components/BaseNav/PublicBounced/PublicBounced.vue b/src/components/BaseNav/PublicBounced/PublicBounced.vue index d854b06..ff6bfb2 100644 --- a/src/components/BaseNav/PublicBounced/PublicBounced.vue +++ b/src/components/BaseNav/PublicBounced/PublicBounced.vue @@ -1,5 +1,5 @@ <template> - <div class="public-bounced" v-draw v-show="flag"> + <div class="public-bounced" v-if="flag"> <div class="public-bounced-title"> <span>{{ displayContent.Name }}</span> <i class="el-icon-circle-close" @click="closePopup"></i> @@ -7,9 +7,10 @@ <div class="public-bounced-content"> <div class="public-bounced-content-left"> <GasTab :displayContent="displayContent"></GasTab> - <!-- <PublicTable v-if="value === 'gufei'" :requestSolidWasteData="displayContent.StoragePlaceId"></PublicTable>--> - <PublicTable></PublicTable> - <!-- <GasECharts v-else></GasECharts>--> + <PublicTable v-if="value === 'gufei'" :requestSolidWasteData="displayContent.StoragePlaceId"></PublicTable> + <GasECharts v-else></GasECharts> + <!-- <PublicTable></PublicTable>--> + <!-- <GasECharts></GasECharts>--> </div> <div class="public-bounced-content-right"> <GasVideo></GasVideo> @@ -23,7 +24,7 @@ import '@/components/BaseNav/SolidWaste/directive/dir' import GasTab from '@components/BaseNav/PublicBounced/GasComponents/GasTab' import PublicTable from '@components/BaseNav/PublicBounced/GasComponents/PublicTable' -// import GasECharts from '@components/BaseNav/PublicBounced/GasComponents/GasECharts' +import GasECharts from '@components/BaseNav/PublicBounced/GasComponents/GasECharts' import GasVideo from '@components/BaseNav/PublicBounced/GasComponents/GasVideo' export default { @@ -31,7 +32,7 @@ components: { GasTab, PublicTable, - // GasECharts, + GasECharts, GasVideo }, data () { @@ -41,11 +42,19 @@ } }, methods: { - setData (data) { + setData (data, value) { + console.log(data) + console.log(value) this.displayContent = data this.flag = true - // this.value = value + this.value = value + console.log(this.flag) }, + // setData (data) { + // this.displayContent = data + // this.flag = true + // // this.value = value + // }, closePopup () { this.flag = false } @@ -86,16 +95,19 @@ .public-bounced-content { margin: 15px auto; display: flex; - align-items: center; + //align-items: center; justify-content: space-around; + padding: 10px; .public-bounced-content-left { - width: 48%; + flex: 3; height: 100%; + margin-right: 10px; } .public-bounced-content-right { - width: 48%; + flex: 2; + //width: 48%; height: 100%; } } diff --git a/src/components/BaseNav/SolidWaste/SolidWaste.js b/src/components/BaseNav/SolidWaste/SolidWaste.js index 7cedfa6..8babe45 100644 --- a/src/components/BaseNav/SolidWaste/SolidWaste.js +++ b/src/components/BaseNav/SolidWaste/SolidWaste.js @@ -1,7 +1,8 @@ import { QueryStoragePlaceListByCompanyAndName } from '@/api/request' // 灞曠ず鍥剧墖 -import defaultImg from '@assets/images/map-pages/basenav/solidwaste/voc.png' -import Setting from '@assets/images/map-pages/basenav/solidwaste/gf_green.png' + +import defaultImg from '../../../../public/assets/images/map/solidwaste/voc.png' +import setting from '../../../../public/assets/images/map/solidwaste/gf_green.png' // 搴曞浘涓氬姟灞曠ず鐐� class AddSolidWasteHelper { @@ -63,13 +64,9 @@ marker.on('click', (e) => { try { // console.log(e) - // console.log(this.map.getCenter()) - // console.log(this.map.setCenter([e.target.getLatLng().lat, e.target.getLatLng().lng])) - // this.map.flyTo([e.target.getLatLng().lat, e.target.getLatLng().lng]) - // this.map.panTo([e.target.getLatLng().lat, e.target.getLatLng().lng], 100) - this.setPanTo(e.target.getLatLng(), 250) + this.setPanTo(e.target.getLatLng(), 200) this.EffectOfPulse(e.target.getLatLng()) - // this.SolidWastePopup.setData(data[i], 'gufei') + this.SolidWastePopup.setData(data[i], 'gufei') return this.SolidWastePopup.$el } catch (error) { console.log(error) @@ -114,7 +111,7 @@ EffectOfChange = defaultImg this.EffectOfPulse(position, this.solidWasteMarkersLabels, this.SolidWasteLayerGroup) } else { - EffectOfChange = Setting + EffectOfChange = setting } return EffectOfChange } diff --git a/src/components/LayerController/logic/Sample.js b/src/components/LayerController/logic/Sample.js index 063123f..20fe78f 100644 --- a/src/components/LayerController/logic/Sample.js +++ b/src/components/LayerController/logic/Sample.js @@ -1,9 +1,45 @@ +/** + * 搴熸皵 + */ +const AnimalService = require('../service/AnimalService').default +const AjaxUtils = require('../../../utils/AjaxUtils').default + module.exports = function () { - this.init = (L) => { - console.log('sample init !!!') + /** + * 杩斿洖marker瀵硅薄鏁扮粍 + * @param L leaflet瀵硅薄 + */ + this.init = (layer, L) => { + this.animalService = new AnimalService({ L: L, layer: layer }) + AjaxUtils.get4JsonDataByUrl('http://10.246.162.140:8080/EPInterface/DataService/EPMapService.asmx/ObtainningConInfo', { + companyId: 3900100145, + id: '', + monType: 1, + userCode: 'wenchun.deng', + monDuration: '', + epName: '', + secdDeptId: '', + contrLevel: '', + dataStatus: '', + dataFlag: '', + runStatus: '', + emissTypeId: '' + }, function (res) { + const data = res.data.Result.DataInfo + for (let i = 0; i < data.length; i++) { + // 缁忕含搴� 浣嶇疆 + const positionX = data[i].Latitude + const positionY = data[i].Longitude + layer.addLayer(L.marker([positionX, positionY], { test: '122224' })) + } + }) } - this.clickListener = (e, data) => { - console.log('sample clickListener !!!') + this.bindTooltip = (layer) => { + return layer.options.test + } + + this.clickListener = (e) => { + this.animalService.pulseEffect(e.latlng) } } diff --git a/src/components/LayerController/logic/SolidWaste.js b/src/components/LayerController/logic/SolidWaste.js index dfc5841..fc55978 100644 --- a/src/components/LayerController/logic/SolidWaste.js +++ b/src/components/LayerController/logic/SolidWaste.js @@ -5,8 +5,12 @@ const defaultImg = '/assets/images/map/solidwaste/voc.png' const setting = '/assets/images/map/solidwaste/gf_green.png' +// 璇锋眰鎺ュ彛鏁版嵁 const mapApi = require('../../../api/mapApi').default +// 浣跨敤灏佽鏂规硶 const AnimalService = require('../service/AnimalService').default + +const publicBounced = require('../../BaseNav/PublicBounced/PublicBounced').default module.exports = function () { /** @@ -14,43 +18,48 @@ * @param L leaflet瀵硅薄 */ this.init = async (layer, L) => { - // const SolidWasteIcon = this.SolidWasteIcon() this.animalService = new AnimalService({ L: L, layer: layer }) - const res = await mapApi.getSolidWaste() - // console.log(res) - const data = res.Result.DataInfo || {} - for (let i = 0; i < data.length; i++) { + const result = await mapApi.getSolidWaste() + const getSolidWasteData = result.Result.DataInfo || {} + // 寰幆閬嶅巻鏁版嵁 鏍规嵁杩涜marker 鐨勫垱寤� + for (let i = 0; i < getSolidWasteData.length; i++) { // 缁忕含搴� 浣嶇疆 - const positionX = data[i].Latitude - const positionY = data[i].Longitude + const positionX = getSolidWasteData[i].Latitude + const positionY = getSolidWasteData[i].Longitude - // 瀹氫箟绫诲瀷 鐢ㄦ潵鍖哄垎鏁版嵁鐨勪笉鍚� - const judgeValue = data[i].StorageQty + // 瀹氫箟绫诲瀷 鐢ㄦ潵鍖哄垎鏁版嵁鐨勪笉鍚� 1.鎺ュ彛鎺ュ彛鏁版嵁鏉ヨ繘琛屾暟鎹殑鍒ゆ柇 2.鏍规嵁鏁版嵁绫诲瀷鐨勪笉鍚岋紝杩涜涓嶅悓绫诲瀷鐨勫浘鐗囨樉绀� + const judgeValue = getSolidWasteData[i].StorageQty var iconUrl = this.differentTypes(judgeValue) - const marker = L.marker.magic([positionX, positionY], { + const marker = L.marker([positionX, positionY], { + test: getSolidWasteData[i], icon: L.icon({ iconUrl: iconUrl, iconSize: [50, 50], iconAnchor: [25, 25] }) }) - layer.addLayer(marker) } } this.bindTooltip = (layer) => { - return '娴嬭瘯鍥哄簾' + return layer.options.test.Name } - this.clickListener = (e) => { + this.clickListener = async (e) => { this.animalService.pulseEffect(e.latlng) - console.log(e) - return this.PublicBounced.$el + const dataValue = { + StoragePlaceId: e.layer.options.test.StoragePlaceId + } + const result = await mapApi.getSolidWasteBaseInfo(dataValue) + // console.log(result) + const PublicBounced = window.Vue.extend(publicBounced) + const instance = new PublicBounced() + instance.setData(result, 'gufei') } // 涓嶅悓绫诲瀷鍥剧墖灏佽 @@ -63,8 +72,4 @@ } return effectOfChange } - // 鍥哄簾鐐瑰嚮杩涜鐨� 鍐呭鐨勮缃� - // SetSolidWasteContent (config, containerPopup) { - // this.SolidWastePopup = containerPopup - // } } diff --git a/src/components/LayerController/logic/WasteGas.js b/src/components/LayerController/logic/WasteGas.js index 2744f36..bf0a41c 100644 --- a/src/components/LayerController/logic/WasteGas.js +++ b/src/components/LayerController/logic/WasteGas.js @@ -2,40 +2,47 @@ * 搴熸皵 */ const AnimalService = require('../service/AnimalService').default -const AjaxUtils = require('../../../utils/AjaxUtils').default +// const AjaxUtils = require('../../../utils/AjaxUtils').default +// 鍖哄垎涓嶅悓绫诲瀷 浣跨敤涓嶅悓img +const ImgBlue = '/assets/images/map/exhaust/fq_blue.png' +const ImgGray = '/assets/images/map/exhaust/fq_gray.png' +const ImagGreen = '/assets/images/map/exhaust/fq_green.png' +const ImagBright = '/assets/images/map/exhaust/fq_bright_green.png' + +const mapApi = require('../../../api/mapApi').default module.exports = function () { /** * 杩斿洖marker瀵硅薄鏁扮粍 * @param L leaflet瀵硅薄 */ - this.init = (layer, L) => { + this.init = async (layer, L) => { this.animalService = new AnimalService({ L: L, layer: layer }) - AjaxUtils.get4JsonDataByUrl('http://10.246.162.140:8080/EPInterface/DataService/EPMapService.asmx/ObtainningConInfo', { - companyId: 3900100145, - id: '', - monType: 1, - userCode: 'wenchun.deng', - monDuration: '', - epName: '', - secdDeptId: '', - contrLevel: '', - dataStatus: '', - dataFlag: '', - runStatus: '', - emissTypeId: '' - }, function (res) { - const data = res.data.Result.DataInfo - for (let i = 0; i < data.length; i++) { - // 缁忕含搴� 浣嶇疆 - const positionX = data[i].Latitude - const positionY = data[i].Longitude - layer.addLayer(L.marker([positionX, positionY], {})) - } - }) + const res = await mapApi.GetWasteGas() + const data = res.Result.DataInfo || {} + console.log(data) + for (let i = 0; i < data.length; i++) { + // 缁忕含搴� 浣嶇疆 + const positionX = data[i].Latitude + const positionY = data[i].Longitude + // 瀹氫箟绫诲瀷 鐢ㄦ潵鍖哄垎鏁版嵁 + const ContrLevel = data[i].ContrLevel + var iconUrl = this.differentTypes(ContrLevel) + + const marker = L.marker.magic([positionX, positionY], { + icon: L.icon({ + iconUrl: iconUrl, + iconSize: [50, 50], + iconAnchor: [25, 25] + }) + }) + layer.addLayer(marker) + // layer.addLayer(L.marker([positionX, positionY], {})) + } } this.bindTooltip = (layer) => { + console.log(layer) return '娴嬭瘯搴熸皵' } @@ -43,4 +50,18 @@ console.log(e) this.animalService.pulseEffect(e.latlng) } + // 涓嶅悓绫诲瀷鍥剧墖灏佽 + this.differentTypes = (ContrLevel) => { + var effectOfChange + if (ContrLevel === 1) { + effectOfChange = ImgBlue + } else if (ContrLevel === 2) { + effectOfChange = ImagGreen + } else if (ContrLevel === 3) { + effectOfChange = ImagBright + } else { + effectOfChange = ImgGray + } + return effectOfChange + } } diff --git a/src/components/LayerController/modules/LcServiceLayer.vue b/src/components/LayerController/modules/LcServiceLayer.vue index ab589f0..87ea4a7 100644 --- a/src/components/LayerController/modules/LcServiceLayer.vue +++ b/src/components/LayerController/modules/LcServiceLayer.vue @@ -6,7 +6,7 @@ <div class="wms-panel"> <div v-for="item in serviceLayers" :key="item.code" class="layerbox"> <div><input type="checkbox" :name="'wmsLayer_'+item.code" :checked="item.checked" :value="item.code" - @change="swAllLayers(item)"/>{{ item.name }} <span @click="swFilter(item)" + @change="swAllLayers(item)"/>{{ item.name }} <span @click="swFilter(item)" v-if="item.childLayer" class="btn-filter">杩囨护</span> </div> <div class="layerbox-item"> @@ -14,8 +14,7 @@ :name="'wmsSublayers_'+item.code+'_'+itm.code" :checked="itm.checked" :value="itm.code" - @change="swWmsLayer(itm)"/>{{ - itm.name }} + @change="swWmsLayer(itm)"/>{{ itm.name }} </div> </div> </div> diff --git a/src/components/LayerController/service/BusiLayerService.js b/src/components/LayerController/service/BusiLayerService.js index d63962e..e8f8d03 100644 --- a/src/components/LayerController/service/BusiLayerService.js +++ b/src/components/LayerController/service/BusiLayerService.js @@ -21,7 +21,7 @@ var busiLayer = new BusiLayer() busiLayer.init(layer, this.L) if (busiLayer.bindTooltip) { - layer.bindTooltip(busiLayer.bindTooltip(layer)) + layer.bindTooltip(busiLayer.bindTooltip) } // 璋冪敤click浜嬩欢 if (busiLayer.clickListener) { diff --git a/src/conf/MapConfig.js b/src/conf/MapConfig.js index d1ece05..ea8b7fb 100644 --- a/src/conf/MapConfig.js +++ b/src/conf/MapConfig.js @@ -1,9 +1,12 @@ 锘縤mport * as L from 'leaflet' import TDT from './TDT' -import { LayerSewersLine, LayerSewersPoint } from './layers/LayerSewers' +import { LayerSewersPoint } from './layers/LayerSewers' import { LayerWasteWater } from './layers/LayerWasteWater' import { LayerSolidWaste } from './layers/LayerSolidWaste' import { LayerWasteGas } from './layers/LayerWasteGas' +import { LayerPipeLine } from './layers/LayerPipeLine' +import { LayerArea } from './layers/LayerArea' +import { LayerPk } from './layers/LayerPk' const curWwwPath = window.document.location.href const pathname = window.document.location.pathname @@ -25,8 +28,8 @@ minZoom: 3, maxZoom: 18, // center: [26, 104], - // center: [38.828558921813965, 117.41676807403564], - center: [29.769515991210938, 107.03567504882812], + center: [38.828558921813965, 117.41676807403564], + // center: [29.454345703125, 113.40362548828125], zoom: 14, worldCopyJump: true, inertia: true, @@ -43,7 +46,7 @@ IntranetBaseMaps: TDT.intranet, InternetBaseMaps: TDT.internet, Layers: { - LayerSewersLine: [LayerSewersLine, LayerWasteWater, LayerWasteGas, LayerSolidWaste], + LayerSewersLine: [LayerPipeLine, LayerArea, LayerPk, LayerWasteWater, LayerWasteGas, LayerSolidWaste], layerSewersPoint: LayerSewersPoint } // 姹¢洦姘村浘灞傞厤缃� } diff --git a/src/conf/layers/LayerArea.js b/src/conf/layers/LayerArea.js new file mode 100644 index 0000000..b4dd2b9 --- /dev/null +++ b/src/conf/layers/LayerArea.js @@ -0,0 +1,36 @@ +/** + * 鍖哄煙 + */ +export const LayerArea = { + code: 'sewersArea', + name: '鍖哄煙淇℃伅', + checked: true, + layers: [ + { + code: 'sewersAreaGs', + name: '鍏徃', + sname: '鍏徃', // 琛ㄥ悕 + checked: true, // 榛樿閫変腑鐘舵�� + url: '?TYPENAME=绠$綉', + minZoom: 10, // 鍦ㄦ寚瀹氱骇鍒樉绀� + childLayer: 'fsss,hbss' // 鍏宠仈PointLayers + }, + { + code: 'sewersAreaMt', + name: '鐮佸ご', + sname: '鐮佸ご', + checked: true, // 榛樿閫変腑鐘舵�� + wfs: '?TYPENAME=鍚补姹℃按', + minZoom: 10, + childLayer: 'fsss,hbss' // 鍏宠仈PointLayers + }, + { + code: 'sewersAreaZz', + name: '瑁呯疆鍖�', + sname: '瑁呯疆鍖�', + checked: true, // 榛樿閫変腑鐘舵�� + wfs: '?TYPENAME=鍚洂姹℃按', + minZoom: 10 + } + ] +} diff --git a/src/conf/layers/LayerFsss.js b/src/conf/layers/LayerFsss.js new file mode 100644 index 0000000..ce4269c --- /dev/null +++ b/src/conf/layers/LayerFsss.js @@ -0,0 +1,79 @@ +/** + * 鍖哄煙 + */ +const APP_GIS_HOST_2 = 'http://xearth.cn:8088' +const WFS_URL = APP_GIS_HOST_2 + '/server/ogcserver/PipeLine/wfs' +export const LayerFsss = { + code: 'sewersFsss', + name: '闄勫睘璁炬柦', + checked: false, // 榛樿閫変腑鐘舵�� + layers: [ + { + code: 'fourlink', + name: '鍥涢��', + sname: '鍥涢��', + checked: true, + minZoom: 10, + wfs: WFS_URL + '?TYPENAME=鍥涢��', + icon: 'sewers/鍥涢��.png' + }, + { + code: 'tee', + name: '涓夐��', + sname: '涓夐��', + checked: false, + minZoom: 10, + wfs: WFS_URL + '?TYPENAME=涓夐��', + icon: 'sewers/涓夐��.png' + }, + { + code: 'piperack', + name: '绠℃灦(澧�)', + sname: 'PipeRack', + minZoom: 10, + wfs: WFS_URL + '?TYPENAME=绠℃灦', + checked: false + }, + { + code: 'pipegallery', + name: '绠″粖(甯�)', + sname: 'PipeGallery', + minZoom: 10, + wfs: WFS_URL + '?TYPENAME=绠″粖', + checked: false + }, + { + code: 'pipesegment', + name: '娴佸悜', + sname: 'ywslx', + wfs: WFS_URL + '?TYPENAME=娴佸悜', + checked: false + }, + { + code: 'pipeline', + name: '绠$綉', + minZoom: 10, + sname: 'pipeline', + wfs: WFS_URL + '?TYPENAME=绠$綉', + checked: false + }, + { + code: 'valve', + name: '闃�闂�', + minZoom: 10, + sname: 'valve', + checked: false, + wfs: WFS_URL + '?TYPENAME=闃�闂�', + icon: 'sewers/闃�闂�.png' + }, + { + code: 'elbow', + name: '寮ご', + sname: 'Elbow', + minZoom: 10, + checked: false, + wfs: WFS_URL + '?TYPENAME=寮ご', + icon: 'sewers/寮ご.png' + } + ] +} diff --git a/src/conf/layers/LayerHbss.js b/src/conf/layers/LayerHbss.js new file mode 100644 index 0000000..c77b633 --- /dev/null +++ b/src/conf/layers/LayerHbss.js @@ -0,0 +1,79 @@ +/** + * 鍖哄煙 + */ +const APP_GIS_HOST_2 = 'http://xearth.cn:8088' +const WFS_URL = APP_GIS_HOST_2 + '/server/ogcserver/PipeLine/wfs' +export const LayerFsss = { + code: 'sewersFsss', + name: '鐜繚璁炬柦', + checked: false, // 榛樿閫変腑鐘舵�� + layers: [ + { + code: 'fourlink', + name: '鍥涢��', + sname: '鍥涢��', + checked: true, + minZoom: 10, + wfs: WFS_URL + '?TYPENAME=鍥涢��', + icon: 'sewers/鍥涢��.png' + }, + { + code: 'tee', + name: '涓夐��', + sname: '涓夐��', + checked: false, + minZoom: 10, + wfs: WFS_URL + '?TYPENAME=涓夐��', + icon: 'sewers/涓夐��.png' + }, + { + code: 'piperack', + name: '绠℃灦(澧�)', + sname: 'PipeRack', + minZoom: 10, + wfs: WFS_URL + '?TYPENAME=绠℃灦', + checked: false + }, + { + code: 'pipegallery', + name: '绠″粖(甯�)', + sname: 'PipeGallery', + minZoom: 10, + wfs: WFS_URL + '?TYPENAME=绠″粖', + checked: false + }, + { + code: 'pipesegment', + name: '娴佸悜', + sname: 'ywslx', + wfs: WFS_URL + '?TYPENAME=娴佸悜', + checked: false + }, + { + code: 'pipeline', + name: '绠$綉', + minZoom: 10, + sname: 'pipeline', + wfs: WFS_URL + '?TYPENAME=绠$綉', + checked: false + }, + { + code: 'valve', + name: '闃�闂�', + minZoom: 10, + sname: 'valve', + checked: false, + wfs: WFS_URL + '?TYPENAME=闃�闂�', + icon: 'sewers/闃�闂�.png' + }, + { + code: 'elbow', + name: '寮ご', + sname: 'Elbow', + minZoom: 10, + checked: false, + wfs: WFS_URL + '?TYPENAME=寮ご', + icon: 'sewers/寮ご.png' + } + ] +} diff --git a/src/conf/layers/LayerPipeLine.js b/src/conf/layers/LayerPipeLine.js new file mode 100644 index 0000000..c90a7f4 --- /dev/null +++ b/src/conf/layers/LayerPipeLine.js @@ -0,0 +1,77 @@ +/** + * 绠$綉 + */ +const APP_GIS_HOST_2 = 'http://xearth.cn:8088' +const WFS_URL = APP_GIS_HOST_2 + '/server/ogcserver/PipeLine/wfs' + +export const LayerPipeLine = { + code: 'sewersPipeLine', + name: '绠$嚎', + checked: true, + layers: [ + { + code: 'rainline', + name: '闆ㄦ按绾�', + sname: '闆ㄦ按绾�', + checked: true, + wfs: WFS_URL + '?TYPENAME=绠$綉', + minZoom: 10 // 鍦ㄦ寚瀹氱骇鍒樉绀� + }, + { + code: 'accidentline', + name: '浜嬫晠姘寸嚎', + sname: '浜嬫晠姘�', + checked: true, // 榛樿閫変腑鐘舵�� + wfs: WFS_URL + '?TYPENAME=浜嬫晠姘�', + minZoom: 10 + }, + { + code: 'oilline', + name: '鍚补姹℃按绾�', + sname: '鍚补姹℃按', + checked: true, // 榛樿閫変腑鐘舵�� + wfs: WFS_URL + '?TYPENAME=鍚补姹℃按', + minZoom: 10 + }, + { + code: 'saltline', + name: '鍚洂姹℃按绾�', + sname: '鍚洂姹℃按', + checked: true, // 榛樿閫変腑鐘舵�� + wfs: WFS_URL + '?TYPENAME=鍚洂姹℃按', + minZoom: 10 + }, + { + code: 'alkaliline', + name: '鍚⒈姹℃按绾�', + sname: '鍚⒈姹℃按', + checked: true, // 榛樿閫変腑鐘舵�� + wfs: WFS_URL + '?TYPENAME=鍚⒈姹℃按', + minZoom: 10 + }, + { + code: 'lifeline', + name: '鐢熸椿姹℃按', + sname: '鐢熸椿姹℃按', + checked: true, // 榛樿閫変腑鐘舵�� + wfs: WFS_URL + '?TYPENAME=鐢熸椿姹℃按', + minZoom: 10 + }, + { + code: 'purifyline', + name: '鍑�鍖栨按绾�', + sname: '鍑�鍖栨按', + checked: true, // 榛樿閫変腑鐘舵�� + wfs: WFS_URL + '?TYPENAME=鍑�鍖栨按', + minZoom: 10 + }, + { + code: 'loopline', + name: '寰幆姘寸嚎', + sname: '寰幆姘�', + checked: true, // 榛樿閫変腑鐘舵�� + wfs: WFS_URL + '?TYPENAME=寰幆姘�', + minZoom: 10 + } + ] +} diff --git a/src/conf/layers/LayerPk.js b/src/conf/layers/LayerPk.js new file mode 100644 index 0000000..ab13cdf --- /dev/null +++ b/src/conf/layers/LayerPk.js @@ -0,0 +1,26 @@ +/** + * 鎺掑彛 + */ +export const LayerPk = { + code: 'sewersPk', + name: '鎺掑彛', + checked: true, + layers: [ + { + code: 'sewersNpk', + name: '鍐呮帓鍙�', + sname: '鍐呮帓鍙�', + checked: true, + wfs: '?TYPENAME=绠$綉', + minZoom: 10 // 鍦ㄦ寚瀹氱骇鍒樉绀� + }, + { + code: 'sewersWpk', + name: '澶栨帓鍙�', + sname: '澶栨帓鍙�', + checked: true, // 榛樿閫変腑鐘舵�� + wfs: '?TYPENAME=浜嬫晠姘�', + minZoom: 10 + } + ] +} diff --git a/src/main.js b/src/main.js index 653b668..4c254ad 100644 --- a/src/main.js +++ b/src/main.js @@ -23,6 +23,7 @@ Vue.prototype.L = L Vue.prototype.$config = appConfig Vue.prototype.$echarts = echarts // 鎸傝浇echarts +window.Vue = Vue // 娉ㄥ唽鎸囦护7 // registerDirectives(Vue) diff --git a/src/utils/axios.js b/src/utils/axios.js index d42baf4..8324abe 100644 --- a/src/utils/axios.js +++ b/src/utils/axios.js @@ -83,7 +83,7 @@ // 鍒涘缓axios瀹炰緥 const Service = axios.create({ - timeout: 1000 + timeout: 5000 }) const CancelToken = axios.CancelToken diff --git a/src/views/MapTemplate.vue b/src/views/MapTemplate.vue index dd708d9..f5d03d2 100644 --- a/src/views/MapTemplate.vue +++ b/src/views/MapTemplate.vue @@ -16,7 +16,7 @@ <summary-sheets></summary-sheets> <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="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> @@ -39,6 +39,7 @@ import LegendPanel from '@components/panel/LegendPanel' import Enterprise from '../components/table/enterprise' // 搴曞浘涓氬姟js閫昏緫 +import AddSolidWasteHelper from '@components/BaseNav/SolidWaste/SolidWaste' import AddWasteWaterHelper from '@components/BaseNav/WasteWater/WasteWater' import AddGasHelper from '@components/BaseNav/flueGas/flueGas' // // 鍏叡灞曠ず鏁版嵁 @@ -82,6 +83,18 @@ }) }, methods: { + ChangeState () { + const data = { + companyId: 3900100145, + userCode: 'wenchun.deng', + name: '', + marginWarr: '', + longDayWarr: '' + } + const AddSolidWaste = new AddSolidWasteHelper({ map: this.map }) + AddSolidWaste.requestData(data) + AddSolidWaste.SetSolidWasteContent(this.config, this.$refs.PublicBounced) + }, AddGasHelper () { const data = { companyId: 3900100145, @@ -153,6 +166,7 @@ this.vectorLayerHelper = Sgis.initVectorLayersHelper(this.map) // 鍒濆鍖栧姩鎬佽绱犲浘灞傚姪鎵� this.vectorLayerHelper.initVectorLayers(this.config) + this.ChangeState() // this.AddGasHelper() // this.ChangeWaterState() -- Gitblit v1.8.0