<template>
	<div class="app-container">
  <!-- 81 81民政部涉外婚姻登记信息核验（双方）新-->
		<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="120px">
			<el-row>
				<el-col :span="24">
					<el-row>
						<el-col :span="8">
							<el-form-item label="身份证号(男方)" prop="cert_num_man">
								<el-input v-model="queryParams.cert_num_man" placeholder="请输入男方身份证件号码" style="width:265px;" clearable @keyup.enter.native="handleQuery" />
							</el-form-item>
						</el-col>
		        <el-col :span="8">
		        	<el-form-item label="姓名(男方)" prop="name_man">
		        		<el-input v-model="queryParams.name_man" placeholder="请输入男方姓名" style="width:265px;" clearable @keyup.enter.native="handleQuery" />
		        	</el-form-item>
		        </el-col>
            <el-col :span="8">
            	<el-form-item label="身份证号(女方)" prop="cert_num_woman">
            		<el-input v-model="queryParams.cert_num_woman" placeholder="请输入女方身份证件号码" style="width:265px;" clearable @keyup.enter.native="handleQuery" />
            	</el-form-item>
            </el-col>
					</el-row>
				</el-col>
				<el-col :span="24">
					<el-row>
            <el-col :span="8">
            	<el-form-item label="姓名(女方)" prop="name_woman">
            		<el-input v-model="queryParams.name_woman" placeholder="请输入女方姓名" style="width:265px;" clearable @keyup.enter.native="handleQuery" />
            	</el-form-item>
            </el-col>
           <el-col :span="5" style="text-align: center;">
           	<el-form-item>
           		<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">查询</el-button>
           		<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
           	</el-form-item>
           </el-col>
					</el-row>
				</el-col>
			</el-row>
		</el-form>


		<el-table  v-loading="loading" :data="infoList" @selection-change="handleSelectionChange" stripe style="width: 100%" :height="tableMaxHeight">
			<el-table-column type="selection" width="55" align="center" />
			<el-table-column label="姓名" align="center" prop="userName" fixed width="100"/>
			<el-table-column label="联系方式" align="center" prop="phoneNum" width="110" />
			<el-table-column label="身份证号码" align="center" prop="idCard"  />
		</el-table>

		<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />






	</div>
</template>

<script>
import {listRoleergth } from '@/api/system/residentss';
import { listInfo,listInfoch, getInfo, delInfo, addInfo, updateInfo, exportInfo, listRoleer, idces, delInfort,yiaoe,exportConfig,exportConfigtyr,importLog,delInfohy,listRoleergthwg } from '@/api/bdc/marriage';
import { treeselect } from '@/api/system/dept';
import Treeselect from '@riophae/vue-treeselect';
import { getToken } from '@/utils/auth';
import '@riophae/vue-treeselect/dist/vue-treeselect.css';
export default {
	name: 'Info',
	components: { Treeselect },
	data() {
		return {
			// 遮罩层
			loading: false,
			// 选中数组
			ids: [],
      id:'fg',
      idsg:'gh',
			// 非单个禁用
			single: true,
			// 非多个禁用
			multiple: true,
			// 显示搜索条件
			showSearch: true,
			// 总条数
			total: 0,
      ruleshy:{},
     // 疫苗信息表格数据
     infoList: [],
			process: process.env.VUE_APP_BASE_API,
			// 查询参数
			queryParams: {
				pageNum: 1,
				pageSize: 10,
				cert_num_man: '',
				name_man: '',
				name_woman: '',
				cert_num_woman: '',
			},
      nhykis:true,
      nhyki:false,
      nhduesw:0,
			// 表单参数
			form: {
				nowIn: '',
				age:'',
				code:'',

			},
      nbdgywkajs:false,
      // 用户导入参数
      upload: {
        // 是否显示弹出层（用户导入）
        opens: false,
        // 弹出层标题（用户导入）
        title: "",
        // 是否禁用上传
        isUploading: false,
        // 是否更新已经存在的用户数据
        updateSupport: 0,
        // 设置上传的请求头部
        headers: { Authorization: "Bearer " + getToken() },
        // 上传的地址
        url: process.env.VUE_APP_BASE_API + "/boman-web-core/file/common/importYmjz"
      },
			// 表单校验
			rules: {
      },
			imashow: false,
			naneme: false,
			shouwes: false,
			shouwestwo:false,
			villageTownshy: undefined,
			naiseurya: '',
			hsuej: '',
		};
	},
	created() {
		// this.getList();
    window.onresize = () => {
                    this.changeTableMaxHeight()
                  }
                  this.changeTableMaxHeight()
	},
	mounted() {
		console.log(136)
    window.onresize = () => {
                    this.changeTableMaxHeight()
                  }
                  this.changeTableMaxHeight()
	},
	methods: {
    nhyeosdsef(){
     console.log(234)
    },

		dakousr() {
			console.log(2345);
		},


		/** 查询疫苗信息列表 */
		getList() {
			this.loading = true;
			listInfo(this.queryParams).then(response => {
				this.infoList = response.rows;
        this.nbdgywkajs = true
				this.total = response.total;
				this.loading = false;
			});
		},
    getListch() {
    	this.loading = true;
    	listInfoch(this.queryParams).then(response => {
    		this.infoList = response.rows;
        this.nbdgywkajs = true
    		this.total = response.total;
    		this.loading = false;
    	});
    },
		getToken() {
			return getToken();
		},
		getTreeselectjue() {
			this.loading = true;
      let pids = {}
      pids.pid = 0
			listRoleer().then(response => {
				this.options = response.data;
				this.loading = false;
			});
		},
    // 统计数据
    getTreeselectjuetj() {
    	this.loading = true;
      listInfotj().then(response => {
        this.dneyhsd =  response.data
        this.loading = false;
      });
    },

		// 取消按钮
		cancel() {
			this.opens = false;
			this.jiezhong = false;
			this.imashow = false;
      this.nhyesfx = false
      this.errorlog=false;
      this.$refs['myCascaderf' + '' + this.nameutaiL][0].$refs.panel.clearCheckedNodes()
			this.reset();
		},

		// 表单重置
		reset() {
			this.form = {
				id: null,
				age:'',
				code:'',
				houseType: null,
				domicile: null,
				province: null,
				city: null,
				region: null,
				userName: null,
				gender: null,
				idCard: null,
				phoneNum: null,
				keyIndustries: null,
				isVaccination: null,
				vaccinationPlace: null,
				contraindication: null,
				nowIn: '',
        gridId:null,
				remark: null,
        residenceTown:null,
        residenceVillage:null,
        czrkJzdzList: [
        	{
        		provinceId: '',
        		province: '',
        		deptId: '',
        		cityId: '',
        		city: '',
        		regionId:'',
        		region: '',
        		townId: '',
        		town: '',
        		villageId: '',
        		village: '',
        		nowIn:'',
            plaed:'请选择居住地址',
        		disableg:false,
            optiodne:[],
            seleted:[]
        	}
        ]
			};
			this.resetForm('form');
		},
		/** 搜索按钮操作 */
		handleQuery() {
			this.queryParams.pageNum = 1;
			console.log(this.queryParams)
        this.getList();
			// this.getList();
		},
		/** 重置按钮操作 */
		resetQuery() {
			this.nhue = false
			this.selectedtwo = []
			setTimeout( ()=>{
				this.nhue = true
			},100)
			this.queryParams.cert_num_man = '';
			this.queryParams.name_man = '';
			this.queryParams.name_woman = '';
      this.queryParams.cert_num_woman = ''
      this.queryParams.requestOrgCode = undefined
      this.queryParams.cityIdXjd = undefined
      this.queryParams.regionIdXjd = undefined
      this.queryParams.villageTownsIdXjd = undefined
      this.queryParams.villageIdXjd = undefined;
      this.queryParams.provinceId = undefined
      this.queryParams.cityId = undefined
      this.queryParams.regionId = undefined
      this.queryParams.villageTownsId = undefined
      this.queryParams.villageId = undefined
      this.listd = []
      this.lser = []
			this.resetForm('queryForm');
			this.handleQuery();
		},
		// 多选框选中数据
		handleSelectionChange(selection) {
			this.ids = selection.map(item => item.id);
			this.single = selection.length !== 1;
			this.multiple = !selection.length;
		},
    // 获取屏幕高度
   showFilterForm () {
                    this.filterActive = !this.filterActive
                    this.changeTableMaxHeight()
   },

    changeTableMaxHeight () {
                    let height = document.body.offsetHeight // 网页可视区域高度
                    // if (this.filterActive) {
                    //   this.tableMaxHeight = height - 320
                    // } else {
                      this.tableMaxHeight = height - 250
                    // }
                    console.log(height)
   },




	}
};
</script>
<style lang="scss">
  .placf {
    .el-input {
      .el-input__inner::placeholder{
        color: #333;
      }
      /* 谷歌 */
          .el-input__inner::-webkit-input-placeholder {
             color: #333;
          }
           /* 火狐 */
         .el-input__inner:-moz-placeholder {
              color: #333;
          }
           /*ie*/
         .el-input__inner:-ms-input-placeholder {
              color: #333;
          }
    }

  }
	.jdueuh{
		.el-form-item__label {
			width: 0px !important;
		}
		.el-form-item__content {
			margin-left: 10px !important;
			// width: 70%;
		}
	}
	.ijeuhdy{
		.el-form-item__label {
			width: 80px !important;
		}
		.el-form-item__content {
			margin-left: 80px !important;
			// width: 70%;
		}
	}
	.znshu{
		.el-form-item__label {
			width: 80px !important;
			// padding-left: 30px;
		}
		.el-form-item__content {
			margin-left: 80px !important;

			// width: 70%;
		}
		.el-input__inner{
			padding-left: 0 !important;
		}
	}
	.heioangd{
		.el-form-item__label {
			width: 70px !important;
		}
		.el-form-item__content {
			margin-left: 70px !important;
			// width: 70%;
		}
	}
.hues {
	.area-select {
		margin-left: 0 !important;
		margin-right: 10px;
	}
}
.jehak {
	.el-form-item {
		width: 100%;
	}
	.el-form-item__content {
		width: 60%;
	}
}
.oiuyty {
	.el-form-item__label {
		width: 80px !important;
	}
	.el-form-item__content {
		margin-left: 80px !important;
		// width: 70%;
	}
	input {
		padding-right: 0 !important;
	}
}
.el-dialog__body {
	padding-top: 0;
	padding-bottom: 0;
}
.jhy {
	// width: 100%;
	// .el-form-item__content {
	// 	width: 100%;
	// 	margin-left: 0 !important;
	// }
	.el-form-item__content {
		margin-left: 55px !important;
		// width: 70%;
	}
	.el-form-item__label {
		width: 55px !important;
	}
}
.ehiqya {
	.el-form-item__content {
		display: flex;
		.jdidur {
			flex: 1;
			margin-left: 10px;
			// text-align: left;
			display: flex;
		}
	}
	.upload-demo {
		display: flex;
	}
}
.jdoier{
	display: flex;
	align-items: center;
	.upload-demo {
		display: flex;
	}
}
.hueyde {
	width: 18px;
	height: 18px;
	margin: 0 5px;
	margin-right: 10px;
}
.hueydele {
	width: 15px;
	height: 18px;
}
.hyeoa {
	height: 100%;
	display: flex;
	align-items: center;
}
.hjdoecdre {
	// margin-top: 50%;
	transform: translateY(50%);
}
.ojhgy {
	.el-dialog {
		padding-bottom: 40px;
		padding-top: 10px;
	}
	.el-dialog__header {
		padding-bottom: 20px;
	}
	.el-table .cell {
		line-height: 50px;
	}
}
.hueya{
	margin-left: 0 !important;
}
.iejghiadh{
	.el-input__inner{
		padding-right: 0 !important;
		padding-left: 5px !important;
	}
}
</style>
