|
@@ -12,8 +12,6 @@ import { MatDialog } from '@angular/material/dialog';
|
|
|
import { NzEmptyModule } from 'ng-zorro-antd/empty';
|
|
|
import { DatePipe } from '@angular/common';
|
|
|
import { NzPopoverModule } from 'ng-zorro-antd/popover';
|
|
|
-import { setHours } from 'date-fns';
|
|
|
-import { NzDatePickerModule } from 'ng-zorro-antd/date-picker';
|
|
|
@Component({
|
|
|
selector: 'app-collect-file',
|
|
|
templateUrl: './collect-file.component.html',
|
|
@@ -25,22 +23,19 @@ import { NzDatePickerModule } from 'ng-zorro-antd/date-picker';
|
|
|
NzMessageModule,
|
|
|
NzEmptyModule,
|
|
|
NzPopoverModule,
|
|
|
- NzDatePickerModule,
|
|
|
],
|
|
|
providers: [DatePipe],
|
|
|
standalone: true,
|
|
|
})
|
|
|
export class CollectFileComponent implements OnInit {
|
|
|
textbookList: Array<Parse.Object> = [];
|
|
|
- eduProcess?:Parse.Object //流程
|
|
|
+ eduProcess?: Parse.Object; //流程
|
|
|
count: number = 0;
|
|
|
- timeDefaultValue = setHours(new Date(), 0);
|
|
|
|
|
|
@Input('limit') limit: number = 10;
|
|
|
pageIndex: number = 1;
|
|
|
loading: boolean = false;
|
|
|
@Input('maxWidth') maxWidth: any; //最大宽度
|
|
|
- showModal: boolean = false;
|
|
|
|
|
|
searchValue: string = '';
|
|
|
time: any;
|
|
@@ -66,6 +61,10 @@ export class CollectFileComponent implements OnInit {
|
|
|
}
|
|
|
return j || '-';
|
|
|
}
|
|
|
+
|
|
|
+ isVisible: boolean = false;
|
|
|
+ currentTextbook?: Parse.Object; //当前编辑教材
|
|
|
+
|
|
|
constructor(
|
|
|
private msg: NzMessageService,
|
|
|
public tbookSer: textbookServer,
|
|
@@ -76,17 +75,17 @@ export class CollectFileComponent implements OnInit {
|
|
|
) {}
|
|
|
|
|
|
async ngOnInit() {
|
|
|
- await this.getEduProcess()
|
|
|
- this.getTextbook()
|
|
|
+ await this.getEduProcess();
|
|
|
+ this.getTextbook();
|
|
|
}
|
|
|
- async getEduProcess(){
|
|
|
- let query = new Parse.Query('EduProcess')
|
|
|
- query.notEqualTo('isDeleted',true)
|
|
|
- query.equalTo('profileSubmitted',this.tbookSer.profile.objectId)
|
|
|
- query.containedIn('status',['400'])
|
|
|
- let r = await query.first()
|
|
|
+ async getEduProcess() {
|
|
|
+ let query = new Parse.Query('EduProcess');
|
|
|
+ query.notEqualTo('isDeleted', true);
|
|
|
+ query.equalTo('profileSubmitted', this.tbookSer.profile.objectId);
|
|
|
+ query.containedIn('status', ['400']);
|
|
|
+ let r = await query.first();
|
|
|
console.log(r);
|
|
|
- this.eduProcess = r
|
|
|
+ this.eduProcess = r;
|
|
|
}
|
|
|
|
|
|
async getTextbook(val?: string, review?: boolean): Promise<any[] | void> {
|
|
@@ -121,7 +120,8 @@ export class CollectFileComponent implements OnInit {
|
|
|
childrens: {
|
|
|
$inQuery: {
|
|
|
where: {
|
|
|
- editionUnit:'民政部' || this.eduProcess?.get('name'),
|
|
|
+ editionUnit: this.eduProcess?.get('name'),
|
|
|
+ // editionUnit: '山东大学出版社',
|
|
|
},
|
|
|
className: 'EduTextbookVolume',
|
|
|
},
|
|
@@ -137,7 +137,11 @@ export class CollectFileComponent implements OnInit {
|
|
|
query.notEqualTo('discard', true);
|
|
|
// query.exists('score');
|
|
|
// query.equalTo('verify', true);
|
|
|
- query.include('childrens','department');
|
|
|
+ query.include(
|
|
|
+ 'childrens',
|
|
|
+ 'eduProcess.profileSubmitted.user',
|
|
|
+ 'department'
|
|
|
+ );
|
|
|
this.count = await query.count();
|
|
|
query.limit(this.limit);
|
|
|
query.skip(this.limit * (this.pageIndex - 1));
|
|
@@ -203,4 +207,16 @@ export class CollectFileComponent implements OnInit {
|
|
|
}
|
|
|
this.route.navigate([url]);
|
|
|
}
|
|
|
+ //打开上传弹窗
|
|
|
+ onEditModal(data:Parse.Object){
|
|
|
+ this.currentTextbook = data
|
|
|
+ this.isVisible = true
|
|
|
+ }
|
|
|
+ handleCancel(): void {
|
|
|
+ this.isVisible = false;
|
|
|
+ this.currentTextbook = undefined;
|
|
|
+ }
|
|
|
+ saveCollect(type:string) {
|
|
|
+ console.log(type);
|
|
|
+ }
|
|
|
}
|