maotao пре 1 месец
родитељ
комит
3b108ee273

+ 4 - 3
src/app/share/detail-bx/detail-bx.component.html

@@ -22,9 +22,10 @@
22 22
               <div class="thumb" *ngFor="let item of imgs_incident;let index = index;" (click)="previewImageHandler(imgs_incident, index)"><img [src]="item.thumbFilePath" alt=""></div>
23 23
             </div>
24 24
           </div>
25
-          <div nz-col nzSpan="8">维修人:<ng-container *ngIf="orderInfo.handlingPersonnelUser">{{ orderInfo.handlingPersonnelUser.name }}</ng-container></div>
26
-          <div nz-col nzSpan="8">维修人电话:<ng-container *ngIf="orderInfo.handlingPersonnelUser">{{ orderInfo.handlingPersonnelUser.phone }}</ng-container></div>
27
-          <div nz-col nzSpan="8">维修总金额:{{orderInfo.rsPrice === undefined ? '无' : orderInfo.rsPrice + '元'}}</div>
25
+					<div nz-col nzSpan="6">关联资产:<ng-container *ngIf="orderInfo.assetDTO">{{ orderInfo.assetDTO.name }}</ng-container></div>
26
+          <div nz-col nzSpan="6">维修人:<ng-container *ngIf="orderInfo.handlingPersonnelUser">{{ orderInfo.handlingPersonnelUser.name }}</ng-container></div>
27
+          <div nz-col nzSpan="6">维修人电话:<ng-container *ngIf="orderInfo.handlingPersonnelUser">{{ orderInfo.handlingPersonnelUser.phone }}</ng-container></div>
28
+          <div nz-col nzSpan="6">维修总金额:{{orderInfo.rsPrice === undefined ? '无' : orderInfo.rsPrice + '元'}}</div>
28 29
         </div>
29 30
       </div>
30 31
       <div class="center" *ngIf="amplificationShow">

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

@@ -184,7 +184,7 @@
184 184
 <!-- 查看模态框 -->
185 185
 <div class="save add display_flex align-items_center justify-content_flex-center" *ngIf="lookModal">
186 186
   <div class="viewModalBody">
187
-    <div class="title">查看<i class="icon_transport transport-guanbi" (click)="hideModal()"></i>
187
+    <div class="title">查看<i class="icon_transport transport-guanbi" (click)="close()"></i>
188 188
     </div>
189 189
     <overlay-scrollbars #osComponentRef1 class="content">
190 190
 			<div class="df view-item">

+ 13 - 1
src/app/views/fuwutai/fuwutai.component.html

@@ -1083,7 +1083,7 @@
1083 1083
             <ng-container *ngIf="buildType !== '报修转事件'">
1084 1084
               <nz-select style="width: 160px" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch (nzOnSearch)="changeCommonInp('requester', $event)" nzPlaceHolder="请选择申请人" [(ngModel)]="incidentModel.requester" (ngModelChange)="changeApplyRequester($event)" nzAllowClear (nzOpenChange)="openChangeApplyRequester($event)">
1085 1085
                 <ng-container *ngFor="let option of applicationRequesterList">
1086
-                  <nz-option *ngIf="!isLoading" [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
1086
+                  <nz-option *ngIf="!isLoading" [nzLabel]="option.name + '('+option.account+')'" [nzValue]="option.id"></nz-option>
1087 1087
                 </ng-container>
1088 1088
                 <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
1089 1089
                   <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
@@ -1527,6 +1527,18 @@
1527 1527
                   </div>
1528 1528
 
1529 1529
                   <div class="row">
1530
+										<div class="col" *ngIf="cmdbRepair">
1531
+											<span class="name">资产:</span>
1532
+											<nz-select class="w100" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch nzPlaceHolder="请选择资产" (nzOnSearch)="changeAsset($event)" [(ngModel)]="incidentModel.assetId">
1533
+												<ng-container *ngFor="let option of assetData">
1534
+													<nz-option *ngIf="!isLoading" [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
1535
+												</ng-container>
1536
+												<nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
1537
+													<i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
1538
+												</nz-option>
1539
+											</nz-select>
1540
+										</div>
1541
+																			
1530 1542
                     <div class="col">
1531 1543
                       <span class="name required">故障现象:</span>
1532 1544
                       <nz-select class="w100" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch (nzOnSearch)="changeCommonInp('category', $event)" nzPlaceHolder="请选择故障现象" [(ngModel)]="incidentModel.category" (ngModelChange)="changeApplyCategory($event)" (nzOpenChange)="openChangeApplyCategory($event)">

+ 50 - 2
src/app/views/fuwutai/fuwutai.component.ts

@@ -177,7 +177,7 @@ export class FuwutaiComponent implements OnInit {
177 177
   searchHosDepartmentQtSubject = new Subject();
178 178
   searchPatientListSubject = new Subject();
179 179
   inspectSubject = new Subject();
180
-
180
+	changeAssetInpSubject = new Subject();
181 181
   // 运维相关
182 182
   incidentModel:any = {};
183 183
   incidentMsg:any = {};
@@ -966,6 +966,9 @@ export class FuwutaiComponent implements OnInit {
966 966
     this.inspectSubject.pipe(debounceTime(500)).subscribe((v) => {
967 967
       this.refreshInspectList();
968 968
     });
969
+		this.changeAssetInpSubject.pipe(debounceTime(500)).subscribe((v) => {
970
+		  this.getAssetData(v);
971
+		});
969 972
     this.changeCommonInpSubject.pipe(debounceTime(500)).subscribe((v) => {
970 973
       if(v[0] === 'requester'){
971 974
         this.searchApplicationRequester(v[1]);
@@ -2730,6 +2733,7 @@ export class FuwutaiComponent implements OnInit {
2730 2733
   // 获取配置文件写死的任务类型ID(转科,给转出院记录用6)
2731 2734
   patientLogTasktypeLoading: boolean = false;
2732 2735
 	showGovDutyConfig:any;
2736
+	cmdbRepair:boolean = false;
2733 2737
   patientLogTasktype() {
2734 2738
     if(!this.hsmsData.hsmsSwitch){
2735 2739
       return;
@@ -2753,6 +2757,13 @@ export class FuwutaiComponent implements OnInit {
2753 2757
 						case "governmentDuty":
2754 2758
 							this.showGovDutyConfig =  c.valueconfig
2755 2759
 							break;
2760
+						case "cmdbRepair":
2761
+							if(c.valueconfig=='1'){
2762
+								this.cmdbRepair = true
2763
+							}else{
2764
+								this.cmdbRepair = false
2765
+							}
2766
+							break;	
2756 2767
 					}
2757 2768
 				});
2758 2769
       } else {
@@ -2760,6 +2771,32 @@ export class FuwutaiComponent implements OnInit {
2760 2771
       }
2761 2772
     });
2762 2773
   }
2774
+	
2775
+	changeAsset(e){
2776
+		this.changeAssetInpSubject.next(e);
2777
+	}
2778
+	
2779
+	// 获取资产列表
2780
+	assetData:any = [];
2781
+	getAssetData(name?){
2782
+		let data = {
2783
+		  idx: 0,
2784
+		  sum: 20,
2785
+		  asset: {
2786
+		    hosId: this.incidentModel.hosId,
2787
+		    name: name
2788
+		  },
2789
+		};
2790
+		
2791
+		this.mainService
2792
+		  .getFetchDataList("simple/data", "asset", data)
2793
+		  .subscribe((data) => {
2794
+		    if (data.status == 200) {
2795
+		      this.assetData = data.list;
2796
+		    }
2797
+		  });
2798
+	}
2799
+	
2763 2800
   // 重置新建工单数据
2764 2801
   resetOrderData(){
2765 2802
     this.applicationRequesterList = [];
@@ -3441,7 +3478,10 @@ export class FuwutaiComponent implements OnInit {
3441 3478
 
3442 3479
     this.incidentModel.department = undefined;
3443 3480
     this.searchApplicationDepartment('itsm');
3444
-
3481
+		if(this.cmdbRepair){
3482
+			this.incidentModel.assetId = null;
3483
+			this.getAssetData()
3484
+		}
3445 3485
     if(this.buildType !== '报修转事件'){
3446 3486
       this.incidentModel.requester = undefined;
3447 3487
       this.searchApplicationRequester();
@@ -3519,6 +3559,7 @@ export class FuwutaiComponent implements OnInit {
3519 3559
         hospital: this.isRelatedDepartment ? undefined : { id: this.incidentModel.hosId },
3520 3560
         dept: this.isRelatedDepartment ? { id: this.incidentModel.department } : undefined,
3521 3561
         name: keyWord,
3562
+				phone: this.incidentModel.incomingPhone || undefined
3522 3563
         // simpleQuery: true,
3523 3564
       },
3524 3565
     };
@@ -3725,6 +3766,7 @@ export class FuwutaiComponent implements OnInit {
3725 3766
         "callID": this.incidentModel.callID || undefined,
3726 3767
         "incomingPhone": this.incidentModel.incomingPhone || undefined,
3727 3768
         "hjzxRecordId": this.incidentModel.hjzxRecordId || undefined,
3769
+				"assetId": this.incidentModel.assetId || undefined
3728 3770
       },
3729 3771
     };
3730 3772
 
@@ -4542,6 +4584,7 @@ export class FuwutaiComponent implements OnInit {
4542 4584
         "candidateGroups": this.incidentModel.group || undefined,
4543 4585
         "assignee": this.incidentModel.user || undefined,
4544 4586
         "hjzxRecordId": this.incidentModel.hjzxRecordId || undefined,
4587
+				"assetId": this.incidentModel.assetId || undefined
4545 4588
       }
4546 4589
     };
4547 4590
     if(this.buildType){
@@ -4617,6 +4660,7 @@ export class FuwutaiComponent implements OnInit {
4617 4660
         "candidateGroups": this.incidentModel.group || undefined,
4618 4661
         "assignee": this.incidentModel.user || undefined,
4619 4662
         "hjzxRecordId": this.incidentModel.hjzxRecordId || undefined,
4663
+				"assetId": this.incidentModel.assetId || undefined
4620 4664
       }
4621 4665
     };
4622 4666
     if(this.buildType){
@@ -6634,6 +6678,10 @@ export class FuwutaiComponent implements OnInit {
6634 6678
     console.log('incidentModel:', incidentModel)
6635 6679
     this.showNewOrder(0, '', '', true, '报修转事件');
6636 6680
 		console.log(2345,this.incidentModel.repairIncidentType)
6681
+		if(incidentModel.assetId){
6682
+			this.getAssetData()
6683
+			incidentModel.assetId = Number(incidentModel.assetId)
6684
+		}
6637 6685
     // 查询报修图片
6638 6686
     this.getRepairImgs(data.id);
6639 6687
   }

+ 27 - 1
src/app/views/hushijiandan/hushijiandan.component.html

@@ -2413,7 +2413,33 @@
2413 2413
     </div>
2414 2414
     <div class="content">
2415 2415
       <form nz-form [formGroup]="validateBxForm" class="bxFormAdd" (ngSubmit)="confirmBx()">
2416
-        <nz-form-item>
2416
+        <nz-form-item *ngIf="cmdbRepair">
2417
+          <nz-form-label [nzSm]="4" [nzXs]="4" nzFor="contacts">资产</nz-form-label>
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">
2420
+            	<ng-container *ngFor="let option of assetData">
2421
+            		<nz-option *ngIf="!isLoading" [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
2422
+            	</ng-container>
2423
+            	<nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
2424
+            		<i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
2425
+            	</nz-option>
2426
+            </nz-select>
2427
+          </nz-form-control>
2428
+        
2429
+          <nz-form-label nzFor="contactsInformation">故障现象</nz-form-label>
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)">
2432
+            	<ng-container *ngFor="let option of applicationCategoryList">
2433
+            		<nz-option *ngIf="!isLoading" [nzLabel]="option.mutiCategory" [nzValue]="option.id"></nz-option>
2434
+            	</ng-container>
2435
+            	<nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
2436
+            		<i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
2437
+            	</nz-option>
2438
+            </nz-select>
2439
+          </nz-form-control>
2440
+        </nz-form-item>
2441
+				
2442
+				<nz-form-item>
2417 2443
           <nz-form-label [nzSm]="4" [nzXs]="4" nzRequired nzFor="description">故障描述</nz-form-label>
2418 2444
           <nz-form-control>
2419 2445
             <nz-input-group style="width:442px;">

+ 110 - 1
src/app/views/hushijiandan/hushijiandan.component.ts

@@ -118,6 +118,8 @@ export class HushijiandanComponent implements OnInit {
118 118
   searchTabInpSubject = new Subject(); //左侧查患者信息和检查信息防抖
119 119
   otherSearchChangeSubject = new Subject(); //其他建单搜索防抖
120 120
   inspectSubject = new Subject();
121
+	changeAssetInpSubject = new Subject();
122
+	changeCommonInpSubject = new Subject();
121 123
   isYyInspect = false; //需要预约检查
122 124
   inspectAndPatientTransportConfig:any = {timeMod: 30};
123 125
   constructor(
@@ -191,6 +193,7 @@ export class HushijiandanComponent implements OnInit {
191 193
     this.getUpdateTipsForNurses();
192 194
     this.getRefreshNurseWorkOrderTime();
193 195
     this.getCloseTimeFlag();
196
+		this.getCmdbRepairFlag();
194 197
     this.currentDept = this.tool.getCurrentUserDept();
195 198
     console.log(this.currentDept, this.tabSearchCont);
196 199
     this.currentDept.typeValue == 'surgery' && !this.tabSearchCont && this.getSurgeryConfig();
@@ -209,7 +212,12 @@ export class HushijiandanComponent implements OnInit {
209 212
     this.inspectSubject.pipe(debounceTime(500)).subscribe((v) => {
210 213
       this.refreshInspectList();
211 214
     });
212
-
215
+		this.changeAssetInpSubject.pipe(debounceTime(500)).subscribe((v) => {
216
+		  this.getAssetData(v);
217
+		});
218
+		this.changeCommonInpSubject.pipe(debounceTime(500)).subscribe((v) => {
219
+		  this.searchApplicationCategory(v);
220
+		});
213 221
     this.getTodayNum();
214 222
     this.initLogin();
215 223
     this.getDeptTaskType();
@@ -1027,6 +1035,90 @@ export class HushijiandanComponent implements OnInit {
1027 1035
         }
1028 1036
       });
1029 1037
   }
1038
+	// 获取资产报修是否开启
1039
+	cmdbRepair:Boolean = false;
1040
+	getCmdbRepairFlag() {
1041
+	  let postData = {
1042
+	    idx: 0,
1043
+	    sum: 1,
1044
+	    systemConfiguration: { keyconfig: "cmdbRepair" },
1045
+	  };
1046
+	  this.mainService
1047
+	    .getFetchDataList("simple/data", "systemConfiguration", postData)
1048
+	    .subscribe((result) => {
1049
+	      if (result.status == 200) {
1050
+					if(result.list[0].valueconfig==1){
1051
+						this.cmdbRepair = true
1052
+						this.getAssetData();
1053
+						this.searchApplicationCategory();
1054
+					}else{
1055
+						this.cmdbRepair = false
1056
+					}
1057
+	      }
1058
+	    });
1059
+	}
1060
+	
1061
+	changeCommonInp(e) {
1062
+	  this.changeCommonInpSubject.next(e);
1063
+	}
1064
+	changeApplyCategory(e){
1065
+	  console.log(111, e)
1066
+		if(e){
1067
+		  // 根据故障现象带出故障描述
1068
+		  if(this.validateBxForm.value.description){
1069
+				this.validateBxForm.controls.description.setValue(this.validateBxForm.value.description +';'+this.applicationCategoryList.find(v => v.id == e).mutiCategory)
1070
+		  }else{
1071
+				this.validateBxForm.controls.description.setValue(this.applicationCategoryList.find(v => v.id == e).mutiCategory)
1072
+		  }
1073
+		}
1074
+	}
1075
+	// 故障现象列表
1076
+	applicationCategoryList:any[] = [];
1077
+	searchApplicationCategory(keyWord?) {
1078
+	  let postData = {
1079
+	    category: {
1080
+	      category: keyWord,
1081
+	      selectType: 'mutlQuery',
1082
+	      hierarchy: 3,//只差有三级的故障现象列表
1083
+	    },
1084
+	  };
1085
+	  console.log(postData);
1086
+	  this.isLoading = true;
1087
+	  this.mainService
1088
+	    .incidentPost("listIncidentCategory", postData)
1089
+	    .subscribe((data) => {
1090
+	      this.isLoading = false;
1091
+	      if (data.status == 200) {
1092
+	        this.applicationCategoryList = data.data;
1093
+	      }
1094
+	    });
1095
+	}
1096
+	
1097
+	changeAsset(e){
1098
+		this.changeAssetInpSubject.next(e);
1099
+	}
1100
+	
1101
+	// 获取资产列表
1102
+	assetData:any = [];
1103
+	getAssetData(name?){
1104
+		let data = {
1105
+		  idx: 0,
1106
+		  sum: 20,
1107
+		  asset: {
1108
+		    hosId: this.currentHospital.id,
1109
+		    name: name
1110
+		  },
1111
+		};
1112
+		
1113
+		this.mainService
1114
+		  .getFetchDataList("simple/data", "asset", data)
1115
+		  .subscribe((data) => {
1116
+		    if (data.status == 200) {
1117
+		      this.assetData = data.list;
1118
+		    }
1119
+		  });
1120
+	}
1121
+	
1030 1122
   //获取综合日志
1031 1123
   rLoading = false;
1032 1124
   listDeptOrderRecords: any = [];
@@ -1532,7 +1624,22 @@ export class HushijiandanComponent implements OnInit {
1532 1624
       officeAddress: [null, [Validators.required]],
1533 1625
       contacts: [this.loginUser.name, [Validators.required]],
1534 1626
       contactsInformation: [this.loginUser.phone, [Validators.required]],
1627
+			assetId: [null, []],
1628
+			category: [null, []],
1535 1629
     });
1630
+		if(this.cmdbRepair){
1631
+			this.validateBxForm.addControl(
1632
+				'assetId',
1633
+				new FormControl(null, [])
1634
+			);
1635
+			this.validateBxForm.addControl(
1636
+				'category',
1637
+				new FormControl(null, [])
1638
+			);
1639
+		}else{
1640
+			this.validateBxForm.removeControl('assetId');
1641
+			this.validateBxForm.removeControl('category');
1642
+		}
1536 1643
     this.getDeptById(this.currentDept.id);
1537 1644
   }
1538 1645
   // 根据科室ID获取详情
@@ -1711,6 +1818,8 @@ export class HushijiandanComponent implements OnInit {
1711 1818
               requester: this.loginUser,
1712 1819
               acceptUser: this.loginUser,
1713 1820
               deleteFlag: 0,
1821
+							assetId: this.validateBxForm.value.assetId || undefined,
1822
+							category: this.validateBxForm.value.category ? { id: this.validateBxForm.value.category } : undefined,
1714 1823
             },
1715 1824
           };
1716 1825
           if (this.coopBx.category) {

+ 13 - 1
src/app/views/main/main.component.html

@@ -199,7 +199,7 @@
199 199
 					<ng-container *ngIf="buildType !== '报修转事件'">
200 200
 						<nz-select style="width: 160px" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch (nzOnSearch)="changeCommonInp('requester', $event)" nzPlaceHolder="请选择申请人" [(ngModel)]="incidentModel.requester" (ngModelChange)="changeApplyRequester($event)" nzAllowClear (nzOpenChange)="openChangeApplyRequester($event)">
201 201
 							<ng-container *ngFor="let option of applicationRequesterList">
202
-								<nz-option *ngIf="!isLoading" [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
202
+								<nz-option *ngIf="!isLoading" [nzLabel]="option.name + '('+option.account+')'" [nzValue]="option.id"></nz-option>
203 203
 							</ng-container>
204 204
 							<nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
205 205
 								<i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
@@ -304,6 +304,18 @@
304 304
 								</div>
305 305
 
306 306
 								<div class="row">
307
+									<div class="col" *ngIf="cmdbRepair">
308
+										<span class="name">资产:</span>
309
+										<nz-select class="w100" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch nzPlaceHolder="请选择资产" (nzOnSearch)="changeAsset($event)" [(ngModel)]="incidentModel.assetId">
310
+											<ng-container *ngFor="let option of assetData">
311
+												<nz-option *ngIf="!isLoading" [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
312
+											</ng-container>
313
+											<nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
314
+												<i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
315
+											</nz-option>
316
+										</nz-select>
317
+									</div>
318
+									
307 319
 									<div class="col">
308 320
 										<span class="name required">故障现象:</span>
309 321
 										<nz-select class="w100" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch (nzOnSearch)="changeCommonInp('category', $event)" nzPlaceHolder="请选择故障现象" [(ngModel)]="incidentModel.category" (ngModelChange)="changeApplyCategory($event)" (nzOpenChange)="openChangeApplyCategory($event)">

+ 90 - 82
src/app/views/main/main.component.ts

@@ -544,7 +544,8 @@ export class MainComponent implements OnInit, OnDestroy {
544 544
 	searchHosDepartmentQtSubject = new Subject();
545 545
 	searchPatientListSubject = new Subject();
546 546
 	inspectSubject = new Subject();
547
-
547
+	changeAssetInpSubject = new Subject();
548
+	
548 549
 	// 运维相关
549 550
 	incidentModel:any = {};
550 551
 	incidentMsg:any = {};
@@ -654,9 +655,9 @@ export class MainComponent implements OnInit, OnDestroy {
654 655
 
655 656
 	// 获取院区配置配置,是否核酸打印
656 657
 	getHospitalConfigList(key) {
657
-	  if(!this.hsmsData.hsmsSwitch){
658
-	    return;
659
-	  }
658
+	  // if(!this.hsmsData.hsmsSwitch){
659
+	  //   return;
660
+	  // }
660 661
 	  let postData = { idx: 0, sum: 1, hospitalConfig: { hosId: this.checkedHos, key } };
661 662
 	  this.mainService.getFetchDataList("simple/data", "hospitalConfig", postData).subscribe(result=>{
662 663
 	    if(result.status == 200){
@@ -670,9 +671,9 @@ export class MainComponent implements OnInit, OnDestroy {
670 671
 	// 获取配置文件写死的任务类型ID(送病人回病房9),选择此任务类型的话,患者信息从终点科室获取
671 672
 	getConfigTasktypeLoading: boolean = false;
672 673
 	getConfigTasktype() {
673
-	  if(!this.hsmsData.hsmsSwitch){
674
-	    return;
675
-	  }
674
+	  // if(!this.hsmsData.hsmsSwitch){
675
+	  //   return;
676
+	  // }
676 677
 	  let postData = {
677 678
 	    idx: 0,
678 679
 	    sum: 1,
@@ -694,9 +695,9 @@ export class MainComponent implements OnInit, OnDestroy {
694 695
 	// 获取配置文件写死的任务类型ID(转科,给转出院记录用6)
695 696
 	patientLogTasktypeLoading: boolean = false;
696 697
 	patientLogTasktype() {
697
-	  if(!this.hsmsData.hsmsSwitch){
698
-	    return;
699
-	  }
698
+	  // if(!this.hsmsData.hsmsSwitch){
699
+	  //   return;
700
+	  // }
700 701
 	  let postData = {
701 702
 	    idx: 0,
702 703
 	    sum: 1,
@@ -857,9 +858,9 @@ export class MainComponent implements OnInit, OnDestroy {
857 858
 	searchTaskList;
858 859
 	searchTaskLoading = false;
859 860
 	getSearchTaskList(keyword, countRemark = '') {
860
-	  if(!this.hsmsData.hsmsSwitch){
861
-	    return;
862
-	  }
861
+	  // if(!this.hsmsData.hsmsSwitch){
862
+	  //   return;
863
+	  // }
863 864
 	  this.searchTaskLoading = true;
864 865
 	  return this.mainService.getTaskTypeBySearchKey({
865 866
 	    searchKey: keyword || undefined,
@@ -883,9 +884,9 @@ export class MainComponent implements OnInit, OnDestroy {
883 884
 	patientLogList:any;
884 885
 	loading5:boolean = false
885 886
 	getPatientLog(id) {
886
-	  if(!this.hsmsData.hsmsSwitch){
887
-	    return;
888
-	  }
887
+	  // if(!this.hsmsData.hsmsSwitch){
888
+	  //   return;
889
+	  // }
889 890
 	  if (id == -1 || id === null || id === undefined) {
890 891
 	    this.patientLogList = [];
891 892
 	    return;
@@ -911,9 +912,9 @@ export class MainComponent implements OnInit, OnDestroy {
911 912
 	// 服务台新建工单—根据申请科室id来查询未到达工单(科室id)
912 913
 	loading4 = false;
913 914
 	getWorkOrders(id) {
914
-	  if(!this.hsmsData.hsmsSwitch){
915
-	    return;
916
-	  }
915
+	  // if(!this.hsmsData.hsmsSwitch){
916
+	  //   return;
917
+	  // }
917 918
 	  if (id == -1 || id === null || id === undefined) {
918 919
 	    this.noArrives = [];
919 920
 	    return;
@@ -952,9 +953,9 @@ export class MainComponent implements OnInit, OnDestroy {
952 953
 	loading6 = false;
953 954
 	itsmOrders:any[] = [];
954 955
 	getItsmOrders(id) {
955
-	  if(!this.itsmData.mdv2Switch){
956
-	    return;
957
-	  }
956
+	  // if(!this.itsmData.mdv2Switch){
957
+	  //   return;
958
+	  // }
958 959
 	  if (id == -1 || id === null || id === undefined && this.incidentModel.repairIncidentType === 'dept') {
959 960
 	    this.itsmOrders = [];
960 961
 	    return;
@@ -1019,9 +1020,9 @@ export class MainComponent implements OnInit, OnDestroy {
1019 1020
 	loading7 = false;
1020 1021
 	knowageList:any[] = [];
1021 1022
 	getKnowageList() {
1022
-	  if(!this.itsmData.mdv2Switch){
1023
-	    return;
1024
-	  }
1023
+	  // if(!this.itsmData.mdv2Switch){
1024
+	  //   return;
1025
+	  // }
1025 1026
 
1026 1027
 	  if(!(this.incidentModel.category && this.solutionStatus && this.solutionType)){
1027 1028
 	    this.loading7 = false;
@@ -1159,7 +1160,10 @@ export class MainComponent implements OnInit, OnDestroy {
1159 1160
 
1160 1161
 	//   this.incidentModel.department = undefined;
1161 1162
 	  this.searchApplicationDepartment('itsm');
1162
-
1163
+		if(this.cmdbRepair){
1164
+			this.incidentModel.assetId = null;
1165
+			this.getAssetData()
1166
+		}
1163 1167
 	  if(this.buildType !== '报修转事件'){
1164 1168
 	    this.incidentModel.requester = undefined;
1165 1169
 	    this.searchApplicationRequester();
@@ -1401,6 +1405,7 @@ export class MainComponent implements OnInit, OnDestroy {
1401 1405
 	      "callID": this.incidentModel.callID || undefined,
1402 1406
 	      "incomingPhone": this.incidentModel.incomingPhone || undefined,
1403 1407
 	      "hjzxRecordId": this.incidentModel.hjzxRecordId || undefined,
1408
+				"assetId": this.incidentModel.assetId || undefined
1404 1409
 	    },
1405 1410
 	  };
1406 1411
 
@@ -1750,9 +1755,9 @@ export class MainComponent implements OnInit, OnDestroy {
1750 1755
 	applicationDeptList:any[] = [];
1751 1756
 	applyStartDept:any;
1752 1757
 	searchApplicationDepartment(type, e?, phone?, deptId?, isInit?) {
1753
-	  if(!this.hsmsData.hsmsSwitch && !this.itsmData.mdv2Switch){
1754
-	    return;
1755
-	  }
1758
+	  // if(!this.hsmsData.hsmsSwitch && !this.itsmData.mdv2Switch){
1759
+	  //   return;
1760
+	  // }
1756 1761
 	  let keyWord = "";
1757 1762
 	  if (e && e !== "&ks&" && e !== "&go&") {
1758 1763
 	    keyWord = e;
@@ -2207,6 +2212,7 @@ export class MainComponent implements OnInit, OnDestroy {
2207 2212
 	      "candidateGroups": this.incidentModel.group || undefined,
2208 2213
 	      "assignee": this.incidentModel.user || undefined,
2209 2214
 	      "hjzxRecordId": this.incidentModel.hjzxRecordId || undefined,
2215
+				"assetId": this.incidentModel.assetId || undefined
2210 2216
 	    }
2211 2217
 	  };
2212 2218
 	  if(this.buildType){
@@ -2496,53 +2502,14 @@ export class MainComponent implements OnInit, OnDestroy {
2496 2502
 	getAutoWorkTypes(isFirst, isInit) {
2497 2503
 	  this.workTypesArrange = [];
2498 2504
 	  // 运维
2499
-	  if(this.itsmData.mdv2Switch){
2505
+	  // if(this.itsmData.mdv2Switch){
2500 2506
 	    this.workTypesArrange = [{key:'故障报修', value: []}];
2501
-	    if(!this.hsmsData.hsmsSwitch){
2502
-	      console.log('workTypesArrange', this.workTypesArrange);
2503
-	      // 是否显示操作项
2504
-	      this.workTypesFlag = this.workTypesArrange.length >= 5;
2505
-	    }
2506
-	  }
2507
-	  // 配送
2508
-	  if(this.hsmsData.hsmsSwitch){
2509
-	    this.newLoading = true;
2510
-	    this.mainService.getTaskTypeBySearchKey({
2511
-	      hosId: this.checkedHos,
2512
-	    }).subscribe((data) => {
2513
-	      this.newLoading = false;
2514
-	      if (data["status"] == 200) {
2515
-	        this.workTypes = data["data"];
2516
-	        // 整理后的任务类型
2517
-	        this.isShowResidenceNo = false;
2518
-	        this.workTypes.forEach((item) => {
2519
-	          if(item.associationTypeValue === 'patientTransport' || item.associationTypeValue === 'inspect'){
2520
-	            // 患者其他服务
2521
-	            let obj = this.workTypesArrange.find(v => v.key === '患者转运');
2522
-	            if(obj){
2523
-	              obj.value.push(item);
2524
-	            }else{
2525
-	              this.workTypesArrange.unshift({ key: '患者转运', value: [item] });
2526
-	              this.isShowResidenceNo = true;
2527
-	            }
2528
-	          }else if(item.associationTypeValue === 'other' || item.associationTypeValue === 'specimen' || item.associationTypeValue === 'ordinary'){
2529
-	            // 物品配送
2530
-	            let obj = this.workTypesArrange.find(v => v.key === '物品配送');
2531
-	            if(obj){
2532
-	              obj.value.push(item);
2533
-	            }else{
2534
-	              this.workTypesArrange.unshift({ key: '物品配送', value: [item] });
2535
-	            }
2536
-	          }
2537
-	        });
2538
-	        console.log('workTypesArrange', this.workTypesArrange);
2539
-	        // 任务类型是否显示操作项
2540
-	        let arr = this.workTypesArrange;
2541
-	        this.workTypesFlag = arr.length >= 5;
2542
-	      }
2543
-	    });
2544
-	    this.getTaskTypeCountRemarkList();
2545
-	  }
2507
+	    // if(!this.hsmsData.hsmsSwitch){
2508
+	    //   console.log('workTypesArrange', this.workTypesArrange);
2509
+	    //   // 是否显示操作项
2510
+	    //   this.workTypesFlag = this.workTypesArrange.length >= 5;
2511
+	    // }
2512
+	  // }
2546 2513
 	}
2547 2514
 	// 查类型
2548 2515
 	getTaskTypeCountRemarkList(){
@@ -3701,12 +3668,12 @@ export class MainComponent implements OnInit, OnDestroy {
3701 3668
 
3702 3669
 	// 运维、配送工单切换
3703 3670
 	filterOrderList(type, state){
3704
-	  if(!this.itsmData.mdv2Switch && this.hsmsData.hsmsSwitch){
3705
-	    return;
3706
-	  }
3707
-	  if(this.itsmData.mdv2Switch && !this.hsmsData.hsmsSwitch){
3708
-	    return;
3709
-	  }
3671
+	  // if(!this.itsmData.mdv2Switch && this.hsmsData.hsmsSwitch){
3672
+	  //   return;
3673
+	  // }
3674
+	  // if(this.itsmData.mdv2Switch && !this.hsmsData.hsmsSwitch){
3675
+	  //   return;
3676
+	  // }
3710 3677
 	  this.flagList[`${type}Flag${state}`] = !this.flagList[`${type}Flag${state}`];
3711 3678
 	  // this.getOrderList(state, state === 1);
3712 3679
 	}
@@ -3907,6 +3874,11 @@ export class MainComponent implements OnInit, OnDestroy {
3907 3874
 		    this.getPatientByResidenceNo(v[1]);
3908 3875
 		  }
3909 3876
 		});
3877
+		
3878
+		this.changeAssetInpSubject.pipe(debounceTime(500)).subscribe((v) => {
3879
+		  this.getAssetData(v);
3880
+		});
3881
+		
3910 3882
 		this.onSearchTaskBuildSubject.pipe(debounceTime(500)).subscribe((v) => {
3911 3883
 		  this.getTasktypeByPhone(v);
3912 3884
 		});
@@ -3937,6 +3909,7 @@ export class MainComponent implements OnInit, OnDestroy {
3937 3909
 	applicantMustFillIn:any; //申请人是否必填 1是,0否
3938 3910
 	deptRepair:boolean = false; //科内报修
3939 3911
 	publicRepair:boolean = false; ; //公共报修
3912
+	cmdbRepair:boolean = false; ; //是否支持资产报修
3940 3913
 	getSysConfig() {
3941 3914
 		const postData = { idx: 0, sum: 99 };
3942 3915
 		this.mainService
@@ -3970,6 +3943,13 @@ export class MainComponent implements OnInit, OnDestroy {
3970 3943
 								case "applicantMustFillIn":
3971 3944
 									this.applicantMustFillIn = c[1]
3972 3945
 									break;
3946
+								case "cmdbRepair":
3947
+									if(c[1]=='1'){
3948
+										this.cmdbRepair = true
3949
+									}else{
3950
+										this.cmdbRepair = false
3951
+									}
3952
+									break;	
3973 3953
 							}
3974 3954
 						});
3975 3955
 						if(this.eventData){
@@ -3995,7 +3975,35 @@ export class MainComponent implements OnInit, OnDestroy {
3995 3975
 				}
3996 3976
 			});
3997 3977
 	 }
3998
-
3978
+	
3979
+	changeAsset(e){
3980
+		this.changeAssetInpSubject.next(e);
3981
+	}
3982
+	
3983
+  // 获取资产列表
3984
+	assetData:any = [];
3985
+	getAssetData(name?){
3986
+		if(!this.incidentModel.hosId){
3987
+			return
3988
+		}
3989
+		let data = {
3990
+		  idx: 0,
3991
+		  sum: 20,
3992
+		  asset: {
3993
+		    hosId: this.incidentModel.hosId,
3994
+		    name: name
3995
+		  },
3996
+		};
3997
+		
3998
+		this.mainService
3999
+		  .getFetchDataList("simple/data", "asset", data)
4000
+		  .subscribe((data) => {
4001
+		    if (data.status == 200) {
4002
+		      this.assetData = data.list;
4003
+		    }
4004
+		  });
4005
+	}
4006
+	
3999 4007
 	// 新增报修
4000 4008
 	speedinessAdd(): void {
4001 4009
 		this.addOrder();