From c0daa74a84fba7f2c0f2d824dea9049e9caf8b46 Mon Sep 17 00:00:00 2001 From: lb Date: Tue, 28 Nov 2023 19:31:08 +0800 Subject: [PATCH 1/6] =?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 11:34:43 +0800 Subject: [PATCH 2/6] =?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 3/6] 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 @@ Date: Wed, 29 Nov 2023 15:06:27 +0800 Subject: [PATCH 4/6] =?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/views/quality/monitoring/currentData/index.vue | 4 ++-- .../monitoring/qualityInspectionRecord/dialogForm.vue | 4 ++-- .../quality/monitoring/qualityInspectionRecord/index.vue | 6 +++--- src/views/quality/monitoring/statisticalData/index.vue | 8 ++++---- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/views/quality/monitoring/currentData/index.vue b/src/views/quality/monitoring/currentData/index.vue index b4bab9ab..0125ab85 100644 --- a/src/views/quality/monitoring/currentData/index.vue +++ b/src/views/quality/monitoring/currentData/index.vue @@ -11,7 +11,7 @@
-
工单:{{ list[index].workOrderName }}
+
工单名称:{{ list[index].workOrderName }}
@@ -214,7 +214,7 @@ export default { { // width: 160, prop: 'workOrderName', - label: '工单名', + label: '工单名称', }, ...this.dynamicProps, { diff --git a/src/views/quality/monitoring/qualityInspectionRecord/dialogForm.vue b/src/views/quality/monitoring/qualityInspectionRecord/dialogForm.vue index 4e7a2b67..9199e2fc 100644 --- a/src/views/quality/monitoring/qualityInspectionRecord/dialogForm.vue +++ b/src/views/quality/monitoring/qualityInspectionRecord/dialogForm.vue @@ -9,8 +9,8 @@ - - + + diff --git a/src/views/quality/monitoring/qualityInspectionRecord/index.vue b/src/views/quality/monitoring/qualityInspectionRecord/index.vue index e0374fc6..baac3742 100644 --- a/src/views/quality/monitoring/qualityInspectionRecord/index.vue +++ b/src/views/quality/monitoring/qualityInspectionRecord/index.vue @@ -141,8 +141,8 @@ export default { searchBarFormConfig: [ { type: 'select', - label: '工单号', - placeholder: '请选择工单号', + label: '工单名称', + placeholder: '请选择工单名称', param: 'workOrderId', selectOptions: [], filterable:true @@ -215,7 +215,7 @@ export default { { // width: 128, prop: 'workOrderName', - label: '工单Id', + label: '工单名称', }, { // width: 128, diff --git a/src/views/quality/monitoring/statisticalData/index.vue b/src/views/quality/monitoring/statisticalData/index.vue index c84cedc7..e4db32b7 100644 --- a/src/views/quality/monitoring/statisticalData/index.vue +++ b/src/views/quality/monitoring/statisticalData/index.vue @@ -67,8 +67,8 @@ export default { searchBarFormConfig: [ { type: 'select', - label: '工单号', - placeholder: '请选择工单号', + label: '工单名称', + placeholder: '请选择工单名称', param: 'workOrderIdList', selectOptions: [], multiple: true, @@ -205,8 +205,8 @@ export default { return [ { // width: 128, - prop: 'workOrderId', - label: '工单号', + prop: 'workOrderName', + label: '工单名称', }, { // width: 128, From fa5a303c08c593a6c20ef9e55919963bbd0bf466 Mon Sep 17 00:00:00 2001 From: helloDy <1615073571@qq.com> Date: Wed, 29 Nov 2023 16:53:51 +0800 Subject: [PATCH 5/6] bug ui --- src/components/DialogForm/index.vue | 5 +- src/components/Editor/index.vue | 12 +- .../AlarmGroup/components/BasicDrawer.vue | 10 +- .../BindGroup/components/BasicDrawer.vue | 6 +- .../equipment/base/config/BindGroup/index.vue | 2 +- .../config/DataCollection/TableConfig.vue | 33 +- .../DataCollection/components/BasicDrawer.vue | 8 +- .../base/inspection/Record/addRecord.vue | 4 +- .../base/inspection/Record/index.vue | 3 +- .../equipment/base/maintain/Monitor/index.vue | 31 +- .../equipment/base/maintain/Record/index.vue | 69 ++-- .../base/repair/CustomDialogForm.vue | 357 +++++++++--------- src/views/equipment/base/repair/index.vue | 40 +- 13 files changed, 306 insertions(+), 274 deletions(-) diff --git a/src/components/DialogForm/index.vue b/src/components/DialogForm/index.vue index 0c4fcff1..c780edba 100644 --- a/src/components/DialogForm/index.vue +++ b/src/components/DialogForm/index.vue @@ -142,6 +142,9 @@ function findMaxLabelWidth(rows) { if (!opt.label) return 0; if (opt.label.length > max) { max = opt.label.length; + if (opt.label.includes('(')) { + max = max - 3 + } } }); }); @@ -239,7 +242,7 @@ export default { size: { type: String, default: '', - }, + } }, data() { return { diff --git a/src/components/Editor/index.vue b/src/components/Editor/index.vue index 1b0d68c1..046e334a 100644 --- a/src/components/Editor/index.vue +++ b/src/components/Editor/index.vue @@ -83,7 +83,7 @@ export default { ], }, placeholder: '请输入内容', - readOnly: true, + // readOnly: false, }, }; }, @@ -123,11 +123,13 @@ export default { const editor = this.$refs.editor; this.Quill = new Quill(editor, this.options); // 取消自动聚焦 start + this.Quill?.enable(false); this.$nextTick(() => { + this.Quill?.enable(true); this.Quill?.blur(); - if (!this.readOnly) { - this.Quill?.enable(); - } + // if (!this.readOnly) { + // this.Quill?.enable(); + // } }); // 如果设置了上传地址则自定义图片上传事件 if (this.type === 'url') { @@ -196,7 +198,7 @@ export default { }; -