maotao 1 ヶ月 前
コミット
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 36
       if(v[0] === 'synergetic'){
37 37
         this.getSynergeticList(v[1]);
38 38
       }else if(v[0] === 'assetId'){
39
-        this.getAssetList(v[1]);
39
+        this.getAssetList('search', v[1]);
40 40
       }
41 41
     });
42 42
     this.init();
43 43
   }
44 44
 
45 45
   init(){
46
-    console.log('初始化')
46
+    console.log('初始化', this.incidentData)
47 47
     this.hosId = this.tool.getCurrentHospital().id;
48 48
     this.incidentDataCopy = cloneDeep(this.incidentData);
49 49
     this.incidentDataCopy.synergetic = [];
@@ -51,7 +51,7 @@ export class IncidentHandleInfoSimpleComponent implements OnInit {
51 51
     this.getHandleCategorys();
52 52
     this.getClosecodes();
53 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 143
   assetList: any = [];
144
-  getAssetList(keyword = '') {
144
+  getAssetList(type, keyword = '') {
145 145
     let postData = {
146 146
       asset: {
147
-        hosId: this.hosId,
147
+        downHosId: this.hosId,
148 148
         name: keyword,
149 149
       },
150 150
       idx: 0,
@@ -153,7 +153,11 @@ export class IncidentHandleInfoSimpleComponent implements OnInit {
153 153
     this.mainService
154 154
       .getFetchDataList("simple/data", "asset", postData)
155 155
       .subscribe((data) => {
156
+				this.isLoading = false;
156 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 45
       if(v[0] === 'synergetic'){
46 46
         this.getSynergeticList(v[1]);
47 47
       }else if(v[0] === 'assetId'){
48
-        this.getAssetList(v[1]);
48
+        this.getAssetList('search', v[1]);
49 49
       }else if(v[0] === 'category'){
50 50
         this.getIncidentCategoryList(v[1]);
51 51
       }
@@ -70,7 +70,7 @@ export class IncidentHandleInfoComponent implements OnInit, OnChanges {
70 70
     this.getHandleCategorys();
71 71
     this.getClosecodes();
72 72
     this.getSynergeticList();
73
-    this.getAssetList();
73
+    this.getAssetList('load');
74 74
     this.getIncidentCategoryList('', true);
75 75
   }
76 76
 
@@ -204,10 +204,10 @@ export class IncidentHandleInfoComponent implements OnInit, OnChanges {
204 204
 
205 205
   // 获取资产列表
206 206
   assetList: any = [];
207
-  getAssetList(keyword = '') {
207
+  getAssetList(type, keyword = '') {
208 208
     let postData = {
209 209
       asset: {
210
-        hosId: this.hosId,
210
+        downHosId: this.hosId,
211 211
         name: keyword,
212 212
       },
213 213
       idx: 0,
@@ -216,7 +216,11 @@ export class IncidentHandleInfoComponent implements OnInit, OnChanges {
216 216
     this.mainService
217 217
       .getFetchDataList("simple/data", "asset", postData)
218 218
       .subscribe((data) => {
219
+				this.isLoading = false;
219 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 97
 						<td>{{ data.alarmIp || '-' }}</td>
98 98
 						<td>{{ data.alarmUrgency?.name }}</td>
99 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 101
             <td>
102 102
               <div class="coop">
103 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 363
 	detailModalShow = false; //弹窗开关
364 364
 	detail(e, data) {
365 365
 	  e.stopPropagation();
366
+		if(!data.incidentSign){
367
+			return
368
+		}
366 369
 	  this.coopData = data;
367 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 956
 	currentDept:any;
957
+	currentHospital:any;
957 958
   ngOnInit() {
958 959
     this.websocketLoading = true;
959 960
 		this.currentDept = this.tool.getCurrentUserDept();
961
+		this.currentHospital = this.tool.getCurrentHospital();
960 962
     this.coopBtns = this.tool.initCoopBtns(this.route);
961 963
 		// console.log(8989899,this.coopBtns)
962 964
     //防抖
@@ -1939,6 +1941,7 @@ export class FuwutaiComponent implements OnInit {
1939 1941
       });
1940 1942
   }
1941 1943
   rightTitleHandler(i) {
1944
+		console.log(4444, i)
1942 1945
     this.currentRTab = i;
1943 1946
     if (i === 0) {
1944 1947
       this.getWorkOrders(this.applyDept);
@@ -1999,7 +2002,7 @@ export class FuwutaiComponent implements OnInit {
1999 2002
     if(!this.itsmData.mdv2Switch){
2000 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 2006
       this.itsmOrders = [];
2004 2007
       return;
2005 2008
     }
@@ -2757,13 +2760,6 @@ export class FuwutaiComponent implements OnInit {
2757 2760
 						case "governmentDuty":
2758 2761
 							this.showGovDutyConfig =  c.valueconfig
2759 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 2765
       } else {
@@ -2779,11 +2775,12 @@ export class FuwutaiComponent implements OnInit {
2779 2775
 	// 获取资产列表
2780 2776
 	assetData:any = [];
2781 2777
 	getAssetData(name?){
2778
+		console.log('nimadede===========', this.hospitalModel)
2782 2779
 		let data = {
2783 2780
 		  idx: 0,
2784 2781
 		  sum: 20,
2785 2782
 		  asset: {
2786
-		    hosId: this.incidentModel.hosId,
2783
+		    downHosId: this.hospitalModel!=1 ? this.incidentModel.hosId : this.currentHospital.id,
2787 2784
 		    name: name
2788 2785
 		  },
2789 2786
 		};
@@ -2863,6 +2860,13 @@ export class FuwutaiComponent implements OnInit {
2863 2860
 									break;	
2864 2861
 								case "applicantMustFillIn":
2865 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 2870
 									break;	
2867 2871
 							}
2868 2872
 							if(type==1){
@@ -2878,6 +2882,9 @@ export class FuwutaiComponent implements OnInit {
2878 2882
 						if(this.hospitalModel==1){
2879 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 3566
         hospital: this.isRelatedDepartment ? undefined : { id: this.incidentModel.hosId },
3560 3567
         dept: this.isRelatedDepartment ? { id: this.incidentModel.department } : undefined,
3561 3568
         name: keyWord,
3562
-				phone: this.incidentModel.incomingPhone || undefined
3569
+				// phone: this.incidentModel.incomingPhone || undefined
3563 3570
         // simpleQuery: true,
3564 3571
       },
3565 3572
     };
@@ -3588,25 +3595,35 @@ export class FuwutaiComponent implements OnInit {
3588 3595
 			this.userPriorityDTO = null
3589 3596
 		}
3590 3597
 		let orders = [];
3591
-		if(this.addressDTO&&this.addressDTO.orders){
3598
+		let id = [];
3599
+		if(this.addressDTO&&this.addressDTO.id){
3592 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 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 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 3612
 			orders.push(this.malPriorityDTO.orders)
3613
+			id.push(this.malPriorityDTO.id)
3602 3614
 		}
3603 3615
 		let minNumber = Math.min(...orders)
3616
+		let index = orders.indexOf(minNumber) 
3604 3617
 		console.log('最小值的orders', orders, minNumber)
3605 3618
 		setTimeout(_=>{
3606
-			this.incidentModel.priorityId = minNumber != Infinity ? minNumber : null
3619
+			this.incidentModel.priorityId = minNumber != Infinity ? id[index] : null
3607 3620
 		})
3608 3621
 		if(this.incidentModel.repairIncidentType === 'public'){
3609 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 3701
 							this.malPriorityDTO = null
3685 3702
 						}
3686 3703
 						let orders = [];
3687
-						if(this.addressDTO&&this.addressDTO.orders){
3704
+						let id = [];
3705
+						if(this.addressDTO&&this.addressDTO.id){
3688 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 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 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 3718
 							orders.push(this.malPriorityDTO.orders)
3719
+							id.push(this.malPriorityDTO.id)
3698 3720
 						}
3699 3721
 						let minNumber = Math.min(...orders)
3700
-						console.log('最小值的orders', orders, minNumber)
3722
+						let index = orders.indexOf(minNumber)
3723
+						console.log('最小值的orders', minNumber)
3701 3724
 						setTimeout(_=>{
3702
-							this.incidentModel.priorityId = minNumber != Infinity ? minNumber : null
3725
+							this.incidentModel.priorityId = minNumber != Infinity ? id[index] : null
3703 3726
 						})
3704 3727
             // 根据院区和故障现象带出责任部门,优先级,维修人/组
3705 3728
             this.incidentModel.duty = this.incidentCategoryConfig.dutyDTO;
@@ -4207,7 +4230,10 @@ export class FuwutaiComponent implements OnInit {
4207 4230
   changeApply(e) {
4208 4231
     this.changeApplicationDepartment("&same&");
4209 4232
     this.defaultInspectFn();
4210
-
4233
+		if(this.cmdbRepair){
4234
+			this.incidentModel.assetId = null;
4235
+			this.getAssetData()
4236
+		}
4211 4237
     if(this.applyDept && this.currentTabIndex !== '故障报修'){
4212 4238
       this.rightTitle_tab = [
4213 4239
         { id: 0, name: '近期配送' },
@@ -4238,22 +4264,28 @@ export class FuwutaiComponent implements OnInit {
4238 4264
 			this.deptPriorityDTO = null
4239 4265
 		}
4240 4266
 		let orders = [];
4241
-		if(this.addressDTO&&this.addressDTO.orders){
4267
+		let id = [];
4268
+		if(this.addressDTO&&this.addressDTO.id){
4242 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 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 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 4281
 			orders.push(this.malPriorityDTO.orders)
4282
+			id.push(this.malPriorityDTO.id)
4252 4283
 		}
4253 4284
 		let minNumber = Math.min(...orders)
4254
-		console.log('最小值的orders', orders, minNumber)
4285
+		let index = orders.indexOf(minNumber) 
4286
+		console.log('最小值的orders', index)
4255 4287
 		setTimeout(_=>{
4256
-			this.incidentModel.priorityId = minNumber != Infinity ? minNumber : null
4288
+			this.incidentModel.priorityId = minNumber != Infinity ? id[index] : null
4257 4289
 		})
4258 4290
     if(this.incidentModel.department && this.currentTabIndex === '故障报修'){
4259 4291
       this.rightTitle_tab = [
@@ -7062,8 +7094,8 @@ export class FuwutaiComponent implements OnInit {
7062 7094
 
7063 7095
   // 选择地址
7064 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 7099
 		console.log('选中的地址11111',item);
7068 7100
 		if(item && item.priority){
7069 7101
 			this.addressDTO = item.priority
@@ -7071,22 +7103,28 @@ export class FuwutaiComponent implements OnInit {
7071 7103
 			this.addressDTO = null
7072 7104
 		}
7073 7105
 		let orders = [];
7074
-		if(this.addressDTO&&this.addressDTO.orders){
7106
+		let id = [];
7107
+		if(this.addressDTO&&this.addressDTO.id){
7075 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 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 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 7120
 			orders.push(this.malPriorityDTO.orders)
7121
+			id.push(this.malPriorityDTO.id)
7085 7122
 		}
7086 7123
 		let minNumber = Math.min(...orders)
7124
+		let index = orders.indexOf(minNumber) 
7087 7125
 		console.log('最小值的orders', orders, minNumber)
7088 7126
 		setTimeout(_=>{
7089
-			this.incidentModel.priorityId = minNumber != Infinity ? minNumber : null
7127
+			this.incidentModel.priorityId = minNumber != Infinity ? id[index] : null
7090 7128
 		})
7091 7129
     this.incidentModel.houseNumber = name;
7092 7130
     this.isShowAddressList = false;

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

@@ -2414,9 +2414,9 @@
2414 2414
     <div class="content">
2415 2415
       <form nz-form [formGroup]="validateBxForm" class="bxFormAdd" (ngSubmit)="confirmBx()">
2416 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 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 2420
             	<ng-container *ngFor="let option of assetData">
2421 2421
             		<nz-option *ngIf="!isLoading" [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
2422 2422
             	</ng-container>
@@ -2428,7 +2428,7 @@
2428 2428
         
2429 2429
           <nz-form-label nzFor="contactsInformation">故障现象</nz-form-label>
2430 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 2432
             	<ng-container *ngFor="let option of applicationCategoryList">
2433 2433
             		<nz-option *ngIf="!isLoading" [nzLabel]="option.mutiCategory" [nzValue]="option.id"></nz-option>
2434 2434
             	</ng-container>

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

@@ -1050,7 +1050,6 @@ export class HushijiandanComponent implements OnInit {
1050 1050
 					if(result.list[0].valueconfig==1){
1051 1051
 						this.cmdbRepair = true
1052 1052
 						this.getAssetData();
1053
-						this.searchApplicationCategory();
1054 1053
 					}else{
1055 1054
 						this.cmdbRepair = false
1056 1055
 					}
@@ -1059,6 +1058,7 @@ export class HushijiandanComponent implements OnInit {
1059 1058
 	}
1060 1059
 	
1061 1060
 	changeCommonInp(e) {
1061
+		return
1062 1062
 	  this.changeCommonInpSubject.next(e);
1063 1063
 	}
1064 1064
 	changeApplyCategory(e){
@@ -1075,12 +1075,17 @@ export class HushijiandanComponent implements OnInit {
1075 1075
 	// 故障现象列表
1076 1076
 	applicationCategoryList:any[] = [];
1077 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 1090
 	  console.log(postData);
1086 1091
 	  this.isLoading = true;
@@ -1097,6 +1102,11 @@ export class HushijiandanComponent implements OnInit {
1097 1102
 	changeAsset(e){
1098 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 1112
 	assetData:any = [];
@@ -1105,7 +1115,7 @@ export class HushijiandanComponent implements OnInit {
1105 1115
 		  idx: 0,
1106 1116
 		  sum: 20,
1107 1117
 		  asset: {
1108
-		    hosId: this.currentHospital.id,
1118
+		    downHosId: this.currentHospital.id,
1109 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 956
 	  // if(!this.itsmData.mdv2Switch){
957 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 960
 	    this.itsmOrders = [];
961 961
 	    return;
962 962
 	  }
@@ -1264,6 +1264,10 @@ export class MainComponent implements OnInit, OnDestroy {
1264 1264
 	  }
1265 1265
 		if(this.incidentModel.repairIncidentType === 'public'){
1266 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 1879
 	changeApply(e) {
1876 1880
 	  console.log(e, this.applicationDepartmentList);
1881
+		if(this.cmdbRepair){
1882
+			this.incidentModel.assetId = null;
1883
+			this.getAssetData()
1884
+		}
1877 1885
 	  this.changeApplicationDepartment("&same&");
1878 1886
 	  if(this.applyDept && this.currentTabIndex !== '故障报修'){
1879 1887
 	    this.rightTitle_tab = [
@@ -3971,6 +3979,10 @@ export class MainComponent implements OnInit, OnDestroy {
3971 3979
 							}
3972 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 3996
 	assetData:any = [];
3985 3997
 	getAssetData(name?){
3986
-		if(!this.incidentModel.hosId){
3987
-			return
3988
-		}
3998
+		// if(!this.incidentModel.hosId){
3999
+		// 	return
4000
+		// }
3989 4001
 		let data = {
3990 4002
 		  idx: 0,
3991 4003
 		  sum: 20,
3992 4004
 		  asset: {
3993
-		    hosId: this.incidentModel.hosId,
4005
+		    hosId: this.hospitalModel!=1 ? this.incidentModel.hosId : this.currentHospital.id,
3994 4006
 		    name: name
3995 4007
 		  },
3996 4008
 		};