|
@@ -120,19 +120,25 @@ export default {
|
|
};
|
|
};
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
- const that = this;
|
|
|
|
|
|
+ const param = this.$route.params;
|
|
|
|
+ if(param.currentPage){
|
|
|
|
+ this.inCurrentPage = param.currentPage
|
|
|
|
+ }
|
|
|
|
+ if(param.filter){
|
|
|
|
+ this.filter = param.filter
|
|
|
|
+ }
|
|
//返回时避免参数未赋值就获取列表
|
|
//返回时避免参数未赋值就获取列表
|
|
- setTimeout(function() {
|
|
|
|
- that.clearFilter();
|
|
|
|
- that.getDataList();
|
|
|
|
- that.getDicList();
|
|
|
|
|
|
+ this.$nextTick(()=> {
|
|
|
|
+ // this.clearFilter();
|
|
|
|
+ this.getDataList();
|
|
|
|
+ this.getDicList();
|
|
});
|
|
});
|
|
|
|
|
|
// this.typeList = config.emData;
|
|
// this.typeList = config.emData;
|
|
// 非首页 编辑页返回 设置 this.currentPage
|
|
// 非首页 编辑页返回 设置 this.currentPage
|
|
- if (Object.keys(this.$route.params).length !== 0) {
|
|
|
|
- this.currentPage = this.$route.params.currentPage;
|
|
|
|
- }
|
|
|
|
|
|
+ // if (Object.keys(this.$route.params).length !== 0) {
|
|
|
|
+ // this.currentPage = this.$route.params.currentPage;
|
|
|
|
+ // }
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|
|
filter: {
|
|
filter: {
|
|
@@ -142,13 +148,13 @@ export default {
|
|
deep: true
|
|
deep: true
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- beforeRouteEnter(to, from, next) {
|
|
|
|
- next(vm => {
|
|
|
|
- //const pm = to.param;
|
|
|
|
- Object.assign(vm, to.params);
|
|
|
|
- vm.inCurrentPage = to.params.currentPage;
|
|
|
|
- });
|
|
|
|
- },
|
|
|
|
|
|
+ // beforeRouteEnter(to, from, next) {
|
|
|
|
+ // next(vm => {
|
|
|
|
+ // //const pm = to.param;
|
|
|
|
+ // Object.assign(vm, to.params);
|
|
|
|
+ // vm.inCurrentPage = to.params.currentPage;
|
|
|
|
+ // });
|
|
|
|
+ // },
|
|
methods: {
|
|
methods: {
|
|
// 获取字典类型
|
|
// 获取字典类型
|
|
getDicList() {
|
|
getDicList() {
|