This commit is contained in:
zhoumengru
2025-09-18 16:03:06 +08:00
26 changed files with 695 additions and 510 deletions

View File

@@ -93,8 +93,11 @@ export default {
},
mounted() {},
beforeUnmount() {
this.faultChart = null
window.removeEventListener('resize', this.handleResize)
if (this.faultChart) {
this.faultChart.dispose()
this.faultChart = null
}
},
methods: {
@@ -130,6 +133,9 @@ export default {
drawLineChart(activeKey) {
this.getChargeData(activeKey)
if(this.faultChart){
this.faultChart.dispose()
}
const chartDom = document.getElementById('alarm-chart')
let faultChart = this.$echarts.init(chartDom)
this.faultChart = faultChart

View File

@@ -154,7 +154,6 @@ export default {
},
drawLineChart(activeKey) {
console.log(this.$refs.charge)
// const labelCount = Math.floor(500 / 30);
this.getChargeData(activeKey)
if(this.chargeChart){

View File

@@ -58,7 +58,7 @@ export default {
data() {
return {
center: [112.870000,34.180000], // 默认中心点(河南)
zoom: 12,
zoom: 6,
map: null,
currentMarker: {},
showCtrModal: false,

View File

@@ -60,6 +60,8 @@ export default {
},
data() {
return {
refreshInterval:null,
modalInfo: {},
list: [
{
@@ -118,16 +120,29 @@ export default {
return this.list.filter((_, index) => index % 2 !== 0).slice(0, 3) // 右列取前3个奇数索引
}
},
beforeUnmount() {
if(this.refreshInterval){
clearInterval(this.refreshInterval)
this.refreshInterval=null
}
},
async mounted() {
await Promise.all([
this.getStatTotalList(),
this.queryStationInfo(),
this.queryStationData(),
this.getStatDayList(1)
])
await this.loadAllData()
this.refreshInterval=setInterval(async()=>{
await this.loadAllData()
},30000) //30s刷新一次
},
methods: {
async loadAllData(){
await Promise.all([
this.getStatTotalList(),
this.queryStationInfo(),
this.queryStationData(),
this.getStatDayList(1)
])
},
// 查询系统累计统计信息
async getStatTotalList() {
try {

View File

@@ -88,7 +88,7 @@ export default {
handler(newVal, oldVal) {
if (newVal !== oldVal) {
this.list.forEach((item) => {
item.value = this.propsTotal[item.key]
item.value = this.propsTotal[item.key]||0
})
}
},

View File

@@ -74,7 +74,7 @@ export default {
const dates = data.map((item) => item.station_name)
const values = []
keys.forEach((item, index) => {
values[index] = data.map((dataValue) => dataValue[keys[index]])
values[index] = data.map((dataValue) => dataValue[keys[index]])||0
})
return {

View File

@@ -111,7 +111,6 @@ export default {
}
},
beforeUnmount() {
console.log('2222')
if(this.refreshInterval){
clearInterval(this.refreshInterval)
this.refreshInterval=null

View File

@@ -58,7 +58,7 @@ export default {
props: {},
data() {
return {
tableData:[],
tableData: [],
tableOption: {
select: false
@@ -243,10 +243,9 @@ export default {
<style lang="scss" scoped>
.service {
height: 100%;
padding: 0 20px;
.content-table {
height: calc(100% - 70px);
padding: 10px;
height: calc(100% - 92px);
}
}
</style>