|
|
@ -298,6 +298,8 @@ export class ZhiIndicatorsComponent implements OnInit { |
|
|
|
element.title = element.name |
|
|
|
element.title = element.name |
|
|
|
element.selectable = false |
|
|
|
element.selectable = false |
|
|
|
element.disableCheckbox = true |
|
|
|
element.disableCheckbox = true |
|
|
|
|
|
|
|
element.datatype = '机构' |
|
|
|
|
|
|
|
element.level == 'squadron' ? element.disableCheckbox = false : null |
|
|
|
}); |
|
|
|
}); |
|
|
|
this.allOrList = JSON.parse(JSON.stringify(data.items)) |
|
|
|
this.allOrList = JSON.parse(JSON.stringify(data.items)) |
|
|
|
resolve(data) |
|
|
|
resolve(data) |
|
|
@ -329,6 +331,8 @@ export class ZhiIndicatorsComponent implements OnInit { |
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
editOr(incomingData, item) { |
|
|
|
editOr(incomingData, item) { |
|
|
|
const modal = this.modal.create({ |
|
|
|
const modal = this.modal.create({ |
|
|
|
nzTitle: '修改协助机构', |
|
|
|
nzTitle: '修改协助机构', |
|
|
@ -337,15 +341,23 @@ export class ZhiIndicatorsComponent implements OnInit { |
|
|
|
nzWidth: 660, |
|
|
|
nzWidth: 660, |
|
|
|
nzMaskClosable: false, |
|
|
|
nzMaskClosable: false, |
|
|
|
nzComponentParams: { |
|
|
|
nzComponentParams: { |
|
|
|
selectedData: item.supervisorIds, |
|
|
|
selectedData: [...item.supervisorIds, ...item.assitantOrganizationIds], |
|
|
|
organizationList: JSON.parse(JSON.stringify(this.allOrList)), |
|
|
|
organizationList: JSON.parse(JSON.stringify(this.allOrList)), |
|
|
|
users: JSON.parse(JSON.stringify(this.users)), |
|
|
|
// users: JSON.parse(JSON.stringify(this.users)),
|
|
|
|
|
|
|
|
supervisorList: [...JSON.parse(JSON.stringify(this.assitantsupervisorList)), ...JSON.parse(JSON.stringify(this.mainsupervisorList))] |
|
|
|
}, |
|
|
|
}, |
|
|
|
nzOnOk: async () => { |
|
|
|
nzOnOk: async () => { |
|
|
|
if (instance.validateForm.valid) { |
|
|
|
if (instance.validateForm.valid) { |
|
|
|
await new Promise((resolve, reject) => { |
|
|
|
await new Promise((resolve, reject) => { |
|
|
|
|
|
|
|
console.log(instance.nzTreeComponent.getCheckedNodeList()) |
|
|
|
|
|
|
|
let supervisorIds = [] |
|
|
|
|
|
|
|
let assitantOrganizationIds = [] |
|
|
|
|
|
|
|
instance.nzTreeComponent.getCheckedNodeList().forEach(item => { |
|
|
|
|
|
|
|
item.origin.datatype == '机构' ? assitantOrganizationIds.push(item.key) : supervisorIds.push(item.key) |
|
|
|
|
|
|
|
}) |
|
|
|
let body = { |
|
|
|
let body = { |
|
|
|
supervisorIds: instance.validateForm.value.organization, |
|
|
|
supervisorIds: supervisorIds, |
|
|
|
|
|
|
|
assitantOrganizationIds: assitantOrganizationIds |
|
|
|
} |
|
|
|
} |
|
|
|
this.http.patch(`/api/PlanTasks/${item.id}`, body).subscribe({ |
|
|
|
this.http.patch(`/api/PlanTasks/${item.id}`, body).subscribe({ |
|
|
|
next: async (data: any) => { |
|
|
|
next: async (data: any) => { |
|
|
@ -370,6 +382,8 @@ export class ZhiIndicatorsComponent implements OnInit { |
|
|
|
modal.afterOpen.subscribe(() => console.log('[afterOpen] emitted!')); |
|
|
|
modal.afterOpen.subscribe(() => console.log('[afterOpen] emitted!')); |
|
|
|
modal.afterClose.subscribe(result => console.log('[afterClose] The result is:', result)); |
|
|
|
modal.afterClose.subscribe(result => console.log('[afterClose] The result is:', result)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
orcheckbox(data, $event, node) { |
|
|
|
orcheckbox(data, $event, node) { |
|
|
|
if ($event) { |
|
|
|
if ($event) { |
|
|
|
data.search2Value.push(node.origin.id) |
|
|
|
data.search2Value.push(node.origin.id) |
|
|
@ -428,7 +442,9 @@ export class ZhiIndicatorsComponent implements OnInit { |
|
|
|
}) |
|
|
|
}) |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
this.getUsers() |
|
|
|
// this.getUsers()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Promise.all([this.getCompanies(), this.getAllOrganization()]) |
|
|
|
Promise.all([this.getCompanies(), this.getAllOrganization()]) |
|
|
|
.then((results) => { |
|
|
|
.then((results) => { |
|
|
|
let arr = [...JSON.parse(JSON.stringify(this.allOrList)), ...JSON.parse(JSON.stringify(this.unitList))] |
|
|
|
let arr = [...JSON.parse(JSON.stringify(this.allOrList)), ...JSON.parse(JSON.stringify(this.unitList))] |
|
|
@ -596,7 +612,7 @@ export class ZhiIndicatorsComponent implements OnInit { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
ngOnDestroy(): void { |
|
|
|
ngOnDestroy(): void { |
|
|
|
console.log('毁灭了') |
|
|
|
// console.log('毁灭了')
|
|
|
|
// this.doubleRandom.isPopover = false
|
|
|
|
// this.doubleRandom.isPopover = false
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -650,6 +666,14 @@ export class ZhiIndicatorsComponent implements OnInit { |
|
|
|
params: params |
|
|
|
params: params |
|
|
|
}).subscribe((data: any) => { |
|
|
|
}).subscribe((data: any) => { |
|
|
|
console.log('检查员列表', data) |
|
|
|
console.log('检查员列表', data) |
|
|
|
|
|
|
|
data.forEach(element => { |
|
|
|
|
|
|
|
element.parentId = element.organizationId |
|
|
|
|
|
|
|
element.key = element.id |
|
|
|
|
|
|
|
element.title = element.name |
|
|
|
|
|
|
|
element.selectable = false |
|
|
|
|
|
|
|
element.disableCheckbox = false |
|
|
|
|
|
|
|
element.datatype = '人员' |
|
|
|
|
|
|
|
}); |
|
|
|
if (type == 'main') { |
|
|
|
if (type == 'main') { |
|
|
|
this.mainsupervisorList = data |
|
|
|
this.mainsupervisorList = data |
|
|
|
} else { |
|
|
|
} else { |
|
|
|