|
@@ -633,7 +633,7 @@ export default {
|
|
|
cellStyle: { padding: 0 + 'px' },
|
|
|
timer: null,
|
|
|
clickKey: 0,
|
|
|
- isClick: false
|
|
|
+ isClick: false,
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
@@ -878,17 +878,39 @@ export default {
|
|
|
color: ['#ff0000', '#5199e5', '#fdb06a', '#fb8b73'], // 关键加上这句话,legend的颜色和折线的自定义颜色就一致了
|
|
|
grid: {
|
|
|
bottom: '10%'
|
|
|
- },
|
|
|
- legend: [{
|
|
|
- itemWidth: 15, itemHeight: 7, right: '25%', textStyle: { fontSize: 12 },
|
|
|
- data: [{ name: '设计重量' }, { name: '实际重量' }]
|
|
|
- }, {
|
|
|
- itemWidth: 15, itemHeight: 15, right: '0', textStyle: { fontSize: 12 },
|
|
|
- data: [{ name: '开始重量', icon: 'image://https://kptyun.cn:8081/file/pic/3.png' }, { name: '结束重量', icon: 'image://https://kptyun.cn:8081/file/pic/4.png' }]
|
|
|
+ },
|
|
|
+ legend: [{
|
|
|
+ itemWidth: 15, itemHeight: 7, right: '25%', textStyle: { fontSize: 12 },
|
|
|
+ data: [{ name: '设计重量' }, { name: '实际重量' }]
|
|
|
+ }, {
|
|
|
+ itemWidth: 5, itemHeight: 5, right: '0', textStyle: { fontSize: 12 },
|
|
|
+ data: [
|
|
|
+ { name: '开始重量' },
|
|
|
+ { name: '结束重量' }
|
|
|
+ ]
|
|
|
}],
|
|
|
- tooltip: {
|
|
|
- trigger: 'axis'
|
|
|
- },
|
|
|
+ tooltip: {
|
|
|
+ trigger: 'axis',
|
|
|
+ formatter: function(params) {
|
|
|
+ // console.log(params, 'params')
|
|
|
+ var tip = params[0].name
|
|
|
+ for (let i = 0; i < params.length; i++) {
|
|
|
+ if (params[i].seriesName == '设计重量') {
|
|
|
+ tip += '<br>' + params[i].seriesName + ':' + params[i].value[1]
|
|
|
+ }
|
|
|
+ if (params[i].seriesName == '实际重量') {
|
|
|
+ tip += '<br>' + params[i].seriesName + ':' + params[i].value[1]
|
|
|
+ }
|
|
|
+ if (params[i].seriesName == '开始重量') {
|
|
|
+ tip += '<br>' + params[i].seriesName + ':' + params[i].value[1]
|
|
|
+ }
|
|
|
+ if (params[i].seriesName == '结束重量') {
|
|
|
+ tip += '<br>' + params[i].seriesName + ':' + params[i].value[1] + '<br>' + params[i].value[2] + params[i].value[3]
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return tip
|
|
|
+ }
|
|
|
+ },
|
|
|
calculable: true,
|
|
|
yAxis: [
|
|
|
{ type: 'value', name: '重量(kg)', splitLine: { show: false }, axisLabel: { show: true, textStyle: { color: '#666' }}}
|
|
@@ -910,8 +932,8 @@ export default {
|
|
|
series: [
|
|
|
{ symbol: 'none', name: '实际重量', type: 'line', data: chartLine_data.data3, itemStyle: { normal: { lineStyle: { color: '#ff0000' ,width:2}}}},
|
|
|
{ symbol: 'none', name: '设计重量', type: 'line', data: chartLine_data.data2, itemStyle: { normal: { lineStyle: { width:2}}}},
|
|
|
- { name: '开始重量', symbol: 'image://https://kptyun.cn:8081/file/pic/3.png', symbolSize: 6, type: 'scatter', data: chartLine_data.data4 },
|
|
|
- { name: '结束重量', symbol: 'image://https://kptyun.cn:8081/file/pic/4.png', symbolSize: 6, type: 'scatter', data: chartLine_data.data5 }
|
|
|
+ { name: '开始重量', symbolSize: 6, type: 'scatter', data: chartLine_data.data4 },
|
|
|
+ { name: '结束重量', symbolSize: 6, type: 'scatter', data: chartLine_data.data5 }
|
|
|
]
|
|
|
}
|
|
|
this.row2.chart3.chartLine.setOption(option)
|
|
@@ -1083,31 +1105,33 @@ export default {
|
|
|
this.row3.chart1.listLoading = true
|
|
|
GetReportform(this.row3.chart1.getdataListParm).then(response => {
|
|
|
if (response.data !== null && response.data.list !== null) {
|
|
|
- console.log('计划统计数据', response.data.list)
|
|
|
- for (let i = 0; i < response.data.data.length; i++) {
|
|
|
- if (response.data.data[i].实际量 !== '' && response.data.data[i].实际量 !== undefined) {
|
|
|
- response.data.data[i].实际量 = parseFloat(response.data.data[i].实际量)
|
|
|
- }
|
|
|
- if (response.data.data[i].理论量 !== '' && response.data.data[i].理论量 !== undefined) {
|
|
|
- response.data.data[i].理论量 = parseFloat(response.data.data[i].理论量)
|
|
|
- }
|
|
|
- if (response.data.data[i].field1 !== '' && response.data.data[i].field1 !== undefined) {
|
|
|
- response.data.data[i].field1 = parseFloat(response.data.data[i].field1)
|
|
|
- }
|
|
|
- if (response.data.data[i].计划取消重量 !== '' && response.data.data[i].计划取消重量 !== undefined) {
|
|
|
- response.data.data[i].计划取消重量 = parseFloat(response.data.data[i].计划取消重量)
|
|
|
- }
|
|
|
- if (response.data.data[i].field3 !== '' && response.data.data[i].field3 !== undefined) {
|
|
|
- response.data.data[i].field3 = parseFloat(response.data.data[i].field3)
|
|
|
- }
|
|
|
- if (response.data.data[i].正确数 !== '' && response.data.data[i].正确数 !== undefined) {
|
|
|
- response.data.data[i].正确数 = parseFloat(response.data.data[i].正确数)
|
|
|
- }
|
|
|
- if (response.data.data[i].计划数 !== '' && response.data.data[i].计划数 !== undefined) {
|
|
|
- response.data.data[i].计划数 = parseFloat(response.data.data[i].计划数)
|
|
|
- }
|
|
|
- if (response.data.data[i].field2 !== '' && response.data.data[i].field2 !== undefined) {
|
|
|
- response.data.data[i].field2 = parseFloat(response.data.data[i].field2)
|
|
|
+ console.log('计划统计数据', response.data.list)
|
|
|
+ if(response.data.data){
|
|
|
+ for (let i = 0; i < response.data.data.length; i++) {
|
|
|
+ if (response.data.data[i].实际量 !== '' && response.data.data[i].实际量 !== undefined) {
|
|
|
+ response.data.data[i].实际量 = parseFloat(response.data.data[i].实际量)
|
|
|
+ }
|
|
|
+ if (response.data.data[i].理论量 !== '' && response.data.data[i].理论量 !== undefined) {
|
|
|
+ response.data.data[i].理论量 = parseFloat(response.data.data[i].理论量)
|
|
|
+ }
|
|
|
+ if (response.data.data[i].field1 !== '' && response.data.data[i].field1 !== undefined) {
|
|
|
+ response.data.data[i].field1 = parseFloat(response.data.data[i].field1)
|
|
|
+ }
|
|
|
+ if (response.data.data[i].计划取消重量 !== '' && response.data.data[i].计划取消重量 !== undefined) {
|
|
|
+ response.data.data[i].计划取消重量 = parseFloat(response.data.data[i].计划取消重量)
|
|
|
+ }
|
|
|
+ if (response.data.data[i].field3 !== '' && response.data.data[i].field3 !== undefined) {
|
|
|
+ response.data.data[i].field3 = parseFloat(response.data.data[i].field3)
|
|
|
+ }
|
|
|
+ if (response.data.data[i].正确数 !== '' && response.data.data[i].正确数 !== undefined) {
|
|
|
+ response.data.data[i].正确数 = parseFloat(response.data.data[i].正确数)
|
|
|
+ }
|
|
|
+ if (response.data.data[i].计划数 !== '' && response.data.data[i].计划数 !== undefined) {
|
|
|
+ response.data.data[i].计划数 = parseFloat(response.data.data[i].计划数)
|
|
|
+ }
|
|
|
+ if (response.data.data[i].field2 !== '' && response.data.data[i].field2 !== undefined) {
|
|
|
+ response.data.data[i].field2 = parseFloat(response.data.data[i].field2)
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
this.row3.chart1.table.list = response.data.data
|
|
@@ -1309,10 +1333,12 @@ export default {
|
|
|
this.row4.chart2.listLoading = true
|
|
|
GetReportform(this.row4.chart2.getdataListParm).then(response => {
|
|
|
if (response.data !== null && response.data.list !== null) {
|
|
|
- console.log('混料实际重量统计数据', response.data.list)
|
|
|
- for (let i = 0; i < response.data.data.length; i++) {
|
|
|
- if (response.data.data[i].field1 !== '' && response.data.data[i].field1 !== undefined) {
|
|
|
- response.data.data[i].field1 = parseFloat(response.data.data[i].field1)
|
|
|
+ console.log('混料实际重量统计数据', response.data.data)
|
|
|
+ if(response.data.data){
|
|
|
+ for (let i = 0; i < response.data.data.length; i++) {
|
|
|
+ if (response.data.data[i].field1 !== '' && response.data.data[i].field1 !== undefined) {
|
|
|
+ response.data.data[i].field1 = parseFloat(response.data.data[i].field1)
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
this.row4.chart2.table.list = response.data.data
|