<template>
  <div style="display:inline">
    <el-popconfirm
      title="确定删除当前选中员工吗？"
      @confirm="deleteRow()">
      <el-button slot="reference" size="small" type="text">删 除</el-button>
    </el-popconfirm>
  </div>
</template>

<script>
export default {
  props:['data'],
  methods:{
    deleteRow () {
      this.$api.requested({
        "classname": "webmanage.hr.hr",
        "method": "deleteHr",
        "content": {
            "hrid":this.data.hrid
        }
      }).then(res=>{
        if (res.code === 0) return this.$notify({title:'失败',type:'error',message:res.data})
        this.$emit('onSuccess')
      })
    },
  }
}

</script>
