
export default {
  data() {
    return {
      pickerOptions: {
        disabledDate(time) {
          return time.getTime() > Date.now();
        },
        },
        wpIdslist: {
        name:"",
        id:"",
      },
      b:[],
      fc:"",
      fj:"",
      data_01:"2021-01-01",
      data_02:"2021-01-03",
      currentPage2: 1,
      pagesize:10,
      orderByColumn: "",
      tableData:[],
    }
  },
   created() {
  },
  methods: {
     query_table(){
     let that = this;
      var digital = new URLSearchParams();
      digital.append("pageNum", this.currentPage2);
      digital.append("pageSize", this.pagesize);
      digital.append("orderByColumn", this.orderByColumn);
      digital.append("isAsc", this.isAsc);
      digital.append("wtId", this.fj);
      digital.append("beginDate", this.data_01);
      digital.append("endDate", this.data_02);
      this.API.post("/goodness/goodhistorylist", digital).then((res) => {
         this.tableData = res.data;
      });

     },
     /**改变格式 */
     data_formatter(cellValue){ return this.BASE.getBzDate(new Date(cellValue.recorddate),0)},
     gaindate() {
      this.b = this.$route.query.data;
      this.fc = this.$route.query.data.windtpowerstationid;
      this.fj = this.$route.query.data.windturbineid;
      this.data_01 = this.BASE.getBzDate(
        new Date(this.$route.query.data.recorddate),0
      );
      this.data_02 = this.BASE.getBzDate(
        new Date(this.$route.query.data.recorddate+60*60*24*1000),0
      );
      this.query_wpid();
    },
    /**返回 */
    goback() {
      this.$router.push({
        path: "/individualPandectinformation"
      });
    },
    /**获取id */
    query_wpid() {
      this.API.get("powercompare/windfarmAjax?").then((res) => {
        this.wpIdslist = res.data;
      });
    },
  },
  activated() {
      this.gaindate();
      this.query_table();
    },
};
