From 9ea2f2dbe31e0a5120132c56816606a3bb01f291 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=98937886381=E2=80=99?= <‘937886381@qq.com’> Date: Tue, 9 Jul 2024 11:10:38 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dayReportComponents/ExportDayReport.vue | 2 +- .../dayReportExportChart/beProcessed.vue | 9 +-- .../dayReportExportChart/productYield.vue | 5 +- src/views/produce/workOrder/index.vue | 58 ++++++++++--------- src/views/report/comprehensiveData.vue | 4 +- src/views/report/produceConversion.vue | 2 +- src/views/report/productionSituationMW.vue | 2 +- .../report/productionSituationTablets.vue | 2 +- src/views/report/productionYield.vue | 2 +- 9 files changed, 42 insertions(+), 44 deletions(-) diff --git a/src/views/produce/workOrder/dayReportComponents/ExportDayReport.vue b/src/views/produce/workOrder/dayReportComponents/ExportDayReport.vue index 06bedc7..10da7f9 100644 --- a/src/views/produce/workOrder/dayReportComponents/ExportDayReport.vue +++ b/src/views/produce/workOrder/dayReportComponents/ExportDayReport.vue @@ -57,7 +57,7 @@ export default { }, beProcessObj: { type: Object, - default: () => { } + default: () => {} }, }, data() { diff --git a/src/views/produce/workOrder/dayReportComponents/dayReportExportChart/beProcessed.vue b/src/views/produce/workOrder/dayReportComponents/dayReportExportChart/beProcessed.vue index c52a5f2..029b95e 100644 --- a/src/views/produce/workOrder/dayReportComponents/dayReportExportChart/beProcessed.vue +++ b/src/views/produce/workOrder/dayReportComponents/dayReportExportChart/beProcessed.vue @@ -1,10 +1,3 @@ - @@ -18,7 +11,7 @@ export default { props: { beProcessObj: { type: Object, - default: () => {} + default: () => { } } }, data() { diff --git a/src/views/produce/workOrder/dayReportComponents/dayReportExportChart/productYield.vue b/src/views/produce/workOrder/dayReportComponents/dayReportExportChart/productYield.vue index d8df227..1904367 100644 --- a/src/views/produce/workOrder/dayReportComponents/dayReportExportChart/productYield.vue +++ b/src/views/produce/workOrder/dayReportComponents/dayReportExportChart/productYield.vue @@ -1,7 +1,7 @@ @@ -66,7 +66,8 @@ export default { }, legend: { bottom: 0, - left: 'center' + left: 'center', + itemGap:40, }, series: [ { diff --git a/src/views/produce/workOrder/index.vue b/src/views/produce/workOrder/index.vue index 8d137c3..75365ec 100644 --- a/src/views/produce/workOrder/index.vue +++ b/src/views/produce/workOrder/index.vue @@ -1,7 +1,7 @@ @@ -338,7 +338,7 @@ export default { } }) }, - async otherMethods(val) { + otherMethods(val) { console.log(val) if (val.type === 'detail') { this.detailOrUpdateVisible = true; @@ -347,33 +347,37 @@ export default { this.$refs.detailOrUpdate.init(val.data.id); }); } else { - const res = await getWorkOrderDetail(val.data.id) - if (res.code === 0) { - // this.loading = false - ;const data = res.data.prodWorkOrderDO - const barList = [data.targetProduction, data.plannedInvestment, data.actualInvestment, data.actualProduction, data.wasteNum, data.reworkNum] - const seriesList = [] - const dateList = [] - res.data.his.forEach(element => { - seriesList.push(element.actualProduction) - dateList.push(element.recordTime[0] + '-' + element.recordTime[1] + '-' + element.recordTime[2]) + getWorkOrderDetail(val.data.id).then((res) => { + if (res.code === 0) { + // this.loading = false + + const xAxisList = Object.keys(res.data.inProcessDis) + const yAxisList = Object.values(res.data.inProcessDis) + this.beProcessObj.xAxisList = xAxisList + this.beProcessObj.yAxisList = yAxisList + // console.log(this.beProcessObj) + ; const data = res.data.prodWorkOrderDO + const barList = [data.targetProduction, data.plannedInvestment, data.actualInvestment, data.actualProduction, data.wasteNum, data.reworkNum] + const seriesList = [] + const dateList = [] + res.data.his.forEach(element => { + seriesList.push(element.actualProduction) + dateList.push(element.recordTime[0] + '-' + element.recordTime[1] + '-' + element.recordTime[2]) + }) + this.hisObj.seriesList = seriesList + this.hisObj.dateList = dateList + this.produceData = barList + this.pieList = [ + { value: data.actualProduction ? data.actualProduction : 0, name: '实际产出' }, + { value: data.wasteNum ? data.wasteNum : 0, name: '废品数量' }, + { value: data.reworkNum ? data.reworkNum : 0, name: '待再加工数量' } + ] + } + this.$nextTick(() => { + this.exportPDF() }) - this.hisObj.seriesList = seriesList - this.hisObj.dateList = dateList - const xAxisList = Object.keys(res.data.inProcessDis) - const yAxisList = Object.values(res.data.inProcessDis) - this.beProcessObj.xAxisList = xAxisList - this.beProcessObj.yAxisList = yAxisList - this.produceData = barList - this.pieList = [ - { value: data.actualProduction ? data.actualProduction : 0, name: '实际产出' }, - { value: data.wasteNum ? data.wasteNum : 0, name: '废品数量' }, - { value: data.reworkNum ? data.reworkNum : 0, name: '待再加工数量' } - ] - } - this.$nextTick(() => { - this.exportPDF() }) + } }, async getDataList() { diff --git a/src/views/report/comprehensiveData.vue b/src/views/report/comprehensiveData.vue index 26f764d..45a096f 100644 --- a/src/views/report/comprehensiveData.vue +++ b/src/views/report/comprehensiveData.vue @@ -1,7 +1,7 @@ @@ -344,7 +344,7 @@ export default { }, async getDataList() { console.log(this.listQuery.type); - if (this.listQuery.type == null) { + if (this.listQuery.type == null || this.listQuery.type == '') { return this.$message('请选择时间维度') } if (!this.listQuery.startDate && !this.listQuery.endDate) { diff --git a/src/views/report/produceConversion.vue b/src/views/report/produceConversion.vue index f1608ea..7837c1f 100644 --- a/src/views/report/produceConversion.vue +++ b/src/views/report/produceConversion.vue @@ -546,7 +546,7 @@ export default { this.chartMsgYearTarget.series[0].data = [] this.chartMsgYearTarget.series[1].data = [] this.title = '' - if (this.listQuery.date == null) { + if (this.listQuery.date == null || this.listQuery.date == '') { return this.$message('请选择时间维度') } if (!this.listQuery.beginTime && !this.listQuery.endTime) { diff --git a/src/views/report/productionSituationMW.vue b/src/views/report/productionSituationMW.vue index 7c43c6c..ab75dd8 100644 --- a/src/views/report/productionSituationMW.vue +++ b/src/views/report/productionSituationMW.vue @@ -517,7 +517,7 @@ export default { this.chartMsgYearTarget.series[0].data = [] this.chartMsgYearTarget.series[1].data = [] console.log(this.listQuery); - if (this.listQuery.type == null) { + if (this.listQuery.type == null || this.listQuery.type == '') { return this.$message('请选择时间维度') } if (!this.listQuery.startDate && !this.listQuery.endDate) { diff --git a/src/views/report/productionSituationTablets.vue b/src/views/report/productionSituationTablets.vue index 700fc06..82322fb 100644 --- a/src/views/report/productionSituationTablets.vue +++ b/src/views/report/productionSituationTablets.vue @@ -649,7 +649,7 @@ export default { this.chartMsgYearTarget.series[3].data = [] } // console.log(this.listQuery); - if (this.listQuery.type == null) { + if (this.listQuery.type == null || this.listQuery.type == '') { return this.$message('请选择时间维度') } if (!this.listQuery.startDate && !this.listQuery.endDate) { diff --git a/src/views/report/productionYield.vue b/src/views/report/productionYield.vue index 874973c..3c0b353 100644 --- a/src/views/report/productionYield.vue +++ b/src/views/report/productionYield.vue @@ -567,7 +567,7 @@ export default { this.chartMsgYearTarget.xData = [] this.chartMsgYearTarget.series[0].data = [] this.chartMsgYearTarget.series[1].data = [] - if (this.listQuery.type == null) { + if (this.listQuery.type == null || this.listQuery.type == '') { return this.$message('请选择时间维度') } if (!this.listQuery.startDate && !this.listQuery.endDate) { From 2d67ca4347851cc58b88c6534fe8a4f473aba200 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=98937886381=E2=80=99?= <‘937886381@qq.com’> Date: Tue, 9 Jul 2024 17:01:11 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9ui?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/components/ChartContainer.vue | 13 +- src/views/copilot/components/Container.vue | 2 +- .../copilot/components/ContainerIcon.vue | 6 +- .../components/bottomLeftContainer.vue | 226 ++++++++++++++ .../components/bottomRightContainer.vue | 219 ++++++++++++++ .../components/efficiencyLeftContainer.vue | 219 ++++++++++++++ .../components/efficiencyRightContainer.vue | 219 ++++++++++++++ .../copilot/components/leftContainer.vue | 28 +- .../copilot/components/rightContainer.vue | 17 +- src/views/copilot/components/twoContainer.vue | 23 +- .../copilot/efficiency/components/ChipOee.vue | 20 +- .../efficiency/components/TransformRate.vue | 20 +- .../components/sub/bar/BarChartChipOEE.vue | 16 +- .../components/sub/bar/BarChartChipTrans.vue | 62 ++-- .../components/sub/std/ProgressBar.vue | 2 +- .../components/sub/std/StdRateItem.vue | 4 +- .../components/sub/std/preProgressBar.vue | 4 +- src/views/copilot/efficiency/index.vue | 7 +- .../factoryData/components/ContainerIcon.vue | 15 +- .../factoryData/components/leftContainer.vue | 24 +- .../factoryData/components/rightContainer.vue | 33 ++- src/views/copilot/yield/index.vue | 15 +- src/views/dashboard/components/Container.vue | 2 +- .../dashboard/components/ContainerIcon.vue | 8 +- src/views/dashboard/components/Header.vue | 2 +- .../dashboard/components/leftContainer.vue | 2 +- src/views/produce/data/index.vue | 8 +- .../report/components/produceLineBar.vue | 4 +- .../components/produceLineBarTarget.vue | 4 +- .../components/produceLineBarYearTarget.vue | 4 +- .../report/components/produceLineYieldBar.vue | 277 ++++++++++++++++++ .../components/produceLineYieldBarTarget.vue | 4 +- src/views/report/comprehensiveData.vue | 2 +- src/views/report/produceConversion.vue | 4 +- src/views/report/productionSituationMW.vue | 3 +- .../report/productionSituationTablets.vue | 2 +- src/views/report/productionYield.vue | 4 +- 37 files changed, 1356 insertions(+), 168 deletions(-) create mode 100644 src/views/copilot/components/bottomLeftContainer.vue create mode 100644 src/views/copilot/components/bottomRightContainer.vue create mode 100644 src/views/copilot/components/efficiencyLeftContainer.vue create mode 100644 src/views/copilot/components/efficiencyRightContainer.vue create mode 100644 src/views/report/components/produceLineYieldBar.vue diff --git a/src/views/components/ChartContainer.vue b/src/views/components/ChartContainer.vue index 2dec009..36fd732 100644 --- a/src/views/components/ChartContainer.vue +++ b/src/views/components/ChartContainer.vue @@ -1,8 +1,15 @@ - + @@ -43,7 +50,7 @@ export default { } ::-webkit-scrollbar { - width: 8px; + width: 80%; height: 8px; } diff --git a/src/views/copilot/components/Container.vue b/src/views/copilot/components/Container.vue index bae27da..5787d75 100644 --- a/src/views/copilot/components/Container.vue +++ b/src/views/copilot/components/Container.vue @@ -122,7 +122,7 @@ export default { gap: 8px; .container-title { - font-size: 1.18vw; + font-size: 1vw; line-height: 1.39vw; font-weight: normal; letter-spacing: 2px; diff --git a/src/views/copilot/components/ContainerIcon.vue b/src/views/copilot/components/ContainerIcon.vue index c61c77a..400a8c8 100644 --- a/src/views/copilot/components/ContainerIcon.vue +++ b/src/views/copilot/components/ContainerIcon.vue @@ -1,7 +1,7 @@ @@ -61,8 +61,8 @@ export default { .container-icon { // width: 32px; // height: 32px; - width: 1.701vw; - height: 1.701vw; + width: 1.4vw; + height: 1.4vw; background: #ccc2; } diff --git a/src/views/copilot/components/bottomLeftContainer.vue b/src/views/copilot/components/bottomLeftContainer.vue new file mode 100644 index 0000000..9afe4df --- /dev/null +++ b/src/views/copilot/components/bottomLeftContainer.vue @@ -0,0 +1,226 @@ + + + + + + + diff --git a/src/views/copilot/components/bottomRightContainer.vue b/src/views/copilot/components/bottomRightContainer.vue new file mode 100644 index 0000000..b4695ae --- /dev/null +++ b/src/views/copilot/components/bottomRightContainer.vue @@ -0,0 +1,219 @@ + + + + + + + diff --git a/src/views/copilot/components/efficiencyLeftContainer.vue b/src/views/copilot/components/efficiencyLeftContainer.vue new file mode 100644 index 0000000..3dd1fdb --- /dev/null +++ b/src/views/copilot/components/efficiencyLeftContainer.vue @@ -0,0 +1,219 @@ + + + + + + diff --git a/src/views/copilot/components/efficiencyRightContainer.vue b/src/views/copilot/components/efficiencyRightContainer.vue new file mode 100644 index 0000000..30c6a0b --- /dev/null +++ b/src/views/copilot/components/efficiencyRightContainer.vue @@ -0,0 +1,219 @@ + + + + + + + diff --git a/src/views/copilot/components/leftContainer.vue b/src/views/copilot/components/leftContainer.vue index b6f723c..9aa23d8 100644 --- a/src/views/copilot/components/leftContainer.vue +++ b/src/views/copilot/components/leftContainer.vue @@ -1,7 +1,7 @@ @@ -80,23 +80,25 @@ export default { flex-direction: column; position: relative; box-shadow: inset 0 0 20px 1px #fff1; + border-left: 0.11415vw solid; + border-image: linear-gradient(to bottom, transparent 10%, + #024798 20%, + transparent 90%) 1; backdrop-filter: blur(4px); &::before { content: ""; position: absolute; display: inline-block; - height: 100%; + height: 92%; width: 0.11415vw; border-radius: 2px; top: 0%; - left: 0; - background: radial-gradient( - circle at center, - #024798 2%, - #024798 30%, - transparent - ); + right: 0; + background: radial-gradient(circle at center, + #024798 2%, + #024798 100%, + transparent); z-index: 1; } @@ -104,12 +106,12 @@ export default { content: ""; position: absolute; display: inline-block; - width: 60%; + width: 90%; height: 0.31415vh; border-radius: 2px; - left: 8%; + left: 7%; bottom: 0; - background: linear-gradient(to right, #024798, transparent); + background: linear-gradient(to right,transparent 60%, #024798 95%, transparent 97%); z-index: 0; } @@ -122,7 +124,7 @@ export default { gap: 8px; .container-title { - font-size: 1.18vw; + font-size: 1vw; line-height: 1.39vw; font-weight: normal; letter-spacing: 2px; diff --git a/src/views/copilot/components/rightContainer.vue b/src/views/copilot/components/rightContainer.vue index 561101a..0ac9a43 100644 --- a/src/views/copilot/components/rightContainer.vue +++ b/src/views/copilot/components/rightContainer.vue @@ -73,6 +73,7 @@ export default { diff --git a/src/views/copilot/efficiency/components/sub/std/ProgressBar.vue b/src/views/copilot/efficiency/components/sub/std/ProgressBar.vue index 3e90f71..3b6c1e3 100644 --- a/src/views/copilot/efficiency/components/sub/std/ProgressBar.vue +++ b/src/views/copilot/efficiency/components/sub/std/ProgressBar.vue @@ -52,7 +52,7 @@ export default { ? 0 : this.current != 0 && this.target != 0 ? `${((this.current / this.target) * 100).toFixed(2)}%` - : this.current != 0 && this.target == 0 && this.current >= 100 ? 100 + '%' : this.current != 0 && this.target == 0 && this.current < 100 ? this.current + '%' : 0 + '%' + : this.current != 0 && this.target == 0 && this.current >= 100 ? 100 + '%' : this.current != 0 && this.target == 0 && this.current < 100 ? parseFloat(this.current).toFixed(2) + '%' : 0 + '%' // } else if(this.previous != 0) { // return this.previous + '%' // } diff --git a/src/views/copilot/efficiency/components/sub/std/StdRateItem.vue b/src/views/copilot/efficiency/components/sub/std/StdRateItem.vue index fc5199b..f7a6715 100644 --- a/src/views/copilot/efficiency/components/sub/std/StdRateItem.vue +++ b/src/views/copilot/efficiency/components/sub/std/StdRateItem.vue @@ -1,7 +1,7 @@ @@ -150,7 +150,7 @@ export default { align-items: center; gap: 8px; flex: 1 1 auto; - padding: 12px; + padding: 16px; } .std-rate-item__value { diff --git a/src/views/copilot/efficiency/components/sub/std/preProgressBar.vue b/src/views/copilot/efficiency/components/sub/std/preProgressBar.vue index 7427b98..7ea7944 100644 --- a/src/views/copilot/efficiency/components/sub/std/preProgressBar.vue +++ b/src/views/copilot/efficiency/components/sub/std/preProgressBar.vue @@ -1,7 +1,7 @@ @@ -49,7 +49,7 @@ export default { dataRate() { // if (this.current != 0 && this.target != 0) { // console.log( '1111111111', this.current, this.target,this.previous); - return this.previous >=100 ? 100 + '%' : this.previous + '%'; + return this.previous >= 100 ? 100 + '%' : parseFloat(this.previous).toFixed(2) + '%'; // } else if(this.previous != 0) { // return this.previous + '%' // } diff --git a/src/views/copilot/efficiency/index.vue b/src/views/copilot/efficiency/index.vue index ac910ef..790d52d 100644 --- a/src/views/copilot/efficiency/index.vue +++ b/src/views/copilot/efficiency/index.vue @@ -1,7 +1,7 @@ @@ -30,8 +30,9 @@ diff --git a/src/views/dashboard/components/Header.vue b/src/views/dashboard/components/Header.vue index 528f319..d0663e9 100644 --- a/src/views/dashboard/components/Header.vue +++ b/src/views/dashboard/components/Header.vue @@ -153,7 +153,7 @@ h1 { .side { position: absolute; - font-size: 1.18vw; + font-size: 1vw; // line-height: 24px; line-height: 1.277vw; letter-spacing: 2px; diff --git a/src/views/dashboard/components/leftContainer.vue b/src/views/dashboard/components/leftContainer.vue index d671eb8..677e8f7 100644 --- a/src/views/dashboard/components/leftContainer.vue +++ b/src/views/dashboard/components/leftContainer.vue @@ -113,7 +113,7 @@ export default { gap: 8px; .container-title { - font-size: 1.18vw; + font-size: 1vw; line-height: 1.39vw; font-weight: normal; letter-spacing: 2px; diff --git a/src/views/produce/data/index.vue b/src/views/produce/data/index.vue index 045b823..57a8cc4 100644 --- a/src/views/produce/data/index.vue +++ b/src/views/produce/data/index.vue @@ -1,7 +1,7 @@ @@ -402,7 +402,8 @@ export default { } // y轴数据 - arr.forEach(fac => { + arr.forEach((fac,index) => { + console.log('fac',fac); let i = 0 while ( i < 3) { // 下标 @@ -422,6 +423,8 @@ export default { label: { show: i === 2 ? true : false, position: 'top', + // fontSize:10, + // position: [-index + 1, -index +1], formatter(params) { return fac.name.substring(0, 2) } @@ -448,6 +451,7 @@ export default { label: { show: true, position: 'top', + // position: [-index + 1, -index + 1], formatter(params) { if (params.value === 0) { return '' diff --git a/src/views/report/components/produceLineBar.vue b/src/views/report/components/produceLineBar.vue index e957494..8f15c36 100644 --- a/src/views/report/components/produceLineBar.vue +++ b/src/views/report/components/produceLineBar.vue @@ -1,7 +1,7 @@ @@ -238,7 +238,7 @@ export default { text-align: right; position: relative; // right: 30; - top: -10px; + top: 0px; .itemData { display: inline-block; margin-right: 10px; diff --git a/src/views/report/components/produceLineBarTarget.vue b/src/views/report/components/produceLineBarTarget.vue index 8cb370d..e9af3f5 100644 --- a/src/views/report/components/produceLineBarTarget.vue +++ b/src/views/report/components/produceLineBarTarget.vue @@ -1,7 +1,7 @@ @@ -237,7 +237,7 @@ export default { position: relative; // right: 30; // top: 10px; - top: -10px; + top: 0px; .itemData { display: inline-block; margin-right: 10px; diff --git a/src/views/report/components/produceLineBarYearTarget.vue b/src/views/report/components/produceLineBarYearTarget.vue index 597455f..c77f4e2 100644 --- a/src/views/report/components/produceLineBarYearTarget.vue +++ b/src/views/report/components/produceLineBarYearTarget.vue @@ -1,7 +1,7 @@ @@ -215,7 +215,7 @@ export default { text-align: right; position: relative; // right: 30; - top: -10px; + top: 0px; // top: -10px; .itemData { display: inline-block; diff --git a/src/views/report/components/produceLineYieldBar.vue b/src/views/report/components/produceLineYieldBar.vue new file mode 100644 index 0000000..bb9e514 --- /dev/null +++ b/src/views/report/components/produceLineYieldBar.vue @@ -0,0 +1,277 @@ + + + + + diff --git a/src/views/report/components/produceLineYieldBarTarget.vue b/src/views/report/components/produceLineYieldBarTarget.vue index 952865e..090f60f 100644 --- a/src/views/report/components/produceLineYieldBarTarget.vue +++ b/src/views/report/components/produceLineYieldBarTarget.vue @@ -1,7 +1,7 @@ @@ -227,7 +227,7 @@ export default { .legendData { text-align: right; position: relative; - top: -10px; + top: 0px; // right: 30; // top: 10px; .itemData { diff --git a/src/views/report/comprehensiveData.vue b/src/views/report/comprehensiveData.vue index 45a096f..d017e2f 100644 --- a/src/views/report/comprehensiveData.vue +++ b/src/views/report/comprehensiveData.vue @@ -1,7 +1,7 @@ diff --git a/src/views/report/produceConversion.vue b/src/views/report/produceConversion.vue index 7837c1f..7457e41 100644 --- a/src/views/report/produceConversion.vue +++ b/src/views/report/produceConversion.vue @@ -96,7 +96,7 @@