|
@@ -0,0 +1,94 @@
|
|
|
+import { Component, OnInit, ViewChild, Input } from '@angular/core';
|
|
|
+import { ActivatedRoute, RouterOutlet, Router } from '@angular/router';
|
|
|
+import { CompTableListComponent } from '../../../app/comp-table/comp-table-list/comp-table-list.component';
|
|
|
+import { NzPageHeaderModule } from 'ng-zorro-antd/page-header';
|
|
|
+import { NzBreadCrumbModule } from 'ng-zorro-antd/breadcrumb';
|
|
|
+import * as Parse from 'parse';
|
|
|
+import { CommonModule } from '@angular/common';
|
|
|
+import { textbookServer } from '../../../services/textbook';
|
|
|
+import { TextbookComponent } from '../../../app/textbook/textbook.component';
|
|
|
+import { NzSpaceModule } from 'ng-zorro-antd/space';
|
|
|
+import { CommonCompModule } from '../../../services/common.modules';
|
|
|
+import { NzTabsModule } from 'ng-zorro-antd/tabs';
|
|
|
+import { NzMessageService } from 'ng-zorro-antd/message';
|
|
|
+
|
|
|
+@Component({
|
|
|
+ selector: 'app-page-textbook',
|
|
|
+ templateUrl: './page-textbook.component.html',
|
|
|
+ styleUrls: ['./page-textbook.component.scss'],
|
|
|
+ imports: [
|
|
|
+ CommonModule,
|
|
|
+ RouterOutlet,
|
|
|
+ TextbookComponent,
|
|
|
+ CompTableListComponent,
|
|
|
+ NzPageHeaderModule,
|
|
|
+ CommonCompModule,
|
|
|
+ NzBreadCrumbModule,
|
|
|
+ NzSpaceModule,
|
|
|
+ NzTabsModule,
|
|
|
+ ],
|
|
|
+ standalone: true,
|
|
|
+})
|
|
|
+export class PageTextbookComponent implements OnInit {
|
|
|
+ @ViewChild(CompTableListComponent) list: CompTableListComponent | undefined;
|
|
|
+ @Input('discard') discard: boolean = false;
|
|
|
+ @Input('render') render: boolean = false;
|
|
|
+ active: number = 0;
|
|
|
+
|
|
|
+ user: Parse.User | undefined;
|
|
|
+
|
|
|
+ //待审核
|
|
|
+ beforeFilterObj: any = {
|
|
|
+ showMore: true, //显示更多字段
|
|
|
+ isCheck: true,
|
|
|
+ status: ['200','201','400'],
|
|
|
+ team:true,
|
|
|
+ btns: {
|
|
|
+ export:true
|
|
|
+ },
|
|
|
+ };
|
|
|
+ //已加入推荐
|
|
|
+ afterFilterObj: any = {
|
|
|
+ showMore: true, //显示更多字段
|
|
|
+ isCheck: true,
|
|
|
+ status: ['200','201','400'],
|
|
|
+ btns: {
|
|
|
+ export:true
|
|
|
+ },
|
|
|
+ };
|
|
|
+ eduProcess?:Parse.Object
|
|
|
+
|
|
|
+ constructor(
|
|
|
+ public tbookSer: textbookServer,
|
|
|
+ private message: NzMessageService,
|
|
|
+ private router: Router,
|
|
|
+ private activeRoute: ActivatedRoute // private translate:TranslateService,
|
|
|
+ ) {
|
|
|
+ this.user = Parse.User.current();
|
|
|
+ }
|
|
|
+
|
|
|
+ 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');
|
|
|
+ let res = await query.first();
|
|
|
+ this.eduProcess = res
|
|
|
+ }
|
|
|
+ toUrl(url: string, params?: object) {
|
|
|
+ if (params) {
|
|
|
+ this.router.navigate([url, params]);
|
|
|
+ } else {
|
|
|
+ this.router.navigate([url]);
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|