<template>
    <div class="page">
        <LayoutTable :data='tableData' :config='tableConfig' />
    </div>
</template>

<script>
    import table from "@/assets/mixins/table";

    export default {
        mixins: [table],
        data() {
            return {
                config: {
                    search: [

                    ],
                    columns: [
                        {type: "selection", width: 60},
                                                {label: "ID", prop: "id", formatter: this.formatterString},
                        {label: "姓名", prop: "userName"},
                        {label: "身份证号", prop: "idCard"},
                        {label: "手机号", prop: "phone"},
                        {label: "居住区域", prop: "area"},
                        {label: "详细地址", prop: "address"},
                        {label: "住房类型", prop: "housingType"},
                        {label: "是否有新冠肺炎相关症状", prop: "isPneumonia"},
                        {label: "当前体温", prop: "curTemperature"},
                        {label: "图片", prop: "pic"},
                        {label: "创建人ID", prop: "createUserId", formatter: this.formatterString},
                        {
                            label: "操作",
                            width: 180,
                            formatter: row => {
                                return (
                                    <div><el-button type="primary" icon="el-icon-edit" round size='mini' onClick={()=>{this.toEdit(row)}}>编辑</el-button></div>
                            );
                            }
                        }
                    ]
                }
            };
        }
    };
</script>