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