diff --git a/src/views/homesteadSurvey/index.vue b/src/views/homesteadSurvey/index.vue index 014ff227..d08dd274 100644 --- a/src/views/homesteadSurvey/index.vue +++ b/src/views/homesteadSurvey/index.vue @@ -70,7 +70,13 @@
- + - + +
- + - +
- + - +
@@ -207,12 +226,10 @@ nickName:"", text:0, isLoadingtask:false, - countqb:0, - countyhc:0, - countwhc:0, + countqb:1, + countyhc:1, + countwhc:1, - //宅调人员列表 - taskExecutortions:[], //当前用户级别 businessLevel:1, // 字典列表json @@ -220,9 +237,6 @@ }; }, created(){ - userList().then(response => { - this.taskExecutortions = response.data - }) if(this.checked){ setTimeout(() => { let userId = this.$store.state.user.userId; @@ -304,76 +318,66 @@ } return '#FA5353' }, - taskExecutorChange(row){ - if(row.taskExecutor!=null&&row.taskExecutor!=""&&row.taskExecutor.length>1){ - var actions = []; - row.taskExecutor.map(res => { - for(let i = 0;i { - if (this.taskExecutortions[key].userName == ('' + row.taskExecutor)) { - actions.push(this.taskExecutortions[key].nickName); - return true; - } - }) - return actions.join(','); - } - }, onRefreshtask(){ this.isLoadingtask = false; let _this = this - if(this.active==1){ + if(this.active==1 && this.loading ){ let params = { "rwfbzt":"PUBLISHED", - "params":{deptId:this.$store.state.user.loginDeptId}, + "params":this.queryParams.params, + "parentId":this.queryParams.parentId, "pageNum": this.countyhc+1, - "pageSize":10, + "pageSize":4, } listTask(params).then((response) => { - if(response.rows.length>0&&this.doneList.length0&&this.totalList.length { - this.doneList.unshift(res) + this.totalList.push(res) }) this.countyhc++ + this.loading = false; + }else{ + this.finished = true; } }); - }else if(this.active==2){ + }else if(this.active==2 && this.loading){ let params = { "rwwczt": "PUBLISHED", "rwfbzt":"PUBLISHED", - "params":{deptId:this.$store.state.user.loginDeptId}, + "params":this.queryParams.params, + "parentId":this.queryParams.parentId, "pageNum": this.countwhc+1, - "pageSize":10, + "pageSize":4, } listTask(params).then((response) => { - if(response.rows.lenght>0&&this.todoList.length0&&this.doneList.length { - this.todoList.unshift(res) + this.doneList.push(res) }) this.countwhc++ + this.loading = false; + }else{ + this.finished = true; } }); - }else{ + }else if(this.active==3 && this.loading){ let params = { - "rwwczt": "UNPUBLISHED", + "rwwczt": "UNFINISHED", "rwfbzt":"PUBLISHED", - "params":{deptId:this.$store.state.user.loginDeptId}, + "params":this.queryParams.params, + "parentId":this.queryParams.parentId, "pageNum": this.countqb+1, - "pageSize":10, + "pageSize":4, } listTask(params).then((response) => { - if(response.rows.length>0&&this.totalList.length0&&this.todoList.length { - this.totalList.unshift(res) + this.todoList.push(res) }) this.countqb++ + this.loading = false; + }else{ + this.finished = true } }); } @@ -440,6 +444,14 @@ this.queryNum(); }, checkBadge(){ + this.finished = false; + this.loading = false; + this.countqb = 1; + this.countyhc = 1; + this.countwhc = 1; + this.totalList = [] + this.doneList = []; + this.todoList = []; this.getList(); this.queryNum(); }, @@ -464,10 +476,14 @@ }); }else{ this.$set(this.switchParams, "rwzxr", null); + if(this.switchParams.parentId == null){ + this.$set(this.switchParams, "params", {deptId:100}); + } listTask(this.switchParams).then(response => { this.done = 0; this.todo = 0; this.total = response.total; + console.info(this.total) response.rows.map(res => { if(res.rwwczt == "FINISHED"){ this.done+=1 @@ -485,16 +501,16 @@ if(this.active==1) { this.$set(this.queryParams, "rwfbzt", "PUBLISHED"); this.$set(this.queryParams, "rwwczt", null); - this.$set(this.queryParams, "pageNum", this.countyhc + 1); - this.$set(this.queryParams, "pageSize", 10); + this.$set(this.queryParams, "pageNum", this.countyhc); + this.$set(this.queryParams, "pageSize", 4); }else if(this.active==2) { this.$set(this.queryParams, "rwwczt", "FINISHED"); this.$set(this.queryParams, "rwfbzt", "PUBLISHED"); - this.$set(this.queryParams, "pageNum", this.countwhc + 1); + this.$set(this.queryParams, "pageNum", this.countwhc); }else{ this.$set(this.queryParams, "rwwczt", "UNFINISHED"); this.$set(this.queryParams, "rwfbzt", "PUBLISHED"); - this.$set(this.queryParams, "pageNum", this.countqb + 1); + this.$set(this.queryParams, "pageNum", this.countqb); } listTask(this.queryParams).then(response => { if(this.active==1) { diff --git a/src/views/homesteadSurvey/list.vue b/src/views/homesteadSurvey/list.vue index 3463933d..886fe8f1 100644 --- a/src/views/homesteadSurvey/list.vue +++ b/src/views/homesteadSurvey/list.vue @@ -800,7 +800,7 @@ this.loading2 = false }else{ this.loading2 = false - this.loading2 = true + this.finished2 = true } }); }else if(this.active==1&&this.loading2){ diff --git a/src/views/homesteadSurvey/list4.vue b/src/views/homesteadSurvey/list4.vue index 883e12e3..de0608e6 100644 --- a/src/views/homesteadSurvey/list4.vue +++ b/src/views/homesteadSurvey/list4.vue @@ -495,10 +495,10 @@