<template>
    <!--  dialog 实例 -->
    <div class="GroupRecord">
        <el-dialog title="新增种羊档案" :visible.sync="isShow" width="30%">
            <el-row type="flex">
                <el-col :span="14">
                    <el-form
                        ref="addSeedSheepForm"
                        :model="formData"
                        :rules="rules"
                        label-width="140px"
                    >
                        <el-form-item label="日龄" prop="nodeName">
                            <el-input v-model="formData.dayOfAge"></el-input>
                        </el-form-item>

                        <el-form-item label="配置信息:" prop="meta">
                            <el-input
                                v-model="formData.meta"
                                type="textarea"
                                placeholder="请输入内容,JSON格式"
                                :autosize="{ minRows: 4 }"
                            ></el-input>
                        </el-form-item>

                        <el-form-item label="aaa" prop="code">
                            <el-select v-model="formData.s" placeholder="请选择">
                                <el-option label="甲" :value="1"></el-option>
                                <el-option label="乙" :value="2"></el-option>
                                <el-option label="丙" :value="3"></el-option>
                                <el-option label="丁" :value="4"></el-option>
                            </el-select>
                        </el-form-item>

                        <el-form-item label="等级评级">
                            <el-radio-group v-model="formData.a">
                                <el-radio :label="1">备选项</el-radio>
                                <el-radio :label="2">备选项</el-radio>
                                <el-radio :label="3">备选项</el-radio>
                            </el-radio-group>
                        </el-form-item>

                        <el-form-item>
                            <el-button @click="isShow=false">取 消</el-button>
                            <el-button type="primary" @click="submitForm('addSeedSheepForm')">保 存</el-button>
                        </el-form-item>
                    </el-form>
                </el-col>
            </el-row>
        </el-dialog>
    </div>
</template>

<script>
const rules = {};
export default {
    data() {
        return {
            isShow: true,
            formData: {},
            rules
        };
    },
    created() {},
    methods: {
        submitForm(formName) {
            this.$refs[formName].validate(valid => {
                if (valid) {
                    alert("submit!");
                } else {
                    console.log("error submit!!");
                    return false;
                }
            });
        },
    }
};
</script>

<style lang="scss" scoped>
#header {
    margin-bottom: 15px;
}
.table {
    .pagination {
        margin-top: 20px;
    }
}
</style>