南昌市物联网技防平台-前端
zengh
2021-03-24 e2499a631708b565922aa3ce24da8a2a5dddc637
src/views/animalHeat/animalHeat.vue
@@ -204,7 +204,6 @@
        this.onLoad(this.page, this.query);
      },
      getAnimalData(e) {
        this.activeClass = e;
        //type 0:本日  1:本月  2:本年   status: 0:正常   1:异常
        var params = {
          type: e
@@ -218,25 +217,28 @@
        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{
@@ -244,6 +246,7 @@
                status:this.$route.query.status,
                type:this.$route.query.type
            }
            console.log(params,444);
        }
        if (dateTime) {
@@ -260,7 +263,7 @@
            ...this.query,
          };
        }
        console.log(params,555);
        this.loading = true;
        getList(page.currentPage, page.pageSize, values).then(res => {
          const data = res.data.data;