<template>
  <el-popconfirm
      title="确定删除该关联客户吗"
      @confirm="onShow"
  >
    <el-button slot="reference" size="mini" type="text"  :disabled="!tool.checkAuth($route.name,'andEnterpriseManage') || !disabled">删 除</el-button>
  </el-popconfirm>
</template>

<script>
export default {
  name: "toDel",
  props:["data","disabled"],
  methods:{
    async onShow(){
      console.log("确定操作")
      console.log(this.data)
      const res = await this.$api.requested({
        "id": 20221027143802,
        "content": {
          "sa_projectid":this.$route.query.id,
          "sa_project_partiesids": [this.data.sa_project_partiesid]
        },
      })
      this.tool.showMessage(res, ()=>{
        this.$emit("toDelSuccess")
      })
    }
  }
}
</script>

<style scoped>

</style>