6车间看板
This commit is contained in:
parent
495955c495
commit
64b6b7b3dc
|
@ -104,7 +104,7 @@ export default {
|
|||
right: 0,
|
||||
data: [{
|
||||
backgroundColor: 'rgb(1,235,239)',
|
||||
name: '棒',
|
||||
name: '光纤预制棒',
|
||||
itemStyle: {
|
||||
// color:'rgb(1,235,239)',
|
||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||
|
@ -121,7 +121,7 @@ export default {
|
|||
color: '#fff'
|
||||
}
|
||||
}, {
|
||||
name: '管',
|
||||
name: '光纤预制管',
|
||||
textStyle: {
|
||||
color: '#fff'
|
||||
}
|
||||
|
@ -183,7 +183,7 @@ export default {
|
|||
],
|
||||
series: [
|
||||
{
|
||||
name: '棒',
|
||||
name: '光纤预制棒',
|
||||
type: 'bar',
|
||||
stack: 'Total',
|
||||
smooth: true,
|
||||
|
@ -227,7 +227,7 @@ export default {
|
|||
data: []
|
||||
},
|
||||
{
|
||||
name: '管',
|
||||
name: '光纤预制管',
|
||||
type: 'bar',
|
||||
stack: 'Total',
|
||||
smooth: true,
|
||||
|
@ -291,6 +291,7 @@ export default {
|
|||
scrollVivible:true,
|
||||
dayInterval:null,
|
||||
chartInterval1:null,
|
||||
chartInterval2:null,
|
||||
currentTime:'',
|
||||
currentDay:'',
|
||||
|
||||
|
@ -319,13 +320,7 @@ export default {
|
|||
this.today = year+'-'+month+'-'+day;
|
||||
let yesterday = new Date(date.getTime()-24*60*60*1000);
|
||||
this.yesterday = yesterday.getFullYear()+"-" + (yesterday.getMonth()+1) + "-" + yesterday.getDate();
|
||||
|
||||
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.getTodayMtask();//今日任务
|
||||
//昨日工序进度
|
||||
|
@ -457,7 +452,7 @@ export default {
|
|||
let obj ={
|
||||
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车间"},
|
||||
};
|
||||
//生产车间按日统计
|
||||
|
@ -469,6 +464,7 @@ export default {
|
|||
let day = i+1;
|
||||
let text = day+'日';
|
||||
xAxisData1[i]=text;
|
||||
seriesData1.push(0);
|
||||
}
|
||||
if(list1.length>0){
|
||||
list1.forEach(item1=>{
|
||||
|
@ -476,9 +472,6 @@ export default {
|
|||
seriesData1[index1] = item1.生产数;
|
||||
})
|
||||
}
|
||||
console.log(xAxisData1)
|
||||
console.log(seriesData1)
|
||||
console.log('00000000000')
|
||||
let chart1Option = deepCopy(this.basicOption)
|
||||
chart1Option.xAxis.data = xAxisData1;
|
||||
chart1Option.series[0].data=seriesData1;
|
||||
|
@ -497,15 +490,33 @@ export default {
|
|||
debugger;
|
||||
});
|
||||
//本月交付统计
|
||||
that.$API.bi.dataset.exec.req('saleOutDay', obj1).then((saleOutRes) => {
|
||||
that.$API.bi.dataset.exec.req('saleOutDay', obj2).then((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 = {
|
||||
// icon: "stack",
|
||||
// right: 0,
|
||||
// data: [{
|
||||
// backgroundColor: 'rgb(250,205,0)',
|
||||
// name: '合格率',
|
||||
// name: '生产交付',
|
||||
// itemStyle: {
|
||||
// color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||
// {
|
||||
|
@ -523,63 +534,106 @@ export default {
|
|||
// }
|
||||
// }],
|
||||
// };
|
||||
// let series2=[{
|
||||
// name: '合格率',
|
||||
// type: 'line',
|
||||
// smooth: true,
|
||||
// lineStyle: {
|
||||
// width: 1, color: 'rgb(1,235,239)'
|
||||
// },
|
||||
// showSymbol: false,
|
||||
// areaStyle: {
|
||||
// opacity: 0.8,
|
||||
// color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||
// {
|
||||
// offset: 0,
|
||||
// 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: seriesData1
|
||||
// }];
|
||||
// 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);
|
||||
let series2=[{
|
||||
name: '光纤预制管',
|
||||
type: 'line',
|
||||
smooth: true,
|
||||
lineStyle: {
|
||||
width: 1, color: 'rgb(1,235,239)'
|
||||
},
|
||||
showSymbol: false,
|
||||
areaStyle: {
|
||||
opacity: 0.8,
|
||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||
{
|
||||
offset: 0,
|
||||
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
|
||||
},{
|
||||
name: '光纤预制棒',
|
||||
type: 'line',
|
||||
smooth: true,
|
||||
lineStyle: {
|
||||
width: 1, color: 'rgb(1,235,239)'
|
||||
},
|
||||
showSymbol: false,
|
||||
areaStyle: {
|
||||
opacity: 0.8,
|
||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||
{
|
||||
offset: 0,
|
||||
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;
|
||||
});
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue