<template>
    <div class="cloudUser">
        <el-table v-loading="loading" :data="cloudUserList">
            <el-table-column label="用户编号" align="center" prop="user_id" />
            <el-table-column label="用户昵称" align="center" prop="nick_name" />
            <el-table-column label="性别" align="center" prop="sex" />
            <el-table-column label="手机号" align="center" prop="phonenumber" />
            <el-table-column label="职位名称" align="center" prop="title" />
            <el-table-column label="职位薪酬" align="center" prop="emolument" />
            <el-table-column label="职位发布者" align="center" prop="company" />
            <el-table-column label="工作地点" align="center" prop="city" />
            <!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
                <template slot-scope="scope">
                    <el-button size="mini" type="text" icon="el-icon-delete" @click="delFn(scope.row)">删除</el-button>
                    <el-button size="mini" type="text" icon="el-icon-view" @click="detailFn(scope.row)"
                        >查看详情</el-button
                    >
                </template>
            </el-table-column> -->
        </el-table>
        <pagination
            v-show="total > 0"
            :total="total"
            :page.sync="queryParams.pageNum"
            :limit.sync="queryParams.pageSize"
            @pagination="getList"
        />
        <!-- 审核弹层 -->
        <el-dialog title="详情" :visible.sync="detailOpen" width="500px" append-to-body> </el-dialog>
    </div>
</template>

<script>
import { getJobEdList } from '@/api/cloudUser'
export default {
    data() {
        return {
            loading: false,
            cloudUserList: [],
            detailOpen: false,
            total: 0,
            queryParams: {
                pageNum: 1,
                pageSize: 10,
            },
        }
    },
    created() {
        this.getList()
    },
    methods: {
        getList() {
            this.loading = true
            getJobEdList(this.queryParams)
                .then((res) => {
                    this.loading = false
                    this.total = res.total
                    this.cloudUserList = res.rows
                })
                .catch((error) => {
                    this.loading = false
                })
        },
        delFn() {
            this.$confirm('此操作将永久云员工, 是否继续?', '提示', {
                confirmButtonText: '确定',
                cancelButtonText: '取消',
                type: 'warning',
            })
                .then(() => {
                    this.$message({
                        type: 'success',
                        message: '删除成功!',
                    })
                })
                .catch(() => {})
        },
        detailFn() {
            this.detailOpen = true
        },
    },
}
</script>

<style lang="scss" scoped>
.cloudUser {
    padding: 20px;
}
</style>