maotao 2 mēneši atpakaļ
vecāks
revīzija
fb1330b177

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

@@ -1529,12 +1529,12 @@
1529 1529
 										</div>
1530 1530
 										<div class="df-fl margin-right">
1531 1531
 											<span class="label"><span class="red">*</span> 联系电话:</span>
1532
-											<input nz-input type="number" class="formItem" [(ngModel)]="contactsPhone" placeholder="请输入联系电话" nzSize="default" />
1532
+											<input nz-input class="formItem" [(ngModel)]="contactsPhone" placeholder="请输入联系电话" nzSize="default" />
1533 1533
 										</div>
1534 1534
 									</div>
1535 1535
 									<div class="item df">
1536 1536
 										<span class="label"><span class="red">*</span> 投诉人:</span>
1537
-										<input nz-input class="formItem" [(ngModel)]="complainant" placeholder="请输入联系人" nzSize="default" />
1537
+										<input nz-input class="formItem" [(ngModel)]="complainant" placeholder="请输入投诉人" nzSize="default" />
1538 1538
 									</div>
1539 1539
 									<div class="item df">
1540 1540
 										<span class="label"><span class="red">*</span> 省市区:</span>
@@ -1542,7 +1542,7 @@
1542 1542
 									</div>
1543 1543
 									<div class="item df">
1544 1544
 										<span class="label"><span class="red">*</span> 详细地址:</span>
1545
-										<input nz-input class="formItem" [(ngModel)]="detailedAddress" placeholder="请输入联系电话" nzSize="default" />
1545
+										<input nz-input class="formItem" [(ngModel)]="detailedAddress" placeholder="请输入详细地址" nzSize="default" />
1546 1546
 									</div>
1547 1547
 									<div class="item df">
1548 1548
 										<span class="label"><span class="red">*</span> 简述:</span>

+ 75 - 51
src/app/views/fuwutai/fuwutai.component.ts

@@ -456,8 +456,8 @@ export class FuwutaiComponent implements OnInit {
456 456
         if (data["status"] == 200) {
457 457
           this.newOrderShow = false; //关闭弹窗
458 458
           if (go === "&go&") {
459
-            this.applyDept = data["startDept"].id;
460
-            this.applyStartDept = data["startDept"];
459
+            this.applyDept = data["createDept"].id;
460
+            this.applyStartDept = data["createDept"];
461 461
             this.incidentModel.incomingPhone = this.callNumber = this.incidentModel.contactsInformation = data["phone"];
462 462
             this.showPromptModal("建单", true, "", "closeGo");
463 463
           } else {
@@ -470,8 +470,8 @@ export class FuwutaiComponent implements OnInit {
470 470
 				else if(data["status"] == 1000033){
471 471
 					this.newOrderShow = false; //关闭弹窗
472 472
 					if (go === "&go&") {
473
-					  this.applyDept = data["startDept"].id;
474
-					  this.applyStartDept = data["startDept"];
473
+					  this.applyDept = data["createDept"].id;
474
+					  this.applyStartDept = data["createDept"];
475 475
 					  this.incidentModel.incomingPhone = this.callNumber = this.incidentModel.contactsInformation = data["phone"];
476 476
 					}
477 477
 					//重复建单那策略
@@ -555,8 +555,8 @@ export class FuwutaiComponent implements OnInit {
555 555
         if (data["status"] == 200) {
556 556
           this.newOrderShow = false; //关闭弹窗
557 557
           if (go === "&go&") {
558
-            this.applyDept = data["startDept"].id;
559
-            this.applyStartDept = data["startDept"];
558
+            this.applyDept = data["createDept"].id;
559
+            this.applyStartDept = data["createDept"];
560 560
             this.incidentModel.incomingPhone = this.callNumber = this.incidentModel.contactsInformation = data["phone"];
561 561
             this.showPromptModal("建单", true, "", "closeGo");
562 562
           } else {
@@ -568,8 +568,8 @@ export class FuwutaiComponent implements OnInit {
568 568
         } else if(data["status"] == 100042){
569 569
           this.newOrderShow = false; //关闭弹窗
570 570
 					if (go === "&go&") {
571
-						this.applyDept = data["startDept"].id;
572
-						this.applyStartDept = data["startDept"];
571
+						this.applyDept = data["createDept"].id;
572
+						this.applyStartDept = data["createDept"];
573 573
 						this.incidentModel.incomingPhone = this.callNumber = this.incidentModel.contactsInformation = data["phone"];
574 574
 						this.showPromptModal("建单", false, data["msg"], "closeGo");
575 575
 					}else{
@@ -579,8 +579,8 @@ export class FuwutaiComponent implements OnInit {
579 579
 				else if(data["status"] == 1000033){
580 580
 					this.newOrderShow = false; //关闭弹窗
581 581
 					if (go === "&go&") {
582
-						this.applyDept = data["startDept"].id;
583
-						this.applyStartDept = data["startDept"];
582
+						this.applyDept = data["createDept"].id;
583
+						this.applyStartDept = data["createDept"];
584 584
 						this.incidentModel.incomingPhone = this.callNumber = this.incidentModel.contactsInformation = data["phone"];
585 585
 					}
586 586
 					//重复建单那策略
@@ -620,8 +620,8 @@ export class FuwutaiComponent implements OnInit {
620 620
       if (data["status"] == 200) {
621 621
         this.newOrderShow = false; //关闭弹窗
622 622
         if (go === "&go&") {
623
-          this.applyDept = data["startDept"].id;
624
-          this.applyStartDept = data["startDept"];
623
+          this.applyDept = data["createDept"].id;
624
+          this.applyStartDept = data["createDept"];
625 625
           this.incidentModel.incomingPhone = this.callNumber = this.incidentModel.contactsInformation = data["phone"];
626 626
           this.showPromptModal("建单", true, "", "closeGo");
627 627
         } else {
@@ -633,8 +633,8 @@ export class FuwutaiComponent implements OnInit {
633 633
       }else if(data["status"] == 1000033){
634 634
 				 this.newOrderShow = false; //关闭弹窗
635 635
 				 if (go === "&go&") {
636
-				 	this.applyDept = data["startDept"].id;
637
-				 	this.applyStartDept = data["startDept"];
636
+				 	this.applyDept = data["createDept"].id;
637
+				 	this.applyStartDept = data["createDept"];
638 638
 				 	this.incidentModel.incomingPhone = this.callNumber = this.incidentModel.contactsInformation = data["phone"];
639 639
 				 }
640 640
 				 //重复建单那策略
@@ -695,8 +695,8 @@ export class FuwutaiComponent implements OnInit {
695 695
       if (data["status"] == 200) {
696 696
         this.newOrderShow = false; //关闭弹窗
697 697
         if (go === "&go&") {
698
-          this.applyDept = data["startDept"].id;
699
-          this.applyStartDept = data["startDept"];
698
+          this.applyDept = data["createDept"].id;
699
+          this.applyStartDept = data["createDept"];
700 700
           this.incidentModel.incomingPhone = this.callNumber = this.incidentModel.contactsInformation = data["phone"];
701 701
           this.showPromptModal("建单", true, "", "closeGo");
702 702
         } else {
@@ -709,8 +709,8 @@ export class FuwutaiComponent implements OnInit {
709 709
 			else if(data["status"] == 1000033){
710 710
 				this.newOrderShow = false; //关闭弹窗
711 711
 				if (go === "&go&") {
712
-					this.applyDept = data["startDept"].id;
713
-					this.applyStartDept = data["startDept"];
712
+					this.applyDept = data["createDept"].id;
713
+					this.applyStartDept = data["createDept"];
714 714
 					this.incidentModel.incomingPhone = this.callNumber = this.incidentModel.contactsInformation = data["phone"];
715 715
 				}
716 716
 				//重复建单那策略
@@ -765,8 +765,8 @@ export class FuwutaiComponent implements OnInit {
765 765
       if (data["status"] == 200) {
766 766
         this.newOrderShow = false; //关闭弹窗
767 767
         if (go === "&go&") {
768
-          this.applyDept = data["startDept"].id;
769
-          this.applyStartDept = data["startDept"];
768
+          this.applyDept = data["createDept"].id;
769
+          this.applyStartDept = data["createDept"];
770 770
           this.incidentModel.incomingPhone = this.callNumber = this.incidentModel.contactsInformation = data["phone"];
771 771
           this.showPromptModal("建单", true, "", "closeGo");
772 772
         } else {
@@ -779,8 +779,8 @@ export class FuwutaiComponent implements OnInit {
779 779
 			else if(data["status"] == 1000033){
780 780
 				this.newOrderShow = false; //关闭弹窗
781 781
 				if (go === "&go&") {
782
-					this.applyDept = data["startDept"].id;
783
-					this.applyStartDept = data["startDept"];
782
+					this.applyDept = data["createDept"].id;
783
+					this.applyStartDept = data["createDept"];
784 784
 					this.incidentModel.incomingPhone = this.callNumber = this.incidentModel.contactsInformation = data["phone"];
785 785
 				}
786 786
 				//重复建单那策略
@@ -1269,6 +1269,7 @@ export class FuwutaiComponent implements OnInit {
1269 1269
       console.log(jso);
1270 1270
       _this.incidentModel = { repairIncidentType: 'dept' };
1271 1271
       _this.callNumber = _this.incidentModel.incomingPhone = jso.caller;//来电的电话
1272
+			_this.contactsPhone = jso.caller
1272 1273
       _this.incidentModel.callID = jso.crs;//来电的话机id
1273 1274
       if (jso) {
1274 1275
         console.log('呼入坐席成功,请摘机-----seimin');
@@ -1665,7 +1666,7 @@ export class FuwutaiComponent implements OnInit {
1665 1666
           this.incidentModel = { repairIncidentType: 'dept' };
1666 1667
           this.incidentMsg = {};
1667 1668
           this.incidentModel.callID = data.callId || undefined;
1668
-
1669
+					this.contactsPhone = data.phone;
1669 1670
           this.incidentModel.incomingPhone = this.callNumber = this.incidentModel.contactsInformation = data.phone;
1670 1671
           this.searchBxDept();
1671 1672
         } else if (data.status == 201 && data.phone === "") {
@@ -1948,7 +1949,14 @@ export class FuwutaiComponent implements OnInit {
1948 1949
       this.itsmOrders = [];
1949 1950
       return;
1950 1951
     }
1951
-
1952
+		if(!this.incidentModel.department){
1953
+			this.itsmOrders = [];
1954
+			return;
1955
+		}
1956
+		if(this.incidentModel.repairIncidentType === 'public'){
1957
+			this.itsmOrders = [];
1958
+			return
1959
+		}
1952 1960
     let postData = {
1953 1961
       incident: {
1954 1962
         "deleteFlag": 0,
@@ -1974,6 +1982,9 @@ export class FuwutaiComponent implements OnInit {
1974 1982
 	// 获取政务值班近期记录
1975 1983
 	itsmZwOrders:any=[];
1976 1984
 	getZwOrders(){
1985
+		if(!this.incidentModel.callID){
1986
+			return
1987
+		}
1977 1988
 		let postData = {
1978 1989
 		  governmentDuty: {
1979 1990
 				callAccept: this.incidentModel.callID || undefined,
@@ -1997,7 +2008,7 @@ export class FuwutaiComponent implements OnInit {
1997 2008
 		}else{
1998 2009
 			delete postData.governmentDuty.province
1999 2010
 			delete postData.governmentDuty.city
2000
-			delete postData.governmentDuty.province
2011
+			delete postData.governmentDuty.district
2001 2012
 		}
2002 2013
 		this.loading6 = true;
2003 2014
 		this.mainService
@@ -2916,6 +2927,7 @@ export class FuwutaiComponent implements OnInit {
2916 2927
   tabClick(key, isInit = false, patient?) {
2917 2928
     let preCurrentTabIndex = this.currentTabIndex;
2918 2929
     this.currentTabIndex = key;
2930
+		console.log(1112233,this.currentTabIndex)
2919 2931
     this.radioValueQt = null;
2920 2932
     this.startDeptQt = null;
2921 2933
     this.endDeptQt = null;
@@ -2961,32 +2973,32 @@ export class FuwutaiComponent implements OnInit {
2961 2973
     // }else
2962 2974
 		 
2963 2975
 		 if(this.currentTabIndex === '故障报修'){
2964
-      if(this.incidentModel.department){
2965
-        this.rightTitle_tab = [
2966
-          { id: 2, name: '近期维修' },
2967
-          { id: 3, name: '知识库' },
2968
-        ]
2969
-        this.rightTitleHandler(this.rightTitle_tab[0].id);
2970
-      }
2976
+				this.incidentModel.department = null;
2977
+				this.rightTitle_tab = [
2978
+					{ id: 2, name: '近期维修' },
2979
+					{ id: 3, name: '知识库' },
2980
+				]
2981
+				this.rightTitleHandler(this.rightTitle_tab[0].id);
2982
+			
2971 2983
 
2972 2984
       let deptObj = this.applicationDepartmentList.find(v => v.id == this.applyDept);
2973 2985
 
2974 2986
       if(this.incidentModel.department != this.applyDept && (!isInit || !this.buildType)){
2975
-        this.incidentModel.department = this.applyDept;
2976
-        this.searchApplicationDepartment('itsm', deptObj ? deptObj.dept : '', undefined, this.applyDept);
2987
+				if(this.incidentModel.repairIncidentType === 'dept'){
2988
+					this.incidentModel.department = this.applyDept;
2989
+					this.searchApplicationDepartment('itsm', deptObj ? deptObj.dept : '', undefined, this.applyDept);
2990
+				}
2977 2991
       }
2978 2992
     }else if (this.currentTabIndex === '政务值班'){
2979 2993
 			this.rightTitle_tab = [
2980 2994
 			  { id: 4, name: '近期记录' },
2981 2995
 			]
2982 2996
 			this.rightTitleHandler(4);
2983
-			
2984
-			let deptObj = this.applicationDepartmentList.find(v => v.id == this.applyDept);
2985
-			
2986
-			if(this.incidentModel.department != this.applyDept && (!isInit || !this.buildType)){
2987
-			  this.incidentModel.department = this.applyDept;
2988
-			  this.searchApplicationDepartment('itsm', deptObj ? deptObj.dept : '', undefined, this.applyDept);
2989
-			}
2997
+		}else{
2998
+			this.rightTitle_tab = [
2999
+			  { id: 0, name: '近期配送' },
3000
+			]
3001
+			this.rightTitleHandler(this.rightTitle_tab[0].id);
2990 3002
 		}
2991 3003
   }
2992 3004
 	
@@ -3063,19 +3075,29 @@ export class FuwutaiComponent implements OnInit {
3063 3075
 				contactsPhone: this.contactsPhone,
3064 3076
 				contacts: this.contacts,
3065 3077
 				complainant: this.complainant,
3066
-				detailedAddress: this.complainant,
3078
+				detailedAddress: this.detailedAddress,
3067 3079
 				province: {
3068
-					id: this.province[0]
3080
+					id: null
3069 3081
 				},
3070 3082
 				city: {
3071
-					id: this.province[1]
3083
+					id: null
3072 3084
 				},
3073 3085
 				district: {
3074
-					id: this.province[2]
3086
+					id: null
3075 3087
 				},
3076
-				callAccept: this.incidentModel.callID || undefined
3088
+				callAccept: this.incidentModel.callID || undefined,
3089
+				platform: '3'
3077 3090
 			}
3078 3091
 		};
3092
+		if(this.province.length>0){
3093
+			data.governmentDuty.province.id = this.province[0]
3094
+			data.governmentDuty.city.id = this.province[1]
3095
+			data.governmentDuty.district.id = this.province[2]
3096
+		}else{
3097
+			delete data.governmentDuty.province
3098
+			delete data.governmentDuty.city
3099
+			delete data.governmentDuty.district
3100
+		}
3079 3101
 		that.zwLoading = true;
3080 3102
 		that.mainService
3081 3103
 			.dataPost("addData", "governmentDuty", data)
@@ -3084,6 +3106,7 @@ export class FuwutaiComponent implements OnInit {
3084 3106
 				that.initZwForm();
3085 3107
 				if (data.status == 200) {
3086 3108
 					this.getZwOrders();
3109
+					this.newOrderShow = false;
3087 3110
 					that.showPromptModal("新增", true, "");
3088 3111
 				} else {
3089 3112
 					that.showPromptModal("新增", false, data.msg);
@@ -3691,11 +3714,12 @@ export class FuwutaiComponent implements OnInit {
3691 3714
   }
3692 3715
   // 选择报修类型
3693 3716
   changeRepairIncidentType(value){
3694
-    this.incidentModel.department = undefined;
3717
+    // this.incidentModel.department = undefined;
3695 3718
     this.incidentMsg.deptManyPhone = '';
3696 3719
 
3697 3720
     this.isRelatedDepartment = value !== 'public';
3698 3721
     this.changeApplyRelatedDepartment(this.isRelatedDepartment);
3722
+		this.rightTitleHandler(this.rightTitle_tab[0].id);
3699 3723
   }
3700 3724
   // 楼栋列表
3701 3725
   applicationBuildingList:any[] = [];
@@ -4556,9 +4580,9 @@ export class FuwutaiComponent implements OnInit {
4556 4580
           // 任务类型是否显示操作项
4557 4581
           let arr = this.workTypesArrange;
4558 4582
           this.workTypesFlag = arr.length >= 5;
4559
-          // 默认选中第一项
4583
+          // 默认选中故障现象
4560 4584
           if (arr.length > 0) {
4561
-            isFirst ? this.tabClick(arr[0].key, isInit) : this.tabClick(arr[arr.length - 1].key, isInit);
4585
+            isFirst ? this.tabClick(arr[0].key, isInit) : this.tabClick(arr[arr.length - 2].key, isInit);
4562 4586
           }
4563 4587
         }
4564 4588
       });
@@ -5427,8 +5451,8 @@ export class FuwutaiComponent implements OnInit {
5427 5451
       } 
5428 5452
 			else if(result["status"] == 1000033){
5429 5453
 				if (this.goType === "&go&") {
5430
-					this.applyDept = result["startDept"].id;
5431
-					this.applyStartDept = result["startDept"];
5454
+					this.applyDept = result["createDept"].id;
5455
+					this.applyStartDept = result["createDept"];
5432 5456
 					this.incidentModel.incomingPhone = this.callNumber = this.incidentModel.contactsInformation = result["phone"];
5433 5457
 				}
5434 5458
 				//重复建单那策略

+ 1 - 1
src/app/views/government-duty/government-duty.component.html

@@ -111,7 +111,7 @@
111 111
 				  <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="contactsPhone">联系电话</nz-form-label>
112 112
 				  <nz-form-control nzErrorTip="请选择联系电话!">
113 113
 				    <nz-input-group>
114
-							<input nz-input type="number" class="formItem" formControlName="contactsPhone" placeholder="请输入联系电话" nzSize="default" />
114
+							<input nz-input class="formItem" formControlName="contactsPhone" placeholder="请输入联系电话" nzSize="default" />
115 115
 				    </nz-input-group>
116 116
 				  </nz-form-control>
117 117
 				</nz-form-item>

+ 2 - 2
src/app/views/government-duty/government-duty.component.ts

@@ -165,8 +165,8 @@ export class GovernmentDutyComponent implements OnInit {
165 165
 	    this.startDate = this.endDate = null;
166 166
 	    return;
167 167
 	  }
168
-	  this.startDate = format(startOfDay(result[0]), 'yyyy-MM-dd HH:mm:ss');
169
-	  this.endDate = format(endOfDay(result[1]), 'yyyy-MM-dd HH:mm:ss');
168
+		this.startDate = format(result[0], 'yyyy-MM-dd HH:mm:ss');
169
+		this.endDate = format(result[1], 'yyyy-MM-dd HH:mm:ss');
170 170
 	  this.dateRange = [this.startDate,this.endDate]
171 171
 	}
172 172
 	

+ 10 - 1
src/app/views/monthly-task/monthly-task.component.html

@@ -118,7 +118,7 @@
118 118
           </nz-form-control>
119 119
         </nz-form-item>
120 120
 				
121
-				<nz-form-item>
121
+				<nz-form-item *ngIf="add">
122 122
 				  <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="liableUser">责任人</nz-form-label>
123 123
 				  <nz-form-control nzErrorTip="请选择责任人!">
124 124
 				    <nz-input-group>
@@ -135,6 +135,15 @@
135 135
 				  </nz-form-control>
136 136
 				</nz-form-item>
137 137
 				
138
+				<nz-form-item *ngIf="!add">
139
+				  <nz-form-label [nzSm]="6" [nzXs]="24" nzFor="liableUserNmae">责任人</nz-form-label>
140
+				  <nz-form-control nzErrorTip="请选择责任人!">
141
+				    <nz-input-group>
142
+							<input nz-input class="formItem" disabled formControlName="liableUserNmae" placeholder="请选择责任人" nzSize="default" />
143
+				    </nz-input-group>
144
+				  </nz-form-control>
145
+				</nz-form-item>
146
+				
138 147
 				<div class="df">
139 148
 					<nz-form-item>
140 149
 					  <nz-form-label [nzSm]="8" [nzXs]="24" nzRequired nzFor="startTime">开始时间</nz-form-label>

+ 7 - 3
src/app/views/monthly-task/monthly-task.component.ts

@@ -143,8 +143,8 @@ export class MonthlyTaskComponent implements OnInit {
143 143
 	    this.startDate = this.endDate = null;
144 144
 	    return;
145 145
 	  }
146
-	  this.startDate = format(startOfDay(result[0]), 'yyyy-MM-dd HH:mm:ss');
147
-	  this.endDate = format(endOfDay(result[1]), 'yyyy-MM-dd HH:mm:ss');
146
+		this.startDate = format(result[0], 'yyyy-MM-dd HH:mm:ss');
147
+		this.endDate = format(result[1], 'yyyy-MM-dd HH:mm:ss');
148 148
 	  this.dateRange = [this.startDate,this.endDate]
149 149
 	}
150 150
 	
@@ -154,7 +154,9 @@ export class MonthlyTaskComponent implements OnInit {
154 154
 	  let data:any = {
155 155
 	    user: {
156 156
 				name,
157
-	      hosIds: this.hosId,
157
+	      hospital: {
158
+					id: this.hosId
159
+				},
158 160
 	    },
159 161
 	    idx: 0,
160 162
 	    sum: 20,
@@ -310,6 +312,7 @@ export class MonthlyTaskComponent implements OnInit {
310 312
       taskDescribe: [null, [Validators.required]],
311 313
       priority: [null, [Validators.required]],
312 314
 			liableUser: [null, [Validators.required]],
315
+			liableUserNmae: [null, []],
313 316
       startTime: [null, [Validators.required]],
314 317
       endTime: [null, [Validators.required]],
315 318
     });
@@ -381,6 +384,7 @@ export class MonthlyTaskComponent implements OnInit {
381 384
 		this.validateForm.controls.taskDescribe.setValue(data.taskDescribe);
382 385
 		this.validateForm.controls.priority.setValue(data.priority.id);
383 386
 		this.validateForm.controls.liableUser.setValue(data.liableUserDTO.id)
387
+		this.validateForm.controls.liableUserNmae.setValue(data.liableUserDTO.name)
384 388
 		this.validateForm.controls.startTime.setValue(data.startTime);
385 389
 		this.validateForm.controls.endTime.setValue(data.endTime);
386 390
 		this.modal = true

+ 2 - 2
src/app/views/task-list/task-list.component.html

@@ -26,7 +26,7 @@
26 26
 						</ng-container>
27 27
 					</nz-select>
28 28
 				</div>
29
-				<div class="list-template__searchItem">
29
+			<!-- 	<div class="list-template__searchItem">
30 30
 					<span class="label">执行人:</span>
31 31
 					<nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch
32 32
 						(nzOnSearch)="changeUser($event)" nzAllowClear nzPlaceHolder="请选择执行人员" [(ngModel)]="executor">
@@ -37,7 +37,7 @@
37 37
 							<i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
38 38
 						</nz-option>
39 39
 					</nz-select>
40
-				</div>
40
+				</div> -->
41 41
 		  </div>
42 42
 			<div class="list-template__btns">
43 43
 				<button class="btn default" (click)='search()'>搜索</button>

+ 3 - 1
src/app/views/task-list/task-list.component.ts

@@ -72,6 +72,7 @@ export class TaskListComponent implements OnInit {
72 72
 	specimenNameList:any = [];
73 73
 	addressLoading:any = false;
74 74
 	month:any = [];
75
+	userId:any;
75 76
 	
76 77
   ngOnInit() {
77 78
 		for(let i=1; i<13; i++){
@@ -81,6 +82,7 @@ export class TaskListComponent implements OnInit {
81 82
 		}
82 83
     this.coopBtns = this.tool.initCoopBtns(this.route);
83 84
 		this.hosId = this.tool.getCurrentHospital().id;
85
+		this.userId = this.tool.getCurrentUserId();
84 86
 		this.searchParentDeptSubject.pipe(debounceTime(500)).subscribe((e) => {
85 87
 			this.isLoading = true;
86 88
 			this.getAllUser(e[0])
@@ -141,7 +143,7 @@ export class TaskListComponent implements OnInit {
141 143
 					id: '',
142 144
 				},
143 145
 				monthTask:this.monthTask || undefined,
144
-        executor: this.executor || undefined,
146
+        executor: this.userId,
145 147
       },
146 148
     };
147 149
 		if(this.priority){

+ 4 - 94
src/app/views/web-repairs/web-repairs.component.html

@@ -14,7 +14,7 @@
14 14
       <div class="userInfo dropdown">
15 15
         <div class="user" (mouseenter)="showDropdown = true" (mouseleave)="showDropdown = false">
16 16
           <img src="../../assets/images/icon_keshi.png" alt="">
17
-          <span><ng-container *ngIf="loginUser.dept">{{deptDisplay == 2 ? loginUser.dept.deptalias : loginUser.dept.dept}}-</ng-container>{{loginUser.name}}</span>
17
+          <span><ng-container *ngIf="loginUser.dept"></ng-container>{{loginUser.name}}</span>
18 18
           <i class="icon_transport transport-xiala1 ml8"></i>
19 19
         </div>
20 20
         <div class="dropdown-content r8" [hidden]="!showDropdown" (mouseenter)="showDropdown = true" (mouseleave)="showDropdown = false">
@@ -47,7 +47,7 @@
47 47
 						</div>
48 48
 						<div class="list-template__searchItem">
49 49
 						  <span class="label">单号:</span>
50
-							<input type="text" class="search-input" [(ngModel)]="incidentsign" nz-input placeholder="请输入患者" />
50
+							<input type="text" class="search-input" [(ngModel)]="incidentsign" nz-input placeholder="请输入单号" />
51 51
 						</div>
52 52
 			    </div>
53 53
 			    <div nz-col nzLg="6" class="list-template__btns">
@@ -210,96 +210,6 @@
210 210
   </div>
211 211
 </div>
212 212
 
213
-<!-- 查看详情 -->
214
-<div class="pathology-box display_flex align-items_center justify-content_flex-center" *ngIf="detailMoadl">
215
-	<div class="pathology-content">
216
-		<div class="title">查看详情
217
-		<i class="icon_transport transport-guanbi" (click)="closeDetailMoadl()"></i></div>
218
-		<div class="content border">
219
-			<div class="content-item boder-right">
220
-				<div class="form-title-box">
221
-					<div class="form-title"><span class="font-weight-500">是否术中快速:</span>{{detailsData.pathologyFormType==1?'是':'否'}}</div>
222
-					<div class="form-title"><span class="font-weight-500">申请单编号:</span>{{detailsData.applyCode}}</div>
223
-					<div class="form-title"><span class="font-weight-500">状态:</span>{{detailsData.status.name}}</div>
224
-					<div class="form-title"><span class="font-weight-500">科室名称:</span>{{detailsData.patientDTO.department.dept}}</div>
225
-				</div>
226
-				<div class="form-title-box">
227
-					<div class="form-title"><span class="font-weight-500">住院号:</span>{{detailsData.patientDTO.patientCode}}</div>
228
-					<div class="form-title"><span class="font-weight-500">患者信息:</span>{{detailsData.patientDTO.patientName}} ({{detailsData.patientDTO.bedNum}}床)</div>
229
-					<div class="form-title"><span class="font-weight-500">年龄:</span>{{detailsData.patientDTO.age||'-'}}岁</div>
230
-				</div>
231
-
232
-				<div class="form-title-box">
233
-					<div class="form-title"><span class="font-weight-500">检验项目:</span>{{project||'无'}}</div>
234
-				</div>
235
-
236
-				<div class="form-list">
237
-					<div class="form-title font-weight-500">诊断:</div>
238
-					<div class="indent">
239
-						{{detailsData.diagnose||'无'}}
240
-					</div>
241
-				</div>
242
-
243
-				<div class="form-list">
244
-					<div class="form-title font-weight-500">病历摘要:</div>
245
-					<div class="indent">{{detailsData.medicalRecords||'无'}}</div>
246
-				</div>
247
-				<div class="form-list">
248
-					<div class="form-title font-weight-500">手术方案:</div>
249
-					<div class="indent">{{detailsData.surgicalPlan||'无'}}</div>
250
-				</div>
251
-
252
-				<div class="form-title-box">
253
-					<div class="form-title"><span class="font-weight-500">标本类型:</span>{{detailsData.specimenType.name||'无'}}</div>
254
-					<div class="form-title"><span class="font-weight-500">标本数量:</span>{{detailsData.specimenNum||'无'}}</div>
255
-					<div class="form-title"><span class="font-weight-500">部位:</span>{{detailsData.takePart||'无'}}</div>
256
-				</div>
257
-
258
-				<div class="form-title-box">
259
-					<div class="form-title"><span class="font-weight-500">送检医生:</span>{{detailsData.surgeryDoctorDTO?detailsData.surgeryDoctorDTO.name : '-'}}</div>
260
-					<div class="form-title"><span class="font-weight-500">离体时间:</span>{{detailsData.inVitroTime?(detailsData.inVitroTime|date:'yyyy-MM-dd HH:mm:ss'):'无'}}</div>
261
-					<div class="form-title"><span class="font-weight-500">固定时间:</span>{{detailsData.fixationTime?(detailsData.fixationTime|date:'yyyy-MM-dd HH:mm:ss'):'无'}}</div>
262
-				</div>
263
-
264
-				<div class="form-list">
265
-					<div class="form-title font-weight-500">标本:</div>
266
-					<div class="form-title specimen-list">
267
-						<div *ngFor="let item of specimenList" class="specimen-item-class form-title cursors" (click)="specimenView(item)">
268
-							<span *ngIf="item.partSource && item.partSource.value!=1">{{item.partSource?item.partSource.name:''}}</span>{{item.specimenName}}({{item.specimenCode}})
269
-						</div>
270
-					</div>
271
-				</div>
272
-
273
-			</div>
274
-
275
-			<div class="content-item-right">
276
-				<div class="step-title">病理闭环</div>
277
-				<nz-steps [nzCurrent]="stepLength" nzDirection="vertical" nzSize="small">
278
-					<ng-container *ngFor="let item of pathologyLogs; let index = index">
279
-							<nz-step
280
-								[nzDescription]="tpl"
281
-							>
282
-							</nz-step>
283
-							<ng-template #tpl>
284
-								<div *ngIf="index==pathologyLogs.length-1" class="step-size">
285
-									<div style="color: #49B856;">{{item.operationType.name}} {{item.handoverUserDto?item.handoverUserDto.name:''}}</div>
286
-									<div style="color:#333;">{{item.createTime|date:'yyyy-MM-dd HH:mm:ss'}} {{item.operationUserDto?item.operationUserDto.name:''}}</div>
287
-								</div>
288
-								<div *ngIf="index!=pathologyLogs.length-1" class="step-size">
289
-									<div>{{item.operationType.name}} {{item.handoverUserDto?item.handoverUserDto.name:''}}</div>
290
-									<div>{{item.createTime|date:'yyyy-MM-dd HH:mm:ss'}} {{item.operationUserDto?item.operationUserDto.name:''}}</div>
291
-								</div>
292
-							</ng-template>
293
-						</ng-container>
294
-				</nz-steps>
295
-			</div>
296
-		</div>
297
-		<div class="display_flex justify-content_flex-center bottom-btn">
298
-			<button class="btn btn-right" nz-button nzType="primary" (click)="closeDetailMoadl()">知道了</button>
299
-		</div>
300
-	</div>
301
-</div>
302
-
303 213
 <!-- 操作成功/失败提示框 -->
304 214
 <app-prompt-modal *ngIf="promptModalShow" [content]="promptContent" [success]="ifSuccess" [show]="promptModalShow"
305 215
   [info]="promptInfo" (closeModel)="closeModel()"></app-prompt-modal>
@@ -312,7 +222,7 @@
312 222
 <router-outlet (deactivate)="getConnectList()"></router-outlet>
313 223
 
314 224
 <!-- 快速报修 -->
315
-<div class="commonModal display_flex justify-content_flex-center align-items_center" *ngIf="bxModal" (click)="clickExtra($event)">
225
+<div class="commonModal display_flex justify-content_flex-center align-items_center" *ngIf="bxModal">
316 226
   <div class="modalBody">
317 227
     <div class="title">一键报修<i class="icon_transport transport-guanbi" (click)="hideBxModal()"></i>
318 228
     </div>
@@ -384,7 +294,7 @@
384 294
           <nz-form-label [nzSm]="4" [nzXs]="4" nzRequired nzFor="officeAddress" hidden></nz-form-label>
385 295
           <nz-form-control style="display: inline-block;" class="address">
386 296
             <nz-input-group>
387
-              <input class="addressFocus" style="width:185px;" nz-input formControlName="officeAddress" placeholder="请输入详细位置" (focus)="focusAddress()" />
297
+              <input class="addressFocus" style="width:185px;" nz-input formControlName="officeAddress" placeholder="请输入详细位置"/>
388 298
               <div class="addressList" *ngIf="isShowAddressList">
389 299
                 <ng-container *ngIf="!addressLoading && addressList.length">
390 300
                   <div class="addressItem ellipsis-oneline" *ngFor="let item of addressList" [title]="item.name" (click)="selectAddress(item.name)">{{item.name}}</div>

+ 33 - 41
src/app/views/web-repairs/web-repairs.component.ts

@@ -196,7 +196,9 @@ export class WebRepairsComponent implements OnInit {
196 196
   }
197 197
 	
198 198
 	// 初始化新增form表单
199
+	initNum:any = 0;
199 200
 	initBxForm(content) {
201
+		this.initNum++;
200 202
 	  this.validateBxForm = this.fb.group({
201 203
 	    description: [content || null, [Validators.required]],
202 204
 	    building: [null, [Validators.required]],
@@ -205,54 +207,50 @@ export class WebRepairsComponent implements OnInit {
205 207
 	    contacts: [this.loginUser.name, [Validators.required]],
206 208
 	    contactsInformation: [this.loginUser.phone, [Validators.required]],
207 209
 	  });
208
-	  this.getDeptById(this.currentDept.id);
210
+		if(this.userInfo.buildingDTO){
211
+			this.changeHosp();
212
+		}else{
213
+			this.getUserInfo();
214
+		}
209 215
 	}
210
-	// 根据科室ID获取详情
216
+	// 查询用户信息
211 217
 	deptDto:any = {};
212
-	getDeptById(id){
213
-	  this.mainService
214
-	    .getFetchDataList("simple/data", "department", {
215
-	      idx: 0,
216
-	      sum: 1,
217
-	      department: {
218
-	        id,
219
-	      }
220
-	    })
221
-	    .subscribe((data:any) => {
222
-	      let list = data.list || [];
223
-	      this.deptDto = list.length > 0 ? list[0] : {};
224
-	      console.log(this.deptDto);
225
-	      this.changeHosp();
226
-	      // 回显楼栋
227
-	      if(this.deptDto.building){
228
-	        this.validateBxForm.controls.building.setValue(this.deptDto.building.id);
229
-	      }
230
-	
231
-	      // 回显楼层
232
-	      if(this.deptDto.floor){
233
-	        this.validateBxForm.controls.floor.setValue(this.deptDto.floor.id);
234
-	      }
235
-	    });
218
+	getUserInfo(){
219
+		// 回显楼栋
220
+		if(this.userInfo.buildingDTO){
221
+		  this.validateBxForm.controls.building.setValue(this.userInfo.buildingDTO.id);
222
+		}
223
+		// 回显楼层
224
+		if(this.userInfo.floorDTO){
225
+		  this.validateBxForm.controls.floor.setValue(this.userInfo.floorDTO.id);
226
+		}
227
+		if(this.userInfo.address){
228
+			this.validateBxForm.controls.officeAddress.setValue(this.userInfo.address);
229
+		}	
230
+		if(this.userInfo.name){
231
+			this.validateBxForm.controls.contacts.setValue(this.userInfo.name);
232
+		}
233
+		if(this.userInfo.phone){
234
+			this.validateBxForm.controls.contactsInformation.setValue(this.userInfo.phone);
235
+		}
236 236
 	}
237 237
 	// 切换院区选项
238 238
 	buildings: any = []; //楼栋
239 239
 	changeHosp() {
240
-	  this.validateBxForm.controls.building.setValue(null);
241 240
 	  this.buildings = [];
242 241
 	  let data = {
243 242
 	    idx: 0,
244 243
 	    sum: 9999,
245 244
 	    building: {
246
-	      hosId: this.deptDto.hospital.id,
245
+	      hosId: this.hosId,
247 246
 	    }
248 247
 	  };
249 248
 	  this.mainService
250 249
 	    .getFetchDataList("simple/data", "building", data)
251 250
 	    .subscribe((data:any) => {
252 251
 	      this.buildings = data.list || [];
253
-	      this.floors = [];
254
-	      this.message.remove(this.maskFlag);
255 252
 	      this.maskFlag = false;
253
+				this.getUserInfo();
256 254
 	    });
257 255
 	}
258 256
 	
@@ -263,8 +261,8 @@ export class WebRepairsComponent implements OnInit {
263 261
 	  if(!buildingId){
264 262
 	    return;
265 263
 	  }
266
-	  this.validateBxForm.controls.floor.setValue(null);
267
-	  this.validateBxForm.controls.officeAddress.setValue(null);
264
+		this.validateBxForm.controls.floor.setValue(null);
265
+		this.validateBxForm.controls.officeAddress.setValue(null);
268 266
 	  this.floors = [];
269 267
 	
270 268
 	  let data = {
@@ -293,9 +291,6 @@ export class WebRepairsComponent implements OnInit {
293 291
 	fileList:any = [];
294 292
 	validateBxForm: FormGroup; //新增/编辑表单
295 293
 	speediness(data?) {
296
-	  this.maskFlag = this.message.loading("正在加载中..", {
297
-	    nzDuration: 0,
298
-	  }).messageId;
299 294
 	  this.bxModal = true;
300 295
 	  this.coopBx = data || {};
301 296
 		this.fileList = [];
@@ -303,6 +298,7 @@ export class WebRepairsComponent implements OnInit {
303 298
 	}
304 299
 	// 隐藏模态框
305 300
 	hideBxModal() {
301
+		this.initNum = 0;
306 302
 	  this.bxModal = false;
307 303
 		this.fileList = [];
308 304
 	}
@@ -316,10 +312,6 @@ export class WebRepairsComponent implements OnInit {
316 312
 	    this.message.error('请填写必填字段!');
317 313
 	    return;
318 314
 	  };
319
-	  if (!this.deptDto.id){
320
-	    this.message.error('数据异常,无法建单!');
321
-	    return;
322
-	  };
323 315
 	  this.showReqModal();
324 316
 	}
325 317
 	
@@ -389,7 +381,7 @@ export class WebRepairsComponent implements OnInit {
389 381
 	            houseNumber: this.validateBxForm.value.officeAddress,
390 382
 	            contacts: this.validateBxForm.value.contacts,
391 383
 	            contactsInformation: this.validateBxForm.value.contactsInformation,
392
-	            hosId: this.deptDto.hospital.id,
384
+	            hosId: this.hosId,
393 385
 	            source: pc,
394 386
 	            fromWx: true,
395 387
 	            requester: this.loginUser,
@@ -408,6 +400,7 @@ export class WebRepairsComponent implements OnInit {
408 400
 	          this.bxModal = false;
409 401
 	          this.hideReqModal();
410 402
 	          if ((res as any).state == 200) {
403
+							this.initNum = 0;
411 404
 							// 图片上传
412 405
 							if(this.fileList.length){
413 406
 								console.log(this.fileList.map(v => v.originFileObj));
@@ -546,7 +539,6 @@ export class WebRepairsComponent implements OnInit {
546 539
 	    incident: {
547 540
 				incidentsign: this.incidentsign || undefined,
548 541
 				statusId: this.status || undefined,
549
-	      repairIncidentType: { id: this.repairIncidentTypeList.find(v => v.value === 'public').id },
550 542
 	    	requester: {
551 543
 					id: this.userId
552 544
 				},