<template>
	<div style="width: 100%">
		<el-breadcrumb separator-class="el-icon-arrow-right">
			<el-breadcrumb-item>首页</el-breadcrumb-item>
			<el-breadcrumb-item>个人信息</el-breadcrumb-item>
		</el-breadcrumb>
		<div class="title">
			个人信息
		</div>
		<el-form :model="form" label-width="100px">
			<el-form-item label="登录账号" prop="form.rybh" required>
				<el-input v-model="form.rybh" :disabled="true"></el-input>
			</el-form-item>
			<el-form-item label="用户名称" prop="form.rymc" required>
				<el-input v-model="form.rymc" :disabled="true"></el-input>
			</el-form-item>
            <!-- <el-form-item label="别名" prop="form.name_other" required>
				<el-input v-model="form.name_other" :disabled="true"></el-input>
			</el-form-item> -->
            <el-form-item label="组别" prop="form.groupname" required>
				<el-input v-model="form.groupname" :disabled="true"></el-input>
			</el-form-item>
            <!-- <el-form-item label="机构属性" prop="form.properties" required>
				<el-input v-model="form.properties" :disabled="true"></el-input>
			</el-form-item> -->
            <el-form-item label="联系人姓名" prop="form.contact_name" required>
				<el-input v-model="form.contact_name" :disabled="true"></el-input>
			</el-form-item>
            <el-form-item label="联系人电话" prop="form.contact_phone" required>
				<el-input v-model="form.contact_phone" :disabled="true"></el-input>
			</el-form-item>
			 <el-form-item label="联系人邮箱" prop="form.contact_mail" required>
				<el-input v-model="form.contact_mail" :disabled="true"></el-input>
			</el-form-item>
			<el-form-item label="联系人QQ" prop="form.contact_qq" required>
				<el-input v-model="form.contact_qq" :disabled="true"></el-input>
			</el-form-item>
			<el-form-item>
				<el-button type="success" @click="putAccount()">修改账户信息</el-button>
				<!-- <el-button @click="reBack()">返回</el-button> -->
			</el-form-item>
		</el-form>
	</div>
</template>

<script>
	const rymc = window.sessionStorage.getItem('rymc')
	const token = window.sessionStorage.getItem('token')
	export default {
		data() {
			return {
				form: {
                    username:'',
                    name:'', 
                    name_other:'', 
                    groupname: '', 
                    properties: '', 
                    contact_name: '', 
                    contact_phone: '',
                    create_time:'' ,
                    update_time:''
				},
            }
		},
		created() {	
            this.getJgAccount()
		},
		mounted() {
            this.getJgAccount()
		},
		methods: {
            async getJgAccount() {
				const result = await this.$http.post('getJgAccount')
				console.log(result.data.data)
                this.form = result.data.data
                if (this.form.properties == 1){
                      this.form.properties ='政府部门';
                }else if(this.form.properties == 2){
                    this.form.properties ='事业单位';
                }else{
                     this.form.properties ='企业';
                }
              
                    
					
        },
        //修改信息
            putAccount(){
                 this.$router.push('putAccount')
                },
	}
    }
</script>
<style lang="less" scoped>
	.title {
		margin-left: 50%;
		margin-bottom: 20px;
	}

	.el-form {
		width: 800px;
		margin: 0 auto;
	}

	.footer {
		margin-top: 5px;
		display: flex;
		flex-direction: row;
		justify-content: space-between;
	}
</style>
