|
@@ -1,4 +1,4 @@
|
|
|
-import { Component, Input, OnInit } from '@angular/core';
|
|
|
+import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
|
|
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
|
import { CommonCompModule } from '../../services/common.modules';
|
|
|
import { Router, ActivatedRoute } from '@angular/router';
|
|
@@ -49,6 +49,7 @@ export class TextbookComponent implements OnInit {
|
|
|
@Input('path') path: string = '/common/textbook/details';
|
|
|
@Input('discard') discard: Boolean = false; //是否删除
|
|
|
@Input('eduProcess') eduProcess?: Parse.Object; //流程id,verify存在时需要
|
|
|
+ @Output() updateCheck: EventEmitter<any> = new EventEmitter<any>();
|
|
|
|
|
|
//相关权限配置
|
|
|
@Input('filterObj') filterObj: any = {
|
|
@@ -337,6 +338,7 @@ export class TextbookComponent implements OnInit {
|
|
|
// query.include('user')
|
|
|
this.textbookList = await query.find();
|
|
|
console.log(this.textbookList);
|
|
|
+ this.checkedAll = this.textbookList.every(item=> this.setOfCheckedId.has(item.id))
|
|
|
this.loading = false;
|
|
|
}
|
|
|
async getDepartment(all?: boolean): Promise<any> {
|
|
@@ -375,6 +377,7 @@ export class TextbookComponent implements OnInit {
|
|
|
this.getTextbook(this.searchValue);
|
|
|
}
|
|
|
onSearch(e: string) {
|
|
|
+ this.pageIndex = 1;
|
|
|
console.log(e);
|
|
|
this.getTextbook(e);
|
|
|
}
|
|
@@ -387,7 +390,7 @@ export class TextbookComponent implements OnInit {
|
|
|
//切换分页条数
|
|
|
onPageSizeChange($event:any): void {
|
|
|
console.log(this.limit);
|
|
|
- this.onAllChecked(false)
|
|
|
+ // this.onAllChecked(false)
|
|
|
this.pageIndex = 1
|
|
|
this.getTextbook()
|
|
|
}
|
|
@@ -405,6 +408,7 @@ export class TextbookComponent implements OnInit {
|
|
|
this.setOfCheckedId = new Set<string>();
|
|
|
}
|
|
|
this.checkedAll = checked;
|
|
|
+ this.updateCheck.emit() //选项变更触发传递事件父组建
|
|
|
}
|
|
|
//单选
|
|
|
onItemChecked(id: string, e: boolean) {
|
|
@@ -416,6 +420,7 @@ export class TextbookComponent implements OnInit {
|
|
|
this.checkedAll = this.textbookList.every((item) =>
|
|
|
this.setOfCheckedId.has(item.id)
|
|
|
);
|
|
|
+ this.updateCheck.emit() //选项变更触发传递事件父组建
|
|
|
}
|
|
|
//退回
|
|
|
reject(data?: Parse.Object) {
|