| | |
| | | this.onLoad(this.page, this.query); |
| | | }, |
| | | getAnimalData(e) { |
| | | this.activeClass = e; |
| | | //type 0:本日 1:本月 2:本年 status: 0:正常 1:异常 |
| | | var params = { |
| | | type: e |
| | |
| | | let values = { |
| | | ...params, |
| | | }; |
| | | if (this.$route.query.type && this.$route.query != undefined && this.$route.query != null && this.$route.query != "" ) { |
| | | if (this.$route.query.status != undefined && this.$route.query.status != null && this.$route.query.status != "" ) { |
| | | this.activeClass = this.$route.query.type; |
| | | console.log(this.$route.query.status,1); |
| | | console.log(this.$route.query.type,2); |
| | | console.log(this.$route.query,3); |
| | | if (this.$route.query.type!=undefined && this.$route.query != undefined && this.$route.query != null && this.$route.query != "" ) { |
| | | if (this.$route.query.status != undefined) { |
| | | this.page.currentPage = 1; |
| | | params = { |
| | | status:this.$route.query.status, |
| | | type:this.$route.query.type |
| | | } |
| | | console.log(params,111); |
| | | } else { |
| | | this.activeClass = 0; |
| | | this.page.currentPage = 1; |
| | | params = { |
| | | type:this.$route.query.type |
| | | }; |
| | | console.log(params,222); |
| | | } |
| | | }else if(this.$route.query.status != undefined && this.$route.query.status != null && this.$route.query.status != "" ){ |
| | | }else if(this.$route.query.status != undefined){ |
| | | params = { |
| | | status: this.$route.query.status, |
| | | beginTime: this.$route.query.startTime, |
| | | begTime: this.$route.query.startTime, |
| | | endTime: this.$route.query.endTime |
| | | } |
| | | }else{ |
| | |
| | | status:this.$route.query.status, |
| | | type:this.$route.query.type |
| | | } |
| | | console.log(params,444); |
| | | } |
| | | |
| | | if (dateTime) { |
| | |
| | | ...this.query, |
| | | }; |
| | | } |
| | | |
| | | console.log(params,555); |
| | | this.loading = true; |
| | | getList(page.currentPage, page.pageSize, values).then(res => { |
| | | const data = res.data.data; |