<template>
  <div class="inline-16" v-if="data.status === 'ACTIVE'">
    <el-popconfirm
      title="确定停用当前选中账号吗？"
      @confirm="stop()">
      <el-button slot="reference" size="mini" type="default">停 用</el-button>
    </el-popconfirm>
  </div>
</template>

<script>
export default {
  props:['data'],
  methods:{
    async stop () {
     const res = await this.$api.requested({"classname": "webmanage.users.users",
        "method": "changeStatus",
        "content": {
          "userid": this.data.userid,
          "isactive": 0
        }
      })
      this.tool.showMessage(res,() => {
        this.$emit('onSuccess')
      })
    },
  }
}

</script>
