| 
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -4,30 +4,14 @@ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      <div class="mainbody"> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        <div class="title">系统登录</div> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        <div class="userform"> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          <el-form | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            :model="form" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            :rules="rules" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            ref="form" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            class="demo-ruleForm" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          > | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          <el-form :model="form" :rules="rules" ref="form" class="demo-ruleForm"> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            <el-form-item label="" prop="Username"> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              <el-input | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                v-model="form.Username" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                placeholder="用户名" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                prefix-icon="el-icon-s-custom" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              ></el-input> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              <el-input v-model="form.Username" placeholder="用户名" prefix-icon="el-icon-s-custom"></el-input> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            </el-form-item> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            <el-form-item label="" prop="Password"> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              <el-input | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                v-model="form.Password" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                placeholder="密码" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                type="password" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                prefix-icon="el-icon-unlock" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              ></el-input> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              <el-input v-model="form.Password" placeholder="密码" type="password" prefix-icon="el-icon-unlock"></el-input> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            </el-form-item> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            <el-button type="primary" class="btn" @click="onSubmit(form)" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              >用户登录</el-button | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            > | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            <el-button type="primary" class="btn" @click="onSubmit(form)">用户登录</el-button> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          </el-form> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        </div> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      </div> | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -75,22 +59,23 @@ export default { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          }) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            .then((res) => { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              msgs = res.data.msg; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              if(res.code==1){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                     writetoken(res.data.expires_in); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              window.localStorage.setItem("token", res.data.access_token); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              window.localStorage.setItem( | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                "refresh_token", | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                res.data.refresh_token | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              ); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              window.localStorage.setItem("tokentype", res.data.token_type); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              window.localStorage.setItem("user", this.form.Username); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              if (res.code == 1) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                window.sessionStorage.setItem("peisid", res.data.peisid); //设置当前人员所属体检中心 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                writetoken(res.data.expires_in); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                window.localStorage.setItem("token", res.data.access_token); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                window.localStorage.setItem( | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                  "refresh_token", | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                  res.data.refresh_token | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                ); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                window.localStorage.setItem("tokentype", res.data.token_type); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                window.localStorage.setItem("user", this.form.Username); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              this.$router.push({ path: "home" }); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              this.$store.state.changepassword = this.form.Password; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                this.$router.push({ path: "home" }); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                this.$store.state.changepassword = this.form.Password; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              this.$message.success(msgs); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              console.log(res,'res'); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              console.log(res, 'res'); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              // if (res.code != -1 && res.data.code == 1) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              //   window.sessionStorage.setItem("peisid", res.data.peisid); //设置当前人员所属体检中心 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -127,7 +112,7 @@ export default { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            //   this.$router.push({ path: "home" }); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            //   this.$store.state.changepassword = this.form.Password; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            // }) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            .catch((err) => {}); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            .catch((err) => { }); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          //   console.log(res); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          //   if (res.data.code == 1 && res.code == 1) { | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
				
				 | 
				
					
  |