From 48f019c8e89ef40c744950a13aabfdd09eec5b75 Mon Sep 17 00:00:00 2001 From: jiangyy Date: Fri, 25 Mar 2022 09:54:42 +0800 Subject: [PATCH] =?UTF-8?q?table=E9=AB=98=E5=BA=A6=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/js/store/modules/app.js | 6 ++++-- src/views/modules/base/community/buildTable.vue | 4 ++-- src/views/modules/base/community/communityTable.vue | 10 +++++----- src/views/modules/base/community/roomTable.vue | 6 +++--- .../communityService/ninePlaces/inspect/inspect.vue | 8 +++----- .../communityService/ninePlaces/places/places.vue | 8 +++----- .../modules/communityService/ninePlaces/team/team.vue | 8 +++----- 7 files changed, 23 insertions(+), 27 deletions(-) diff --git a/src/js/store/modules/app.js b/src/js/store/modules/app.js index b9a493a9..4384a1c1 100644 --- a/src/js/store/modules/app.js +++ b/src/js/store/modules/app.js @@ -5,13 +5,15 @@ export default { clientHeight: document.documentElement.clientHeight, size: 'medium', resolution: 'medium', - env: 'dev' + env: 'dev', + iframeHeight:120 }, getters: { clientHeight: (state) => state.clientHeight, size: (state) => state.size, resolution: (state) => state.resolution, - env: (state) => state.env + env: (state) => state.env, + iframeHeight: (state) => state.iframeHeight }, mutations: { [type.client_height](state, payload) { diff --git a/src/views/modules/base/community/buildTable.vue b/src/views/modules/base/community/buildTable.vue index f8e3dab5..342ef30f 100644 --- a/src/views/modules/base/community/buildTable.vue +++ b/src/views/modules/base/community/buildTable.vue @@ -235,11 +235,11 @@ export default { computed: { tableHeight () { - return (this.clientHeight - 300) + return this.$store.state.inIframe ? this.clientHeight - 300 + this.iframeHeight : this.clientHeight - 300 }, - ...mapGetters(['clientHeight']) + ...mapGetters(['clientHeight', 'iframeHeight']) }, methods: { //重置搜索条件 diff --git a/src/views/modules/base/community/communityTable.vue b/src/views/modules/base/community/communityTable.vue index cbe00837..27660e25 100644 --- a/src/views/modules/base/community/communityTable.vue +++ b/src/views/modules/base/community/communityTable.vue @@ -285,13 +285,13 @@ export default { }, computed: { tableHeight () { - return (this.clientHeight - 300) + + return this.$store.state.inIframe ? this.clientHeight - 300 + this.iframeHeight : this.clientHeight - 300 + }, - rowHeight () { - return (this.clientHeight - 200) + 'px' - }, - ...mapGetters(['clientHeight']) + + ...mapGetters(['clientHeight', 'iframeHeight']) }, methods: { //重置搜索条件 diff --git a/src/views/modules/base/community/roomTable.vue b/src/views/modules/base/community/roomTable.vue index 09909c8a..92710ca2 100644 --- a/src/views/modules/base/community/roomTable.vue +++ b/src/views/modules/base/community/roomTable.vue @@ -131,7 +131,7 @@ @click="handleDetail(scope.row)">查看 修改 @@ -230,11 +230,11 @@ export default { computed: { tableHeight () { - return (this.clientHeight - 300) + return this.$store.state.inIframe ? this.clientHeight - 300 + this.iframeHeight : this.clientHeight - 300 }, - ...mapGetters(['clientHeight']) + ...mapGetters(['clientHeight', 'iframeHeight']) }, methods: { //重置搜索条件 diff --git a/src/views/modules/communityService/ninePlaces/inspect/inspect.vue b/src/views/modules/communityService/ninePlaces/inspect/inspect.vue index 0a75b184..d2de837a 100644 --- a/src/views/modules/communityService/ninePlaces/inspect/inspect.vue +++ b/src/views/modules/communityService/ninePlaces/inspect/inspect.vue @@ -529,13 +529,11 @@ export default { computed: { tableHeight () { - return (this.clientHeight - 420) + return this.$store.state.inIframe ? this.clientHeight - 420 + this.iframeHeight : this.clientHeight - 420 }, - rowHeight () { - return (this.clientHeight - 200) + 'px' - }, - ...mapGetters(['clientHeight']) + + ...mapGetters(['clientHeight', 'iframeHeight']) }, watch: { diff --git a/src/views/modules/communityService/ninePlaces/places/places.vue b/src/views/modules/communityService/ninePlaces/places/places.vue index 888ae9a9..0e356e9a 100644 --- a/src/views/modules/communityService/ninePlaces/places/places.vue +++ b/src/views/modules/communityService/ninePlaces/places/places.vue @@ -464,13 +464,11 @@ export default { computed: { tableHeight () { - return (this.clientHeight - 420) + return this.$store.state.inIframe ? this.clientHeight - 300 + this.iframeHeight : this.clientHeight - 300 }, - rowHeight () { - return (this.clientHeight - 200) + 'px' - }, - ...mapGetters(['clientHeight']) + + ...mapGetters(['clientHeight', 'iframeHeight']) }, watch: { diff --git a/src/views/modules/communityService/ninePlaces/team/team.vue b/src/views/modules/communityService/ninePlaces/team/team.vue index 4a29979c..1b05e70d 100644 --- a/src/views/modules/communityService/ninePlaces/team/team.vue +++ b/src/views/modules/communityService/ninePlaces/team/team.vue @@ -441,13 +441,11 @@ export default { computed: { tableHeight () { - return (this.clientHeight - 370) + return this.$store.state.inIframe ? this.clientHeight - 370 + this.iframeHeight : this.clientHeight - 370 }, - rowHeight () { - return (this.clientHeight - 200) + 'px' - }, - ...mapGetters(['clientHeight']) + + ...mapGetters(['clientHeight', 'iframeHeight']) }, watch: {