<template>
    <el-dialog :visible.sync="visible" v-if="visible" title="操作失败结果"  append-to-body :close-on-click-modal="false" width="40%"
        class="dialog" @close="handleClose">
        <el-table :data="tableList">
            <el-table-column label="用户" prop="userName" align="center"></el-table-column>
            <el-table-column label="失败原因" prop="errorMessage" align="center"></el-table-column>
        </el-table>
        <template #footer>
            <el-button @click="handleClose">关闭</el-button>
        </template>
    </el-dialog>
</template>
<script>
export default {
    data() {
        return {
            visible: false,
            tableList: []
        }
    },
    methods: {
        // 打开兑换窗口
        openModal(tableList) {
            this.visible = true;
            this.tableList = tableList
        },
        handleClose() {
            this.visible = false
        }
    }
}

</script>
<style lang="scss">
.dialog {
    .el-dialog__body {
        padding: 0 20px !important;
    }
}
</style>
