From c0daa74a84fba7f2c0f2d824dea9049e9caf8b46 Mon Sep 17 00:00:00 2001 From: lb Date: Tue, 28 Nov 2023 19:31:08 +0800 Subject: [PATCH 1/4] =?UTF-8?q?update=20=E4=BA=A7=E7=BA=BF=E5=B9=B3?= =?UTF-8?q?=E8=A1=A1=E5=88=86=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../core/analysis/balanceAnalysis/index.vue | 96 ++++++++++++------- .../equipmentProcessAmount/index.vue | 6 +- 2 files changed, 63 insertions(+), 39 deletions(-) diff --git a/src/views/core/analysis/balanceAnalysis/index.vue b/src/views/core/analysis/balanceAnalysis/index.vue index 8ce3b630..1898ec7b 100644 --- a/src/views/core/analysis/balanceAnalysis/index.vue +++ b/src/views/core/analysis/balanceAnalysis/index.vue @@ -11,10 +11,9 @@ @tab-click="handleTabClick" style="height: 100%"> - - - - @@ -98,6 +93,11 @@ export default { startTime: null, endTime: null, }, + sectionMap: {}, + lastSection: null, + currRowIndex: 0, + spanArr: [], + ready: false, }; }, @@ -156,8 +156,11 @@ export default { const { data, nameData } = await this.getCT(); await this.buildProps(nameData); await this.buildTableData(data); - const xxxx = this.tableData; - debugger; + this.tableData = this.tableData.sort((a, b) => { + if (a.sectionName < b.sectionName) return 1; + return -1; + }); + this.ready = true; }, buildProps(nameData) { @@ -208,38 +211,60 @@ export default { }, async buildTableData(data) { - /** 处理 工段 分组 */ - const sectionList = data.map((item) => {}); - }, + const sectionArr = Array.from( + new Set(data.map((item) => item.sectionName)) + ).sort(); + this.sectionMap = sectionArr.reduce( + (sum, curr) => ({ ...sum, [curr]: 0 }), + {} + ); + this.spanArr = Array.from(sectionArr, () => 0); - setRowSpan(arr) { - let count = 0; - arr.forEach((item, index) => { - if (index === 0) { - this.spanArr.push(1); - } else { - if (item === arr[index - 1]) { - this.spanArr[count] += 1; - this.spanArr.push(0); - } else { - count = index; - this.spanArr.push(1); - } + return new Promise((resolve, reject) => { + /** 处理 工段 分组 */ + data.map((item) => { + this.sectionMap[item.sectionName]++; + /** 处理 设备 */ + const row = { + equName: item.equName, + sectionName: item.sectionName, + }; + item.data.forEach((eq) => { + const date = eq.dynamicName; + eq.children.forEach((sub) => { + if (sub.dynamicName == '设备CT') + row[date + '_eq_ct'] = sub.dynamicValue; + if (sub.dynamicName == '设备TT') + row[date + '_eq_tt'] = sub.dynamicValue; + if (sub.dynamicName == '产线CT') + row[date + '_pl_ct'] = sub.dynamicValue; + if (sub.dynamicName == '产线TT') + row[date + '_pl_tt'] = sub.dynamicValue; + }); + }); + this.tableData.push(row); + }); + + /** 生成span数组 */ + const tmp = [0]; + for (const [index, key] of sectionArr.entries()) { + tmp[index + 1] = tmp[index] + this.sectionMap[key]; } + + console.log('tep', tmp); + this.spanArr = tmp; + resolve(); }); }, - /** 合并table列的规则 */ - mergeColumnHandler({ row, column, rowIndex, columnIndex }) { - if (columnIndex == 0) { - if (this.spanArr[rowIndex]) { - return [ - this.spanArr[rowIndex], // row span - 1, // col span - ]; - } else { - return [0, 0]; + mergeRow({ row, column, rowIndex, columnIndex }) { + if (columnIndex == 1) { + const span = this.sectionMap[row.sectionName]; + if (this.spanArr.includes(rowIndex)) { + console.log('span...'); + return [span, 1]; } + return [0, 0]; } }, @@ -319,6 +344,7 @@ export default { // this.dataListLoading = false; }); }, + handleSearchBarBtnClick(btn) { switch (btn.btnName) { case 'search': diff --git a/src/views/monitoring/equipmentProcessAmount/index.vue b/src/views/monitoring/equipmentProcessAmount/index.vue index 0848b288..d61257dc 100644 --- a/src/views/monitoring/equipmentProcessAmount/index.vue +++ b/src/views/monitoring/equipmentProcessAmount/index.vue @@ -33,7 +33,7 @@ :data-value="fc.id" class="factory-list__item" :class="{ 'is-current': fc.id == currentFactory?.id }"> - + {{ fc.label }} -
+
Date: Wed, 29 Nov 2023 10:12:41 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E7=99=BB=E5=BD=95=E9=A1=B5=E5=8E=BB?= =?UTF-8?q?=E6=8E=89=E9=AA=8C=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.dev | 3 -- .env.front | 3 -- .env.prod | 3 -- .env.stage | 3 -- .env.static | 3 -- src/utils/ruoyi.js | 13 ------- src/views/login.vue | 85 ++++----------------------------------------- 7 files changed, 7 insertions(+), 106 deletions(-) diff --git a/.env.dev b/.env.dev index 3497fe49..1da25e71 100644 --- a/.env.dev +++ b/.env.dev @@ -31,9 +31,6 @@ VUE_CLI_BABEL_TRANSPILE_MODULES = true # 多租户的开关 VUE_APP_TENANT_ENABLE = true -# 验证码的开关 -VUE_APP_CAPTCHA_ENABLE = true - # 文档的开关 VUE_APP_DOC_ENABLE = true diff --git a/.env.front b/.env.front index 743152e3..d1645075 100644 --- a/.env.front +++ b/.env.front @@ -14,9 +14,6 @@ VUE_CLI_BABEL_TRANSPILE_MODULES = true # 多租户的开关 VUE_APP_TENANT_ENABLE = true -# 验证码的开关 -VUE_APP_CAPTCHA_ENABLE = true - # 文档的开关 VUE_APP_DOC_ENABLE = true diff --git a/.env.prod b/.env.prod index 4fa71c08..8526c196 100644 --- a/.env.prod +++ b/.env.prod @@ -28,9 +28,6 @@ VUE_APP_APP_NAME ='yudao-admin' # 多租户的开关 VUE_APP_TENANT_ENABLE = true -# 验证码的开关 -VUE_APP_CAPTCHA_ENABLE = true - # 文档的开关 VUE_APP_DOC_ENABLE = false diff --git a/.env.stage b/.env.stage index b25d7a96..763cc8b5 100644 --- a/.env.stage +++ b/.env.stage @@ -15,9 +15,6 @@ PUBLIC_PATH = 'http://static.yudao.iocoder.cn/' # 多租户的开关 VUE_APP_TENANT_ENABLE = true -# 验证码的开关 -VUE_APP_CAPTCHA_ENABLE = true - # 文档的开关 VUE_APP_DOC_ENABLE = false diff --git a/.env.static b/.env.static index 35e7a28e..bdb29f8f 100644 --- a/.env.static +++ b/.env.static @@ -17,9 +17,6 @@ VUE_APP_APP_NAME ='/admin-ui-vue2/' # 多租户的开关 VUE_APP_TENANT_ENABLE = true -# 验证码的开关 -VUE_APP_CAPTCHA_ENABLE = true - # 文档的开关 VUE_APP_DOC_ENABLE = true diff --git a/src/utils/ruoyi.js b/src/utils/ruoyi.js index fd5d1095..3b4e5256 100644 --- a/src/utils/ruoyi.js +++ b/src/utils/ruoyi.js @@ -187,19 +187,6 @@ export function getTenantEnable() { return process.env.VUE_APP_TENANT_ENABLE || true; } -/** - * 获得验证码功能是否开启 - */ -export function getCaptchaEnable() { - if (process.env.VUE_APP_CAPTCHA_ENABLE === "true") { - return true; - } - if (process.env.VUE_APP_CAPTCHA_ENABLE === "false") { - return false; - } - return process.env.VUE_APP_CAPTCHA_ENABLE || true; -} - /** * 获得文档是否开启 */ diff --git a/src/views/login.vue b/src/views/login.vue index 2f229f11..4434c6eb 100644 --- a/src/views/login.vue +++ b/src/views/login.vue @@ -80,13 +80,6 @@
- - - -
-
+
- -
- - - - - - - - -
-
- - -
@@ -241,7 +177,7 @@ import { sendSmsCode, socialAuthRedirect } from '@/api/login'; import { getTenantIdByName } from '@/api/system/tenant'; import { SystemUserSocialTypeEnum } from '@/utils/constants'; -import { getCaptchaEnable, getTenantEnable } from '@/utils/ruoyi'; +import { getTenantEnable } from '@/utils/ruoyi'; import { getPassword, getRememberMe, @@ -269,7 +205,7 @@ export default { data() { return { codeUrl: '', - captchaEnable: true, + captchaEnable: false, tenantEnable: true, mobileCodeTimer: 0, loginForm: { @@ -347,8 +283,6 @@ export default { } }); } - // 验证码开关 - this.captchaEnable = getCaptchaEnable(); // 重定向地址 this.redirect = this.$route.query.redirect ? decodeURIComponent(this.$route.query.redirect) @@ -360,15 +294,7 @@ export default { }, methods: { getCode() { - // 情况一,未开启:则直接登录 - if (!this.captchaEnable) { - this.handleLogin({}); - return; - } - - // 情况二,已开启:则展示验证码;只有完成验证码的情况,才进行登录 - // 弹出验证码 - this.$refs.verify.show(); + this.handleLogin({}); }, getCookie() { const username = getUsername(); @@ -522,4 +448,7 @@ export default { top: 22%; } } +.form-cont { + padding-top: 40px; +} From 6702521f310716f94e03a03c97c7e2c68b3dc503 Mon Sep 17 00:00:00 2001 From: lb Date: Wed, 29 Nov 2023 11:34:43 +0800 Subject: [PATCH 3/4] =?UTF-8?q?overwrite=20=E4=BA=A7=E7=BA=BF=E5=B9=B3?= =?UTF-8?q?=E8=A1=A1=E5=88=86=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../core/analysis/balanceAnalysis/chart.vue | 209 ++++++++++++++++++ .../core/analysis/balanceAnalysis/index.vue | 109 ++++++--- 2 files changed, 286 insertions(+), 32 deletions(-) create mode 100644 src/views/core/analysis/balanceAnalysis/chart.vue diff --git a/src/views/core/analysis/balanceAnalysis/chart.vue b/src/views/core/analysis/balanceAnalysis/chart.vue new file mode 100644 index 00000000..8de0dc23 --- /dev/null +++ b/src/views/core/analysis/balanceAnalysis/chart.vue @@ -0,0 +1,209 @@ + + + + + + + diff --git a/src/views/core/analysis/balanceAnalysis/index.vue b/src/views/core/analysis/balanceAnalysis/index.vue index 1898ec7b..a4877d42 100644 --- a/src/views/core/analysis/balanceAnalysis/index.vue +++ b/src/views/core/analysis/balanceAnalysis/index.vue @@ -1,46 +1,56 @@ + From 9ed4c944c59ef56a16ea47227484aa47a75491ec Mon Sep 17 00:00:00 2001 From: lb Date: Wed, 29 Nov 2023 13:36:53 +0800 Subject: [PATCH 4/4] fix bugs --- .../core/analysis/balanceAnalysis/chart.vue | 61 ++++++++++++------- .../equipment/timing-diagram/status/index.vue | 2 + .../monitoring/equipmentFullParams/index.vue | 4 +- 3 files changed, 44 insertions(+), 23 deletions(-) diff --git a/src/views/core/analysis/balanceAnalysis/chart.vue b/src/views/core/analysis/balanceAnalysis/chart.vue index 8de0dc23..3df9d162 100644 --- a/src/views/core/analysis/balanceAnalysis/chart.vue +++ b/src/views/core/analysis/balanceAnalysis/chart.vue @@ -36,10 +36,10 @@ export default { trigger: 'axis', }, legend: { - icon: 'roundRect', - itemWidth: 12, - itemHeight: 12, - }, + icon: 'roundRect', + itemWidth: 12, + itemHeight: 12, + }, grid: { top: '12%', left: '6%', @@ -63,8 +63,7 @@ export default { ], }, yAxis: { - // todo - name: '产线TT', + name: ['设备CT', '设备TT', '产线CT', '产线TT'][this.activeIndex], nameLocation: 'end', nameGap: 28, nameTextStyle: { @@ -132,51 +131,71 @@ export default { const eqCt = this.tableData.map((row) => ({ name: row.equName, type: 'line', - symbol: 'circle', - symbolSize: 8, + symbol: 'circle', + symbolSize: 8, data: this.getListFromTableRow(row, '_eq_ct'), })); - this.chart.setOption({ ...this.templateOption, series: eqCt }); + this.chart.setOption({ + ...this.templateOption, + yAxis: { ...this.templateOption.yAxis, name: '设备CT' }, + series: eqCt, + }); break; case 1: const eqTt = this.tableData.map((row) => ({ name: row.equName, type: 'line', - symbol: 'circle', - symbolSize: 8, + symbol: 'circle', + symbolSize: 8, data: this.getListFromTableRow(row, '_eq_tt'), })); - this.chart.setOption({ ...this.templateOption, series: eqTt }); + this.chart.setOption({ + ...this.templateOption, + yAxis: { ...this.templateOption.yAxis, name: '设备TT' }, + series: eqTt, + }); break; case 2: const plCt = this.tableData.map((row) => ({ name: row.equName, type: 'line', - symbol: 'circle', - symbolSize: 8, + symbol: 'circle', + symbolSize: 8, data: this.getListFromTableRow(row, '_pl_ct'), })); - this.chart.setOption({ ...this.templateOption, series: plCt }); + this.chart.setOption({ + ...this.templateOption, + yAxis: { ...this.templateOption.yAxis, name: '产线CT' }, + series: plCt, + }); break; case 3: const plTt = this.tableData.map((row) => ({ name: row.equName, type: 'line', - symbol: 'circle', - symbolSize: 8, + symbol: 'circle', + symbolSize: 8, data: this.getListFromTableRow(row, '_pl_tt'), })); - this.chart.setOption({ ...this.templateOption, series: plTt }); + this.chart.setOption({ + ...this.templateOption, + yAxis: { ...this.templateOption.yAxis, name: '产线TT' }, + series: plTt, + }); break; default: const eqCt2 = this.tableData.map((row) => ({ name: row.equName, type: 'line', - symbol: 'circle', - symbolSize: 8, + symbol: 'circle', + symbolSize: 8, data: this.getListFromTableRow(row, '_eq_ct'), })); - this.chart.setOption({ ...this.templateOption, series: eqCt2 }); + this.chart.setOption({ + ...this.templateOption, + yAxis: { ...this.templateOption.yAxis, name: '设备CT' }, + series: eqCt2, + }); } }, }, diff --git a/src/views/equipment/timing-diagram/status/index.vue b/src/views/equipment/timing-diagram/status/index.vue index 6ea4f148..2c639b08 100644 --- a/src/views/equipment/timing-diagram/status/index.vue +++ b/src/views/equipment/timing-diagram/status/index.vue @@ -80,6 +80,8 @@