<template>
    <div class="enterpriseInfo">
        <h2 style="margin-bottom: 20px;padding-bottom:7px;border-bottom:2px solid #ddd">牧场信息</h2>
        <div class="left">
            <el-form ref="form" :model="form" >
                <el-form-item label="牧场名称">
                    <el-input v-model="form.name"></el-input>
                </el-form-item>
                <el-form-item label="邮箱">
                    <el-input v-model="form.email"></el-input>
                </el-form-item>
                <el-form-item label="牧场简介">
                    <el-input type="textarea" v-model="form.desc"></el-input>
                </el-form-item>
                <el-form-item label="主要负责人及电话">
                    <el-row type="flex" :gutter="19">
                        <el-col :span="8">
                            <el-input v-model="form.people"></el-input>
                        </el-col>
                        <el-col :span="15">
                            <el-input v-model="form.mobile"></el-input>
                        </el-col>
                    </el-row>
                </el-form-item>
                <el-form-item label="活动区域">
                    <el-cascader
                        size="large"
                        :options="options"
                        v-model="form.area"
                        @change="handleChange"
                    ></el-cascader>
                </el-form-item>
                <el-form-item label="详细地址">
                    <el-input v-model="form.detail_address"></el-input>
                </el-form-item>
                <el-form-item label="联系电话">
                    <el-row type="flex" :gutter="19">
                        <el-col :span="8">
                            <el-input v-model="form.mobile_base"></el-input>
                        </el-col>
                        <el-col :span="15">
                            <el-input v-model="form.mobile_num"></el-input>
                        </el-col>
                    </el-row>
                </el-form-item>
                <el-form-item>
                    <el-button style="margin-left:60%" type="primary" @click="onSubmit">更新信息</el-button>
                </el-form-item>
            </el-form>
        </div>
    </div>
</template>

<script>
import { regionData } from "element-china-area-data";
export default {
    data() {
        return {
            form: {
                name: "长兴牧场",
                email: "antdesign@alipay.com",
                desc: "一个养殖平台",
                people: "赵四",
                mobile: "138888888888",
                area: ['330000', '330100', '330110'],
                detail_address: "西溪海创园",
                mobile_base: "0572",
                mobile_num: "55666655"
            },
            options: regionData
        };
    },
    created() {},
    methods: {
        onSubmit() {
            console.log("submit!");
        },
        handleChange(value) {
            console.log(value);
        }
    }
};
</script>

<style lang="scss" scoped>
.enterpriseInfo {
    .left {
        width: 500px;
        margin-left: 50px;
    }
}
</style>