？<template>
    <layout-form>
        <el-form :model="form" :loading="loading" :rules="rules" size='small' style="width:100%" label-width='120px' ref="form">
            <el-row>
                            <Field label="表名称" prop="tableName" v-model="form.tableName" placeholder="请输入表名称"/>
                <Field label="表描述" prop="tableComment" v-model="form.tableComment" placeholder="请输入表描述"/>
                <Field label="关联子表的表名" prop="subTableName" v-model="form.subTableName" placeholder="请输入关联子表的表名"/>
                <Field label="子表关联的外键名" prop="subTableFkName" v-model="form.subTableFkName" placeholder="请输入子表关联的外键名"/>
                <Field label="实体类名称" prop="className" v-model="form.className" placeholder="请输入实体类名称"/>
                <Field label="使用的模板（crud单表操作 tree树表操作）" prop="tplCategory" v-model="form.tplCategory" placeholder="请输入使用的模板（crud单表操作 tree树表操作）"/>
                <Field label="生成包路径" prop="packageName" v-model="form.packageName" placeholder="请输入生成包路径"/>
                <Field label="生成模块名" prop="moduleName" v-model="form.moduleName" placeholder="请输入生成模块名"/>
                <Field label="生成业务名" prop="businessName" v-model="form.businessName" placeholder="请输入生成业务名"/>
                <Field label="生成功能名" prop="functionName" v-model="form.functionName" placeholder="请输入生成功能名"/>
                <Field label="生成功能作者" prop="functionAuthor" v-model="form.functionAuthor" placeholder="请输入生成功能作者"/>
                <Field label="生成代码方式（0.zip压缩包 1.自定义路径）" prop="genType" v-model="form.genType" placeholder="请输入生成代码方式（0.zip压缩包 1.自定义路径）"/>
                <Field label="生成路径（不填默认项目路径）" prop="genPath" v-model="form.genPath" placeholder="请输入生成路径（不填默认项目路径）"/>
                <Field label="其它生成选项" prop="options" v-model="form.options" placeholder="请输入其它生成选项"/>
                <Field label="备注" prop="remark" v-model="form.remark" placeholder="请输入备注"/>
                <Field label="变更时间" prop="updateTime" v-model="form.updateTime" placeholder="请输入变更时间"/>
                <Field label="变更用户loginName" prop="updateUser" v-model="form.updateUser" placeholder="请输入变更用户loginName"/>
            </el-row>
            <form-buttons @submit='submitForm'/>
        </el-form>
    </layout-form>
</template>

<script>
    import form from "@/assets/mixins/form";
    export default {
        mixins: [form],
        data() {
            return {
                rules: {
                    tableName:[{required: true, message: '请输入表名称', trigger: 'blur'},
                        {max: 200, message: '最多只能录入200个字符', trigger: 'blur'}],
                    tableComment:[{required: true, message: '请输入表描述', trigger: 'blur'},
                        {max: 500, message: '最多只能录入500个字符', trigger: 'blur'}],
                    subTableName:[{required: true, message: '请输入关联子表的表名', trigger: 'blur'},
                        {max: 64, message: '最多只能录入64个字符', trigger: 'blur'}],
                    subTableFkName:[{required: true, message: '请输入子表关联的外键名', trigger: 'blur'},
                        {max: 64, message: '最多只能录入64个字符', trigger: 'blur'}],
                    className:[{required: true, message: '请输入实体类名称', trigger: 'blur'},
                        {max: 100, message: '最多只能录入100个字符', trigger: 'blur'}],
                    tplCategory:[{required: true, message: '请输入使用的模板（crud单表操作 tree树表操作）', trigger: 'blur'},
                        {max: 200, message: '最多只能录入200个字符', trigger: 'blur'}],
                    packageName:[{required: true, message: '请输入生成包路径', trigger: 'blur'},
                        {max: 100, message: '最多只能录入100个字符', trigger: 'blur'}],
                    moduleName:[{required: true, message: '请输入生成模块名', trigger: 'blur'},
                        {max: 30, message: '最多只能录入30个字符', trigger: 'blur'}],
                    businessName:[{required: true, message: '请输入生成业务名', trigger: 'blur'},
                        {max: 30, message: '最多只能录入30个字符', trigger: 'blur'}],
                    functionName:[{required: true, message: '请输入生成功能名', trigger: 'blur'},
                        {max: 50, message: '最多只能录入50个字符', trigger: 'blur'}],
                    functionAuthor:[{required: true, message: '请输入生成功能作者', trigger: 'blur'},
                        {max: 50, message: '最多只能录入50个字符', trigger: 'blur'}],
                    genType:[{required: true, message: '请输入生成代码方式（0.zip压缩包 1.自定义路径）', trigger: 'blur'},{type: 'integer', trigger: 'blur'}],
                    genPath:[{required: true, message: '请输入生成路径（不填默认项目路径）', trigger: 'blur'},
                        {max: 200, message: '最多只能录入200个字符', trigger: 'blur'}],
                    options:[{required: true, message: '请输入其它生成选项', trigger: 'blur'},
                        {max: 1000, message: '最多只能录入1000个字符', trigger: 'blur'}],
                    remark:[{required: true, message: '请输入备注', trigger: 'blur'},
                        {max: 500, message: '最多只能录入500个字符', trigger: 'blur'}],
                    updateTime:[{required: true, message: '请输入变更时间', trigger: 'blur'},],
                    updateUser:[{required: true, message: '请输入变更用户loginName', trigger: 'blur'},
                        {max: 50, message: '最多只能录入50个字符', trigger: 'blur'}],
                }
            };
        }
    };
</script>