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 @@