<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: [
                  {
                    name: "tableCode",
                    type: "text",
                    label: "关联主表表名",
                    fuzzy: true,
                  },
                  {
                    name: 'attachType',
                    type: 'select',
                    label: '附件分类',
                  },
                  {
                    name: "attachName",
                    type: "text",
                    label: "附件名称",
                    fuzzy: true,
                  },
                ],
                columns: [
               
                    { label: "ID", prop: "id", formatter: this.formatterString },
                    { label: "关联主表表名", prop: "tableCode" },
             
                    { label: "附件分类", prop: "attachType",formatter: this.formatter },
                    { label: "附件名称", prop: "attachName" },
                    { label: "附件下载",
                     prop: "attachUrl",
                       formatter: this.formatterLink,
                     
                     },
                    { label: "备注", prop: "remark" },
                    {
                        label: "操作",
                        width: 180,
                        formatter: (row) => {
                            return (
                               <table-buttons
                                    row={row}
                                    onEdit={this.toEdit}
                                    onDel={this.toDel}
                                />
                            );
                        },
                    },
                ],
            },
        };
    },
};
</script>