<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-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 {
    name: "enterpriseInfo",
    data() {
        return {
            form: {
                name: "长兴湖羊",
                email: "antdesign@alipay.com",
                desc: "一个养殖平台",
                area: ['330000', '330100', '330110'],
                detail_address: "西溪海创园",
                mobile_base: "0752",
                mobile_num: "88888888"
            },
            options: regionData
        };
    },
    created() {},
    methods: {
        onSubmit() {
            console.log("submit!");
        },
        handleChange(value) {
            console.log(value);
        }
    }
};
</script>

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