From 66fd551d6874875ded4f75d7f88c51f3050e0a3f Mon Sep 17 00:00:00 2001 From: CGD <3030332422@qq.com> Date: Mon, 14 Apr 2025 14:20:33 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90=E2=80=9C=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E2=80=9D=E7=9A=84=E8=AE=BE=E7=BD=AE=E6=AF=8F?= =?UTF-8?q?=E9=A1=B5=E5=A4=A7=E5=B0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/ParamsManagement.vue | 53 +++++++++++++++++-- 1 file changed, 50 insertions(+), 3 deletions(-) diff --git a/main/manager-web/src/views/ParamsManagement.vue b/main/manager-web/src/views/ParamsManagement.vue index e9baa1e8..883cb809 100644 --- a/main/manager-web/src/views/ParamsManagement.vue +++ b/main/manager-web/src/views/ParamsManagement.vue @@ -16,7 +16,7 @@
+ :header-cell-class-name="headerCellClassName" :max-height="tableMaxHeight"> 删除
+ + + + @@ -82,10 +90,12 @@ export default { paramsList: [], currentPage: 1, pageSize: 5, + pageSizeOptions: [5, 10, 20, 50, 100], total: 0, dialogVisible: false, dialogTitle: "新增参数", isAllSelected: false, + tableMaxHeight: 400, paramForm: { id: null, paramCode: "", @@ -96,7 +106,9 @@ export default { }, created() { this.fetchParams(); + }, + computed: { pageCount() { return Math.ceil(this.total / this.pageSize); @@ -118,6 +130,11 @@ export default { }, }, methods: { + handlePageSizeChange(val) { + this.pageSize = val; + this.currentPage = 1; + this.fetchParams(); + }, fetchParams() { Api.admin.getParamsList( { @@ -192,7 +209,6 @@ export default { return; } - const paramCount = params.length; this.$confirm(`确定要删除选中的${paramCount}个参数吗?`, '警告', { confirmButtonText: '确定', @@ -212,7 +228,7 @@ export default { message: `成功删除${paramCount}个参数`, showClose: true }); - this.fetchParams(); // 刷新参数列表 + this.fetchParams(); } else { this.$message.error({ message: data.msg || '删除失败,请重试', @@ -346,6 +362,7 @@ export default { justify-content: space-between; align-items: center; margin-top: 10px; + padding-bottom: 10px; } .ctrl_btn { @@ -402,6 +419,10 @@ export default { gap: 8px; margin-top: 15px; + .el-select { + margin-right: 8px; + } + .pagination-btn:first-child, .pagination-btn:nth-child(2), .pagination-btn:nth-last-child(2) { @@ -462,6 +483,7 @@ export default { :deep(.transparent-table) { background: white; + flex: 1; .el-table__header th { background: white !important; @@ -550,4 +572,29 @@ export default { overflow: hidden; text-overflow: ellipsis; } + +.page-size-select { + width: 100px; + margin-right: 8px; + + :deep(.el-input__inner) { + height: 32px; + line-height: 32px; + border-radius: 4px; + border: 1px solid #e4e7ed; + background: #dee7ff; + color: #606266; + font-size: 14px; + } + + :deep(.el-input__suffix) { + line-height: 32px; + } +} + +:deep(.el-table) { + .el-table__body-wrapper { + transition: height 0.3s ease; + } +}