|
@@ -378,6 +378,7 @@
|
|
|
<div class="title">
|
|
|
<div class="img-title" />
|
|
|
<span class="content">库存预警</span>
|
|
|
+ <a style="float: right;color: #009C69;font-size: 12px;margin-right: 10px;" @click="handleMore">查看更多 >></a>
|
|
|
<a style="float: right;color: #c88d42;font-size: 12px;margin-right: 10px;" @click="handleMore">查看更多 >></a>
|
|
|
</div>
|
|
|
<div id="table" style="height: 330px;background: #fff;">
|
|
@@ -633,7 +634,7 @@ export default {
|
|
|
cellStyle: { padding: 0 + 'px' },
|
|
|
timer: null,
|
|
|
clickKey: 0,
|
|
|
- isClick: false
|
|
|
+ isClick: false,
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
@@ -881,13 +882,35 @@ export default {
|
|
|
},
|
|
|
legend: [{
|
|
|
itemWidth: 15, itemHeight: 7, right: '25%', textStyle: { fontSize: 12 },
|
|
|
- data: [{ name: '设计重量' }, { name: '实际重量' }]
|
|
|
+ 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' }]
|
|
|
+ itemWidth: 5, itemHeight: 5, right: '0', textStyle: { fontSize: 12 },
|
|
|
+ data: [
|
|
|
+ { name: '开始重量' },
|
|
|
+ { name: '结束重量' }
|
|
|
+ ]
|
|
|
}],
|
|
|
tooltip: {
|
|
|
- trigger: 'axis'
|
|
|
+ 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: [
|
|
@@ -910,8 +933,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)
|
|
@@ -1084,30 +1107,32 @@ export default {
|
|
|
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)
|
|
|
+ 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 +1334,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
|