<template>
    <a-row :gutter="16">
        <a-col :span="span">
            <a-form-model-item label="账号" prop="loginId">
                <a-input v-model="form.loginId" :disabled="isView" />
            </a-form-model-item>
        </a-col>
        <a-col :span="span">
            <a-form-model-item label="名称" prop="userName">
                <a-input v-model="form.userName" :disabled="isView" />
            </a-form-model-item>
        </a-col>
        <a-col :span="24">
            <a-form-model-item label="角色" prop="userRoleRelationList">
                <RequestSelect
                    mode="multiple"
                    :formatData="formatRoleData"
                    :request="Api.getRoles"
                    v-model="form.userRoleRelationList"
                    :disabled="isView"
                />
            </a-form-model-item>
        </a-col>
        <a-col :span="span">
            <a-form-model-item label="职称" prop="userTitle">
                <ParameterSelect
                    staticKey="tfm_sys_user|userTitle"
                    v-model="form.userTitle"
                    :disabled="isView"
                />
            </a-form-model-item>
        </a-col>
        <a-col :span="span">
            <a-form-model-item label="电子邮箱" prop="userEmail">
                <a-input v-model="form.userEmail" :disabled="isView" />
            </a-form-model-item>
        </a-col>
        <a-col :span="span">
            <a-form-model-item label="移动电话" prop="mobilePhone">
                <a-input v-model="form.mobilePhone" :disabled="isView" />
            </a-form-model-item>
        </a-col>
        <a-col :span="span">
            <a-form-model-item label="固定电话" prop="fixedPhone">
                <FixedPhone v-model="form.fixedPhone" :disabled="isView" />
            </a-form-model-item>
        </a-col>
    </a-row>
</template>

<script>
import Api from '@/api/organization';
import RequestSelect from '@/components/MySelect/RequestSelect.vue';
import ParameterSelect from '@/components/MySelect/ParameterSelect.vue';
import FixedPhone from './FixedPhone.vue';
export default {
    components: { RequestSelect, ParameterSelect, FixedPhone },
    props: {
        form: Object,
        isView: Boolean,
    },
    data() {
        return {
            Api,
            span: 12,
            formatRoleData: { value: 'roleId', label: 'roleName', key: 'roleId' },
        };
    },
    methods: {},
};
</script>
