<template>
    <div>
        	<div slot="header" class="clearfix">
				<el-breadcrumb separator-class="el-icon-arrow-right">
					<el-breadcrumb-item :to="{ path: '/jc/workbench' }">首页</el-breadcrumb-item>
					<el-breadcrumb-item>主体信息</el-breadcrumb-item>
					<el-breadcrumb-item>信息维护</el-breadcrumb-item>
				</el-breadcrumb>
			</div>

        <div id="ztinformation" style="margin:40px auto; width:60%">
			<el-form :model="ztinfo" style="width:100%">
                 <el-row style="text-align: center; font-size: 23px; margin: 40px 0;">
                        主体信息维护
                </el-row>
				<el-form-item label="单位名称:" prop="user_id.name" class="labelItem">
					<el-input v-model="ztinfo.user_id.name" class="input"></el-input>
				</el-form-item>
				<el-form-item label="单位地址:" prop="address" class="labelItem">	
						<!-- <el-cascader placeholder="请选择地区" :options="options" v-model="selectedOptions" @change="handleChange" style="width:15%">
						</el-cascader> -->
						<el-input v-model="ztinfo.address" placeholder="请输入详细地址" class="input"></el-input>
				</el-form-item>
				
				<!-- <el-form-item label="" prop="inspected_address2" class="labelItem">	
						<el-input v-model="inspected_Unit.inspected_address" placeholder="请输入详细地址" style="width:42%"></el-input>
				</el-form-item> -->
                <el-form-item label="法人代表:" prop="user_fa" class="labelItem">
					<el-input v-model="ztinfo.user_fa" class="input"></el-input>
				</el-form-item>
				<el-form-item label="联系人:" prop="user_id.contact_name" class="labelItem">
					<el-input v-model="ztinfo.user_id.contact_name" class="input"></el-input>
				</el-form-item>
				<el-form-item label="联系电话:" prop="user_id.contact_phone" class="labelItem">
					<el-input v-model="ztinfo.user_id.contact_phone" class="input"></el-input>
				</el-form-item>
                <el-form-item label="QQ:" prop="user_id.contact_qq" class="labelItem">
					<el-input v-model="ztinfo.user_id.contact_qq" class="input"></el-input>
				</el-form-item>
				<el-form-item label="Email:" prop="user_id.contact_mail" class="labelItem">
					<el-input v-model="ztinfo.user_id.contact_mail" class="input"></el-input>
				</el-form-item>
                <el-form-item label="依托单位:" prop="dtRelyOnUnit" class="labelItem">
					<el-input v-model="ztinfo.dtRelyOnUnit" class="input"></el-input>
				</el-form-item>
                <el-form-item label="机构性质:" prop="jgxz" class="labelItem">
					<el-input v-model="ztinfo.jgxz" class="input" disabled></el-input>
				</el-form-item>
                <el-form-item label="统一社会信用代码:" prop="dtCode" class="labelItem">
					<el-input v-model="ztinfo.dtCode" class="input" disabled></el-input>
				</el-form-item>
                <el-form-item label="所属区域:" prop="ssqy" class="labelItem">
					<el-input v-model="ztinfo.ssqy" class="input"></el-input>
				</el-form-item>
                <el-form-item label="邮编:" prop="zipcode" class="labelItem">
					<el-input v-model="ztinfo.zipcode" class="input"></el-input>
				</el-form-item>
                <el-form-item label="技术负责人姓名:" prop="user_js" class="labelItem">
					<el-input v-model="ztinfo.user_js" class="input"></el-input>
				</el-form-item>
                <el-form-item label="质量负责人姓名:" prop="user_zl" class="labelItem">
					<el-input v-model="ztinfo.user_zl" class="input"></el-input>
				</el-form-item>
                <el-form-item label="资质情况:" prop="zizhi" class="labelItem">
					<el-input v-model="ztinfo.zizhi" class="input"></el-input>
				</el-form-item>
                <el-form-item label="catl证书编号:" prop="catl_code" class="labelItem">
					<el-input v-model="ztinfo.catl_code" class="input" disabled></el-input>
				</el-form-item>
                <el-form-item label="catl到期时间:" prop="calt_expiration" class="labelItem">
					<el-input v-model="ztinfo.calt_expiration" class="input" disabled></el-input>
				</el-form-item>
                <el-form-item label="cma证书编号:" prop="cma_code" class="labelItem">
					<el-input v-model="ztinfo.cma_code" class="input" disabled></el-input>
				</el-form-item>
                <el-form-item label="cma到期时间:" prop="cma_code" class="labelItem">
					<el-input v-model="ztinfo.cma_code" class="input" disabled></el-input>
				</el-form-item>
                <el-form-item label="农业农村部认可编号:" prop="mara_code" class="labelItem">
					<el-input v-model="ztinfo.cma_code" class="input" disabled></el-input>
				</el-form-item>
                <el-form-item label="农业农村部到期时间:" prop="mara_expiration" class="labelItem">
					<el-input v-model="ztinfo.mara_expiration" class="input" disabled></el-input>
				</el-form-item>
                <el-form-item label="产品范围:" prop="cpfw" class="labelItem">
					<el-input v-model="ztinfo.cpfw" class="input"></el-input>
				</el-form-item>
                <el-form-item label="认证产品数量:" prop="shuliang" class="labelItem">
					<el-input v-model="ztinfo.shuliang" class="input"></el-input>
				</el-form-item>
                <el-form-item label="认证参数数量:" prop="canshu" class="labelItem">
					<el-input v-model="ztinfo.canshu" class="input"></el-input>
				</el-form-item>
			</el-form>

			<div class="footer">
				<el-button type="primary" style="margin-bottom:30px;" size="small" @click="save()">保存</el-button>
			</div>
		</div>
    </div>
</template>

<script>
	export default {
		name: '',
		data() {
			return {
				pageNum:1,
                pageSize: 2,
                ztinfo:{
					user_id: [],
				}
					
				
			}
		},

		mounted() {
		},
		created(){
            this.getOrganization()
		},
		
		// watch: {
		// 	monitorText(val) {
		// 		this.$refs.tree.filter(val);
		// 	}
		// },
		
		methods: {
            // async getJgOrgs() {
            //     const result = await this.$http.post('getJgOrgs', {pageNum: this.pageNum,pageSize: this.pageSize})
            // }
            async getOrganization() {
                const result = await this.$http.post('getOrganization')
                console.log(result.data.data)
                this.ztinfo = result.data.data
            },
			async save(){
			console.log(111)
			const result = await this.$http.post('putJcjgOrganization',this.ztinfo)
			if (result.data.code == 0) {
					this.$message({
						type: 'success',
						message: '修改成功'
					})
					this.getOrganization()
				}
		}
        },
	
	
	}
</script>

<style lang="less" scoped>
// #formzt .el-form{
//     text-align: center;
// }
    /deep/ #ztinformation{
		.el-form-item__label{
			width: 14%;
		}
		.el-form-item__error{
		left:135px;
	}
		.el-upload__tip{
			margin-left: 7.5rem;
		}
		.el-upload-list__item-name{
			margin-left: 7.8125rem
		}
	
	}
	.labelItem /deep/ .el-form-item__label {
		// width: 80px;
		text-align: center;
		vertical-align: middle;
		float: left;
		font-size: 13px;
		color: #606266;
		// line-height: 40px;
		padding: 0 2px 0 0;
		-webkit-box-sizing: border-box;
		box-sizing: border-box;
	}
	/deep/ #ztinformation{
		.el-form-item{
			margin-left: 90px;
		}
		.input{
			width: 48%;
		}
		.el-form-item__label{
			width: 9.375rem;
			text-align: right;
			margin-right: .9375rem;
		}
	}
	// .labelItem /deep/ .el-form-item__label {
	// 	// width: 80px;
	// 	text-align: center;
	// 	vertical-align: middle;
	// 	float: left;
	// 	font-size: 14px;
	// 	color: #606266;
	// 	font-weight: bold;
	// 	// line-height: 40px;
	// 	padding: 0 20px 0 0;
	// 	-webkit-box-sizing: border-box;
	// 	box-sizing: border-box;
	// }
    .footer {
		margin-left: 45%;
		margin-top: 20px;
	}
    // /deep/ .el-form{
    //     display: flex;
    //     justify-content: center;
    // }
</style>
