From 692082d81117d134fe1955e0c3f13ec88bb56563 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 18:15:22 +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/common/js/util.js | 3 ++ .../xm/core/xmProduct/XmProductTplMng.vue | 32 +++++++++------ src/views/xm/core/xmProject/XmProjectMng.vue | 21 +++++----- .../xm/core/xmProject/XmProjectTplMng.vue | 39 ++++++++++--------- .../XmProjectTemplateMng.vue | 11 ++++-- 5 files changed, 62 insertions(+), 44 deletions(-) diff --git a/src/common/js/util.js b/src/common/js/util.js index cdff579f..1182b683 100644 --- a/src/common/js/util.js +++ b/src/common/js/util.js @@ -14,6 +14,9 @@ function padding(s, len) { export default { getPositionTop(node) { + if(!node){ + return 150; + } var top = node.offsetTop; var parent = node.offsetParent; while(parent != null) { diff --git a/src/views/xm/core/xmProduct/XmProductTplMng.vue b/src/views/xm/core/xmProduct/XmProductTplMng.vue index 01896e8f..74dae8f6 100644 --- a/src/views/xm/core/xmProduct/XmProductTplMng.vue +++ b/src/views/xm/core/xmProduct/XmProductTplMng.vue @@ -5,21 +5,25 @@ - - - 我的模板 - - -    - + + + 我的模板 + + + + + +    + + - + - + - + @@ -134,8 +138,7 @@ iterationVisible:false, iterationSelectVisible:false, productStateVisible:false, - selectFiltersPmUserVisible:false, - tableHeight:300, + selectFiltersPmUserVisible:false, dateRanger: [ ], pickerOptions: util.pickerOptions('datarange'), @@ -145,6 +148,7 @@ id:'',productName:'',code:'',isTpl:'',copyMenu:'1' }, copyToVisible:false, + maxTableHeight:300, /**begin 自定义属性请在下面加 请加备注**/ /**end 自定义属性请在上面加 请加备注**/ @@ -422,6 +426,10 @@ }, mounted() { this.$nextTick(() => { + + var table=document.querySelector('.project-table .table'); + var top=util.getPositionTop(table) + this.maxTableHeight = window.innerHeight - top -100; this.getXmProducts(); }); } diff --git a/src/views/xm/core/xmProject/XmProjectMng.vue b/src/views/xm/core/xmProject/XmProjectMng.vue index 5707a58c..73f8bb75 100644 --- a/src/views/xm/core/xmProject/XmProjectMng.vue +++ b/src/views/xm/core/xmProject/XmProjectMng.vue @@ -3,7 +3,7 @@ - + @@ -76,9 +76,9 @@ - + - +
{{p.name}}
@@ -115,7 +115,8 @@
- + + - +
- + @@ -331,7 +332,7 @@ finishFlag: false, xmRecordVisible: false, productSelectVisible:false, - tableHeight:300, + maxTableHeight:300, dateRanger: [ ], pickerOptions: util.pickerOptions('datarange'), xmProjectCopy:{ @@ -742,10 +743,10 @@ this.filters.productId=this.$route.params.productId; this.filters.productName=this.$route.params.productName; } - this.$nextTick(() => { - var table=document.querySelector('.el-table'); + this.$nextTick(() => { + var table=document.querySelector('.project-table .table'); var top=util.getPositionTop(table) - this.maxTableHeight = window.innerHeight - top -60; + this.maxTableHeight = window.innerHeight - top -100; this.showInfo = false; this.getXmProjects(); }); diff --git a/src/views/xm/core/xmProject/XmProjectTplMng.vue b/src/views/xm/core/xmProject/XmProjectTplMng.vue index f64f9a6c..106fa331 100644 --- a/src/views/xm/core/xmProject/XmProjectTplMng.vue +++ b/src/views/xm/core/xmProject/XmProjectTplMng.vue @@ -1,23 +1,25 @@