|
|
@@ -4,7 +4,7 @@
|
|
|
<Echart
|
|
|
:options="options"
|
|
|
id="up1Chart"
|
|
|
- height="455px"
|
|
|
+ height="425px"
|
|
|
width="100%"
|
|
|
ref="column-board"
|
|
|
></Echart>
|
|
|
@@ -13,6 +13,7 @@
|
|
|
|
|
|
<script>
|
|
|
import Echart from '@/common/echart'
|
|
|
+//import { formatDate } from '../../../../utils/index.js'
|
|
|
export default {
|
|
|
data () {
|
|
|
return {
|
|
|
@@ -23,12 +24,10 @@ export default {
|
|
|
type: 'shadow'
|
|
|
}
|
|
|
},
|
|
|
- legend: {
|
|
|
- // data: ["标准产量", "实际产量达标","实际产量未达标" ,"抛料PPM"],
|
|
|
- },
|
|
|
+ legend: {},
|
|
|
grid: {
|
|
|
- left: '2%',
|
|
|
- right: '3%',
|
|
|
+ left: '3%',
|
|
|
+ right: '4%',
|
|
|
bottom: '3%',
|
|
|
containLabel: true
|
|
|
},
|
|
|
@@ -36,66 +35,78 @@ export default {
|
|
|
{
|
|
|
type: 'category',
|
|
|
data:[]
|
|
|
+ //data: ['插件-01', '插件-02', '插件-03', '插件-04', '插件-05', '插件-06', '插件-07'],
|
|
|
}
|
|
|
],
|
|
|
yAxis: [
|
|
|
{
|
|
|
type: 'value',
|
|
|
- name: '产量',
|
|
|
},
|
|
|
{
|
|
|
type: 'value',
|
|
|
- name: '抛料PPM',
|
|
|
+ name: 'rate',
|
|
|
min: 0,
|
|
|
- /* max: 100,
|
|
|
- interval: 20,*/
|
|
|
+ max: 100,
|
|
|
+ interval: 20,
|
|
|
+ axisLabel: {
|
|
|
+ formatter: '{value}%'
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
],
|
|
|
series: [
|
|
|
{
|
|
|
- name: '标准产量',
|
|
|
+ name: '投入',
|
|
|
type: 'bar',
|
|
|
barWidth: 20,
|
|
|
emphasis: {
|
|
|
focus: 'series'
|
|
|
},
|
|
|
- data:[],
|
|
|
- itemStyle: {
|
|
|
- color: '#31b4fb'
|
|
|
- }
|
|
|
+ data:[]
|
|
|
+ //data: [320, 332, 301, 334, 390, 330, 320]
|
|
|
},
|
|
|
{
|
|
|
- name: '实际产量',
|
|
|
+ name: '产出',
|
|
|
type: 'bar',
|
|
|
barWidth: 20,
|
|
|
+ stack: 'Ad',
|
|
|
emphasis: {
|
|
|
focus: 'series'
|
|
|
},
|
|
|
- data: [],
|
|
|
- itemStyle: {
|
|
|
- color: '#afe6c2'
|
|
|
+ data:[]
|
|
|
+ //data: [220, 232, 221, 234, 290, 230, 220]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '不良',
|
|
|
+ type: 'bar',
|
|
|
+ stack: 'Ad',
|
|
|
+ barWidth: 10,
|
|
|
+ data:[],
|
|
|
+ //data: [12, 22, 32, 12, 32, 12, 32],
|
|
|
+ emphasis: {
|
|
|
+ focus: 'series'
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
- name: '抛料PPM',
|
|
|
+ name: '良率%',
|
|
|
type: 'line',
|
|
|
data:[],
|
|
|
yAxisIndex: 1,
|
|
|
- symbolSize:14,
|
|
|
+ //data: [92, 92,92, 72, 82, 62, 62],
|
|
|
+ tooltip: {
|
|
|
+ valueFormatter: function (value) {
|
|
|
+ return value + '%';
|
|
|
+ }
|
|
|
+ },
|
|
|
itemStyle: {
|
|
|
- color: "rgba(156,107,211, 1)"
|
|
|
- /* normal: {
|
|
|
+ normal: {
|
|
|
barBorderRadius: 5,
|
|
|
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)" }
|
|
|
])
|
|
|
- }*/
|
|
|
- },
|
|
|
- lineStyle: {
|
|
|
- width: 5
|
|
|
+ }
|
|
|
},
|
|
|
emphasis: {
|
|
|
focus: 'series'
|
|
|
@@ -127,48 +138,58 @@ export default {
|
|
|
},
|
|
|
async getdata() {
|
|
|
//20220211 -+formatDate(new Date()
|
|
|
- await this.$http.get("kanban/datalist.action?caller=KB!SMT!UP1&_noc=1&page=1&pageSize=100",{
|
|
|
- params: {
|
|
|
- condition: "1=1",
|
|
|
- }
|
|
|
- }).then((result)=>{
|
|
|
+ await this.$http.get("kanban/datalist.action?caller=WCDAYTURNOUT!SMT&_noc=1&page=1&pageSize=100",{
|
|
|
+ params: {
|
|
|
+ condition: "1=1",
|
|
|
+ }
|
|
|
+ }).then((result)=>{
|
|
|
let dataList = JSON.parse(result.data.data);
|
|
|
let xAxis0 = new Array();
|
|
|
let series0 = new Array();
|
|
|
let series1 = new Array();
|
|
|
let series2 = new Array();
|
|
|
+ let series3 = new Array();
|
|
|
for (let index = 0; index < dataList.length; index++) {
|
|
|
const element = dataList[index];
|
|
|
- //
|
|
|
- xAxis0.push(element.v_hour);
|
|
|
- //标准产量
|
|
|
- series0.push(element.v_bbcl);
|
|
|
- //实际产量
|
|
|
- series1.push(element.v_sjcl);
|
|
|
- /*实际产量大于等于标准产量就是 产量达标 否则产量未达标,
|
|
|
- if(element.v_bbcl>element.v_sjcl) {
|
|
|
- // series1.push(element.v_sjcl);
|
|
|
- series1.push({
|
|
|
- value: element.v_sjcl,
|
|
|
- itemStyle: {
|
|
|
- color: '#a9410b'
|
|
|
- }
|
|
|
- });
|
|
|
- }else{
|
|
|
- series1.push({
|
|
|
- value: element.v_sjcl,
|
|
|
- itemStyle: {
|
|
|
- color: '#37e66f'
|
|
|
- }
|
|
|
- });
|
|
|
- }*/
|
|
|
- //抛料PPM
|
|
|
- series2.push(element.v_plppm);
|
|
|
+ xAxis0.push(element.sp_wccode);
|
|
|
+ //投入
|
|
|
+ series0.push(element.v_inqty);
|
|
|
+ //产出
|
|
|
+ series1.push(element.v_outqty);
|
|
|
+ //不良
|
|
|
+ series2.push(element.v_ngqty);
|
|
|
+ //良率
|
|
|
+ series3.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;
|
|
|
+ /*let myChart = this.$children[0].chart;
|
|
|
+ myChart.setOption({
|
|
|
+ xAxis: {
|
|
|
+ data: xAxis0
|
|
|
+ },
|
|
|
+ series: [
|
|
|
+ {
|
|
|
+ // 根据名字对应到相应的系列
|
|
|
+ name: '投入',
|
|
|
+ data: series0
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '产出',
|
|
|
+ data: series2
|
|
|
+ }, {
|
|
|
+ name: '不良',
|
|
|
+ data: series3
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '不良率%',
|
|
|
+ data: series4
|
|
|
+ },
|
|
|
+ ]
|
|
|
+ });*/
|
|
|
},(result)=>{
|
|
|
console.error(result)
|
|
|
}
|