From 60f6c3a8fe571070b0bcd961795618f7e90904c3 Mon Sep 17 00:00:00 2001 From: zwq Date: Tue, 9 Apr 2024 11:05:37 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=88=90=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/cost/energyCost/index.vue | 7 ++----- src/views/cost/energyCostHis/index.vue | 7 ++----- src/views/cost/rawMaterialConfig/index.vue | 15 ++++++++------- src/views/cost/rawMaterialCost/index.vue | 7 ++----- src/views/cost/rawMaterialCostHis/index.vue | 7 ++----- 5 files changed, 16 insertions(+), 27 deletions(-) diff --git a/src/views/cost/energyCost/index.vue b/src/views/cost/energyCost/index.vue index 75a4ac39..1b685d13 100644 --- a/src/views/cost/energyCost/index.vue +++ b/src/views/cost/energyCost/index.vue @@ -32,6 +32,7 @@ import { import { getEnergyTypeListAll } from '@/api/base/energyType'; import { publicFormatter } from '@/utils/dict'; import moment from 'moment'; +import tableHeightMixin from '@/mixins/lb/tableHeightMixin'; const tableProps = [ { @@ -61,7 +62,7 @@ const tableProps = [ ]; export default { - mixins: [basicPage], + mixins: [basicPage,tableHeightMixin], data() { return { urlOptions: { @@ -70,7 +71,6 @@ export default { }, tableData: [], tableProps, - tableH: this.tableHeight(260), drawerVisible: false, formConfig: [ { @@ -113,9 +113,6 @@ export default { }, components: {}, created() { - window.addEventListener('resize', () => { - this.tableH = this.tableHeight(260) - }) getEnergyTypeListAll().then((response) => { this.formConfig[0].selectOptions = response.data; }); diff --git a/src/views/cost/energyCostHis/index.vue b/src/views/cost/energyCostHis/index.vue index a09303c1..82947416 100644 --- a/src/views/cost/energyCostHis/index.vue +++ b/src/views/cost/energyCostHis/index.vue @@ -32,6 +32,7 @@ import { import { getEnergyTypeListAll } from '@/api/base/energyType'; import { publicFormatter } from '@/utils/dict'; import moment from 'moment'; +import tableHeightMixin from '@/mixins/lb/tableHeightMixin'; const tableProps = [ { @@ -71,7 +72,7 @@ const tableProps = [ ]; export default { - mixins: [basicPage], + mixins: [basicPage,tableHeightMixin], data() { return { urlOptions: { @@ -80,7 +81,6 @@ export default { }, tableData: [], tableProps, - tableH: this.tableHeight(260), drawerVisible: false, formConfig: [ { @@ -137,9 +137,6 @@ export default { }, components: {}, created() { - window.addEventListener('resize', () => { - this.tableH = this.tableHeight(260) - }) const end = new Date(); const start = new Date(); start.setTime(start.getTime() - 3600 * 1000 * 24 * 30); diff --git a/src/views/cost/rawMaterialConfig/index.vue b/src/views/cost/rawMaterialConfig/index.vue index b7a6fa7e..ca800c14 100644 --- a/src/views/cost/rawMaterialConfig/index.vue +++ b/src/views/cost/rawMaterialConfig/index.vue @@ -12,7 +12,7 @@ :table-props="tableProps" :page="listQuery.pageNo" :limit="listQuery.pageSize" - :max-height="tableH" + :max-height="tableH" :table-data="tableData"> { - this.tableH = this.tableHeight(260) - }) getHotMaterialList().then((response) => { this.formConfig[0].selectOptions = response.data; }); diff --git a/src/views/cost/rawMaterialCost/index.vue b/src/views/cost/rawMaterialCost/index.vue index 3e75cd49..0acb7d76 100644 --- a/src/views/cost/rawMaterialCost/index.vue +++ b/src/views/cost/rawMaterialCost/index.vue @@ -32,6 +32,7 @@ import { import { getHotMaterialList } from '@/api/base/coreHotMaterial'; import { publicFormatter } from '@/utils/dict'; import moment from 'moment'; +import tableHeightMixin from '@/mixins/lb/tableHeightMixin'; const tableProps = [ { @@ -66,7 +67,7 @@ const tableProps = [ ]; export default { - mixins: [basicPage], + mixins: [basicPage,tableHeightMixin], data() { return { urlOptions: { @@ -75,7 +76,6 @@ export default { }, tableData: [], tableProps, - tableH: this.tableHeight(260), drawerVisible: false, formConfig: [ { @@ -118,9 +118,6 @@ export default { }, components: {}, created() { - window.addEventListener('resize', () => { - this.tableH = this.tableHeight(260) - }) getHotMaterialList().then((response) => { this.formConfig[0].selectOptions = response.data; }); diff --git a/src/views/cost/rawMaterialCostHis/index.vue b/src/views/cost/rawMaterialCostHis/index.vue index a0cd6f5d..bf005423 100644 --- a/src/views/cost/rawMaterialCostHis/index.vue +++ b/src/views/cost/rawMaterialCostHis/index.vue @@ -32,6 +32,7 @@ import { import { getHotMaterialList } from '@/api/base/coreHotMaterial'; import { publicFormatter } from '@/utils/dict'; import moment from 'moment'; +import tableHeightMixin from '@/mixins/lb/tableHeightMixin'; const tableProps = [ { @@ -70,7 +71,7 @@ const tableProps = [ ]; export default { - mixins: [basicPage], + mixins: [basicPage,tableHeightMixin], data() { return { urlOptions: { @@ -79,7 +80,6 @@ export default { }, tableData: [], tableProps, - tableH: this.tableHeight(260), drawerVisible: false, formConfig: [ { @@ -136,9 +136,6 @@ export default { }, components: {}, created() { - window.addEventListener('resize', () => { - this.tableH = this.tableHeight(260) - }) const end = new Date(); const start = new Date(); start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);