|
@@ -63,6 +63,7 @@ export class PageTextbookComponent implements OnInit {
|
|
export:true
|
|
export:true
|
|
},
|
|
},
|
|
};
|
|
};
|
|
|
|
+ processId?:string = ''
|
|
|
|
|
|
constructor(
|
|
constructor(
|
|
public tbookSer: textbookServer,
|
|
public tbookSer: textbookServer,
|
|
@@ -70,19 +71,36 @@ export class PageTextbookComponent implements OnInit {
|
|
private activeRoute: ActivatedRoute // private translate:TranslateService,
|
|
private activeRoute: ActivatedRoute // private translate:TranslateService,
|
|
) {
|
|
) {
|
|
this.user = Parse.User.current();
|
|
this.user = Parse.User.current();
|
|
- this.className = this.EduTextbook.className;
|
|
|
|
- this.fieldsArray = this.EduTextbook.fieldsArray;
|
|
|
|
- this.queryParams = {
|
|
|
|
- where: {
|
|
|
|
- isDeleted: { $ne: true },
|
|
|
|
- render: true,
|
|
|
|
- discard: { $ne: true },
|
|
|
|
- department: this.tbookSer.profile.user.department?.objectId,
|
|
|
|
- },
|
|
|
|
- };
|
|
|
|
|
|
+ // this.className = this.EduTextbook.className;
|
|
|
|
+ // this.fieldsArray = this.EduTextbook.fieldsArray;
|
|
|
|
+ // this.queryParams = {
|
|
|
|
+ // where: {
|
|
|
|
+ // isDeleted: { $ne: true },
|
|
|
|
+ // render: true,
|
|
|
|
+ // discard: { $ne: true },
|
|
|
|
+ // department: this.tbookSer.profile.user.department?.objectId,
|
|
|
|
+ // },
|
|
|
|
+ // };
|
|
}
|
|
}
|
|
|
|
|
|
- ngOnInit(): void {}
|
|
|
|
|
|
+ ngOnInit(): void {
|
|
|
|
+ this.getProcess()
|
|
|
|
+ }
|
|
|
|
+ async getProcess(){
|
|
|
|
+ let parentMap = await this.tbookSer.formatNode(
|
|
|
|
+ this.tbookSer?.profile?.user?.department?.objectId
|
|
|
|
+ );
|
|
|
|
+ if (!parentMap[1]?.key) return;
|
|
|
|
+ let query = new Parse.Query('EduProcess');
|
|
|
|
+ query.equalTo('department', parentMap[1]?.key);
|
|
|
|
+ query.lessThanOrEqualTo('startDate', new Date());
|
|
|
|
+ query.greaterThan('deadline', new Date());
|
|
|
|
+ query.notEqualTo('isDeleted', true);
|
|
|
|
+ query.notEqualTo('status', '100');
|
|
|
|
+ query.select('objectId');
|
|
|
|
+ let res = await query.first();
|
|
|
|
+ this.processId = res?.id;
|
|
|
|
+ }
|
|
toUrl(url: string, params?: object) {
|
|
toUrl(url: string, params?: object) {
|
|
if (params) {
|
|
if (params) {
|
|
this.router.navigate([url, params]);
|
|
this.router.navigate([url, params]);
|