From 7e32d4df38d479ba39f0138ed2e4b30a7f53731f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E8=A3=95=E8=B4=A2?= Date: Tue, 1 Mar 2022 20:46:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/xm/core/xmIteration/XmIterationMng.vue | 2 +- src/views/xm/core/xmIteration/XmIterationSelect.vue | 2 +- .../xmIterationProductLink/XmIterationProductLinkMng.vue | 6 ++---- src/views/xm/core/xmProduct/XmProductMng.vue | 2 +- .../core/xmProductProjectLink/XmProductProjectLinkMng.vue | 6 ++---- .../xm/core/xmProjectGroupState/XmProjectGroupStateMng.vue | 2 +- src/views/xm/core/xmProjectPhase/XmProjectPhaseSelect.vue | 4 ++-- src/views/xm/core/xmQuestion/XmQuestionMng.vue | 2 +- src/views/xm/core/xmTaskExecuser/XmTaskExecuserMng.vue | 5 +---- 9 files changed, 12 insertions(+), 19 deletions(-) diff --git a/src/views/xm/core/xmIteration/XmIterationMng.vue b/src/views/xm/core/xmIteration/XmIterationMng.vue index 6a40af4d..8080eb55 100644 --- a/src/views/xm/core/xmIteration/XmIterationMng.vue +++ b/src/views/xm/core/xmIteration/XmIterationMng.vue @@ -526,7 +526,7 @@ import XmIterationSelect from './XmIterationSelect.vue'; mounted() { this.$nextTick(() => { - var subHeight=70/1000 * window.innerHeight; + this.tableHeight = util.calcTableMaxHeight('el-table'); this.getXmIterations(); }); diff --git a/src/views/xm/core/xmIteration/XmIterationSelect.vue b/src/views/xm/core/xmIteration/XmIterationSelect.vue index 5c921c3d..1c757ab1 100644 --- a/src/views/xm/core/xmIteration/XmIterationSelect.vue +++ b/src/views/xm/core/xmIteration/XmIterationSelect.vue @@ -352,7 +352,7 @@ mounted() { this.$nextTick(() => { - var subHeight=70/1000 * window.innerHeight; + this.tableHeight = util.calcTableMaxHeight('el-table'); this.getXmIterations(); }); diff --git a/src/views/xm/core/xmIterationProductLink/XmIterationProductLinkMng.vue b/src/views/xm/core/xmIterationProductLink/XmIterationProductLinkMng.vue index b945d018..62105115 100644 --- a/src/views/xm/core/xmIterationProductLink/XmIterationProductLinkMng.vue +++ b/src/views/xm/core/xmIterationProductLink/XmIterationProductLinkMng.vue @@ -274,10 +274,8 @@ import XmIterationSelect from '../xmIteration/XmIterationSelect.vue'; }, mounted() { this.$nextTick(() => { - this.getXmIterationProductLinks(); - var clientRect=this.$refs.xmIterationProductLink.$el.getBoundingClientRect(); - var subHeight=65/1000 * window.innerHeight; - this.maxTableHeight = window.innerHeight -clientRect.y - this.$refs.xmIterationProductLink.$el.offsetTop-subHeight; + this.getXmIterationProductLinks(); + this.maxTableHeight = util.calcTableMaxHeight(".el-table") }); /** 举例, listOption([{categoryId:'all',itemCode:'sex'},{categoryId:'all',itemCode:'grade'}] ).then(res=>{ diff --git a/src/views/xm/core/xmProduct/XmProductMng.vue b/src/views/xm/core/xmProduct/XmProductMng.vue index 245ed8c0..37b44bf8 100644 --- a/src/views/xm/core/xmProduct/XmProductMng.vue +++ b/src/views/xm/core/xmProduct/XmProductMng.vue @@ -652,7 +652,7 @@ import XmProductSelect from './XmProductSelect.vue'; }); this.$nextTick(() => { - var subHeight=70/1000 * window.innerHeight; + this.tableHeight = util.calcTableMaxHeight('el-table'); this.getXmProducts(); }); diff --git a/src/views/xm/core/xmProductProjectLink/XmProductProjectLinkMng.vue b/src/views/xm/core/xmProductProjectLink/XmProductProjectLinkMng.vue index 2e50c409..5fc7c3f3 100644 --- a/src/views/xm/core/xmProductProjectLink/XmProductProjectLinkMng.vue +++ b/src/views/xm/core/xmProductProjectLink/XmProductProjectLinkMng.vue @@ -275,10 +275,8 @@ import XmProjectSelect from '../xmProject/XmProjectSelect.vue'; }, mounted() { this.$nextTick(() => { - this.getXmProductProjectLinks(); - var clientRect=this.$refs.xmProductProjectLink.$el.getBoundingClientRect(); - var subHeight=65/1000 * window.innerHeight; - this.maxTableHeight = window.innerHeight -clientRect.y - this.$refs.xmProductProjectLink.$el.offsetTop-subHeight; + this.getXmProductProjectLinks(); + this.maxTableHeight = util.calcTableMaxHeight(".el-table") }); /** 举例, listOption([{categoryId:'all',itemCode:'sex'},{categoryId:'all',itemCode:'grade'}] ).then(res=>{ diff --git a/src/views/xm/core/xmProjectGroupState/XmProjectGroupStateMng.vue b/src/views/xm/core/xmProjectGroupState/XmProjectGroupStateMng.vue index 6d531a72..e4df234a 100644 --- a/src/views/xm/core/xmProjectGroupState/XmProjectGroupStateMng.vue +++ b/src/views/xm/core/xmProjectGroupState/XmProjectGroupStateMng.vue @@ -269,7 +269,7 @@ XmProjectGroupStateOverview this.$nextTick(() => { - var subHeight=70/1000 * window.innerHeight; + this.tableHeight = util.calcTableMaxHeight('el-table'); this.getXmProjectGroupStates(); }); diff --git a/src/views/xm/core/xmProjectPhase/XmProjectPhaseSelect.vue b/src/views/xm/core/xmProjectPhase/XmProjectPhaseSelect.vue index 2475aea8..6a441ca3 100644 --- a/src/views/xm/core/xmProjectPhase/XmProjectPhaseSelect.vue +++ b/src/views/xm/core/xmProjectPhase/XmProjectPhaseSelect.vue @@ -459,9 +459,9 @@ mounted() { this.$nextTick(() => { - var clientRect=this.$refs.selectPhaseTable.$el.getBoundingClientRect(); - this.tableHeight = window.innerHeight -clientRect.y - this.$refs.selectPhaseTable.$el.offsetTop-subHeight; + + this.tableHeight = util.calcTableMaxHeight(".el-table"); if(this.selProject){ this.getXmProjectPhases(); } diff --git a/src/views/xm/core/xmQuestion/XmQuestionMng.vue b/src/views/xm/core/xmQuestion/XmQuestionMng.vue index 34eadd81..403ea3b7 100644 --- a/src/views/xm/core/xmQuestion/XmQuestionMng.vue +++ b/src/views/xm/core/xmQuestion/XmQuestionMng.vue @@ -942,7 +942,7 @@ this.$nextTick(() => { - var subHeight=70/1000 * window.innerHeight; + this.tableHeight = util.calcTableMaxHeight('el-table'); this.getXmQuestions(); }); diff --git a/src/views/xm/core/xmTaskExecuser/XmTaskExecuserMng.vue b/src/views/xm/core/xmTaskExecuser/XmTaskExecuserMng.vue index ecc08ac1..14cda57c 100644 --- a/src/views/xm/core/xmTaskExecuser/XmTaskExecuserMng.vue +++ b/src/views/xm/core/xmTaskExecuser/XmTaskExecuserMng.vue @@ -818,10 +818,7 @@ mounted() { this.$nextTick(() => { - var subHeight=70/1000 * window.innerHeight; - if(this.selProject){ - subHeight=100/1000 * window.innerHeight; - } + this.tableHeight = util.calcTableMaxHeight('el-table'); this.getXmTaskExecusers(); });