From b8577d19db3490aa220d6acdad27118f72b3775f Mon Sep 17 00:00:00 2001 From: mch <1332099529@qq.com> Date: Mon, 9 Oct 2023 18:35:37 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=88=B7=E7=AE=A1=E7=90=86=EF=BC=8C?= =?UTF-8?q?=E7=A7=91=E5=AE=A4=EF=BC=8C=E5=93=8D=E5=BA=94=E5=B8=83=E5=B1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/doctorCheck/CheckItemList.vue | 45 ++++++++---- src/views/user-list/AuditLog.vue | 20 ++++- src/views/user-list/UserList.vue | 77 +++++++++++++++----- 3 files changed, 108 insertions(+), 34 deletions(-) diff --git a/src/components/doctorCheck/CheckItemList.vue b/src/components/doctorCheck/CheckItemList.vue index 3d2ef6e..cc8519f 100644 --- a/src/components/doctorCheck/CheckItemList.vue +++ b/src/components/doctorCheck/CheckItemList.vue @@ -1,21 +1,42 @@ @@ -35,10 +56,10 @@ export default { }; }, - created() { }, + created() {}, //挂载完成 - mounted() { }, + mounted() {}, computed: { ...mapState(["window", "dict", "doctorCheck"]), @@ -120,6 +141,4 @@ export default { .el-table th.el-table__cell.is-leaf { padding: 0; } - - diff --git a/src/views/user-list/AuditLog.vue b/src/views/user-list/AuditLog.vue index ebf432a..bd0c2a0 100644 --- a/src/views/user-list/AuditLog.vue +++ b/src/views/user-list/AuditLog.vue @@ -5,7 +5,7 @@ @@ -103,6 +103,8 @@ import { dailyrecord, querylog } from "@/request/ruquset"; export default { data() { return { + tableHeight: window.innerHeight - 220, //表格动态高度 + screenHeight: window.innerHeight, //内容区域高度 tableData: [], pages: { skipCount: 0, @@ -116,6 +118,22 @@ export default { created() { this.cratlist(); }, + watch: { + // 监听screenHeight从而改变table的高度 + screenHeight(val) { + this.screenHeight = val; + this.tableHeight = this.screenHeight - 220; + }, + }, + mounted() { + window.onresize = () => { + return (() => { + // window.innerHeight:浏览器的可用高度 + window.screenHeight = window.innerHeight; + this.screenHeight = window.screenHeight; + })(); + }; + }, methods: { cratlist() { dailyrecord(this.pages).then((res) => { diff --git a/src/views/user-list/UserList.vue b/src/views/user-list/UserList.vue index f9ba1f4..ddb29a2 100644 --- a/src/views/user-list/UserList.vue +++ b/src/views/user-list/UserList.vue @@ -2,9 +2,9 @@
用户管理
- 新增 + > --> @@ -39,7 +39,7 @@
-
+
+ - +