From 14afb6d4b1c7d6818b795720daafa514d3e0ce11 Mon Sep 17 00:00:00 2001 From: lb Date: Fri, 22 Mar 2024 10:01:14 +0800 Subject: [PATCH 1/3] =?UTF-8?q?update=20=E8=AE=BE=E5=A4=87=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E6=97=B6=E5=BA=8F=E5=9B=BE=E8=AE=BE=E5=A4=87=E5=90=8D?= =?UTF-8?q?=E9=95=BF=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../equipment/timing-diagram/status/chart.js | 2 +- .../equipment/timing-diagram/status/index.vue | 50 ++++++++++--------- 2 files changed, 28 insertions(+), 24 deletions(-) diff --git a/src/views/equipment/timing-diagram/status/chart.js b/src/views/equipment/timing-diagram/status/chart.js index 70032a00..63596f86 100644 --- a/src/views/equipment/timing-diagram/status/chart.js +++ b/src/views/equipment/timing-diagram/status/chart.js @@ -112,7 +112,7 @@ export default class GanttGraph { // top: 12 + 128 * this.gridIndex, top: 12 + 104 * this.gridIndex, right: 48, - left: 88, + left: 183, height: 56 } } diff --git a/src/views/equipment/timing-diagram/status/index.vue b/src/views/equipment/timing-diagram/status/index.vue index 94cb15ca..2b1f5559 100644 --- a/src/views/equipment/timing-diagram/status/index.vue +++ b/src/views/equipment/timing-diagram/status/index.vue @@ -119,7 +119,7 @@ export default { selectOptions: [], param: 'lineId', onchange: true, - filterable: true + filterable: true, }, { type: 'select', @@ -127,7 +127,7 @@ export default { placeholder: '请选择工段', selectOptions: [], param: 'sectionId', - filterable: true + filterable: true, }, // 时间段 { @@ -171,26 +171,26 @@ export default { eqList: [], startTime: null, gantt: null, - // demo: [ - // [ - // { - // equipmentName: '下片机', - // duration: 30, - // relativeDuration: 0.6, - // status: 0, - // startPos: 0, - // startTime: 1691568181000, - // }, - // { - // equipmentName: '下片机', - // duration: 20, - // relativeDuration: 0.4, - // status: 2, - // startPos: 30, - // startTime: 1691569981000 - // }, - // ], - // ], + demo: [ + [ + { + equipmentName: '一大线四区2小线清洗机', + duration: 30, + relativeDuration: 0.6, + status: 0, + startPos: 0, + startTime: 1711073203686, + }, + { + equipmentName: '一大线四区2小线清洗机', + duration: 20, + relativeDuration: 0.4, + status: 2, + startPos: 30, + startTime: 1711072203686, + }, + ], + ], }; }, computed: {}, @@ -258,7 +258,11 @@ export default { this.existingEquipments = Object.values(data).map( (eq) => eq[0].equipmentId ); - this.graphList = this.objectToArray(data); + // this.graphList = this.objectToArray(data); + this.graphList = this.demo.map(item => { + item.key = item[0].equipmentName; + return item; + }); } }, From dc94bfd51f828a2dd502e209adbdc033536c5321 Mon Sep 17 00:00:00 2001 From: lb Date: Fri, 22 Mar 2024 10:10:57 +0800 Subject: [PATCH 2/3] 1 --- .../equipment/timing-diagram/status/index.vue | 50 +++++++++---------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/src/views/equipment/timing-diagram/status/index.vue b/src/views/equipment/timing-diagram/status/index.vue index 2b1f5559..8ab97201 100644 --- a/src/views/equipment/timing-diagram/status/index.vue +++ b/src/views/equipment/timing-diagram/status/index.vue @@ -171,26 +171,26 @@ export default { eqList: [], startTime: null, gantt: null, - demo: [ - [ - { - equipmentName: '一大线四区2小线清洗机', - duration: 30, - relativeDuration: 0.6, - status: 0, - startPos: 0, - startTime: 1711073203686, - }, - { - equipmentName: '一大线四区2小线清洗机', - duration: 20, - relativeDuration: 0.4, - status: 2, - startPos: 30, - startTime: 1711072203686, - }, - ], - ], + // demo: [ + // [ + // { + // equipmentName: '一大线四区2小线清洗机', + // duration: 30, + // relativeDuration: 0.6, + // status: 0, + // startPos: 0, + // startTime: 1711073203686, + // }, + // { + // equipmentName: '一大线四区2小线清洗机', + // duration: 20, + // relativeDuration: 0.4, + // status: 2, + // startPos: 30, + // startTime: 1711072203686, + // }, + // ], + // ], }; }, computed: {}, @@ -258,11 +258,11 @@ export default { this.existingEquipments = Object.values(data).map( (eq) => eq[0].equipmentId ); - // this.graphList = this.objectToArray(data); - this.graphList = this.demo.map(item => { - item.key = item[0].equipmentName; - return item; - }); + this.graphList = this.objectToArray(data); + // this.graphList = this.demo.map(item => { + // item.key = item[0].equipmentName; + // return item; + // }); } }, From 75970472200ccac40c586f602253fb2eb73ff512 Mon Sep 17 00:00:00 2001 From: zwq Date: Fri, 22 Mar 2024 10:17:03 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=88=90=E6=9C=ACbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/cost/energyCost/index.vue | 17 +++++++++++++---- .../cost/rawMaterialConfig/add-or-updata.vue | 4 ++-- src/views/cost/rawMaterialCost/index.vue | 8 ++++++-- 3 files changed, 21 insertions(+), 8 deletions(-) diff --git a/src/views/cost/energyCost/index.vue b/src/views/cost/energyCost/index.vue index a0e122aa..7d7ec099 100644 --- a/src/views/cost/energyCost/index.vue +++ b/src/views/cost/energyCost/index.vue @@ -30,6 +30,7 @@ import { } from '@/api/cost/costEneryAutoReport'; import { getEnergyTypeListAll } from '@/api/base/energyType'; import { publicFormatter } from '@/utils/dict'; +import moment from 'moment'; const tableProps = [ { @@ -135,15 +136,23 @@ export default { this.listQuery.pageSize = 10; this.listQuery.energyTypeId = val.energyTypeId; this.listQuery.searchTime = val.searchTime ? val.searchTime[0] : null; - this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null; - this.listQuery.endTime = val.searchTime ? val.searchTime[1] : null; + this.listQuery.startTime = val.searchTime + ? moment(val.searchTime[0]).startOf('day').format('x') + : null; + this.listQuery.endTime = val.searchTime + ? moment(val.searchTime[1]).endOf('day').format('x') + : null; this.getDataList(); break; case 'export': const data = { energyTypeId:val.energyTypeId, - startTime : val.searchTime ? val.searchTime[0] : null, - endTime : val.searchTime ? val.searchTime[1] : null, + startTime : val.searchTime + ? moment(val.searchTime[0]).startOf('day').format('x') + : null, + endTime : val.searchTime + ? moment(val.searchTime[1]).endOf('day').format('x') + : null, } this.handleExport(data); break; diff --git a/src/views/cost/rawMaterialConfig/add-or-updata.vue b/src/views/cost/rawMaterialConfig/add-or-updata.vue index 1196e9ae..c2387006 100644 --- a/src/views/cost/rawMaterialConfig/add-or-updata.vue +++ b/src/views/cost/rawMaterialConfig/add-or-updata.vue @@ -2,7 +2,7 @@ * @Author: zwq * @Date: 2023-08-01 13:52:10 * @LastEditors: zwq - * @LastEditTime: 2024-02-19 09:36:50 + * @LastEditTime: 2024-03-21 15:59:26 * @Description: -->