Pārlūkot izejas kodu

系统安全开发

maotao 1 mēnesi atpakaļ
vecāks
revīzija
19887f03fa

+ 4 - 4
src/app/components/configurationCenter/configuration-system-security/configuration-system-security.component.html

@@ -55,20 +55,20 @@
55
 								</div>
55
 								</div>
56
 
56
 
57
 								<!-- 是否限制单点登录ip -->
57
 								<!-- 是否限制单点登录ip -->
58
-								<div class="display_flex align-items_center mb8">
58
+						<!-- 		<div class="display_flex align-items_center mb8">
59
 								  <nz-form-label class="label">是否限制单点登录ip</nz-form-label>
59
 								  <nz-form-label class="label">是否限制单点登录ip</nz-form-label>
60
 								  <nz-checkbox-group [(ngModel)]="astrictIp"></nz-checkbox-group>
60
 								  <nz-checkbox-group [(ngModel)]="astrictIp"></nz-checkbox-group>
61
-								</div>
61
+								</div> -->
62
 
62
 
63
                 <!-- 单点登录范围内IP -->
63
                 <!-- 单点登录范围内IP -->
64
-                <div class="display_flex flex-wrap_wrap align-items_baseline mb8" *ngIf="astrictIp[0].checked">
64
+               <!-- <div class="display_flex flex-wrap_wrap align-items_baseline mb8" *ngIf="astrictIp[0].checked">
65
                   <nz-form-label class="label">单点登录范围内IP</nz-form-label>
65
                   <nz-form-label class="label">单点登录范围内IP</nz-form-label>
66
 									<div *ngFor="let i of ipData let index = index;" class="ip-list" [ngClass]="{'margin-list':index!=0}">
66
 									<div *ngFor="let i of ipData let index = index;" class="ip-list" [ngClass]="{'margin-list':index!=0}">
67
 										<input class="width-300" type="text" nz-input [(ngModel)]="i.rangeIp"/> 
67
 										<input class="width-300" type="text" nz-input [(ngModel)]="i.rangeIp"/> 
68
 										<i class="add-class" (click)="addIp()" nz-icon nzType="plus" nzTheme="outline"></i>
68
 										<i class="add-class" (click)="addIp()" nz-icon nzType="plus" nzTheme="outline"></i>
69
 										<i class="add-class" (click)="delIp(i, index)" nz-icon nzType="minus" nzTheme="outline"></i>
69
 										<i class="add-class" (click)="delIp(i, index)" nz-icon nzType="minus" nzTheme="outline"></i>
70
 									</div>
70
 									</div>
71
-								</div>
71
+								</div> -->
72
               </div>
72
               </div>
73
               <div class="bottom">
73
               <div class="bottom">
74
                 <button class="login-form-button" nzType="primary" [nzLoading]="btnLoading" nz-button (click)="submitForm()">保存</button>
74
                 <button class="login-form-button" nzType="primary" [nzLoading]="btnLoading" nz-button (click)="submitForm()">保存</button>

+ 32 - 32
src/app/components/configurationCenter/configuration-system-security/configuration-system-security.component.ts

@@ -109,13 +109,13 @@ export class ConfigurationSystemSecurityComponent implements OnInit {
109
 			}
109
 			}
110
 		}
110
 		}
111
 	
111
 	
112
-		if(this.astrictIp[0].checked){
113
-			let isEmpty = this.ipData.filter(i=>i.rangeIp=='')
114
-			if(isEmpty.length>0){
115
-				this.msg.error('ip不能为空')
116
-				return 
117
-			}
118
-		}
112
+		// if(this.astrictIp[0].checked){
113
+		// 	let isEmpty = this.ipData.filter(i=>i.rangeIp=='')
114
+		// 	if(isEmpty.length>0){
115
+		// 		this.msg.error('ip不能为空')
116
+		// 		return 
117
+		// 	}
118
+		// }
119
 		
119
 		
120
 		let filterData = this.initConfig;
120
 		let filterData = this.initConfig;
121
 		filterData.forEach((item) => {
121
 		filterData.forEach((item) => {
@@ -142,20 +142,20 @@ export class ConfigurationSystemSecurityComponent implements OnInit {
142
 		  }else if (item.configKey === "incorrectNum") {
142
 		  }else if (item.configKey === "incorrectNum") {
143
 				item.configValue = this.errorTime;
143
 				item.configValue = this.errorTime;
144
 		  }else if (item.configKey === "limitSingleLoginIp") {
144
 		  }else if (item.configKey === "limitSingleLoginIp") {
145
-				let value = null
146
-				if(this.astrictIp[0].checked){
147
-					value = '1'
148
-				}else{
149
-					value = '0'
150
-				}
151
-				item.configValue = value;
145
+				// let value = null
146
+				// if(this.astrictIp[0].checked){
147
+				// 	value = '1'
148
+				// }else{
149
+				// 	value = '0'
150
+				// }
151
+				// item.configValue = value;
152
 		  }else if (item.configKey === "ipWhiteList") {
152
 		  }else if (item.configKey === "ipWhiteList") {
153
-				let str = JSON.parse(JSON.stringify(this.ipData))
154
-				let data = str.map(i=>{
155
-					return i.rangeIp
156
-				})
157
-				console.log(4444, data)
158
-				item.configValue = data.join(';');
153
+				// let str = JSON.parse(JSON.stringify(this.ipData))
154
+				// let data = str.map(i=>{
155
+				// 	return i.rangeIp
156
+				// })
157
+				// console.log(4444, data)
158
+				// item.configValue = data.join(';');
159
 		  }
159
 		  }
160
 		});
160
 		});
161
 		const postData = filterData;
161
 		const postData = filterData;
@@ -220,20 +220,20 @@ export class ConfigurationSystemSecurityComponent implements OnInit {
220
 									this.errorTime = c[1]
220
 									this.errorTime = c[1]
221
 									break;	
221
 									break;	
222
 								case "limitSingleLoginIp":
222
 								case "limitSingleLoginIp":
223
-									if(c[1]=='1'){
224
-										this.astrictIp[0].checked = true
225
-									}else{
226
-										this.astrictIp[0].checked = false
227
-									}
223
+									// if(c[1]=='1'){
224
+									// 	this.astrictIp[0].checked = true
225
+									// }else{
226
+									// 	this.astrictIp[0].checked = false
227
+									// }
228
 									break;
228
 									break;
229
 								case "ipWhiteList":
229
 								case "ipWhiteList":
230
-									let data = c[1].split(';')
231
-									this.ipData = []
232
-									for(let i=0; i<data.length; i++){
233
-										this.ipData.push({
234
-											rangeIp: data[i]
235
-										}) 
236
-									}
230
+									// let data = c[1].split(';')
231
+									// this.ipData = []
232
+									// for(let i=0; i<data.length; i++){
233
+									// 	this.ipData.push({
234
+									// 		rangeIp: data[i]
235
+									// 	}) 
236
+									// }
237
 									break;
237
 									break;
238
 							}
238
 							}
239
 						});
239
 						});

+ 21 - 18
src/app/views/login/login.component.ts

@@ -82,19 +82,19 @@ export class LoginComponent implements OnInit {
82
       (data) => {
82
       (data) => {
83
         this.loading = false;
83
         this.loading = false;
84
         this.msg.remove(loadingId);
84
         this.msg.remove(loadingId);
85
-				if(data.status==200){
86
-					this.apiLogin(data.userId, data.pwd, "", "", true);
87
-				}else{
85
+				if(data.status==500){
88
 					this.msg.error(data.remarks, {
86
 					this.msg.error(data.remarks, {
89
-					  nzDuration: 1000,
87
+					  nzDuration: 2000,
90
 					});
88
 					});
89
+				}else{
90
+					this.apiLogin(data.userId, data.pwd, "", "", true);
91
 				}
91
 				}
92
       },
92
       },
93
       (err) => {
93
       (err) => {
94
         this.loading = false;
94
         this.loading = false;
95
         this.msg.remove(loadingId);
95
         this.msg.remove(loadingId);
96
         this.msg.error("登录失败", {
96
         this.msg.error("登录失败", {
97
-          nzDuration: 1000,
97
+          nzDuration: 2000,
98
         });
98
         });
99
         this.router.navigateByUrl("/login");
99
         this.router.navigateByUrl("/login");
100
       }
100
       }
@@ -271,17 +271,20 @@ export class LoginComponent implements OnInit {
271
 				this.errorTip = null;
271
 				this.errorTip = null;
272
       } else if(data.status == 501){
272
       } else if(data.status == 501){
273
 				this.msg.error('验证码错误', {
273
 				this.msg.error('验证码错误', {
274
-				  nzDuration: 1000,
274
+				  nzDuration: 2000,
275
 				});
275
 				});
276
 				this.errorTip = null;
276
 				this.errorTip = null;
277
       } else if(data.status == 506){
277
       } else if(data.status == 506){
278
 				this.errorTip = data.tips
278
 				this.errorTip = data.tips
279
+				this.msg.error(data.remarks, {
280
+				  nzDuration: 2000,
281
+				});
279
 				this.resetCode()
282
 				this.resetCode()
280
       }else {
283
       }else {
281
 				this.errorTip = null;
284
 				this.errorTip = null;
282
 				this.resetCode()
285
 				this.resetCode()
283
 				this.msg.error(data.remarks, {
286
 				this.msg.error(data.remarks, {
284
-				  nzDuration: 1000,
287
+				  nzDuration: 2000,
285
 				});
288
 				});
286
 			}
289
 			}
287
     });
290
     });
@@ -332,7 +335,7 @@ export class LoginComponent implements OnInit {
332
 		localStorage.setItem("specimenBatchNo",'')
335
 		localStorage.setItem("specimenBatchNo",'')
333
 		if(this.paramsData.toPage1 && (this.paramsData.cardNO1 || this.paramsData.pathologyFormCode1)){
336
 		if(this.paramsData.toPage1 && (this.paramsData.cardNO1 || this.paramsData.pathologyFormCode1)){
334
 			this.msg.success("登录成功!", {
337
 			this.msg.success("登录成功!", {
335
-			  nzDuration: 1000,
338
+			  nzDuration: 2000,
336
 			});
339
 			});
337
 			successLoginMsg = false;
340
 			successLoginMsg = false;
338
 			localStorage.setItem("user", JSON.stringify(data.user));
341
 			localStorage.setItem("user", JSON.stringify(data.user));
@@ -354,7 +357,7 @@ export class LoginComponent implements OnInit {
354
       // 护士角色跳护士端
357
       // 护士角色跳护士端
355
       if (successLoginMsg) {
358
       if (successLoginMsg) {
356
         this.msg.success("登录成功!", {
359
         this.msg.success("登录成功!", {
357
-          nzDuration: 1000,
360
+          nzDuration: 2000,
358
         });
361
         });
359
       }
362
       }
360
       successLoginMsg = false;
363
       successLoginMsg = false;
@@ -366,7 +369,7 @@ export class LoginComponent implements OnInit {
366
       // 调度台
369
       // 调度台
367
       if (successLoginMsg) {
370
       if (successLoginMsg) {
368
         this.msg.success("登录成功!", {
371
         this.msg.success("登录成功!", {
369
-          nzDuration: 1000,
372
+          nzDuration: 2000,
370
         });
373
         });
371
       }
374
       }
372
       successLoginMsg = false;
375
       successLoginMsg = false;
@@ -377,7 +380,7 @@ export class LoginComponent implements OnInit {
377
       // 标本间端
380
       // 标本间端
378
       if (successLoginMsg) {
381
       if (successLoginMsg) {
379
         this.msg.success("登录成功!", {
382
         this.msg.success("登录成功!", {
380
-          nzDuration: 1000,
383
+          nzDuration: 2000,
381
         });
384
         });
382
       }
385
       }
383
       successLoginMsg = false;
386
       successLoginMsg = false;
@@ -388,7 +391,7 @@ export class LoginComponent implements OnInit {
388
       // 门诊病理采样端
391
       // 门诊病理采样端
389
       if (successLoginMsg) {
392
       if (successLoginMsg) {
390
         this.msg.success("登录成功!", {
393
         this.msg.success("登录成功!", {
391
-          nzDuration: 1000,
394
+          nzDuration: 2000,
392
         });
395
         });
393
       }
396
       }
394
       successLoginMsg = false;
397
       successLoginMsg = false;
@@ -399,7 +402,7 @@ export class LoginComponent implements OnInit {
399
       // 病理交接本
402
       // 病理交接本
400
       if (successLoginMsg) {
403
       if (successLoginMsg) {
401
         this.msg.success("登录成功!", {
404
         this.msg.success("登录成功!", {
402
-          nzDuration: 1000,
405
+          nzDuration: 2000,
403
         });
406
         });
404
       }
407
       }
405
       successLoginMsg = false;
408
       successLoginMsg = false;
@@ -410,7 +413,7 @@ export class LoginComponent implements OnInit {
410
       // 病理科端
413
       // 病理科端
411
       if (successLoginMsg) {
414
       if (successLoginMsg) {
412
         this.msg.success("登录成功!", {
415
         this.msg.success("登录成功!", {
413
-          nzDuration: 1000,
416
+          nzDuration: 2000,
414
         });
417
         });
415
       }
418
       }
416
       successLoginMsg = false;
419
       successLoginMsg = false;
@@ -421,7 +424,7 @@ export class LoginComponent implements OnInit {
421
       // web报修
424
       // web报修
422
       if (successLoginMsg) {
425
       if (successLoginMsg) {
423
         this.msg.success("登录成功!", {
426
         this.msg.success("登录成功!", {
424
-          nzDuration: 1000,
427
+          nzDuration: 2000,
425
         });
428
         });
426
       }
429
       }
427
       successLoginMsg = false;
430
       successLoginMsg = false;
@@ -432,7 +435,7 @@ export class LoginComponent implements OnInit {
432
       // 药房端2
435
       // 药房端2
433
       if (successLoginMsg) {
436
       if (successLoginMsg) {
434
         this.msg.success("登录成功!", {
437
         this.msg.success("登录成功!", {
435
-          nzDuration: 1000,
438
+          nzDuration: 2000,
436
         });
439
         });
437
       }
440
       }
438
       successLoginMsg = false;
441
       successLoginMsg = false;
@@ -443,12 +446,12 @@ export class LoginComponent implements OnInit {
443
     // 有菜单可以进入系统主页面
446
     // 有菜单可以进入系统主页面
444
     if (!canLogin) {
447
     if (!canLogin) {
445
       this.msg.success("暂无权限进入系统!", {
448
       this.msg.success("暂无权限进入系统!", {
446
-        nzDuration: 1000,
449
+        nzDuration: 2000,
447
       });
450
       });
448
     } else {
451
     } else {
449
       if (successLoginMsg) {
452
       if (successLoginMsg) {
450
         this.msg.success("登录成功!", {
453
         this.msg.success("登录成功!", {
451
-          nzDuration: 1000,
454
+          nzDuration: 2000,
452
         });
455
         });
453
       }
456
       }
454
       successLoginMsg = false;
457
       successLoginMsg = false;