From f241a35252b477093ed5c09fdf3399320ff9df85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=98937886381=E2=80=99?= <‘937886381@qq.com’> Date: Mon, 17 Jun 2024 15:34:37 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/report/index.js | 15 + src/store/modules/home.js | 5 +- .../components/sub/bar/BarChartChipOEE.vue | 50 +- .../components/sub/bar/BarChartChipTrans.vue | 50 +- .../factoryData/components/BarChartBase.vue | 15 +- .../copilot/factoryData/components/Order.vue | 6 +- src/views/report/comprehensiveData.vue | 255 ++++---- src/views/report/produceConversion.vue | 548 ++++++++++-------- src/views/report/productionSituationMW.vue | 490 ++++++++++++++++ .../report/productionSituationTablets.vue | 490 ++++++++++++++++ src/views/report/productionYield.vue | 490 ++++++++++++++++ 11 files changed, 1966 insertions(+), 448 deletions(-) create mode 100644 src/api/report/index.js create mode 100644 src/views/report/productionSituationMW.vue create mode 100644 src/views/report/productionSituationTablets.vue create mode 100644 src/views/report/productionYield.vue diff --git a/src/api/report/index.js b/src/api/report/index.js new file mode 100644 index 0000000..243341e --- /dev/null +++ b/src/api/report/index.js @@ -0,0 +1,15 @@ +/* + * @Author: zhp + * @Date: 2024-06-17 09:41:03 + * @LastEditTime: 2024-06-17 09:54:26 + * @LastEditors: zhp + * @Description: + */ +import request from '@/utils/request' +export function getComprehensiveDataPage(data) { + return request({ + url: 'ip/comprehensive/data/get/comprehensive/data', + method: 'get', + params: data + }) +} diff --git a/src/store/modules/home.js b/src/store/modules/home.js index 234fa10..8a2652a 100644 --- a/src/store/modules/home.js +++ b/src/store/modules/home.js @@ -436,7 +436,10 @@ function splitCurrentAndPrevious(factoryListResponse, targetListResponse, prodOu if (preData && preData[0] != null) { for (const factory of preData) { const fId = getPreFactoryId(factory); - chipInvest.previous[fId] = factory.previousYearInputNumber; + if (factory.previousGlassType === 0) { + chipInvest.previous[fId] = factory.inputNumber + } + // chipInvest.previous[fId] = factory.previousYearInputNumber; if (![0, 1, 2].includes(factory.previousGlassType)) continue; const _t = [chipOutput, stdOutput, bipvOutput][factory.previousGlassType]; // if (fId) { diff --git a/src/views/copilot/efficiency/components/sub/bar/BarChartChipOEE.vue b/src/views/copilot/efficiency/components/sub/bar/BarChartChipOEE.vue index c227aef..6d7f58f 100644 --- a/src/views/copilot/efficiency/components/sub/bar/BarChartChipOEE.vue +++ b/src/views/copilot/efficiency/components/sub/bar/BarChartChipOEE.vue @@ -1,7 +1,7 @@ @@ -180,30 +180,30 @@ export default { itemStyle: { color: "#f3c000", }, - areaStyle: { - color: { - type: "linear", - x: 0, - y: 0, - x2: 0, - y2: 1, - colorStops: [ - { - offset: 0, - color: "#f3c000", // 0% 处的颜色 - }, - { - offset: 0.55, - color: "#f3c00033", - }, - { - offset: 1, - color: "transparent", // 100% 处的颜色 - }, - ], - global: false, // 缺省为 false - }, - }, + // areaStyle: { + // color: { + // type: "linear", + // x: 0, + // y: 0, + // x2: 0, + // y2: 1, + // colorStops: [ + // { + // offset: 0, + // color: "#f3c000", // 0% 处的颜色 + // }, + // { + // offset: 0.55, + // color: "#f3c00033", + // }, + // { + // offset: 1, + // color: "transparent", // 100% 处的颜色 + // }, + // ], + // global: false, // 缺省为 false + // }, + // }, data: [], // this.series[0].data, }, ], diff --git a/src/views/copilot/efficiency/components/sub/bar/BarChartChipTrans.vue b/src/views/copilot/efficiency/components/sub/bar/BarChartChipTrans.vue index 79475ff..848f32d 100644 --- a/src/views/copilot/efficiency/components/sub/bar/BarChartChipTrans.vue +++ b/src/views/copilot/efficiency/components/sub/bar/BarChartChipTrans.vue @@ -1,7 +1,7 @@ @@ -180,30 +180,30 @@ export default { itemStyle: { color: "#f3c000", }, - areaStyle: { - color: { - type: "linear", - x: 0, - y: 0, - x2: 0, - y2: 1, - colorStops: [ - { - offset: 0, - color: "#f3c000", // 0% 处的颜色 - }, - { - offset: 0.55, - color: "#f3c00033", - }, - { - offset: 1, - color: "transparent", // 100% 处的颜色 - }, - ], - global: false, // 缺省为 false - }, - }, + // areaStyle: { + // color: { + // type: "linear", + // x: 0, + // y: 0, + // x2: 0, + // y2: 1, + // colorStops: [ + // { + // offset: 0, + // color: "#f3c000", // 0% 处的颜色 + // }, + // { + // offset: 0.55, + // color: "#f3c00033", + // }, + // { + // offset: 1, + // color: "transparent", // 100% 处的颜色 + // }, + // ], + // global: false, // 缺省为 false + // }, + // }, data: [], // this.series[0].data, }, ], diff --git a/src/views/copilot/factoryData/components/BarChartBase.vue b/src/views/copilot/factoryData/components/BarChartBase.vue index 5bf1725..534d37e 100644 --- a/src/views/copilot/factoryData/components/BarChartBase.vue +++ b/src/views/copilot/factoryData/components/BarChartBase.vue @@ -1,19 +1,24 @@ - diff --git a/src/views/report/productionSituationMW.vue b/src/views/report/productionSituationMW.vue new file mode 100644 index 0000000..23906a7 --- /dev/null +++ b/src/views/report/productionSituationMW.vue @@ -0,0 +1,490 @@ + + + + + diff --git a/src/views/report/productionSituationTablets.vue b/src/views/report/productionSituationTablets.vue new file mode 100644 index 0000000..23906a7 --- /dev/null +++ b/src/views/report/productionSituationTablets.vue @@ -0,0 +1,490 @@ + + + + + diff --git a/src/views/report/productionYield.vue b/src/views/report/productionYield.vue new file mode 100644 index 0000000..23906a7 --- /dev/null +++ b/src/views/report/productionYield.vue @@ -0,0 +1,490 @@ + + + + + From 14c782f112925bb9da49be2d9c0f19d40927f850 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=98937886381=E2=80=99?= <‘937886381@qq.com’> Date: Mon, 17 Jun 2024 16:59:41 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/modules/home.js | 4 +-- .../factoryData/components/ChipOee.vue | 31 ++++++++++++++----- .../copilot/factoryData/components/Order.vue | 2 +- src/views/copilot/factoryData/index.vue | 2 +- .../components/sub/ring/DoubleRingChart.vue | 10 +++--- 5 files changed, 32 insertions(+), 17 deletions(-) diff --git a/src/store/modules/home.js b/src/store/modules/home.js index 8a2652a..cdd0e6f 100644 --- a/src/store/modules/home.js +++ b/src/store/modules/home.js @@ -437,7 +437,7 @@ function splitCurrentAndPrevious(factoryListResponse, targetListResponse, prodOu for (const factory of preData) { const fId = getPreFactoryId(factory); if (factory.previousGlassType === 0) { - chipInvest.previous[fId] = factory.inputNumber + chipInvest.previous[fId] = factory.previousYearInputNumber } // chipInvest.previous[fId] = factory.previousYearInputNumber; if (![0, 1, 2].includes(factory.previousGlassType)) continue; @@ -476,7 +476,7 @@ function splitCurrentAndPrevious(factoryListResponse, targetListResponse, prodOu const _t = [chipOutput, stdOutput, bipvOutput][factory.glassType]; _t.current[fId] = factory.outputNumber; } - console.log('chipInvest',chipInvest); + console.log('chipInvest',ftoInvest); return { chipInvest, // ftoInvest, diff --git a/src/views/copilot/factoryData/components/ChipOee.vue b/src/views/copilot/factoryData/components/ChipOee.vue index a89bef2..8ed936e 100644 --- a/src/views/copilot/factoryData/components/ChipOee.vue +++ b/src/views/copilot/factoryData/components/ChipOee.vue @@ -1,7 +1,7 @@ @@ -54,8 +54,20 @@ export default { legend() { let items = []; var day1 = new Date(); - day1.setTime(day1.getTime() - 24 * 60 * 60 * 1000); + var day2 = new Date(); + day1.setTime(day1.getTime() - 24 * 60 * 60 * 1000) + day2.setTime(day2.getTime() - 48 * 60 * 60 * 1000) var yesterday = (day1.getMonth() + 1) + "月" + day1.getDate() + var dayBeYes = (day2.getMonth() + 1) + "月" + day2.getDate() + //今天的时间 + // var day2 = new Date(); + // day2.setTime(day2.getTime()); + // var s2 = (day2.getMonth() + 1) + "月" + day2.getDate() + '日'; + // const today = new Date().getDate(); + // let yesterday = new Date().getDate() -1; + // const month = new Date().getMonth() + 1; + // const lastMonth = new Date().getMonth() + 1 === 12 ? 1 : new Date().getMonth() + 1 - 1; + // const year = new Date().getFullYear(); //今天的时间 // var day2 = new Date(); // day2.setTime(day2.getTime()); @@ -65,15 +77,18 @@ export default { const month = new Date().getMonth() + 1; const lastMonth = new Date().getMonth() + 1 === 12 ? 1 : new Date().getMonth() + 1 - 1; const year = new Date().getFullYear(); - if (this.period === 1 && this.than === '同比') { + if (this.period === 1 && this.than === '同比') { items = [ - { label: `${year-1}年${month}月${today}日`, color: "#12f7f1" }, - { label: `${month}月${today}日`, color: "#58adfa" }, + { label: `${year - 1}年${yesterday}累计` }, + { label: `${yesterday}日累计`, }, + + // { label: `${month}月${today}日目标`, }, ]; - } else if (this.period ===1 && this.than === '环比') { + } else if (this.period === 1 && this.than === '环比') { items = [ - { label: `${yesterday}日`, color: "#12f7f1" }, - { label: `${month}月${today}日`, color: "#58adfa" }, + { label: `${dayBeYes}日累计` }, + { label: `${yesterday}日累计` }, + // { label: `${month}月${today}日目标`, }, ]; } else if (this.period === 2 && this.than === '同比') { items = [ diff --git a/src/views/copilot/factoryData/components/Order.vue b/src/views/copilot/factoryData/components/Order.vue index e9eb35a..0219590 100644 --- a/src/views/copilot/factoryData/components/Order.vue +++ b/src/views/copilot/factoryData/components/Order.vue @@ -105,7 +105,7 @@ export default { ); arr.push( `${ - this.prodOrder[i].orderStatus === 0 ? '未开始' : this.prodOrder[i].orderStatus === 1 ? '进行中' : '已完成' || "" + this.prodOrder[i].orderStatus === 1 ? '未开始' : this.prodOrder[i].orderStatus === 2 ? '进行中' : '已完成' || "" }` ); arr.push( diff --git a/src/views/copilot/factoryData/index.vue b/src/views/copilot/factoryData/index.vue index 39d0614..7a40566 100644 --- a/src/views/copilot/factoryData/index.vue +++ b/src/views/copilot/factoryData/index.vue @@ -89,7 +89,7 @@ export default { updateThan(val) { console.log(val); this.than = val; - // this.getMes(); + this.getMes() }, updatePeriod(val) { this.period = val; diff --git a/src/views/copilot/yield/components/sub/ring/DoubleRingChart.vue b/src/views/copilot/yield/components/sub/ring/DoubleRingChart.vue index a592e46..9b3ca7e 100644 --- a/src/views/copilot/yield/components/sub/ring/DoubleRingChart.vue +++ b/src/views/copilot/yield/components/sub/ring/DoubleRingChart.vue @@ -1,7 +1,7 @@ @@ -118,13 +118,13 @@ export default { items = [ { label: `${yesterday}日累计`,}, { label: `${year - 1}年${yesterday}累计` }, - { label: `${month}月${today}日目标`, }, + { label: `${yesterday}日目标`, }, ]; } else if (this.period === '日' && this.than === '环比') { items = [ { label: `${yesterday}日累计`}, { label: `${dayBeYes}日累计` }, - { label: `${month}月${today}日目标`, }, + { label: `${yesterday}日目标`, }, ]; } else if (this.period === '周' && this.than === '同比') { items = [ @@ -243,13 +243,13 @@ function calculateItems(period, valueTuple, than) { items = [ { label: `${year - 1}年${yesterday}累计`, value: valueTuple[0] }, { label: `${yesterday}累计`, value: valueTuple[1] }, - { label: `${month}月${today}日目标`, value: valueTuple[2] }, + { label: `${yesterday}日目标`, value: valueTuple[2] }, ]; } else if (period === '日' && than === '环比') { items = [ { label: `${dayBeYes}日累计`, value: valueTuple[0] }, { label: `${yesterday}日累计`, value: valueTuple[1] }, - { label: `${month}月${today}日目标`, value: valueTuple[2] }, + { label: `${yesterday}日目标`, value: valueTuple[2] }, ]; } else if (period === '周' && than === '同比') { items = [