maotao 1 kuukausi sitten
vanhempi
commit
fa83b192f5

+ 9 - 5
src/app/components/incidentManagement/incident-handle-info-simple/incident-handle-info-simple.component.ts

@@ -36,14 +36,14 @@ export class IncidentHandleInfoSimpleComponent implements OnInit {
36
       if(v[0] === 'synergetic'){
36
       if(v[0] === 'synergetic'){
37
         this.getSynergeticList(v[1]);
37
         this.getSynergeticList(v[1]);
38
       }else if(v[0] === 'assetId'){
38
       }else if(v[0] === 'assetId'){
39
-        this.getAssetList(v[1]);
39
+        this.getAssetList('search', v[1]);
40
       }
40
       }
41
     });
41
     });
42
     this.init();
42
     this.init();
43
   }
43
   }
44
 
44
 
45
   init(){
45
   init(){
46
-    console.log('初始化')
46
+    console.log('初始化', this.incidentData)
47
     this.hosId = this.tool.getCurrentHospital().id;
47
     this.hosId = this.tool.getCurrentHospital().id;
48
     this.incidentDataCopy = cloneDeep(this.incidentData);
48
     this.incidentDataCopy = cloneDeep(this.incidentData);
49
     this.incidentDataCopy.synergetic = [];
49
     this.incidentDataCopy.synergetic = [];
@@ -51,7 +51,7 @@ export class IncidentHandleInfoSimpleComponent implements OnInit {
51
     this.getHandleCategorys();
51
     this.getHandleCategorys();
52
     this.getClosecodes();
52
     this.getClosecodes();
53
     this.getSynergeticList();
53
     this.getSynergeticList();
54
-    this.getAssetList();
54
+    this.getAssetList('load', '');
55
   }
55
   }
56
 
56
 
57
   // 边输边搜节流阀
57
   // 边输边搜节流阀
@@ -141,10 +141,10 @@ export class IncidentHandleInfoSimpleComponent implements OnInit {
141
 
141
 
142
   // 获取资产列表
142
   // 获取资产列表
143
   assetList: any = [];
143
   assetList: any = [];
144
-  getAssetList(keyword = '') {
144
+  getAssetList(type, keyword = '') {
145
     let postData = {
145
     let postData = {
146
       asset: {
146
       asset: {
147
-        hosId: this.hosId,
147
+        downHosId: this.hosId,
148
         name: keyword,
148
         name: keyword,
149
       },
149
       },
150
       idx: 0,
150
       idx: 0,
@@ -153,7 +153,11 @@ export class IncidentHandleInfoSimpleComponent implements OnInit {
153
     this.mainService
153
     this.mainService
154
       .getFetchDataList("simple/data", "asset", postData)
154
       .getFetchDataList("simple/data", "asset", postData)
155
       .subscribe((data) => {
155
       .subscribe((data) => {
156
+				this.isLoading = false;
156
         this.assetList = data.list;
157
         this.assetList = data.list;
158
+				if(this.incidentDataCopy.assetDTO && type=='load'){
159
+					this.incidentDataCopy.assetId = Number(this.incidentDataCopy.assetId)
160
+				}
157
       });
161
       });
158
   }
162
   }
159
 
163
 

+ 8 - 4
src/app/components/incidentManagement/incident-handle-info/incident-handle-info.component.ts

@@ -45,7 +45,7 @@ export class IncidentHandleInfoComponent implements OnInit, OnChanges {
45
       if(v[0] === 'synergetic'){
45
       if(v[0] === 'synergetic'){
46
         this.getSynergeticList(v[1]);
46
         this.getSynergeticList(v[1]);
47
       }else if(v[0] === 'assetId'){
47
       }else if(v[0] === 'assetId'){
48
-        this.getAssetList(v[1]);
48
+        this.getAssetList('search', v[1]);
49
       }else if(v[0] === 'category'){
49
       }else if(v[0] === 'category'){
50
         this.getIncidentCategoryList(v[1]);
50
         this.getIncidentCategoryList(v[1]);
51
       }
51
       }
@@ -70,7 +70,7 @@ export class IncidentHandleInfoComponent implements OnInit, OnChanges {
70
     this.getHandleCategorys();
70
     this.getHandleCategorys();
71
     this.getClosecodes();
71
     this.getClosecodes();
72
     this.getSynergeticList();
72
     this.getSynergeticList();
73
-    this.getAssetList();
73
+    this.getAssetList('load');
74
     this.getIncidentCategoryList('', true);
74
     this.getIncidentCategoryList('', true);
75
   }
75
   }
76
 
76
 
@@ -204,10 +204,10 @@ export class IncidentHandleInfoComponent implements OnInit, OnChanges {
204
 
204
 
205
   // 获取资产列表
205
   // 获取资产列表
206
   assetList: any = [];
206
   assetList: any = [];
207
-  getAssetList(keyword = '') {
207
+  getAssetList(type, keyword = '') {
208
     let postData = {
208
     let postData = {
209
       asset: {
209
       asset: {
210
-        hosId: this.hosId,
210
+        downHosId: this.hosId,
211
         name: keyword,
211
         name: keyword,
212
       },
212
       },
213
       idx: 0,
213
       idx: 0,
@@ -216,7 +216,11 @@ export class IncidentHandleInfoComponent implements OnInit, OnChanges {
216
     this.mainService
216
     this.mainService
217
       .getFetchDataList("simple/data", "asset", postData)
217
       .getFetchDataList("simple/data", "asset", postData)
218
       .subscribe((data) => {
218
       .subscribe((data) => {
219
+				this.isLoading = false;
219
         this.assetList = data.list;
220
         this.assetList = data.list;
221
+				if(this.incidentDataCopy.assetDTO && type=='load'){
222
+					this.incidentDataCopy.assetId = Number(this.incidentDataCopy.assetId)
223
+				}
220
       });
224
       });
221
   }
225
   }
222
 
226
 

+ 1 - 1
src/app/views/emergency-info/emergency-info.component.html

@@ -97,7 +97,7 @@
97
 						<td>{{ data.alarmIp || '-' }}</td>
97
 						<td>{{ data.alarmIp || '-' }}</td>
98
 						<td>{{ data.alarmUrgency?.name }}</td>
98
 						<td>{{ data.alarmUrgency?.name }}</td>
99
 						<td>{{ data.alarmActiveTime | date:'yyyy-MM-dd HH:mm:ss'}}</td>
99
 						<td>{{ data.alarmActiveTime | date:'yyyy-MM-dd HH:mm:ss'}}</td>
100
-						<td class="text-underline" (click)="detail($event, data)">{{ data.incidentSign || '-' }}</td>
100
+						<td class="text-underline" (click)="detail($event, data)">{{ data.incidentSign }}</td>
101
             <td>
101
             <td>
102
               <div class="coop">
102
               <div class="coop">
103
                 <span *ngIf="coopBtns.view" (click)="look(data)">查看</span>
103
                 <span *ngIf="coopBtns.view" (click)="look(data)">查看</span>

+ 3 - 0
src/app/views/emergency-info/emergency-info.component.ts

@@ -363,6 +363,9 @@ export class EmergencyInfoComponent implements OnInit {
363
 	detailModalShow = false; //弹窗开关
363
 	detailModalShow = false; //弹窗开关
364
 	detail(e, data) {
364
 	detail(e, data) {
365
 	  e.stopPropagation();
365
 	  e.stopPropagation();
366
+		if(!data.incidentSign){
367
+			return
368
+		}
366
 	  this.coopData = data;
369
 	  this.coopData = data;
367
 	  this.detailModalShow = true;
370
 	  this.detailModalShow = true;
368
 	}
371
 	}

+ 73 - 35
src/app/views/fuwutai/fuwutai.component.ts

@@ -954,9 +954,11 @@ export class FuwutaiComponent implements OnInit {
954
       });
954
       });
955
   }
955
   }
956
 	currentDept:any;
956
 	currentDept:any;
957
+	currentHospital:any;
957
   ngOnInit() {
958
   ngOnInit() {
958
     this.websocketLoading = true;
959
     this.websocketLoading = true;
959
 		this.currentDept = this.tool.getCurrentUserDept();
960
 		this.currentDept = this.tool.getCurrentUserDept();
961
+		this.currentHospital = this.tool.getCurrentHospital();
960
     this.coopBtns = this.tool.initCoopBtns(this.route);
962
     this.coopBtns = this.tool.initCoopBtns(this.route);
961
 		// console.log(8989899,this.coopBtns)
963
 		// console.log(8989899,this.coopBtns)
962
     //防抖
964
     //防抖
@@ -1939,6 +1941,7 @@ export class FuwutaiComponent implements OnInit {
1939
       });
1941
       });
1940
   }
1942
   }
1941
   rightTitleHandler(i) {
1943
   rightTitleHandler(i) {
1944
+		console.log(4444, i)
1942
     this.currentRTab = i;
1945
     this.currentRTab = i;
1943
     if (i === 0) {
1946
     if (i === 0) {
1944
       this.getWorkOrders(this.applyDept);
1947
       this.getWorkOrders(this.applyDept);
@@ -1999,7 +2002,7 @@ export class FuwutaiComponent implements OnInit {
1999
     if(!this.itsmData.mdv2Switch){
2002
     if(!this.itsmData.mdv2Switch){
2000
       return;
2003
       return;
2001
     }
2004
     }
2002
-    if (id == -1 || id === null || id === undefined && this.incidentModel.repairIncidentType === 'dept') {
2005
+    if ((id == -1 || id === null || id === undefined) && this.incidentModel.repairIncidentType === 'dept') {
2003
       this.itsmOrders = [];
2006
       this.itsmOrders = [];
2004
       return;
2007
       return;
2005
     }
2008
     }
@@ -2757,13 +2760,6 @@ export class FuwutaiComponent implements OnInit {
2757
 						case "governmentDuty":
2760
 						case "governmentDuty":
2758
 							this.showGovDutyConfig =  c.valueconfig
2761
 							this.showGovDutyConfig =  c.valueconfig
2759
 							break;
2762
 							break;
2760
-						case "cmdbRepair":
2761
-							if(c.valueconfig=='1'){
2762
-								this.cmdbRepair = true
2763
-							}else{
2764
-								this.cmdbRepair = false
2765
-							}
2766
-							break;	
2767
 					}
2763
 					}
2768
 				});
2764
 				});
2769
       } else {
2765
       } else {
@@ -2779,11 +2775,12 @@ export class FuwutaiComponent implements OnInit {
2779
 	// 获取资产列表
2775
 	// 获取资产列表
2780
 	assetData:any = [];
2776
 	assetData:any = [];
2781
 	getAssetData(name?){
2777
 	getAssetData(name?){
2778
+		console.log('nimadede===========', this.hospitalModel)
2782
 		let data = {
2779
 		let data = {
2783
 		  idx: 0,
2780
 		  idx: 0,
2784
 		  sum: 20,
2781
 		  sum: 20,
2785
 		  asset: {
2782
 		  asset: {
2786
-		    hosId: this.incidentModel.hosId,
2783
+		    downHosId: this.hospitalModel!=1 ? this.incidentModel.hosId : this.currentHospital.id,
2787
 		    name: name
2784
 		    name: name
2788
 		  },
2785
 		  },
2789
 		};
2786
 		};
@@ -2863,6 +2860,13 @@ export class FuwutaiComponent implements OnInit {
2863
 									break;	
2860
 									break;	
2864
 								case "applicantMustFillIn":
2861
 								case "applicantMustFillIn":
2865
 									this.applicantMustFillIn = c[1]
2862
 									this.applicantMustFillIn = c[1]
2863
+									break;
2864
+								case "cmdbRepair":
2865
+									if(c[1]=='1'){
2866
+										this.cmdbRepair = true
2867
+									}else{
2868
+										this.cmdbRepair = false
2869
+									}
2866
 									break;	
2870
 									break;	
2867
 							}
2871
 							}
2868
 							if(type==1){
2872
 							if(type==1){
@@ -2878,6 +2882,9 @@ export class FuwutaiComponent implements OnInit {
2878
 						if(this.hospitalModel==1){
2882
 						if(this.hospitalModel==1){
2879
 							this.searchApplicationBuilding()
2883
 							this.searchApplicationBuilding()
2880
 						}
2884
 						}
2885
+						if(this.cmdbRepair && this.hospitalModel==1){
2886
+							this.getAssetData()
2887
+						}
2881
 					}
2888
 					}
2882
 				}
2889
 				}
2883
 			});
2890
 			});
@@ -3559,7 +3566,7 @@ export class FuwutaiComponent implements OnInit {
3559
         hospital: this.isRelatedDepartment ? undefined : { id: this.incidentModel.hosId },
3566
         hospital: this.isRelatedDepartment ? undefined : { id: this.incidentModel.hosId },
3560
         dept: this.isRelatedDepartment ? { id: this.incidentModel.department } : undefined,
3567
         dept: this.isRelatedDepartment ? { id: this.incidentModel.department } : undefined,
3561
         name: keyWord,
3568
         name: keyWord,
3562
-				phone: this.incidentModel.incomingPhone || undefined
3569
+				// phone: this.incidentModel.incomingPhone || undefined
3563
         // simpleQuery: true,
3570
         // simpleQuery: true,
3564
       },
3571
       },
3565
     };
3572
     };
@@ -3588,25 +3595,35 @@ export class FuwutaiComponent implements OnInit {
3588
 			this.userPriorityDTO = null
3595
 			this.userPriorityDTO = null
3589
 		}
3596
 		}
3590
 		let orders = [];
3597
 		let orders = [];
3591
-		if(this.addressDTO&&this.addressDTO.orders){
3598
+		let id = [];
3599
+		if(this.addressDTO&&this.addressDTO.id){
3592
 			orders.push(this.addressDTO.orders)
3600
 			orders.push(this.addressDTO.orders)
3601
+			id.push(this.addressDTO.id)
3593
 		}
3602
 		}
3594
-		if(this.deptPriorityDTO&&this.deptPriorityDTO.orders){
3603
+		if(this.deptPriorityDTO&&this.deptPriorityDTO.id){
3595
 			orders.push(this.deptPriorityDTO.orders)
3604
 			orders.push(this.deptPriorityDTO.orders)
3605
+			id.push(this.deptPriorityDTO.id)
3596
 		}
3606
 		}
3597
-		if(this.userPriorityDTO&&this.userPriorityDTO.orders){
3607
+		if(this.userPriorityDTO&&this.userPriorityDTO.id){
3598
 			orders.push(this.userPriorityDTO.orders)
3608
 			orders.push(this.userPriorityDTO.orders)
3609
+			id.push(this.userPriorityDTO.id)
3599
 		}
3610
 		}
3600
-		if(this.malPriorityDTO&&this.malPriorityDTO.orders){
3611
+		if(this.malPriorityDTO&&this.malPriorityDTO.id){
3601
 			orders.push(this.malPriorityDTO.orders)
3612
 			orders.push(this.malPriorityDTO.orders)
3613
+			id.push(this.malPriorityDTO.id)
3602
 		}
3614
 		}
3603
 		let minNumber = Math.min(...orders)
3615
 		let minNumber = Math.min(...orders)
3616
+		let index = orders.indexOf(minNumber) 
3604
 		console.log('最小值的orders', orders, minNumber)
3617
 		console.log('最小值的orders', orders, minNumber)
3605
 		setTimeout(_=>{
3618
 		setTimeout(_=>{
3606
-			this.incidentModel.priorityId = minNumber != Infinity ? minNumber : null
3619
+			this.incidentModel.priorityId = minNumber != Infinity ? id[index] : null
3607
 		})
3620
 		})
3608
 		if(this.incidentModel.repairIncidentType === 'public'){
3621
 		if(this.incidentModel.repairIncidentType === 'public'){
3609
 			this.getItsmOrders('')
3622
 			this.getItsmOrders('')
3623
+			if(this.cmdbRepair){
3624
+				this.incidentModel.assetId = null;
3625
+				this.getAssetData()
3626
+			}
3610
 		}
3627
 		}
3611
   }
3628
   }
3612
   // 故障现象列表
3629
   // 故障现象列表
@@ -3684,22 +3701,28 @@ export class FuwutaiComponent implements OnInit {
3684
 							this.malPriorityDTO = null
3701
 							this.malPriorityDTO = null
3685
 						}
3702
 						}
3686
 						let orders = [];
3703
 						let orders = [];
3687
-						if(this.addressDTO&&this.addressDTO.orders){
3704
+						let id = [];
3705
+						if(this.addressDTO&&this.addressDTO.id){
3688
 							orders.push(this.addressDTO.orders)
3706
 							orders.push(this.addressDTO.orders)
3707
+							id.push(this.addressDTO.id)
3689
 						}
3708
 						}
3690
-						if(this.deptPriorityDTO&&this.deptPriorityDTO.orders){
3709
+						if(this.deptPriorityDTO&&this.deptPriorityDTO.id){
3691
 							orders.push(this.deptPriorityDTO.orders)
3710
 							orders.push(this.deptPriorityDTO.orders)
3711
+							id.push(this.deptPriorityDTO.id)
3692
 						}
3712
 						}
3693
-						if(this.userPriorityDTO&&this.userPriorityDTO.orders){
3713
+						if(this.userPriorityDTO&&this.userPriorityDTO.id){
3694
 							orders.push(this.userPriorityDTO.orders)
3714
 							orders.push(this.userPriorityDTO.orders)
3715
+							id.push(this.userPriorityDTO.id)
3695
 						}
3716
 						}
3696
-						if(this.malPriorityDTO&&this.malPriorityDTO.orders){
3717
+						if(this.malPriorityDTO&&this.malPriorityDTO.id){
3697
 							orders.push(this.malPriorityDTO.orders)
3718
 							orders.push(this.malPriorityDTO.orders)
3719
+							id.push(this.malPriorityDTO.id)
3698
 						}
3720
 						}
3699
 						let minNumber = Math.min(...orders)
3721
 						let minNumber = Math.min(...orders)
3700
-						console.log('最小值的orders', orders, minNumber)
3722
+						let index = orders.indexOf(minNumber)
3723
+						console.log('最小值的orders', minNumber)
3701
 						setTimeout(_=>{
3724
 						setTimeout(_=>{
3702
-							this.incidentModel.priorityId = minNumber != Infinity ? minNumber : null
3725
+							this.incidentModel.priorityId = minNumber != Infinity ? id[index] : null
3703
 						})
3726
 						})
3704
             // 根据院区和故障现象带出责任部门,优先级,维修人/组
3727
             // 根据院区和故障现象带出责任部门,优先级,维修人/组
3705
             this.incidentModel.duty = this.incidentCategoryConfig.dutyDTO;
3728
             this.incidentModel.duty = this.incidentCategoryConfig.dutyDTO;
@@ -4207,7 +4230,10 @@ export class FuwutaiComponent implements OnInit {
4207
   changeApply(e) {
4230
   changeApply(e) {
4208
     this.changeApplicationDepartment("&same&");
4231
     this.changeApplicationDepartment("&same&");
4209
     this.defaultInspectFn();
4232
     this.defaultInspectFn();
4210
-
4233
+		if(this.cmdbRepair){
4234
+			this.incidentModel.assetId = null;
4235
+			this.getAssetData()
4236
+		}
4211
     if(this.applyDept && this.currentTabIndex !== '故障报修'){
4237
     if(this.applyDept && this.currentTabIndex !== '故障报修'){
4212
       this.rightTitle_tab = [
4238
       this.rightTitle_tab = [
4213
         { id: 0, name: '近期配送' },
4239
         { id: 0, name: '近期配送' },
@@ -4238,22 +4264,28 @@ export class FuwutaiComponent implements OnInit {
4238
 			this.deptPriorityDTO = null
4264
 			this.deptPriorityDTO = null
4239
 		}
4265
 		}
4240
 		let orders = [];
4266
 		let orders = [];
4241
-		if(this.addressDTO&&this.addressDTO.orders){
4267
+		let id = [];
4268
+		if(this.addressDTO&&this.addressDTO.id){
4242
 			orders.push(this.addressDTO.orders)
4269
 			orders.push(this.addressDTO.orders)
4270
+			id.push(this.addressDTO.id)
4243
 		}
4271
 		}
4244
-		if(this.deptPriorityDTO&&this.deptPriorityDTO.orders){
4272
+		if(this.deptPriorityDTO&&this.deptPriorityDTO.id){
4245
 			orders.push(this.deptPriorityDTO.orders)
4273
 			orders.push(this.deptPriorityDTO.orders)
4274
+			id.push(this.deptPriorityDTO.id)
4246
 		}
4275
 		}
4247
-		if(this.userPriorityDTO&&this.userPriorityDTO.orders){
4276
+		if(this.userPriorityDTO&&this.userPriorityDTO.id){
4248
 			orders.push(this.userPriorityDTO.orders)
4277
 			orders.push(this.userPriorityDTO.orders)
4278
+			id.push(this.userPriorityDTO.id)
4249
 		}
4279
 		}
4250
-		if(this.malPriorityDTO&&this.malPriorityDTO.orders){
4280
+		if(this.malPriorityDTO&&this.malPriorityDTO.id){
4251
 			orders.push(this.malPriorityDTO.orders)
4281
 			orders.push(this.malPriorityDTO.orders)
4282
+			id.push(this.malPriorityDTO.id)
4252
 		}
4283
 		}
4253
 		let minNumber = Math.min(...orders)
4284
 		let minNumber = Math.min(...orders)
4254
-		console.log('最小值的orders', orders, minNumber)
4285
+		let index = orders.indexOf(minNumber) 
4286
+		console.log('最小值的orders', index)
4255
 		setTimeout(_=>{
4287
 		setTimeout(_=>{
4256
-			this.incidentModel.priorityId = minNumber != Infinity ? minNumber : null
4288
+			this.incidentModel.priorityId = minNumber != Infinity ? id[index] : null
4257
 		})
4289
 		})
4258
     if(this.incidentModel.department && this.currentTabIndex === '故障报修'){
4290
     if(this.incidentModel.department && this.currentTabIndex === '故障报修'){
4259
       this.rightTitle_tab = [
4291
       this.rightTitle_tab = [
@@ -7062,8 +7094,8 @@ export class FuwutaiComponent implements OnInit {
7062
 
7094
 
7063
   // 选择地址
7095
   // 选择地址
7064
 	addressDTO:any;
7096
 	addressDTO:any;
7065
-  selectAddress(name, id){
7066
-		let item = this.addressList.find(i=>i.id == id)
7097
+  selectAddress(name, idx){
7098
+		let item = this.addressList.find(i=>i.id == idx)
7067
 		console.log('选中的地址11111',item);
7099
 		console.log('选中的地址11111',item);
7068
 		if(item && item.priority){
7100
 		if(item && item.priority){
7069
 			this.addressDTO = item.priority
7101
 			this.addressDTO = item.priority
@@ -7071,22 +7103,28 @@ export class FuwutaiComponent implements OnInit {
7071
 			this.addressDTO = null
7103
 			this.addressDTO = null
7072
 		}
7104
 		}
7073
 		let orders = [];
7105
 		let orders = [];
7074
-		if(this.addressDTO&&this.addressDTO.orders){
7106
+		let id = [];
7107
+		if(this.addressDTO&&this.addressDTO.id){
7075
 			orders.push(this.addressDTO.orders)
7108
 			orders.push(this.addressDTO.orders)
7109
+			id.push(this.addressDTO.id)
7076
 		}
7110
 		}
7077
-		if(this.deptPriorityDTO&&this.deptPriorityDTO.orders){
7111
+		if(this.deptPriorityDTO&&this.deptPriorityDTO.id){
7078
 			orders.push(this.deptPriorityDTO.orders)
7112
 			orders.push(this.deptPriorityDTO.orders)
7113
+			id.push(this.deptPriorityDTO.id)
7079
 		}
7114
 		}
7080
-		if(this.userPriorityDTO&&this.userPriorityDTO.orders){
7115
+		if(this.userPriorityDTO&&this.userPriorityDTO.id){
7081
 			orders.push(this.userPriorityDTO.orders)
7116
 			orders.push(this.userPriorityDTO.orders)
7117
+			id.push(this.userPriorityDTO.id)
7082
 		}
7118
 		}
7083
-		if(this.malPriorityDTO&&this.malPriorityDTO.orders){
7119
+		if(this.malPriorityDTO&&this.malPriorityDTO.id){
7084
 			orders.push(this.malPriorityDTO.orders)
7120
 			orders.push(this.malPriorityDTO.orders)
7121
+			id.push(this.malPriorityDTO.id)
7085
 		}
7122
 		}
7086
 		let minNumber = Math.min(...orders)
7123
 		let minNumber = Math.min(...orders)
7124
+		let index = orders.indexOf(minNumber) 
7087
 		console.log('最小值的orders', orders, minNumber)
7125
 		console.log('最小值的orders', orders, minNumber)
7088
 		setTimeout(_=>{
7126
 		setTimeout(_=>{
7089
-			this.incidentModel.priorityId = minNumber != Infinity ? minNumber : null
7127
+			this.incidentModel.priorityId = minNumber != Infinity ? id[index] : null
7090
 		})
7128
 		})
7091
     this.incidentModel.houseNumber = name;
7129
     this.incidentModel.houseNumber = name;
7092
     this.isShowAddressList = false;
7130
     this.isShowAddressList = false;

+ 3 - 3
src/app/views/hushijiandan/hushijiandan.component.html

@@ -2414,9 +2414,9 @@
2414
     <div class="content">
2414
     <div class="content">
2415
       <form nz-form [formGroup]="validateBxForm" class="bxFormAdd" (ngSubmit)="confirmBx()">
2415
       <form nz-form [formGroup]="validateBxForm" class="bxFormAdd" (ngSubmit)="confirmBx()">
2416
         <nz-form-item *ngIf="cmdbRepair">
2416
         <nz-form-item *ngIf="cmdbRepair">
2417
-          <nz-form-label [nzSm]="4" [nzXs]="4" nzFor="contacts">资产</nz-form-label>
2417
+          <nz-form-label [nzSm]="4" [nzXs]="4" nzFor="assetId">资产</nz-form-label>
2418
           <nz-form-control style="display: inline-block;">
2418
           <nz-form-control style="display: inline-block;">
2419
-            <nz-select style="width:168px;margin-right: 8px;" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch nzPlaceHolder="请选择资产" (nzOnSearch)="changeAsset($event)" formControlName="assetId">
2419
+            <nz-select style="width:168px;margin-right: 8px;" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch nzPlaceHolder="请选择资产" (nzOnSearch)="changeAsset($event)" formControlName="assetId" (ngModelChange)="changeAssetData($event)">
2420
             	<ng-container *ngFor="let option of assetData">
2420
             	<ng-container *ngFor="let option of assetData">
2421
             		<nz-option *ngIf="!isLoading" [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
2421
             		<nz-option *ngIf="!isLoading" [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
2422
             	</ng-container>
2422
             	</ng-container>
@@ -2428,7 +2428,7 @@
2428
         
2428
         
2429
           <nz-form-label nzFor="contactsInformation">故障现象</nz-form-label>
2429
           <nz-form-label nzFor="contactsInformation">故障现象</nz-form-label>
2430
           <nz-form-control style="display: inline-block;">
2430
           <nz-form-control style="display: inline-block;">
2431
-            <nz-select style="width:185px;" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch (nzOnSearch)="changeCommonInp($event)" nzPlaceHolder="请选择故障现象" formControlName="category" (ngModelChange)="changeApplyCategory($event)">
2431
+            <nz-select style="width:185px;" [nzDropdownMatchSelectWidth]="false" nzShowSearch nzPlaceHolder="请选择故障现象" formControlName="category" (ngModelChange)="changeApplyCategory($event)">
2432
             	<ng-container *ngFor="let option of applicationCategoryList">
2432
             	<ng-container *ngFor="let option of applicationCategoryList">
2433
             		<nz-option *ngIf="!isLoading" [nzLabel]="option.mutiCategory" [nzValue]="option.id"></nz-option>
2433
             		<nz-option *ngIf="!isLoading" [nzLabel]="option.mutiCategory" [nzValue]="option.id"></nz-option>
2434
             	</ng-container>
2434
             	</ng-container>

+ 18 - 8
src/app/views/hushijiandan/hushijiandan.component.ts

@@ -1050,7 +1050,6 @@ export class HushijiandanComponent implements OnInit {
1050
 					if(result.list[0].valueconfig==1){
1050
 					if(result.list[0].valueconfig==1){
1051
 						this.cmdbRepair = true
1051
 						this.cmdbRepair = true
1052
 						this.getAssetData();
1052
 						this.getAssetData();
1053
-						this.searchApplicationCategory();
1054
 					}else{
1053
 					}else{
1055
 						this.cmdbRepair = false
1054
 						this.cmdbRepair = false
1056
 					}
1055
 					}
@@ -1059,6 +1058,7 @@ export class HushijiandanComponent implements OnInit {
1059
 	}
1058
 	}
1060
 	
1059
 	
1061
 	changeCommonInp(e) {
1060
 	changeCommonInp(e) {
1061
+		return
1062
 	  this.changeCommonInpSubject.next(e);
1062
 	  this.changeCommonInpSubject.next(e);
1063
 	}
1063
 	}
1064
 	changeApplyCategory(e){
1064
 	changeApplyCategory(e){
@@ -1075,12 +1075,17 @@ export class HushijiandanComponent implements OnInit {
1075
 	// 故障现象列表
1075
 	// 故障现象列表
1076
 	applicationCategoryList:any[] = [];
1076
 	applicationCategoryList:any[] = [];
1077
 	searchApplicationCategory(keyWord?) {
1077
 	searchApplicationCategory(keyWord?) {
1078
-	  let postData = {
1079
-	    category: {
1080
-	      category: keyWord,
1081
-	      selectType: 'mutlQuery',
1082
-	      hierarchy: 3,//只差有三级的故障现象列表
1083
-	    },
1078
+		let item = this.assetData.find(i=> i.id == this.validateBxForm.value.assetId)
1079
+		if(!item.assetProductDTO.incidentCategoryIds){
1080
+			return
1081
+		}
1082
+		let postData = {
1083
+			incidentCategoryIds: item.assetProductDTO.incidentCategoryIds,
1084
+	   //  category: {
1085
+	   //    category: keyWord,
1086
+	   //    selectType: 'mutlQuery',
1087
+				// hierarchy: 3,//只差有三级的故障现象列表
1088
+	   //  },
1084
 	  };
1089
 	  };
1085
 	  console.log(postData);
1090
 	  console.log(postData);
1086
 	  this.isLoading = true;
1091
 	  this.isLoading = true;
@@ -1097,6 +1102,11 @@ export class HushijiandanComponent implements OnInit {
1097
 	changeAsset(e){
1102
 	changeAsset(e){
1098
 		this.changeAssetInpSubject.next(e);
1103
 		this.changeAssetInpSubject.next(e);
1099
 	}
1104
 	}
1105
+	// 选择资产
1106
+	changeAssetData(e){
1107
+		this.validateBxForm.controls.category.setValue(null)
1108
+		this.searchApplicationCategory();
1109
+	}
1100
 	
1110
 	
1101
 	// 获取资产列表
1111
 	// 获取资产列表
1102
 	assetData:any = [];
1112
 	assetData:any = [];
@@ -1105,7 +1115,7 @@ export class HushijiandanComponent implements OnInit {
1105
 		  idx: 0,
1115
 		  idx: 0,
1106
 		  sum: 20,
1116
 		  sum: 20,
1107
 		  asset: {
1117
 		  asset: {
1108
-		    hosId: this.currentHospital.id,
1118
+		    downHosId: this.currentHospital.id,
1109
 		    name: name
1119
 		    name: name
1110
 		  },
1120
 		  },
1111
 		};
1121
 		};

+ 17 - 5
src/app/views/main/main.component.ts

@@ -956,7 +956,7 @@ export class MainComponent implements OnInit, OnDestroy {
956
 	  // if(!this.itsmData.mdv2Switch){
956
 	  // if(!this.itsmData.mdv2Switch){
957
 	  //   return;
957
 	  //   return;
958
 	  // }
958
 	  // }
959
-	  if (id == -1 || id === null || id === undefined && this.incidentModel.repairIncidentType === 'dept') {
959
+	  if ((id == -1 || id === null || id === undefined ) && this.incidentModel.repairIncidentType === 'dept') {
960
 	    this.itsmOrders = [];
960
 	    this.itsmOrders = [];
961
 	    return;
961
 	    return;
962
 	  }
962
 	  }
@@ -1264,6 +1264,10 @@ export class MainComponent implements OnInit, OnDestroy {
1264
 	  }
1264
 	  }
1265
 		if(this.incidentModel.repairIncidentType === 'public'){
1265
 		if(this.incidentModel.repairIncidentType === 'public'){
1266
 			this.getItsmOrders('')
1266
 			this.getItsmOrders('')
1267
+			if(this.cmdbRepair){
1268
+				this.incidentModel.assetId = null;
1269
+				this.getAssetData()
1270
+			}
1267
 		}
1271
 		}
1268
 	}
1272
 	}
1269
 	// 故障现象列表
1273
 	// 故障现象列表
@@ -1874,6 +1878,10 @@ export class MainComponent implements OnInit, OnDestroy {
1874
 	// 配送-选择科室
1878
 	// 配送-选择科室
1875
 	changeApply(e) {
1879
 	changeApply(e) {
1876
 	  console.log(e, this.applicationDepartmentList);
1880
 	  console.log(e, this.applicationDepartmentList);
1881
+		if(this.cmdbRepair){
1882
+			this.incidentModel.assetId = null;
1883
+			this.getAssetData()
1884
+		}
1877
 	  this.changeApplicationDepartment("&same&");
1885
 	  this.changeApplicationDepartment("&same&");
1878
 	  if(this.applyDept && this.currentTabIndex !== '故障报修'){
1886
 	  if(this.applyDept && this.currentTabIndex !== '故障报修'){
1879
 	    this.rightTitle_tab = [
1887
 	    this.rightTitle_tab = [
@@ -3971,6 +3979,10 @@ export class MainComponent implements OnInit, OnDestroy {
3971
 							}
3979
 							}
3972
 							this.searchApplicationBuilding()
3980
 							this.searchApplicationBuilding()
3973
 						}
3981
 						}
3982
+						
3983
+						if(this.cmdbRepair && this.hospitalModel==1){
3984
+							this.getAssetData()
3985
+						}
3974
 					}
3986
 					}
3975
 				}
3987
 				}
3976
 			});
3988
 			});
@@ -3983,14 +3995,14 @@ export class MainComponent implements OnInit, OnDestroy {
3983
   // 获取资产列表
3995
   // 获取资产列表
3984
 	assetData:any = [];
3996
 	assetData:any = [];
3985
 	getAssetData(name?){
3997
 	getAssetData(name?){
3986
-		if(!this.incidentModel.hosId){
3987
-			return
3988
-		}
3998
+		// if(!this.incidentModel.hosId){
3999
+		// 	return
4000
+		// }
3989
 		let data = {
4001
 		let data = {
3990
 		  idx: 0,
4002
 		  idx: 0,
3991
 		  sum: 20,
4003
 		  sum: 20,
3992
 		  asset: {
4004
 		  asset: {
3993
-		    hosId: this.incidentModel.hosId,
4005
+		    hosId: this.hospitalModel!=1 ? this.incidentModel.hosId : this.currentHospital.id,
3994
 		    name: name
4006
 		    name: name
3995
 		  },
4007
 		  },
3996
 		};
4008
 		};