浏览代码

提交代码

maotao 1 月之前
父节点
当前提交
b01ff0cbeb

+ 9 - 0
src/app/components/order-scope/order-scope.component.html

@@ -49,6 +49,15 @@
49
             </nz-radio-group>
49
             </nz-radio-group>
50
           </div>
50
           </div>
51
         </div>
51
         </div>
52
+				<div nz-row>
53
+				  <div nz-col nzSpan="5">是否展示重新指派:</div>
54
+				  <div nz-col nzSpan="19">
55
+				    <nz-radio-group class="w100" [(ngModel)]="showReassign" [nzDisabled]="!activeScopeTab.checked">
56
+				      <label nz-radio [nzValue]="1">是</label>
57
+				      <label nz-radio [nzValue]="0">否</label>
58
+				    </nz-radio-group>
59
+				  </div>
60
+				</div>
52
       </div>
61
       </div>
53
       <!-- 配送 -->
62
       <!-- 配送 -->
54
       <div class="conditions" *ngIf="scopeTabs.length>0 && activeScopeTab.value == 2">
63
       <div class="conditions" *ngIf="scopeTabs.length>0 && activeScopeTab.value == 2">

+ 4 - 1
src/app/components/order-scope/order-scope.component.ts

@@ -45,6 +45,7 @@ export class OrderScopeComponent implements OnInit {
45
 	activeScopeTab:any;
45
 	activeScopeTab:any;
46
 	//#region 工单范围-运维start
46
 	//#region 工单范围-运维start
47
 	allDuty:number = 1;
47
 	allDuty:number = 1;
48
+	showReassign:number = 0;
48
 	menuList:any;
49
 	menuList:any;
49
 	
50
 	
50
   ngOnInit() {
51
   ngOnInit() {
@@ -99,7 +100,8 @@ export class OrderScopeComponent implements OnInit {
99
     itsmGetOrderScope() {
100
     itsmGetOrderScope() {
100
       // 是否不限制部门
101
       // 是否不限制部门
101
       this.allDuty = this.itsmData.allDuty === undefined ? 1 : this.itsmData.allDuty;
102
       this.allDuty = this.itsmData.allDuty === undefined ? 1 : this.itsmData.allDuty;
102
-      // 权限内的院区和组
103
+      this.showReassign = this.itsmData.showReassign;
104
+			// 权限内的院区和组
103
       let hosList = this.user.infoPermission.dutyList || [];
105
       let hosList = this.user.infoPermission.dutyList || [];
104
       let groups = this.user.infoPermission.dutyGroupList || [];
106
       let groups = this.user.infoPermission.dutyGroupList || [];
105
 
107
 
@@ -383,6 +385,7 @@ export class OrderScopeComponent implements OnInit {
383
 
385
 
384
       if(itsm && itsm.checked){
386
       if(itsm && itsm.checked){
385
         postData.workerOrderScope.allDuty = this.allDuty;
387
         postData.workerOrderScope.allDuty = this.allDuty;
388
+				postData.workerOrderScope.showReassign = this.showReassign;
386
         postData.workerOrderScope.dutyIds = this.itsmCheckedHos.filter(v => v.checked).map(v => v.value).toString() || undefined;
389
         postData.workerOrderScope.dutyIds = this.itsmCheckedHos.filter(v => v.checked).map(v => v.value).toString() || undefined;
387
         postData.workerOrderScope.dutyGroupIds = this.itsmCheckedGroup.filter(v => v.checked).map(v => v.value).toString() || undefined;
390
         postData.workerOrderScope.dutyGroupIds = this.itsmCheckedGroup.filter(v => v.checked).map(v => v.value).toString() || undefined;
388
         postData.workerOrderScope.dutyRange = this.itsmOrderScopeRadio - 0;
391
         postData.workerOrderScope.dutyRange = this.itsmOrderScopeRadio - 0;

+ 6 - 0
src/app/services/main.service.ts

@@ -1107,5 +1107,11 @@ export class MainService {
1107
 			responseType: "arraybuffer",
1107
 			responseType: "arraybuffer",
1108
 		});
1108
 		});
1109
 	}
1109
 	}
1110
+	// 恢复删除的用户
1111
+	recoveryUser(data){
1112
+		return this.http.post(host.host + `/user/data/recoveryUser`, data, {
1113
+		  headers: this.headers,
1114
+		});
1115
+	}
1110
 	
1116
 	
1111
 }
1117
 }

+ 6 - 4
src/app/views/fuwutai/fuwutai.component.ts

@@ -1377,7 +1377,6 @@ export class FuwutaiComponent implements OnInit {
1377
   itsmCheckedHos;// 运维-院区选择
1377
   itsmCheckedHos;// 运维-院区选择
1378
   itsmScopeGroups = []; //运维-当前所属人员分组
1378
   itsmScopeGroups = []; //运维-当前所属人员分组
1379
   itsmOrderScopeRadio;// 运维-工单范围
1379
   itsmOrderScopeRadio;// 运维-工单范围
1380
-
1381
   hsmsData: any = {
1380
   hsmsData: any = {
1382
     checkedHos: undefined,
1381
     checkedHos: undefined,
1383
     scopeGroups: [],
1382
     scopeGroups: [],
@@ -1423,6 +1422,7 @@ export class FuwutaiComponent implements OnInit {
1423
       orderScopeRadio: this.itsmOrderScopeRadio || '0',
1422
       orderScopeRadio: this.itsmOrderScopeRadio || '0',
1424
       mdv2Switch: scopeInfo.mdv2Switch === 1,
1423
       mdv2Switch: scopeInfo.mdv2Switch === 1,
1425
       allDuty: scopeInfo.allDuty === undefined ? 1 : scopeInfo.allDuty,
1424
       allDuty: scopeInfo.allDuty === undefined ? 1 : scopeInfo.allDuty,
1425
+			showReassign: scopeInfo.showReassign == null || scopeInfo.showReassign == 0 ? 0 : 1,
1426
     }
1426
     }
1427
     this.flagList.itsmFlag1 = this.itsmData.mdv2Switch;
1427
     this.flagList.itsmFlag1 = this.itsmData.mdv2Switch;
1428
     this.flagList.itsmFlag2 = this.itsmData.mdv2Switch;
1428
     this.flagList.itsmFlag2 = this.itsmData.mdv2Switch;
@@ -1456,6 +1456,7 @@ export class FuwutaiComponent implements OnInit {
1456
   }
1456
   }
1457
 
1457
 
1458
   showOrderScope() {
1458
   showOrderScope() {
1459
+		console.log(1111,this.itsmData)
1459
     this.showInitModal = true;
1460
     this.showInitModal = true;
1460
   }
1461
   }
1461
 
1462
 
@@ -2137,12 +2138,11 @@ export class FuwutaiComponent implements OnInit {
2137
             range: this.orderScopeRadio,
2138
             range: this.orderScopeRadio,
2138
             platform: 3,
2139
             platform: 3,
2139
             searchDays: 1,
2140
             searchDays: 1,
2140
-            keyWord: keyWords,
2141
+            keyWord: keyWords
2141
           },
2142
           },
2142
           idx: 0,
2143
           idx: 0,
2143
-          sum: 1,
2144
+          sum: 1
2144
         }
2145
         }
2145
-
2146
         if (this.unassignedBuilding.length && stateId == 1) {
2146
         if (this.unassignedBuilding.length && stateId == 1) {
2147
           postData.workOrderQuery.workOrder["deptIds"] = this.unassignedBuilding.toString();
2147
           postData.workOrderQuery.workOrder["deptIds"] = this.unassignedBuilding.toString();
2148
         }
2148
         }
@@ -2162,7 +2162,9 @@ export class FuwutaiComponent implements OnInit {
2162
           "queryTask": "storageAcceptReassign",
2162
           "queryTask": "storageAcceptReassign",
2163
           "assignee": this.tool.getCurrentUserId(),
2163
           "assignee": this.tool.getCurrentUserId(),
2164
           "deleteFlag": 0,
2164
           "deleteFlag": 0,
2165
+					"showReassign":null
2165
         }
2166
         }
2167
+				postData.incidentQuery.incident.showReassign = this.user.user.scope.showReassign==0 || !this.user.user.scope.showReassign ? undefined : this.user.user.scope.showReassign
2166
       }else if(stateId == 2){
2168
       }else if(stateId == 2){
2167
         postData.incidentQuery.incident = {
2169
         postData.incidentQuery.incident = {
2168
           // "groupIds": this.itsmData.allDuty == 1 ? undefined : (this.itsmData.scopeGroups.map(v => v.id).toString() || undefined),
2170
           // "groupIds": this.itsmData.allDuty == 1 ? undefined : (this.itsmData.scopeGroups.map(v => v.id).toString() || undefined),

+ 6 - 0
src/app/views/users-management/users-management.component.html

@@ -230,6 +230,12 @@
230
 <app-dialog-delete [delModal]="delModal" (hideDelModalEvent)="hideDelModal()" [btnLoading]="btnLoading" [cancenlLoading]="cancenlLoading"
230
 <app-dialog-delete [delModal]="delModal" (hideDelModalEvent)="hideDelModal()" [btnLoading]="btnLoading" [cancenlLoading]="cancenlLoading"
231
   (confirmDelEvent)="confirmDel()" (cancelDelEvent)="cancelDel()" content="是否删除企业微信同用户?" confirmTxt="是" cancelTxt="否">
231
   (confirmDelEvent)="confirmDel()" (cancelDelEvent)="cancelDel()" content="是否删除企业微信同用户?" confirmTxt="是" cancelTxt="否">
232
 </app-dialog-delete>
232
 </app-dialog-delete>
233
+
234
+<!-- 恢复账号 -->
235
+<app-dialog-delete [delModal]="recoverModal" (hideDelModalEvent)="hideRecoverModal()" [btnLoading]="recoverLoading"
236
+  (confirmDelEvent)="confirmRecover()" [content]="recoverContent" confirmTxt="恢复账号" >
237
+</app-dialog-delete>
238
+
233
 <!-- 重置密码模态框 -->
239
 <!-- 重置密码模态框 -->
234
 <app-dialog-delete [delModal]="resetModal" (hideDelModalEvent)="hideResetModal()" [btnLoading]="btnLoading" [cancenlLoading]="cancenlLoading"
240
 <app-dialog-delete [delModal]="resetModal" (hideDelModalEvent)="hideResetModal()" [btnLoading]="btnLoading" [cancenlLoading]="cancenlLoading"
235
   (confirmDelEvent)="confirmReset()" (cancelDelEvent)="cancelReset()" content="是否重置密码?">
241
   (confirmDelEvent)="confirmReset()" (cancelDelEvent)="cancelReset()" content="是否重置密码?">

+ 45 - 3
src/app/views/users-management/users-management.component.ts

@@ -63,6 +63,8 @@ export class UsersManagementComponent implements OnInit {
63
   promptModalShow: boolean; //操作提示框是否展示
63
   promptModalShow: boolean; //操作提示框是否展示
64
 
64
 
65
   btnLoading: boolean = false; //提交按钮loading状态
65
   btnLoading: boolean = false; //提交按钮loading状态
66
+	recoverLoading: boolean = false; //提交按钮loading状态
67
+	recoverModal: boolean = false; //恢复模态框
66
   wxRequired = false; //新增或编辑用户的时候,微信号是否必填
68
   wxRequired = false; //新增或编辑用户的时候,微信号是否必填
67
   changeInpSubject = new Subject(); //防抖
69
   changeInpSubject = new Subject(); //防抖
68
   changeInpCompanySubject = new Subject(); //防抖
70
   changeInpCompanySubject = new Subject(); //防抖
@@ -392,6 +394,8 @@ export class UsersManagementComponent implements OnInit {
392
     }
394
     }
393
   }
395
   }
394
   // 表单提交
396
   // 表单提交
397
+	recoverContent:any;
398
+	userData:any;
395
   submitForm(): void {
399
   submitForm(): void {
396
     var that = this;
400
     var that = this;
397
     for (const i in that.validateForm.controls) {
401
     for (const i in that.validateForm.controls) {
@@ -443,9 +447,13 @@ export class UsersManagementComponent implements OnInit {
443
         that.initForm();
447
         that.initForm();
444
         if (data.status == 200) {
448
         if (data.status == 200) {
445
           that.showPromptModal(that.add ? "新增" : "编辑", true, "");
449
           that.showPromptModal(that.add ? "新增" : "编辑", true, "");
446
-        } else {
447
-          that.showPromptModal(that.add ? "新增" : "编辑", false, data.msg);
448
-        }
450
+        } else if(data.status == 2002 || data.status == 2004){
451
+					this.userData = data
452
+					this.recoverContent = data.msg
453
+					this.recoverModal = true;
454
+        }else{
455
+					that.showPromptModal(that.add ? "新增" : "编辑", false, data.msg);
456
+				}
449
       });
457
       });
450
   }
458
   }
451
 
459
 
@@ -618,6 +626,40 @@ export class UsersManagementComponent implements OnInit {
618
         }
626
         }
619
       });
627
       });
620
   }
628
   }
629
+	
630
+	// 确认恢复
631
+	confirmRecover() {
632
+	  let that = this;
633
+		let query = {
634
+			account:'',
635
+			weiXin:''
636
+		}
637
+		if(this.userData.status==2002){
638
+			query.account = this.userData.data.account
639
+			delete query.weiXin
640
+		}else if (this.userData.status==2004){
641
+			query.weiXin = this.userData.data.weixin
642
+			delete query.account
643
+		}
644
+	  that.recoverLoading = true;
645
+	  that.mainService
646
+	    .recoveryUser(query)
647
+	    .subscribe((data) => {
648
+	      that.recoverLoading = false;
649
+	      that.hideRecoverModal();
650
+	      if (data["status"] == 200) {
651
+	        that.showPromptModal("恢复", true, "");
652
+	      } else {
653
+	        that.showPromptModal("恢复", false, data["msg"]);
654
+	      }
655
+	    });
656
+	}
657
+	
658
+	// 关闭恢复模态框
659
+	hideRecoverModal() {
660
+	  this.recoverModal = false;
661
+	}
662
+	
621
   // 关闭删除模态框
663
   // 关闭删除模态框
622
   hideDelModal() {
664
   hideDelModal() {
623
     this.delModal = false;
665
     this.delModal = false;