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 @@
@@ -233,9 +233,10 @@
+
@@ -419,7 +420,9 @@ export default { markerList: [], // 要在地图上展示的marker列表 - showPane: true + showPane: true, + spinLoading: false, + maskVisi: false } }, created() { @@ -468,6 +471,7 @@ export default { // 面板改变 onPaneChange(active) { + this.showPane = true this.active = active const source = this.circleLayer.getSource() source.clear() // 清理图层 @@ -483,6 +487,12 @@ export default { } }, + handleHide() { + this.showPane = !this.showPane + this.emitDrawCircle(1) + this.emitFilter() + }, + // 根据 Filter 筛选Marker emitFilter() { const filterType = this.filterList.filter(item => item.checked).map(item => item.type) @@ -719,6 +729,8 @@ export default { // 获取数据接收状态列表 async getDataRecieveStatusList() { + this.maskVisi = true + this.spinLoading = true try { this.isGettingStatusList = true const { success, result, message } = await getAction( @@ -727,6 +739,8 @@ export default { userId: this.$store.getters.userInfo.id } ) + this.maskVisi = false + this.spinLoading = false if (success) { const statusList = [] result.forEach(item => { @@ -745,6 +759,8 @@ export default { this.$message.error(message) } } catch (error) { + this.maskVisi = false + this.spinLoading = false console.error(error) } finally { this.isGettingStatusList = false @@ -1157,8 +1173,7 @@ export default { right: 15px; width: calc(100% - 270px); height: 100%; - overflow: auto; - padding: 0 15px 10px; + padding: 0 0 10px 15px; border: 1px solid @borderColor; transition: width 0.3s cubic-bezier(0.075, 0.82, 0.165, 1); diff --git a/src/views/stationOperation/components/RealTimeDataChart.vue b/src/views/stationOperation/components/RealTimeDataChart.vue index 432814e..73b7961 100644 --- a/src/views/stationOperation/components/RealTimeDataChart.vue +++ b/src/views/stationOperation/components/RealTimeDataChart.vue @@ -1,5 +1,5 @@ @@ -79,6 +80,9 @@ export default { title: { type: String }, + spinning: { + type: Boolean + }, list: { type: Array, default: () => [] @@ -295,9 +299,16 @@ export default {