From bf2a27398b6f38ddc7e2e2bc45ff208a29f5cf92 Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Thu, 20 May 2021 17:55:19 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/libs/util.js | 6 +- src/pages/client/list/index.vue | 36 ++++---- src/pages/quesBank/list/globalQuesBank.vue | 75 ++++++++++++++--- src/pages/quesBank/list/myQuesBank.vue | 97 ++++++++++++++++------ src/pages/quesBank/list/quesBankType.vue | 20 +++-- src/pages/quesBank/list/quesDialog.vue | 11 +-- src/pages/system/list/organization.vue | 5 +- src/pages/system/list/role.vue | 13 +-- src/pages/system/list/staff.vue | 38 +++++---- src/pages/user/list/index.vue | 74 +++++++++-------- src/plugins/auth/index.js | 2 +- src/setting.js | 4 +- src/store/modules/user.js | 1 - src/styles/common.scss | 22 +++-- 14 files changed, 268 insertions(+), 136 deletions(-) diff --git a/src/libs/util.js b/src/libs/util.js index 8e0538e..ec9d3bf 100644 --- a/src/libs/util.js +++ b/src/libs/util.js @@ -106,15 +106,15 @@ const util = { }, // 成功提示 successMsg(message) { - Message.success({message,showClose: true,offset: (document.documentElement.clientHeight - 40) / 2,duration: 1500}) + Message.success({message,showClose: true,offset: (document.documentElement.clientHeight - 40) / 2,duration: 3000}) }, // 警告提示 warningMsg(message) { - Message.warning({message,showClose: true,offset: (document.documentElement.clientHeight - 40) / 2,duration: 1500}) + Message.warning({message,showClose: true,offset: (document.documentElement.clientHeight - 40) / 2,duration: 3000}) }, // 错误提示 errorMsg(message) { - Message.error({message,showClose: true,offset: (document.documentElement.clientHeight - 40) / 2,duration: 1500}) + Message.error({message,showClose: true,offset: (document.documentElement.clientHeight - 40) / 2,duration: 3000}) }, // 给超过给定长度的字符串加省略号 ellipsisStr(str) { diff --git a/src/pages/client/list/index.vue b/src/pages/client/list/index.vue index c9afbd9..7c577b0 100644 --- a/src/pages/client/list/index.vue +++ b/src/pages/client/list/index.vue @@ -20,7 +20,7 @@
  • - +
  • @@ -35,11 +35,11 @@ - + @@ -57,13 +57,12 @@ 查看 编辑 删除 - + @@ -81,7 +80,7 @@ export default { countryList: [{ name:'中国' }], - customerData: [], + listData: [], keyword: '', form: { countries:'中国', @@ -91,9 +90,9 @@ export default { multipleSelection: [], provinceList: [], cityList: [], - pageNo: 1, + page: 1, pageSize: 10, - totals: 1, + total: 1, ruleIds: [], searchTimer: null }; @@ -122,13 +121,17 @@ export default { cityId: this.form.city, searchContent: this.keyword } - this.$get(`${this.api.queryClient}/${this.pageNo}/${this.pageSize}`,data).then(res => { - this.customerData = res.data.list.list - this.totals = res.data.list.totalCount + this.$get(`${this.api.queryClient}/${this.page}/${this.pageSize}`,data).then(res => { + this.listData = res.data.list.list + this.total = res.data.list.totalCount + if(!this.listData.length && this.total){ + this.page-- + this.getData() + } }).catch(res => {}); }, initData(){ - this.pageNo = 1 + this.page = 1 this.getData() }, getProvince(){ @@ -144,7 +147,7 @@ export default { getCity(){ this.clearprovince() this.getCityData() - this.pageNo = 1 + this.page = 1 this.getData() }, getCityData(){ @@ -216,8 +219,9 @@ export default { } }, handleCurrentChange(val) { - this.pageNo = val; - this.getData(); + this.page = val + this.$refs.table.clearSelection() + this.getData() }, } }; diff --git a/src/pages/quesBank/list/globalQuesBank.vue b/src/pages/quesBank/list/globalQuesBank.vue index d72afaf..3908041 100644 --- a/src/pages/quesBank/list/globalQuesBank.vue +++ b/src/pages/quesBank/list/globalQuesBank.vue @@ -4,14 +4,14 @@