联调app

This commit is contained in:
guanj
2026-03-30 08:43:13 +08:00
parent 00e34c168f
commit 66cee2922d
64 changed files with 6112 additions and 2987 deletions

View File

@@ -13,6 +13,9 @@ export default {
store: {
type: [Object],
},
filterValue: {
type: [String],
},
},
data() {
return {
@@ -52,9 +55,10 @@ export default {
xAxis: {
type: 'value',
splitNumber: 10,
minInterval: 3,
minInterval: 20,
position: 'top',
rotate: 90,
max: 140,
axisLabel: {
rotate: -90,
},
@@ -103,6 +107,7 @@ export default {
pointF: [],
pointFun: [],
data: [],
maxXAxis: 140,
}
},
mounted() {
@@ -129,6 +134,7 @@ export default {
this.pointF = []
this.pointFun = []
var total = 0
let dataList = [0]
total = this.data.length
if (total == 0) {
} else {
@@ -137,7 +143,7 @@ export default {
var xx = this.data[i].evtParamTm.replace(/s/g, '')
var yy = this.data[i].evtParamVVaDepth.replace(/%/g, '')
var time = this.data[i].startTime.replace('T', ' ')
dataList.push(yy)
point = [yy, xx, time, this.data[i]]
if (xx < 0.05) {
@@ -191,6 +197,20 @@ export default {
}
}
}
this.option.xAxis.max = Math.max(
140,
Math.ceil(
Math.max(
...dataList
.filter((item) => {
return item !== '-' && !isNaN(Number(item))
})
.map((item) => Number(item)),
) / 10,
) * 10,
) //this.maxXAxis
this.option.series[1].data = this.pointF
this.option.series[2].data = this.pointFun
@@ -204,7 +224,6 @@ export default {
bindChartClickEvent() {
if (!this.echartRef) return
this.echartRef.on('click', (params) => {
console.log('🚀 ~ params:', params.value[3])
// 点击查看详情
let item = params.value[3]
let str = JSON.stringify(item).replace(/%/g, '百分比')
@@ -219,12 +238,20 @@ export default {
store: {
handler(val, oldVal) {
this.status = val.status
this.data = val.data
this.data = (val.data || []).filter((k) =>
this.filterValue == '' ? k : k.showName == this.filterValue,
)
this.gongfunction()
},
deep: true,
immediate: true,
},
filterValue: {
handler(val, oldVal) {
this.data = (this.store.data || []).filter((k) => (val == '' ? k : k.showName == val))
this.gongfunction()
},
},
},
}
</script>