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);