diff --git a/src/api/kanban/dailyoutput.js b/src/api/kanban/dailyoutput.js index 2eb6ebf..af8ae8d 100644 --- a/src/api/kanban/dailyoutput.js +++ b/src/api/kanban/dailyoutput.js @@ -16,6 +16,14 @@ export function getMesBoardEquProductionToday(data) { data: data }); } +// 获取产量数据 +export function getWhiteBoardEquPro7Days(data) { + return request({ + url: '/mes/wcsInterface/getWhiteBoardEquPro7Days', + method: 'post', + data: data + }); +} // 获取班次 export function getBoardShifts(data) { return request({ diff --git a/src/views/kanban/dailyoutput/echarts3dbar.vue b/src/views/kanban/dailyoutput/echarts3dbar.vue new file mode 100644 index 0000000..f2be680 --- /dev/null +++ b/src/views/kanban/dailyoutput/echarts3dbar.vue @@ -0,0 +1,258 @@ + + + + + \ No newline at end of file diff --git a/src/views/kanban/dailyoutput/echarts3dbar2.vue b/src/views/kanban/dailyoutput/echarts3dbar2.vue new file mode 100644 index 0000000..0370470 --- /dev/null +++ b/src/views/kanban/dailyoutput/echarts3dbar2.vue @@ -0,0 +1,299 @@ + + + + + \ No newline at end of file diff --git a/src/views/kanban/dailyoutput/index.vue b/src/views/kanban/dailyoutput/index.vue index 74e93b2..3c80610 100644 --- a/src/views/kanban/dailyoutput/index.vue +++ b/src/views/kanban/dailyoutput/index.vue @@ -60,14 +60,14 @@
-
湿料罐总产量
+
下料口接料次数
{{ number4 }}
-
湿料罐产量
+
接料次数
-
湿料罐产量占比
+
下料口放料次数
- + > --> + +
@@ -104,14 +114,18 @@ >
-
成型机产量占比
+
成型机计划达成率
- +
@@ -132,14 +146,18 @@ >
-
烘房产量占比
+
烘房产量及达成率
- + >
@@ -160,14 +178,18 @@ >
-
收坯机产量占比
+
收坯机产量及达成率
- + >
@@ -182,20 +204,23 @@ import { getBoardFactory, getMesBoardEquProductionToday, + getWhiteBoardEquPro7Days, getBoardShifts, } from "@/api/kanban/dailyoutput"; -import { - getDeviceRefreshTime, -} from "@/api/kanban/equipment"; +import { getDeviceRefreshTime } from "@/api/kanban/equipment"; import * as echarts from "echarts"; import moment from "moment"; import Echarts3D from "./echarts3d.vue"; import Echarts3D2 from "./echarts3d2.vue"; +import Echarts3dbar from "./echarts3dbar.vue"; +import Echarts3dbar2 from "./echarts3dbar2.vue"; export default { name: "Index", components: { Echarts3D, Echarts3D2, + Echarts3dbar, + Echarts3dbar2, }, data() { return { @@ -226,10 +251,37 @@ export default { colorlist: ["#005aff", "#f8b551"], datetime: null, time1: null, - RefreshTime:null, + RefreshTime: null, + Chart2yAxisMAX1: "", + Chart2yAxisMAX2: 100, + Chart2seriesdata: [], + Chart2seriesMAX: [], + Chart2xAxisname: [], + xAxis1data: [], + yAxis1seriesMAX1: 0, + yAxis1seriesMAX2: 0, + series1data1: [], + series1data2: [], + series1data3: [], + xAxis2data: [], + yAxis2seriesMAX1: 0, + yAxis2seriesMAX2: 0, + series2data1: [], + series2data2: [], + series2data3: [], + xAxis3data: [], + yAxis3seriesMAX1: 0, + yAxis3seriesMAX2: 0, + series3data1: [], + series3data2: [], + series3data3: [], + xAxis4data: [], + yAxis4seriesMAX1: 0, + series4data: [], }; }, created() {}, + destroyed() { clearInterval(this.time1); this.time1 = null; @@ -252,6 +304,7 @@ export default { }, selectFactorylist() { const _this = this; + getBoardFactory({ factory: null, }).then((response) => { @@ -266,7 +319,7 @@ export default { _this.classesList = response.data; _this.selectxtclasses = _this.classesList[0].shiftId; _this.initChart1(); - _this.getDeviceRefreshTime() + _this.getDeviceRefreshTime(); } }); } @@ -276,11 +329,11 @@ export default { const _this = this; getDeviceRefreshTime().then((response) => { if (response.data) { - console.log(response.data) - this.RefreshTime = response.data + console.log(response.data); + this.RefreshTime = response.data; this.time1 = setInterval(() => { _this.initChart1(); - }, 1000*60*this.RefreshTime); + }, 1000 * 60 * this.RefreshTime); } }); }, @@ -307,7 +360,7 @@ export default { }, xAxis: { name: "辆", - max: '100', + max: "100", splitLine: { show: false, }, @@ -388,6 +441,31 @@ export default { ], }; myChart1.setOption(option1); + getWhiteBoardEquPro7Days({ + factory: _this.selectxt, + shiftId: _this.selectxtclasses, + ymd: _this.datetime, + equTypeCode: "equ_type_cxj", + }).then((response) => { + if (response) { + if (response.data) { + _this.xAxis1data = response.data.dayNames; + _this.series1data1 = response.data.plans; + _this.series1data2 = response.data.acts; + _this.series1data3 = response.data.finishRatio; + let MAX1 = 0; + let MAX2 = 0; + MAX1 = Math.max(..._this.series1data1); + MAX2 = Math.max(..._this.series1data2); + if (MAX1 > MAX2) { + _this.yAxis1seriesMAX1 = MAX1; + } else { + _this.yAxis1seriesMAX1 = MAX2; + } + _this.yAxis1seriesMAX2 = Math.max(..._this.series1data3); + } + } + }); getMesBoardEquProductionToday({ factory: _this.selectxt, shiftId: _this.selectxtclasses, @@ -415,41 +493,10 @@ export default { dataoption.push(a); numberlist.push(item.totalNum); }); - // response.data.everyNum.forEach((item) => { - // let a = {}; - // a.name = item.equName; - // a.value = item.totalNum; - // a.code = item.equCode; - // dataoption.push(a); - // _this.optionDatalist1.push(a); + + // dataoption.sort((a, b) => { + // return a.value - b.value; // }); - // response.data.everyNum.forEach((item) => { - // let a = {}; - // a.name = item.equName; - // a.value = item.totalNum; - // a.code = item.equCode; - // dataoption.push(a); - // _this.optionDatalist1.push(a); - // }); - // response.data.everyNum.forEach((item) => { - // let a = {}; - // a.name = item.equName; - // a.value = item.totalNum; - // a.code = item.equCode; - // dataoption.push(a); - // _this.optionDatalist1.push(a); - // }); - // response.data.everyNum.forEach((item) => { - // let a = {}; - // a.name = item.equName; - // a.value = item.totalNum; - // a.code = item.equCode; - // dataoption.push(a); - // _this.optionDatalist1.push(a); - // }); - dataoption.sort((a, b) => { - return a.value - b.value; - }); let max = Math.max(...numberlist); max = max + 100; dataoption.forEach((item) => { @@ -621,6 +668,32 @@ export default { ], }; myChart2.setOption(option2); + getWhiteBoardEquPro7Days({ + factory: _this.selectxt, + shiftId: _this.selectxtclasses, + ymd: _this.datetime, + equTypeCode: "equ_type_hf", + }).then((response) => { + if (response) { + if (response.data) { + _this.xAxis2data = response.data.dayNames; + _this.series2data1 = response.data.plans; + _this.series2data2 = response.data.acts; + _this.series2data3 = response.data.finishRatio; + let MAX1 = 0; + let MAX2 = 0; + MAX1 = Math.max(..._this.series2data1); + MAX2 = Math.max(..._this.series2data2); + if (MAX1 > MAX2) { + _this.yAxis2seriesMAX1 = MAX1; + } else { + _this.yAxis2seriesMAX1 = MAX2; + } + _this.yAxis2seriesMAX2 = Math.max(..._this.series2data3); + + } + } + }); getMesBoardEquProductionToday({ factory: _this.selectxt, shiftId: _this.selectxtclasses, @@ -646,9 +719,9 @@ export default { dataoption.push(a); numberlist.push(item.totalNum); }); - dataoption.sort((a, b) => { - return a.value - b.value; - }); + // dataoption.sort((a, b) => { + // return a.value - b.value; + // }); let max = Math.max(...numberlist); max = max + 100; dataoption.forEach((item) => { @@ -814,6 +887,31 @@ export default { ], }; myChart3.setOption(option3); + getWhiteBoardEquPro7Days({ + factory: _this.selectxt, + shiftId: _this.selectxtclasses, + ymd: _this.datetime, + equTypeCode: "equ_type_spj", + }).then((response) => { + if (response) { + if (response.data) { + _this.xAxis3data = response.data.dayNames; + _this.series3data1 = response.data.plans; + _this.series3data2 = response.data.acts; + _this.series3data3 = response.data.finishRatio; + let MAX1 = 0; + let MAX2 = 0; + MAX1 = Math.max(..._this.series3data1); + MAX2 = Math.max(..._this.series3data2); + if (MAX1 > MAX2) { + _this.yAxis3seriesMAX1 = MAX1; + } else { + _this.yAxis3seriesMAX1 = MAX2; + } + _this.yAxis3seriesMAX2 = Math.max(..._this.series3data3); + } + } + }); getMesBoardEquProductionToday({ factory: _this.selectxt, shiftId: _this.selectxtclasses, @@ -840,9 +938,9 @@ export default { dataoption.push(a); numberlist.push(item.totalNum); }); - dataoption.sort((a, b) => { - return a.value - b.value; - }); + // dataoption.sort((a, b) => { + // return a.value - b.value; + // }); let max = Math.max(...numberlist); max = max + 100; dataoption.forEach((item) => { @@ -926,8 +1024,8 @@ export default { }, }, xAxis: { - name: "辆", - max: 30, + name: "次数", + max: 100, splitLine: { show: false, }, @@ -1020,11 +1118,15 @@ export default { let dataoption = []; let totalArr = []; _this.optionDatalist4 = []; + _this.series4data = []; + _this.xAxis4data = []; if (response.data.totalNum.length > 0) { _this.number4 = response.data.totalNum[0].totalNum; } if (response.data.everyNum.length > 0) { response.data.everyNum.forEach((item) => { + this.series4data.push(item.totalNum); + this.xAxis4data.push(item.equName); let a = {}; a.name = item.equName; a.value = item.totalNum; @@ -1033,9 +1135,10 @@ export default { dataoption.push(a); numberlist.push(item.totalNum); }); - dataoption.sort((a, b) => { - return a.value - b.value; - }); + this.yAxis4seriesMAX1 = Math.max(...this.series4data); + // dataoption.sort((a, b) => { + // return a.value - b.value; + // }); let max = Math.max(...numberlist); max = max + 100; dataoption.forEach((item) => { diff --git a/src/views/mes/reportWork/index.vue b/src/views/mes/reportWork/index.vue index 6a2bbc1..54f1e7f 100644 --- a/src/views/mes/reportWork/index.vue +++ b/src/views/mes/reportWork/index.vue @@ -438,8 +438,8 @@ :show-overflow-tooltip="true" :formatter="productCodeFormate" /> - - + + @@ -452,7 +452,8 @@ - + +