更新
This commit is contained in:
@@ -145,9 +145,11 @@ export default {
|
||||
time1: '',
|
||||
time2: '',
|
||||
time3: '',
|
||||
time4: '',
|
||||
time11: '',
|
||||
time22: '',
|
||||
time33: '',
|
||||
time44: '',
|
||||
pageCurrent: 1,
|
||||
pageSize: 10,
|
||||
total: 0,
|
||||
@@ -181,6 +183,7 @@ export default {
|
||||
this.time1 = response.data.rows[0].运行持续时间
|
||||
this.time2 = response.data.rows[0].等待持续时间
|
||||
this.time3 = response.data.rows[0].停机持续时间
|
||||
this.time4 = response.data.rows[0].报警持续时间
|
||||
}).then(() => {
|
||||
this.drawLine1()
|
||||
})
|
||||
@@ -188,6 +191,7 @@ export default {
|
||||
this.time11 = response.data[0].运行持续时间
|
||||
this.time22 = response.data[0].等待持续时间
|
||||
this.time33 = response.data[0].停机持续时间
|
||||
this.time44 = response.data[0].报警持续时间
|
||||
}).then(() => {
|
||||
this.drawLine2()
|
||||
})
|
||||
@@ -287,8 +291,8 @@ export default {
|
||||
},
|
||||
drawLine1() {
|
||||
const myChart = this.$echarts.init(document.getElementById('myChart1'))
|
||||
const xData = ['运行', '等待', '停机']
|
||||
const lineData = [{ name: '运行', value: this.time1 }, { name: '等待', value: this.time2 }, { name: '停机', value: this.time3 }]
|
||||
const xData = ['运行', '等待', '停机', '报警']
|
||||
const lineData = [{ name: '运行', value: this.time1 }, { name: '等待', value: this.time2 }, { name: '停机', value: this.time3 }, { name: '报警', value: this.time4 }]
|
||||
myChart.clear()
|
||||
myChart.setOption({
|
||||
title: {
|
||||
@@ -327,8 +331,8 @@ export default {
|
||||
},
|
||||
drawLine2() {
|
||||
const myChart = this.$echarts.init(document.getElementById('myChart2'))
|
||||
const xData = ['运行', '等待', '停机']
|
||||
const lineData = [{ name: '运行', value: this.time11 }, { name: '等待', value: this.time22 }, { name: '停机', value: this.time33 }]
|
||||
const xData = ['运行', '等待', '停机', '报警']
|
||||
const lineData = [{ name: '运行', value: this.time11 }, { name: '等待', value: this.time22 }, { name: '停机', value: this.time33 }, { name: '报警', value: this.time44 }]
|
||||
myChart.clear()
|
||||
myChart.setOption({
|
||||
title: {
|
||||
@@ -416,7 +420,7 @@ export default {
|
||||
legend: {
|
||||
orient: 'vertical',
|
||||
x: 'left',
|
||||
data: ['运行', '停机', '等待']
|
||||
data: ['运行', '停机', '等待', '报警']
|
||||
},
|
||||
dataZoom: [{
|
||||
type: 'inside',
|
||||
|
||||
Reference in New Issue
Block a user