no message
This commit is contained in:
parent
bc2ca1764c
commit
584a252119
|
@ -68,7 +68,7 @@ export class DynamicFormComponent implements OnInit {
|
|||
|
||||
private progressbar:boolean = false;
|
||||
|
||||
|
||||
private fragment:string;
|
||||
constructor(private qcs: FieldControlService, private serverService: ServerService, private router: Router, private pdfService: PDFService,
|
||||
private _location: Location, private route: ActivatedRoute, private pagerService: PaginationService, private tokenService: TokenService, private visibilityRulesService: VisibilityRulesService) {
|
||||
this.datasetId = route.snapshot.params['id'];
|
||||
|
@ -80,8 +80,6 @@ export class DynamicFormComponent implements OnInit {
|
|||
|
||||
|
||||
ngOnInit() {
|
||||
//this.dataModel = new JsonSerializer<DatasetModel>().fromJSONObject(new DatasetModel(), DatasetModel);
|
||||
//this.form = this.dataModel.buildForm();
|
||||
|
||||
this.stepperItems = [{
|
||||
label: 'Personal',
|
||||
|
@ -109,7 +107,6 @@ export class DynamicFormComponent implements OnInit {
|
|||
}
|
||||
];
|
||||
|
||||
|
||||
this.serverService.getDmp(this.datasetId).subscribe(
|
||||
response => {
|
||||
this.dataModel = new JsonSerializer<DatasetModel>().fromJSONObject(response, DatasetModel);
|
||||
|
|
|
@ -1,9 +1,13 @@
|
|||
import { ActivatedRouteSnapshot,Router,ActivatedRoute } from '@angular/router';
|
||||
|
||||
export class BaseTableOfContent{
|
||||
constructor(public router: Router,public route:ActivatedRoute){}
|
||||
constructor(public router: Router,public route:ActivatedRoute){
|
||||
this.route.fragment.subscribe((fragment: string) => {
|
||||
if(fragment)document.querySelector('#' + fragment).scrollIntoView();
|
||||
})
|
||||
}
|
||||
|
||||
scrollToId(elementId) {
|
||||
this.router.navigate([this.route.snapshot.url[0]+"/"+this.route.snapshot.url[1]], { fragment: elementId });
|
||||
}
|
||||
}
|
||||
}
|
|
@ -5,16 +5,19 @@ import { BaseModel } from './BaseModel';
|
|||
import {Field} from './Field'
|
||||
export class CompositeField extends BaseModel implements Serializable<CompositeField> {
|
||||
public fields:Array<Field> = new Array<Field>();
|
||||
|
||||
public ordinal:number
|
||||
|
||||
fromJSONObject(item:any):CompositeField{
|
||||
|
||||
this.fields = new JsonSerializer<Field>().fromJSONArray(item.fields,Field);
|
||||
this.ordinal = item.ordinal;
|
||||
return this;
|
||||
}
|
||||
|
||||
buildForm():FormGroup{
|
||||
let formGroup = this.formBuilder.group({});
|
||||
let formGroup = this.formBuilder.group({
|
||||
ordinal:this.ordinal
|
||||
});
|
||||
|
||||
let fieldsFormArray = new Array<FormGroup>();
|
||||
this.fields.forEach(item => {
|
||||
|
|
Loading…
Reference in New Issue