From c363127e9ac83ad9a0f5cc6be40dfb756bf084e9 Mon Sep 17 00:00:00 2001 From: dong <58670809@qq.com> Date: Thu, 3 Nov 2022 16:23:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../newMap/display/terminals/dispatchCmd.vue | 90 +++++++++++++++---- 1 file changed, 75 insertions(+), 15 deletions(-) diff --git a/src/views/newMap/display/terminals/dispatchCmd.vue b/src/views/newMap/display/terminals/dispatchCmd.vue index f59940cf6..252566852 100644 --- a/src/views/newMap/display/terminals/dispatchCmd.vue +++ b/src/views/newMap/display/terminals/dispatchCmd.vue @@ -25,13 +25,13 @@
缓存命令
-
+
- + @@ -57,13 +57,13 @@
接受命令
-
+
- + @@ -89,13 +89,13 @@
发送命令
-
+
- + @@ -121,13 +121,13 @@
签收完成
-
+
- + @@ -157,7 +157,7 @@
查询条件
-
+
@@ -216,7 +216,7 @@ 清除
- + @@ -380,7 +380,7 @@
- + @@ -425,6 +425,9 @@ export default { name:'DispatcherCmd', data() { return { + operateTableHeight: 100, + searchTableHeight: 260, + tableHeight: 200, activeTab: 'operate', cmdTab: 'cmd', textTab: 'text', @@ -623,6 +626,11 @@ export default { this.$set(this.queryResData.companyStateMap, item.cpId, item); } }); + }, + '$store.state.app.height': function (val) { + this.getOperateTableHeight(); + this.getSearchTableHeight(); + this.getTableHeight(); } }, beforeDestroy() {}, @@ -631,7 +639,59 @@ export default { this.searchCmd(); this.getSenderName(); }, + created() { + this.getOperateTableHeight(); + this.getSearchTableHeight(); + this.getTableHeight(); + }, methods:{ + activeChange(key) { + this[key] = !this[key]; + this.getOperateTableHeight(); + if (key == 'active5') { + this.getSearchTableHeight(); + } + }, + getOperateTableHeight() { + const allH = this.$store.state.app.height; + const heardH = 100; + const titleH = 28 * 4; + let r = allH - heardH - titleH; + r = r > 0 ? r : 0; + const arr = ['active1', 'active2', 'active3', 'active4']; + let num = 0; + arr.forEach(key => { + if (this[key]) { + num += 1; + } + }); + if (num > 0) { + this.operateTableHeight = r / num; + } + }, + getSearchTableHeight() { + const allH = this.$store.state.app.height; + const heardH = 42; + const titleH = 28; + const sH = 436; + let h = allH - heardH - titleH; + if (this.active5) { + h -= sH; + } + h = h > 0 ? h : 0; + this.searchTableHeight = h; + }, + getTableHeight() { + const allH = this.$store.state.app.height; + const heardH = 29; + const sH = 250; + const textH = 181; + const tableTitleH = 22; + const btnH = 40; + let h = allH - heardH - sH - textH - tableTitleH - btnH; + h = h > 0 ? h : 0; + this.tableHeight = h; + }, cellClass(row) { if (row.columnIndex === 0 && this.disabledSent) { return 'DisableSelection'; @@ -1136,10 +1196,10 @@ export default { } } .search-box { - height: 720px; - display: flex; - flex-direction: column; - justify-content: center; + // min-height: 720px; + // display: flex; + // flex-direction: column; + // justify-content: center; .search-condition { padding: 5px; .condition-top {