From 46c32d3627bb25c2b3095e78f28b81554a00f188 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BB=BB=E7=8F=AE=E5=AE=87?= Date: Fri, 22 Mar 2024 15:26:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A5=E5=BF=97=E6=A8=A1=E5=9D=97=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E6=94=B9=E9=80=A0=EF=BC=8C=E9=A1=B5=E9=9D=A2=E7=BB=93?= =?UTF-8?q?=E6=9E=84=E8=B0=83=E6=95=B4=EF=BC=8C=E6=8E=A5=E5=8F=A3=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E8=B0=83=E6=95=B4=EF=BC=8C=E5=A2=9E=E5=8A=A0=E5=88=86?= =?UTF-8?q?=E9=A1=B5=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/logManage/index.vue | 128 +++++++++++++++++++++++++++++++++- 1 file changed, 125 insertions(+), 3 deletions(-) diff --git a/src/views/logManage/index.vue b/src/views/logManage/index.vue index 0b4ee06..d28d4bf 100644 --- a/src/views/logManage/index.vue +++ b/src/views/logManage/index.vue @@ -30,6 +30,21 @@
+ +
@@ -108,6 +139,7 @@ export default { data() { this.columns = columns return { + nameStr: '', disableMixinCreated: true, url: { list: '/logManage/findFiles', @@ -121,12 +153,37 @@ export default { visible: false, isGettingDetail: false, logInfo: [], + ipagination: { + current: 1, + pageSize: 10, + pageSizeOptions: ['10', '20', '30'], + showTotal: (total, range) => { + const { current, pageSize } = this.ipagination + return `Total ${total} items Page ${current} / ${Math.ceil(total / pageSize)}` + }, + showQuickJumper: true, + showSizeChanger: true, + total: 0, + }, } }, created() { this.getTreeData() }, methods: { + onSearch() { + this.loadData() + }, + handlePageChange(page, pageSize) { + this.ipagination.current = page + this.ipagination.pageSize = pageSize + this.loadData() + }, + handleSizeChange(current, size) { + this.ipagination.current = current + this.ipagination.pageSize = size + this.loadData() + }, async getTreeData() { try { this.isGettingTreeData = true @@ -164,6 +221,8 @@ export default { }, onSelect() { this.queryParam.path = this.selectedKeys[0] + this.ipagination.current = 1 + this.ipagination.pageSize = 10 this.loadData() }, @@ -179,10 +238,14 @@ export default { this.onClearSelected() var params = this.getQueryParams() //查询条件 + params.name = this.nameStr + params.pageNo = this.ipagination.current + params.pageSize = this.ipagination.pageSize this.loading = true getAction(this.url.list, params) - .then((res) => { - this.dataSource = res + .then(({ result: { records, total } }) => { + this.dataSource = records + this.ipagination.total = total }) .finally(() => { this.loading = false @@ -302,6 +365,10 @@ export default { } } } + &-list { + position: relative; + overflow: hidden; + } } .log-detail { @@ -314,4 +381,59 @@ export default { } } } +.search-bar { + height: 50px; + border-top: 1px solid rgba(13, 235, 201, 0.3); + border-bottom: 1px solid rgba(13, 235, 201, 0.3); + margin-bottom: 15px; + padding: 8px 10px; + background: rgba(12, 235, 201, 0.05); +} +.ant-input { + width: 266px; +} +::v-deep { + .ant-form-item { + display: flex; + margin-bottom: 0; + .ant-form-item-label, + .ant-form-item-control { + line-height: 32px; + height: 32px; + } + .ant-form-item-label { + flex-shrink: 0; + margin-right: 10px; + label { + font-size: 16px; + font-family: ArialMT; + color: #ade6ee; + &::after { + display: none; + } + } + } + .ant-calendar-range-picker-separator { + color: white; + } + .ant-form-item-control-wrapper { + width: 100%; + // overflow: hidden; + } + } +} +.search-btn { + margin-bottom: 10px; + img { + width: 16px; + height: 17px; + margin-right: 9px; + } +} +.ant-pagination { + position: absolute; + left: 50%; + bottom: 0; + transform: translateX(-50%); +}