From ef618a4abb3ba06c90dd11afd72230adc134a172 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=98937886381=E2=80=99?= <‘937886381@qq.com’> Date: Fri, 7 Jun 2024 11:13:59 +0800 Subject: [PATCH] =?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/mixins/chart.js | 12 +- .../copilot/components/FactoryDataHeader.vue | 18 ++- .../copilot/efficiency/components/ChipOee.vue | 12 +- .../efficiency/components/ChipRate.vue | 26 +-- .../copilot/efficiency/components/StdRate.vue | 22 +-- .../efficiency/components/TransformRate.vue | 12 +- .../components/sub/bar/BarChartChipOEE.vue | 6 +- .../components/sub/bar/BarChartChipTrans.vue | 7 +- .../components/sub/chip/ChipRateItem.vue | 79 +++++++--- .../components/sub/ring/DoubleRingChart.vue | 6 +- .../components/sub/std/ProgressBar.vue | 29 +++- .../components/sub/std/StdRateItem.vue | 36 +++-- .../copilot/efficiency/options/chipOptions.js | 16 +- src/views/copilot/factoryData/bbIndex.vue | 6 +- .../factoryData/components/BarChartBase.vue | 120 +++++++++++--- .../components/BarChartChipOEE.vue | 10 +- .../factoryData/components/ChipOee.vue | 16 +- .../copilot/factoryData/components/Order.vue | 26 ++- .../factoryData/components/ProdMonitor.vue | 29 ++-- .../copilot/factoryData/components/button.vue | 99 ++++++++++++ .../factoryData/components/chartButton.vue | 148 ++++++++++++++++++ .../factoryData/components/rightContainer.vue | 67 ++++---- src/views/copilot/factoryData/hdIndex.vue | 2 +- src/views/copilot/factoryData/index.vue | 13 +- .../copilot/yield/components/ChipInvest.vue | 12 +- .../copilot/yield/components/FtoInvest.vue | 12 +- .../components/sub/ring/DoubleRingChart.vue | 16 +- 27 files changed, 643 insertions(+), 214 deletions(-) create mode 100644 src/views/copilot/factoryData/components/button.vue create mode 100644 src/views/copilot/factoryData/components/chartButton.vue diff --git a/src/mixins/chart.js b/src/mixins/chart.js index 0901d53..e2270ed 100644 --- a/src/mixins/chart.js +++ b/src/mixins/chart.js @@ -8,10 +8,14 @@ function __resizeHandler(entries) { ? entry.contentBoxSize[0] : entry.contentBoxSize; this.chart_mixin_chartInstance.resize({ - width: - contentBoxSize.inlineSize < this.MIN_WIDTH - ? this.MIN_WIDTH - : contentBoxSize.inlineSize, + // width: + // contentBoxSize.inlineSize < this.MIN_WIDTH + // ? this.MIN_WIDTH + // : contentBoxSize.inlineSize, + // width: + // entry.contentRect.width < this.MIN_WIDTH + // ? this.MIN_WIDTH + // : entry.contentRect.width, height: contentBoxSize.blockSize, }); } else { diff --git a/src/views/copilot/components/FactoryDataHeader.vue b/src/views/copilot/components/FactoryDataHeader.vue index 344d466..08e42e2 100644 --- a/src/views/copilot/components/FactoryDataHeader.vue +++ b/src/views/copilot/components/FactoryDataHeader.vue @@ -4,8 +4,13 @@ - + + + +
{{ companyName }}
+ -
{{ companyName }}
- @@ -50,7 +50,7 @@ export default { }, data() { return { - // isFullscreen: false, + isFullscreen: false, content:'全屏', dataList: [ { id: 1, name: "日" }, @@ -109,12 +109,14 @@ export default { .factory-header > .menu2 { width: 26vw; display: flex; + justify-content: flex-end; align-items: center; gap: 8px; } .export-btn, .fullscreen-btn { + /* float: right; */ width: 32px; height: 32px; margin-left: 24px; diff --git a/src/views/copilot/efficiency/components/ChipOee.vue b/src/views/copilot/efficiency/components/ChipOee.vue index f5575b4..f2a0ae4 100644 --- a/src/views/copilot/efficiency/components/ChipOee.vue +++ b/src/views/copilot/efficiency/components/ChipOee.vue @@ -60,7 +60,7 @@ export default { const year = new Date().getFullYear(); if (this.period === '日' && this.than === '同比') { items = [ - { label: `去年${month}月${today}日`, color: "#12f7f1" }, + { label: `${year-1}年${month}月${today}日`, color: "#12f7f1" }, { label: `${month}月${today}日`, color: "#58adfa" }, ]; } else if (this.period === '日' && this.than === '环比') { @@ -70,7 +70,7 @@ export default { ]; } else if (this.period === '周' && this.than === '同比') { items = [ - { label: `去年本周`, color: "#12f7f1" }, + { label: `${year-1}年本周`, color: "#12f7f1" }, { label: `本周`, color: "#58adfa" }, ]; } else if (this.period === '周' && this.than === '环比') { @@ -80,7 +80,7 @@ export default { ]; } else if (this.period === '月' && this.than === '同比') { items = [ - { label: `去年${month}月`, color: "#12f7f1" }, + { label: `${year-1}年${month}月`, color: "#12f7f1" }, { label: `${month}月`, color: "#58adfa" }, { label: `${month}月目标`, color: "#58adfa" }, // { label: `${month}月目标`, value: valueTuple[2] }, @@ -177,7 +177,7 @@ function getTemplate(period, dataList, than) { if (period === '日' && than === '同比') { items = [ { - name: `去年${month}月${today}日`, + name: `${year-1}年${month}月${today}日`, data: dataList ? dataList[0] : [], }, { @@ -201,7 +201,7 @@ function getTemplate(period, dataList, than) { } else if (period === '周' && than === '同比') { items = [ { - name: `去年本周`, + name: `${year-1}年本周`, data: dataList ? dataList[0] : [], }, { @@ -225,7 +225,7 @@ function getTemplate(period, dataList, than) { } else if (period === '月' && than === '同比') { items = [ { - name: `去年${month}月`, + name: `${year-1}年${month}月`, data: dataList ? dataList[0] : [], }, { diff --git a/src/views/copilot/efficiency/components/ChipRate.vue b/src/views/copilot/efficiency/components/ChipRate.vue index c2e4b1b..a69cfde 100644 --- a/src/views/copilot/efficiency/components/ChipRate.vue +++ b/src/views/copilot/efficiency/components/ChipRate.vue @@ -1,15 +1,15 @@ @@ -43,15 +43,15 @@ export default { gap: 5px; position: relative; - // &:after { - // content: ""; - // position: absolute; - // left: 50%; - // top: 0; - // width: 3px; - // height: 100%; - // transform: translateX(-50%); - // background: linear-gradient(to bottom, transparent, #00f2ff, transparent); - // } + &:after { + content: ""; + position: absolute; + left: 50%; + top: 0; + width: 3px; + height: 100%; + transform: translateX(-50%); + background: linear-gradient(to bottom, transparent, #00f2ff, transparent); + } } diff --git a/src/views/copilot/efficiency/components/StdRate.vue b/src/views/copilot/efficiency/components/StdRate.vue index 3656eaa..2d0dc24 100644 --- a/src/views/copilot/efficiency/components/StdRate.vue +++ b/src/views/copilot/efficiency/components/StdRate.vue @@ -1,7 +1,7 @@ @@ -39,7 +39,7 @@ export default { } }, computed: { - data() { + stdData() { return this.$store.getters.copilot.efficiency.stdRate }, cities() { @@ -65,22 +65,22 @@ export default { { name: "凯盛光伏", target: 0, previous: 0, current: 0, componentYield: 0, goodNumber: 0, }, { name: "蚌埠", target: 0, previous: 0, current: 0, componentYield: 0, goodNumber: 0, }, ] - if (this.data?.previous) { - this.data?.previous.forEach( + if (this.stdData?.previous) { + this.stdData?.previous.forEach( (v, idx) => { _cities[idx].previous = v ?? 0; } ); } - if (this.data?.target) { - this.data?.target.forEach( + if (this.stdData?.target) { + this.stdData?.target.forEach( (v, idx) => { _cities[idx].target = v ?? 0; } ) } - if (this.data?.current) { - this.data?.current.forEach( + if (this.stdData?.current) { + this.stdData?.current.forEach( (v, idx) => { _cities[idx].current = v ?? 0; } @@ -123,7 +123,7 @@ export default { // flex: 1 1 auto; flex-direction: column; // display: -webkit-box; - // flex-wrap: wrap; + flex-wrap: wrap; // align-items: center; // grid-template-columns: repeat(2, 1fr); // grid-template-rows: repeat(4, 1fr); @@ -136,7 +136,7 @@ export default { // width: 50%; } .span-2 { - flex: 1 1 auto; - // flex-basis: 100%; + // flex: 1 1 auto; + flex-basis: 100%; } diff --git a/src/views/copilot/efficiency/components/TransformRate.vue b/src/views/copilot/efficiency/components/TransformRate.vue index 64037a7..9c3dc91 100644 --- a/src/views/copilot/efficiency/components/TransformRate.vue +++ b/src/views/copilot/efficiency/components/TransformRate.vue @@ -60,7 +60,7 @@ export default { const year = new Date().getFullYear(); if (this.period === '日' && this.than === '同比') { items = [ - { label: `去年${month}月${today}日`, color: "#12f7f1" }, + { label: `${year-1}年${month}月${today}日`, color: "#12f7f1" }, { label: `${month}月${today}日`, color: "#58adfa" }, ]; } else if (this.period === '日' && this.than === '环比') { @@ -70,7 +70,7 @@ export default { ]; } else if (this.period === '周' && this.than === '同比') { items = [ - { label: `去年本周`, color: "#12f7f1" }, + { label: `${year-1}年本周`, color: "#12f7f1" }, { label: `本周`, color: "#58adfa" }, ]; } else if (this.period === '周' && this.than === '环比') { @@ -80,7 +80,7 @@ export default { ]; } else if (this.period === '月' && this.than === '同比') { items = [ - { label: `去年${month}月`, color: "#12f7f1" }, + { label: `${year-1}年${month}月`, color: "#12f7f1" }, { label: `${month}月`, color: "#58adfa" }, { label: `${month}月目标`, color: "#58adfa" }, // { label: `${month}月目标`, value: valueTuple[2] }, @@ -168,7 +168,7 @@ function getTemplate(period, dataList,than) { if (period === '日' && than === '同比') { items = [ { - name: `去年${month}月${today}日`, + name: `${year-1}年${month}月${today}日`, data: dataList ? dataList[0] : [], }, { @@ -192,7 +192,7 @@ function getTemplate(period, dataList,than) { } else if (period === '周' && than === '同比') { items = [ { - name: `去年本周`, + name: `${year-1}年本周`, data: dataList ? dataList[0] : [], }, { @@ -216,7 +216,7 @@ function getTemplate(period, dataList,than) { } else if (period === '月' && than === '同比') { items = [ { - name: `去年${month}月`, + name: `${year-1}年${month}月`, data: dataList ? dataList[0] : [], }, { diff --git a/src/views/copilot/efficiency/components/sub/bar/BarChartChipOEE.vue b/src/views/copilot/efficiency/components/sub/bar/BarChartChipOEE.vue index 8eebe96..67b2633 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 @@ @@ -303,6 +303,7 @@ export default { + + diff --git a/src/views/copilot/factoryData/components/chartButton.vue b/src/views/copilot/factoryData/components/chartButton.vue new file mode 100644 index 0000000..a2c4b1e --- /dev/null +++ b/src/views/copilot/factoryData/components/chartButton.vue @@ -0,0 +1,148 @@ + + + + + + + + + diff --git a/src/views/copilot/factoryData/components/rightContainer.vue b/src/views/copilot/factoryData/components/rightContainer.vue index 124bcee..797546e 100644 --- a/src/views/copilot/factoryData/components/rightContainer.vue +++ b/src/views/copilot/factoryData/components/rightContainer.vue @@ -8,9 +8,7 @@ diff --git a/src/views/copilot/factoryData/hdIndex.vue b/src/views/copilot/factoryData/hdIndex.vue index ac8432a..69bff90 100644 --- a/src/views/copilot/factoryData/hdIndex.vue +++ b/src/views/copilot/factoryData/hdIndex.vue @@ -4,7 +4,7 @@ @update:than="updateThan" @update:period="updatePeriod" />
- + diff --git a/src/views/copilot/factoryData/index.vue b/src/views/copilot/factoryData/index.vue index b195668..39d0614 100644 --- a/src/views/copilot/factoryData/index.vue +++ b/src/views/copilot/factoryData/index.vue @@ -1,15 +1,15 @@