6车间看板
This commit is contained in:
parent
495955c495
commit
64b6b7b3dc
|
@ -104,7 +104,7 @@ export default {
|
||||||
right: 0,
|
right: 0,
|
||||||
data: [{
|
data: [{
|
||||||
backgroundColor: 'rgb(1,235,239)',
|
backgroundColor: 'rgb(1,235,239)',
|
||||||
name: '棒',
|
name: '光纤预制棒',
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
// color:'rgb(1,235,239)',
|
// color:'rgb(1,235,239)',
|
||||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||||
|
@ -121,7 +121,7 @@ export default {
|
||||||
color: '#fff'
|
color: '#fff'
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
name: '管',
|
name: '光纤预制管',
|
||||||
textStyle: {
|
textStyle: {
|
||||||
color: '#fff'
|
color: '#fff'
|
||||||
}
|
}
|
||||||
|
@ -183,7 +183,7 @@ export default {
|
||||||
],
|
],
|
||||||
series: [
|
series: [
|
||||||
{
|
{
|
||||||
name: '棒',
|
name: '光纤预制棒',
|
||||||
type: 'bar',
|
type: 'bar',
|
||||||
stack: 'Total',
|
stack: 'Total',
|
||||||
smooth: true,
|
smooth: true,
|
||||||
|
@ -227,7 +227,7 @@ export default {
|
||||||
data: []
|
data: []
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '管',
|
name: '光纤预制管',
|
||||||
type: 'bar',
|
type: 'bar',
|
||||||
stack: 'Total',
|
stack: 'Total',
|
||||||
smooth: true,
|
smooth: true,
|
||||||
|
@ -291,6 +291,7 @@ export default {
|
||||||
scrollVivible:true,
|
scrollVivible:true,
|
||||||
dayInterval:null,
|
dayInterval:null,
|
||||||
chartInterval1:null,
|
chartInterval1:null,
|
||||||
|
chartInterval2:null,
|
||||||
currentTime:'',
|
currentTime:'',
|
||||||
currentDay:'',
|
currentDay:'',
|
||||||
|
|
||||||
|
@ -319,13 +320,7 @@ export default {
|
||||||
this.today = year+'-'+month+'-'+day;
|
this.today = year+'-'+month+'-'+day;
|
||||||
let yesterday = new Date(date.getTime()-24*60*60*1000);
|
let yesterday = new Date(date.getTime()-24*60*60*1000);
|
||||||
this.yesterday = yesterday.getFullYear()+"-" + (yesterday.getMonth()+1) + "-" + yesterday.getDate();
|
this.yesterday = yesterday.getFullYear()+"-" + (yesterday.getMonth()+1) + "-" + yesterday.getDate();
|
||||||
|
|
||||||
this.getsaleOut();
|
this.getsaleOut();
|
||||||
let chart2Option = deepCopy(this.basicOption)
|
|
||||||
chart2Option.yAxis[0].name = '交付统计';
|
|
||||||
chart2Option.series[0].type = 'line';
|
|
||||||
chart2Option.series[1].type = 'line';
|
|
||||||
this.setChart("chart2", chart2Option)
|
|
||||||
this.getMioItem();//发货情况
|
this.getMioItem();//发货情况
|
||||||
this.getTodayMtask();//今日任务
|
this.getTodayMtask();//今日任务
|
||||||
//昨日工序进度
|
//昨日工序进度
|
||||||
|
@ -457,7 +452,7 @@ export default {
|
||||||
let obj ={
|
let obj ={
|
||||||
query: {start_date:this.start_date,end_date:this.end_date,dept_name: "6车间"},
|
query: {start_date:this.start_date,end_date:this.end_date,dept_name: "6车间"},
|
||||||
};
|
};
|
||||||
let obj1 ={
|
let obj2 ={
|
||||||
query: {start_date:this.start_date,end_date:this.end_date,dept_name: "6车间"},
|
query: {start_date:this.start_date,end_date:this.end_date,dept_name: "6车间"},
|
||||||
};
|
};
|
||||||
//生产车间按日统计
|
//生产车间按日统计
|
||||||
|
@ -469,6 +464,7 @@ export default {
|
||||||
let day = i+1;
|
let day = i+1;
|
||||||
let text = day+'日';
|
let text = day+'日';
|
||||||
xAxisData1[i]=text;
|
xAxisData1[i]=text;
|
||||||
|
seriesData1.push(0);
|
||||||
}
|
}
|
||||||
if(list1.length>0){
|
if(list1.length>0){
|
||||||
list1.forEach(item1=>{
|
list1.forEach(item1=>{
|
||||||
|
@ -476,9 +472,6 @@ export default {
|
||||||
seriesData1[index1] = item1.生产数;
|
seriesData1[index1] = item1.生产数;
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
console.log(xAxisData1)
|
|
||||||
console.log(seriesData1)
|
|
||||||
console.log('00000000000')
|
|
||||||
let chart1Option = deepCopy(this.basicOption)
|
let chart1Option = deepCopy(this.basicOption)
|
||||||
chart1Option.xAxis.data = xAxisData1;
|
chart1Option.xAxis.data = xAxisData1;
|
||||||
chart1Option.series[0].data=seriesData1;
|
chart1Option.series[0].data=seriesData1;
|
||||||
|
@ -497,15 +490,33 @@ export default {
|
||||||
debugger;
|
debugger;
|
||||||
});
|
});
|
||||||
//本月交付统计
|
//本月交付统计
|
||||||
that.$API.bi.dataset.exec.req('saleOutDay', obj1).then((saleOutRes) => {
|
that.$API.bi.dataset.exec.req('saleOutDay', obj2).then((saleOutRes) => {
|
||||||
console.log('本月交付统计:',saleOutRes);
|
console.log('本月交付统计:',saleOutRes);
|
||||||
// chart2Option.yAxis.name='合格率';
|
let seriesData2 = [],xAxisData2=[];
|
||||||
|
let list2 = saleOutRes.data2.ds0;
|
||||||
|
for (let i = 0; i < that.days; i++) {
|
||||||
|
let day = i+1;
|
||||||
|
let text = day+'日';
|
||||||
|
xAxisData2[i]=text;
|
||||||
|
seriesData2.push(0)
|
||||||
|
}
|
||||||
|
if(list2.length>0){
|
||||||
|
list2.forEach(item2=>{
|
||||||
|
let index2 = item2.日-1;
|
||||||
|
seriesData2[index2] = item2.交付数;
|
||||||
|
})
|
||||||
|
}
|
||||||
|
let chart2Option = deepCopy(this.basicOption);
|
||||||
|
chart2Option.series[0].type = 'line';
|
||||||
|
chart2Option.series[1].type = 'line';
|
||||||
|
chart2Option.xAxis.data = xAxisData2;
|
||||||
|
chart2Option.yAxis.name='生产交付';
|
||||||
// chart2Option.legend = {
|
// chart2Option.legend = {
|
||||||
// icon: "stack",
|
// icon: "stack",
|
||||||
// right: 0,
|
// right: 0,
|
||||||
// data: [{
|
// data: [{
|
||||||
// backgroundColor: 'rgb(250,205,0)',
|
// backgroundColor: 'rgb(250,205,0)',
|
||||||
// name: '合格率',
|
// name: '生产交付',
|
||||||
// itemStyle: {
|
// itemStyle: {
|
||||||
// color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
// color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||||
// {
|
// {
|
||||||
|
@ -523,63 +534,106 @@ export default {
|
||||||
// }
|
// }
|
||||||
// }],
|
// }],
|
||||||
// };
|
// };
|
||||||
// let series2=[{
|
let series2=[{
|
||||||
// name: '合格率',
|
name: '光纤预制管',
|
||||||
// type: 'line',
|
type: 'line',
|
||||||
// smooth: true,
|
smooth: true,
|
||||||
// lineStyle: {
|
lineStyle: {
|
||||||
// width: 1, color: 'rgb(1,235,239)'
|
width: 1, color: 'rgb(1,235,239)'
|
||||||
// },
|
},
|
||||||
// showSymbol: false,
|
showSymbol: false,
|
||||||
// areaStyle: {
|
areaStyle: {
|
||||||
// opacity: 0.8,
|
opacity: 0.8,
|
||||||
// color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||||
// {
|
{
|
||||||
// offset: 0,
|
offset: 0,
|
||||||
// color: 'rgb(1,235,239)'
|
color: 'rgb(1,235,239)'
|
||||||
// },
|
},
|
||||||
// {
|
{
|
||||||
// offset: 1,
|
offset: 1,
|
||||||
// color: 'rgb(5, 158, 163)'
|
color: 'rgb(5, 158, 163)'
|
||||||
// }
|
}
|
||||||
// ])
|
])
|
||||||
// },
|
},
|
||||||
// emphasis: {
|
emphasis: {
|
||||||
// focus: 'series'
|
focus: 'series'
|
||||||
// },
|
},
|
||||||
// label: {
|
label: {
|
||||||
// show: true,
|
show: true,
|
||||||
// position: 'top',
|
position: 'top',
|
||||||
// color:'#fff'
|
color:'#fff'
|
||||||
// },
|
},
|
||||||
// itemStyle: {
|
itemStyle: {
|
||||||
// borderRadius: [2, 2, 0, 0],
|
borderRadius: [2, 2, 0, 0],
|
||||||
// color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||||
// {
|
{
|
||||||
// offset: 0,
|
offset: 0,
|
||||||
// color: 'rgb(250,205,0)'
|
color: 'rgb(250,205,0)'
|
||||||
// },
|
},
|
||||||
// {
|
{
|
||||||
// offset: 1,
|
offset: 1,
|
||||||
// color: 'rgb(254,129,0)'
|
color: 'rgb(254,129,0)'
|
||||||
// }
|
}
|
||||||
// ])
|
])
|
||||||
// },
|
},
|
||||||
// data: seriesData1
|
data: seriesData2
|
||||||
// }];
|
},{
|
||||||
// chart2Option.series=series2;
|
name: '光纤预制棒',
|
||||||
// let chart2 = this.setChart("chart2", chart2Option);
|
type: 'line',
|
||||||
// let index2 = 0
|
smooth: true,
|
||||||
// this.chartInterval2 = setInterval(function () {
|
lineStyle: {
|
||||||
// if (index2 < chart2Option.series[0].data.length) {
|
width: 1, color: 'rgb(1,235,239)'
|
||||||
// chart2.dispatchAction({ type: 'downplay', seriesIndex: 0 });
|
},
|
||||||
// chart2.dispatchAction({ type: 'highlight', seriesIndex: 0, dataIndex: index2 });
|
showSymbol: false,
|
||||||
// chart2.dispatchAction({ type: 'showTip', seriesIndex: 0, dataIndex: index2 });
|
areaStyle: {
|
||||||
// index2++;
|
opacity: 0.8,
|
||||||
// } else {
|
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||||
// index2 = 0;
|
{
|
||||||
// }
|
offset: 0,
|
||||||
// }, 3000);
|
color: 'rgb(1,235,239)'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
offset: 1,
|
||||||
|
color: 'rgb(5, 158, 163)'
|
||||||
|
}
|
||||||
|
])
|
||||||
|
},
|
||||||
|
emphasis: {
|
||||||
|
focus: 'series'
|
||||||
|
},
|
||||||
|
label: {
|
||||||
|
show: true,
|
||||||
|
position: 'top',
|
||||||
|
color:'#fff'
|
||||||
|
},
|
||||||
|
itemStyle: {
|
||||||
|
borderRadius: [2, 2, 0, 0],
|
||||||
|
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||||
|
{
|
||||||
|
offset: 0,
|
||||||
|
color: 'rgb(250,205,0)'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
offset: 1,
|
||||||
|
color: 'rgb(254,129,0)'
|
||||||
|
}
|
||||||
|
])
|
||||||
|
},
|
||||||
|
data: seriesData2
|
||||||
|
}];
|
||||||
|
chart2Option.series=series2;
|
||||||
|
let chart2 = this.setChart("chart2", chart2Option);
|
||||||
|
let index2 = 0
|
||||||
|
this.chartInterval2 = setInterval(function () {
|
||||||
|
if (index2 < chart2Option.series[0].data.length) {
|
||||||
|
chart2.dispatchAction({ type: 'downplay', seriesIndex: 0 });
|
||||||
|
chart2.dispatchAction({ type: 'highlight', seriesIndex: 0, dataIndex: index2 });
|
||||||
|
chart2.dispatchAction({ type: 'showTip', seriesIndex: 0, dataIndex: index2 });
|
||||||
|
index2++;
|
||||||
|
} else {
|
||||||
|
index2 = 0;
|
||||||
|
}
|
||||||
|
}, 3000);
|
||||||
debugger;
|
debugger;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue