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

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

export default {
    mixins: [table],
    data() {
        return {
            config: {
                search: [
                    {
                        name: "eventCode",
                        type: "select",
                        label: "事件编码",
                    },
                  {
                    name: "fieldCode",
                    type: "text",
                    label: "字段编码",
                  },
                  {
                    name: "fieldName",
                    type: "text",
                    label: "字段名称",
                    fuzzy: true
                  },
                  {
                    name: "inputType",
                    type: "select",
                    label: "输入方式",
                  },
                ],
                columns: [
                    {
                        type: "selection",
                        width: 60,
                    },

                    {
                        prop: "id",
                        label: "ID",
                    },

                    {
                        prop: "eventCode",
                        label: "事件编码",
                        formatter: this.formatter,
                    },

                    {
                        prop: "fieldCode",
                        label: "字段编码",
                    },

                    {
                        prop: "fieldName",
                        label: "字段名称",
                    },

                    {
                        prop: "fieldType",
                        label: "数据类型",
                        formatter: this.formatter,
                    },

                    {
                        prop: "fieldLen",
                        label: "数据长度",
                    },

                    {
                        prop: "fieldNull",
                        label: "允许为空",
                        formatter: this.formatter,
                    },
                  {
                    prop: "inputType",
                    label: "输入方式",
                    formatter: this.formatter,
                  },
                  {
                    prop: "dataSource",
                    label: "数据来源",
                  },

                    {
                        prop: "fieldOrderNo",
                        label: "排序号",
                    },

                    {
                        prop: "enabled",
                        label: "是否启用",
                        formatter: this.formatter,
                    },

                    {
                        label: "操作",
                        width: 100,
                        formatter: (row) => {
                            return (
                                <table-buttons
                                    row={row}
                                    onEdit={this.toEdit}
                                    onView={this.toView}
                                    noDel
                                />
                            );
                        },
                    },
                ],
            },
        };
    },
};
</script>
