diff --git a/src/components/Pagination/index.vue b/src/components/Pagination/index.vue index 1f44d55..eebdd58 100644 --- a/src/components/Pagination/index.vue +++ b/src/components/Pagination/index.vue @@ -112,4 +112,8 @@ export default { .pagination-container.hidden { display: none; } + +::v-deep .el-pager { + width: 360px !important; +} diff --git a/src/views/manage/script/index.vue b/src/views/manage/script/index.vue index 8a93c49..ae0fd23 100644 --- a/src/views/manage/script/index.vue +++ b/src/views/manage/script/index.vue @@ -21,81 +21,87 @@ - - - - - - - - - - - - - - - - - - - - + +
+ + + + + + + + + + + + + + + + + + + - - 搜索 - 重置 - - - - - 新增 - - - - - + + 搜索 + 重置 + + +
+
+ + + 新增 + + + +
+
+ + - - - - - - - - - - - - - + 预览 + 话术 + 话术预览 + 修改 + 删除 + + + +
- @@ -310,7 +316,7 @@ export default { },], optionsDisease: [], - + maxTableHeight: undefined, optionsadd: [{ value: 'NORMAL', @@ -441,6 +447,10 @@ export default { this.Departmentlist(); }, + mounted() { + this.getMaxTableHeight() + this.screenChange() + }, watch: { name(val) { this.querydepartmen.departmentName = val @@ -857,7 +867,30 @@ export default { this.download('manage/script/export', { ...this.queryParams }, `script_${new Date().getTime()}.xlsx`) - } + }, + // 获取表格最高高度 + getMaxTableHeight() { + const windowInnerHeight = window.innerHeight // 屏幕可视高度 + const layoutDiv = this.$refs.layout + const formDiv = this.$refs.form + const mb8Div = this.$refs.mb8 + this.maxTableHeight = + windowInnerHeight - 134 - + this.getBoxPadding(layoutDiv) - + this.getBoxHeight(mb8Div) - + this.getBoxHeight(formDiv) + }, + // 屏幕resize监听 + screenChange() { + // 屏幕resize监听事件:一旦屏幕宽高发生变化,就会执行resize + window.addEventListener('resize', this.getMaxTableHeight, true) + // 将屏幕监听事件移除 + // 这步是必须的。离开页面时不移除,再返回,或者进入到别的有相同元素的页面会报错 + // 或者将这里的方法直接写在beforeDestroy函数中也可以 + this.$once('hook:beforeDestroy', () => { + window.removeEventListener('resize', this.getMaxTableHeight, true) + }) + }, } }; @@ -921,4 +954,12 @@ export default { left: 20px; top: -11px; } + +.app-container { + padding: 20px 0 0 20px !important; +} + +::v-deep .el-row { + height: 100% !important; +} diff --git a/src/views/manage/template/index.vue b/src/views/manage/template/index.vue index 9dbb79b..f5d6beb 100644 --- a/src/views/manage/template/index.vue +++ b/src/views/manage/template/index.vue @@ -47,7 +47,6 @@ 新增微信模版
-