|
@@ -251,14 +251,13 @@ export default {
|
|
let times = []
|
|
let times = []
|
|
let pcDatas = []
|
|
let pcDatas = []
|
|
let zqlDatas = []
|
|
let zqlDatas = []
|
|
- console.log(this.tableData)
|
|
|
|
this.tableData.forEach(t => {
|
|
this.tableData.forEach(t => {
|
|
times.push(t.time)
|
|
times.push(t.time)
|
|
zqlDatas.push(t.accuracy.replace("%", ""))
|
|
zqlDatas.push(t.accuracy.replace("%", ""))
|
|
pcDatas.push(t.deviationSum == null ? "" : t.deviationSum.replace("%", ""))
|
|
pcDatas.push(t.deviationSum == null ? "" : t.deviationSum.replace("%", ""))
|
|
})
|
|
})
|
|
this.pcDraw(times, pcDatas)
|
|
this.pcDraw(times, pcDatas)
|
|
- this.zqlDraw(times, zqlDatas)
|
|
|
|
|
|
+ this.zqlDraw(times, zqlDatas,this.forecastType)
|
|
this.loading = false
|
|
this.loading = false
|
|
}).catch(() => {
|
|
}).catch(() => {
|
|
this.loading = false
|
|
this.loading = false
|
|
@@ -273,7 +272,7 @@ export default {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- zqlDraw(times, datas) {
|
|
|
|
|
|
+ zqlDraw(times, datas,forecastType) {
|
|
this.zqlChart = echarts.init(document.getElementById('zqlCharts'), "dark", {renderer: 'svg'})
|
|
this.zqlChart = echarts.init(document.getElementById('zqlCharts'), "dark", {renderer: 'svg'})
|
|
let option = {
|
|
let option = {
|
|
backgroundColor: 'transparent',
|
|
backgroundColor: 'transparent',
|
|
@@ -325,9 +324,9 @@ export default {
|
|
type: 'inside'
|
|
type: 'inside'
|
|
}],
|
|
}],
|
|
grid: {
|
|
grid: {
|
|
- top: 100,
|
|
|
|
|
|
+ top: '12%',
|
|
left: '3%',
|
|
left: '3%',
|
|
- right: '3%',
|
|
|
|
|
|
+ right: '4%',
|
|
bottom: '10%',
|
|
bottom: '10%',
|
|
containLabel: true
|
|
containLabel: true
|
|
},
|
|
},
|
|
@@ -343,7 +342,7 @@ export default {
|
|
}],
|
|
}],
|
|
yAxis: [{
|
|
yAxis: [{
|
|
type: 'value',
|
|
type: 'value',
|
|
- name: '%',
|
|
|
|
|
|
+ // name: '%',
|
|
max: 100,
|
|
max: 100,
|
|
min: 0,
|
|
min: 0,
|
|
axisTick: {
|
|
axisTick: {
|
|
@@ -369,7 +368,10 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}],
|
|
}],
|
|
- series: [
|
|
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ if (forecastType === 'cdq'){
|
|
|
|
+ option.series=[
|
|
{
|
|
{
|
|
name: '准确率(%)',
|
|
name: '准确率(%)',
|
|
type: 'line',
|
|
type: 'line',
|
|
@@ -393,7 +395,7 @@ export default {
|
|
data: [{
|
|
data: [{
|
|
label: {
|
|
label: {
|
|
position: 'start',
|
|
position: 'start',
|
|
- formatter: "标准线"
|
|
|
|
|
|
+ formatter: "合格(75%)"
|
|
},
|
|
},
|
|
yAxis: 75
|
|
yAxis: 75
|
|
}]
|
|
}]
|
|
@@ -408,8 +410,40 @@ export default {
|
|
data: datas
|
|
data: datas
|
|
}
|
|
}
|
|
]
|
|
]
|
|
|
|
+ }else {
|
|
|
|
+ option.series= [
|
|
|
|
+ {
|
|
|
|
+ name: '准确率(%)',
|
|
|
|
+ type: 'line',
|
|
|
|
+ smooth: false,
|
|
|
|
+ symbol: 'circle',
|
|
|
|
+ symbolSize: 5,
|
|
|
|
+ showSymbol: true,
|
|
|
|
+ lineStyle: {
|
|
|
|
+ normal: {
|
|
|
|
+ width: 2
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ markLine: {
|
|
|
|
+ silent: true,
|
|
|
|
+ itemStyle: {
|
|
|
|
+ normal: {
|
|
|
|
+ show: true,
|
|
|
|
+ color: 'red'
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ itemStyle: {
|
|
|
|
+ normal: {
|
|
|
|
+ color: 'rgb(213,219,50)',
|
|
|
|
+ borderColor: 'rgba(16,217,16,0.96)',
|
|
|
|
+ borderWidth: 12
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ data: datas
|
|
|
|
+ }
|
|
|
|
+ ]
|
|
}
|
|
}
|
|
-
|
|
|
|
this.zqlChart.setOption(option, true)
|
|
this.zqlChart.setOption(option, true)
|
|
var _this = this
|
|
var _this = this
|
|
window.addEventListener("resize", function () {
|
|
window.addEventListener("resize", function () {
|
|
@@ -470,8 +504,8 @@ export default {
|
|
}],
|
|
}],
|
|
grid: {
|
|
grid: {
|
|
top: 100,
|
|
top: 100,
|
|
- left: '3%',
|
|
|
|
- right: '3%',
|
|
|
|
|
|
+ left: '4%',
|
|
|
|
+ right: '4%',
|
|
bottom: '10%',
|
|
bottom: '10%',
|
|
containLabel: true
|
|
containLabel: true
|
|
},
|
|
},
|
|
@@ -536,7 +570,6 @@ export default {
|
|
]
|
|
]
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
this.pcChart.setOption(option, true)
|
|
this.pcChart.setOption(option, true)
|
|
var _this = this
|
|
var _this = this
|
|
window.addEventListener("resize", function () {
|
|
window.addEventListener("resize", function () {
|