联调app
This commit is contained in:
@@ -13,6 +13,9 @@ export default {
|
||||
store: {
|
||||
type: [Object],
|
||||
},
|
||||
filterValue: {
|
||||
type: [String],
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -35,7 +38,7 @@ export default {
|
||||
itemWidth: 10,
|
||||
itemHeight: 10,
|
||||
itemGap: 8,
|
||||
padding: [5, 5 ,5 ,10],
|
||||
padding: [5, 5, 5, 10],
|
||||
},
|
||||
|
||||
color: ['#FF8C00', '#00BFFF', 'green', 'red'],
|
||||
@@ -141,108 +144,6 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
// gongfunction() {
|
||||
// var standI = 0
|
||||
// var unstandI = 0
|
||||
// this.pointI = []
|
||||
// this.pointIun = []
|
||||
// var total = 0
|
||||
// total = this.data.length
|
||||
// if (total == 0) {
|
||||
// } else {
|
||||
// for (var i = 0; i < this.data.length; i++) {
|
||||
// var point = []
|
||||
// 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', ' ')
|
||||
|
||||
// point = [yy, xx, time, this.data[i]]
|
||||
|
||||
// if (xx <= 0.003) {
|
||||
// var line = 0
|
||||
// line = 230 - 30000 * xx
|
||||
// if (yy > line) {
|
||||
// unstandI++
|
||||
// this.pointIun.push({
|
||||
// value: point,
|
||||
// itemStyle: { normal: { color: 'red' } },
|
||||
// })
|
||||
// } else {
|
||||
// standI++
|
||||
// this.pointI.push({
|
||||
// value: point,
|
||||
// itemStyle: { normal: { color: 'green' } },
|
||||
// })
|
||||
// }
|
||||
// } else if (xx <= 0.02) {
|
||||
// if (yy > 120) {
|
||||
// unstandI++
|
||||
// this.pointIun.push({
|
||||
// value: point,
|
||||
// itemStyle: { normal: { color: 'red' } },
|
||||
// })
|
||||
// } else {
|
||||
// standI++
|
||||
// this.pointI.push({
|
||||
// value: point,
|
||||
// itemStyle: { normal: { color: 'green' } },
|
||||
// })
|
||||
// }
|
||||
// } else if (xx <= 0.5) {
|
||||
// if (yy > 120 || yy < 70) {
|
||||
// unstandI++
|
||||
// this.pointIun.push({
|
||||
// value: point,
|
||||
// itemStyle: { normal: { color: 'red' } },
|
||||
// })
|
||||
// } else {
|
||||
// standI++
|
||||
// this.pointI.push({
|
||||
// value: point,
|
||||
// itemStyle: { normal: { color: 'green' } },
|
||||
// })
|
||||
// }
|
||||
// } else if (xx <= 10) {
|
||||
// if (yy > 110 || yy < 80) {
|
||||
// unstandI++
|
||||
// this.pointIun.push({
|
||||
// value: point,
|
||||
// itemStyle: { normal: { color: 'red' } },
|
||||
// })
|
||||
// } else {
|
||||
// standI++
|
||||
// this.pointI.push({
|
||||
// value: point,
|
||||
// itemStyle: { normal: { color: 'green' } },
|
||||
// })
|
||||
// }
|
||||
// } else {
|
||||
// if (yy > 110 || yy < 90) {
|
||||
// unstandI++
|
||||
// this.pointIun.push({
|
||||
// value: point,
|
||||
// itemStyle: { normal: { color: 'red' } },
|
||||
// })
|
||||
// } else {
|
||||
// standI++
|
||||
// this.pointI.push({
|
||||
// value: point,
|
||||
// itemStyle: { normal: { color: 'green' } },
|
||||
// })
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// this.option.series[2].data = this.pointI
|
||||
// this.option.series[3].data = this.pointIun
|
||||
|
||||
// if (this.echartRef) {
|
||||
// this.echartRef.setOption(this.option, true)
|
||||
// } else {
|
||||
// this.initChart()
|
||||
// }
|
||||
// },
|
||||
|
||||
gongfunction() {
|
||||
// 初始化计数与数据数组
|
||||
let normalCount = 0
|
||||
@@ -329,12 +230,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>
|
||||
|
||||
Reference in New Issue
Block a user