From 3024fa65c8d3aa6df955aba811bfab2b80c094b8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=BE=89?= <814457906@qq.com>
Date: Wed, 19 Jun 2024 17:33:05 +0800
Subject: [PATCH] =?UTF-8?q?=E5=88=86=E9=A1=B5=E5=99=A8=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../myPagination}/index.vue | 61 +++++++++++++++++--
src/main.js | 2 +
src/views/monitor/logininfor/index.vue | 11 +++-
src/views/monitor/operlog/index.vue | 8 +--
4 files changed, 69 insertions(+), 13 deletions(-)
rename src/{views/components/Pagination => components/myPagination}/index.vue (79%)
diff --git a/src/views/components/Pagination/index.vue b/src/components/myPagination/index.vue
similarity index 79%
rename from src/views/components/Pagination/index.vue
rename to src/components/myPagination/index.vue
index 0a25749..abb1a51 100644
--- a/src/views/components/Pagination/index.vue
+++ b/src/components/myPagination/index.vue
@@ -1,7 +1,8 @@
@@ -43,6 +50,7 @@ export default {
return {
lxyms: 7,
currentPage: this.indexFromWrap,
+ page: this.indexFromWrap,
quickprevIconClass: "el-icon-more",
quicknextIconClass: 'el-icon-more',
options: [{
@@ -102,7 +110,19 @@ export default {
}
},
methods: {
+ foucus() { },
+ blur() {
+ if (!this.page) {
+ this.page = 1
+ }
+ if (this.page > this.totalPage) {
+ this.page = this.totalPage
+ }
+ this.updateCPage(Number(this.page))
+ },
changesize() {
+ this.currentPage = 1
+ this.page = 1
this.$emit("updateCPage", this.currentPage, this.currentpageSize)
},
onMouseenter(direction) {
@@ -128,6 +148,13 @@ export default {
}
},
watch: {
+ currentPage: {
+ handler(val) {
+ this.page = val
+ },
+ deep: true,
+ immediate: true
+ },
//监听当前页下标
indexFromWrap: {
handler(val) {
@@ -148,14 +175,38 @@ export default {
height: 40px;
margin: 0 !important;
padding: 0 !important;
+ display: flex;
+ align-items: center;
+
+ ::v-deep .el-input__inner {
+ padding: 0 !important;
+ font-size: 13px;
+ text-align: center;
+ }
+
+ ::v-deep .el-input--suffix {
+ .el-input__inner {
+ padding-right: 20px !important;
+ }
+ }
+
+ span {
+ display: inline-block;
+ font-size: 13px;
+ min-width: 35.5px;
+ height: 28px;
+ line-height: 28px;
+ vertical-align: top;
+ -webkit-box-sizing: border-box;
+ box-sizing: border-box;
+ }
button {
margin: 0 5px;
background-color: #f4f4f5;
- color: #606266;
+ color: black;
outline: none;
border-radius: 2px;
- padding: 0 8px;
vertical-align: top;
display: inline-block;
font-size: 13px;
diff --git a/src/main.js b/src/main.js
index 6530909..6d56a84 100644
--- a/src/main.js
+++ b/src/main.js
@@ -26,6 +26,7 @@ import { getConfigKey } from "@/api/system/config";
import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, handleTree } from "@/utils/xinelu";
// 分页组件
import Pagination from "@/components/Pagination";
+import myPagination from "@/components/myPagination";
// 自定义表格工具组件
import RightToolbar from "@/components/RightToolbar"
// 富文本组件
@@ -63,6 +64,7 @@ Vue.prototype.handleTree = handleTree
Vue.component('font-awesome-icon', FontAwesomeIcon)
Vue.component('DictTag', DictTag)
Vue.component('Pagination', Pagination)
+Vue.component('myPagination', myPagination)
Vue.component('RightToolbar', RightToolbar)
Vue.component('Editor', Editor)
Vue.component('FileUpload', FileUpload)
diff --git a/src/views/monitor/logininfor/index.vue b/src/views/monitor/logininfor/index.vue
index efe4150..0218c59 100644
--- a/src/views/monitor/logininfor/index.vue
+++ b/src/views/monitor/logininfor/index.vue
@@ -68,8 +68,10 @@
-
+
+
@@ -116,6 +118,11 @@ export default {
this.screenChange()
},
methods: {
+ updateCPage(index, size) {
+ this.queryParams.pageNum = index
+ this.queryParams.pageSize = size
+ this.getList();
+ },
/** 查询登录日志列表 */
getList() {
this.loading = true;
diff --git a/src/views/monitor/operlog/index.vue b/src/views/monitor/operlog/index.vue
index 4f99045..a034257 100644
--- a/src/views/monitor/operlog/index.vue
+++ b/src/views/monitor/operlog/index.vue
@@ -84,8 +84,8 @@
-
+
@@ -132,11 +132,7 @@