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