<template>
  <div>
    <el-popconfirm
        title="确定删除该联系人吗？"
        @confirm="onDel"
    >
      <el-button size="mini" type="text" slot="reference" :disabled="!tool.checkAuth($route.name,'contactsManage') || !disabled">删除</el-button>
    </el-popconfirm>
  </div>
</template>

<script>
export default {
  name: "delContact",
  props:["data","disabled"],
  methods:{
    async onDel(){
      const res = await this.$api.requested({
        "id": 20221111130904,
        "content": {
          "sa_project_contactsids": [this.data.sa_project_contactsid],
          "ownerid": this.$route.query.id,
          "ownertable": "sa_project"
        }
      })
      this.$emit("delSuccess")
    }
  }
}
</script>

<style scoped>

</style>