page-textbook.component.ts 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. import { Component, OnInit, ViewChild, Input } from '@angular/core';
  2. import { ActivatedRoute, RouterOutlet, Router } from '@angular/router';
  3. import { CompTableListComponent } from '../../../app/comp-table/comp-table-list/comp-table-list.component';
  4. import { EduTextbook } from '../../../schemas/EduTextbook';
  5. import { NzPageHeaderModule } from 'ng-zorro-antd/page-header';
  6. import { NzBreadCrumbModule } from 'ng-zorro-antd/breadcrumb';
  7. import * as Parse from 'parse';
  8. import { CommonModule } from '@angular/common';
  9. import { TextbookComponent } from '../../../app/textbook/textbook.component';
  10. import { NzTabsModule } from 'ng-zorro-antd/tabs';
  11. import { CollectTextbookComponent } from '../components/collect-textbook/collect-textbook.component';
  12. @Component({
  13. selector: 'app-page-textbook',
  14. templateUrl: './page-textbook.component.html',
  15. styleUrls: ['./page-textbook.component.scss'],
  16. imports: [
  17. CommonModule,
  18. RouterOutlet,
  19. CompTableListComponent,
  20. NzPageHeaderModule,
  21. NzBreadCrumbModule,
  22. TextbookComponent,
  23. CollectTextbookComponent,
  24. NzTabsModule
  25. ],
  26. standalone: true,
  27. })
  28. export class PageTextbookComponent implements OnInit {
  29. @ViewChild(CompTableListComponent) list: CompTableListComponent | undefined;
  30. @Input('discard') discard: boolean = false;
  31. @Input('render') render: boolean = false;
  32. EduTextbook = EduTextbook;
  33. user: Parse.User | undefined;
  34. className: string | undefined;
  35. queryParams: any | undefined;
  36. fieldsArray: Array<any> | undefined;
  37. filterObj: any = {
  38. showMore: true, //显示更多字段
  39. isCheck: false,
  40. status: ['400'],
  41. btns: {eduReivew:true},
  42. };
  43. allFilterObj: any = {
  44. // showMore: true, //显示更多字段
  45. isCheck: false,
  46. status: ['102','103','200','201','300','400'],
  47. btns: {review:true,changStatus:true},
  48. };
  49. active: number = 0;
  50. constructor(
  51. private router: Router,
  52. private activeRoute: ActivatedRoute // private translate:TranslateService,
  53. ) {
  54. this.user = Parse.User.current();
  55. this.className = this.EduTextbook.className;
  56. this.fieldsArray = this.EduTextbook.fieldsArray;
  57. this.queryParams = {
  58. where: {
  59. isDeleted: { $ne: true },
  60. render: true,
  61. discard: { $ne: true },
  62. },
  63. };
  64. }
  65. ngOnInit(): void {
  66. // this.queryParams.where = {
  67. // isDeleted: { $ne: true },
  68. // discard: this.discard ? { $eq: true } : { $ne: true },
  69. // render: this.render ? { $eq: true } : { $ne: true },
  70. // };
  71. }
  72. }