|
@@ -2013,6 +2013,7 @@ export class FuwutaiComponent implements OnInit {
|
2013
|
2013
|
if(item.type === 'mdv2'){
|
2014
|
2014
|
item.computedSubstitutionFlag = this.computedSubstitution(item.data)
|
2015
|
2015
|
item.computedReceiveFlag = this.computedReceive(item.data)
|
|
2016
|
+ item.computedEditFlag = this.computedEdit(item.data)
|
2016
|
2017
|
}
|
2017
|
2018
|
});
|
2018
|
2019
|
this.arriveList = arriveList;
|
|
@@ -2027,6 +2028,7 @@ export class FuwutaiComponent implements OnInit {
|
2027
|
2028
|
if(item.type === 'mdv2'){
|
2028
|
2029
|
item.computedSubstitutionFlag = this.computedSubstitution(item.data)
|
2029
|
2030
|
item.computedHandleFlag = this.computedHandle(item.data)
|
|
2031
|
+ item.computedEditFlag = this.computedEdit(item.data)
|
2030
|
2032
|
}
|
2031
|
2033
|
});
|
2032
|
2034
|
this.executionList = executionList;
|
|
@@ -2299,7 +2301,7 @@ export class FuwutaiComponent implements OnInit {
|
2299
|
2301
|
}
|
2300
|
2302
|
this.buildType = buildType;
|
2301
|
2303
|
if(this.itsmData.mdv2Switch){
|
2302
|
|
- this.resetOrderData();
|
|
2304
|
+ this.buildType !== '编辑事件' && this.resetOrderData();
|
2303
|
2305
|
this.searchApplicationHospital();
|
2304
|
2306
|
this.searchApplicationCategory();
|
2305
|
2307
|
this.searchApplicationPriority();
|
|
@@ -2760,7 +2762,7 @@ export class FuwutaiComponent implements OnInit {
|
2760
|
2762
|
"directProcess": 1,
|
2761
|
2763
|
"handleDescription": this.incidentModel.handleDescription,
|
2762
|
2764
|
"handlingPersonnelUser": {id: this.tool.getCurrentUserId()},
|
2763
|
|
- "yyTime": this.incidentModel.yyTime ? format(this.incidentModel.yyTime, 'yyyy-MM-dd HH:mm:ss') : undefined,
|
|
2765
|
+ "yyTime": this.incidentModel.yyTime ? format(new Date(this.incidentModel.yyTime), 'yyyy-MM-dd HH:mm:ss') : undefined,
|
2764
|
2766
|
"closecode": this.incidentModel.closecode ? { id: this.incidentModel.closecode } : undefined,
|
2765
|
2767
|
"acceptUser": { id: this.tool.getCurrentUserId() },
|
2766
|
2768
|
"callID": this.incidentModel.callID || undefined,
|
|
@@ -3164,6 +3166,12 @@ export class FuwutaiComponent implements OnInit {
|
3164
|
3166
|
openChangeApplyDept(flag){
|
3165
|
3167
|
flag && this.searchApplicationDepartment('itsm');
|
3166
|
3168
|
}
|
|
3169
|
+ openChangeApplyRequester(flag){
|
|
3170
|
+ flag && this.searchApplicationRequester();
|
|
3171
|
+ }
|
|
3172
|
+ openChangeApplyCategory(flag){
|
|
3173
|
+ flag && this.searchApplicationCategory();
|
|
3174
|
+ }
|
3167
|
3175
|
openChangeApplyGroup(flag){
|
3168
|
3176
|
flag && this.searchApplicationGroup()
|
3169
|
3177
|
}
|
|
@@ -3452,7 +3460,7 @@ export class FuwutaiComponent implements OnInit {
|
3452
|
3460
|
return;
|
3453
|
3461
|
}
|
3454
|
3462
|
|
3455
|
|
- if(!this.incidentModel.group){
|
|
3463
|
+ if(!this.incidentModel.group && this.buildType !== '编辑事件'){
|
3456
|
3464
|
this.msg.warning('请选择处理组!');
|
3457
|
3465
|
return;
|
3458
|
3466
|
}
|
|
@@ -3479,7 +3487,7 @@ export class FuwutaiComponent implements OnInit {
|
3479
|
3487
|
"source": this.incidentModel.source ? { id: this.incidentModel.source } : undefined,
|
3480
|
3488
|
"title": category.mutiCategory,
|
3481
|
3489
|
"description": this.incidentModel.description,
|
3482
|
|
- "yyTime": this.incidentModel.yyTime ? format(this.incidentModel.yyTime, 'yyyy-MM-dd HH:mm:ss') : undefined,
|
|
3490
|
+ "yyTime": this.incidentModel.yyTime ? format(new Date(this.incidentModel.yyTime), 'yyyy-MM-dd HH:mm:ss') : undefined,
|
3483
|
3491
|
"requester": this.incidentModel.requester ? { id: this.incidentModel.requester } : undefined,
|
3484
|
3492
|
"acceptUser": { id: this.tool.getCurrentUserId() },
|
3485
|
3493
|
"callID": this.incidentModel.callID || undefined,
|
|
@@ -3549,7 +3557,7 @@ export class FuwutaiComponent implements OnInit {
|
3549
|
3557
|
"source": this.incidentModel.source ? { id: this.incidentModel.source } : undefined,
|
3550
|
3558
|
"title": category ? category.mutiCategory : '',
|
3551
|
3559
|
"description": this.incidentModel.description,
|
3552
|
|
- "yyTime": this.incidentModel.yyTime ? format(this.incidentModel.yyTime, 'yyyy-MM-dd HH:mm:ss') : undefined,
|
|
3560
|
+ "yyTime": this.incidentModel.yyTime ? format(new Date(this.incidentModel.yyTime), 'yyyy-MM-dd HH:mm:ss') : undefined,
|
3553
|
3561
|
"requester": this.incidentModel.requester ? { id: this.incidentModel.requester } : undefined,
|
3554
|
3562
|
"acceptUser": { id: this.tool.getCurrentUserId() },
|
3555
|
3563
|
"callID": this.incidentModel.callID || undefined,
|
|
@@ -3590,6 +3598,71 @@ export class FuwutaiComponent implements OnInit {
|
3590
|
3598
|
});
|
3591
|
3599
|
}
|
3592
|
3600
|
|
|
3601
|
+ // 运维-保存
|
|
3602
|
+ saveOrder(){
|
|
3603
|
+ this.maskFlag = this.msg.loading("正在加载中..", {
|
|
3604
|
+ nzDuration: 0,
|
|
3605
|
+ }).messageId;
|
|
3606
|
+
|
|
3607
|
+ let category;
|
|
3608
|
+ if(this.incidentModel.category){
|
|
3609
|
+ category = this.applicationCategoryList.find(v => v.id == this.incidentModel.category);
|
|
3610
|
+ }
|
|
3611
|
+
|
|
3612
|
+ let postData:any = {
|
|
3613
|
+ solutionId: this.solutionId,
|
|
3614
|
+ "incident": {
|
|
3615
|
+ "id": this.incidentModel.id || undefined,
|
|
3616
|
+ "deleteFlag": 0,
|
|
3617
|
+ "duty": this.incidentModel.duty ? { id: this.incidentModel.duty.id } : undefined,
|
|
3618
|
+ "department": this.incidentModel.department ? { id: this.incidentModel.department } : undefined,
|
|
3619
|
+ "contactsInformation": this.incidentModel.contactsInformation,
|
|
3620
|
+ "contacts": this.incidentModel.contacts,
|
|
3621
|
+ "hosId": this.incidentModel.hosId || undefined,
|
|
3622
|
+ "area": this.incidentModel.area ? { id: this.incidentModel.area } : undefined,
|
|
3623
|
+ "place": this.incidentModel.place ? { id: this.incidentModel.place } : undefined,
|
|
3624
|
+ "houseNumber": this.incidentModel.houseNumber,
|
|
3625
|
+ "category": this.incidentModel.category ? { id: this.incidentModel.category } : undefined,
|
|
3626
|
+ "priorityId": this.incidentModel.priorityId || undefined,
|
|
3627
|
+ "source": this.incidentModel.source ? { id: this.incidentModel.source } : undefined,
|
|
3628
|
+ "title": category ? category.mutiCategory : '',
|
|
3629
|
+ "description": this.incidentModel.description,
|
|
3630
|
+ "yyTime": this.incidentModel.yyTime ? format(new Date(this.incidentModel.yyTime), 'yyyy-MM-dd HH:mm:ss') : undefined,
|
|
3631
|
+ "requester": this.incidentModel.requester ? { id: this.incidentModel.requester } : undefined,
|
|
3632
|
+ "acceptUser": { id: this.tool.getCurrentUserId() },
|
|
3633
|
+ "callID": this.incidentModel.callID || undefined,
|
|
3634
|
+ "incomingPhone": this.incidentModel.incomingPhone || undefined,
|
|
3635
|
+ "hjzxRecordId": this.incidentModel.hjzxRecordId || undefined,
|
|
3636
|
+ }
|
|
3637
|
+ };
|
|
3638
|
+ if(this.buildType){
|
|
3639
|
+ postData.incident = Object.assign({}, this.editOrder, postData.incident);
|
|
3640
|
+ }
|
|
3641
|
+ console.log(postData);
|
|
3642
|
+ // return;
|
|
3643
|
+
|
|
3644
|
+ this.mainService
|
|
3645
|
+ .flowPost("incident/task/edit", postData)
|
|
3646
|
+ .subscribe((result) => {
|
|
3647
|
+ this.msg.remove(this.maskFlag);
|
|
3648
|
+ this.maskFlag = false;
|
|
3649
|
+
|
|
3650
|
+ if (result.state == 200) {
|
|
3651
|
+ // 图片上传
|
|
3652
|
+ if(this.fileList.length){
|
|
3653
|
+ console.log(this.fileList.map(v => v.originFileObj));
|
|
3654
|
+ this.fileList.map(v => v.originFileObj).forEach(async file => {
|
|
3655
|
+ await this.uploadImages(file, result.data.id);
|
|
3656
|
+ })
|
|
3657
|
+ }
|
|
3658
|
+ // this.msg.success('编辑成功');
|
|
3659
|
+ this.isBuildOrderAgaginFn();
|
|
3660
|
+ } else {
|
|
3661
|
+ this.msg.error('编辑失败');
|
|
3662
|
+ }
|
|
3663
|
+ });
|
|
3664
|
+ }
|
|
3665
|
+
|
3593
|
3666
|
// 是否连续建单
|
3594
|
3667
|
isBuildOrderAgaginFn(){
|
3595
|
3668
|
if(this.isBuildOrderAgagin){
|
|
@@ -4726,6 +4799,35 @@ export class FuwutaiComponent implements OnInit {
|
4726
|
4799
|
});
|
4727
|
4800
|
}
|
4728
|
4801
|
|
|
4802
|
+ // 编辑-弹窗
|
|
4803
|
+ edit(data){
|
|
4804
|
+ this.editOrder = cloneDeep(data);
|
|
4805
|
+ let incidentModel = cloneDeep(data);
|
|
4806
|
+ let incidentMsg:any = {};
|
|
4807
|
+ console.log('data:', data)
|
|
4808
|
+ incidentModel.department && (incidentMsg.deptManyPhone = incidentModel.department.manyPhone);
|
|
4809
|
+ incidentModel.department && (incidentMsg.deptName = incidentModel.department.dept);
|
|
4810
|
+ incidentModel.department && (incidentModel.department = incidentModel.department.id);
|
|
4811
|
+ incidentModel.requester && (this.applicationRequesterList = [cloneDeep(incidentModel.requester)]);
|
|
4812
|
+ incidentModel.requester && (incidentMsg.requesterPhone = incidentModel.requester.phone);
|
|
4813
|
+ incidentModel.requester && (incidentMsg.requesterName = incidentModel.requester.name);
|
|
4814
|
+ incidentModel.requester && (incidentModel.requester = incidentModel.requester.id);
|
|
4815
|
+ incidentModel.source && (incidentModel.source = incidentModel.source.id);
|
|
4816
|
+ incidentModel.area && (incidentModel.area = incidentModel.area.id);
|
|
4817
|
+ incidentModel.place && (incidentModel.place = incidentModel.place.id);
|
|
4818
|
+ incidentModel.category && (this.applicationCategoryList = [cloneDeep(incidentModel.category)]);
|
|
4819
|
+ incidentModel.category && (incidentModel.category = incidentModel.category.id);
|
|
4820
|
+ this.incidentModel = incidentModel;
|
|
4821
|
+ this.incidentMsg = incidentMsg;
|
|
4822
|
+ console.log('this.applicationRequesterList:', this.applicationRequesterList)
|
|
4823
|
+ console.log('this.applicationDeptList:', this.applicationDeptList)
|
|
4824
|
+ console.log('incidentModel:', incidentModel)
|
|
4825
|
+ this.showNewOrder('', '', true, '编辑事件');
|
|
4826
|
+
|
|
4827
|
+ // 查询报修图片
|
|
4828
|
+ this.getRepairImgs(data.id);
|
|
4829
|
+ }
|
|
4830
|
+
|
4729
|
4831
|
// 换人处理-弹窗
|
4730
|
4832
|
substitutionModalShow = false; //弹窗开关
|
4731
|
4833
|
substitution(data) {
|
|
@@ -4763,6 +4865,11 @@ export class FuwutaiComponent implements OnInit {
|
4763
|
4865
|
return (data.state.value === 'pending' || data.state.value === 'handler' || (data.state.value === 'reassign' && this.coopBtns.assign)) && data.deleteFlag !== 1;
|
4764
|
4866
|
}
|
4765
|
4867
|
|
|
4868
|
+ // 是否显示编辑按钮
|
|
4869
|
+ computedEdit(data){
|
|
4870
|
+ return (data.state.value === 'pending' || data.state.value === 'reassign' || data.state.value === 'handler' || data.state.value === 'close') && this.coopBtns.edit && data.deleteFlag !== 1;
|
|
4871
|
+ }
|
|
4872
|
+
|
4766
|
4873
|
// 是否显示处理按钮
|
4767
|
4874
|
computedHandle(data){
|
4768
|
4875
|
return this.coopBtns.handle && data.state.value === 'handler' && data.handlingPersonnelUser && data.handlingPersonnelUser.id == this.tool.getCurrentUserId() && data.deleteFlag !== 1;
|