<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="name" v-model="form.name" placeholder="请输入姓名"/>
                        <Field label="工号" prop="number" v-model="form.number" placeholder="请输入工号"/>
                        <Field label="职务" prop="userpost" v-model="form.userpost" placeholder="请输入职务"/>
                        <Field label="职称" prop="posttitle" v-model="form.posttitle" placeholder="请输入职称"/>
                        <Field label="政治面貌 " prop="politicalstatus" v-model="form.politicalstatus" type="select" :enumData="dict.politicalstatus" placeholder="请选择政治面貌 "/>
                        <Field label="党员 " prop="dangyuan" v-model="form.dangyuan" type="select" :enumData="dict.dangyuan" placeholder="请选择党员 "/>
                        <Field label="电话" prop="phone" v-model="form.phone" placeholder="请输入电话"/>
                        <Field label="手机" prop="mobile" v-model="form.mobile" placeholder="请输入手机"/>
                        <Field label="星级" prop="starlevel" v-model="form.starlevel" type="select" :enumData="dict.starlevel" placeholder="请选择星级"/>
                        <Field label="个人简介" prop="summary" v-model="form.summary" type="textarea" placeholder="请输入个人简介"/>
                        <Field label="照片"><imageUpload v-model="form.photoPath" prePath="/file/preview"/></Field>
                        <Field label="岗位职责" prop="duty" v-model="form.duty" type="textarea" placeholder="请输入岗位职责"/>
                        <Field label="服务承诺" prop="promise" v-model="form.promise" type="textarea" placeholder="请输入服务承诺"/>
                        <Field label="办理事项" prop="business" v-model="form.business" type="textarea" placeholder="请输入办理事项"/>
                        <Field label="是否在线" prop="online" v-model="form.online" type="select" :enumData="dict.online" placeholder="请选择是否在线"/>
            </el-row>

            <form-buttons @submit='submitForm' :noSaveBtn="pageInfo.type === 'view'"/>
        </el-form>
    </layout-form>
</template>

<script>
    import form from "@/assets/mixins/form";
    import ImageUpload from '@/components/ImageUpload';
    export default {
        mixins: [form],
        components: {
            ImageUpload,
        },
        methods: {


        },
        data() {
            return {
                toString:[
                    "politicalstatus",
                    "dangyuan",
                    "starlevel",
                    "online",
                ],
                rules: {
                }
            };
        }
    };
</script>