|
@@ -2834,7 +2834,7 @@ export class FuwutaiComponent implements OnInit {
|
2834
|
2834
|
this.applicationRequesterList = [];
|
2835
|
2835
|
this.fileList = [];
|
2836
|
2836
|
this.repairImgs = [];
|
2837
|
|
- this.isRelatedDepartment = true;
|
|
2837
|
+ this.isRelatedDepartment = false;
|
2838
|
2838
|
this.solutionId = undefined;
|
2839
|
2839
|
delete this.incidentMsg.requesterPhone;
|
2840
|
2840
|
}
|
|
@@ -2845,7 +2845,7 @@ export class FuwutaiComponent implements OnInit {
|
2845
|
2845
|
if(this.incidentModel.repairIncidentType === 'public'){
|
2846
|
2846
|
this.isRelatedDepartment = false;
|
2847
|
2847
|
}else{
|
2848
|
|
- this.isRelatedDepartment = true;
|
|
2848
|
+ this.isRelatedDepartment = false;
|
2849
|
2849
|
}
|
2850
|
2850
|
}
|
2851
|
2851
|
|
|
@@ -3095,6 +3095,9 @@ export class FuwutaiComponent implements OnInit {
|
3095
|
3095
|
if(this.buildType !== '报修转事件'){
|
3096
|
3096
|
this.incidentModel.requester = null;
|
3097
|
3097
|
}
|
|
3098
|
+ if(this.buildType == '编辑事件' && this.editOrder.requester){
|
|
3099
|
+ this.incidentModel.requester = this.editOrder.requester.id;
|
|
3100
|
+ }
|
3098
|
3101
|
this.radioValueQt = null;
|
3099
|
3102
|
this.startDeptQt = null;
|
3100
|
3103
|
this.endDeptQt = null;
|
|
@@ -3582,7 +3585,7 @@ export class FuwutaiComponent implements OnInit {
|
3582
|
3585
|
}
|
3583
|
3586
|
// 申请人列表(搜索)
|
3584
|
3587
|
applicationRequesterList:any[] = [];
|
3585
|
|
- isRelatedDepartment:boolean = true;
|
|
3588
|
+ isRelatedDepartment:boolean = false;
|
3586
|
3589
|
searchApplicationRequester(keyWord?) {
|
3587
|
3590
|
// 关联查询,且没选择申请科室
|
3588
|
3591
|
if(this.isRelatedDepartment && !this.incidentModel.department){
|
|
@@ -3611,48 +3614,70 @@ export class FuwutaiComponent implements OnInit {
|
3611
|
3614
|
.subscribe((data) => {
|
3612
|
3615
|
this.isLoading = false;
|
3613
|
3616
|
if (data.status == 200) {
|
3614
|
|
- this.applicationRequesterList = data.list;
|
|
3617
|
+ if(this.buildType == '编辑事件' && this.editOrder.requester){
|
|
3618
|
+ let item = data.list.find(i=> i.id == this.editOrder.requester.id)
|
|
3619
|
+ if(!item){
|
|
3620
|
+ data.list.push({
|
|
3621
|
+ name: this.editOrder.requester.name,
|
|
3622
|
+ account: this.editOrder.requester.account,
|
|
3623
|
+ id: this.editOrder.requester.id
|
|
3624
|
+ })
|
|
3625
|
+ }
|
|
3626
|
+ this.applicationRequesterList = data.list;
|
|
3627
|
+ }else{
|
|
3628
|
+ this.applicationRequesterList = data.list;
|
|
3629
|
+ }
|
3615
|
3630
|
}
|
3616
|
3631
|
});
|
3617
|
3632
|
}
|
3618
|
3633
|
// 修改申请人
|
3619
|
3634
|
userPriorityDTO:any;
|
3620
|
3635
|
changeApplyRequester(e){
|
3621
|
|
- let userObj = this.applicationRequesterList.find(v => v.id == e);
|
3622
|
|
- console.log('选中的申请人',userObj)
|
3623
|
|
- // 选择申请人回显申请人电话
|
3624
|
|
- if(userObj){
|
3625
|
|
- this.incidentMsg.requesterPhone = userObj.phone;
|
3626
|
|
- }
|
3627
|
|
- if(userObj && userObj.priorityDTO){
|
3628
|
|
- this.userPriorityDTO = userObj.priorityDTO
|
3629
|
|
- }else{
|
3630
|
|
- this.userPriorityDTO = null
|
3631
|
|
- }
|
3632
|
|
- let orders = [];
|
3633
|
|
- let id = [];
|
3634
|
|
- if(this.addressDTO&&this.addressDTO.id){
|
3635
|
|
- orders.push(this.addressDTO.orders)
|
3636
|
|
- id.push(this.addressDTO.id)
|
3637
|
|
- }
|
3638
|
|
- if(this.deptPriorityDTO&&this.deptPriorityDTO.id){
|
3639
|
|
- orders.push(this.deptPriorityDTO.orders)
|
3640
|
|
- id.push(this.deptPriorityDTO.id)
|
3641
|
|
- }
|
3642
|
|
- if(this.userPriorityDTO&&this.userPriorityDTO.id){
|
3643
|
|
- orders.push(this.userPriorityDTO.orders)
|
3644
|
|
- id.push(this.userPriorityDTO.id)
|
3645
|
|
- }
|
3646
|
|
- if(this.malPriorityDTO&&this.malPriorityDTO.id){
|
3647
|
|
- orders.push(this.malPriorityDTO.orders)
|
3648
|
|
- id.push(this.malPriorityDTO.id)
|
|
3636
|
+ if(this.buildType !== '编辑事件'){
|
|
3637
|
+ let userObj = this.applicationRequesterList.find(v => v.id == e);
|
|
3638
|
+ console.log('选中的申请人',userObj)
|
|
3639
|
+ // 选择申请人回显申请人电话
|
|
3640
|
+ if(userObj){
|
|
3641
|
+ this.incidentMsg.requesterPhone = userObj.phone;
|
|
3642
|
+ }
|
|
3643
|
+ if(userObj && userObj.priorityDTO){
|
|
3644
|
+ this.userPriorityDTO = userObj.priorityDTO
|
|
3645
|
+ }else{
|
|
3646
|
+ this.userPriorityDTO = null
|
|
3647
|
+ }
|
|
3648
|
+ let orders = [];
|
|
3649
|
+ let id = [];
|
|
3650
|
+ if(this.addressDTO&&this.addressDTO.id){
|
|
3651
|
+ orders.push(this.addressDTO.orders)
|
|
3652
|
+ id.push(this.addressDTO.id)
|
|
3653
|
+ }
|
|
3654
|
+ if(this.deptPriorityDTO&&this.deptPriorityDTO.id){
|
|
3655
|
+ orders.push(this.deptPriorityDTO.orders)
|
|
3656
|
+ id.push(this.deptPriorityDTO.id)
|
|
3657
|
+ }
|
|
3658
|
+ if(this.userPriorityDTO&&this.userPriorityDTO.id){
|
|
3659
|
+ orders.push(this.userPriorityDTO.orders)
|
|
3660
|
+ id.push(this.userPriorityDTO.id)
|
|
3661
|
+ }
|
|
3662
|
+ if(this.malPriorityDTO&&this.malPriorityDTO.id){
|
|
3663
|
+ orders.push(this.malPriorityDTO.orders)
|
|
3664
|
+ id.push(this.malPriorityDTO.id)
|
|
3665
|
+ }
|
|
3666
|
+ if(orders.length>0){
|
|
3667
|
+ let minNumber = Math.min(...orders)
|
|
3668
|
+ let index = orders.indexOf(minNumber)
|
|
3669
|
+ console.log('最小值的orders', orders, minNumber)
|
|
3670
|
+ setTimeout(_=>{
|
|
3671
|
+ if(index!=-1){
|
|
3672
|
+ this.incidentModel.priorityId = minNumber != Infinity ? id[index] : null
|
|
3673
|
+ }else{
|
|
3674
|
+ this.incidentModel.priorityId = null
|
|
3675
|
+ }
|
|
3676
|
+ })
|
|
3677
|
+ }else{
|
|
3678
|
+ this.incidentModel.priorityId = null
|
|
3679
|
+ }
|
3649
|
3680
|
}
|
3650
|
|
- let minNumber = Math.min(...orders)
|
3651
|
|
- let index = orders.indexOf(minNumber)
|
3652
|
|
- console.log('最小值的orders', orders, minNumber)
|
3653
|
|
- setTimeout(_=>{
|
3654
|
|
- this.incidentModel.priorityId = minNumber != Infinity ? id[index] : null
|
3655
|
|
- })
|
3656
|
3681
|
if(this.incidentModel.repairIncidentType === 'public'){
|
3657
|
3682
|
this.getItsmOrders('')
|
3658
|
3683
|
if(this.cmdbRepair){
|
|
@@ -3757,8 +3782,14 @@ export class FuwutaiComponent implements OnInit {
|
3757
|
3782
|
let index = orders.indexOf(minNumber)
|
3758
|
3783
|
console.log('最小值的orders', orders, minNumber)
|
3759
|
3784
|
setTimeout(_=>{
|
3760
|
|
- this.incidentModel.priorityId = minNumber != Infinity ? id[index] : null
|
|
3785
|
+ if(index!=-1){
|
|
3786
|
+ this.incidentModel.priorityId = minNumber != Infinity ? id[index] : null
|
|
3787
|
+ }else{
|
|
3788
|
+ this.incidentModel.priorityId = null
|
|
3789
|
+ }
|
3761
|
3790
|
})
|
|
3791
|
+ }else{
|
|
3792
|
+ this.incidentModel.priorityId = null
|
3762
|
3793
|
}
|
3763
|
3794
|
|
3764
|
3795
|
// 根据院区和故障现象带出责任部门,优先级,维修人/组
|
|
@@ -4091,7 +4122,7 @@ export class FuwutaiComponent implements OnInit {
|
4091
|
4122
|
// this.incidentModel.department = undefined;
|
4092
|
4123
|
this.incidentMsg.deptManyPhone = '';
|
4093
|
4124
|
this.incidentModel.requester = null;
|
4094
|
|
- this.isRelatedDepartment = value !== 'public';
|
|
4125
|
+ // this.isRelatedDepartment = value !== 'public';
|
4095
|
4126
|
this.changeApplyRelatedDepartment(this.isRelatedDepartment);
|
4096
|
4127
|
this.rightTitleHandler(2);
|
4097
|
4128
|
}
|
|
@@ -4289,41 +4320,51 @@ export class FuwutaiComponent implements OnInit {
|
4289
|
4320
|
// 运维-选择科室
|
4290
|
4321
|
changeApplyDept(e) {
|
4291
|
4322
|
console.log(e, this.applicationDeptList);
|
4292
|
|
- let item = this.applicationDeptList.find(i=>i.id == e)
|
4293
|
|
- console.log('选中的科室11111',item);
|
4294
|
|
- if(item && item.priorityDTO){
|
4295
|
|
- this.addressDTO = null;
|
4296
|
|
- this.userPriorityDTO = null;
|
4297
|
|
- this.deptPriorityDTO = item.priorityDTO
|
4298
|
|
- }else{
|
4299
|
|
- this.addressDTO = null;
|
4300
|
|
- this.userPriorityDTO = null;
|
4301
|
|
- this.deptPriorityDTO = null
|
4302
|
|
- }
|
4303
|
|
- let orders = [];
|
4304
|
|
- let id = [];
|
4305
|
|
- if(this.addressDTO&&this.addressDTO.id){
|
4306
|
|
- orders.push(this.addressDTO.orders)
|
4307
|
|
- id.push(this.addressDTO.id)
|
4308
|
|
- }
|
4309
|
|
- if(this.deptPriorityDTO&&this.deptPriorityDTO.id){
|
4310
|
|
- orders.push(this.deptPriorityDTO.orders)
|
4311
|
|
- id.push(this.deptPriorityDTO.id)
|
4312
|
|
- }
|
4313
|
|
- if(this.userPriorityDTO&&this.userPriorityDTO.id){
|
4314
|
|
- orders.push(this.userPriorityDTO.orders)
|
4315
|
|
- id.push(this.userPriorityDTO.id)
|
4316
|
|
- }
|
4317
|
|
- if(this.malPriorityDTO&&this.malPriorityDTO.id){
|
4318
|
|
- orders.push(this.malPriorityDTO.orders)
|
4319
|
|
- id.push(this.malPriorityDTO.id)
|
|
4323
|
+ if(this.buildType !== '编辑事件'){
|
|
4324
|
+ let item = this.applicationDeptList.find(i=>i.id == e)
|
|
4325
|
+ console.log('选中的科室11111',item);
|
|
4326
|
+ if(item && item.priorityDTO){
|
|
4327
|
+ this.addressDTO = null;
|
|
4328
|
+ this.userPriorityDTO = null;
|
|
4329
|
+ this.deptPriorityDTO = item.priorityDTO
|
|
4330
|
+ }else{
|
|
4331
|
+ this.addressDTO = null;
|
|
4332
|
+ this.userPriorityDTO = null;
|
|
4333
|
+ this.deptPriorityDTO = null
|
|
4334
|
+ }
|
|
4335
|
+ let orders = [];
|
|
4336
|
+ let id = [];
|
|
4337
|
+ if(this.addressDTO&&this.addressDTO.id){
|
|
4338
|
+ orders.push(this.addressDTO.orders)
|
|
4339
|
+ id.push(this.addressDTO.id)
|
|
4340
|
+ }
|
|
4341
|
+ if(this.deptPriorityDTO&&this.deptPriorityDTO.id){
|
|
4342
|
+ orders.push(this.deptPriorityDTO.orders)
|
|
4343
|
+ id.push(this.deptPriorityDTO.id)
|
|
4344
|
+ }
|
|
4345
|
+ if(this.userPriorityDTO&&this.userPriorityDTO.id){
|
|
4346
|
+ orders.push(this.userPriorityDTO.orders)
|
|
4347
|
+ id.push(this.userPriorityDTO.id)
|
|
4348
|
+ }
|
|
4349
|
+ if(this.malPriorityDTO&&this.malPriorityDTO.id){
|
|
4350
|
+ orders.push(this.malPriorityDTO.orders)
|
|
4351
|
+ id.push(this.malPriorityDTO.id)
|
|
4352
|
+ }
|
|
4353
|
+ if(orders.length>0){
|
|
4354
|
+ let minNumber = Math.min(...orders)
|
|
4355
|
+ let index = orders.indexOf(minNumber)
|
|
4356
|
+ console.log('最小值的orders', orders, minNumber)
|
|
4357
|
+ setTimeout(_=>{
|
|
4358
|
+ if(index!=-1){
|
|
4359
|
+ this.incidentModel.priorityId = minNumber != Infinity ? id[index] : null
|
|
4360
|
+ }else{
|
|
4361
|
+ this.incidentModel.priorityId = null
|
|
4362
|
+ }
|
|
4363
|
+ })
|
|
4364
|
+ }else{
|
|
4365
|
+ this.incidentModel.priorityId = null
|
|
4366
|
+ }
|
4320
|
4367
|
}
|
4321
|
|
- let minNumber = Math.min(...orders)
|
4322
|
|
- let index = orders.indexOf(minNumber)
|
4323
|
|
- console.log('最小值的orders', index)
|
4324
|
|
- setTimeout(_=>{
|
4325
|
|
- this.incidentModel.priorityId = minNumber != Infinity ? id[index] : null
|
4326
|
|
- })
|
4327
|
4368
|
if(this.incidentModel.department && this.currentTabIndex === '故障报修'){
|
4328
|
4369
|
this.rightTitle_tab = [
|
4329
|
4370
|
{ id: 2, name: '近期维修' },
|
|
@@ -6871,7 +6912,7 @@ export class FuwutaiComponent implements OnInit {
|
6871
|
6912
|
incidentModel.requester && (incidentMsg.requesterPhone = incidentModel.requester.phone);
|
6872
|
6913
|
incidentModel.requester && (incidentMsg.requesterName = incidentModel.requester.name);
|
6873
|
6914
|
incidentModel.requester && (incidentModel.requester = incidentModel.requester.id);
|
6874
|
|
- if(incidentModel.repairIncidentType){
|
|
6915
|
+ if(incidentModel.repairIncidentType){
|
6875
|
6916
|
incidentModel.repairIncidentType = incidentModel.repairIncidentType.value
|
6876
|
6917
|
this.changeRepairIncidentType(incidentModel.repairIncidentType);
|
6877
|
6918
|
}
|
|
@@ -6885,6 +6926,7 @@ export class FuwutaiComponent implements OnInit {
|
6885
|
6926
|
console.log('this.applicationRequesterList:', this.applicationRequesterList)
|
6886
|
6927
|
console.log('this.applicationDeptList:', this.applicationDeptList)
|
6887
|
6928
|
console.log('incidentModel:', incidentModel)
|
|
6929
|
+ this.searchApplicationRequester();
|
6888
|
6930
|
this.showNewOrder(1, '', '', true, '编辑事件');
|
6889
|
6931
|
|
6890
|
6932
|
// 查询报修图片
|
|
@@ -7132,37 +7174,47 @@ export class FuwutaiComponent implements OnInit {
|
7132
|
7174
|
// 选择地址
|
7133
|
7175
|
addressDTO:any;
|
7134
|
7176
|
selectAddress(name, idx){
|
7135
|
|
- let item = this.addressList.find(i=>i.id == idx)
|
7136
|
|
- console.log('选中的地址11111',item);
|
7137
|
|
- if(item && item.priority){
|
7138
|
|
- this.addressDTO = item.priority
|
7139
|
|
- }else{
|
7140
|
|
- this.addressDTO = null
|
7141
|
|
- }
|
7142
|
|
- let orders = [];
|
7143
|
|
- let id = [];
|
7144
|
|
- if(this.addressDTO&&this.addressDTO.id){
|
7145
|
|
- orders.push(this.addressDTO.orders)
|
7146
|
|
- id.push(this.addressDTO.id)
|
7147
|
|
- }
|
7148
|
|
- if(this.deptPriorityDTO&&this.deptPriorityDTO.id){
|
7149
|
|
- orders.push(this.deptPriorityDTO.orders)
|
7150
|
|
- id.push(this.deptPriorityDTO.id)
|
7151
|
|
- }
|
7152
|
|
- if(this.userPriorityDTO&&this.userPriorityDTO.id){
|
7153
|
|
- orders.push(this.userPriorityDTO.orders)
|
7154
|
|
- id.push(this.userPriorityDTO.id)
|
7155
|
|
- }
|
7156
|
|
- if(this.malPriorityDTO&&this.malPriorityDTO.id){
|
7157
|
|
- orders.push(this.malPriorityDTO.orders)
|
7158
|
|
- id.push(this.malPriorityDTO.id)
|
|
7177
|
+ if(this.buildType !== '编辑事件'){
|
|
7178
|
+ let item = this.addressList.find(i=>i.id == idx)
|
|
7179
|
+ console.log('选中的地址11111',item);
|
|
7180
|
+ if(item && item.priority){
|
|
7181
|
+ this.addressDTO = item.priority
|
|
7182
|
+ }else{
|
|
7183
|
+ this.addressDTO = null
|
|
7184
|
+ }
|
|
7185
|
+ let orders = [];
|
|
7186
|
+ let id = [];
|
|
7187
|
+ if(this.addressDTO&&this.addressDTO.id){
|
|
7188
|
+ orders.push(this.addressDTO.orders)
|
|
7189
|
+ id.push(this.addressDTO.id)
|
|
7190
|
+ }
|
|
7191
|
+ if(this.deptPriorityDTO&&this.deptPriorityDTO.id){
|
|
7192
|
+ orders.push(this.deptPriorityDTO.orders)
|
|
7193
|
+ id.push(this.deptPriorityDTO.id)
|
|
7194
|
+ }
|
|
7195
|
+ if(this.userPriorityDTO&&this.userPriorityDTO.id){
|
|
7196
|
+ orders.push(this.userPriorityDTO.orders)
|
|
7197
|
+ id.push(this.userPriorityDTO.id)
|
|
7198
|
+ }
|
|
7199
|
+ if(this.malPriorityDTO&&this.malPriorityDTO.id){
|
|
7200
|
+ orders.push(this.malPriorityDTO.orders)
|
|
7201
|
+ id.push(this.malPriorityDTO.id)
|
|
7202
|
+ }
|
|
7203
|
+ if(orders.length>0){
|
|
7204
|
+ let minNumber = Math.min(...orders)
|
|
7205
|
+ let index = orders.indexOf(minNumber)
|
|
7206
|
+ console.log('最小值的orders', orders, minNumber)
|
|
7207
|
+ setTimeout(_=>{
|
|
7208
|
+ if(index!=-1){
|
|
7209
|
+ this.incidentModel.priorityId = minNumber != Infinity ? id[index] : null
|
|
7210
|
+ }else{
|
|
7211
|
+ this.incidentModel.priorityId = null
|
|
7212
|
+ }
|
|
7213
|
+ })
|
|
7214
|
+ }else{
|
|
7215
|
+ this.incidentModel.priorityId = null
|
|
7216
|
+ }
|
7159
|
7217
|
}
|
7160
|
|
- let minNumber = Math.min(...orders)
|
7161
|
|
- let index = orders.indexOf(minNumber)
|
7162
|
|
- console.log('最小值的orders', orders, minNumber)
|
7163
|
|
- setTimeout(_=>{
|
7164
|
|
- this.incidentModel.priorityId = minNumber != Infinity ? id[index] : null
|
7165
|
|
- })
|
7166
|
7218
|
this.incidentModel.houseNumber = name;
|
7167
|
7219
|
this.isShowAddressList = false;
|
7168
|
7220
|
}
|