<template>
  <div v-if="data.status !== '结束'" class="inline-16">
    <el-popconfirm
      title="确定结束当前活动吗？"
      @confirm="finishRow()">
      <el-button slot="reference" size="small" type="text">结 束</el-button>
    </el-popconfirm>
    
  </div>
</template>

<script>
export default {
  props:['data'],
  methods:{
    async finishRow () {
      const res = await this.$api.requested({
        "classname": "webmanage.saletool.orderclue.ordercluecampaign",
        "method": "endcampaign",
        "content": {
          "sat_campaignids": [this.data.sat_campaignid]
        }
      })
      this.tool.showMessage(res,()=>{
        this.$emit('onSuccess')
      })
    }
  }
}

</script>
<style>
</style>