diff --git a/src/components/CustomChart/index.vue b/src/components/CustomChart/index.vue index d568449..cb38a75 100644 --- a/src/components/CustomChart/index.vue +++ b/src/components/CustomChart/index.vue @@ -83,6 +83,6 @@ export default { diff --git a/src/views/stationOperation/components/MapMarker.vue b/src/views/stationOperation/components/MapMarker.vue index 763ec8f..662ce29 100644 --- a/src/views/stationOperation/components/MapMarker.vue +++ b/src/views/stationOperation/components/MapMarker.vue @@ -28,6 +28,14 @@ export default { type: Array, required: true }, + currList: { + type: Array, + required: true + }, + orgList: { + type: Array, + required: true + }, markerType: { type: Number, default: 1 @@ -151,23 +159,32 @@ export default { // 初始化波纹 initRipples() { - this.list - .filter( - stationInfo => - stationInfo.stationType !== MarkerType.NuclearFacility && stationInfo.stationType !== MarkerType.NRL - ) + this.currList + // .filter( + // stationInfo => + // stationInfo.stationType !== MarkerType.NuclearFacility && stationInfo.stationType !== MarkerType.NRL + // ) .forEach(stationInfo => { this.map.addOverlay(this.getRipple(stationInfo)) }) }, - getRipple({ lon, lat, stationId, stationType }) { + getRipple({ lon, lat, stationId, stationType, quality }) { const rippleDiv = document.createElement('div') rippleDiv.className = 'custom-ripple' - - rippleDiv.innerHTML = `
- - ` + if (quality == "excellent") { + rippleDiv.innerHTML = ` + + ` + } else if (quality == "good") { + rippleDiv.innerHTML = ` + + ` + } else if(quality == "bad"){ + rippleDiv.innerHTML = ` + + ` + } return new Overlay({ position: fromLonLat([lon, lat]), @@ -209,7 +226,10 @@ export default { result.lon = decimalToDms(result.lon || result.longitude) result.lat = decimalToDms(result.lat || result.latitude, false) - this.currStationInfo = result + let params = this.currList.find(item => { + return item.stationId === result.stationId + }) || {} + this.currStationInfo = { ...result, ...params } } else { this.$message.error(message) } @@ -234,6 +254,20 @@ export default { if (this.markerType == 2) { this.initCircles() } + }, + currList: { + handler(newVal, oldVal) { + this.orgList.forEach(item => { + var layer = this.map.getOverlays().getArray().find(layer=> { + return layer.id === `ripple_${item.stationType}_${item.stationId}`; + }); + if (layer) { + this.map.removeOverlay(layer); + } + }) + this.initRipples() + }, + deep:true } } } @@ -266,6 +300,7 @@ export default { line-height: 30px; border-bottom: 1px solid #0a544e; margin-bottom: 0; + color: rgb(187, 138, 18); } } @@ -301,7 +336,7 @@ export default { @duration: 1.8s; @delay: 0.9s; - .inner-ripple-1 { + .inner-ripple-excellent-1 { position: absolute; top: 0; width: 100%; @@ -311,7 +346,7 @@ export default { animation: rippleEffect @duration linear 0s infinite; } - .inner-ripple-2 { + .inner-ripple-excellent-2 { position: absolute; top: 0; width: 100%; @@ -321,6 +356,46 @@ export default { background-image: radial-gradient(circle, transparent 10%, rgba(15, 148, 28, 0.2) 30%, rgba(15, 148, 28, 0.5) 60%); animation: rippleEffect @duration linear @delay infinite; } + .inner-ripple-good-1 { + position: absolute; + top: 0; + width: 100%; + height: 100%; + border-radius: 50%; + background-image: radial-gradient(circle, transparent 10%, rgba(187, 138, 18, 0.2) 30%, rgba(187, 138, 18, 0.5) 60%); + animation: rippleEffect @duration linear 0s infinite; + } + + .inner-ripple-good-2 { + position: absolute; + top: 0; + width: 100%; + height: 100%; + border-radius: 50%; + transform: scale(0); + background-image: radial-gradient(circle, transparent 10%, rgba(187, 138, 18, 0.2) 30%, rgba(187, 138, 18, 0.5) 60%); + animation: rippleEffect @duration linear @delay infinite; + } + .inner-ripple-bad-1 { + position: absolute; + top: 0; + width: 100%; + height: 100%; + border-radius: 50%; + background-image: radial-gradient(circle, transparent 10%, rgba(165, 58, 35, 0.2) 30%, rgba(165, 58, 35, 0.5) 60%); + animation: rippleEffect @duration linear 0s infinite; + } + + .inner-ripple-bad-2 { + position: absolute; + top: 0; + width: 100%; + height: 100%; + border-radius: 50%; + transform: scale(0); + background-image: radial-gradient(circle, transparent 10%, rgba(165, 58, 35, 0.2) 30%, rgba(165, 58, 35, 0.5) 60%); + animation: rippleEffect @duration linear @delay infinite; + } } @keyframes rippleEffect { diff --git a/src/views/stationOperation/components/MapPane.vue b/src/views/stationOperation/components/MapPane.vue index 4fa8f9c..0774cc8 100644 --- a/src/views/stationOperation/components/MapPane.vue +++ b/src/views/stationOperation/components/MapPane.vue @@ -18,15 +18,15 @@