var app = getApp();
var that;
Page({
  data: {
    page: 1,
    list: []
  },
  onLoad() {
    that = this;
    dd.setNavigationBar({ title: "我的绩效" });
  },
  onShow() {
    if (this.data.page == 1) {
      this.getData();
    }
  },
  openDetail(e) {
    let item = e.target.dataset.item
    dd.navigateTo({
      url: `../performanceDetails/performanceDetails?id=${item.id}&tel=${item.package_name}`
    })
  },
  getData() {
    let params = {
      employee_id: app.globalData.userData.id
    };
    app.$get("api/per/package/employee/list", params).then((res) => {
      this.setData({
        list: res.data.data.list
      })
    })
  },
});
