5 Commitit 25b351e29e ... 0aad0e7e2f

Tekijä SHA1 Viesti Päivämäärä
  maotao 0aad0e7e2f 长江水利,白求恩需求开发 1 kuukausi sitten
  maotao 86f0ad65dd 拉取代码 1 kuukausi sitten
  maotao 6f8c0921f5 Merge branch 'master' of http://git.dashitech.com/seimin/zy-pc 1 kuukausi sitten
  maotao fa83b192f5 拉取代码 1 kuukausi sitten
  maotao 3b108ee273 拉取代码 1 kuukausi sitten

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

@@ -41,6 +41,12 @@
41
 									<nz-input-number [(ngModel)]="validity" [nzMin]="0" [nzMax]="99999" [nzStep]="1"></nz-input-number>&nbsp;&nbsp;分钟 
41
 									<nz-input-number [(ngModel)]="validity" [nzMin]="0" [nzMax]="99999" [nzStep]="1"></nz-input-number>&nbsp;&nbsp;分钟 
42
 								</div>
42
 								</div>
43
 								
43
 								
44
+								<!-- 验证码干扰线数量 -->
45
+								<div class="display_flex align-items_center mb8" *ngIf="verificationCode[0].checked">
46
+									<nz-form-label class="label">验证码干扰线数量</nz-form-label>
47
+									<nz-input-number [(ngModel)]="verificationCodeNoiseLines" [nzMin]="1" [nzMax]="50" [nzStep]="1"></nz-input-number>
48
+								</div>
49
+								
44
                 <!-- 是否限制账户错误登录次数 -->
50
                 <!-- 是否限制账户错误登录次数 -->
45
                 <div class="display_flex align-items_center mb8">
51
                 <div class="display_flex align-items_center mb8">
46
                   <nz-form-label class="label">是否限制账户错误登录次数</nz-form-label>
52
                   <nz-form-label class="label">是否限制账户错误登录次数</nz-form-label>

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

@@ -32,6 +32,7 @@ export class ConfigurationSystemSecurityComponent implements OnInit {
32
 	validity:any; //验证码有效期
32
 	validity:any; //验证码有效期
33
   isErrorTime:any = [{ label:'是否开启', value: 0 }];//是否限制账户错误登录次数
33
   isErrorTime:any = [{ label:'是否开启', value: 0 }];//是否限制账户错误登录次数
34
   errorTime:any;//支持错误次数
34
   errorTime:any;//支持错误次数
35
+	verificationCodeNoiseLines:any;//验证码干扰线数量
35
   astrictIp:any = [{ label:'是否开启', value: 1 }];//终点科室支持核对
36
   astrictIp:any = [{ label:'是否开启', value: 1 }];//终点科室支持核对
36
   drugsEndCheckScanIds:any = [];//是否限制单点登录ip
37
   drugsEndCheckScanIds:any = [];//是否限制单点登录ip
37
   rangeIp:any;//单点登录范围内IP
38
   rangeIp:any;//单点登录范围内IP
@@ -100,6 +101,10 @@ export class ConfigurationSystemSecurityComponent implements OnInit {
100
 				this.msg.error('验证码有效期不能为空')
101
 				this.msg.error('验证码有效期不能为空')
101
 				return 
102
 				return 
102
 			}
103
 			}
104
+			if(!this.verificationCodeNoiseLines){
105
+				this.msg.error('验证码干扰线数量不能为空')
106
+				return 
107
+			}
103
 		}
108
 		}
104
 		
109
 		
105
 		if(this.isErrorTime[0].checked){
110
 		if(this.isErrorTime[0].checked){
@@ -108,7 +113,7 @@ export class ConfigurationSystemSecurityComponent implements OnInit {
108
 				return 
113
 				return 
109
 			}
114
 			}
110
 		}
115
 		}
111
-	
116
+		
112
 		// if(this.astrictIp[0].checked){
117
 		// if(this.astrictIp[0].checked){
113
 		// 	let isEmpty = this.ipData.filter(i=>i.rangeIp=='')
118
 		// 	let isEmpty = this.ipData.filter(i=>i.rangeIp=='')
114
 		// 	if(isEmpty.length>0){
119
 		// 	if(isEmpty.length>0){
@@ -131,6 +136,8 @@ export class ConfigurationSystemSecurityComponent implements OnInit {
131
 			  item.configValue = this.digit;
136
 			  item.configValue = this.digit;
132
 			}else if (item.configKey === "verificationCodeDuration") {
137
 			}else if (item.configKey === "verificationCodeDuration") {
133
 		    item.configValue = this.validity;
138
 		    item.configValue = this.validity;
139
+		  }else if (item.configKey === "verificationCodeNoiseLines") {
140
+		    item.configValue = this.verificationCodeNoiseLines;
134
 		  }else if (item.configKey === "limitIncorrectLogin") {
141
 		  }else if (item.configKey === "limitIncorrectLogin") {
135
 		    let value = null
142
 		    let value = null
136
 		    if(this.isErrorTime[0].checked){
143
 		    if(this.isErrorTime[0].checked){
@@ -209,6 +216,9 @@ export class ConfigurationSystemSecurityComponent implements OnInit {
209
 								case "verificationCodeDuration":
216
 								case "verificationCodeDuration":
210
 									this.validity = c[1]
217
 									this.validity = c[1]
211
 									break;
218
 									break;
219
+								case "verificationCodeNoiseLines":
220
+									this.verificationCodeNoiseLines = c[1]
221
+									break;
212
 								case "limitIncorrectLogin":
222
 								case "limitIncorrectLogin":
213
 									if(c[1]=='1'){
223
 									if(c[1]=='1'){
214
 										this.isErrorTime[0].checked = true
224
 										this.isErrorTime[0].checked = true

+ 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
 

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

@@ -22,9 +22,10 @@
22
               <div class="thumb" *ngFor="let item of imgs_incident;let index = index;" (click)="previewImageHandler(imgs_incident, index)"><img [src]="item.thumbFilePath" alt=""></div>
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
             </div>
23
             </div>
24
           </div>
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
         </div>
29
         </div>
29
       </div>
30
       </div>
30
       <div class="center" *ngIf="amplificationShow">
31
       <div class="center" *ngIf="amplificationShow">

+ 2 - 2
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>
@@ -184,7 +184,7 @@
184
 <!-- 查看模态框 -->
184
 <!-- 查看模态框 -->
185
 <div class="save add display_flex align-items_center justify-content_flex-center" *ngIf="lookModal">
185
 <div class="save add display_flex align-items_center justify-content_flex-center" *ngIf="lookModal">
186
   <div class="viewModalBody">
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
     </div>
188
     </div>
189
     <overlay-scrollbars #osComponentRef1 class="content">
189
     <overlay-scrollbars #osComponentRef1 class="content">
190
 			<div class="df view-item">
190
 			<div class="df view-item">

+ 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
 	}

+ 14 - 2
src/app/views/fuwutai/fuwutai.component.html

@@ -1,5 +1,5 @@
1
 <div class="fuwutai">
1
 <div class="fuwutai">
2
-  <div class="top" id="top" *ngIf="hurseInfoHiding != 1">
2
+  <div class="top" id="top" *ngIf="hurseInfoHiding != 1 && hsmsData.hsmsSwitch==1">
3
     <!-- 头部Tab -->
3
     <!-- 头部Tab -->
4
     <div class="tabBox">
4
     <div class="tabBox">
5
       <div class="tab" #tabs>
5
       <div class="tab" #tabs>
@@ -1083,7 +1083,7 @@
1083
             <ng-container *ngIf="buildType !== '报修转事件'">
1083
             <ng-container *ngIf="buildType !== '报修转事件'">
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)">
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
                 <ng-container *ngFor="let option of applicationRequesterList">
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
                 </ng-container>
1087
                 </ng-container>
1088
                 <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
1088
                 <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
1089
                   <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
1089
                   <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
@@ -1527,6 +1527,18 @@
1527
                   </div>
1527
                   </div>
1528
 
1528
 
1529
                   <div class="row">
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
                     <div class="col">
1542
                     <div class="col">
1531
                       <span class="name required">故障现象:</span>
1543
                       <span class="name required">故障现象:</span>
1532
                       <nz-select class="w100" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch (nzOnSearch)="changeCommonInp('category', $event)" nzPlaceHolder="请选择故障现象" [(ngModel)]="incidentModel.category" (ngModelChange)="changeApplyCategory($event)" (nzOpenChange)="openChangeApplyCategory($event)">
1544
                       <nz-select class="w100" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch (nzOnSearch)="changeCommonInp('category', $event)" nzPlaceHolder="请选择故障现象" [(ngModel)]="incidentModel.category" (ngModelChange)="changeApplyCategory($event)" (nzOpenChange)="openChangeApplyCategory($event)">

+ 121 - 33
src/app/views/fuwutai/fuwutai.component.ts

@@ -177,7 +177,7 @@ export class FuwutaiComponent implements OnInit {
177
   searchHosDepartmentQtSubject = new Subject();
177
   searchHosDepartmentQtSubject = new Subject();
178
   searchPatientListSubject = new Subject();
178
   searchPatientListSubject = new Subject();
179
   inspectSubject = new Subject();
179
   inspectSubject = new Subject();
180
-
180
+	changeAssetInpSubject = new Subject();
181
   // 运维相关
181
   // 运维相关
182
   incidentModel:any = {};
182
   incidentModel:any = {};
183
   incidentMsg:any = {};
183
   incidentMsg:any = {};
@@ -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
     //防抖
@@ -966,6 +968,9 @@ export class FuwutaiComponent implements OnInit {
966
     this.inspectSubject.pipe(debounceTime(500)).subscribe((v) => {
968
     this.inspectSubject.pipe(debounceTime(500)).subscribe((v) => {
967
       this.refreshInspectList();
969
       this.refreshInspectList();
968
     });
970
     });
971
+		this.changeAssetInpSubject.pipe(debounceTime(500)).subscribe((v) => {
972
+		  this.getAssetData(v);
973
+		});
969
     this.changeCommonInpSubject.pipe(debounceTime(500)).subscribe((v) => {
974
     this.changeCommonInpSubject.pipe(debounceTime(500)).subscribe((v) => {
970
       if(v[0] === 'requester'){
975
       if(v[0] === 'requester'){
971
         this.searchApplicationRequester(v[1]);
976
         this.searchApplicationRequester(v[1]);
@@ -1936,6 +1941,7 @@ export class FuwutaiComponent implements OnInit {
1936
       });
1941
       });
1937
   }
1942
   }
1938
   rightTitleHandler(i) {
1943
   rightTitleHandler(i) {
1944
+		console.log(4444, i)
1939
     this.currentRTab = i;
1945
     this.currentRTab = i;
1940
     if (i === 0) {
1946
     if (i === 0) {
1941
       this.getWorkOrders(this.applyDept);
1947
       this.getWorkOrders(this.applyDept);
@@ -1996,7 +2002,7 @@ export class FuwutaiComponent implements OnInit {
1996
     if(!this.itsmData.mdv2Switch){
2002
     if(!this.itsmData.mdv2Switch){
1997
       return;
2003
       return;
1998
     }
2004
     }
1999
-    if (id == -1 || id === null || id === undefined && this.incidentModel.repairIncidentType === 'dept') {
2005
+    if ((id == -1 || id === null || id === undefined) && this.incidentModel.repairIncidentType === 'dept') {
2000
       this.itsmOrders = [];
2006
       this.itsmOrders = [];
2001
       return;
2007
       return;
2002
     }
2008
     }
@@ -2730,6 +2736,7 @@ export class FuwutaiComponent implements OnInit {
2730
   // 获取配置文件写死的任务类型ID(转科,给转出院记录用6)
2736
   // 获取配置文件写死的任务类型ID(转科,给转出院记录用6)
2731
   patientLogTasktypeLoading: boolean = false;
2737
   patientLogTasktypeLoading: boolean = false;
2732
 	showGovDutyConfig:any;
2738
 	showGovDutyConfig:any;
2739
+	cmdbRepair:boolean = false;
2733
   patientLogTasktype() {
2740
   patientLogTasktype() {
2734
     if(!this.hsmsData.hsmsSwitch){
2741
     if(!this.hsmsData.hsmsSwitch){
2735
       return;
2742
       return;
@@ -2760,6 +2767,33 @@ export class FuwutaiComponent implements OnInit {
2760
       }
2767
       }
2761
     });
2768
     });
2762
   }
2769
   }
2770
+	
2771
+	changeAsset(e){
2772
+		this.changeAssetInpSubject.next(e);
2773
+	}
2774
+	
2775
+	// 获取资产列表
2776
+	assetData:any = [];
2777
+	getAssetData(name?){
2778
+		console.log('nimadede===========', this.hospitalModel)
2779
+		let data = {
2780
+		  idx: 0,
2781
+		  sum: 20,
2782
+		  asset: {
2783
+		    downHosId: this.hospitalModel!=1 ? this.incidentModel.hosId : this.currentHospital.id,
2784
+		    name: name
2785
+		  },
2786
+		};
2787
+		
2788
+		this.mainService
2789
+		  .getFetchDataList("simple/data", "asset", data)
2790
+		  .subscribe((data) => {
2791
+		    if (data.status == 200) {
2792
+		      this.assetData = data.list;
2793
+		    }
2794
+		  });
2795
+	}
2796
+	
2763
   // 重置新建工单数据
2797
   // 重置新建工单数据
2764
   resetOrderData(){
2798
   resetOrderData(){
2765
     this.applicationRequesterList = [];
2799
     this.applicationRequesterList = [];
@@ -2826,6 +2860,13 @@ export class FuwutaiComponent implements OnInit {
2826
 									break;	
2860
 									break;	
2827
 								case "applicantMustFillIn":
2861
 								case "applicantMustFillIn":
2828
 									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
+									}
2829
 									break;	
2870
 									break;	
2830
 							}
2871
 							}
2831
 							if(type==1){
2872
 							if(type==1){
@@ -2841,6 +2882,9 @@ export class FuwutaiComponent implements OnInit {
2841
 						if(this.hospitalModel==1){
2882
 						if(this.hospitalModel==1){
2842
 							this.searchApplicationBuilding()
2883
 							this.searchApplicationBuilding()
2843
 						}
2884
 						}
2885
+						if(this.cmdbRepair && this.hospitalModel==1){
2886
+							this.getAssetData()
2887
+						}
2844
 					}
2888
 					}
2845
 				}
2889
 				}
2846
 			});
2890
 			});
@@ -3441,7 +3485,10 @@ export class FuwutaiComponent implements OnInit {
3441
 
3485
 
3442
     this.incidentModel.department = undefined;
3486
     this.incidentModel.department = undefined;
3443
     this.searchApplicationDepartment('itsm');
3487
     this.searchApplicationDepartment('itsm');
3444
-
3488
+		if(this.cmdbRepair){
3489
+			this.incidentModel.assetId = null;
3490
+			this.getAssetData()
3491
+		}
3445
     if(this.buildType !== '报修转事件'){
3492
     if(this.buildType !== '报修转事件'){
3446
       this.incidentModel.requester = undefined;
3493
       this.incidentModel.requester = undefined;
3447
       this.searchApplicationRequester();
3494
       this.searchApplicationRequester();
@@ -3519,6 +3566,7 @@ export class FuwutaiComponent implements OnInit {
3519
         hospital: this.isRelatedDepartment ? undefined : { id: this.incidentModel.hosId },
3566
         hospital: this.isRelatedDepartment ? undefined : { id: this.incidentModel.hosId },
3520
         dept: this.isRelatedDepartment ? { id: this.incidentModel.department } : undefined,
3567
         dept: this.isRelatedDepartment ? { id: this.incidentModel.department } : undefined,
3521
         name: keyWord,
3568
         name: keyWord,
3569
+				// phone: this.incidentModel.incomingPhone || undefined
3522
         // simpleQuery: true,
3570
         // simpleQuery: true,
3523
       },
3571
       },
3524
     };
3572
     };
@@ -3547,25 +3595,35 @@ export class FuwutaiComponent implements OnInit {
3547
 			this.userPriorityDTO = null
3595
 			this.userPriorityDTO = null
3548
 		}
3596
 		}
3549
 		let orders = [];
3597
 		let orders = [];
3550
-		if(this.addressDTO&&this.addressDTO.orders){
3598
+		let id = [];
3599
+		if(this.addressDTO&&this.addressDTO.id){
3551
 			orders.push(this.addressDTO.orders)
3600
 			orders.push(this.addressDTO.orders)
3601
+			id.push(this.addressDTO.id)
3552
 		}
3602
 		}
3553
-		if(this.deptPriorityDTO&&this.deptPriorityDTO.orders){
3603
+		if(this.deptPriorityDTO&&this.deptPriorityDTO.id){
3554
 			orders.push(this.deptPriorityDTO.orders)
3604
 			orders.push(this.deptPriorityDTO.orders)
3605
+			id.push(this.deptPriorityDTO.id)
3555
 		}
3606
 		}
3556
-		if(this.userPriorityDTO&&this.userPriorityDTO.orders){
3607
+		if(this.userPriorityDTO&&this.userPriorityDTO.id){
3557
 			orders.push(this.userPriorityDTO.orders)
3608
 			orders.push(this.userPriorityDTO.orders)
3609
+			id.push(this.userPriorityDTO.id)
3558
 		}
3610
 		}
3559
-		if(this.malPriorityDTO&&this.malPriorityDTO.orders){
3611
+		if(this.malPriorityDTO&&this.malPriorityDTO.id){
3560
 			orders.push(this.malPriorityDTO.orders)
3612
 			orders.push(this.malPriorityDTO.orders)
3613
+			id.push(this.malPriorityDTO.id)
3561
 		}
3614
 		}
3562
 		let minNumber = Math.min(...orders)
3615
 		let minNumber = Math.min(...orders)
3616
+		let index = orders.indexOf(minNumber) 
3563
 		console.log('最小值的orders', orders, minNumber)
3617
 		console.log('最小值的orders', orders, minNumber)
3564
 		setTimeout(_=>{
3618
 		setTimeout(_=>{
3565
-			this.incidentModel.priorityId = minNumber != Infinity ? minNumber : null
3619
+			this.incidentModel.priorityId = minNumber != Infinity ? id[index] : null
3566
 		})
3620
 		})
3567
 		if(this.incidentModel.repairIncidentType === 'public'){
3621
 		if(this.incidentModel.repairIncidentType === 'public'){
3568
 			this.getItsmOrders('')
3622
 			this.getItsmOrders('')
3623
+			if(this.cmdbRepair){
3624
+				this.incidentModel.assetId = null;
3625
+				this.getAssetData()
3626
+			}
3569
 		}
3627
 		}
3570
   }
3628
   }
3571
   // 故障现象列表
3629
   // 故障现象列表
@@ -3622,7 +3680,6 @@ export class FuwutaiComponent implements OnInit {
3622
           hosId: this.incidentModel.hosId,
3680
           hosId: this.incidentModel.hosId,
3623
         },
3681
         },
3624
       };
3682
       };
3625
-      console.log(postData);
3626
       // return;
3683
       // return;
3627
       this.isLoading = true;
3684
       this.isLoading = true;
3628
       this.mainService
3685
       this.mainService
@@ -3643,23 +3700,32 @@ export class FuwutaiComponent implements OnInit {
3643
 							this.malPriorityDTO = null
3700
 							this.malPriorityDTO = null
3644
 						}
3701
 						}
3645
 						let orders = [];
3702
 						let orders = [];
3646
-						if(this.addressDTO&&this.addressDTO.orders){
3703
+						let id = [];
3704
+						if(this.addressDTO&&this.addressDTO.id){
3647
 							orders.push(this.addressDTO.orders)
3705
 							orders.push(this.addressDTO.orders)
3706
+							id.push(this.addressDTO.id)
3648
 						}
3707
 						}
3649
-						if(this.deptPriorityDTO&&this.deptPriorityDTO.orders){
3708
+						if(this.deptPriorityDTO&&this.deptPriorityDTO.id){
3650
 							orders.push(this.deptPriorityDTO.orders)
3709
 							orders.push(this.deptPriorityDTO.orders)
3710
+							id.push(this.deptPriorityDTO.id)
3651
 						}
3711
 						}
3652
-						if(this.userPriorityDTO&&this.userPriorityDTO.orders){
3712
+						if(this.userPriorityDTO&&this.userPriorityDTO.id){
3653
 							orders.push(this.userPriorityDTO.orders)
3713
 							orders.push(this.userPriorityDTO.orders)
3714
+							id.push(this.userPriorityDTO.id)
3654
 						}
3715
 						}
3655
-						if(this.malPriorityDTO&&this.malPriorityDTO.orders){
3716
+						if(this.malPriorityDTO&&this.malPriorityDTO.id){
3656
 							orders.push(this.malPriorityDTO.orders)
3717
 							orders.push(this.malPriorityDTO.orders)
3718
+							id.push(this.malPriorityDTO.id)
3657
 						}
3719
 						}
3658
-						let minNumber = Math.min(...orders)
3659
-						console.log('最小值的orders', orders, minNumber)
3660
-						setTimeout(_=>{
3661
-							this.incidentModel.priorityId = minNumber != Infinity ? minNumber : null
3662
-						})
3720
+						if(orders.length>0){
3721
+							let minNumber = Math.min(...orders)
3722
+							let index = orders.indexOf(minNumber)
3723
+							console.log('最小值的orders', orders, minNumber)
3724
+							setTimeout(_=>{
3725
+								this.incidentModel.priorityId = minNumber != Infinity ? id[index] : null
3726
+							})
3727
+						}
3728
+
3663
             // 根据院区和故障现象带出责任部门,优先级,维修人/组
3729
             // 根据院区和故障现象带出责任部门,优先级,维修人/组
3664
             this.incidentModel.duty = this.incidentCategoryConfig.dutyDTO;
3730
             this.incidentModel.duty = this.incidentCategoryConfig.dutyDTO;
3665
             // this.incidentModel.priorityId = this.incidentCategoryConfig.priority;
3731
             // this.incidentModel.priorityId = this.incidentCategoryConfig.priority;
@@ -3725,6 +3791,7 @@ export class FuwutaiComponent implements OnInit {
3725
         "callID": this.incidentModel.callID || undefined,
3791
         "callID": this.incidentModel.callID || undefined,
3726
         "incomingPhone": this.incidentModel.incomingPhone || undefined,
3792
         "incomingPhone": this.incidentModel.incomingPhone || undefined,
3727
         "hjzxRecordId": this.incidentModel.hjzxRecordId || undefined,
3793
         "hjzxRecordId": this.incidentModel.hjzxRecordId || undefined,
3794
+				"assetId": this.incidentModel.assetId || undefined
3728
       },
3795
       },
3729
     };
3796
     };
3730
 
3797
 
@@ -4165,7 +4232,10 @@ export class FuwutaiComponent implements OnInit {
4165
   changeApply(e) {
4232
   changeApply(e) {
4166
     this.changeApplicationDepartment("&same&");
4233
     this.changeApplicationDepartment("&same&");
4167
     this.defaultInspectFn();
4234
     this.defaultInspectFn();
4168
-
4235
+		if(this.cmdbRepair){
4236
+			this.incidentModel.assetId = null;
4237
+			this.getAssetData()
4238
+		}
4169
     if(this.applyDept && this.currentTabIndex !== '故障报修'){
4239
     if(this.applyDept && this.currentTabIndex !== '故障报修'){
4170
       this.rightTitle_tab = [
4240
       this.rightTitle_tab = [
4171
         { id: 0, name: '近期配送' },
4241
         { id: 0, name: '近期配送' },
@@ -4196,22 +4266,28 @@ export class FuwutaiComponent implements OnInit {
4196
 			this.deptPriorityDTO = null
4266
 			this.deptPriorityDTO = null
4197
 		}
4267
 		}
4198
 		let orders = [];
4268
 		let orders = [];
4199
-		if(this.addressDTO&&this.addressDTO.orders){
4269
+		let id = [];
4270
+		if(this.addressDTO&&this.addressDTO.id){
4200
 			orders.push(this.addressDTO.orders)
4271
 			orders.push(this.addressDTO.orders)
4272
+			id.push(this.addressDTO.id)
4201
 		}
4273
 		}
4202
-		if(this.deptPriorityDTO&&this.deptPriorityDTO.orders){
4274
+		if(this.deptPriorityDTO&&this.deptPriorityDTO.id){
4203
 			orders.push(this.deptPriorityDTO.orders)
4275
 			orders.push(this.deptPriorityDTO.orders)
4276
+			id.push(this.deptPriorityDTO.id)
4204
 		}
4277
 		}
4205
-		if(this.userPriorityDTO&&this.userPriorityDTO.orders){
4278
+		if(this.userPriorityDTO&&this.userPriorityDTO.id){
4206
 			orders.push(this.userPriorityDTO.orders)
4279
 			orders.push(this.userPriorityDTO.orders)
4280
+			id.push(this.userPriorityDTO.id)
4207
 		}
4281
 		}
4208
-		if(this.malPriorityDTO&&this.malPriorityDTO.orders){
4282
+		if(this.malPriorityDTO&&this.malPriorityDTO.id){
4209
 			orders.push(this.malPriorityDTO.orders)
4283
 			orders.push(this.malPriorityDTO.orders)
4284
+			id.push(this.malPriorityDTO.id)
4210
 		}
4285
 		}
4211
 		let minNumber = Math.min(...orders)
4286
 		let minNumber = Math.min(...orders)
4212
-		console.log('最小值的orders', orders, minNumber)
4287
+		let index = orders.indexOf(minNumber) 
4288
+		console.log('最小值的orders', index)
4213
 		setTimeout(_=>{
4289
 		setTimeout(_=>{
4214
-			this.incidentModel.priorityId = minNumber != Infinity ? minNumber : null
4290
+			this.incidentModel.priorityId = minNumber != Infinity ? id[index] : null
4215
 		})
4291
 		})
4216
     if(this.incidentModel.department && this.currentTabIndex === '故障报修'){
4292
     if(this.incidentModel.department && this.currentTabIndex === '故障报修'){
4217
       this.rightTitle_tab = [
4293
       this.rightTitle_tab = [
@@ -4542,6 +4618,7 @@ export class FuwutaiComponent implements OnInit {
4542
         "candidateGroups": this.incidentModel.group || undefined,
4618
         "candidateGroups": this.incidentModel.group || undefined,
4543
         "assignee": this.incidentModel.user || undefined,
4619
         "assignee": this.incidentModel.user || undefined,
4544
         "hjzxRecordId": this.incidentModel.hjzxRecordId || undefined,
4620
         "hjzxRecordId": this.incidentModel.hjzxRecordId || undefined,
4621
+				"assetId": this.incidentModel.assetId || undefined
4545
       }
4622
       }
4546
     };
4623
     };
4547
     if(this.buildType){
4624
     if(this.buildType){
@@ -4617,6 +4694,7 @@ export class FuwutaiComponent implements OnInit {
4617
         "candidateGroups": this.incidentModel.group || undefined,
4694
         "candidateGroups": this.incidentModel.group || undefined,
4618
         "assignee": this.incidentModel.user || undefined,
4695
         "assignee": this.incidentModel.user || undefined,
4619
         "hjzxRecordId": this.incidentModel.hjzxRecordId || undefined,
4696
         "hjzxRecordId": this.incidentModel.hjzxRecordId || undefined,
4697
+				"assetId": this.incidentModel.assetId || undefined
4620
       }
4698
       }
4621
     };
4699
     };
4622
     if(this.buildType){
4700
     if(this.buildType){
@@ -6609,7 +6687,6 @@ export class FuwutaiComponent implements OnInit {
6609
     this.editOrder = cloneDeep(data);
6687
     this.editOrder = cloneDeep(data);
6610
     let incidentModel = cloneDeep(data);
6688
     let incidentModel = cloneDeep(data);
6611
     let incidentMsg:any = {};
6689
     let incidentMsg:any = {};
6612
-		
6613
     // incidentModel.department && (this.applicationDeptList = [cloneDeep(incidentModel.department)]);
6690
     // incidentModel.department && (this.applicationDeptList = [cloneDeep(incidentModel.department)]);
6614
     incidentModel.department && (incidentMsg.deptManyPhone = incidentModel.department.manyPhone);
6691
     incidentModel.department && (incidentMsg.deptManyPhone = incidentModel.department.manyPhone);
6615
     incidentModel.department && (incidentMsg.deptName = incidentModel.department.dept);
6692
     incidentModel.department && (incidentMsg.deptName = incidentModel.department.dept);
@@ -6629,11 +6706,16 @@ export class FuwutaiComponent implements OnInit {
6629
     incidentModel.category && (incidentModel.category = incidentModel.category.id);
6706
     incidentModel.category && (incidentModel.category = incidentModel.category.id);
6630
     this.incidentModel = incidentModel;
6707
     this.incidentModel = incidentModel;
6631
     this.incidentMsg = incidentMsg;
6708
     this.incidentMsg = incidentMsg;
6709
+		// this.incidentModel.department && this.changeApply(this.incidentModel.department.id);
6632
     this.incidentModel.category && this.changeApplyCategory(this.incidentModel.category, true);
6710
     this.incidentModel.category && this.changeApplyCategory(this.incidentModel.category, true);
6633
     console.log('this.applicationDeptList:', this.applicationDeptList)
6711
     console.log('this.applicationDeptList:', this.applicationDeptList)
6634
     console.log('incidentModel:', incidentModel)
6712
     console.log('incidentModel:', incidentModel)
6635
     this.showNewOrder(0, '', '', true, '报修转事件');
6713
     this.showNewOrder(0, '', '', true, '报修转事件');
6636
 		console.log(2345,this.incidentModel.repairIncidentType)
6714
 		console.log(2345,this.incidentModel.repairIncidentType)
6715
+		if(incidentModel.assetId){
6716
+			this.getAssetData()
6717
+			incidentModel.assetId = Number(incidentModel.assetId)
6718
+		}
6637
     // 查询报修图片
6719
     // 查询报修图片
6638
     this.getRepairImgs(data.id);
6720
     this.getRepairImgs(data.id);
6639
   }
6721
   }
@@ -7014,8 +7096,8 @@ export class FuwutaiComponent implements OnInit {
7014
 
7096
 
7015
   // 选择地址
7097
   // 选择地址
7016
 	addressDTO:any;
7098
 	addressDTO:any;
7017
-  selectAddress(name, id){
7018
-		let item = this.addressList.find(i=>i.id == id)
7099
+  selectAddress(name, idx){
7100
+		let item = this.addressList.find(i=>i.id == idx)
7019
 		console.log('选中的地址11111',item);
7101
 		console.log('选中的地址11111',item);
7020
 		if(item && item.priority){
7102
 		if(item && item.priority){
7021
 			this.addressDTO = item.priority
7103
 			this.addressDTO = item.priority
@@ -7023,22 +7105,28 @@ export class FuwutaiComponent implements OnInit {
7023
 			this.addressDTO = null
7105
 			this.addressDTO = null
7024
 		}
7106
 		}
7025
 		let orders = [];
7107
 		let orders = [];
7026
-		if(this.addressDTO&&this.addressDTO.orders){
7108
+		let id = [];
7109
+		if(this.addressDTO&&this.addressDTO.id){
7027
 			orders.push(this.addressDTO.orders)
7110
 			orders.push(this.addressDTO.orders)
7111
+			id.push(this.addressDTO.id)
7028
 		}
7112
 		}
7029
-		if(this.deptPriorityDTO&&this.deptPriorityDTO.orders){
7113
+		if(this.deptPriorityDTO&&this.deptPriorityDTO.id){
7030
 			orders.push(this.deptPriorityDTO.orders)
7114
 			orders.push(this.deptPriorityDTO.orders)
7115
+			id.push(this.deptPriorityDTO.id)
7031
 		}
7116
 		}
7032
-		if(this.userPriorityDTO&&this.userPriorityDTO.orders){
7117
+		if(this.userPriorityDTO&&this.userPriorityDTO.id){
7033
 			orders.push(this.userPriorityDTO.orders)
7118
 			orders.push(this.userPriorityDTO.orders)
7119
+			id.push(this.userPriorityDTO.id)
7034
 		}
7120
 		}
7035
-		if(this.malPriorityDTO&&this.malPriorityDTO.orders){
7121
+		if(this.malPriorityDTO&&this.malPriorityDTO.id){
7036
 			orders.push(this.malPriorityDTO.orders)
7122
 			orders.push(this.malPriorityDTO.orders)
7123
+			id.push(this.malPriorityDTO.id)
7037
 		}
7124
 		}
7038
 		let minNumber = Math.min(...orders)
7125
 		let minNumber = Math.min(...orders)
7126
+		let index = orders.indexOf(minNumber) 
7039
 		console.log('最小值的orders', orders, minNumber)
7127
 		console.log('最小值的orders', orders, minNumber)
7040
 		setTimeout(_=>{
7128
 		setTimeout(_=>{
7041
-			this.incidentModel.priorityId = minNumber != Infinity ? minNumber : null
7129
+			this.incidentModel.priorityId = minNumber != Infinity ? id[index] : null
7042
 		})
7130
 		})
7043
     this.incidentModel.houseNumber = name;
7131
     this.incidentModel.houseNumber = name;
7044
     this.isShowAddressList = false;
7132
     this.isShowAddressList = false;

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

@@ -2413,7 +2413,33 @@
2413
     </div>
2413
     </div>
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>
2416
+        <nz-form-item *ngIf="cmdbRepair">
2417
+          <nz-form-label [nzSm]="4" [nzXs]="4" nzFor="assetId">资产</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" (ngModelChange)="changeAssetData($event)">
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" nzShowSearch 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
           <nz-form-label [nzSm]="4" [nzXs]="4" nzRequired nzFor="description">故障描述</nz-form-label>
2443
           <nz-form-label [nzSm]="4" [nzXs]="4" nzRequired nzFor="description">故障描述</nz-form-label>
2418
           <nz-form-control>
2444
           <nz-form-control>
2419
             <nz-input-group style="width:442px;">
2445
             <nz-input-group style="width:442px;">

+ 123 - 4
src/app/views/hushijiandan/hushijiandan.component.ts

@@ -118,6 +118,8 @@ export class HushijiandanComponent implements OnInit {
118
   searchTabInpSubject = new Subject(); //左侧查患者信息和检查信息防抖
118
   searchTabInpSubject = new Subject(); //左侧查患者信息和检查信息防抖
119
   otherSearchChangeSubject = new Subject(); //其他建单搜索防抖
119
   otherSearchChangeSubject = new Subject(); //其他建单搜索防抖
120
   inspectSubject = new Subject();
120
   inspectSubject = new Subject();
121
+	changeAssetInpSubject = new Subject();
122
+	changeCommonInpSubject = new Subject();
121
   isYyInspect = false; //需要预约检查
123
   isYyInspect = false; //需要预约检查
122
   inspectAndPatientTransportConfig:any = {timeMod: 30};
124
   inspectAndPatientTransportConfig:any = {timeMod: 30};
123
   constructor(
125
   constructor(
@@ -191,6 +193,7 @@ export class HushijiandanComponent implements OnInit {
191
     this.getUpdateTipsForNurses();
193
     this.getUpdateTipsForNurses();
192
     this.getRefreshNurseWorkOrderTime();
194
     this.getRefreshNurseWorkOrderTime();
193
     this.getCloseTimeFlag();
195
     this.getCloseTimeFlag();
196
+		this.getCmdbRepairFlag();
194
     this.currentDept = this.tool.getCurrentUserDept();
197
     this.currentDept = this.tool.getCurrentUserDept();
195
     console.log(this.currentDept, this.tabSearchCont);
198
     console.log(this.currentDept, this.tabSearchCont);
196
     this.currentDept.typeValue == 'surgery' && !this.tabSearchCont && this.getSurgeryConfig();
199
     this.currentDept.typeValue == 'surgery' && !this.tabSearchCont && this.getSurgeryConfig();
@@ -209,7 +212,12 @@ export class HushijiandanComponent implements OnInit {
209
     this.inspectSubject.pipe(debounceTime(500)).subscribe((v) => {
212
     this.inspectSubject.pipe(debounceTime(500)).subscribe((v) => {
210
       this.refreshInspectList();
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
     this.getTodayNum();
221
     this.getTodayNum();
214
     this.initLogin();
222
     this.initLogin();
215
     this.getDeptTaskType();
223
     this.getDeptTaskType();
@@ -1027,6 +1035,100 @@ 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
+					}else{
1054
+						this.cmdbRepair = false
1055
+					}
1056
+	      }
1057
+	    });
1058
+	}
1059
+	
1060
+	changeCommonInp(e) {
1061
+		return
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 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
+	   //  },
1089
+	  };
1090
+	  console.log(postData);
1091
+	  this.isLoading = true;
1092
+	  this.mainService
1093
+	    .incidentPost("listIncidentCategory", postData)
1094
+	    .subscribe((data) => {
1095
+	      this.isLoading = false;
1096
+	      if (data.status == 200) {
1097
+	        this.applicationCategoryList = data.data;
1098
+	      }
1099
+	    });
1100
+	}
1101
+	
1102
+	changeAsset(e){
1103
+		this.changeAssetInpSubject.next(e);
1104
+	}
1105
+	// 选择资产
1106
+	changeAssetData(e){
1107
+		this.validateBxForm.controls.category.setValue(null)
1108
+		this.searchApplicationCategory();
1109
+	}
1110
+	
1111
+	// 获取资产列表
1112
+	assetData:any = [];
1113
+	getAssetData(name?){
1114
+		let data = {
1115
+		  idx: 0,
1116
+		  sum: 20,
1117
+		  asset: {
1118
+		    downHosId: this.currentHospital.id,
1119
+		    name: name
1120
+		  },
1121
+		};
1122
+		
1123
+		this.mainService
1124
+		  .getFetchDataList("simple/data", "asset", data)
1125
+		  .subscribe((data) => {
1126
+		    if (data.status == 200) {
1127
+		      this.assetData = data.list;
1128
+		    }
1129
+		  });
1130
+	}
1131
+	
1030
   //获取综合日志
1132
   //获取综合日志
1031
   rLoading = false;
1133
   rLoading = false;
1032
   listDeptOrderRecords: any = [];
1134
   listDeptOrderRecords: any = [];
@@ -1532,7 +1634,22 @@ export class HushijiandanComponent implements OnInit {
1532
       officeAddress: [null, [Validators.required]],
1634
       officeAddress: [null, [Validators.required]],
1533
       contacts: [this.loginUser.name, [Validators.required]],
1635
       contacts: [this.loginUser.name, [Validators.required]],
1534
       contactsInformation: [this.loginUser.phone, [Validators.required]],
1636
       contactsInformation: [this.loginUser.phone, [Validators.required]],
1637
+			assetId: [null, []],
1638
+			// category: [null, []],
1535
     });
1639
     });
1640
+		if(this.cmdbRepair){
1641
+			this.validateBxForm.addControl(
1642
+				'assetId',
1643
+				new FormControl(null, [])
1644
+			);
1645
+			// this.validateBxForm.addControl(
1646
+			// 	'category',
1647
+			// 	new FormControl(null, [])
1648
+			// );
1649
+		}else{
1650
+			this.validateBxForm.removeControl('assetId');
1651
+			// this.validateBxForm.removeControl('category');
1652
+		}
1536
     this.getDeptById(this.currentDept.id);
1653
     this.getDeptById(this.currentDept.id);
1537
   }
1654
   }
1538
   // 根据科室ID获取详情
1655
   // 根据科室ID获取详情
@@ -1711,11 +1828,13 @@ export class HushijiandanComponent implements OnInit {
1711
               requester: this.loginUser,
1828
               requester: this.loginUser,
1712
               acceptUser: this.loginUser,
1829
               acceptUser: this.loginUser,
1713
               deleteFlag: 0,
1830
               deleteFlag: 0,
1831
+							assetId: this.validateBxForm.value.assetId || undefined,
1832
+							// category: this.validateBxForm.value.category ? { id: this.validateBxForm.value.category } : undefined,
1714
             },
1833
             },
1715
           };
1834
           };
1716
-          if (this.coopBx.category) {
1717
-            postData.incident.category = this.coopBx.categoryDTO;
1718
-          }
1835
+          // if (this.coopBx.category) {
1836
+          //   postData.incident.category = this.coopBx.categoryDTO;
1837
+          // }
1719
           this.mainService.flowPost("incident/task/request", postData).subscribe((res) => {
1838
           this.mainService.flowPost("incident/task/request", postData).subscribe((res) => {
1720
             this.btnLoading = false;
1839
             this.btnLoading = false;
1721
             this.cancenlLoading = false;
1840
             this.cancenlLoading = false;

+ 34 - 4
src/app/views/login/login.component.ts

@@ -294,6 +294,7 @@ export class LoginComponent implements OnInit {
294
     let roleMenus = data.user.menu;
294
     let roleMenus = data.user.menu;
295
     let canLogin = false; //是否可以进入系统主页面(无护士端,调度台,药房端权限)
295
     let canLogin = false; //是否可以进入系统主页面(无护士端,调度台,药房端权限)
296
     let successLoginMsg = true; //登录成功提示,true是提示,false不提示
296
     let successLoginMsg = true; //登录成功提示,true是提示,false不提示
297
+		let sy = false;
297
     let fwt = false;
298
     let fwt = false;
298
     let ddt = false;
299
     let ddt = false;
299
 		let bbj = false;
300
 		let bbj = false;
@@ -302,8 +303,13 @@ export class LoginComponent implements OnInit {
302
 		let blk = false;
303
 		let blk = false;
303
 		let web = false;
304
 		let web = false;
304
     let yfang = false;
305
     let yfang = false;
306
+		let gglb = false;
307
+		let gzgd = false;
305
     roleMenus.forEach((e) => {
308
     roleMenus.forEach((e) => {
306
-      if (e.link == "pharmacy") {
309
+			if (e.link == "home") {
310
+			  sy = true;
311
+			  console.log("首页");
312
+			}else if (e.link == "pharmacy") {
307
         yfang = true;
313
         yfang = true;
308
         console.log("药房端");
314
         console.log("药房端");
309
       } else if (e.link == "nurse") {
315
       } else if (e.link == "nurse") {
@@ -328,6 +334,12 @@ export class LoginComponent implements OnInit {
328
       } else if (e.link == "webRepairs") {
334
       } else if (e.link == "webRepairs") {
329
         web = true;
335
         web = true;
330
         console.log("web报修");
336
         console.log("web报修");
337
+      }else if (e.link == "orderManagement") {
338
+        gglb = true;
339
+        console.log("工单列表");
340
+      }else if (e.link == "incidentManagement") {
341
+        gzgd = true;
342
+        console.log("故障工单");
331
       }
343
       }
332
       canLogin = true;
344
       canLogin = true;
333
     });
345
     });
@@ -445,18 +457,36 @@ export class LoginComponent implements OnInit {
445
     }
457
     }
446
     // 有菜单可以进入系统主页面
458
     // 有菜单可以进入系统主页面
447
     if (!canLogin) {
459
     if (!canLogin) {
448
-      this.msg.success("暂无权限进入系统!", {
460
+      this.msg.error("暂无权限进入系统!", {
449
         nzDuration: 2000,
461
         nzDuration: 2000,
450
       });
462
       });
451
     } else {
463
     } else {
464
+			if(!gglb && !gzgd && !sy){
465
+				this.msg.error("暂无权限进入系统!", {
466
+				  nzDuration: 2000,
467
+				});
468
+				return
469
+			}
452
       if (successLoginMsg) {
470
       if (successLoginMsg) {
453
         this.msg.success("登录成功!", {
471
         this.msg.success("登录成功!", {
454
           nzDuration: 2000,
472
           nzDuration: 2000,
455
         });
473
         });
456
       }
474
       }
457
       successLoginMsg = false;
475
       successLoginMsg = false;
458
-      localStorage.setItem("user", JSON.stringify(data.user));
459
-      this.router.navigateByUrl("/main/home");
476
+			localStorage.setItem("user", JSON.stringify(data.user));
477
+			if(gglb){
478
+				this.router.navigateByUrl("/main/orderManagement");
479
+				return
480
+			}else if(gzgd){
481
+				this.router.navigateByUrl("/main/incidentManagement");
482
+				return
483
+			}
484
+			if(gglb && gzgd && sy){
485
+				this.router.navigateByUrl("/main/home");
486
+			}
487
+			if(!gglb && !gzgd && sy){
488
+				this.router.navigateByUrl("/main/home");
489
+			}
460
     }
490
     }
461
   }
491
   }
462
   // 处理树数据(parent格式转为children格式)
492
   // 处理树数据(parent格式转为children格式)

+ 14 - 2
src/app/views/main/main.component.html

@@ -7,7 +7,7 @@
7
     </div>
7
     </div>
8
     <!-- 导航重写,兼容chrome39 -->
8
     <!-- 导航重写,兼容chrome39 -->
9
     <ul id="ds-menu">
9
     <ul id="ds-menu">
10
-      <li class="mainMenuOne" (click)="totoMenu('首页')" [ngClass]="{mainMenuSelected:indexFlag}">
10
+      <li class="mainMenuOne" *ngIf="homeRole" (click)="totoMenu('首页')" [ngClass]="{mainMenuSelected:indexFlag}">
11
         <i nz-icon nzType="home"></i>
11
         <i nz-icon nzType="home"></i>
12
         <span nzTooltipPlacement="right" nz-tooltip nzTooltipTitle="首页">首页</span>
12
         <span nzTooltipPlacement="right" nz-tooltip nzTooltipTitle="首页">首页</span>
13
       </li>
13
       </li>
@@ -199,7 +199,7 @@
199
 					<ng-container *ngIf="buildType !== '报修转事件'">
199
 					<ng-container *ngIf="buildType !== '报修转事件'">
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)">
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
 							<ng-container *ngFor="let option of applicationRequesterList">
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
 							</ng-container>
203
 							</ng-container>
204
 							<nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
204
 							<nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
205
 								<i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
205
 								<i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
@@ -304,6 +304,18 @@
304
 								</div>
304
 								</div>
305
 
305
 
306
 								<div class="row">
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
 									<div class="col">
319
 									<div class="col">
308
 										<span class="name required">故障现象:</span>
320
 										<span class="name required">故障现象:</span>
309
 										<nz-select class="w100" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch (nzOnSearch)="changeCommonInp('category', $event)" nzPlaceHolder="请选择故障现象" [(ngModel)]="incidentModel.category" (ngModelChange)="changeApplyCategory($event)" (nzOpenChange)="openChangeApplyCategory($event)">
321
 										<nz-select class="w100" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch (nzOnSearch)="changeCommonInp('category', $event)" nzPlaceHolder="请选择故障现象" [(ngModel)]="incidentModel.category" (ngModelChange)="changeApplyCategory($event)" (nzOpenChange)="openChangeApplyCategory($event)">

+ 108 - 84
src/app/views/main/main.component.ts

@@ -40,7 +40,7 @@ export class MainComponent implements OnInit, OnDestroy {
40
   menus: any = JSON.parse(localStorage.getItem("menu"));
40
   menus: any = JSON.parse(localStorage.getItem("menu"));
41
   currentHospital; //当前院区
41
   currentHospital; //当前院区
42
   routerEventsListener; //监听路由
42
   routerEventsListener; //监听路由
43
-
43
+	homeRole: boolean = false; //首页权限
44
 	speediness: boolean = false; //新增报修权限
44
 	speediness: boolean = false; //新增报修权限
45
   deskRole: boolean = false; //调度台权限
45
   deskRole: boolean = false; //调度台权限
46
   nurseRole: boolean = false; //护士端权限
46
   nurseRole: boolean = false; //护士端权限
@@ -316,6 +316,10 @@ export class MainComponent implements OnInit, OnDestroy {
316
     let menus = JSON.parse(localStorage.getItem("menu"));
316
     let menus = JSON.parse(localStorage.getItem("menu"));
317
     let arr = [];
317
     let arr = [];
318
     menus.forEach((e) => {
318
     menus.forEach((e) => {
319
+			if (e.link == "home") {
320
+			  this.homeRole = true;
321
+			  console.log("首页权限");
322
+			}
319
       if (e.link == "nurse") {
323
       if (e.link == "nurse") {
320
         this.nurseRole = true;
324
         this.nurseRole = true;
321
         console.log("护士端权限");
325
         console.log("护士端权限");
@@ -544,7 +548,8 @@ export class MainComponent implements OnInit, OnDestroy {
544
 	searchHosDepartmentQtSubject = new Subject();
548
 	searchHosDepartmentQtSubject = new Subject();
545
 	searchPatientListSubject = new Subject();
549
 	searchPatientListSubject = new Subject();
546
 	inspectSubject = new Subject();
550
 	inspectSubject = new Subject();
547
-
551
+	changeAssetInpSubject = new Subject();
552
+	
548
 	// 运维相关
553
 	// 运维相关
549
 	incidentModel:any = {};
554
 	incidentModel:any = {};
550
 	incidentMsg:any = {};
555
 	incidentMsg:any = {};
@@ -654,9 +659,9 @@ export class MainComponent implements OnInit, OnDestroy {
654
 
659
 
655
 	// 获取院区配置配置,是否核酸打印
660
 	// 获取院区配置配置,是否核酸打印
656
 	getHospitalConfigList(key) {
661
 	getHospitalConfigList(key) {
657
-	  if(!this.hsmsData.hsmsSwitch){
658
-	    return;
659
-	  }
662
+	  // if(!this.hsmsData.hsmsSwitch){
663
+	  //   return;
664
+	  // }
660
 	  let postData = { idx: 0, sum: 1, hospitalConfig: { hosId: this.checkedHos, key } };
665
 	  let postData = { idx: 0, sum: 1, hospitalConfig: { hosId: this.checkedHos, key } };
661
 	  this.mainService.getFetchDataList("simple/data", "hospitalConfig", postData).subscribe(result=>{
666
 	  this.mainService.getFetchDataList("simple/data", "hospitalConfig", postData).subscribe(result=>{
662
 	    if(result.status == 200){
667
 	    if(result.status == 200){
@@ -670,9 +675,9 @@ export class MainComponent implements OnInit, OnDestroy {
670
 	// 获取配置文件写死的任务类型ID(送病人回病房9),选择此任务类型的话,患者信息从终点科室获取
675
 	// 获取配置文件写死的任务类型ID(送病人回病房9),选择此任务类型的话,患者信息从终点科室获取
671
 	getConfigTasktypeLoading: boolean = false;
676
 	getConfigTasktypeLoading: boolean = false;
672
 	getConfigTasktype() {
677
 	getConfigTasktype() {
673
-	  if(!this.hsmsData.hsmsSwitch){
674
-	    return;
675
-	  }
678
+	  // if(!this.hsmsData.hsmsSwitch){
679
+	  //   return;
680
+	  // }
676
 	  let postData = {
681
 	  let postData = {
677
 	    idx: 0,
682
 	    idx: 0,
678
 	    sum: 1,
683
 	    sum: 1,
@@ -694,9 +699,9 @@ export class MainComponent implements OnInit, OnDestroy {
694
 	// 获取配置文件写死的任务类型ID(转科,给转出院记录用6)
699
 	// 获取配置文件写死的任务类型ID(转科,给转出院记录用6)
695
 	patientLogTasktypeLoading: boolean = false;
700
 	patientLogTasktypeLoading: boolean = false;
696
 	patientLogTasktype() {
701
 	patientLogTasktype() {
697
-	  if(!this.hsmsData.hsmsSwitch){
698
-	    return;
699
-	  }
702
+	  // if(!this.hsmsData.hsmsSwitch){
703
+	  //   return;
704
+	  // }
700
 	  let postData = {
705
 	  let postData = {
701
 	    idx: 0,
706
 	    idx: 0,
702
 	    sum: 1,
707
 	    sum: 1,
@@ -857,9 +862,9 @@ export class MainComponent implements OnInit, OnDestroy {
857
 	searchTaskList;
862
 	searchTaskList;
858
 	searchTaskLoading = false;
863
 	searchTaskLoading = false;
859
 	getSearchTaskList(keyword, countRemark = '') {
864
 	getSearchTaskList(keyword, countRemark = '') {
860
-	  if(!this.hsmsData.hsmsSwitch){
861
-	    return;
862
-	  }
865
+	  // if(!this.hsmsData.hsmsSwitch){
866
+	  //   return;
867
+	  // }
863
 	  this.searchTaskLoading = true;
868
 	  this.searchTaskLoading = true;
864
 	  return this.mainService.getTaskTypeBySearchKey({
869
 	  return this.mainService.getTaskTypeBySearchKey({
865
 	    searchKey: keyword || undefined,
870
 	    searchKey: keyword || undefined,
@@ -883,9 +888,9 @@ export class MainComponent implements OnInit, OnDestroy {
883
 	patientLogList:any;
888
 	patientLogList:any;
884
 	loading5:boolean = false
889
 	loading5:boolean = false
885
 	getPatientLog(id) {
890
 	getPatientLog(id) {
886
-	  if(!this.hsmsData.hsmsSwitch){
887
-	    return;
888
-	  }
891
+	  // if(!this.hsmsData.hsmsSwitch){
892
+	  //   return;
893
+	  // }
889
 	  if (id == -1 || id === null || id === undefined) {
894
 	  if (id == -1 || id === null || id === undefined) {
890
 	    this.patientLogList = [];
895
 	    this.patientLogList = [];
891
 	    return;
896
 	    return;
@@ -911,9 +916,9 @@ export class MainComponent implements OnInit, OnDestroy {
911
 	// 服务台新建工单—根据申请科室id来查询未到达工单(科室id)
916
 	// 服务台新建工单—根据申请科室id来查询未到达工单(科室id)
912
 	loading4 = false;
917
 	loading4 = false;
913
 	getWorkOrders(id) {
918
 	getWorkOrders(id) {
914
-	  if(!this.hsmsData.hsmsSwitch){
915
-	    return;
916
-	  }
919
+	  // if(!this.hsmsData.hsmsSwitch){
920
+	  //   return;
921
+	  // }
917
 	  if (id == -1 || id === null || id === undefined) {
922
 	  if (id == -1 || id === null || id === undefined) {
918
 	    this.noArrives = [];
923
 	    this.noArrives = [];
919
 	    return;
924
 	    return;
@@ -952,10 +957,10 @@ export class MainComponent implements OnInit, OnDestroy {
952
 	loading6 = false;
957
 	loading6 = false;
953
 	itsmOrders:any[] = [];
958
 	itsmOrders:any[] = [];
954
 	getItsmOrders(id) {
959
 	getItsmOrders(id) {
955
-	  if(!this.itsmData.mdv2Switch){
956
-	    return;
957
-	  }
958
-	  if (id == -1 || id === null || id === undefined && this.incidentModel.repairIncidentType === 'dept') {
960
+	  // if(!this.itsmData.mdv2Switch){
961
+	  //   return;
962
+	  // }
963
+	  if ((id == -1 || id === null || id === undefined ) && this.incidentModel.repairIncidentType === 'dept') {
959
 	    this.itsmOrders = [];
964
 	    this.itsmOrders = [];
960
 	    return;
965
 	    return;
961
 	  }
966
 	  }
@@ -1019,9 +1024,9 @@ export class MainComponent implements OnInit, OnDestroy {
1019
 	loading7 = false;
1024
 	loading7 = false;
1020
 	knowageList:any[] = [];
1025
 	knowageList:any[] = [];
1021
 	getKnowageList() {
1026
 	getKnowageList() {
1022
-	  if(!this.itsmData.mdv2Switch){
1023
-	    return;
1024
-	  }
1027
+	  // if(!this.itsmData.mdv2Switch){
1028
+	  //   return;
1029
+	  // }
1025
 
1030
 
1026
 	  if(!(this.incidentModel.category && this.solutionStatus && this.solutionType)){
1031
 	  if(!(this.incidentModel.category && this.solutionStatus && this.solutionType)){
1027
 	    this.loading7 = false;
1032
 	    this.loading7 = false;
@@ -1159,7 +1164,10 @@ export class MainComponent implements OnInit, OnDestroy {
1159
 
1164
 
1160
 	//   this.incidentModel.department = undefined;
1165
 	//   this.incidentModel.department = undefined;
1161
 	  this.searchApplicationDepartment('itsm');
1166
 	  this.searchApplicationDepartment('itsm');
1162
-
1167
+		if(this.cmdbRepair){
1168
+			this.incidentModel.assetId = null;
1169
+			this.getAssetData()
1170
+		}
1163
 	  if(this.buildType !== '报修转事件'){
1171
 	  if(this.buildType !== '报修转事件'){
1164
 	    this.incidentModel.requester = undefined;
1172
 	    this.incidentModel.requester = undefined;
1165
 	    this.searchApplicationRequester();
1173
 	    this.searchApplicationRequester();
@@ -1260,6 +1268,10 @@ export class MainComponent implements OnInit, OnDestroy {
1260
 	  }
1268
 	  }
1261
 		if(this.incidentModel.repairIncidentType === 'public'){
1269
 		if(this.incidentModel.repairIncidentType === 'public'){
1262
 			this.getItsmOrders('')
1270
 			this.getItsmOrders('')
1271
+			if(this.cmdbRepair){
1272
+				this.incidentModel.assetId = null;
1273
+				this.getAssetData()
1274
+			}
1263
 		}
1275
 		}
1264
 	}
1276
 	}
1265
 	// 故障现象列表
1277
 	// 故障现象列表
@@ -1401,6 +1413,7 @@ export class MainComponent implements OnInit, OnDestroy {
1401
 	      "callID": this.incidentModel.callID || undefined,
1413
 	      "callID": this.incidentModel.callID || undefined,
1402
 	      "incomingPhone": this.incidentModel.incomingPhone || undefined,
1414
 	      "incomingPhone": this.incidentModel.incomingPhone || undefined,
1403
 	      "hjzxRecordId": this.incidentModel.hjzxRecordId || undefined,
1415
 	      "hjzxRecordId": this.incidentModel.hjzxRecordId || undefined,
1416
+				"assetId": this.incidentModel.assetId || undefined
1404
 	    },
1417
 	    },
1405
 	  };
1418
 	  };
1406
 
1419
 
@@ -1750,9 +1763,9 @@ export class MainComponent implements OnInit, OnDestroy {
1750
 	applicationDeptList:any[] = [];
1763
 	applicationDeptList:any[] = [];
1751
 	applyStartDept:any;
1764
 	applyStartDept:any;
1752
 	searchApplicationDepartment(type, e?, phone?, deptId?, isInit?) {
1765
 	searchApplicationDepartment(type, e?, phone?, deptId?, isInit?) {
1753
-	  if(!this.hsmsData.hsmsSwitch && !this.itsmData.mdv2Switch){
1754
-	    return;
1755
-	  }
1766
+	  // if(!this.hsmsData.hsmsSwitch && !this.itsmData.mdv2Switch){
1767
+	  //   return;
1768
+	  // }
1756
 	  let keyWord = "";
1769
 	  let keyWord = "";
1757
 	  if (e && e !== "&ks&" && e !== "&go&") {
1770
 	  if (e && e !== "&ks&" && e !== "&go&") {
1758
 	    keyWord = e;
1771
 	    keyWord = e;
@@ -1869,6 +1882,10 @@ export class MainComponent implements OnInit, OnDestroy {
1869
 	// 配送-选择科室
1882
 	// 配送-选择科室
1870
 	changeApply(e) {
1883
 	changeApply(e) {
1871
 	  console.log(e, this.applicationDepartmentList);
1884
 	  console.log(e, this.applicationDepartmentList);
1885
+		if(this.cmdbRepair){
1886
+			this.incidentModel.assetId = null;
1887
+			this.getAssetData()
1888
+		}
1872
 	  this.changeApplicationDepartment("&same&");
1889
 	  this.changeApplicationDepartment("&same&");
1873
 	  if(this.applyDept && this.currentTabIndex !== '故障报修'){
1890
 	  if(this.applyDept && this.currentTabIndex !== '故障报修'){
1874
 	    this.rightTitle_tab = [
1891
 	    this.rightTitle_tab = [
@@ -2207,6 +2224,7 @@ export class MainComponent implements OnInit, OnDestroy {
2207
 	      "candidateGroups": this.incidentModel.group || undefined,
2224
 	      "candidateGroups": this.incidentModel.group || undefined,
2208
 	      "assignee": this.incidentModel.user || undefined,
2225
 	      "assignee": this.incidentModel.user || undefined,
2209
 	      "hjzxRecordId": this.incidentModel.hjzxRecordId || undefined,
2226
 	      "hjzxRecordId": this.incidentModel.hjzxRecordId || undefined,
2227
+				"assetId": this.incidentModel.assetId || undefined
2210
 	    }
2228
 	    }
2211
 	  };
2229
 	  };
2212
 	  if(this.buildType){
2230
 	  if(this.buildType){
@@ -2496,53 +2514,14 @@ export class MainComponent implements OnInit, OnDestroy {
2496
 	getAutoWorkTypes(isFirst, isInit) {
2514
 	getAutoWorkTypes(isFirst, isInit) {
2497
 	  this.workTypesArrange = [];
2515
 	  this.workTypesArrange = [];
2498
 	  // 运维
2516
 	  // 运维
2499
-	  if(this.itsmData.mdv2Switch){
2517
+	  // if(this.itsmData.mdv2Switch){
2500
 	    this.workTypesArrange = [{key:'故障报修', value: []}];
2518
 	    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
-	  }
2519
+	    // if(!this.hsmsData.hsmsSwitch){
2520
+	    //   console.log('workTypesArrange', this.workTypesArrange);
2521
+	    //   // 是否显示操作项
2522
+	    //   this.workTypesFlag = this.workTypesArrange.length >= 5;
2523
+	    // }
2524
+	  // }
2546
 	}
2525
 	}
2547
 	// 查类型
2526
 	// 查类型
2548
 	getTaskTypeCountRemarkList(){
2527
 	getTaskTypeCountRemarkList(){
@@ -3701,12 +3680,12 @@ export class MainComponent implements OnInit, OnDestroy {
3701
 
3680
 
3702
 	// 运维、配送工单切换
3681
 	// 运维、配送工单切换
3703
 	filterOrderList(type, state){
3682
 	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
-	  }
3683
+	  // if(!this.itsmData.mdv2Switch && this.hsmsData.hsmsSwitch){
3684
+	  //   return;
3685
+	  // }
3686
+	  // if(this.itsmData.mdv2Switch && !this.hsmsData.hsmsSwitch){
3687
+	  //   return;
3688
+	  // }
3710
 	  this.flagList[`${type}Flag${state}`] = !this.flagList[`${type}Flag${state}`];
3689
 	  this.flagList[`${type}Flag${state}`] = !this.flagList[`${type}Flag${state}`];
3711
 	  // this.getOrderList(state, state === 1);
3690
 	  // this.getOrderList(state, state === 1);
3712
 	}
3691
 	}
@@ -3907,6 +3886,11 @@ export class MainComponent implements OnInit, OnDestroy {
3907
 		    this.getPatientByResidenceNo(v[1]);
3886
 		    this.getPatientByResidenceNo(v[1]);
3908
 		  }
3887
 		  }
3909
 		});
3888
 		});
3889
+		
3890
+		this.changeAssetInpSubject.pipe(debounceTime(500)).subscribe((v) => {
3891
+		  this.getAssetData(v);
3892
+		});
3893
+		
3910
 		this.onSearchTaskBuildSubject.pipe(debounceTime(500)).subscribe((v) => {
3894
 		this.onSearchTaskBuildSubject.pipe(debounceTime(500)).subscribe((v) => {
3911
 		  this.getTasktypeByPhone(v);
3895
 		  this.getTasktypeByPhone(v);
3912
 		});
3896
 		});
@@ -3937,6 +3921,7 @@ export class MainComponent implements OnInit, OnDestroy {
3937
 	applicantMustFillIn:any; //申请人是否必填 1是,0否
3921
 	applicantMustFillIn:any; //申请人是否必填 1是,0否
3938
 	deptRepair:boolean = false; //科内报修
3922
 	deptRepair:boolean = false; //科内报修
3939
 	publicRepair:boolean = false; ; //公共报修
3923
 	publicRepair:boolean = false; ; //公共报修
3924
+	cmdbRepair:boolean = false; ; //是否支持资产报修
3940
 	getSysConfig() {
3925
 	getSysConfig() {
3941
 		const postData = { idx: 0, sum: 99 };
3926
 		const postData = { idx: 0, sum: 99 };
3942
 		this.mainService
3927
 		this.mainService
@@ -3970,6 +3955,13 @@ export class MainComponent implements OnInit, OnDestroy {
3970
 								case "applicantMustFillIn":
3955
 								case "applicantMustFillIn":
3971
 									this.applicantMustFillIn = c[1]
3956
 									this.applicantMustFillIn = c[1]
3972
 									break;
3957
 									break;
3958
+								case "cmdbRepair":
3959
+									if(c[1]=='1'){
3960
+										this.cmdbRepair = true
3961
+									}else{
3962
+										this.cmdbRepair = false
3963
+									}
3964
+									break;	
3973
 							}
3965
 							}
3974
 						});
3966
 						});
3975
 						if(this.eventData){
3967
 						if(this.eventData){
@@ -3991,11 +3983,43 @@ export class MainComponent implements OnInit, OnDestroy {
3991
 							}
3983
 							}
3992
 							this.searchApplicationBuilding()
3984
 							this.searchApplicationBuilding()
3993
 						}
3985
 						}
3986
+						
3987
+						if(this.cmdbRepair && this.hospitalModel==1){
3988
+							this.getAssetData()
3989
+						}
3994
 					}
3990
 					}
3995
 				}
3991
 				}
3996
 			});
3992
 			});
3997
 	 }
3993
 	 }
3998
-
3994
+	
3995
+	changeAsset(e){
3996
+		this.changeAssetInpSubject.next(e);
3997
+	}
3998
+	
3999
+  // 获取资产列表
4000
+	assetData:any = [];
4001
+	getAssetData(name?){
4002
+		// if(!this.incidentModel.hosId){
4003
+		// 	return
4004
+		// }
4005
+		let data = {
4006
+		  idx: 0,
4007
+		  sum: 20,
4008
+		  asset: {
4009
+		    downHosId: this.hospitalModel!=1 ? this.incidentModel.hosId : this.currentHospital.id,
4010
+		    name: name
4011
+		  },
4012
+		};
4013
+		
4014
+		this.mainService
4015
+		  .getFetchDataList("simple/data", "asset", data)
4016
+		  .subscribe((data) => {
4017
+		    if (data.status == 200) {
4018
+		      this.assetData = data.list;
4019
+		    }
4020
+		  });
4021
+	}
4022
+	
3999
 	// 新增报修
4023
 	// 新增报修
4000
 	speedinessAdd(): void {
4024
 	speedinessAdd(): void {
4001
 		this.addOrder();
4025
 		this.addOrder();