This commit is contained in:
liushuai
2019-07-09 17:20:20 +08:00
parent 80a0f8664d
commit 0ca656cc1c
3 changed files with 38 additions and 11 deletions

View File

@@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1525414131085" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6999" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M958.4 241.7c-7.7-35.5-42.7-58.1-78.2-50.4s-58.1 42.7-50.4 78.2c2.1 9.5 6.1 18.1 11.5 25.4L685 537.5c-10-2.8-20.9-3.4-31.8-1C639.1 539.6 627 547 618 557L422.4 429.9c0.7-6.7 0.4-13.6-1.1-20.6-7.7-35.5-42.7-58.1-78.2-50.4s-58.1 42.7-50.4 78.2c2.1 9.5 6.1 18.1 11.6 25.4L147.9 705.1c-10.1-2.9-20.9-3.4-31.9-1-35.5 7.7-58.1 42.7-50.4 78.2s42.7 58.1 78.2 50.4 58.1-42.7 50.4-78.2c-1.9-8.9-5.6-17-10.5-24l157-243.5c9.6 2.4 19.8 2.8 30.1 0.5 12.8-2.8 23.8-9.1 32.5-17.6l198.1 128.5c-0.2 5.4 0.3 10.8 1.5 16.3 7.7 35.5 42.7 58.1 78.2 50.4s58.1-42.7 50.4-78.2c-1.9-8.9-5.6-17-10.5-24l156.9-243.5c9.6 2.5 19.9 2.8 30.2 0.6 35.4-7.7 58-42.8 50.3-78.3z" p-id="7000"></path></svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1525412964267" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1444" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M991.252256 445.156522h-72.359435c-7.231944-50.647604-28.935774-101.303209-57.879548-144.710869l50.647605-50.647605c14.471887-14.471887 14.471887-36.175717 0-50.647604l-65.127492-65.119491c-14.471887-14.471887-36.167717-14.471887-50.647604 0l-50.647604 50.647604c-43.407661-28.943774-94.055265-50.647604-144.70287-65.119491V47.207631c0-21.71183-14.471887-36.175717-36.175717-36.175717H470.304326c-21.70383 0-36.167717 14.471887-36.167718 28.943774v72.359434c-50.647604 7.239943-101.303209 28.943774-144.710869 57.887548l-50.647604-50.647604c-14.471887-14.479887-36.175717-14.479887-50.647605 0l-65.119491 65.119491c-14.471887 14.471887-14.471887 36.175717 0 50.647604l50.647604 50.647605c-28.943774 43.407661-50.647604 94.055265-65.119491 144.702869H36.179717C14.475887 430.684635 0.004 445.156522 0.004 459.628409v94.055265c0 21.71183 14.471887 36.175717 28.943774 36.175718h72.359435c7.239943 50.647604 28.943774 101.295209 57.887547 144.710869l-50.647604 50.647604c-14.479887 14.471887-14.479887 36.175717 0 50.647605l65.119491 65.119491c14.471887 14.471887 36.175717 14.471887 50.647605 0l50.647604-50.647604c28.943774 21.71183 57.879548 36.175717 86.823322 43.407661V770.745979c-21.71183-14.471887-43.415661-28.943774-65.119492-50.647605-115.783095-115.767096-108.543152-303.885626 7.223944-412.412778 115.767096-115.775096 296.653682-108.535152 412.420778 7.231944s108.535152 303.885626-7.239944 412.420778c-21.70383 21.71183-43.407661 36.175717-65.119491 50.647604v123.007039c28.943774-7.239943 57.887548-21.71183 86.823322-43.415661l50.647604 50.647604c14.471887 14.479887 36.175717 14.479887 50.647604 0l65.119492-65.119491c14.479887-14.471887 14.479887-36.175717 0-50.647604l-50.647605-50.647604c28.943774-43.407661 50.647604-94.055265 65.127492-144.70287h72.351434c21.71183 0 36.175717-14.471887 36.175718-28.943774V474.100296c7.239943-14.471887-7.231944-28.943774-28.943774-28.943774z m-267.701909 72.351435c0-79.591378-43.415661-144.70287-108.535152-173.654643-7.239943 0-7.239943 0-7.239943 7.239943v115.767096a64.847493 64.847493 0 0 1-65.119491 65.119491h-50.647605a64.847493 64.847493 0 0 1-65.119491-65.119491V351.093257c0-7.239943-7.239943-7.239943-7.239944-7.239943C361.777174 380.037031 325.601456 445.156522 325.601456 510.276013c0 57.879548 28.943774 115.767096 65.119491 151.942813 21.71183 21.71183 36.175717 50.647604 36.175718 86.823322v245.998078c0 14.471887 14.471887 28.943774 28.943774 28.943774h28.943774V734.578261c0-14.479887 7.231944-21.71183 21.70383-28.943774 14.471887 0 28.943774 7.239943 28.943774 21.711831v289.413739h28.943774c14.471887 0 28.943774-14.471887 28.943774-28.943774V756.274092c0-36.175717 14.471887-65.119491 43.415661-86.823322 57.863548-28.935774 86.815322-86.815322 86.815321-151.942813z m0 0" fill="" p-id="1445"></path></svg>

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

@@ -198,12 +198,36 @@ export default {
}).then(() => {
this.drawLine()
})
getData3(this.MachineValue1, this.date1, this.date2).then(response => {
this.table1 = response.data
console.log(this.table1)
}).then(() => {
this.drawLine3()
})
if (this.date1 === null || this.date2 === null) {
this.$message.warning('请选择开始时间或结束时间')
} else {
const endYear = parseInt(this.date2.split('-')[0])
const startYear = parseInt(this.date1.split('-')[0])
const endMonth = parseInt(this.date2.split('-')[1])
const startMonth = parseInt(this.date1.split('-')[1])
const endDate = parseInt(this.date2.split('-')[2])
const startDate = parseInt(this.date1.split('-')[2])
let diff
if ((endMonth - startMonth) === 0) {
diff = endDate - startDate
}
if ((endMonth - startMonth) === 1) {
diff = endDate - startDate + 10
}
if ((endMonth - startMonth) > 1 || (endYear - startYear) !== 0) {
diff = 999
}
if (diff > 6) {
this.$message.warning('选择时间区间不得超过6天')
} else {
getData3(this.MachineValue1, this.date1, this.date2).then(response => {
this.table1 = response.data
console.log(this.table1)
}).then(() => {
this.drawLine3()
})
}
}
},
// 绘制图形
drawLine() {
@@ -388,18 +412,19 @@ export default {
return params.value[1].substr(11, 5) + '~' + params.value[2].substr(11, 5)
} // 数据的值
},
legend: { // 图例
left: 'left'
// selectedMode: false, // 图例可点击
legend: {
orient: 'vertical',
x: 'left',
data: ['运行', '停机', '等待']
},
dataZoom: [{
type: 'inside',
start: 0,
end: 50
end: 100
}, { // X轴可调
xAxisIndex: 0,
start: 0,
end: 50,
end: 100,
handleIcon: 'M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4v1.3h1.3v-1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7V23h6.6V24.4z M13.3,19.6H6.7v-1.4h6.6V19.6z',
handleSize: '80%',
handleStyle: {