From c8bc54e04bc93ff4ca945c854e5fac55429f83d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=98937886381=E2=80=99?= <‘937886381@qq.com’> Date: Wed, 19 Jun 2024 16:25:50 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=8A=A5=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/report/index.js | 19 +- .../report/components/produceLineBar.vue | 220 ++++++++++++ src/views/report/comprehensiveData.vue | 19 +- src/views/report/produceConversion.vue | 257 ++++++++------ src/views/report/productionSituationMW.vue | 175 ++++----- .../report/productionSituationTablets.vue | 186 ++++++---- src/views/report/productionYield.vue | 336 ++++++++++++------ 7 files changed, 812 insertions(+), 400 deletions(-) create mode 100644 src/views/report/components/produceLineBar.vue diff --git a/src/api/report/index.js b/src/api/report/index.js index 8571ad5..9c6ea60 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-18 13:47:36 + * @LastEditTime: 2024-06-19 13:30:14 * @LastEditors: zhp * @Description: */ @@ -21,3 +21,20 @@ export function getProduceTransData(data) { data: data }) } + + +export function getProduceSituationData(data) { + return request({ + url: 'ip/production/situation/get/production/situation', + method: 'post', + data: data + }) +} + +export function getProductionSituationMWData(data) { + return request({ + url: 'ip/production/situation/power/get/production/situation', + method: 'post', + data: data + }) +} diff --git a/src/views/report/components/produceLineBar.vue b/src/views/report/components/produceLineBar.vue new file mode 100644 index 0000000..19a58f0 --- /dev/null +++ b/src/views/report/components/produceLineBar.vue @@ -0,0 +1,220 @@ + + + + + + + + + + + + + + {{ item.name }} + + + + + + + diff --git a/src/views/report/comprehensiveData.vue b/src/views/report/comprehensiveData.vue index 73a9f68..7d2b818 100644 --- a/src/views/report/comprehensiveData.vue +++ b/src/views/report/comprehensiveData.vue @@ -1,7 +1,7 @@ @@ -21,7 +21,7 @@ + start-placeholder="开始日期" value-format="yyyy-MM-dd" @change="changeDayTime" end-placeholder="结束日期"> @@ -34,9 +34,8 @@ - + @@ -100,9 +99,11 @@ export default { start: undefined, end: undefined, listQuery: { + pageNo: 1, + pageSize: 999, // size: 10, // current: 1, - factory: null, + factory: undefined, // total: 0, type: 2, startDate: undefined, @@ -236,7 +237,7 @@ export default { mounted() { // this.getOverView() const currentMonth = new Date() - this.listQuery.reportTime = [moment(currentMonth).format('yyyy-MM-DD HH:mm:ss'), moment(currentMonth).format('yyyy-MM-DD HH:mm:ss')] + this.listQuery.reportTime = [moment(currentMonth).format('yyyy-MM-DD'), moment(currentMonth).format('yyyy-MM-DD')] this.changeTime() this.getDataList() }, @@ -294,8 +295,8 @@ export default { }, onValueChange(picker, k) { // 选中近k周后触发的操作 if (this.start && this.end) { - this.date1 = moment(this.start.getTime() - 24 * 60 * 60 * 1000).format('YYYY-MM-DD HH:mm:ss') - this.date2 = moment(this.end.getTime() + 5 * 24 * 60 * 60 * 1000).format('YYYY-MM-DD HH:mm:ss') + this.date1 = moment(this.start.getTime() - 24 * 60 * 60 * 1000).format('YYYY-MM-DD') + this.date2 = moment(this.end.getTime() + 5 * 24 * 60 * 60 * 1000).format('YYYY-MM-DD') const numDays = (new Date(this.date2).getTime() - new Date(this.date1).getTime()) / (24 * 3600 * 1000); if (numDays > 168) { console.log(numDays) diff --git a/src/views/report/produceConversion.vue b/src/views/report/produceConversion.vue index f8e9637..1e76b70 100644 --- a/src/views/report/produceConversion.vue +++ b/src/views/report/produceConversion.vue @@ -7,17 +7,17 @@ - + - + + start-placeholder="开始日期" value-format="yyyy-MM-dd" @change="changeDayTime" end-placeholder="结束日期"> - + @@ -29,13 +29,12 @@ {{ date1 }} 至 {{ date2 }},共 {{ weekNum }} 周 --> - - + + - + @@ -79,65 +78,28 @@ - diff --git a/src/views/report/components/produceLineBarYearTarget.vue b/src/views/report/components/produceLineBarYearTarget.vue new file mode 100644 index 0000000..8fb9c80 --- /dev/null +++ b/src/views/report/components/produceLineBarYearTarget.vue @@ -0,0 +1,245 @@ + + + + + + + + + + + + + + {{ item.name }} + + + + + + + diff --git a/src/views/report/comprehensiveData.vue b/src/views/report/comprehensiveData.vue index 7d2b818..416d87c 100644 --- a/src/views/report/comprehensiveData.vue +++ b/src/views/report/comprehensiveData.vue @@ -1,7 +1,7 @@ @@ -76,7 +76,7 @@