diff --git a/src/views/contracted/village/massif/massif.vue b/src/views/contracted/village/massif/massif.vue index 46b17964..dac05e2d 100644 --- a/src/views/contracted/village/massif/massif.vue +++ b/src/views/contracted/village/massif/massif.vue @@ -82,6 +82,9 @@ dklb: null, pageNum:1, pageSize:20, + // 查询排序 + orderByColumn: "id", + isAsc: "desc", }, // 地块类别字典 dklbOptions: [], @@ -103,9 +106,10 @@ this.getDicts("land_type").then(response => { this.dklbOptions = response.data; if (this.dklbOptions.length > 0) { - this.queryParams.dklb = this.dklbOptions[0].dictValue; - this.landCategory = this.dklbOptions[0].dictValue; - this.tagName = this.dklbOptions[0].dictLabel; + const dklb = this.$route.query.dklb; + this.queryParams.dklb = dklb ? dklb : this.dklbOptions[0].dictValue; + this.landCategory = dklb ? dklb : this.dklbOptions[0].dictValue; + this.tagName = dklb ? this.selectDictLabel(this.dklbOptions, dklb) : this.dklbOptions[0].dictLabel; } this.getList(); }); @@ -150,6 +154,7 @@ path:'/contracted/village/massifDetail', query: { deptId: this.$route.query.deptId, + deptName: this.$route.query.deptName, id: id } }); @@ -157,7 +162,8 @@ this.$router.push({ path:'/contracted/village/massifDetail', query: { - deptId: this.$route.query.deptId + deptId: this.$route.query.deptId, + deptName: this.$route.query.deptName } }); } diff --git a/src/views/contracted/village/massif/massifDetail.vue b/src/views/contracted/village/massif/massifDetail.vue index 3df9f003..1d602652 100644 --- a/src/views/contracted/village/massif/massifDetail.vue +++ b/src/views/contracted/village/massif/massifDetail.vue @@ -213,6 +213,8 @@ }, created() { this.taskStatus = Cookies.get('taskStatus'); + console.log(this.$route.query); + console.log(this.$route.params); this.getDicts("land_ownership").then(response => { this.syqxzOptions = response.data; }); @@ -330,7 +332,15 @@ message: '保存成功', duration:"1000", onClose: () => { - this.goBack(); + // this.goBack(); + this.$router.push({ + path:'/contracted/village/massif', + query: { + deptId: this.$route.query.deptId, + deptName: this.$route.query.deptName, + dklb: this.form.dklb + } + }); } }); } @@ -344,7 +354,15 @@ message: '保存成功', duration:"1000", onClose: () => { - this.goBack(); + // this.goBack(); + this.$router.push({ + path:'/contracted/village/massif', + query: { + deptId: this.$route.query.deptId, + deptName: this.$route.query.deptName, + dklb: this.form.dklb + } + }); } }); }