diff --git a/manifest.json b/manifest.json index d01dc18..b9c9170 100644 --- a/manifest.json +++ b/manifest.json @@ -2,8 +2,8 @@ "name" : "曲阳金隅EHS", "appid" : "__UNI__B00D419", "description" : "曲阳金隅EHS", - "versionName" : "1.01.08", - "versionCode" : 10108, + "versionName" : "1.01.09", + "versionCode" : 10109, "transformPx" : false, /* 5+App特有相关 */ "app-plus" : { diff --git a/pages/workSpace/operation/operationList.vue b/pages/workSpace/operation/operationList.vue index fe252e6..65ed342 100644 --- a/pages/workSpace/operation/operationList.vue +++ b/pages/workSpace/operation/operationList.vue @@ -19,17 +19,6 @@ 全部 - @@ -77,8 +66,8 @@ return { params: { search: '', - pageSize: 10, - pageNum: 1, + page_size: 10, + page: 1, create_by: '' }, totalNum: 0, @@ -94,12 +83,16 @@ remployee:false, } }, + onLoad() { + this.params.create_by = this.vuex_user.id; + }, //上拉加载 onReachBottom() { - const totalPage = Math.ceil(this.totalNum / this.params.pageSize); - if (this.params.pageNum < totalPage) { - this.params.pageNum += 1; - + let that = this; + let totalPage = Math.ceil(that.totalNum / that.params.page_size); + if (that.params.page < totalPage) { + that.params.page += 1; + that.getLists(); } else { uni.showToast({ title: "已全部加载", @@ -111,13 +104,15 @@ if(this.vuex_user.type==='remployee'){ this.remployee = true; } - this.lists = []; - this.params.create_by = this.vuex_user.id; - this.getLists(); + if(this.params.page == 1){ + this.lists = []; + this.getLists(); + } + }, //下拉刷新 onPullDownRefresh() { - this.params.pageNum = 1; + this.params.page = 1; this.lists = []; this.getLists(); }, @@ -125,8 +120,8 @@ getLists() { let that = this; that.$u.api.operationList(that.params).then(res => { + that.totalNum = res.count; that.lists = that.lists.concat(res.results); - this.totalNum = res.count; }) }, operationHandle(val,type) { @@ -141,7 +136,6 @@ url: '/pages/workSpace/operation/operationCreate' + params, }) } - }, operationDetail(val){ let operation = val.id;//作业id @@ -173,12 +167,12 @@ }) }, searchHandle() { - this.params.pageNum = 1; + this.params.page = 1; this.lists = []; this.getLists() }, resetSearch() { - this.params.pageNum = 1; + this.params.page = 1; this.params.search = ""; this.lists = []; this.getLists(); diff --git a/pages/workSpace/rpj/rpjLisst.vue b/pages/workSpace/rpj/rpjLisst.vue index df5a126..7b0882a 100644 --- a/pages/workSpace/rpj/rpjLisst.vue +++ b/pages/workSpace/rpj/rpjLisst.vue @@ -19,17 +19,6 @@ 全部 - @@ -73,8 +62,8 @@ return { params: { search: '', - pageSize: 10, - pageNum: 1, + page_size: 10, + page: 1, create_by: '' }, totalNum: 0, @@ -97,12 +86,17 @@ remployee:false, } }, + onLoad() { + this.dataTypye='isMy'; + this.params.create_by = this.vuex_user.id; + }, //上拉加载 onReachBottom() { - const totalPage = Math.ceil(this.totalNum / this.params.pageSize); - if (this.params.pageNum < totalPage) { - this.params.pageNum += 1; - + let that = this; + let totalPage = Math.ceil(that.totalNum / that.params.page_size); + if (that.params.page < totalPage) { + that.params.page += 1; + that.getLists(); } else { uni.showToast({ title: "已全部加载", @@ -111,20 +105,18 @@ } }, onShow() { - debugger; - console.log(this.vuex_user); - debugger; if(this.vuex_user.type==='remployee'){ this.remployee = true; } - this.lists = []; - this.dataTypye='isMy'; - this.params.create_by = this.vuex_user.id; - this.getLists(); + if(this.params.page == 1){ + this.lists = []; + this.getLists(); + } + }, //下拉刷新 onPullDownRefresh() { - this.params.pageNum = 1; + this.params.page = 1; this.lists = []; this.getLists(); }, @@ -132,8 +124,8 @@ getLists() { let that = this; that.$u.api.rpjList(that.params).then(res => { - that.lists = that.lists.concat(res.results); this.totalNum = res.count; + that.lists = that.lists.concat(res.results); }) }, rpjHandle(val, type) { @@ -173,12 +165,12 @@ }) }, searchHandle() { - this.params.pageNum = 1; + this.params.page = 1; this.lists = []; this.getLists() }, resetSearch() { - this.params.pageNum = 1; + this.params.page = 1; this.params.search = ""; this.lists = []; this.getLists(); diff --git a/pages/workSpace/visit/visitList.vue b/pages/workSpace/visit/visitList.vue index 206ac7e..d22f4c4 100644 --- a/pages/workSpace/visit/visitList.vue +++ b/pages/workSpace/visit/visitList.vue @@ -19,17 +19,6 @@ 全部 - @@ -41,11 +30,6 @@ 来访事由:{{purposeOptions[val.purpose]}} 状态:{{stateOptions[val.state]}} 创建时间:{{val.create_time}} - @@ -74,8 +58,8 @@ return { params: { search: '', - pageSize: 10, - pageNum: 1, + page_size: 10, + page: 1, create_by: '' }, totalNum: 0, @@ -102,9 +86,12 @@ }, //上拉加载 onReachBottom() { - const totalPage = Math.ceil(this.totalNum / this.params.pageSize); - if (this.params.pageNum < totalPage) { - this.params.pageNum += 1; + let that = this; + let totalPage = Math.ceil(that.totalNum / that.params.page_size); + if (that.params.page < totalPage) { + that.params.page += 1; + that.getLists(); + } else { uni.showToast({ title: "已全部加载", @@ -112,17 +99,23 @@ }) } }, + onLoad() { + this.dataTypye='isMy'; + this.params.create_by = this.vuex_user.id; + }, onShow() { if(this.vuex_user.type==='employee'){ this.employee = true; } - this.lists = []; - this.params.create_by = this.vuex_user.id; - this.getLists(); + if(this.params.page == 1){ + this.lists = []; + this.getLists(); + } + }, //下拉刷新 onPullDownRefresh() { - this.params.pageNum = 1; + this.params.page = 1; this.lists = []; this.getLists(); }, @@ -130,8 +123,8 @@ getLists() { let that = this; that.$u.api.visitList(that.params).then(res => { + that.totalNum = res.count; that.lists = that.lists.concat(res.results); - this.totalNum = res.count; }) }, visitHandle(val,type) { @@ -148,9 +141,7 @@ this.$u.api.visitDelete(val.id).then(res => { this.resetSearch() }) - } - - + } }, changeList(index){ let that = this; @@ -168,12 +159,12 @@ }) }, searchHandle() { - this.params.pageNum = 1; + this.params.page = 1; this.lists = []; this.getLists() }, resetSearch() { - this.params.pageNum = 1; + this.params.page = 1; this.params.search = ""; this.lists = []; this.getLists();