From f0c30b0c1fd5e4346a23ab7cacf7ca12f91feaaf Mon Sep 17 00:00:00 2001 From: wangqi <magical1908@outlook.com> Date: 星期一, 29 三月 2021 15:42:24 +0800 Subject: [PATCH] 弹窗布局 --- src/components/BaseNav/SolidWaste/SolidWaste.js | 2 +- src/components/flueGas/flueGas.js | 21 +++++++++++---------- src/components/flueGas/popup-gas.vue | 8 ++++---- src/views/MapTemplate.vue | 6 ++---- src/styles/theme-dark/variable.less | 2 +- src/components/BaseNav/PublicBounced/PublicBounced.vue | 8 ++++++-- src/components/flueGas/GasComponents/GasTable.vue | 4 ++-- 7 files changed, 27 insertions(+), 24 deletions(-) diff --git a/src/components/BaseNav/PublicBounced/PublicBounced.vue b/src/components/BaseNav/PublicBounced/PublicBounced.vue index 003f1dc..8326dfa 100644 --- a/src/components/BaseNav/PublicBounced/PublicBounced.vue +++ b/src/components/BaseNav/PublicBounced/PublicBounced.vue @@ -5,13 +5,14 @@ <i class="el-icon-circle-close" @click="closePopup"></i> </div> <div class="public-bounced-content"> - <span>鍐呭</span> +<!-- <span>鍐呭</span>--> + <popup-gas></popup-gas> </div> </div> </template> <script> - +import PopupGas from '@components/flueGas/popup-gas' export default { name: 'PublicBounced', data () { @@ -20,6 +21,9 @@ flag: false } }, + components: { + PopupGas + }, methods: { setData (data) { this.displayContent = data diff --git a/src/components/BaseNav/SolidWaste/SolidWaste.js b/src/components/BaseNav/SolidWaste/SolidWaste.js index b9be819..54107a5 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) this.EffectOfPulse(e.target.getLatLng()) this.SolidWastePopup.setData(data[i]) return this.SolidWastePopup.$el diff --git a/src/components/flueGas/GasComponents/GasTable.vue b/src/components/flueGas/GasComponents/GasTable.vue index d4f11da..0b927c9 100644 --- a/src/components/flueGas/GasComponents/GasTable.vue +++ b/src/components/flueGas/GasComponents/GasTable.vue @@ -34,11 +34,11 @@ .el-row { color: #00d0f9; .el-col{ - width: 240px; + width: 200px; height: 28px; background-color: #243a55; border-radius: 0.05rem; - margin: 5px; + //margin: 5px; text-align: center; line-height: 28px; } diff --git a/src/components/flueGas/flueGas.js b/src/components/flueGas/flueGas.js index 62f103f..6ea7391 100644 --- a/src/components/flueGas/flueGas.js +++ b/src/components/flueGas/flueGas.js @@ -55,14 +55,14 @@ // // 绾� // var polyline = this.L.polyline(latlngs, { color: 'red' }).addTo(this.map) // console.log(polyline) - marker.bindPopup(() => { - return this.FlueGasPopup.$el - }, { - className: 's-map-popup', - minWidth: 1548, - closeButton: true, - autoClose: false - }) + // marker.bindPopup(() => { + // return this.FlueGasPopup.$el + // }, { + // className: 's-map-popup', + // minWidth: 1548, + // closeButton: true, + // autoClose: false + // }) // 鍒掕繃鍑虹幇 灞曠ず鏁版嵁 marker.bindTooltip(data[i].porltName, { permanent: true, @@ -73,9 +73,10 @@ // 鐐瑰嚮 浜嬩欢 marker.on('click', (e) => { try { - // console.log(e) + console.log(e) this.EffectOfPulse(e.target.getLatLng()) - this.FlueGasPopup.setDate(data[i]) + this.FlueGasPopup.setData(data[i]) + return this.FlueGasPopup.$el } catch (error) { console.log(error) } diff --git a/src/components/flueGas/popup-gas.vue b/src/components/flueGas/popup-gas.vue index a883d48..a9de862 100644 --- a/src/components/flueGas/popup-gas.vue +++ b/src/components/flueGas/popup-gas.vue @@ -35,10 +35,10 @@ } }, methods: { - setDate (data) { - console.log(data) - this.displayContent = data - } + // setDate (data) { + // console.log(data) + // this.displayContent = data + // } } } </script> diff --git a/src/styles/theme-dark/variable.less b/src/styles/theme-dark/variable.less index 430a7b4..dee09f6 100644 --- a/src/styles/theme-dark/variable.less +++ b/src/styles/theme-dark/variable.less @@ -1,4 +1,4 @@ -@import "../common/variable"; +//@import "../common/variable"; /* 涓婚鑹� -------------------------- */ diff --git a/src/views/MapTemplate.vue b/src/views/MapTemplate.vue index beae13e..441dd80 100644 --- a/src/views/MapTemplate.vue +++ b/src/views/MapTemplate.vue @@ -17,9 +17,7 @@ <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> -<!-- <SolidContent ref="SolidWastePopup"></SolidContent>--> <el-button type="primary" @click="AddGasHelper" class="flue-gas">搴熸皵</el-button> - <popup-gas ref="FlueGas"></popup-gas> <PublicBounced ref="PublicBounced"></PublicBounced> </div> </template> @@ -44,7 +42,7 @@ // import SolidContent from '@components/SolidWaste/SolidContent' // 搴熸皵 import AddGasHelper from '@components/flueGas/flueGas' -import PopupGas from '@/components/flueGas/popup-gas' +// import PopupGas from '@/components/flueGas/popup-gas' // // 鍏叡灞曠ず鏁版嵁 import PublicBounced from '@components/BaseNav/PublicBounced/PublicBounced' export default { @@ -62,7 +60,7 @@ Popup, summarySheets, // SolidContent, - PopupGas, + // PopupGas, PublicBounced }, data () { -- Gitblit v1.8.0