From d6bb6c4485ea9134caf48ef09424594e1a26b30c Mon Sep 17 00:00:00 2001 From: 徐旺旺 <11530253@qq.com> Date: 星期四, 01 四月 2021 09:33:51 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/develop' into develop --- src/components/BaseNav/SolidWaste/SolidWaste.js | 2 src/components/LayerController/logic/WasteGas.js | 8 + src/components/panel/ToolBoxPanel.vue | 19 ---- src/api/mapApi.js | 8 + src/components/BaseNav/PublicBounced/GasComponents/PublicTable.vue | 11 +- src/components/LayerController/logic/WasteWater.js | 4 src/views/MapTemplate.vue | 10 +- src/components/BaseNav/PublicBounced/GasComponents/GasTab.vue | 60 ++++++++++----- src/api/mapUrl.js | 7 - src/components/BaseNav/PublicBounced/PublicBounced.vue | 39 ++++----- src/components/LayerController/logic/SolidWaste.js | 16 +++- 11 files changed, 98 insertions(+), 86 deletions(-) diff --git a/src/api/mapApi.js b/src/api/mapApi.js index cebf2b3..8917ca0 100644 --- a/src/api/mapApi.js +++ b/src/api/mapApi.js @@ -12,15 +12,17 @@ getUser (data) { return axios.get(mapUrl.GetUser, data) }, + // 鍥哄簾鐐� getSolidWaste (data) { return axios.get(mapUrl.getSolidWaste, data) }, - getWasteWater (data) { - return axios.get(mapUrl.getWasteWater, data) - }, + // 鍥哄簾鐐瑰熀鏈俊鎭� getSolidWasteBaseInfo (data) { return axios.get(mapUrl.getSolidWasteBaseInfo, data) }, + getWasteWater (data) { + return axios.get(mapUrl.getWasteWater, data) + }, GetWasteGas (data) { return axios.get(mapUrl.GetWasteGas, data) }, diff --git a/src/api/mapUrl.js b/src/api/mapUrl.js index 1b986df..d956576 100644 --- a/src/api/mapUrl.js +++ b/src/api/mapUrl.js @@ -5,12 +5,11 @@ export const GetUser = $HOST + '/user/getUser' +export const getSolidWaste = $HOST + '/wasteSolid/getSolidWaste' +export const getSolidWasteBaseInfo = $HOST + '/wasteSolid/getSolidWasteBaseInfo' + export const GetWasteGas = $HOST + '/wasteGas/getWasteGas' -export const getSolidWaste = $HOST + '/wasteSolid/getSolidWaste' - export const getWasteWater = $HOST + '/wasteWater/getWasteWater' - -export const getSolidWasteBaseInfo = $HOST + '/wasteSolid/getSolidWasteBaseInfo' export const getCompany = $HOST + '/company/getCompany' diff --git a/src/components/BaseNav/PublicBounced/GasComponents/GasTab.vue b/src/components/BaseNav/PublicBounced/GasComponents/GasTab.vue index a4c6dbd..997164f 100644 --- a/src/components/BaseNav/PublicBounced/GasComponents/GasTab.vue +++ b/src/components/BaseNav/PublicBounced/GasComponents/GasTab.vue @@ -9,14 +9,14 @@ <div class="main"> <div class="main-matter"> <el-row type="flex" class="row-bg row-item-one" justify="space-around"> - <el-col :span="12">鐩戞祴鐐瑰悕绉�:{{ displayContent.Name }}</el-col> - <el-col :span="12">鐢熶骇鍗曚綅:{{ displayContent.DeptSname }}</el-col> - <el-col :span="12">鎺掓斁绫诲瀷鍔犺浇:{{ displayContent.EmissTypeName }}</el-col> + <el-col :span="12">鐩戞祴鐐瑰悕绉�:{{ displayContentTab2.StoragePlaceName }}</el-col> + <el-col :span="12">鐢熶骇鍗曚綅:{{ displayContentTab2.StoragePlaceName }}</el-col> + <el-col :span="12">鎺掓斁绫诲瀷鍔犺浇:{{ displayContentTab2.DesignFloorArea }}</el-col> </el-row> <el-row type="flex" class="row-bg" justify="space-around"> - <el-col :span="12">鎺掓斁鍘诲悜:{{ displayContent.EmissTypeDirectName }}</el-col> - <el-col :span="12">鎺у埗绾у埆鍚嶇О:{{ displayContent.ContrLevelShowName }}</el-col> - <el-col :span="12">鍐�/澶栨帓鍙�:{{ displayContent.OrOutPortName }}</el-col> + <el-col :span="12">鎺掓斁鍘诲悜:{{ displayContentTab2.StorageQty }}</el-col> + <el-col :span="12">鎺у埗绾у埆鍚嶇О:{{ displayContentTab2.SurplusFloorArea }}</el-col> + <el-col :span="12">鍐�/澶栨帓鍙�:{{ displayContentTab2.StorageDate }}</el-col> </el-row> </div> </div> @@ -26,9 +26,18 @@ <script> export default { name: 'GasTable', - props: ['displayContent'], + props: ['displayContentTab'], data () { - return {} + return { + displayContentTab2: [] + } + }, + mounted () { + this.$nextTick(() => { + this.displayContentTab.forEach(item => { + this.displayContentTab2 = item + }) + }) } } </script> @@ -38,25 +47,30 @@ .win { position: relative; margin-bottom: 13px; - background-color: rgba(33, 41, 69,0.9); + background-color: rgba(33, 41, 69, 0.9); } + .main { width: 100%; height: 100%; - .main-matter{ + + .main-matter { font-size: 13px; font-weight: normal; padding: 10px 6px; border: 1px solid #396d83; - .row-item-one{ + + .row-item-one { margin-bottom: 7px; } + .el-row { width: 100%; color: #00d0f9; display: flex; font-size: 12px !important; - .el-col{ + + .el-col { flex: 1; width: 100%; background-color: #243a55;; @@ -64,40 +78,46 @@ line-height: 28px; margin-left: 6px; border-radius: 4px; - &:nth-child(1){ - margin-left:0; + + &:nth-child(1) { + margin-left: 0; } } } } } -.border_corner{ + +.border_corner { z-index: 999; position: absolute; width: 10px; height: 10px; - background: rgba(0,0,0,0); + background: rgba(0, 0, 0, 0); border: 1.5px solid #47d5ea; } -.border_corner_left_top{ + +.border_corner_left_top { top: 0; left: 0; border-right: none; border-bottom: none; } -.border_corner_right_top{ + +.border_corner_right_top { top: 0; right: 0; border-left: none; border-bottom: none; } -.border_corner_left_bottom{ + +.border_corner_left_bottom { bottom: 0; left: 0; border-right: none; border-top: none; } -.border_corner_right_bottom{ + +.border_corner_right_bottom { bottom: 0; right: 0; border-left: none; diff --git a/src/components/BaseNav/PublicBounced/GasComponents/PublicTable.vue b/src/components/BaseNav/PublicBounced/GasComponents/PublicTable.vue index dbb752a..a6b9aa8 100644 --- a/src/components/BaseNav/PublicBounced/GasComponents/PublicTable.vue +++ b/src/components/BaseNav/PublicBounced/GasComponents/PublicTable.vue @@ -38,6 +38,10 @@ date: '2016-05-02', name: '鐜嬪皬铏�', address: '涓婃捣甯傛櫘闄�鍖�' + }, { + date: '2016-05-02', + name: '鐜嬪皬铏�', + address: '涓婃捣甯傛櫘闄�鍖�' }] } }, @@ -64,13 +68,10 @@ .main { width: 100%; height: 100%; - //padding: 10px 6px; - //border: 1px solid #396d83; + .main-video { - //padding: 5px; - //border: 1px solid #396d83; width: 100%; - min-height: 165px; + min-height: 195px; video { width: 100%; diff --git a/src/components/BaseNav/PublicBounced/PublicBounced.vue b/src/components/BaseNav/PublicBounced/PublicBounced.vue index c3852d2..07a38cf 100644 --- a/src/components/BaseNav/PublicBounced/PublicBounced.vue +++ b/src/components/BaseNav/PublicBounced/PublicBounced.vue @@ -1,17 +1,16 @@ <template> <div class="public-bounced" v-draw v-if="flag"> <div class="public-bounced-title"> - <span>{{ displayContent.Name }}</span> + <span>{{ displayContentTitle }}</span> <i class="el-icon-circle-close" @click="closePopup"></i> </div> <div class="public-bounced-content"> <div class="public-bounced-content-left"> - <GasTab :displayContent="displayContent"></GasTab> -<!-- <div class="public-bounced-content-left-bottom">--> - <PublicTable v-if="value === 'gufei'" :requestSolidWasteData="displayContent.StoragePlaceId"></PublicTable> -<!-- <GasECharts v-else></GasECharts>--> - <GasTabs v-else></GasTabs> -<!-- </div>--> + <GasTab :displayContentTab="displayContentTab" ></GasTab> + <div class="public-bounced-content-left-bottom"> + <PublicTable v-if="value === 'gufei'"></PublicTable> + <GasECharts v-else></GasECharts> + </div> </div> <div class="public-bounced-content-right"> <GasVideo></GasVideo> @@ -25,41 +24,35 @@ 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' -import GasTabs from './GasComponents/GasTabs' +// import GasTabs from './GasComponents/GasTabs' export default { name: 'PublicBounced', components: { - GasTabs, GasTab, PublicTable, - // GasECharts, - // PublicTable, - // GasECharts, + GasECharts, GasVideo }, data () { return { - displayContent: [], + displayContentTitle: '', + displayContentTab: '', flag: false } }, methods: { setData (data, value) { - console.log(data) - console.log(value) - this.displayContent = data + data.forEach((item, index) => { + // console.log(item.StoragePlaceName) + this.displayContentTitle = item.StoragePlaceName + }) + this.displayContentTab = data this.flag = true this.value = value - console.log(this.flag) }, - // setData (data) { - // this.displayContent = data - // this.flag = true - // // this.value = value - // }, closePopup () { this.flag = false } diff --git a/src/components/BaseNav/SolidWaste/SolidWaste.js b/src/components/BaseNav/SolidWaste/SolidWaste.js index 8babe45..5ce22d5 100644 --- a/src/components/BaseNav/SolidWaste/SolidWaste.js +++ b/src/components/BaseNav/SolidWaste/SolidWaste.js @@ -63,7 +63,7 @@ // 鐐瑰嚮 浜嬩欢 marker.on('click', (e) => { try { - // console.log(e) + console.log(e.target.getLatLng()) this.setPanTo(e.target.getLatLng(), 200) this.EffectOfPulse(e.target.getLatLng()) this.SolidWastePopup.setData(data[i], 'gufei') diff --git a/src/components/LayerController/logic/SolidWaste.js b/src/components/LayerController/logic/SolidWaste.js index e12ae43..37b4b15 100644 --- a/src/components/LayerController/logic/SolidWaste.js +++ b/src/components/LayerController/logic/SolidWaste.js @@ -1,6 +1,7 @@ /** * 鍥哄簾 */ + // 鍖哄垎涓嶅悓绫诲瀷 浣跨敤涓嶅悓img const defaultImg = '/assets/images/map/solidwaste/voc.png' const setting = '/assets/images/map/solidwaste/gf_green.png' @@ -50,10 +51,17 @@ return layer.options.test.Name } - this.clickListener = async (e) => { + this.clickListener = (e) => { + // 鐐瑰嚮marker鐨刾ulse()鍏夋尝 this.animalService.pulseEffect(e.latlng) + /* flyTo()寮瑰嚭妗嗗钩绉讳簨浠� */ // this.setPanTo(e.latlng, 200) - console.log(e) + /* 鐐瑰嚮鏁版嵁鐨勬帴鍙h姹� */ + this.requestSolidWasteData(e).then(e) + } + + // 鏍规嵁鐐瑰嚮涓嶅悓鏁版嵁 杩涜鎺ュ彛鐨勬暟鎹姹� + this.requestSolidWasteData = async (e) => { const dataValue = { StoragePlaceId: e.layer.options.test.StoragePlaceId } @@ -63,10 +71,10 @@ const instance = new PublicBounced() instance.$mount() document.body.appendChild(instance.$el) - instance.setData(result, 'gufei') + instance.setData(result.Result.DataInfo, 'gufei') } - // panTo + // flayTo() // this.setPanTo = (pos, value) => { // var position = pos // position = this.map.latLngToLayerPoint(position) diff --git a/src/components/LayerController/logic/WasteGas.js b/src/components/LayerController/logic/WasteGas.js index 944cfb7..99fee38 100644 --- a/src/components/LayerController/logic/WasteGas.js +++ b/src/components/LayerController/logic/WasteGas.js @@ -18,10 +18,13 @@ * @param L leaflet瀵硅薄 */ this.init = async (layer, L) => { - this.animalService = new AnimalService({ L: L, layer: layer }) + this.animalService = new AnimalService({ + L: L, + layer: layer + }) const res = await mapApi.GetWasteGas() const data = res.Result.DataInfo || {} - console.log(data) + // console.log(data) for (let i = 0; i < data.length; i++) { // 缁忕含搴� 浣嶇疆 const positionX = data[i].Latitude @@ -44,7 +47,6 @@ } this.bindTooltip = (layer) => { - console.log(layer) return layer.options.test.Name } diff --git a/src/components/LayerController/logic/WasteWater.js b/src/components/LayerController/logic/WasteWater.js index a5ca19f..8b66aa9 100644 --- a/src/components/LayerController/logic/WasteWater.js +++ b/src/components/LayerController/logic/WasteWater.js @@ -18,9 +18,9 @@ layer: layer }) const res = await mapApi.getWasteWater() - console.log(res) + // console.log(res) const data = res.Result.DataInfo - console.log(data) + // console.log(data) for (let i = 0; i < data.length; i++) { // 缁忕含搴� 浣嶇疆 const positionX = data[i].Latitude diff --git a/src/components/panel/ToolBoxPanel.vue b/src/components/panel/ToolBoxPanel.vue index f65eb9c..79b4693 100644 --- a/src/components/panel/ToolBoxPanel.vue +++ b/src/components/panel/ToolBoxPanel.vue @@ -1,5 +1,5 @@ <template> - <div class="left-top-toolbox-panel" v-if="toolBoxPanelVisible"> + <div class="left-top-toolbox-panel"> <div class="specific-tools"> <el-button :class="selectGroup === true ?'active-button':''" class="el-button-choice" @mouseover.enter.native="changeSelectMouse"> @@ -101,7 +101,6 @@ currentBaseMapCode: 'tianditu_img', basemapList: [], selectGroup: false, - toolBoxPanelVisible: false, drawLayer: null, drawLayerArray: [], map: null, @@ -290,26 +289,14 @@ if (this.drawLayer == null) { this.drawLayer = this.L.layerGroup().addTo(this.map) } - // this.isShow[index] = !this.isShow[index] - // this.isShow[index - 1] = !this.isShow[index - 1] - // if (this.checkbutton === index) { - // this.checked = !this.checked - // this.Selecd = -1 - // } else { - // if (this.checkbutton === -1) { - // this.checked = !this.checked - // } else { - // this.checked = true - // } - // } - // this.checkbutton = index - // console.log(this.isShow[index - 1]) + this.active = index console.log(this.basemapList) for (let i = 0; i < this.isShow.length; i++) { if (i !== index) { this.isShow[i] = false } } + // debugger this.isShow[index] = !this.isShow[index] this.isShow[index] ? (this.active = index) : (this.active = '') }, diff --git a/src/views/MapTemplate.vue b/src/views/MapTemplate.vue index ce51726..5463f63 100644 --- a/src/views/MapTemplate.vue +++ b/src/views/MapTemplate.vue @@ -16,9 +16,9 @@ <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="ChangeWaterState" class="Waste-water">搴熸按</el-button>--> -<!-- <el-button type="primary" @click="AddGasHelper" class="flue-gas">搴熸皵</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> @@ -133,6 +133,7 @@ init () { const mapcontainer = this.$refs.rootmap this.map = Sgis.initMap(mapcontainer) + this.$refs.toolBox.map = this.map window.popupComp = this.$refs.popup var layerFactory = new LayerFactory({ @@ -152,10 +153,9 @@ this.vectorLayerHelper = Sgis.initVectorLayersHelper(this.map) // 鍒濆鍖栧姩鎬佽绱犲浘灞傚姪鎵� this.vectorLayerHelper.initVectorLayers(this.config) - // this.ChangeState() // this.AddGasHelper() // this.ChangeWaterState() - this.$refs.toolBox.init(this.map) + this.saveMapStatus() // this.setMapObj(this.mapObj) // this.setBasemapHelper(this.basemapHelper) -- Gitblit v1.8.0