Merge branch 'develop' of https://gitlab.eascs.com/tms-ui/tms-obc-web into develop
This commit is contained in:
@ -19,7 +19,7 @@ export class DatatableDriverComponent implements OnInit {
|
|||||||
mode = 'year';
|
mode = 'year';
|
||||||
date: any = null;
|
date: any = null;
|
||||||
defineDate = [];
|
defineDate = [];
|
||||||
queryTime: any = ''
|
queryTime: any = [new Date().getFullYear()]
|
||||||
dateFormat = 'yyyy';
|
dateFormat = 'yyyy';
|
||||||
today = new Date();
|
today = new Date();
|
||||||
ui: SFUISchema = {};
|
ui: SFUISchema = {};
|
||||||
@ -130,11 +130,22 @@ export class DatatableDriverComponent implements OnInit {
|
|||||||
if(result === null) {
|
if(result === null) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (this.mode === 'year') {
|
// if (this.mode === 'year') {
|
||||||
|
// this.queryTime = this.datePipe.transform(this.date, 'yyyy')
|
||||||
|
// } else if (this.mode === 'month') {
|
||||||
|
// this.queryTime = this.datePipe.transform(this.date, 'yyyy-MM')
|
||||||
|
// }
|
||||||
|
|
||||||
|
if(this.mode === 'year') {
|
||||||
this.queryTime = [this.datePipe.transform(this.date, 'yyyy')]
|
this.queryTime = [this.datePipe.transform(this.date, 'yyyy')]
|
||||||
} else if (this.mode === 'month') {
|
} else if(this.mode === 'month') {
|
||||||
this.queryTime = [this.datePipe.transform(this.date, 'yyyy-MM')]
|
this.queryTime = [this.datePipe.transform(this.date, 'yyyy-MM')]
|
||||||
|
} else if(this.mode === 'date') {
|
||||||
|
this.queryTime = [this.datePipe.transform(this.date, 'yyyy-MM-dd')]
|
||||||
|
} else{
|
||||||
|
this.queryTime = [this.datePipe.transform(this.defineDate[0], 'yyyy-MM-dd'), this.datePipe.transform(this.defineDate[1], 'yyyy-MM-dd')]
|
||||||
}
|
}
|
||||||
|
|
||||||
this.st.reload({ ...this.reqParams });
|
this.st.reload({ ...this.reqParams });
|
||||||
}
|
}
|
||||||
disabledDate = (current: Date): boolean =>
|
disabledDate = (current: Date): boolean =>
|
||||||
|
|||||||
Reference in New Issue
Block a user