<template>
    <div>
        <el-table v-loading="loading" :data="list" >
            <el-table-column label="ID" align="center" prop="logsId" />
            <el-table-column label="标题" align="center" prop="title" />
            <el-table-column label="用户创建人" align="center" prop="userName" />
            <el-table-column label="备注" align="center" prop="remark" />
            <el-table-column label="时间" align="center" prop="createTime" />
        </el-table>
        <pagination
        v-show="total>0"
        :total="total"
        :page.sync="queryParams.pageNum"
        :limit.sync="queryParams.pageSize"
        @pagination="getList"
        />

    </div>
</template>

<script>
    import { listCustomerLogs, getCustomerLogs, delCustomerLogs, addCustomerLogs, updateCustomerLogs, exportCustomerLogs } from "@/api/crm/customerLogs";
    export default {
        name: "customerVisit",
        data() {
            return {

                // 遮罩层
                loading: true,
                // 总条数
                total: 0,
                list: [],
                // 查询参数
                queryParams: {
                    pageNum: 1,
                    pageSize: 10,
                    customerId: null,
                },
            };
        },
        created() {

        },
        methods: {
            getData(customerId){
                this.queryParams.customerId=customerId;
                this.queryParams.pageNum=1;
                this.getList();
            },
            getList() {
                this.loading = true;
                listCustomerLogs(this.queryParams).then(response => {
                    this.list = response.rows;
                    this.total = response.total;
                    this.loading = false;
                });
            },
        }
    };
</script>
<style lang="scss" scoped>
</style>
