From 957200ba89a34071a5981680f0caf2ee3cc6adfb Mon Sep 17 00:00:00 2001 From: chenzeping <ChenZeping02609@163.com> Date: 星期四, 25 三月 2021 16:31:55 +0800 Subject: [PATCH] 文件调整 --- src/components/BaseNav/SolidWaste/SolidWaste.js | 8 ++++---- src/components/BaseNav/SolidWaste/SolidWasteTable.vue | 0 /dev/null | 4 ---- src/components/BaseNav/SolidWaste/directive.js | 0 src/assets/images/map-pages/basenav/solidwaste/voc.png | 0 src/main.js | 2 +- src/assets/images/map-pages/basenav/solidwaste/gf_green.png | 0 src/components/BaseNav/SolidWaste/SolidContent.vue | 2 +- src/views/MapTemplate.vue | 7 +++---- src/components/plugin/pulse/Pulse.css | 0 src/Sgis.js | 23 ++--------------------- src/components/plugin/pulse/Pulse.js | 0 12 files changed, 11 insertions(+), 35 deletions(-) diff --git a/src/Sgis.js b/src/Sgis.js index f908709..e26ff26 100644 --- a/src/Sgis.js +++ b/src/Sgis.js @@ -16,13 +16,8 @@ import './components/plugin/Editable' // 鏍囩粯鎿嶄綔 import './components/plugin/MagicMarker' // 鍔ㄧ敾Marker import './assets/css/map/magic.min.css' // 鍔ㄧ敾Marker css -import './components/BaseNav/Pulse' -import './components/BaseNav/Pulse.css' - -// import WmtsSupport from '@components/plugin/wmts_plugins' -// import CanvasMarkers from '@components/plugin/CanvasMarkers' -// import FullScreen from '@components/plugin/FullScreen' -// import 'leaflet-canvas-markers' +import '@components/plugin/pulse/Pulse' // marker 澶栧湀娉� +import '@components/plugin/pulse/Pulse.css' // marker 澶栧湀娉� css let map = null const L = window.L @@ -30,18 +25,6 @@ if (map != null) { map.remove() } - - // Leaflet鎵╁睍浠g爜 - // Editable.init(L) // 鍥惧眰缂栬緫 - // PathDrag.init(L) // 璺緞鎷栨嫿 - // MagicMarker.init(L) // 鍔ㄧ敾Marker - // WmtsSupport.init(L) // 鎵╁睍锛屼娇鏀寔WMTS - // CustomPopup.init(L) // 鑷畾涔夊脊鍑烘 - // CanvasMarkers.init(L)// 鐢诲竷鍥惧眰 - // 鍏ㄥ睆 - // FullScreen.init(L) - // 涓嬭浇 - // LeafletMeasurePath.init(L) DownLoad.init(L) map = L.map(div, MapConfig.mapOptions) @@ -52,8 +35,6 @@ window.map = map window.L = L - - // L.sgis = L.sgis || L initTileLayersHelper(map) diff --git a/src/components/BaseNav/magicMarker.png b/src/assets/images/map-pages/basenav/solidwaste/gf_green.png similarity index 100% rename from src/components/BaseNav/magicMarker.png rename to src/assets/images/map-pages/basenav/solidwaste/gf_green.png Binary files differ diff --git a/src/components/BaseNav/voc.png b/src/assets/images/map-pages/basenav/solidwaste/voc.png similarity index 100% rename from src/components/BaseNav/voc.png rename to src/assets/images/map-pages/basenav/solidwaste/voc.png Binary files differ diff --git a/src/components/BaseNav/SolidContent.vue b/src/components/BaseNav/SolidWaste/SolidContent.vue similarity index 91% rename from src/components/BaseNav/SolidContent.vue rename to src/components/BaseNav/SolidWaste/SolidContent.vue index ab6fbf0..3b6fb0b 100644 --- a/src/components/BaseNav/SolidContent.vue +++ b/src/components/BaseNav/SolidWaste/SolidContent.vue @@ -11,7 +11,7 @@ <script> -import SolidWasteTable from '@components/BaseNav/SolidWasteTable' +import SolidWasteTable from '@components/BaseNav/SolidWaste/SolidWasteTable' export default { name: 'SolidContent', diff --git a/src/components/BaseNav/SolidWaste.js b/src/components/BaseNav/SolidWaste/SolidWaste.js similarity index 94% rename from src/components/BaseNav/SolidWaste.js rename to src/components/BaseNav/SolidWaste/SolidWaste.js index a32b0bb..3346804 100644 --- a/src/components/BaseNav/SolidWaste.js +++ b/src/components/BaseNav/SolidWaste/SolidWaste.js @@ -1,7 +1,7 @@ import { requestSolidWaste } from '@/api/request' // 灞曠ず鍥剧墖 -import defaultImg from '@components/BaseNav/magicMarker.png' -import Setting from '@components/BaseNav/voc.png' +import defaultImg from '@assets/images/map-pages/basenav/solidwaste/voc.png' +import Setting from '@assets/images/map-pages/basenav/solidwaste/gf_green.png' // 搴曞浘涓氬姟灞曠ず鐐� class AddSolidWasteHelper { @@ -132,8 +132,8 @@ fillColor: '' }) if (markers) { - // markers.push(this.L.marker(FinalPosition, { icon: pulsingIcon })) - // this.L.layerGroup(markers).addLayer(layerGroup) + markers.push(this.L.marker(FinalPosition, { icon: pulsingIcon })) + this.L.layerGroup(markers).addLayer(layerGroup) } else { var picGroupMarker = new this.L.FeatureGroup() this.L.marker(FinalPosition, { icon: pulsingIcon }).addTo(picGroupMarker) diff --git a/src/components/BaseNav/SolidWasteTable.vue b/src/components/BaseNav/SolidWaste/SolidWasteTable.vue similarity index 100% rename from src/components/BaseNav/SolidWasteTable.vue rename to src/components/BaseNav/SolidWaste/SolidWasteTable.vue diff --git a/src/components/BaseNav/directive.js b/src/components/BaseNav/SolidWaste/directive.js similarity index 100% rename from src/components/BaseNav/directive.js rename to src/components/BaseNav/SolidWaste/directive.js diff --git a/src/components/BaseNav/SolidWasteExtend.js b/src/components/BaseNav/SolidWasteExtend.js deleted file mode 100644 index b778c47..0000000 --- a/src/components/BaseNav/SolidWasteExtend.js +++ /dev/null @@ -1,363 +0,0 @@ -// /* -------------------------------------------------------------------------------------------------------------------------- */ -// import { requestSolidWaste } from '@/api/request' -// -// /* -------------------------------------------------------------------------------------------------------------------------- */ -// import '@components/BaseNav/style.css' -// -// /* -------------------------------------------------------------------------------------------------------------------------- */ -// // 灞曠ず鍥剧墖 -// import defaultImg from '@components/BaseNav/magicMarker.png' -// import Setting from '@components/BaseNav/voc.png' -// -// /* -------------------------------------------------------------------------------------------------------------------------- */ -// -// // 搴曞浘涓氬姟灞曠ず鐐� -// class AddSolidWasteHelper { -// /* -------------------------------------------------------------------------------------------------------------------------- */ -// constructor (options) { -// this.map = options.map -// this.L = window.L -// this.SolidWasteLayerGroup = this.L.layerGroup().addTo(this.map) -// this.SolidWastePopup = null -// this.L.sgis = this.L.sgis || this.L -// this.solidWasteMarkersLabels = [] -// this.pulseHeighLightMarker = null -// } -// -// /* -------------------------------------------------------------------------------------------------------------------------- */ -// -// // 璇锋眰鏁版嵁 data 涓哄弬鏁帮紝 璇锋眰鍚庡彴鏁版嵁鏃� 鎼哄甫data鍙傛暟 -// requestData () { -// requestSolidWaste().then(res => { -// // console.log(res) -// this.DrawTheSolidWasteContent(res.Result.DataInfo) -// }).catch(err => { -// console.log(err) -// }) -// } -// -// /* -------------------------------------------------------------------------------------------------------------------------- */ -// -// // 鏍规嵁鑾峰彇鏁版嵁 鐢诲嚭 鍐呭 -// DrawTheSolidWasteContent (data) { -// // 鍥炬爣鏍峰紡鎵╁睍 -// var SolidWasteIcon = this.SolidWasteIcon() -// -// // //鍔犺浇鏁版嵁鍓嶅鏋滃瓨鍦ㄥ浘灞傜粍 閭d箞娓呴櫎鎺� -// if (this.SolidWasteLayerGroup) { -// this.SolidWasteLayerGroup.clearLayers() -// } -// for (let i = 0; i < data.length; i++) { -// // 缁忕含搴� 浣嶇疆 -// const positionX = data[i].positionX -// const positionY = data[i].positionY -// -// // 鍒ゆ柇 缁忕含搴︿綅缃俊鎭槸鍚﹀瓨鍦� -// if (positionX != null && positionY != null) { -// // 鐢ㄤ簬 鍒ゆ柇 => 鍒ゆ柇鏄惁灞曠ず鑴夊啿鏁堟灉 => temp(涓存椂) -// const determineValueOne = data[i].LongDayWarning -// var determineValueTwo = data[i].StorageQty -// const positionArea = [positionX, positionY] -// -// // 鍥炬爣灞曠ず -// var iconUrl = this.SolidWasteIconUrl(determineValueOne, determineValueTwo, positionArea) -// var Icon = new SolidWasteIcon({ iconUrl: iconUrl }) -// // var url = Icon.options.iconUrl -// -// // 寮瑰嚭妗哾iv鍐呭 -// // var storevoinfo=null,storevodelinfo=[]; -// // for(var j=0;j<storevo.length;j++){ -// // if(itm.StoragePlaceId==storevo[j].StoragePlaceId){ -// // storevoinfo=storevo[j]; -// // } -// // } -// // for(var k=0;k<storedel.length;k++){ -// // if(itm.StoragePlaceId==storedel[k].StoragePlaceId){ -// // storevodelinfo.push(storedel[k]); -// // } -// // } -// const content = this.solidWastePpopupContent(data[i], 'c', 'z') -// // console.log(content) -// -// const marker = this.L.marker([positionX, positionY], { icon: Icon }) -// -// marker.bindPopup(content, () => { -// return this.SolidWastePopup.$el -// }, { -// className: 's-map-popup', -// minWidth: 200, -// closeButton: true, -// autoClose: false -// }) -// // // 鍒掕繃鍑虹幇 灞曠ず鏁版嵁 -// marker.bindTooltip(data[i].StoragePlaceName, { -// permanent: true, -// offset: [0, -16], -// direction: 'top', -// className: '' -// }) -// // 鐐瑰嚮 浜嬩欢 -// marker.on('click', (e) => { -// try { -// // console.log(e) -// // this.SolidWastePopup.SetDisplayContent(content) -// this.EffectOfPulse(e.target.getLatLng()) -// } catch (error) { -// console.log(error) -// } -// }) -// marker.on('popupopen', (e) => { -// try { -// this.solidWastePpopupContent(content) -// } catch (e) { -// console.log(e) -// } -// }) -// // 璁剧疆鍐呭娣诲姞鍒板浘灞� -// // this.solidWasteMarkersLabels.push(marker) -// this.SolidWasteLayerGroup.addLayer(marker) -// } -// } -// } -// -// /* -------------------------------------------------------------------------------------------------------------------------- */ -// -// // 鍥哄簾鐐瑰嚮杩涜鐨� 鍐呭鐨勮缃� -// SetSolidWasteContent (config, containerPopup) { -// this.SolidWastePopup = containerPopup -// } -// -// /* -------------------------------------------------------------------------------------------------------------------------- */ -// -// // 鍥炬爣鏍峰紡鎵╁睍 => 鍏夊湀 鍥炬爣鑴夊啿 -// SolidWasteIcon () { -// return this.L.Icon.extend({ -// options: { -// iconSize: [40, 40], -// iconAnchor: [20, 20] -// } -// }) -// } -// -// /* -------------------------------------------------------------------------------------------------------------------------- */ -// -// // 鏍规嵁绫诲瀷杩斿洖鍥剧墖鍔犺浇url -// SolidWasteIconUrl (determineValueOne, determineValueTwo, position) { -// var EffectOfChange -// if (determineValueOne === 1 || determineValueTwo === 1) { -// EffectOfChange = defaultImg -// this.EffectOfPulse(position, 'SolidWaste', this.solidWasteMarkersLabels, this.SolidWasteLayerGroup) -// } else { -// EffectOfChange = Setting -// } -// return EffectOfChange -// } -// -// /* -------------------------------------------------------------------------------------------------------------------------- */ -// -// // 鑴夊啿鏁堟灉璁剧疆瀹炵幇 -// EffectOfPulse (position, name, markers, layerGroup) { -// // // 鍖哄垎鐩存帴鎵ц 鍜屽垽鏂墽琛岀殑涓嶅悓鍖哄埆 -// var differentColor = '' -// if (markers) { -// differentColor = '#ff0000' // 鏈夊唴瀹� 锛岀洿鎺ヤ负鎶ヨ 鎵ц鎶ヨ鐨勫唴瀹� -// } else { -// differentColor = '#98FB98' // 鍚﹀垯 涓虹偣鍑绘墽琛� -// } -// // 鍧愭爣鏁版嵁锛氭姤璀︿紶杩涙潵鐨勬槸鏁扮粍 / 鐐瑰嚮浼犺繘鏉ョ殑鏄痮bject -// var FinalPosition = position instanceof Array ? { -// lat: position[0], -// lng: position[1] -// } : position -// // 鎻掍欢 鏁堟灉瀹炵幇 -// var pulsingIcon = this.L.icon.pulse({ -// iconSize: [25, 25], -// color: differentColor, -// fillColor: ' ' -// }) -// if (markers) { -// markers.push(this.L.marker(FinalPosition, { icon: pulsingIcon })) -// this.L.layerGroup(markers).addLayer(layerGroup) -// } else { -// var picGroupMarker = new this.L.FeatureGroup() -// this.L.marker(FinalPosition, { icon: pulsingIcon }).addTo(picGroupMarker) -// this.pulseHeighLightMarker = picGroupMarker.addTo(this.SolidWasteLayerGroup) -// this.PulseCountSetting() -// } -// } -// -// /* -------------------------------------------------------------------------------------------------------------------------- */ -// -// // 瀵瑰浘鏍囪剦鍐� 杩涜set璁剧疆 // 楂樹寒鍥惧眰 -// PulseCountSetting () { -// var HeightLightTime = 1 -// var PulseNumber = 5 -// const pulseinterver = setInterval(() => { -// if (PulseNumber > 0) { -// PulseNumber-- -// } else { -// this.pulseClear(pulseinterver) -// PulseNumber = HeightLightTime -// } -// }, 1000) -// } -// -// /* -------------------------------------------------------------------------------------------------------------------------- */ -// -// // 娓呴櫎 鍥惧眰 -// pulseClear (pulseinterver) { -// clearInterval(pulseinterver) -// pulseinterver = null -// -// if (this.SolidWasteLayerGroup) { -// // this.SolidWasteLayerGroup.clearLayers() -// } else { -// this.SolidWasteLayerGroup = this.L.layerGroup().addTo(this.map) -// } -// if ((this.pulseHeighLightMarker)) { -// this.pulseHeighLightMarker.remove() -// } -// } -// -// /* -------------------------------------------------------------------------------------------------------------------------- */ -// -// // 鐐瑰嚮涓氬姟鍐呭 寮瑰嚭鏁版嵁鐨勬暟鎹繘琛屼慨鏀� -// solidWastePpopupContent (data) { -// console.log(data) -// const html = data.StoragePlaceName -// return html -// } -// -// /* -------------------------------------------------------------------------------------------------------------------------- */ -// } -// -// export default AddSolidWasteHelper - -// <template> -// <div class="full-screen"> -// <div id="map" ref="rootmap"></div> -// <el-button type="primary" @click="ChangeState">鍥哄簾</el-button> -// <SolidContent ref="SolidWastePopup" @callPopup="callPopup"></SolidContent> -// </div> -// </template> -// -// <script> -// import 'leaflet/dist/leaflet.css' -// import Sgis from '@/Sgis' -// -// // 搴曞浘涓氬姟js閫昏緫 -// import AddSolidWasteHelper from '@components/BaseNav/SolidWaste' -// -// // 搴曞浘缁戝畾 鐐瑰嚮 寮瑰嚭鐨勬暟鎹� -// import SolidContent from '@components/BaseNav/SolidContent' -// -// export default { -// name: 'HomePage', -// components: { -// SolidContent -// }, -// data () { -// return { -// map: null, -// lcServiceLayerVisible: false, -// basemapHelper: {}, -// serviceLayerHelper: {}, -// vectorLayerHelper: {} -// } -// }, -// computed: { -// config () { -// return this.$store.state.map.config -// }, -// SolidWasteConfig () { -// return this.$store.state.map.SolidWasteConfig -// } -// }, -// beforeMount () { -// this.$nextTick(() => { -// this.init() -// }) -// }, -// methods: { -// init () { -// const mapcontainer = this.$refs.rootmap -// this.map = Sgis.initMap(mapcontainer) -// -// this.basemapHelper = Sgis.initBasemapsHelper(this.map) // 鍒濆鍖栧熀纭�搴曞浘鍔╂墜 -// this.basemapHelper.initBasemap(this.config, false) // 绗簩涓弬鏁帮紝琛ㄧず鏄惁鍐呯綉搴曞浘 -// -// this.ChangeState() -// }, -// ChangeState () { -// // 璇锋眰鏁版嵁 鎼哄甫鍙傛暟 data -// // const data = { -// // // companyId: 3900100145, -// // // companyCode: 31800000, -// // // monDuration: 4 -// // } -// // 寮曞叆涓氬姟閫昏緫 js -// const AddSolidWaste = new AddSolidWasteHelper({ map: this.map }) -// // 涓氬姟閫昏緫js 鐨勮姹傛暟鎹� // 骞朵笖浼犻�掑浘鐗� 鐢ㄤ簬鍒涘缓鐐圭殑 icon -// AddSolidWaste.requestData() -// // // 鐐瑰嚮 璁剧疆 寮瑰嚭鍐呭浜嬩欢 de 璁剧疆 console.log(this.$refs.popup.$el) -// // AddSolidWaste.SetSolidWasteContent(this.SolidWasteConfig, this.$refs.SolidWastePopup) -// }, -// callPopup (val) { -// console.log(val) -// }, -// displayDefault () { -// // this.serviceLayerHelper = Sgis.initTileLayersHelper(this.map) // 鍒濆鍖栦笟鍔″簳鍥惧姪鎵� -// // this.serviceLayerHelper.initServiceLayers(this.config, this.$refs.popup) -// -// // this.vectorLayerHelper = Sgis.initVectorLayersHelper(this.map) // 鍒濆鍖栧姩鎬佽绱犲浘灞傚姪鎵� -// // this.vectorLayerHelper.initVectorLayers(this.config) -// } -// } -// } -// </script> -// -// <style lang="less"> -// -// .leaflet-div-icon { -// background: none; -// border: none; -// } -// -// .full-screen { -// width: 100%; -// height: 100%; -// margin: 0; -// padding: 0; -// position: absolute; -// -// button { -// position: absolute; -// top: 88px; -// left: 88px; -// z-index: 999; -// } -// -// #map { -// height: 100%; -// width: 100%; -// } -// -// .barline { -// //width: 100%; -// //height: 1px; -// //background-color: #0661AE; -// border-top: 1px solid #0661AE; -// } -// -// #map-btn { -// position: fixed; -// top: 20px; -// left: 100px; -// z-index: 9999; -// } -// -// .leaflet-custom-icon { -// background: white; -// } -// } -// </style> diff --git a/src/components/BaseNav/style.css b/src/components/BaseNav/style.css deleted file mode 100644 index dd710a6..0000000 --- a/src/components/BaseNav/style.css +++ /dev/null @@ -1,4 +0,0 @@ -.s-map-popup { - background: red; - height: 100px; -} diff --git a/src/components/BaseNav/Pulse.css b/src/components/plugin/pulse/Pulse.css similarity index 100% rename from src/components/BaseNav/Pulse.css rename to src/components/plugin/pulse/Pulse.css diff --git a/src/components/BaseNav/Pulse.js b/src/components/plugin/pulse/Pulse.js similarity index 100% rename from src/components/BaseNav/Pulse.js rename to src/components/plugin/pulse/Pulse.js diff --git a/src/main.js b/src/main.js index f174d4a..0ce6953 100644 --- a/src/main.js +++ b/src/main.js @@ -21,7 +21,7 @@ Vue.use(ElementUI) Vue.prototype.$cancels = [] Vue.prototype.L = L -// 娉ㄥ唽鎸囦护7 +// 娉ㄥ唽鎸囦护 // registerDirectives(Vue) // 娉ㄥ唽echarts鐨偆 diff --git a/src/views/MapTemplate.vue b/src/views/MapTemplate.vue index 698833c..7665bb1 100644 --- a/src/views/MapTemplate.vue +++ b/src/views/MapTemplate.vue @@ -36,9 +36,9 @@ // import MenuSpecial from '@components/panel/MenuTopic' import LegendPanel from '@components/panel/LegendPanel' import Enterprise from '../components/table/enterprise' -import SolidContent from '@components/BaseNav/SolidContent' +import SolidContent from '@components/BaseNav/SolidWaste/SolidContent' // 搴曞浘涓氬姟js閫昏緫 -import AddSolidWasteHelper from '@components/BaseNav/SolidWaste' +import AddSolidWasteHelper from '@components/BaseNav/SolidWaste/SolidWaste' export default { name: 'MapTemplate', @@ -58,7 +58,6 @@ }, data () { return { - // isShowBtn: false, map: null, lcServiceLayerVisible: false, basemapHelper: {}, @@ -109,7 +108,7 @@ this.vectorLayerHelper = Sgis.initVectorLayersHelper(this.map) // 鍒濆鍖栧姩鎬佽绱犲浘灞傚姪鎵� this.vectorLayerHelper.initVectorLayers(this.config) - // this.ChangeState() + this.ChangeState() this.saveMapStatus() // this.setMapObj(this.mapObj) -- Gitblit v1.8.0