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

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

</script>
