台站运行管理页面状态接口联调

This commit is contained in:
renpy 2023-08-25 11:05:10 +08:00
parent 8772c16c9b
commit 851af6c968
2 changed files with 93 additions and 10 deletions

View File

@ -161,13 +161,23 @@ export default {
}) })
}, },
getRipple({ lon, lat, stationId, stationType }) { getRipple({ lon, lat, stationId, stationType, quality }) {
// console.log("lon, lat, stationId, stationType, quality",lon, lat, stationId, stationType, quality);
const rippleDiv = document.createElement('div') const rippleDiv = document.createElement('div')
rippleDiv.className = 'custom-ripple' rippleDiv.className = 'custom-ripple'
if (quality == "excellent") {
rippleDiv.innerHTML = ` <div class="inner-ripple-1"></div> rippleDiv.innerHTML = ` <div class="inner-ripple-excellent-1"></div>
<div class="inner-ripple-2"></div> <div class="inner-ripple-excellent-2"></div>
` `
} else if (quality == "good") {
rippleDiv.innerHTML = ` <div class="inner-ripple-good-1"></div>
<div class="inner-ripple-good-2"></div>
`
} else if(quality == "bad"){
rippleDiv.innerHTML = ` <div class="inner-ripple-bad-1"></div>
<div class="inner-ripple-bad-2"></div>
`
}
return new Overlay({ return new Overlay({
position: fromLonLat([lon, lat]), position: fromLonLat([lon, lat]),
@ -266,6 +276,7 @@ export default {
line-height: 30px; line-height: 30px;
border-bottom: 1px solid #0a544e; border-bottom: 1px solid #0a544e;
margin-bottom: 0; margin-bottom: 0;
color: rgb(187, 138, 18);
} }
} }
@ -301,7 +312,7 @@ export default {
@duration: 1.8s; @duration: 1.8s;
@delay: 0.9s; @delay: 0.9s;
.inner-ripple-1 { .inner-ripple-excellent-1 {
position: absolute; position: absolute;
top: 0; top: 0;
width: 100%; width: 100%;
@ -311,7 +322,7 @@ export default {
animation: rippleEffect @duration linear 0s infinite; animation: rippleEffect @duration linear 0s infinite;
} }
.inner-ripple-2 { .inner-ripple-excellent-2 {
position: absolute; position: absolute;
top: 0; top: 0;
width: 100%; width: 100%;
@ -321,6 +332,46 @@ export default {
background-image: radial-gradient(circle, transparent 10%, rgba(15, 148, 28, 0.2) 30%, rgba(15, 148, 28, 0.5) 60%); 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; 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 { @keyframes rippleEffect {

View File

@ -183,6 +183,7 @@ export default {
dataList: [], // All Data dataList: [], // All Data
followedDataList: [], // followedDataList: [], //
markerList: [], // markerList: [], //
markerList_clone: [], //
markerType: 1, // markerType: 1, //
circleRadius: 0, circleRadius: 0,
@ -201,7 +202,8 @@ export default {
stationTypeList: [], stationTypeList: [],
treeData: [] // treeData: [], //
timer: null
} }
}, },
created() { created() {
@ -210,6 +212,10 @@ export default {
this.getStationTypeList() this.getStationTypeList()
this.getStationTree() this.getStationTree()
}, },
destroyed () {
clearInterval(this.timer);
this.timer = null
},
methods: { methods: {
// //
async getStationList() { async getStationList() {
@ -218,8 +224,14 @@ export default {
const res = await getAction('/jeecg-station-operation/stationOperation/findList') const res = await getAction('/jeecg-station-operation/stationOperation/findList')
this.originalDataList = res // this.originalDataList = res //
this.dataList = cloneDeep(res) this.dataList = cloneDeep(res)
this.markerList = cloneDeep(res) // this.markerList = cloneDeep(res)
this.markerList_clone = cloneDeep(res)
this.getDataProvisionEfficiency(this.markerList_clone)
this.timer = setInterval(() => {
setTimeout(() => {
this.getDataProvisionEfficiency(this.markerList_clone)
}, 0);
}, 15000);
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.scrollContainerRef.checkScrollEnd() this.$refs.scrollContainerRef.checkScrollEnd()
}) })
@ -230,6 +242,26 @@ export default {
} }
}, },
//
async getDataProvisionEfficiency(arr) {
this.markerList=[]
try {
const res = await getAction('/stationOperation/getDataProvisionEfficiency')
console.log("getDataProvisionEfficiency", res);
arr.forEach(item => {
res.result.forEach(data => {
if (parseInt(data.id) == item.stationId) {
item.quality = data.quality
}
})
this.markerList.push(item)
})
console.log("this.markerListthis.markerListthis.markerList",this.markerList);
} catch (error) {
console.error(error)
}
},
// //
async getFollowedStationList() { async getFollowedStationList() {
try { try {