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

    </div>
</template>

<script>
    import table from "@/assets/mixins/table";
    export default {
        components: {
        },
        mixins: [table],
        created() {
        },
        methods: {
        },
        data() {
            return {
                config: {
                    search: [
                        {
                            name: "customerId",
                            type: "text",
                            label: "用户ID",
                            fuzzy: true
                        },
                        {
                            name: "productId",
                            type: "text",
                            label: "产品",
                            fuzzy: true
                        },
                        {
                            name: "topic",
                            type: "text",
                            label: "Topic类，类目命名只能包含字母、数字和下划线（_），每级类目不能为空。",
                            fuzzy: true
                        },
                        {
                            name: "productTopicRemark",
                            type: "text",
                            label: "描述",
                            fuzzy: true
                        },
                        {
                            name: "createUserId",
                            type: "text",
                            label: "创建用户",
                            fuzzy: true
                        },
                    ],
                    columns: [
                        {type: "selection", width: 60},
                        {label: "用户ID", prop: "customerId", formatter: this.formatterString},
                        {label: "产品", prop: "productId", formatter: this.formatterString},
                        {label: "Topic类，类目命名只能包含字母、数字和下划线（_），每级类目不能为空。", prop: "topic"},
                        {label: "描述", prop: "productTopicRemark"},
                        {
                            label: "操作",
                            width: 180,
                            formatter: row => {
                                return (
                                    <div><el-button type="primary" icon="el-icon-edit"  size='mini' onClick={()=>{this.toEdit(row)}}>编辑</el-button></div>
                            );
                            }
                        }
                    ]
                }
            };
        }
    };
</script>