<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: "productKey",
                            type: "text",
                            label: "平台为产品颁发的全局唯一标识符",
                            fuzzy: true
                        },
                        {
                            name: "deviceId",
                            type: "text",
                            label: "设备ID",
                            fuzzy: true
                        },
                        {
                            name: "deviceName",
                            type: "text",
                            label: "设备名称",
                            fuzzy: true
                        },
                        {
                            name: "deviceTopicHandle",
                            type: "text",
                            label: "设备对该Topic的操作，可设置为发布、订阅、发布和订阅。",
                            fuzzy: true
                        },
                        {
                            name: "topic",
                            type: "text",
                            label: "设备的具体是topic信息，根据产品topic信息生产",
                            fuzzy: true
                        },
                        {
                            name: "deviceTopicRemark",
                            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: "平台为产品颁发的全局唯一标识符", prop: "productKey"},
                        {label: "设备ID", prop: "deviceId", formatter: this.formatterString},
                        {label: "设备名称", prop: "deviceName"},
                        {label: "设备对该Topic的操作，可设置为发布、订阅、发布和订阅。", prop: "deviceTopicHandle"},
                        {label: "设备的具体是topic信息，根据产品topic信息生产", prop: "topic"},
                        {label: "描述", prop: "deviceTopicRemark"},
                        {
                            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>