本文整理汇总了TypeScript中app/entry/pia.service.PiaService类的典型用法代码示例。如果您正苦于以下问题:TypeScript service.PiaService类的具体用法?TypeScript service.PiaService怎么用?TypeScript service.PiaService使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了service.PiaService类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1:
this._http.get('./assets/files/2018-02-21-pia-example.json' ).subscribe(data => {
this._piaService.importData(data, 'EXAMPLE', false, true).then(() => {
pia.getPiaExample().then((entry2: any) => {
this.pia_example = entry2;
});
});
});
示例2: importPia
/**
* Import a new PIA.
* @param {*} [event] - Any Event.
* @memberof CardsComponent
*/
importPia(event?: any) {
if (event) {
this._piaService.import(event.target.files[0]);
} else {
this.el.nativeElement.querySelector('#import_file').click();
}
}
示例3:
this._piaService.pia.update().then(() => {
this._piaService.cancelAllValidatedEvaluation().then(() => {
this._sidStatusService.refusePia(this._piaService).then(() => {
this.router.navigate(['entry', this._piaService.pia.id, 'section', 1, 'item', 1]);
this._modalsService.openModal('modal-refuse-pia');
});
});
});
示例4: ngOnChanges
async ngOnChanges() {
this._paginationService.dataNav = await this._appDataService.getDataNav();
await this._piaService.getPIA();
const sectionId = parseInt(this._activatedRoute.snapshot.params['section_id'], 10);
const itemId = parseInt(this._activatedRoute.snapshot.params['item_id'], 10);
this._paginationService.setPagination(sectionId, itemId);
}
示例5: ngOnInit
async ngOnInit() {
await this._piaService.getPIA();
this.data = await this._appDataService.getDataNav();
this.data.sections.forEach((section: any) => {
section.items.forEach((item: any) => {
this._sidStatusService.setSidStatus(this._piaService, section, item);
});
});
}
示例6: ngOnInit
ngOnInit() {
// Reset measures no longer addable from KB when switching PIA
this._knowledgeBaseService.toHide = [];
// Update the last edited date for this PIA
this._piaService.getPIA().then(() => {
this._piaService.pia.updated_at = new Date();
this._piaService.pia.update();
});
}
示例7: ngOnInit
ngOnInit() {
this.appVersion = environment.version;
this.pia_is_example = false;
this._piaService.getPIA().then(() => {
if (this._piaService.pia.is_example === 1) {
this.pia_is_example = true;
this.pia_example = this._piaService.pia;
} else if (!this._piaService.pia.id) {
this.loadPiaExample();
}
});
}
示例8: ngOnInit
ngOnInit() {
this.validateForm = new FormGroup({
validateStatus1: new FormControl(),
validateStatus2: new FormControl(),
validateStatus3: new FormControl(),
validateStatus4: new FormControl()
});
this._piaService.getPIA().then(() => {
this.validateForm.controls['validateStatus1'].patchValue(this._piaService.pia.status > 1);
this.validateForm.controls['validateStatus2'].patchValue(this._piaService.pia.status > 1);
this.validateForm.controls['validateStatus3'].patchValue(this._piaService.pia.status > 1);
this.validateForm.controls['validateStatus4'].patchValue(this._piaService.pia.status > 1);
this._attachmentsService.updateSignedAttachmentsList();
this._actionPlanService.listActionPlan();
});
}
示例9: ngOnInit
ngOnInit() {
this.rejectionReasonForm = new FormGroup({
rejectionReason: new FormControl()
});
this.modificationsMadeForm = new FormGroup({
modificationsMade: new FormControl()
});
this._piaService.getPIA().then(() => {
if (this._piaService.pia.rejected_reason && this._piaService.pia.rejected_reason.length > 0) {
this.rejectionReasonForm.controls['rejectionReason'].patchValue(this._piaService.pia.rejected_reason);
this.rejectionReasonForm.controls['rejectionReason'].disable();
this.showRejectionReasonButtons = true;
}
if (this._piaService.pia.applied_adjustements && this._piaService.pia.rejected_reason
&& this._piaService.pia.applied_adjustements.length > 0 && this._piaService.pia.rejected_reason.length > 0) {
this.modificationsMadeForm.controls['modificationsMade'].patchValue(this._piaService.pia.applied_adjustements);
this.modificationsMadeForm.controls['modificationsMade'].disable();
if (this._piaService.pia.status === 1) {
this.showResendValidationButton = true;
}
}
// Textareas auto resize
const rejectionTextarea = document.getElementById('pia-refuse-reason');
if (rejectionTextarea) {
this.autoTextareaResize(null, rejectionTextarea);
}
const modificationsTextarea = document.getElementById('pia-refuse-modifications');
if (modificationsTextarea) {
this.autoTextareaResize(null, modificationsTextarea);
}
});
}
示例10: ngOnInit
ngOnInit() {
this._piaService.getPIA();
}