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

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

    export default {
        components: {
        },
        mixins: [table],
        created() {
        },
        methods: {
        },
        data() {
            return {
                config: {
                    search: [

                    ],
                    columns: [
                        {type: "selection", width: 60},
                                                {label: "ID，主键，自增长", prop: "id", formatter: this.formatterString},
                        {label: "所属表编号", prop: "tableId", formatter: this.formatterString},
                        {label: "列名称", prop: "columnName"},
                        {label: "列描述", prop: "columnComment"},
                        {label: "列类型", prop: "columnType"},
                        {label: "JAVA类型", prop: "javaType"},
                        {label: "JAVA字段名", prop: "javaField"},
                        {label: "是否primaryKey（0否，1 是）", prop: "isPrimaryKey"},
                        {label: "是否自增（0否，1 是）", prop: "isIncrement"},
                        {label: "是否必填（0否，1 是）", prop: "isRequired"},
                        {label: "是否为插入字段（0否，1 是）", prop: "isInsert"},
                        {label: "是否编辑字段（0否，1 是）", prop: "isEdit"},
                        {label: "是否列表字段（0否，1 是）", prop: "isList"},
                        {label: "是否查询字段（0否，1 是）", prop: "isQuery"},
                        {label: "显示类型（1.文本框、2.文本域、3.下拉框、4.复选框、5.单选框、6.日期控件）", prop: "htmlType"},
                        {label: "排序", prop: "sort"},
                        {label: "变更时间", prop: "updateTime", formatter: this.formatterDate},
                        {label: "变更用户loginName", prop: "updateUser"},
                        {
                            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>