|
@@ -61,7 +61,7 @@
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="pull-right">
|
|
<div class="pull-right">
|
|
|
- <Pagination :pagination="pagination" :callback="getDatas" />
|
|
|
|
|
|
|
+ <Pagination :pagination="pagination" :callback="getDatas" @click="updateRouter" />
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
@@ -124,25 +124,43 @@ export default {
|
|
|
console.log(this.$route);
|
|
console.log(this.$route);
|
|
|
this.getDatas();
|
|
this.getDatas();
|
|
|
},
|
|
},
|
|
|
- 'param.traceUserStatus': function(val) {
|
|
|
|
|
- this.$router.push('/trace/traceList/' + val);
|
|
|
|
|
|
|
+ 'param.traceUserStatus': function(val,oldVal) {
|
|
|
|
|
+ this.$router.push({
|
|
|
|
|
+ path: '/trace/traceList/'+ val,
|
|
|
|
|
+ query: {
|
|
|
|
|
+ currentPage: this.pagination.current_page,
|
|
|
|
|
+ pageSize: this.pagination.per_page,
|
|
|
|
|
+ },
|
|
|
|
|
+ });
|
|
|
|
|
+ // this.$router.push('/trace/traceList/' + val);
|
|
|
this.$route.params.traceState = val;
|
|
this.$route.params.traceState = val;
|
|
|
console.log(this.$route);
|
|
console.log(this.$route);
|
|
|
|
|
+ console.log(oldVal);
|
|
|
this.param.traceUserStatus = this.$route.params.traceState;
|
|
this.param.traceUserStatus = this.$route.params.traceState;
|
|
|
- this.pagination.total = 0;
|
|
|
|
|
- this.pagination.per_page = Common.pageSize;
|
|
|
|
|
- this.pagination.current_page = 1;
|
|
|
|
|
- this.pagination.last_page = 10;
|
|
|
|
|
- this.pagination.from = 1;
|
|
|
|
|
- this.pagination.to = 10;
|
|
|
|
|
|
|
+ // this.updateRouter();
|
|
|
|
|
+ // this.pagination.total = 0;
|
|
|
|
|
+ // this.pagination.per_page = Common.pageSize;
|
|
|
|
|
+ // this.pagination.current_page = 1;
|
|
|
|
|
+ // this.pagination.last_page = 10;
|
|
|
|
|
+ // this.pagination.from = 1;
|
|
|
|
|
+ // this.pagination.to = 10;
|
|
|
this.getDatas();
|
|
this.getDatas();
|
|
|
},
|
|
},
|
|
|
|
|
+
|
|
|
|
|
+ beforeRouteUpdate(to, from, next) {
|
|
|
|
|
+ const newId = to.query.tempId;
|
|
|
|
|
+ const oldId = from.query.tempId;
|
|
|
|
|
+ console.log(newId,oldId); //345,123
|
|
|
|
|
+ next();
|
|
|
|
|
+ },
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
mounted: function() {
|
|
mounted: function() {
|
|
|
TraceResource.getImg();
|
|
TraceResource.getImg();
|
|
|
console.log(this.$route);
|
|
console.log(this.$route);
|
|
|
this.param.traceUserStatus = this.$route.params.traceState;
|
|
this.param.traceUserStatus = this.$route.params.traceState;
|
|
|
|
|
+ this.pagination.current_page = this.$route.query.currentPage;
|
|
|
|
|
+ this.pagination.per_page = this.$route.query.pageSize;
|
|
|
this.getDatas();
|
|
this.getDatas();
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
@@ -150,7 +168,7 @@ export default {
|
|
|
this.pagination.per_page = newPageSize;
|
|
this.pagination.per_page = newPageSize;
|
|
|
this.pagination.current_page = 1;
|
|
this.pagination.current_page = 1;
|
|
|
// 刷新界面
|
|
// 刷新界面
|
|
|
- this.getDatas();
|
|
|
|
|
|
|
+ this.updateRouter();
|
|
|
},
|
|
},
|
|
|
end(evt) {
|
|
end(evt) {
|
|
|
var _self = this;
|
|
var _self = this;
|
|
@@ -179,6 +197,22 @@ export default {
|
|
|
},
|
|
},
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
|
|
+
|
|
|
|
|
+ updateRouter: function () {
|
|
|
|
|
+ // var uuid = Uuid.createUUID();
|
|
|
|
|
+ console.log(this.param.traceUserStatus);
|
|
|
|
|
+ this.$router.push({
|
|
|
|
|
+ path: '/trace/traceList/'+ this.param.traceUserStatus,
|
|
|
|
|
+ query: {
|
|
|
|
|
+ currentPage: this.pagination.current_page,
|
|
|
|
|
+ pageSize: this.pagination.per_page,
|
|
|
|
|
+ },
|
|
|
|
|
+ });
|
|
|
|
|
+ console.log(this.$route);
|
|
|
|
|
+ // console.log(this.$router.query.currentPage);
|
|
|
|
|
+ // console.log(this.$router.query.pageSize);
|
|
|
|
|
+ this.getDatas();
|
|
|
|
|
+ },
|
|
|
/**
|
|
/**
|
|
|
* 查询数据
|
|
* 查询数据
|
|
|
* @author GuoZhiBo 20180226
|
|
* @author GuoZhiBo 20180226
|