|
|
@@ -1,9 +1,10 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
+ <!-- 年度开工率 -->
|
|
|
<Echart
|
|
|
:options="options"
|
|
|
- id="bottom1Chart"
|
|
|
- height="265px"
|
|
|
+ id="leftup1Chart"
|
|
|
+ height="400px"
|
|
|
width="100%"
|
|
|
ref="column-board"
|
|
|
></Echart>
|
|
|
@@ -12,11 +13,10 @@
|
|
|
|
|
|
<script>
|
|
|
import Echart from '@/common/echart'
|
|
|
-//import { formatDate } from '../../../../utils/index.js'
|
|
|
export default {
|
|
|
data () {
|
|
|
return {
|
|
|
- timing :null,
|
|
|
+ timing: null,
|
|
|
options:{
|
|
|
tooltip: {
|
|
|
trigger: 'axis',
|
|
|
@@ -56,7 +56,7 @@ export default {
|
|
|
},
|
|
|
{
|
|
|
type: 'value',
|
|
|
- /*name: 'rate',*/
|
|
|
+ name: '',
|
|
|
min: 0,
|
|
|
max: 100,
|
|
|
interval: 20,
|
|
|
@@ -72,9 +72,9 @@ export default {
|
|
|
],
|
|
|
series: [
|
|
|
{
|
|
|
- name: '投入',
|
|
|
+ name: '计划数',
|
|
|
type: 'bar',
|
|
|
- barWidth: 20,
|
|
|
+ barWidth: 25,
|
|
|
emphasis: {
|
|
|
focus: 'series'
|
|
|
},
|
|
|
@@ -84,14 +84,13 @@ export default {
|
|
|
position: 'top',
|
|
|
fontSize:14,
|
|
|
fontWeight: "bold",
|
|
|
- color:"inherit",
|
|
|
- //color:'#2d8cf0',
|
|
|
+ color: "inherit"
|
|
|
},
|
|
|
},
|
|
|
{
|
|
|
- name: '产出',
|
|
|
+ name: '达成数',
|
|
|
type: 'bar',
|
|
|
- barWidth: 20,
|
|
|
+ barWidth: 25,
|
|
|
stack: 'Ad',
|
|
|
emphasis: {
|
|
|
focus: 'series'
|
|
|
@@ -99,63 +98,46 @@ export default {
|
|
|
data:[],
|
|
|
label: {
|
|
|
show: true,
|
|
|
- position: 'top',
|
|
|
+ position: 'inside',
|
|
|
fontSize:14,
|
|
|
fontWeight: "bold",
|
|
|
- color:"inherit",
|
|
|
- // color:'#19be6b',
|
|
|
+ color:'#fff'
|
|
|
},
|
|
|
},
|
|
|
{
|
|
|
name: '不良',
|
|
|
type: 'bar',
|
|
|
stack: 'Ad',
|
|
|
- barWidth: 20,
|
|
|
+ barWidth: 25,
|
|
|
data:[],
|
|
|
- //data: [12, 22, 32, 12, 32, 12, 32],
|
|
|
emphasis: {
|
|
|
focus: 'series'
|
|
|
},
|
|
|
- },
|
|
|
- {
|
|
|
- name: 'UPPH',
|
|
|
- type: 'bar',
|
|
|
- barWidth: 20,
|
|
|
- emphasis: {
|
|
|
- focus: 'series'
|
|
|
- },
|
|
|
- data:[],
|
|
|
label: {
|
|
|
- show: true,
|
|
|
+ show: false,
|
|
|
position: 'top',
|
|
|
fontSize:14,
|
|
|
- fontWeight: "bold",
|
|
|
- color: "#ea7ccc",
|
|
|
+ color: "inherit"
|
|
|
},
|
|
|
},
|
|
|
{
|
|
|
- name: '良率%',
|
|
|
+ name: '计划达成率%',
|
|
|
type: 'line',
|
|
|
data:[],
|
|
|
yAxisIndex: 1,
|
|
|
- symbolSize: 4,
|
|
|
- label: {
|
|
|
- show: true,
|
|
|
- position: 'top',
|
|
|
- color:'#fff'
|
|
|
- },
|
|
|
+ symbolSize: 8,
|
|
|
tooltip: {
|
|
|
valueFormatter: function (value) {
|
|
|
return value + '%';
|
|
|
}
|
|
|
},
|
|
|
lineStyle: {
|
|
|
- width: 3
|
|
|
+ width: 4
|
|
|
},
|
|
|
itemStyle: {
|
|
|
normal: {
|
|
|
barBorderRadius: 6,
|
|
|
- color: "rgb(59, 162, 114)"
|
|
|
+ color: "rgba(156,107,211,0.8)"
|
|
|
/* color: new this.$echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
|
|
{ offset: 0, color: "rgba(156,107,211,0.8)" },
|
|
|
{ offset: 0.2, color: "rgba(156,107,211,0.5)" },
|
|
|
@@ -165,38 +147,46 @@ export default {
|
|
|
},
|
|
|
emphasis: {
|
|
|
focus: 'series'
|
|
|
- }
|
|
|
+ },
|
|
|
+ label: {
|
|
|
+ show: true,
|
|
|
+ position: 'top',
|
|
|
+ fontSize:14,
|
|
|
+ fontWeight: "bold",
|
|
|
+ color:'#fff'
|
|
|
+ },
|
|
|
},
|
|
|
{
|
|
|
- name: 'UPH',
|
|
|
+ name: '良率%',
|
|
|
type: 'line',
|
|
|
+ symbolSize: 8,
|
|
|
barWidth: 15,
|
|
|
data:[],
|
|
|
- //data: [12, 22, 32, 12, 32, 12, 32],
|
|
|
emphasis: {
|
|
|
focus: 'series'
|
|
|
- },lineStyle: {
|
|
|
- width: 3
|
|
|
},
|
|
|
- /* label: {
|
|
|
- show: true,
|
|
|
- position: 'top',
|
|
|
- fontSize:14,
|
|
|
- fontWeight: "bold",
|
|
|
- color: "#ea7ccc",
|
|
|
- },*/
|
|
|
+ lineStyle: {
|
|
|
+ width: 4
|
|
|
+ },
|
|
|
itemStyle: {
|
|
|
normal: {
|
|
|
barBorderRadius: 6,
|
|
|
- color: "#ea7ccc",
|
|
|
+ color: "rgb(174,228,187)"
|
|
|
/* color: new this.$echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
|
|
{ offset: 0, color: "rgba(156,107,211,0.8)" },
|
|
|
{ offset: 0.2, color: "rgba(156,107,211,0.5)" },
|
|
|
{ offset: 1, color: "rgba(156,107,211,0.2)" }
|
|
|
])*/
|
|
|
}
|
|
|
+ },
|
|
|
+ label: {
|
|
|
+ show: true,
|
|
|
+ position: 'top',
|
|
|
+ fontSize:14,
|
|
|
+ fontWeight: "bold",
|
|
|
+ color:'#fff'
|
|
|
}
|
|
|
- },
|
|
|
+ }
|
|
|
]
|
|
|
},
|
|
|
};
|
|
|
@@ -212,7 +202,6 @@ export default {
|
|
|
},
|
|
|
|
|
|
mounted() {
|
|
|
- this.getdata();
|
|
|
this.refreshdata();
|
|
|
},
|
|
|
beforeDestroy () {
|
|
|
@@ -220,15 +209,16 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
refreshdata() {
|
|
|
+ this.getdata();
|
|
|
this.timing = setInterval(() => {
|
|
|
this.getdata(); //获取-数据
|
|
|
}, 30000);
|
|
|
},
|
|
|
async getdata() {
|
|
|
- var caller = 'KB!LongLineHourQTY';
|
|
|
+ var caller = 'KB!ALLWC!MAKEDETAIL';
|
|
|
await this.$http.get("kanban/datalist.action?caller="+caller+"&_noc=1&page=1&pageSize=100",{
|
|
|
params: {
|
|
|
- condition: "V_OUTLINE='"+sessionStorage.getItem('ul_code')+"'",
|
|
|
+ condition: "1=1",
|
|
|
}
|
|
|
}).then((result)=>{
|
|
|
let dataList = JSON.parse(result.data.data);
|
|
|
@@ -238,41 +228,34 @@ export default {
|
|
|
let series2 = new Array();
|
|
|
let series3 = new Array();
|
|
|
let series4 = new Array();
|
|
|
- let series5 = new Array();
|
|
|
- var maxnumber=0;
|
|
|
- for (let index = 0; index < dataList.length; index++) {
|
|
|
- const element = dataList[index];
|
|
|
- xAxis0.push(element.v_period);
|
|
|
- //投入
|
|
|
- series0.push(element.v_inqty);
|
|
|
- if(element.v_inqty>maxnumber){
|
|
|
- maxnumber= element.v_inqty;
|
|
|
- }
|
|
|
- //产出
|
|
|
- series1.push(element.v_outqty);
|
|
|
- if(element.v_outqty>maxnumber){
|
|
|
- maxnumber= element.v_outqty;
|
|
|
- }
|
|
|
- //不良
|
|
|
- series2.push(element.v_ngqty);
|
|
|
- //upph
|
|
|
- series3.push(element.upph);
|
|
|
- //良率
|
|
|
- series4.push(element.v_okrate);
|
|
|
- //UPH
|
|
|
- series5.push(element.uph);
|
|
|
- if(element.uph>maxnumber){
|
|
|
- maxnumber= element.uph;
|
|
|
- }
|
|
|
- }
|
|
|
- this.options.xAxis[0].data = xAxis0;
|
|
|
- this.options.series[0].data = series0;
|
|
|
- this.options.series[1].data = series1;
|
|
|
- this.options.series[2].data = series2;
|
|
|
- this.options.series[3].data = series3;
|
|
|
- this.options.series[4].data = series4;
|
|
|
- this.options.series[5].data = series5;
|
|
|
- this.options.yAxis[0].max = (maxnumber*1.2).toFixed();
|
|
|
+ var maxnumber=0;
|
|
|
+ for (let index = 0; index < dataList.length; index++) {
|
|
|
+ const element = dataList[index];
|
|
|
+ xAxis0.push(element.v_wccode);
|
|
|
+ //计划数
|
|
|
+ series0.push(element.v_planqty);
|
|
|
+ if(element.v_planqty>maxnumber){
|
|
|
+ maxnumber= element.v_planqty;
|
|
|
+ }
|
|
|
+ //达成数
|
|
|
+ series1.push(element.v_outqty);
|
|
|
+ if(element.v_outqty>maxnumber){
|
|
|
+ maxnumber= element.v_outqty;
|
|
|
+ }
|
|
|
+ //不良
|
|
|
+ series2.push(element.v_ngqty);
|
|
|
+ //计划达成率
|
|
|
+ series3.push(element.v_finishrate);
|
|
|
+ //良率
|
|
|
+ series4.push(element.v_okrate);
|
|
|
+ }
|
|
|
+ this.options.xAxis[0].data = xAxis0;
|
|
|
+ this.options.series[0].data = series0;
|
|
|
+ this.options.series[1].data = series1;
|
|
|
+ this.options.series[2].data = series2;
|
|
|
+ this.options.series[3].data = series3;
|
|
|
+ this.options.series[4].data = series4;
|
|
|
+ this.options.yAxis[0].max = (maxnumber*1.2).toFixed();
|
|
|
},(result)=>{
|
|
|
console.error(result)
|
|
|
}
|