|  |  |  | @ -62,38 +62,6 @@ | 
			
		
	
		
			
				
					|  |  |  |  |         <span> password: any</span> | 
			
		
	
		
			
				
					|  |  |  |  |       </div> | 
			
		
	
		
			
				
					|  |  |  |  |     </el-form> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     <el-dialog | 
			
		
	
		
			
				
					|  |  |  |  |       :visible.sync="companySelectDialog" | 
			
		
	
		
			
				
					|  |  |  |  |       :close-on-click-modal="false" | 
			
		
	
		
			
				
					|  |  |  |  |       :close-on-press-escape="false" | 
			
		
	
		
			
				
					|  |  |  |  |       width="500px" | 
			
		
	
		
			
				
					|  |  |  |  |       title="请选择登录企业" | 
			
		
	
		
			
				
					|  |  |  |  |     > | 
			
		
	
		
			
				
					|  |  |  |  |       <el-table :data="companyList"> | 
			
		
	
		
			
				
					|  |  |  |  |         <el-table-column property="companyName" label="公司名称" width="200" /> | 
			
		
	
		
			
				
					|  |  |  |  |         <el-table-column property="parentMark" label="公司性质"> | 
			
		
	
		
			
				
					|  |  |  |  |           <template slot-scope="{ row }"> | 
			
		
	
		
			
				
					|  |  |  |  |             <el-tag v-if="row.parentMark === 0" effect="dark" size="normal" | 
			
		
	
		
			
				
					|  |  |  |  |               >主体公司</el-tag | 
			
		
	
		
			
				
					|  |  |  |  |             > | 
			
		
	
		
			
				
					|  |  |  |  |             <el-tag v-else effect="dark" type="info" size="normal" | 
			
		
	
		
			
				
					|  |  |  |  |               >分公司</el-tag | 
			
		
	
		
			
				
					|  |  |  |  |             > | 
			
		
	
		
			
				
					|  |  |  |  |           </template> | 
			
		
	
		
			
				
					|  |  |  |  |         </el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |         <el-table-column property="name" label="操作"> | 
			
		
	
		
			
				
					|  |  |  |  |           <template slot-scope="scope"> | 
			
		
	
		
			
				
					|  |  |  |  |             <el-button | 
			
		
	
		
			
				
					|  |  |  |  |               type="text" | 
			
		
	
		
			
				
					|  |  |  |  |               size="small" | 
			
		
	
		
			
				
					|  |  |  |  |               @click="loginAgain(scope.row.companyId)" | 
			
		
	
		
			
				
					|  |  |  |  |               >登录</el-button | 
			
		
	
		
			
				
					|  |  |  |  |             > | 
			
		
	
		
			
				
					|  |  |  |  |           </template> | 
			
		
	
		
			
				
					|  |  |  |  |         </el-table-column> | 
			
		
	
		
			
				
					|  |  |  |  |       </el-table> | 
			
		
	
		
			
				
					|  |  |  |  |     </el-dialog> | 
			
		
	
		
			
				
					|  |  |  |  |   </div> | 
			
		
	
		
			
				
					|  |  |  |  | </template> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
	
		
			
				
					|  |  |  | @ -113,8 +81,6 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |  |       loading: false, | 
			
		
	
		
			
				
					|  |  |  |  |       passwordType: "", | 
			
		
	
		
			
				
					|  |  |  |  |       companyList: [], | 
			
		
	
		
			
				
					|  |  |  |  |       companySelectDialog: false, | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |       loginForm: { | 
			
		
	
		
			
				
					|  |  |  |  |         username: "", | 
			
		
	
		
			
				
					|  |  |  |  |         password: "", | 
			
		
	
	
		
			
				
					|  |  |  | @ -140,6 +106,8 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |  |       }); | 
			
		
	
		
			
				
					|  |  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |  |     handleLogin() { | 
			
		
	
		
			
				
					|  |  |  |  |       this.$refs["loginForm"].validate((valid) => { | 
			
		
	
		
			
				
					|  |  |  |  |         if (valid) { | 
			
		
	
		
			
				
					|  |  |  |  |           this.loading = true; | 
			
		
	
		
			
				
					|  |  |  |  |           let { username, password, networkId } = this.loginForm; | 
			
		
	
		
			
				
					|  |  |  |  |           serve | 
			
		
	
	
		
			
				
					|  |  |  | @ -149,21 +117,16 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |  |               networkId, | 
			
		
	
		
			
				
					|  |  |  |  |             }) | 
			
		
	
		
			
				
					|  |  |  |  |             .then((res) => { | 
			
		
	
		
			
				
					|  |  |  |  |           if (res && res.code === 42014) { | 
			
		
	
		
			
				
					|  |  |  |  |             serve | 
			
		
	
		
			
				
					|  |  |  |  |               .getRefineryByCustomerId(this.loginForm.username) | 
			
		
	
		
			
				
					|  |  |  |  |               .then((res) => { | 
			
		
	
		
			
				
					|  |  |  |  |                 this.companyList = res.data; | 
			
		
	
		
			
				
					|  |  |  |  |                 this.companySelectDialog = true; | 
			
		
	
		
			
				
					|  |  |  |  |                 return; | 
			
		
	
		
			
				
					|  |  |  |  |               }); | 
			
		
	
		
			
				
					|  |  |  |  |           } | 
			
		
	
		
			
				
					|  |  |  |  |               if (res.data.accessToken) { | 
			
		
	
		
			
				
					|  |  |  |  |                 localStorage.setItem("token", res.data.accessToken); | 
			
		
	
		
			
				
					|  |  |  |  |                 this.$router.replace("/"); | 
			
		
	
		
			
				
					|  |  |  |  |               } | 
			
		
	
		
			
				
					|  |  |  |  |             }) | 
			
		
	
		
			
				
					|  |  |  |  |             .catch(() => { | 
			
		
	
		
			
				
					|  |  |  |  |               this.loading = false; | 
			
		
	
		
			
				
					|  |  |  |  |             }); | 
			
		
	
		
			
				
					|  |  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |  |       }); | 
			
		
	
		
			
				
					|  |  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |  |   }, | 
			
		
	
		
			
				
					|  |  |  |  | }; | 
			
		
	
	
		
			
				
					|  |  |  | 
 |