From 55e6c16ceea8b2f2f6d7eb797e05928fb3f92f3b Mon Sep 17 00:00:00 2001 From: chenzeping <ChenZeping02609@163.com> Date: 星期三, 31 三月 2021 18:57:04 +0800 Subject: [PATCH] 工具栏问题修改 --- src/components/LayerController/logic/WasteGas.js | 11 ++- src/components/panel/ToolBoxPanel.vue | 22 +----- src/components/BaseNav/PublicBounced/GasComponents/PublicTable.vue | 10 ++- src/views/MapTemplate.vue | 1 src/components/BaseNav/PublicBounced/GasComponents/GasTab.vue | 51 ++++++++++------ src/components/BaseNav/PublicBounced/PublicBounced.vue | 23 +++---- src/components/LayerController/logic/SolidWaste.js | 16 ++-- 7 files changed, 67 insertions(+), 67 deletions(-) diff --git a/src/components/BaseNav/PublicBounced/GasComponents/GasTab.vue b/src/components/BaseNav/PublicBounced/GasComponents/GasTab.vue index a4c6dbd..1065f96 100644 --- a/src/components/BaseNav/PublicBounced/GasComponents/GasTab.vue +++ b/src/components/BaseNav/PublicBounced/GasComponents/GasTab.vue @@ -9,24 +9,24 @@ <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">鐩戞祴鐐瑰悕绉�:{{ displayContentTab.Name }}</el-col> + <el-col :span="12">鐢熶骇鍗曚綅:{{ displayContentTab.DeptSname }}</el-col> + <el-col :span="12">鎺掓斁绫诲瀷鍔犺浇:{{ displayContentTab.EmissTypeName }}</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">鎺掓斁鍘诲悜:{{ displayContentTab.EmissTypeDirectName }}</el-col> + <el-col :span="12">鎺у埗绾у埆鍚嶇О:{{ displayContentTab.ContrLevelShowName }}</el-col> + <el-col :span="12">鍐�/澶栨帓鍙�:{{ displayContentTab.OrOutPortName }}</el-col> </el-row> </div> </div> - </div> + </div> </template> <script> export default { name: 'GasTable', - props: ['displayContent'], + props: ['displayContentTab'], data () { return {} } @@ -38,25 +38,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 +69,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 8f4e691..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,12 +68,10 @@ .main { width: 100%; height: 100%; - //padding: 10px 6px; - //border: 1px solid #396d83; + .main-video { - //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 e0df2bb..73a8df7 100644 --- a/src/components/BaseNav/PublicBounced/PublicBounced.vue +++ b/src/components/BaseNav/PublicBounced/PublicBounced.vue @@ -1,14 +1,14 @@ <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> + <GasTab :displayContentTab="displayContentTab" ></GasTab> <div class="public-bounced-content-left-bottom"> - <PublicTable v-if="value === 'gufei'" :requestSolidWasteData="displayContent.StoragePlaceId"></PublicTable> + <PublicTable v-if="value === 'gufei'"></PublicTable> <GasECharts v-else></GasECharts> </div> </div> @@ -38,24 +38,21 @@ }, 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/LayerController/logic/SolidWaste.js b/src/components/LayerController/logic/SolidWaste.js index e12ae43..efb3b43 100644 --- a/src/components/LayerController/logic/SolidWaste.js +++ b/src/components/LayerController/logic/SolidWaste.js @@ -63,17 +63,17 @@ const instance = new PublicBounced() instance.$mount() document.body.appendChild(instance.$el) - instance.setData(result, 'gufei') + instance.setData(result.Result.DataInfo, 'gufei') } // panTo - // this.setPanTo = (pos, value) => { - // var position = pos - // position = this.map.latLngToLayerPoint(position) - // position.y += value - // position = this.map.layerPointToLatLng(position) - // this.map.flyTo(position) - // } + this.setPanTo = (pos, value) => { + var position = pos + position = this.layer.latLngToLayerPoint(position) + position.y += value + position = this.layer.layerPointToLatLng(position) + this.layer.flyTo(position) + } // 涓嶅悓绫诲瀷鍥剧墖灏佽 this.differentTypes = (judgeValue) => { diff --git a/src/components/LayerController/logic/WasteGas.js b/src/components/LayerController/logic/WasteGas.js index e120cfa..9f99756 100644 --- a/src/components/LayerController/logic/WasteGas.js +++ b/src/components/LayerController/logic/WasteGas.js @@ -18,7 +18,10 @@ * @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) @@ -31,9 +34,10 @@ var iconUrl = this.differentTypes(ContrLevel) const marker = L.marker.magic([positionX, positionY], { + test: data[i], icon: L.icon({ iconUrl: iconUrl, - iconSize: [50, 50], + iconSize: [20, 20], iconAnchor: [25, 25] }) }) @@ -43,8 +47,7 @@ } this.bindTooltip = (layer) => { - console.log(layer) - return '搴熸皵鐐�' + return layer.options.test.Name } this.clickListener = async (e) => { diff --git a/src/components/panel/ToolBoxPanel.vue b/src/components/panel/ToolBoxPanel.vue index 1e47999..2a9bf26 100644 --- a/src/components/panel/ToolBoxPanel.vue +++ b/src/components/panel/ToolBoxPanel.vue @@ -297,25 +297,13 @@ this.drawLayer = this.L.layerGroup().addTo(this.map) } this.active = index - // 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]) - console.log(this.basemapList) for (let i = 0; i < this.isShow.length; i++) { - this.isShow[i] = false + if (i !== index) { + this.isShow[i] = false + } } - this.isShow[index] = true + // debugger + this.isShow[index] = !this.isShow[index] }, choiceItem (itemT, indexT) { this.Selecd = indexT diff --git a/src/views/MapTemplate.vue b/src/views/MapTemplate.vue index c3a06ce..50d509b 100644 --- a/src/views/MapTemplate.vue +++ b/src/views/MapTemplate.vue @@ -152,7 +152,6 @@ this.vectorLayerHelper = Sgis.initVectorLayersHelper(this.map) // 鍒濆鍖栧姩鎬佽绱犲浘灞傚姪鎵� this.vectorLayerHelper.initVectorLayers(this.config) - this.ChangeState() // this.AddGasHelper() // this.ChangeWaterState() -- Gitblit v1.8.0