{
  template: '${tmpl}',
  data: function () {
    return {
      multipleSelection: [],
      isSingleSelect: false,
    }
  },
  mounted: function () {},
  created: function () {},
  methods: {
    onColFormater(row, column, cellvalue, index) {
      if (column.property == "isEnabled") {
        if (row["isEnabled"]) {
          return "正常";
        } else {
          return "停用";
        }
      }
      return cellvalue;
    },
    handleSelectionChange: function (val) {
      this.multipleSelection = val;
      console.log(val);
    },
    fetchData: function () {

    },
    onRowClick(row, key, e) {
      console.log("................////////////////////////////");
      var that = this;
      if (key == "stop") {
        this.modelName = "proxyapplicant";
        var url = this.getUrl("update");
        row.isEnabled = !row.isEnabled;
        this.$root.postReq(url, row).then(rd => {
          console.log("................////////////////////////////");
          if (rd.status == 0) {
            that.$refs.proxyapplicantGrid.fetchData();
          }
        });
      }

      if (key == "auditPass") {
        console.log(row);
        if (row.auditStatus == '1') {
          that.$message.warning(`该申请已审核通过`);
          return false;
        }
        this.$confirm('确定审核通过?', '提示', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'warning'
        }).then(() => {
          this.$root.postReq("/web/proxyapplicantCtl/pass", {
            id: row.id
          }).then(function (d) {
            if (d.status == 0) {
              that.$message.success(`审核成功`);
              that.$refs.proxyapplicantGrid.fetchData();
            } else {
              that.$message.warning(d.msg || `审核失败，请刷新页面后重新操作`);
            }
          });
        });
      }
      if (key == "auditReject") {
        if (row.auditStatus == '2') {
          that.$message.warning(`该申请已审核驳回`);
          return false;
        }
        this.$confirm('确定审核驳回?', '提示', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'warning'
        }).then(() => {
          this.$root.postReq("/web/proxyapplicantCtl/reject", {
            id: row.id
          }).then(function (d) {
            if (d.status == 0) {
              that.$message.success(`审核成功`);
              that.$refs.proxyapplicantGrid.fetchData();
            } else {
              that.$message.warning(d.msg || `审核失败，请刷新页面后重新操作`);
            }
          });
        });
      }

      console.log($(e.target).text());
    }
  },
  computed: Vuex.mapState({
    count: state => state.count,
    headStyle: function () {
      return {
        "background-color": "white"
      };
    }
  }),
  vname: "gsb-proxyapplicants"
}