From eacf93e0db918e4a4bd00d41680aebbd019ed2d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=98937886381=E2=80=99?= <‘937886381@qq.com’> Date: Tue, 18 Jun 2024 10:25:13 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/modules/home.js | 6 +++--- src/views/copilot/efficiency/options/chipOptions.js | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/store/modules/home.js b/src/store/modules/home.js index cdd0e6f..0d1678d 100644 --- a/src/store/modules/home.js +++ b/src/store/modules/home.js @@ -407,7 +407,7 @@ function splitCurrentAndPrevious(factoryListResponse, targetListResponse, prodOu console.log('prodOutputFtoListRes',preFtoData); // 初始数据 const { chipInvest, ftoInvest, chipOutput, stdOutput, bipvOutput } = init() - if (prodOutputFtoListRes) { + if (prodOutputFtoListRes.length !== 0 ) { for (const factory of prodOutputFtoListRes) { console.log(factory); const fId = getFactoryId(factory); @@ -433,7 +433,7 @@ function splitCurrentAndPrevious(factoryListResponse, targetListResponse, prodOu // } } } - if (preData && preData[0] != null) { + if (preData) { for (const factory of preData) { const fId = getPreFactoryId(factory); if (factory.previousGlassType === 0) { @@ -452,7 +452,7 @@ function splitCurrentAndPrevious(factoryListResponse, targetListResponse, prodOu } } // console.log('ftoInvest',ftoInvest) - if (factoryListResponse && factoryListResponse[0] != null) { + if (factoryListResponse) { for (const factory of factoryListResponse) { const fId = getFactoryId(factory); console.log('factory.inputNumber', factory, fId); diff --git a/src/views/copilot/efficiency/options/chipOptions.js b/src/views/copilot/efficiency/options/chipOptions.js index 23ffef7..3c50d1d 100644 --- a/src/views/copilot/efficiency/options/chipOptions.js +++ b/src/views/copilot/efficiency/options/chipOptions.js @@ -8,7 +8,7 @@ export default ({ preName, }) => ({ grid: { - left: '0%', + left: 300, right: 0, bottom: 0, top: 0, @@ -17,7 +17,7 @@ export default ({ tooltip: {}, title: { text: titleValue, - left: "44%", + left: "48%", top: "37%", textAlign: "center", textStyle: { @@ -39,7 +39,7 @@ export default ({ type: "pie", name: "当前良率", radius: ["70%", "85%"], - center: ["45%", "52%"], + center: ["50%", "52%"], emptyCircleStyle: { color: "#003982", }, @@ -48,7 +48,7 @@ export default ({ { type: "pie", radius: ["70%", "85%"], - center: ["45%", "52%"], + center: ["50%", "52%"], avoidLabelOvervlap: false, label: { show: false, @@ -97,7 +97,7 @@ export default ({ { type: "pie", radius: ["55%", "70%"], - center: ["45%", "52%"], + center: ["50%", "52%"], avoidLabelOvervlap: false, label: { show: false, From 41d554f897d94ca9db66af60c0637480069dcc29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=98937886381=E2=80=99?= <‘937886381@qq.com’> Date: Tue, 18 Jun 2024 15:55:48 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/report/index.js | 10 ++- src/assets/styles/index.scss | 12 +++ src/styles/index.scss | 2 +- .../copilot/components/FactoryDataHeader.vue | 2 +- .../factoryData/components/BarChartBase.vue | 41 ++++++++-- .../factoryData/components/ChipOee.vue | 15 ++-- .../copilot/factoryData/components/Order.vue | 70 +++++++---------- src/views/report/comprehensiveData.vue | 6 +- src/views/report/produceConversion.vue | 75 ++++++++++--------- 9 files changed, 139 insertions(+), 94 deletions(-) diff --git a/src/api/report/index.js b/src/api/report/index.js index 243341e..8571ad5 100644 --- a/src/api/report/index.js +++ b/src/api/report/index.js @@ -1,7 +1,7 @@ /* * @Author: zhp * @Date: 2024-06-17 09:41:03 - * @LastEditTime: 2024-06-17 09:54:26 + * @LastEditTime: 2024-06-18 13:47:36 * @LastEditors: zhp * @Description: */ @@ -13,3 +13,11 @@ export function getComprehensiveDataPage(data) { params: data }) } + +export function getProduceTransData(data) { + return request({ + url: 'ip/prod-output/queryYCEReportByDateRange', + method: 'post', + data: data + }) +} diff --git a/src/assets/styles/index.scss b/src/assets/styles/index.scss index f3c0b35..5b6759d 100644 --- a/src/assets/styles/index.scss +++ b/src/assets/styles/index.scss @@ -232,6 +232,8 @@ aside { background-color: #d9d9d9; } +// 大屏滚动表格 + .no-data-bg { position: absolute; display: inline-block; @@ -252,3 +254,13 @@ aside { letter-spacing: 1px; } } + +.dv-scroll-board .rows .ceil, +.dv-scroll-board .header .header-item { + border-right: 1px solid rgba(13, 23, 40, 1); +} + +.dv-scroll-board .rows .ceil:last-child, +.dv-scroll-board .header .header-item:last-child { + border-right: none; +} diff --git a/src/styles/index.scss b/src/styles/index.scss index 5e425c0..df45f29 100644 --- a/src/styles/index.scss +++ b/src/styles/index.scss @@ -163,4 +163,4 @@ textarea { .el-upload__tip { line-height: 1.2; -} \ No newline at end of file +} diff --git a/src/views/copilot/components/FactoryDataHeader.vue b/src/views/copilot/components/FactoryDataHeader.vue index 08e42e2..f6d1bfc 100644 --- a/src/views/copilot/components/FactoryDataHeader.vue +++ b/src/views/copilot/components/FactoryDataHeader.vue @@ -107,7 +107,7 @@ export default { gap: 8px; } .factory-header > .menu2 { - width: 26vw; + width: 20vw; display: flex; justify-content: flex-end; align-items: center; diff --git a/src/views/copilot/factoryData/components/BarChartBase.vue b/src/views/copilot/factoryData/components/BarChartBase.vue index 534d37e..b54d83c 100644 --- a/src/views/copilot/factoryData/components/BarChartBase.vue +++ b/src/views/copilot/factoryData/components/BarChartBase.vue @@ -73,12 +73,25 @@ export default { }, }, axisLabel: { - // rotate:45, + interval: 0,//设置横坐标为斜 + rotate:45, color: "rgba(255, 255, 255, 0.7)", fontSize: 12, + // formatter: function (value) { + // console.log(value); + + // return value; + // }, }, data: [], }, + // dataZoom: [ + // { + // // show: true, + // start: 0, + // end: 50 + // } + // ], yAxis: { type: "value", name: "单位/片", @@ -92,7 +105,7 @@ export default { }, axisLabel: { color: "rgba(255, 255, 255, 0.7)", - fontSize: 12, + fontSize: 10, }, axisLine: { show: true, @@ -226,9 +239,9 @@ export default { // this.actualOptions = actualOptions; // this.initOptions(actualOptions); // }, - energyCockpits() { - this.initChart(); - }, + // energyCockpits() { + // this.initChart(); + // }, isOpen(val) { this.canvasReset(); }, @@ -263,6 +276,9 @@ export default { if (this.energyCockpits) { this.energyCockpits.forEach(ele => { this.data.push(ele.targetProduction) + if (ele.workOrderNumber.length > 4) { + ele.workOrderNumber = ele.workOrderNumber.substring(0, 4) + ".."; + } this.orderXAxis.push(ele.workOrderNumber) }); } @@ -273,6 +289,9 @@ export default { if (this.energyCockpits) { this.energyCockpits.forEach(ele => { this.data.push(ele.plannedInvestment) + if (ele.workOrderNumber.length > 4) { + ele.workOrderNumber = ele.workOrderNumber.substring(0, 4) + ".."; + } this.orderXAxis.push(ele.workOrderNumber) }); } @@ -282,6 +301,9 @@ export default { if (this.energyCockpits) { this.energyCockpits.forEach(ele => { this.data.push(ele.actualInvestment) + if (ele.workOrderNumber.length > 4) { + ele.workOrderNumber = ele.workOrderNumber.substring(0, 4) + ".."; + } this.orderXAxis.push(ele.workOrderNumber) }); } @@ -291,6 +313,9 @@ export default { if (this.energyCockpits) { this.energyCockpits.forEach(ele => { this.data.push(ele.actualProduction) + if (ele.workOrderNumber.length > 4) { + ele.workOrderNumber = ele.workOrderNumber.substring(0, 4) + ".."; + } this.orderXAxis.push(ele.workOrderNumber) }); } @@ -300,6 +325,9 @@ export default { if (this.energyCockpits) { this.energyCockpits.forEach(ele => { this.data.push(ele.wasteNum) + if (ele.workOrderNumber.length > 4) { + ele.workOrderNumber = ele.workOrderNumber.substring(0, 4) + ".."; + } this.orderXAxis.push(ele.workOrderNumber) }); } @@ -310,6 +338,9 @@ export default { this.energyCockpits.forEach(ele => { console.log(ele.reworkNum); this.data.push(ele.reworkNum) + if (ele.workOrderNumber.length > 4) { + ele.workOrderNumber = ele.workOrderNumber.substring(0, 4) + ".."; + } this.orderXAxis.push(ele.workOrderNumber) }); } diff --git a/src/views/copilot/factoryData/components/ChipOee.vue b/src/views/copilot/factoryData/components/ChipOee.vue index 8ed936e..6823a60 100644 --- a/src/views/copilot/factoryData/components/ChipOee.vue +++ b/src/views/copilot/factoryData/components/ChipOee.vue @@ -1,7 +1,7 @@ @@ -173,8 +173,11 @@ function getTemplate(period, dataList, than) { // console.log('dataList',dataList); 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()); @@ -187,11 +190,11 @@ function getTemplate(period, dataList, than) { if (period === 1 && than === '同比') { items = [ { - name: `${year-1}年${month}月${today}日`, + name: `${year - 1}年${yesterday}日`, data: dataList ? dataList[0] : [], }, { - name: `${month}月${today}日`, + name: `${yesterday}日`, data: dataList ? dataList[1] : [], // : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)), }, @@ -199,11 +202,11 @@ function getTemplate(period, dataList, than) { } else if (period ===1 && than === '环比') { items = [ { - name: `${yesterday}日`, + name: `${dayBeYes}日`, data: dataList ? dataList[0] : [], }, { - name: `${month}月${today}日`, + name: `${yesterday}日`, data: dataList ? dataList[1] : [], // : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)), }, diff --git a/src/views/copilot/factoryData/components/Order.vue b/src/views/copilot/factoryData/components/Order.vue index 0219590..9ea4ec6 100644 --- a/src/views/copilot/factoryData/components/Order.vue +++ b/src/views/copilot/factoryData/components/Order.vue @@ -1,7 +1,7 @@