修改包装线看吧

master
LAPTOP-R6EHHS26\86155 8 months ago
parent a463c17a04
commit b78574448f

@ -10,14 +10,23 @@ export function getBoardFactory(data) {
// 根据工厂获取产线 // 根据工厂获取产线
export function getDictData(data) { export function getDictData(data) {
return request({ return request({
url: '/quality/qcInterface/getDictData', url: '/mes/mesborad/getLineList',
method: 'get', method: 'get',
params: data params: data
}); });
} }
// 41、计划产量、当前产量、15天的产量趋势图
export function getProduction15Days(data) { export function getProduction15Days(data) {
return request({ return request({
url: '/quality/qcInterface/getProduction15Days', url: '/mes/mesborad/getProduction15Days',
method: 'post',
data: data
});
}
// 产线信息
export function getProductionLineInfo(data) {
return request({
url: '/mes/mesborad/getProductionLineInfo',
method: 'post', method: 'post',
data: data data: data
}); });

@ -65,23 +65,12 @@
<div class="yieldname">当日计划产量</div> <div class="yieldname">当日计划产量</div>
</div> </div>
<div class="yieldnumber"> <div class="yieldnumber">
<div class="numberbox"> <div
<div class="number">8</div> class="numberbox"
</div> :key="index"
<div class="numberbox"> v-for="(n, index) in planProduction"
<div class="number">8</div> >
</div> <div class="number">{{ n }}</div>
<div class="numberbox">
<div class="number">8</div>
</div>
<div class="numberbox">
<div class="number">8</div>
</div>
<div class="numberbox">
<div class="number">8</div>
</div>
<div class="numberbox">
<div class="number">8</div>
</div> </div>
</div> </div>
</div> </div>
@ -90,20 +79,12 @@
<div class="yieldname">产线目前产量</div> <div class="yieldname">产线目前产量</div>
</div> </div>
<div class="yieldnumber"> <div class="yieldnumber">
<div class="numberbox"> <div
<div class="number">8</div> class="numberbox"
</div> :key="index"
<div class="numberbox"> v-for="(n, index) in actProduction"
<div class="number">8</div> >
</div> <div class="number">{{ n }}</div>
<div class="numberbox">
<div class="number">8</div>
</div>
<div class="numberbox">
<div class="number">8</div>
</div>
<div class="numberbox">
<div class="number">8</div>
</div> </div>
</div> </div>
</div> </div>
@ -267,7 +248,9 @@
产线编码/名称 产线编码/名称
</td> </td>
<!-- <td style="width: 8%;">{{ n.orderNo }}</td> --> <!-- <td style="width: 8%;">{{ n.orderNo }}</td> -->
<td style="width: 8%">XL01 简装蚊香包装手工1线</td> <td style="width: 8%">
{{ workOrder.equCode }}/{{ workOrder.equName }}
</td>
</tr> </tr>
<tr style="height: 36px"> <tr style="height: 36px">
<td <td
@ -280,7 +263,7 @@
产品编码 产品编码
</td> </td>
<!-- <td style="width: 8%;">{{ n.orderNo }}</td> --> <!-- <td style="width: 8%;">{{ n.orderNo }}</td> -->
<td style="width: 8%">CP0000000008</td> <td style="width: 8%">{{ workOrder.productCode }}</td>
</tr> </tr>
<tr style="height: 36px"> <tr style="height: 36px">
<td <td
@ -293,7 +276,7 @@
产品名称 产品名称
</td> </td>
<!-- <td style="width: 8%;">{{ n.orderNo }}</td> --> <!-- <td style="width: 8%;">{{ n.orderNo }}</td> -->
<td style="width: 8%">菊儿宝健蚊香3+1家庭特惠装(18)</td> <td style="width: 8%">{{ workOrder.productName }}</td>
</tr> </tr>
<tr style="height: 36px"> <tr style="height: 36px">
<td <td
@ -306,7 +289,7 @@
工单号 工单号
</td> </td>
<!-- <td style="width: 8%;">{{ n.orderNo }}</td> --> <!-- <td style="width: 8%;">{{ n.orderNo }}</td> -->
<td style="width: 8%">000800000131</td> <td style="width: 8%">{{ workOrder.workorderCodeSap }}</td>
</tr> </tr>
<tr style="height: 36px"> <tr style="height: 36px">
<td <td
@ -319,7 +302,9 @@
数量/单位 数量/单位
</td> </td>
<!-- <td style="width: 8%;">{{ n.orderNo }}</td> --> <!-- <td style="width: 8%;">{{ n.orderNo }}</td> -->
<td style="width: 8%">7000产品/KAR</td> <td style="width: 8%">
{{ workOrder.totalNum }}/{{ workOrder.unit }}
</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@ -422,7 +407,9 @@ import {
getMonthOfYearContrast, getMonthOfYearContrast,
} from "@/api/kanban/quality"; } from "@/api/kanban/quality";
import { import {
getDictData,getProduction15Days, getDictData,
getProduction15Days,
getProductionLineInfo,
} from "@/api/kanban/Packagingline"; } from "@/api/kanban/Packagingline";
import { getDeviceRefreshTime } from "@/api/kanban/equipment"; import { getDeviceRefreshTime } from "@/api/kanban/equipment";
import * as echarts from "echarts"; import * as echarts from "echarts";
@ -449,6 +436,8 @@ export default {
optionDatalist2: [], optionDatalist2: [],
optionDatalist3: [], optionDatalist3: [],
optionDatalist4: [], optionDatalist4: [],
optionDatalist5: [],
optionDatalist6: [],
colorlist: ["#005aff", "#f8b551"], colorlist: ["#005aff", "#f8b551"],
datetime: null, datetime: null,
time1: null, time1: null,
@ -463,6 +452,11 @@ export default {
dictDatatype: [], dictDatatype: [],
Realtimebox: [{}, {}, {}, {}], Realtimebox: [{}, {}, {}, {}],
Realtimebox2: [{}, {}, {}, {}], Realtimebox2: [{}, {}, {}, {}],
workOrder: {},
//
planProduction: [],
//
actProduction: [],
}; };
}, },
created() {}, created() {},
@ -497,15 +491,13 @@ export default {
_this.getLineList = response.data; _this.getLineList = response.data;
_this.selectxt = _this.getLineList[0].parentName; _this.selectxt = _this.getLineList[0].parentName;
_this.getDictData(); _this.getDictData();
_this.initChart1();
} }
}); });
}, },
getDeviceRefreshTime() { getDeviceRefreshTime() {
const _this = this; const _this = this;
getDeviceRefreshTime().then((response) => { getDeviceRefreshTime().then((response) => {
if (response.data) { if (response) {
console.log(response.data);
this.RefreshTime = response.data; this.RefreshTime = response.data;
this.time1 = setInterval(() => { this.time1 = setInterval(() => {
_this.getdatalist(_this.selectxt); _this.getdatalist(_this.selectxt);
@ -516,33 +508,26 @@ export default {
getDictData() { getDictData() {
const _this = this; const _this = this;
getDictData({ getDictData({
factoryCode:"ds_" + _this.selectxt, factoryCode: "ds_" + _this.selectxt,
equipmentTypeCode: "equ_type_bzx", equipmentTypeCode: "equ_type_bzx",
}).then((response) => { }).then((response) => {
_this.getdatalist(); if (response) {
if (response.data) {
console.log(response);
this.dictDatatype = response; this.dictDatatype = response;
_this.selectxtclasses = _this.dictDatatype[0].equCode; _this.selectxtclasses = _this.dictDatatype[0].equCode;
_this.getdatalist(); _this.getdatalist();
// _this.getDeviceRefreshTime(); _this.getDeviceRefreshTime();
} }
}); });
}, },
getdatalist() { getdatalist() {
const _this = this; const _this = this;
getProduction15Days({ _this.initChart1();
getProductionLineInfo({
equCode: _this.selectxtclasses, equCode: _this.selectxtclasses,
factoryCode: "ds_" + _this.selectxt, factoryCode: "ds_" + _this.selectxt,
}).then((response) => { }).then((response) => {
if (response) { if (response) {
_this.optionDatalist2 = []; _this.workOrder = response.data.workOrder;
response.forEach((item) => {
let a = {};
a.name = item.projectName;
a.value = item.quality;
_this.optionDatalist2.push(a);
});
} }
}); });
}, },
@ -550,21 +535,20 @@ export default {
selectline() { selectline() {
const _this = this; const _this = this;
this.optionDatalist1 = []; this.optionDatalist1 = [];
this.optionDatalist2 = []; this.optionDatalist5 = [];
this.optionDatalist3 = []; this.optionDatalist6 = [];
this.optionDatalist4 = [];
_this.getDictData(_this.selectxt); _this.getDictData(_this.selectxt);
}, },
selectline2() { selectline2() {
const _this = this; const _this = this;
this.optionDatalist1 = []; this.optionDatalist1 = [];
this.optionDatalist2 = []; this.optionDatalist5 = [];
this.optionDatalist3 = []; this.optionDatalist6 = [];
this.optionDatalist4 = [];
_this.getdatalist(_this.selectxt); _this.getdatalist(_this.selectxt);
}, },
initChart1() { initChart1() {
const _this = this; const _this = this;
var data6 = this.optionDatalist6;
var myChart1 = echarts.init(document.querySelector("#echart1")); var myChart1 = echarts.init(document.querySelector("#echart1"));
var fontColor = "#D0DEEE"; var fontColor = "#D0DEEE";
var xData = (function () { var xData = (function () {
@ -952,7 +936,7 @@ export default {
// nameTextStyle:{ // nameTextStyle:{
// color: '#D0DEEE' // color: '#D0DEEE'
// }, // },
data: ["不合格比例", "不合格数量", "浏览量"], data: ["实际产量", "计划产量"],
}, },
xAxis: [ xAxis: [
{ {
@ -1009,75 +993,10 @@ export default {
}, },
}, },
}, },
{
type: "value",
name: "比例",
nameTextStyle: {
color: "#D0DEEE",
},
min: 0,
max: 100,
axisLabel: {
formatter: "{value} %",
textStyle: {
color: "#D0DEEE",
},
},
axisLine: {
lineStyle: {
color: "#27b4c2",
},
},
axisTick: {
show: false,
},
splitLine: {
show: true,
lineStyle: {
color: "#2B3241",
},
},
},
], ],
series: [ series: [
{ {
name: "不合格比例", name: "实际产量",
type: "line",
stack: "总量",
symbol: "circle",
symbolSize: 8,
yAxisIndex: 1,
itemStyle: {
normal: {
color: "#5260CE",
lineStyle: {
color: "#5260CE",
width: 1,
},
},
},
data: [],
},
{
name: "不合格比例",
type: "line",
stack: "总量",
symbol: "circle",
symbolSize: 8,
yAxisIndex: 1,
itemStyle: {
normal: {
color: "#88E4E3",
lineStyle: {
color: "#88E4E3",
width: 1,
},
},
},
data: [],
},
{
name: "不合格数量",
data: [], data: [],
type: "bar", type: "bar",
showBackground: true, showBackground: true,
@ -1095,7 +1014,7 @@ export default {
}, },
}, },
{ {
name: "不合格数量", name: "计划产量",
data: [], data: [],
type: "bar", type: "bar",
showBackground: true, showBackground: true,
@ -1115,31 +1034,23 @@ export default {
], ],
}; };
myChart6.setOption(option6); myChart6.setOption(option6);
getMonthOfYearContrast({ getProduction15Days({
typeCode: "produce", equCode: _this.selectxtclasses,
factoryCode: "ds_" + _this.selectxt, factoryCode: "ds_" + _this.selectxt,
}).then((response) => { }).then((response) => {
if (response) { if (response) {
let seriesdata1 = response[0].dataBarArrays; this.planProduction = response.data.planProduction.split("");
let seriesdata2 = response[0].dataLineArrays; this.actProduction = response.data.actProduction.split("");
let xAxisdata = response[0].dayStr; let seriesdata1 = response.data.acts;
let seriesdata3 = response[1].dataBarArrays; let seriesdata2 = response.data.plans;
let seriesdata4 = response[1].dataLineArrays; let xAxisdata = response.data.days;
let max1 = Math.max(...seriesdata1) + 5; let max1 = Math.max(...seriesdata1) + 200;
let max2 = Math.max(...seriesdata3) + 5; let max3 = Math.max(...seriesdata2) + 200;
let max3 = Math.max(...seriesdata2) + 5;
let max4 = Math.max(...seriesdata4) + 5;
let yAxismax1 = 0; let yAxismax1 = 0;
let yAxismax2 = 0; if (max1 > max3) {
if (max1 > max2) {
yAxismax1 = max1; yAxismax1 = max1;
} else { } else {
yAxismax1 = max2; yAxismax1 = max3;
}
if (max3 > max4) {
yAxismax2 = max3;
} else {
yAxismax2 = max4;
} }
option6 = { option6 = {
xAxis: [ xAxis: [
@ -1151,22 +1062,13 @@ export default {
{ {
max: yAxismax1, max: yAxismax1,
}, },
{
max: yAxismax2,
},
], ],
series: [ series: [
{
data: seriesdata2,
},
{
data: seriesdata4,
},
{ {
data: seriesdata1, data: seriesdata1,
}, },
{ {
data: seriesdata3, data: seriesdata2,
}, },
], ],
}; };
@ -1648,7 +1550,7 @@ export default {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-around; justify-content: space-around;
width: 88px; width: 300px;
margin-left: 25px; margin-left: 25px;
} }

Loading…
Cancel
Save