<template>
  <div class="app-container">
    <el-form style="background-color: #fff; padding: 15px 5px; border-radius:10px;"  :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
      <p class="bgtan" style="margin-top: 0;">搜索条件</p>
			<el-row>
				<el-col :span="8">
					<el-form-item label="身份证号" prop="idCard">
					        <el-input
					          v-model="queryParams.idCard"
					          placeholder="请输入身份证号"
					          clearable
					          @keyup.enter.native="handleQuery"
					        />
					</el-form-item>
				</el-col>
				<el-col :span="8">
					<el-form-item label="学号" prop="studentNumber">
					        <el-input
					          v-model="queryParams.studentNumber"
					          placeholder="请输入学号"
					          clearable
					          @keyup.enter.native="handleQuery"
					        />
					      </el-form-item>
				</el-col>
				<el-col :span="8">
					<el-form-item label="姓名" prop="name">
					        <el-input
					          v-model="queryParams.name"
					          placeholder="请输入姓名"
					          clearable
					          @keyup.enter.native="handleQuery"
					        />
					</el-form-item>
				</el-col>
				<el-col :span="8">
					<el-form-item label="班级名称" prop="classId">
							  <el-select v-model="queryParams.classId" placeholder="请选择班级名称">
							    <el-option
							      v-for="dict in kiuesegh"
							      :key="dict.deptId"
							      :label="dict.deptName"
							      :value="dict.deptId"
								  clearable
								  @keyup.enter.native="handleQuery"
							    ></el-option>
							  </el-select>
					</el-form-item>
				</el-col>

				<el-col :span="8">
					<el-form-item label="性别" prop="sex">
					        <el-select v-model="queryParams.sex" placeholder="请选择性别" clearable>
					          <el-option
					            v-for="dict in dict.type.xshsex"
					            :key="dict.value"
					            :label="dict.label"
					            :value="dict.value"
					          />
					        </el-select>
					      </el-form-item>
				</el-col>
				<el-col :span="6">
					<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-col :span="6">

				</el-col>
				<el-col :span="6">

				</el-col>
				<el-col :span="6">

				</el-col>
				<el-col :span="6">

				</el-col>
				<el-col :span="6">

				</el-col>
				<el-col :span="6">

				</el-col>
			</el-row>


    </el-form>
    <p class="bgtan" style="margin-top: 20px;margin-left: 10px;">学生档案信息</p>
    <el-row :gutter="10" class="mb8" style="  border-radius: 12px; background-color: #fff;margin: 0;margin-top: 20px;padding: 20px 5px; ">
     <!-- <p class="bgtan" style="margin-top: 0;">学生档案信息</p> -->
	  <!-- <el-col :span="1.5">
	          <el-button
	            type="primary"
	            plain
	            icon="el-icon-plus"
	            size="mini"
	            @click="handleAdd"
	            v-hasPermi="['score:data:add']"
	          >新增</el-button>
	        </el-col> -->
			<el-col :span="1.5">
			       <el-button
			         type="primary"
			         plain
			         icon="el-icon-plus"
			         size="mini"
			         @click="handleAddfjs"
			         v-hasPermi="['score:data:add']"
			       >防溺水计划</el-button>
			     </el-col>
	       <!-- <el-col :span="1.5">
	          <el-button
	            type="success"
	            plain
	            icon="el-icon-edit"
	            size="mini"
	            :disabled="single"
	            @click="handleUpdate"
	            v-hasPermi="['student:info:edit']"
	          >修改</el-button>
	        </el-col> -->
	       <!-- <el-col :span="1.5">
	          <el-button
	            type="danger"
	            plain
	            icon="el-icon-delete"
	            size="mini"
	            :disabled="multiple"
	            @click="handleDelete"
	            v-hasPermi="['student:info:remove']"
	          >删除</el-button>
	        </el-col> -->
	        <el-col :span="1.5">
	          <el-button
	            type="warning"
	            plain
	            icon="el-icon-download"
	            size="mini"
	            @click="handleExport"
	            v-hasPermi="['student:info:export']"
	          >导出</el-button>
			  </el-col>
      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
    </el-row>
     <div class="ngtes" style="background-color: #fff;  border-bottom-left-radius: 12px; border-bottom-right-radius: 12px;">
		<!-- <el-table  :max-height="tableMaxHeight"  v-loading="loading" :data="infoList" @selection-change="handleSelectionChange">
		  <el-table-column type="selection" width="55" align="center" />
		  <el-table-column type="expand">
		        <template slot-scope="props">
		          <el-form label-position="left" inline class="demo-table-expand">
		            <el-form-item label="身高">
		              <span class="ngr">{{ props.row.politicalStatus }}</span>
		            </el-form-item>
					<el-form-item label="留守儿童">
					  <span class="ngr">
					  <dict-tag :options="dict.type.isjinshi" :value="props.row.isLset"/>
					  </span>
					</el-form-item>
					<el-form-item label="是否贫困">
					  <span class="ngr">
					  <dict-tag :options="dict.type.isjinshi" :value="props.row.isPoverty"/>
					  </span>
					</el-form-item>
					<el-form-item label="是否近视">
					  <span ><dict-tag :options="dict.type.isjinshi" :value="props.row.isNearsightedness"/></span>
					</el-form-item>
					<el-form-item label="近视度数">
					  <span class="ngr">{{ props.row.degreeMyopia }}</span>
					</el-form-item>
					<el-form-item label="心理状况">
					  <span class="ngr">{{ props.row.mind }}</span>
					</el-form-item>
					<el-form-item label="心理描述">
					  <span class="ngr">{{ props.row.psychologicalDescription }}</span>
					</el-form-item>
					<el-form-item label="体重">
					  <span class="ngr">{{ props.row.weight }}</span>
					</el-form-item>
		            <el-form-item label="过往病史">
		              <span class="ngr">{{ props.row.mind }}</span>
		            </el-form-item>
		            <el-form-item label="父亲姓名">
		              <span class="ngr">{{ props.row.fatherName }}</span>
		            </el-form-item>
		            <el-form-item label="联系方式">
		              <span class="ngr">{{ props.row.fatherTelephone }}</span>
		            </el-form-item>
		            <el-form-item label="母亲姓名">
		              <span class="ngr">{{ props.row.motherName }}</span>
		            </el-form-item>
		            <el-form-item label="联系方式">
		              <span class="ngr">{{ props.row.motherTelephone }}</span>
		            </el-form-item>
					<el-form-item label="血型">
					  <span class="ngr">{{ props.row.bloodType }}</span>
					</el-form-item>
		            <el-form-item label="居住地址" style="width:35%;">
		              <span class="ngr">{{ props.row.address }}</span>
		            </el-form-item>
		          </el-form>
		        </template>
		      </el-table-column>
			<el-table-column label="身份证号" align="center" prop="idCard" width="170"/>
			<el-table-column label="姓名" align="center" prop="name" width="100" />
		  <el-table-column label="年龄" align="center" prop="age" />
			<el-table-column label="性别" align="center" prop="sex">
			        <template slot-scope="scope">
			          <dict-tag :options="dict.type.xshsex" :value="scope.row.sex"/>
			        </template>
			</el-table-column>
			<el-table-column label="政治面貌 " align="center" prop="politicalStatus" >
			<template slot-scope="scope">
			         {{scope.row.politicalStatus}}
			</template>
			</el-table-column>
			<el-table-column label="健康状况" align="center" prop="health" >
			<template slot-scope="scope">
			          {{scope.row.health}}
			</template>
			</el-table-column>
			<el-table-column label="学号" align="center" prop="studentNumber" />
			<el-table-column label="证件照"  align="center" prop="identificationPhoto" width="100">
			        <template slot-scope="scope">
			          <image-preview :src="scope.row.identificationPhoto" :width="50" :height="50"/>
			        </template>
			      </el-table-column>
			      <el-table-column  label="门禁照" align="center" prop="entrancePermit" width="100">
			        <template slot-scope="scope">
			          <image-preview :src="scope.row.entrancePermit" :width="50" :height="50"/>
			        </template>
			      </el-table-column>
		  <el-table-column  label="操作" align="center" class-name="small-padding fixed-width" width="120">
		    <template slot-scope="scope">
		      <el-button
		        size="mini"
		        type="text"
		        style="background: #00B034;color: #FFF;padding: 7px;"
		        @click="handleUpdate(scope.row)"
		        v-hasPermi="['student:info:edit']"
		      >修改</el-button>
		      <el-button
		        size="mini"
		        type="text"
		        style="background: red;color: #FFF;padding: 7px;"
		        @click="handleDelete(scope.row)"
		        v-hasPermi="['student:info:remove']"
		      >删除</el-button>
		    </template>
		  </el-table-column>
		</el-table>

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

   <!-- <div style="margin-top: 17px; display: flex;justify-content: flex-start;align-items: center;flex-wrap: wrap;"> -->
     <el-row :gutter="20" style="margin: 0;margin-top: 17px; " v-if="infoList.length !=0" >
       <el-col :span="6"  v-for="(item,index) in infoList" :key="index">
        <div style="background-color: #fff;border-radius: 4px;padding: 15px;padding-bottom: 0; margin-bottom: 16px;">
          <div class="tongty">
            <!-- <img :src=" item.identificationPhoto== null?'../../../assets/images/pic_ryxx_tx_ns.png' : defaultSettings + ijsget+item.identificationPhoto" alt="" style="width: 48px; height: 48px;"> -->
             <image-preview :src="item.identificationPhoto" :width="48" :height="48"/>
            <p style="font-weight: bold;font-size: 16px;font-size: 16px;color: #161616;margin-left: 18px;">{{item.name == null?'暂无数据' : item.name == ""? '暂无数据' : item.name }}</p>
            <span style="font-weight: 500;font-size: 14px;color: #666666;margin-left: 16px;">{{item.age == null?'暂无数据' : item.age == ""? '暂无数据' : item.age }}岁</span>
            <span style="font-weight: 500;font-size: 14px;color: #666666;margin-left: 7px;">{{item.sex == 1?'男' : '女' }}</span>
          </div>
          <div class="psnge">
            <p style="margin-top: 16px;"><span>{{"学\u2003\u2003号："}}</span> <span> {{item.studentNumber == null?'暂无数据' : item.studentNumber == ""? '暂无数据' : item.studentNumber }}</span></p>
            <p><span>身份证号：</span> <span>{{item.idCard == null?'暂无数据' : item.idCard == ""? '暂无数据' : item.idCard }}</span></p>
            <p><span>健康状态：</span> <span>{{item.health == null?'暂无数据' : item.health == ""? '暂无数据' : item.health }}</span></p>
            <div class="tongty" style="justify-content: space-between;">
              <p style="overflow: hidden;text-overflow:ellipsis;white-space:nowrap; width: 50%;"><span>政治面貌：</span>
              <el-tooltip class="item" effect="dark" :content="item.politicalStatus" placement="top-start">
               <span>{{item.politicalStatus == null?'无数据' : item.politicalStatus == ""? '无数据' : item.politicalStatus }}</span>
              </el-tooltip>
               </p>
              <p style="display: flex;align-items: center; width: 50%;"><span>门禁照片：</span> <image-preview :src="item.entrancePermit" :width="30" :height="30"/></p>
            </div>
          </div>
          <div class="bortt tongty" style="justify-content: space-between;">
            <p ><span  v-hasPermi="['student:info:edit']" @click="handleUpdate(item)">修改</span>  <span @click="handleUpdatef(item)">查看</span></p>
            <p v-hasPermi="['student:info:remove']" style="border-left: 1px solid #DADADA;color:red">删除</p>
          </div>
        </div>
       </el-col>
     </el-row>



   <!-- </div> -->
   <div style="padding: 20px ; background-color: #fff; padding-top: 1px;" class="ingwe" v-if="infoList.length !=0">
     <pagination
       v-show="total>0"
       :total="total"
       :page.sync="queryParams.pageNum"
       :limit.sync="queryParams.pageSize"
       @pagination="getList"/>
   </div>

   <div v-if="infoList.length ==0" style="text-align: center;margin: 40px 0;">
      <img src="../../../assets/images/pic_xyht_zwsj.png" alt="">
   </div>



    <!-- 添加或修改注册-老师-班级（学科）对话框 -->
    <el-dialog :title="title" :visible.sync="open" width="97%" append-to-body>
      <el-form ref="form" :model="form" :rules="rules" label-width="90px">
        <!-- <el-form-item label="老师id" prop="teacherId">
          <el-input v-model="form.teacherId" placeholder="请输入老师id" />
        </el-form-item> -->
		<el-row>
			<el-col :span="8">
				 <!-- <el-form-item label="学校名称" prop="schoolId">
				  					  <el-select :disabled="fku"  style="width: 100%;"   v-model="form.schoolId" placeholder="请选择学校名称">
				  					    <el-option
				  					      v-for="dict in deptOptions"
				  					      :key="dict.deptId"
				  					      :label="dict.deptName"
				  					      :value="dict.deptId"
				  						  @click.native="mjyhes(dict)"
				  					    ></el-option>
				  					  </el-select>
				  </el-form-item> -->
			</el-col>
			<el-col :span="4">
				  <el-form-item label="班级名称" prop="classId">
				  <el-select style="width: 100%;" v-model="form.classId" placeholder="请选择班级名称">
				    <el-option
				      v-for="dict in kiuesegh"
				      :key="dict.deptId"
				      :label="dict.deptName"
				      :value="dict.deptId"
				  	@click.native="mjyhess(dict)"
				    ></el-option>
				  </el-select>
				  </el-form-item>
			</el-col>

			<el-col :span="4">
				<el-form-item label="姓名" prop="name">
					<el-select style="width: 100%;" filterable v-model="form.name" placeholder="请选择学生名称">
					  <el-option
					    v-for="dict in infoListstu"
					    :key="dict.id"
					    :label="dict.studentName"
					    :value="dict.studentName"
						@click.native="mjyhesstu(dict)"
					  ></el-option>
					</el-select>
				          <!-- <el-input v-model="form.name" placeholder="请输入姓名" /> -->
				</el-form-item>
			</el-col>
			<el-col :span="5">
				<el-form-item label="身份证号" prop="idCard">
				          <el-input @blur="idcde" v-model="form.idCard" placeholder="请输入身份证号" />
				</el-form-item>
			</el-col>
			<el-col :span="4">
				<el-form-item label="学校" prop="school">
					<el-select   style="width: 100%;"   v-model="form.school" placeholder="请选择学校名称">
					  <el-option
					    v-for="dict in deptOptions"
					    :key="dict.deptId"
					    :label="dict.deptName"
					    :value="dict.deptName"
						@click.native="mjyhes(dict)"
					  ></el-option>
					</el-select>
				          <!-- <el-input v-model="form.school" placeholder="请输入学校" /> -->
				</el-form-item>
			</el-col>
			<el-col :span="3">
				<el-form-item label="年龄" prop="age">
				          <el-input v-model="form.age" placeholder="请输入年龄" />
				</el-form-item>
			</el-col>

			<el-col :span="4">
				<el-form-item label="性别" prop="sex">
					<el-select v-model="form.sex" placeholder="请选择性别" clearable>
					  <el-option
					    v-for="dict in dict.type.xshsex"
					    :key="dict.value"
					    :label="dict.label"
					    :value="dict.value"
					  />
					</el-select>
				</el-form-item>
			</el-col>
			<el-col :span="24">
				<el-col :span="4">
					<el-form-item label="学号" prop="studentNumber">
					          <el-input v-model="form.studentNumber" placeholder="请输入学号" />
					</el-form-item>
				</el-col>
				<el-col :span="4">
					<el-form-item label="身高(CM)" prop="height">
					          <el-input disabled v-model="form.height" placeholder="请输入身高" />
					        </el-form-item>
				</el-col>
				<el-col :span="5">
					<el-form-item label="父亲" prop="fatherName">
					          <el-input v-model="form.fatherName" placeholder="请输入父亲" />
					        </el-form-item>
				</el-col>
				<el-col :span="4">
					<el-form-item label="联系方式" prop="fatherTelephone">
					          <el-input v-model="form.fatherTelephone" placeholder="请输入父亲联系方式" />
					</el-form-item>
				</el-col>
				<el-col :span="3">
					<el-form-item label="体重(KG)" prop="weight">
					          <el-input disabled v-model="form.weight" placeholder="请输入体重" />
					        </el-form-item>
				</el-col>
				<el-col :span="4">
					<el-form-item label="血型" prop="bloodType">
					        <el-select disabled v-model="form.bloodType" placeholder="请选择血型" clearable>
					          <el-option
					            v-for="dict in dict.type.blood_type"
					            :key="dict.value"
					            :label="dict.label"
					            :value="dict.label"
					          />
					        </el-select>
					</el-form-item>
				</el-col>

			</el-col>

			<el-col :span="24">
				<el-col :span="4">
					<el-form-item label="母亲" prop="motherName">
					          <el-input v-model="form.motherName" placeholder="请输入母亲" />
					        </el-form-item>
				</el-col>
				<el-col :span="4">
					<el-form-item label="联系方式" prop="motherTelephone">
					          <el-input  v-model="form.motherTelephone" placeholder="请输入母亲联系方式" />
					</el-form-item>
				</el-col>
				<el-col :span="5">
					<el-form-item label="政治面貌" prop="politicalStatus">
						<el-select v-model="form.politicalStatus" placeholder="请选择政治面貌" clearable>
						  <el-option
						    v-for="dict in dict.type.political_outlook"
						    :key="dict.value"
						    :label="dict.label"
						    :value="dict.label"
						  />
						</el-select>
				</el-form-item>
				</el-col>
				<el-col :span="4">
					<el-form-item label="心理状态" prop="mind">
						<el-select disabled v-model="form.mind" placeholder="请选择心理状态" clearable>
						  <el-option
						    v-for="dict in dict.type.psychology"
						    :key="dict.value"
						    :label="dict.label"
						    :value="dict.label"
						  />
						</el-select>
				</el-form-item>
				</el-col>
				<el-col :span="3">
					<el-form-item label="是否贫困" prop="isPoverty">
						<el-select v-model="form.isPoverty" placeholder="请选择是否贫困" clearable>
						  <el-option
						    v-for="dict in dict.type.isjinshi"
						    :key="dict.value"
						    :label="dict.label"
						    :value="dict.value"
						  />
						</el-select>
				</el-form-item>
				</el-col>
				<el-col :span="4">
				 <el-form-item label="心理描述" prop="psychologicalDescription">
				           <el-input disabled v-model="form.psychologicalDescription"  placeholder="请输入心里健康描述" />
				</el-form-item>
				</el-col>



			</el-col>
			<el-col :span="24">
				<el-col :span="4">
					<el-form-item label="健康状态" prop="health">
						<el-select style="width;100%;" v-model="form.health" placeholder="请选择健康状态" clearable>
						  <el-option
						    v-for="dict in dict.type.health_status"
						    :key="dict.value"
						    :label="dict.label"
						    :value="dict.label"
						  />
						</el-select>
				</el-form-item>
				</el-col>
				<el-col :span="4">
					<el-form-item label="近视" prop="isNearsightedness">
						<el-select @change="ngekusfd" v-model="form.isNearsightedness" placeholder="请选择是否近视" clearable>
						  <el-option
						    v-for="dict in dict.type.isjinshi"
						    :key="dict.value"
						    :label="dict.label"
						    :value="dict.value"
						  />
						</el-select>
				</el-form-item>
				</el-col>
				<el-col :span="5">
					<el-form-item label="远视" prop="isFarsightedness">
						<el-select @change="ngekusfdf" v-model="form.isFarsightedness" placeholder="请选择是否远视" clearable>
						  <el-option
						    v-for="dict in dict.type.isjinshi"
						    :key="dict.value"
						    :label="dict.label"
						    :value="dict.value"
						  />
						</el-select>
				</el-form-item>
				</el-col>
				<!-- v-if="uhgte" -->
				<el-col :span="4" >
					<el-form-item label="近视度数" prop="degreeMyopia">
						<el-input :disabled="uhgte" type="number" v-model="form.degreeMyopia" placeholder="请输入度数" />
				</el-form-item>
				</el-col>
				<el-col :span="3" >
					<el-form-item label="远视度数" prop="farsightedness">
						<el-input :disabled="uhgte" type="number" v-model="form.farsightedness" placeholder="请输入度数" />
				</el-form-item>
				</el-col>
				<el-col :span="4">
					<el-form-item label="留守儿童" prop="isLset">
						<el-select v-model="form.isLset" placeholder="请选择留守儿童" clearable>
						  <el-option
						    v-for="dict in dict.type.isjinshi"
						    :key="dict.value"
						    :label="dict.label"
						    :value="dict.value"
						  />
						</el-select>
				</el-form-item>
				</el-col>




			</el-col>
			<el-col :span="24">
				<el-col :span="4">
				 <el-form-item label="备注" prop="remark">
				           <el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
				         </el-form-item>
				</el-col>
				<el-col :span="4">
				 <el-form-item label="民族" prop="familyName">
				           <el-input   v-model="form.familyName" placeholder="民族" />
				 </el-form-item>
				</el-col>

				<el-col :span="5">
				 <el-form-item label="紧急联系人" prop="emergencyContact">
				           <el-input  v-model="form.emergencyContact" placeholder="紧急联系人" />
				         </el-form-item>
				</el-col>
				<el-col :span="4">
				 <el-form-item label="联系方式" prop="emergencyContactTelephone">
				           <el-input   v-model="form.emergencyContactTelephone" placeholder="联系方式" />
				         </el-form-item>
				</el-col>
				<el-col :span="3">
					<el-form-item label="过往病史" prop="isMedicalHistory">
						<el-select  v-model="form.isMedicalHistory" placeholder="请选择是否有过往病史" clearable>
						  <el-option
						    v-for="dict in dict.type.isjinshi"
						    :key="dict.value"
						    :label="dict.label"
						    :value="dict.value"
						  />
						</el-select>
				</el-form-item>
				</el-col>
				<el-col :span="4">
					<el-form-item label="病史描述" prop="medicalDescription">
						 <el-input  v-model="form.medicalDescription"  placeholder="病史描述" />
				</el-form-item>
				</el-col>
			</el-col>











			<!-- <el-col :span="6">
				<el-form-item label="右眼" prop="motherTelephone">
					<el-select v-model="form.motherTelephone" placeholder="请选择是否近视" clearable>
					  <el-option
					    v-for="dict in dict.type.political_outlook"
					    :key="dict.value"
					    :label="dict.label"
					    :value="dict.label"
					  />
					</el-select>
			</el-form-item>
			</el-col> -->



			<el-col :span="24">
				<el-form-item label="居住地址" prop="address">
				          <!-- <el-input v-model="form.address" placeholder="请输入居住地址" /> -->
						  <baidu-map :center="mapCenter" :zoom="11" @click ="getLocationPoint"  class="iuey" :scroll-wheel-zoom="true" :autoViewport="true">
						           <bm-view class="bm-view"></bm-view>
						             <bm-control :offset="{width: '10px', height: '10px'}">
									<bm-geolocation anchor="BMAP_ANCHOR_BOTTOM_RIGHT" :showAddressBar="true" :autoLocation="true"></bm-geolocation>
						      <!-- <bm-auto-complete v-model="form.address" :sugStyle="{zIndex: 99}"> -->
						        <!-- <el-input placeholder="请输入地名关键字" v-model="form.address" @blur = "boiu" @focus= "faie"></el-input>  -->

						      <!-- <search-field placeholder="请输入地名关键字"></search-field>  -->
						      <!-- 这里指代一个自定义搜索框组件 -->
						      <!-- </bm-auto-complete> -->
						       <el-autocomplete
						        v-model="form.address"
						        :fetch-suggestions="querySearch"
						        placeholder="请输入详细地址"
						        style="width: 100%"
						        :trigger-on-focus="false"
						        @select="handleSelect"
								@blur="handleSelectb"
						      />
						    </bm-control>
						    <!-- <bm-local-search :keyword="form.address" :auto-viewport="true" class="pui" @searchcomplete = "oieueo" v-show="okuyt" @confirm= "confirmf" :location="location" ></bm-local-search>  :panel ="false"-->
						    <bm-local-search :keyword="form.address" :auto-viewport="true" :location="location" :forceLocal="true" :pageCapacity = "20" @searchcomplete ="oieueo"  @markersset = "confirmf" :panel ="false" ></bm-local-search>
						  </baidu-map>
				</el-form-item>
			</el-col>

			<el-col :span="12">
				<el-form-item label="证件照" prop="identificationPhoto">
				          <image-upload v-model="form.identificationPhoto"/>
				        </el-form-item>
			</el-col>
			<el-col :span="12">
				<el-form-item label="门禁照" prop="entrancePermit">
				          <image-upload v-model="form.entrancePermit"/>
				        </el-form-item>
			</el-col>


		</el-row>
        <!-- <el-form-item label="班级id" prop="classId">
          <el-input v-model="form.classId" placeholder="请输入班级id" />
        </el-form-item> -->

      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitForm" v-if="isth == true">确 定</el-button>
        <el-button @click="cancel">取 消</el-button>
      </div>
    </el-dialog>

	<el-drawer
	  title="历史信息"
	  :visible.sync="drawer"
	  size="56%">
	  <div>
		 <pie-charts :chart-data="beach" v-if="ngtzh" />
		 <pie-chartss :chart-data="beach" v-if="ngshg" />
		  <steps :data="lishilist" :Index="5"></steps >
	  </div>


	  <div>
	   <!-- <el-button @click="innerDrawer = true">打开里面的!</el-button> -->

	  </div>
	</el-drawer>

	<el-drawer
	  title="历史信息"
	  :append-to-body="true"
	  :visible.sync="innerDrawer">
	  <el-card shadow="hover" class="box-card" v-for="(o,index) in lishilist" :key="o.id">
	    <div  class="text item">
	        <!-- {{'列表内容 ' + o }} -->
	  	  <p style="color:#aaa;">{{o.updateTime}}</p>
	  	  <el-divider></el-divider>
	  	  <p><span>政治面貌:</span>{{o.politicalStatus}}</p>
	  	  <p><span>是否近视:</span>{{o.isNearsightedness == '1' ?'是' : o.isNearsightedness == '2'?'否':'暂无数据'}}</p>
	  	  <p><span>近视度数:</span>{{o.degreeMyopia == null ?'暂无数据': o.degreeMyopia }}</p>
	  	  <p><span>身高体重:</span>{{o.height == null ?'暂无数据': o.height }} CM/{{o.weight == null ?'暂无数据': o.weight }} KG</p>
		  <p><span>心理状态:</span>{{o.health == null ?'暂无数据': o.health }}</p>
		  <p><span>心理健康描述:</span>最近孩子遇到伤心事，心情不佳，望老师多 给予关心和帮助，谢谢。</p>
	    </div>
	  </el-card>
	</el-drawer>



  </div>
</template>

<script>
import PieCharts from './../../dashboard/PieCharts'
import PieChartss from './../../dashboard/PieChartss'
import { listInfo, listInfostu,getInfo, delInfo, addInfo, updateInfo,listInfols,listInfolss } from "@/api/zhihuixy/info";
import { listDepts,listDeptode} from "@/api/system/dept";
import {regionData,CodeToText} from 'element-china-area-data'
const defaultSettings = require("@/settings.js");
const lineChartData = {
  newVisitis: {
    expectedData: [100, 120, 161, 134, 105, 160, 165],
    actualData: [120, 82, 91, 154, 162, 140, 145]
  },
  messages: {
    expectedData: [200, 192, 120, 144, 160, 130, 140],
    actualData: [180, 160, 151, 106, 145, 150, 130]
  },
  purchases: {
    expectedData: [80, 100, 121, 104, 105, 90, 100],
    actualData: [120, 90, 100, 138, 142, 130, 130]
  },
  shoppings: {
    expectedData: [130, 140, 141, 142, 145, 150, 160],
    actualData: [120, 82, 91, 154, 162, 140, 130]
  }
}
export default {
  name: "Info",
  dicts: ['xshsex','political_outlook','isjinshi','health_status','psychology','blood_type'],
  components: {
    PieCharts,
	PieChartss
  },
  data() {
    return {

		stepInfo: {
		        list: [
		          {
		            status: '1',
		            title: '步骤条1',
		            description: '2021年7月7日'
		          },
		          {
		            status: '2',
		            title: '步骤条2',
		            description: '2021年11月19日'
		          },
		          {
		            status: '3',
		            title: '步骤条3',
		            description: '2021年12月31日'
		          },
		          {
		            status: '4',
		            title: '步骤条4',
		            description: '2022年4月19日'
		          },
		          {
		            status: '5',
		            title: '步骤条5',
		            description: '2022年5月1日'
		          },
		          {
		            status: '6',
		            title: '步骤条6',
		            description: '2022年5月1日'
		          },

		        ],
		        step: 14
		      },
      // 遮罩层
      loading: true,
      ijsget:process.env.VUE_APP_BASE_API,
	  lineChartData: lineChartData.newVisitis,
    defaultSettings:defaultSettings,
      // 选中数组
      ids: [],
      // 非单个禁用
      single: true,
      // 非多个禁用
      multiple: true,
      // 显示搜索条件
      showSearch: true,
      // 总条数
      total: 0,
	  tableMaxHeight:400,
      // 学生档案信息表格数据
      infoList: [],
      // 弹出层标题
      title: "",
      // 是否显示弹出层
      open: false,
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 8,
        studentId: null,
        name: null,
        sex: null,
        age: null,
        school: null,
        studentNumber: null,
        idCard: null,
        height: null,
        weight: null,
        bloodType: null,
        politicalStatus: null,
        identificationPhoto: null,
        entrancePermit: null,
        fatherName: null,
        fatherTelephone: null,
        motherName: null,
        motherTelephone: null,
        address: null,
		params:{
		}
      },
      // 表单参数
      form: {},
	  drawer:false,
	  innerDrawer:false,
      // 表单校验
      rules: {
		  // classId: [
		  //   { required: true, message: "不能为空", trigger: "blur" }
		  // ],

		  name: [
		    { required: true, message: "不能为空", trigger: "blur" }
		  ],
		  sex: [
		    { required: true, message: "不能为空", trigger: "blur" }
		  ],


      },
	  kiuesegh:[],
	   kiueseghs:[],
	   options: regionData,
	     selectedOptions: [],
	     addtions:{},			//存储地址数据
	     namestwo:[],
	      keyword: '',
	   mapZoom: 15,
	   mapCenter: '潜山市',
	   mapLocation: {
	     address: undefined,
	     coordinate: undefined
	   },
	   okuyt:true,
	   nameadd:[],
	   kdourg:[{'value':'抱歉，没有搜索到位置请重新输入'}],
	   location:'',
	   pageCapacitys:20,
	   cb:undefined,
	   nameadd:[],
	   listInfostucs:{
		   params:{}
	   },
	   infoListstu:[],
	   deptOptions:[],
	   uhgte:false,
	   lishilist:[],
	   beach:{},
	   hgdtesge:{},
	   ngshg:false,
	   ngtzh:false,
     isth:false
    };
  },
  created() {
		window.onresize = () => {
		          this.changeTableMaxHeight()
		        }
		        this.changeTableMaxHeight()
    this.getList();
	this.getdept(0)
  },
	mounted() {
		 window.onresize = () => {
		           this.changeTableMaxHeight()
		         }
		         this.changeTableMaxHeight()
	},
  methods: {

	  // 查询历史档案信息
       getlihgw(val){
		 this.loading = true;
		 let he={}
		 he.studentId = val
		 // this.listInfostucs.classId = val
		 // this.ngshg = false,
		 // this.ngtzh = true,
		 listInfols(he).then(response => {
		   this.lishilist = response.rows;
		   this.loading = false;
		 });
	   },
		   getlihgws(val){
		   		 this.loading = true;
		   		 let he={}
		   		 he.studentId = val
		   		 // this.listInfostucs.classId = val
		   		 listInfolss(he).then(response => {
		   		   this.beach = response.data;
				   // this.hgdtesge.x = this.beach[0]
				   // this.hgdtesge.y = this.beach[0]
				   // this.hgdtesge.x = this.beach[0]
		   		   this.loading = false;
		   		 });
		   },

	  /** 查询学生档案信息列表 */
	  getListuye(val) {
	    this.loading = true;
		this.listInfostucs.params.role=this.roleqh()
		this.listInfostucs.classId = val
	    listInfostu(this.listInfostucs).then(response => {
	      this.infoListstu = response.rows;
	      this.loading = false;
	    });
	  },
	  getdept(val){
	  		  let kuesf=  {'parentId':val}
	  		  // this.kiuesegh = []
	  			  console.log(kuesf)
	  		listDeptode(kuesf).then(response => {
	  		  this.deptOptions = this.handleTree(response.data, "deptId");
	  		  this.deptOptions.filter(rou =>{
	  			  if(rou.children != undefined){
	  			  	rou.children.filter(rour =>{
	  			  					  this.kiuesegh.push(rour)
	  			  	})
	  			  }
	  			  // this.kiuesegh = rou.children
	  			  // this.kiuesegh.push(rou.children)
	  			  console.log(rou.children)
	  		  })
	  		  this.kiueseghs = this.kiuesegh
	  		  // this.deptOptions = response.data
	  		  console.log(this.kiuesegh)
	  		});
	  },

    /** 查询学生档案信息列表 */
    getList() {
      this.loading = true;
	  this.queryParams.params.role=this.roleqh()
      listInfo(this.queryParams).then(response => {
        this.infoList = response.rows;
        this.total = response.total;
        this.loading = false;
      });
    },
    // 取消按钮
    cancel() {
      this.open = false;
      this.reset();
    },
    // 表单重置
    reset() {
      this.form = {
        id: null,
        studentId: null,
        name: null,
        sex: null,
        age: null,
        school: null,
        studentNumber: null,
        idCard: null,
        height: null,
        weight: null,
        bloodType: null,
        politicalStatus: null,
        identificationPhoto: null,
        entrancePermit: null,
        fatherName: null,
        fatherTelephone: null,
        motherName: null,
        motherTelephone: null,
        address: null,
        createBy: null,
        createTime: null,
        updateBy: null,
        updateTime: null,
        remark: null
      };
      this.resetForm("form");
    },
    /** 搜索按钮操作 */
    handleQuery() {
      this.queryParams.pageNum = 1;
      this.getList();
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.resetForm("queryForm");
      this.handleQuery();
    },
    // 多选框选中数据
    handleSelectionChange(selection) {
      this.ids = selection.map(item => item.id)
      this.single = selection.length!==1
      this.multiple = !selection.length
    },
    /** 新增按钮操作 */
    handleAdd() {
      this.reset();
      this.open = true;
      this.title = "添加学生档案信息";
	  this.mapCenter = '潜山市'
    },
    /** 修改按钮操作 */
    handleUpdate(row) {
      this.reset();
      const id = row.id || this.ids
      getInfo(id).then(response => {
        this.form = response.data;
		if(this.form.isNearsightedness == '1'){
			this.uhgte =  false
		}else {
			this.uhgte =  true
		}
        this.open = true;
        this.isth = true
        this.title = "修改学生档案信息";
      });
    },
    handleUpdatef(row) {
      this.reset();
      const id = row.id || this.ids
      getInfo(id).then(response => {
        this.form = response.data;
    if(this.form.isNearsightedness == '1'){
    	this.uhgte =  false
    }else {
    	this.uhgte =  true
    }
    this.isth = false
        this.open = true;
        this.title = "查看学生档案信息";
      });
    },
	// 身份证
	idcde(event) {
		console.log(event);
		// 身份证号码为15位或者18位，15位时全为数字，18位前17位为数字，最后一位是校验位，可能为数字或字符X
		let reg = /^([1-6][1-9]|50)\d{4}(18|19|20)\d{2}((0[1-9])|10|11|12)(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/;
	  let _IDre15 =  /^([1-6][1-9]|50)\d{4}\d{2}((0[1-9])|10|11|12)(([0-2][1-9])|10|20|30|31)\d{3}$/;
	  // 护照
	   // let ncjsle = /^1[45][0-9]{7}$|(^[P|p|S|s]\d{7}$)|(^[S|s|G|g|E|e]\d{8}$)|(^[Gg|Tt|Ss|Ll|Qq|Dd|Aa|Ff]\d{8}$)|(^[H|h|M|m]\d{8,10}$)/;
	   let ncjsle = /^[a-zA-Z0-9]{5,17}$/
	   let nhyeli = /^[a-zA-Z]{5,17}$/
	  // 港澳
	  let gnse = /^([A-Z]\d{6,10}(\(\w{1}\))?)$/;
	  // 台湾
	  // let tw = /^\d{8}|^[a-zA-Z0-9]{10}|^\d{18}$/
	  var tw =  /^[0-9]{8}$/;
	   var twe = /^[0-9]{10}$/;
	  // 校验身份证：
	  console.log(reg.test(this.form.idCard),23741)
		if ( reg.test(this.form.idCard)|| _IDre15.test(this.form.idCard)) {
			// this.idea();
			this.go(this.form.idCard);
			// callback()
		} else {
	    if(ncjsle.test(this.form.idCard) || nhyeli.test(this.form.idCard)){
	       console.log(3)
	    }else{
	      if(gnse.test(this.form.idCard)  ){
	          console.log(4)
	      }else{
	        if(tw.test(this.form.idCard) || twe.test(this.form.idCard)){
	          console.log(5)
	        }else{
	          this.$message.error('证件格式不正确');
	        }
	      }

	    }
		}
	},
	// 实现自动生成生日，性别，年龄
	go(idCard) {
		 let sex = null;
		        let birth = null;
		        let myDate = new Date();
		        let month = myDate.getMonth() + 1;
		        let day = myDate.getDate();
		        let age = 0;

		        if (idCard.length === 18) {
		          age = myDate.getFullYear() - idCard.substring(6, 10) - 1;
		          sex = idCard.substring(16, 17);
		          birth = idCard.substring(6, 10) + "-" + idCard.substring(10, 12) + "-" + idCard.substring(12, 14);
		          if (idCard.substring(10, 12) < month || idCard.substring(10, 12) === month && idCard.substring(12, 14) <= day)
		            age++;

		        }
		        if (idCard.length === 15) {
		          age = myDate.getFullYear() - idCard.substring(6, 8) - 1901;
		          sex = idCard.substring(13, 14);
		          birth = "19" + idCard.substring(6, 8) + "-" + idCard.substring(8, 10) + "-" + idCard.substring(10, 12);
		          if (idCard.substring(8, 10) < month || idCard.substring(8, 10) === month && idCard.substring(10, 12) <= day)
		            age++;
		        }

		        if (sex % 2 === 0) sex = '2';
		        else sex = '1';
				this.form.sex = sex
				this.form.age = age
		        return {
		          age,
		          sex,
		          birth
		        }
	},
	// 请求身份证数据
	// idea() {
	// 	idces({ idCard: this.form.idCard }).then(response => {
	// 		console.log(response);

	// 	});
	// },
	// 更多操作触发
	handleCommand(command, row) {
	  switch (command) {
	    case "getPass":
	      this.getPass(row);
	      break;
	    default:
	      break;
	  }
	},
	// 历史数据
	getPass(val){
		console.log(val)
		this.innerDrawer = true
		this.getlihgw(val.id)
	},
    /** 提交按钮 */
    submitForm() {
		let redw = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/;
		if (this.form.fatherTelephone == null) {
		} else{
		  if(this.form.fatherTelephone !== ''){
		    if(redw.test(this.form.fatherTelephone)){

		    }else{
		      this.$message.error('父亲手机号码不正确');
		      return false
		    }
		  }
		}
		if (this.form.motherTelephone == null) {
		} else{
		  if(this.form.motherTelephone !== ''){
		    if(redw.test(this.form.motherTelephone)){

		    }else{
		      this.$message.error('母亲手机号码不正确');
		      return false
		    }
		  }
		}

		if (this.form.emergencyContactTelephone == null) {
		} else{
			if(this.form.emergencyContactTelephone == undefined){
			}else{
			  if(this.form.emergencyContactTelephone !== ''){
			    if(redw.test(this.form.emergencyContactTelephone)){
			    }else{
			      this.$message.error('紧急联系人手机号码不正确');
			      return false
			    }
			  }
			}
		}

      this.$refs["form"].validate(valid => {
        if (valid) {
          if (this.form.id != null) {
            updateInfo(this.form).then(response => {
              this.$modal.msgSuccess("修改成功");
              this.open = false;
              this.getList();
            });
          } else {
            addInfo(this.form).then(response => {
              this.$modal.msgSuccess("新增成功");
              this.open = false;
              this.getList();
            });
          }
        }
      });
    },
	handleAddfjs(){
	this.$modal.confirm('提示：本防溺水计划仅作为辅助提示作用，我们 将做到尽力推送，请确保学生照片信息清晰准确 无误！确认提交前，请先阅读完安全协议信').then(function() {
	  // return delInfo(ids);
	}).then(() => {
	  // this.getList();
	  // this.$modal.msgSuccess("删除成功");
	}).catch(() => {});
	},
    /** 删除按钮操作 */
    handleDelete(row) {
      const ids = row.id || this.ids;
	  delInfo(ids).then(response => {
	   this.getList();
	   this.$modal.msgSuccess("删除成功");
	  });
      // this.$modal.confirm('是否确认删除学生档案信息编号为"' + ids + '"的数据项？').then(function() {
      //   return delInfo(ids);
      // }).then(() => {
      //   this.getList();
      //   this.$modal.msgSuccess("删除成功");
      // }).catch(() => {});
    },
    /** 导出按钮操作 */
    handleExport() {
      this.download('student/info/export', {
        ...this.queryParams
      }, `info_${new Date().getTime()}.xlsx`)
    },
	handleChange (value) {
	        console.log(3976);
	      //我们选择地址后，selectedOptions 会保存对应的区域码，例如北京的区域码为'110000'
	      //我们要取出区域码对应的汉字，就需要用CodeToText(区域码)进行输出
	        this.addtions.selectedOptions = value
	        console.log(this.selectedOptions);
	        var name = ''
	        this.selectedOptions.map(item => name += CodeToText[item] + '/')
	        this.addtions.names = name
	        this.namestwo = this.addtions.names.split('/')
	        // for (let index = 0; index < this.namestwo.length; index++) {
	        //   const element = this.namestwo[index];
	        //   this.form.provinceName.value = this.namestwo[0]
	        //    this.form.cityName.value = this.namestwo[1]
	        //    this.form.regionName.value = this.namestwo[2]
	        //    console.log(this.form);

	        // }
	        this.form.area = this.addtions.names.split('/')
	        this.form.areaCode = this.addtions.selectedOptions
	        console.log(this.form.area);
	        for(var i = 0 ; i < this.form.area.length; i++){
	          this.mapCenter =  this.form.area[1]
	          this.location = this.form.area[1]
	        }
	        console.log(this.mapCenter);
	        console.log(this.location);


	         console.log(this.form.areaCode);
	        console.log(this.addtions.names.split('/'))

	        console.log(this.addtions.selectedOptions)
	      },
	      // 、、地图
	      getLocationPoint(e){
	       console.log(e);
		   console.log(e.point.lng,e.point.lat,e);
		   let that = this
		   that.form.longitude = e.point.lng
		   that.form.latitude = e.point.lat
		   const geoCoder = new BMap.Geocoder()
		   geoCoder.getLocation(e.point, function(res) {
		             console.log('获取经纬度', e.point, '获取详细地址', res)
		   					 that.form.address = res.address
		    //          const addrComponent = res.addressComponents
		    //          const surroundingPois = res.surroundingPois
		    //          const province = addrComponent.province
		    //          const city = addrComponent.city
		    //          const district = addrComponent.district
		    //          let addr = addrComponent.street
		    //          if (surroundingPois.length > 0 && surroundingPois[0].title) {
		    //            if (addr) {
		    //              addr += `-${surroundingPois[0].title}`
		    //            } else {
		    //              addr += `${surroundingPois[0].title}`
		    //            }
		    //          } else {
		    //            addr += addrComponent.streetNumber
		    //          }

		    //          that.choosedLocation = { province, city, district, addr, ...that.center }
		           })

	      },
	      searchcomplete(e){
	        console.log(e);

	      },
	      handlerBMap({ BMap, map }) {
	      this.BMap = BMap
	      this.map = map
	      console.log(BMap,map);
	      console.log(this.mapLocatio);

	      // if (this.mapLocation.coordinate && this.mapLocation.coordinate.lng) {
	      //   // this.mapCenter.lng = this.mapLocation.coordinate.lng
	      //   // this.mapCenter.lat = this.mapLocation.coordinate.lat
	      //   this.mapZoom = 15
	      //   map.addOverlay(new this.BMap.Marker(this.mapLocation.coordinate))
	      // } else {
	      //   // this.mapCenter.lng = 113.271429
	      //   // this.mapCenter.lat = 23.135336
	      //   this.mapZoom = 10
	      // }
	    },
	    querySearch(queryString,cb) {
	      // console.log(e);
	      // this.keyword = e
	      // results, cb
	      // var that = this
	      // var myGeo = new this.BMap.Geocoder()
	      // console.log(queryString, cb);

	      // myGeo.getPoint(queryString, function(point) {
	      //   console.log(point);
	      //   // var point = '安庆市'

	      //   if (point) {
	      //     that.mapLocation.coordinate = point
	      //     that.makerCenter(point)
	      //   } else {
	      //     that.mapLocation.coordinate = null
	      //   }
	      // }, this.locationCity)
	      // console.log(this.locationCity);

	      // var options = {
	      //   onSearchComplete: function(results) {
	      //     console.log(local.getStatus());

	      //     if (local.getStatus() === 0) {
	      //       // 判断状态是否正确
	      //       var s = []
	      //       console.log(results.getCurrentNumPois());

	      //       for (var i = 0; i < results.getCurrentNumPois(); i++) {
	      //         var x = results.getPoi(i)
	      //         console.log(x);

	      //         var item = { value: x.address + x.title, point: x.point }
	      //         s.push(item)
	      //         // console.log(s);

	      //         cb(s)
	      //       }
	      //       // console.log(s);

	      //     } else {
	      //       cb()
	      //     }
	      //   }
	      // // this.oieueo(results)
	      console.log(queryString);
	      var item = []
	      var x = ''
	      //  this.nameadd = queryString.Ir
	      // queryString.value = ''
	       for(var i = 0 ; i <  this.nameadd.length; i++){
	         console.log(queryString[i]);
	        // var item = { value: this.nameadd[i].address + this.nameadd[i].title, point: this.nameadd[i].point }
	        // if(queryString[i].address == undefined){
	        //     queryString[i].address = ''
	        // }
	        //  x= this.nameadd[i].address + this.nameadd[i].title
	        // item.push(x)
	       this.nameadd[i].value = this.nameadd[i].address + this.nameadd[i].title
	       console.log(this.nameadd[i].value);

	      //  this.nameadd.push( item)
	         }
	        //  this.nameadd = item
	         console.log(this.nameadd);
	        //  this.cb = cb
	      cb(this.nameadd)
	      if(this.nameadd.length != 0){
	        // console.log(local.getStatus());

	      }else{
	        cb(this.kdourg)
	      }

	      console.log(this.nameadd);

	      // }
	      // console.log(options );
	    // var local = new this.BMap.LocalSearch('安庆市', options)

	    // console.log(queryString );
	      // local.search(queryString)
	    },
	    handleSelect(item) {
	      var { point } = item
	      this.mapLocation.coordinate = point
	      console.log(this.mapLocation.coordinate,39);
		  this.form.longitude = this.mapLocation.coordinate.lng
		  this.form.latitude = this.mapLocation.coordinate.lat

	      // this.makerCenter(point)
	    },
		handleSelectb(item){
			let that = this
			// if(that.ferg == true){
				var myGeo = new BMap.Geocoder();
				myGeo.getPoint(that.form.address, function (point) {
					        if (point) {
					          console.log(point, "point");
							  that.form.longitude = point.lng
							  that.form.latitude = point.lat
					          // that.location = point;
					        }
					      });
			// }



			console.log(this.form.address,396);
		},
	    makerCenter(point) {
	      console.log(point);

	      if (this.map) {
	        this.map.clearOverlays()
	        this.map.addOverlay(new this.BMap.Marker(point))
	        // this.mapCenter.lng = point.lng
	        // this.mapCenter.lat = point.lat
	        // this.mapCenter = '安庆市'
	        this.mapZoom = 15
	      }
	    },
	    oieueo(results,cb){
	    //  console.log(results,cb);
	   console.log(results);
	   console.log(this.form.address);


	    // if(this.form.address == ''){
	    //   this.nameadd = []
	    // }else{
	    //  this.nameadd = results.Ir
	    // }
	    //  console.log(type.Ir.value);
	     console.log(this.nameadd);
	    //  var cb= cb
	     this.querySearch(this.nameadd,this.cb)
	    //  results,cb

	    //  this.nameadd.
	    //  var local = new this.BMap.LocalSearch(this.map, options)
	    //   local.search(queryString)

	    },
	    //选中数据
	    confirmf(e){
	      console.log(143);
	      console.log(e);
	      this.nameadd = e

	    },
	    boiu(){
	      // this.okuyt = false
	    },
	    //获取焦点
	    faie(){
	// this.okuyt = true
	    },
		// 学校选择器
		mjyhes(){

		},
		// 班级选择器
		mjyhess(val){
			this.getListuye(val.deptId)
		},
		// 学生姓名选择器
		mjyhesstu(val){
			if(this.form.classId == null){
				this.$message.error('请先选择班级');
				return
			}else if(this.form.classId == undefined){
				this.$message.error('请先选择班级');
				return
			}else if(this.form.classId == ''){
				this.$message.error('请先选择班级');
				return
			}
			this.form.studentId = val.id
			this.form.studentNumber = val.studentNumber
		},
		hetdt(val){
			this.drawer = true
			this.ngshg = false,
			this.ngtzh = true,
			this.getlihgw(val.id)
			this.getlihgws(val.id)
		},
		hetdtw(val){
			this.drawer = true
			this.ngshg = true,
			this.ngtzh = false,
			this.getlihgw(val.id)
			this.getlihgws(val.id)
		},
		// 获取屏幕高度
		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)
		    },
			ngekusfd(){
				if(this.form.isNearsightedness == '1'){
					this.uhgte = false
				}else{
					if(this.form.isFarsightedness == '1'){
						this.uhgte = false
					}else{
						this.uhgte = true
					}
				}
			},
			ngekusfdf(){
				if(this.form.isFarsightedness == '1'){
					this.uhgte = false
				}else{
					if(this.form.isNearsightedness == '1'){
						this.uhgte = false
					}else{
						this.uhgte = true
					}

				}
			}

  }
};
</script>
<style>
  .ingwe{
    margin-top: 0;
  }
	.el-drawer__body{
		padding: 0 10px;
	}
	.el-card__body, .el-main{
		padding:10px;
		/* margin-bottom:10px; */
	}
	.el-divider--horizontal{
		margin:7px 0;
	}
	.text {
	    font-size: 14px;
	  }

	  .item {
	    /* padding: 10px 0; */
	  }
	  .item p {
		  margin:0;
		  color:#161616;
		  margin-bottom:5px;
	  }
	  .item p span{
		  color:#aaa;
		  /* padding-left:5px; */
		  margin-right:5px;
	  }

	  .box-card {
	    width: 100%;
		margin-bottom:10px;
	  }
	.ngtes .el-table .el-dropdown-link, .el-table .el-dropdown-selfdefine{
		margin-left:0;
	}
	.ngtes .el-button+.el-button, .el-checkbox.is-bordered+.el-checkbox.is-bordered{
		margin-right:5px;
		margin-left:5px;
	}
  .demo-table-expand {
    font-size: 0;
	.ngr{
		color: #161616;
	}
  }
  .demo-table-expand label {
    width: 90px;
	text-align: right;
    color: #666;
  }
  .demo-table-expand .el-form-item {
    margin-right: 0;
    margin-bottom: 0;
    width: 25%;
  }
</style>

<style scoped lang="scss">
  .psnge{
    p{
      margin: 0;
      padding-left: 10px;
      span{
        font-weight: 500;
        font-size: 14px;
        color: #606266;
        line-height: 24px;
      }
    }
  }
  .tongty{
    display: flex;
    align-items: center;
  }
  .bortt{
    border-top: 1px solid #DADADA;
    margin-top: 15px;

    p{
      margin: 0;
      font-weight: bold;
      font-size: 14px;
      color: #5F8BF4;
      width:50%;
      padding: 10px;
      text-align: center;
    }
  }
	.bgtan{
		border-left: 3px solid #4775EA;
		padding-left: 10px;
	}

	.app-container{
		background-color: #f6f6f6;
		// height: 100vh;
	}
	.bm-view {
	  width: 100%;
	  height: 300px;
	}
	.oiue{
	  height: 300px;
	}
	.pui{
	  height: 100px;
	  position: absolute;
	  top: 40px;
	  left: 0;
	  z-index: 99;
	  // overflow: hidden;
	}
	.anchorTL{
	  width: 100%;
	}
	.app-container{
	  // padding: 0 !important;
	}
	.BMap_mask{
	  // background-color: #fff !important;
	}
	.bm-view {
	  width: 100%;
	  height: 300px;
	}
	// 去除百度地图的图标 根据实际情况看是否要加样式穿透(::v-deep)
	    ::v-deep .anchorBL {
	      display: none !important;
	    }
</style>
