From b78574448fc718c77096b06b8bbea3ac170f4ca1 Mon Sep 17 00:00:00 2001
From: "LAPTOP-R6EHHS26\\86155" <2217640373@qq.com>
Date: Fri, 29 Mar 2024 17:58:35 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8C=85=E8=A3=85=E7=BA=BF?=
=?UTF-8?q?=E7=9C=8B=E5=90=A7?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/kanban/Packagingline.js | 13 +-
src/views/kanban/Packagingline/index.vue | 216 +++++++----------------
2 files changed, 70 insertions(+), 159 deletions(-)
diff --git a/src/api/kanban/Packagingline.js b/src/api/kanban/Packagingline.js
index f930e672..832925c7 100644
--- a/src/api/kanban/Packagingline.js
+++ b/src/api/kanban/Packagingline.js
@@ -10,14 +10,23 @@ export function getBoardFactory(data) {
// 根据工厂获取产线
export function getDictData(data) {
return request({
- url: '/quality/qcInterface/getDictData',
+ url: '/mes/mesborad/getLineList',
method: 'get',
params: data
});
}
+// 41、计划产量、当前产量、15天的产量趋势图
export function getProduction15Days(data) {
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',
data: data
});
diff --git a/src/views/kanban/Packagingline/index.vue b/src/views/kanban/Packagingline/index.vue
index 7be5f0f4..f275b0fc 100644
--- a/src/views/kanban/Packagingline/index.vue
+++ b/src/views/kanban/Packagingline/index.vue
@@ -65,23 +65,12 @@
当日计划产量
@@ -90,20 +79,12 @@
产线目前产量
@@ -267,7 +248,9 @@
产线编码/名称
- XL01 简装蚊香包装手工1线 |
+
+ {{ workOrder.equCode }}/{{ workOrder.equName }}
+ |
- | CP0000000008 |
+ {{ workOrder.productCode }} |
- | 菊儿宝健蚊香3+1家庭特惠装(18装)工 |
+ {{ workOrder.productName }} |
- | 000800000131 |
+ {{ workOrder.workorderCodeSap }} |
- | 7000产品/KAR |
+
+ {{ workOrder.totalNum }}/{{ workOrder.unit }}
+ |
@@ -422,7 +407,9 @@ import {
getMonthOfYearContrast,
} from "@/api/kanban/quality";
import {
- getDictData,getProduction15Days,
+ getDictData,
+ getProduction15Days,
+ getProductionLineInfo,
} from "@/api/kanban/Packagingline";
import { getDeviceRefreshTime } from "@/api/kanban/equipment";
import * as echarts from "echarts";
@@ -449,6 +436,8 @@ export default {
optionDatalist2: [],
optionDatalist3: [],
optionDatalist4: [],
+ optionDatalist5: [],
+ optionDatalist6: [],
colorlist: ["#005aff", "#f8b551"],
datetime: null,
time1: null,
@@ -463,6 +452,11 @@ export default {
dictDatatype: [],
Realtimebox: [{}, {}, {}, {}],
Realtimebox2: [{}, {}, {}, {}],
+ workOrder: {},
+ // 当日计划产量
+ planProduction: [],
+ // 当日实际产量
+ actProduction: [],
};
},
created() {},
@@ -497,15 +491,13 @@ export default {
_this.getLineList = response.data;
_this.selectxt = _this.getLineList[0].parentName;
_this.getDictData();
- _this.initChart1();
}
});
},
getDeviceRefreshTime() {
const _this = this;
getDeviceRefreshTime().then((response) => {
- if (response.data) {
- console.log(response.data);
+ if (response) {
this.RefreshTime = response.data;
this.time1 = setInterval(() => {
_this.getdatalist(_this.selectxt);
@@ -516,33 +508,26 @@ export default {
getDictData() {
const _this = this;
getDictData({
- factoryCode:"ds_" + _this.selectxt,
+ factoryCode: "ds_" + _this.selectxt,
equipmentTypeCode: "equ_type_bzx",
}).then((response) => {
- _this.getdatalist();
- if (response.data) {
- console.log(response);
+ if (response) {
this.dictDatatype = response;
_this.selectxtclasses = _this.dictDatatype[0].equCode;
_this.getdatalist();
- // _this.getDeviceRefreshTime();
+ _this.getDeviceRefreshTime();
}
});
},
getdatalist() {
const _this = this;
- getProduction15Days({
+ _this.initChart1();
+ getProductionLineInfo({
equCode: _this.selectxtclasses,
factoryCode: "ds_" + _this.selectxt,
}).then((response) => {
if (response) {
- _this.optionDatalist2 = [];
- response.forEach((item) => {
- let a = {};
- a.name = item.projectName;
- a.value = item.quality;
- _this.optionDatalist2.push(a);
- });
+ _this.workOrder = response.data.workOrder;
}
});
},
@@ -550,21 +535,20 @@ export default {
selectline() {
const _this = this;
this.optionDatalist1 = [];
- this.optionDatalist2 = [];
- this.optionDatalist3 = [];
- this.optionDatalist4 = [];
+ this.optionDatalist5 = [];
+ this.optionDatalist6 = [];
_this.getDictData(_this.selectxt);
},
selectline2() {
const _this = this;
this.optionDatalist1 = [];
- this.optionDatalist2 = [];
- this.optionDatalist3 = [];
- this.optionDatalist4 = [];
+ this.optionDatalist5 = [];
+ this.optionDatalist6 = [];
_this.getdatalist(_this.selectxt);
},
initChart1() {
const _this = this;
+ var data6 = this.optionDatalist6;
var myChart1 = echarts.init(document.querySelector("#echart1"));
var fontColor = "#D0DEEE";
var xData = (function () {
@@ -952,7 +936,7 @@ export default {
// nameTextStyle:{
// color: '#D0DEEE'
// },
- data: ["不合格比例", "不合格数量", "浏览量"],
+ data: ["实际产量", "计划产量"],
},
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: [
{
- 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: "不合格数量",
+ name: "实际产量",
data: [],
type: "bar",
showBackground: true,
@@ -1095,7 +1014,7 @@ export default {
},
},
{
- name: "不合格数量",
+ name: "计划产量",
data: [],
type: "bar",
showBackground: true,
@@ -1115,31 +1034,23 @@ export default {
],
};
myChart6.setOption(option6);
- getMonthOfYearContrast({
- typeCode: "produce",
+ getProduction15Days({
+ equCode: _this.selectxtclasses,
factoryCode: "ds_" + _this.selectxt,
}).then((response) => {
if (response) {
- let seriesdata1 = response[0].dataBarArrays;
- let seriesdata2 = response[0].dataLineArrays;
- let xAxisdata = response[0].dayStr;
- let seriesdata3 = response[1].dataBarArrays;
- let seriesdata4 = response[1].dataLineArrays;
- let max1 = Math.max(...seriesdata1) + 5;
- let max2 = Math.max(...seriesdata3) + 5;
- let max3 = Math.max(...seriesdata2) + 5;
- let max4 = Math.max(...seriesdata4) + 5;
+ this.planProduction = response.data.planProduction.split("");
+ this.actProduction = response.data.actProduction.split("");
+ let seriesdata1 = response.data.acts;
+ let seriesdata2 = response.data.plans;
+ let xAxisdata = response.data.days;
+ let max1 = Math.max(...seriesdata1) + 200;
+ let max3 = Math.max(...seriesdata2) + 200;
let yAxismax1 = 0;
- let yAxismax2 = 0;
- if (max1 > max2) {
+ if (max1 > max3) {
yAxismax1 = max1;
} else {
- yAxismax1 = max2;
- }
- if (max3 > max4) {
- yAxismax2 = max3;
- } else {
- yAxismax2 = max4;
+ yAxismax1 = max3;
}
option6 = {
xAxis: [
@@ -1151,22 +1062,13 @@ export default {
{
max: yAxismax1,
},
- {
- max: yAxismax2,
- },
],
series: [
- {
- data: seriesdata2,
- },
- {
- data: seriesdata4,
- },
{
data: seriesdata1,
},
{
- data: seriesdata3,
+ data: seriesdata2,
},
],
};
@@ -1648,7 +1550,7 @@ export default {
display: flex;
align-items: center;
justify-content: space-around;
- width: 88px;
+ width: 300px;
margin-left: 25px;
}