|
@@ -1,6 +1,6 @@
|
|
|
import { Component, OnInit, ViewChild } from '@angular/core';
|
|
|
import { ActivatedRoute, RouterOutlet, Router } from '@angular/router';
|
|
|
-import { CompTableListComponent } from '../../../../app/comp-table/comp-table-list/comp-table-list.component';
|
|
|
+// import { CompTableListComponent } from '../../../../app/comp-table/comp-table-list/comp-table-list.component';
|
|
|
import _Role from '../../../../schemas/_Role';
|
|
|
// import { TranslateService } from '@ngx-translate/core';
|
|
|
import * as Parse from 'parse';
|
|
@@ -26,7 +26,8 @@ import { NzRadioModule } from 'ng-zorro-antd/radio';
|
|
|
import { NzMessageService } from 'ng-zorro-antd/message';
|
|
|
import { NzModalService } from 'ng-zorro-antd/modal';
|
|
|
import { NzPopoverModule } from 'ng-zorro-antd/popover';
|
|
|
-
|
|
|
+import { setHours } from 'date-fns';
|
|
|
+import { NzDatePickerModule } from 'ng-zorro-antd/date-picker';
|
|
|
interface nodes {
|
|
|
title: string;
|
|
|
key: string;
|
|
@@ -50,7 +51,7 @@ interface depart {
|
|
|
CommonModule,
|
|
|
CommonCompModule,
|
|
|
RouterOutlet,
|
|
|
- CompTableListComponent,
|
|
|
+ // CompTableListComponent,
|
|
|
NzSpaceModule,
|
|
|
NzPageHeaderModule,
|
|
|
NzBreadCrumbModule,
|
|
@@ -59,12 +60,14 @@ interface depart {
|
|
|
NzEmptyModule,
|
|
|
NzModalModule,
|
|
|
NzRadioModule,
|
|
|
- NzPopoverModule
|
|
|
+ NzPopoverModule,
|
|
|
+ NzDatePickerModule
|
|
|
],
|
|
|
standalone: true,
|
|
|
})
|
|
|
export class ProcessListComponent implements OnInit {
|
|
|
- @ViewChild(CompTableListComponent) list: CompTableListComponent | undefined;
|
|
|
+ // @ViewChild(CompTableListComponent) list: CompTableListComponent | undefined;
|
|
|
+ timeDefaultValue = setHours(new Date(), 0);
|
|
|
|
|
|
// _Role = _Role
|
|
|
Department = Department;
|
|
@@ -126,6 +129,30 @@ export class ProcessListComponent implements OnInit {
|
|
|
stop: false,
|
|
|
end: false,
|
|
|
del: true,
|
|
|
+ collect:true
|
|
|
+ };
|
|
|
+ }
|
|
|
+ if(e?.get('collectStartData') && new Date() < new Date(e?.get('collectStartData'))){
|
|
|
+ return {
|
|
|
+ title: '待收集',
|
|
|
+ color: 'default',
|
|
|
+ strat: false,
|
|
|
+ stop: false,
|
|
|
+ end: false,
|
|
|
+ del: false,
|
|
|
+ collect:true
|
|
|
+ };
|
|
|
+ }
|
|
|
+ if(e?.get('collectStartData') && new Date() > new Date(e?.get('collectStartData'))
|
|
|
+ && new Date() < e?.get('collectEndData')){
|
|
|
+ return {
|
|
|
+ title: '收集中',
|
|
|
+ color: 'orange',
|
|
|
+ strat: false,
|
|
|
+ stop: false,
|
|
|
+ end: false,
|
|
|
+ del: false,
|
|
|
+ collect:true
|
|
|
};
|
|
|
}
|
|
|
if (e?.get('status') == '400') {
|
|
@@ -136,6 +163,7 @@ export class ProcessListComponent implements OnInit {
|
|
|
stop: false,
|
|
|
end: true,
|
|
|
del: false,
|
|
|
+ collect:true
|
|
|
};
|
|
|
}
|
|
|
if (!e?.get('startDate') || new Date() < new Date(e.get('startDate'))) {
|
|
@@ -200,6 +228,12 @@ export class ProcessListComponent implements OnInit {
|
|
|
code: '',
|
|
|
desc: '',
|
|
|
};
|
|
|
+ showModal:boolean = false
|
|
|
+ eduProcess?:Parse.Object //当前编辑流程
|
|
|
+ textBookList:Array<Parse.Object> = [] //流程教材列表(推荐)
|
|
|
+ collectStartData:any
|
|
|
+ collectEndData:any
|
|
|
+
|
|
|
constructor(
|
|
|
private route: Router,
|
|
|
private activeRoute: ActivatedRoute,
|
|
@@ -420,6 +454,12 @@ export class ProcessListComponent implements OnInit {
|
|
|
this.isVisible = false;
|
|
|
this.activatedNode = undefined;
|
|
|
this.parentMap = [];
|
|
|
+
|
|
|
+ this.showModal = false
|
|
|
+ this.collectStartData = undefined
|
|
|
+ this.collectEndData = undefined
|
|
|
+ this.eduProcess = undefined
|
|
|
+ this.textBookList = []
|
|
|
}
|
|
|
|
|
|
statusSelected(type: string) {
|
|
@@ -502,4 +542,25 @@ export class ProcessListComponent implements OnInit {
|
|
|
this.getEduProcess();
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ //打开编辑收集文件弹窗
|
|
|
+ openEditCollect(data:Parse.Object){
|
|
|
+ this.eduProcess = data
|
|
|
+ this.collectStartData = this.eduProcess?.get('collectStartData')
|
|
|
+ this.collectEndData = this.eduProcess?.get('collectEndData')
|
|
|
+ this.showModal = true
|
|
|
+ }
|
|
|
+ //保存收集文件设置
|
|
|
+ async editCollect(){
|
|
|
+ if(!this.collectStartData || !this.collectEndData || this.collectStartData > this.collectEndData){
|
|
|
+ this.message.warning('请设置正确的开始和截止时间')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.eduProcess?.set('collectStartData',this.collectStartData)
|
|
|
+ this.eduProcess?.set('collectEndData',this.collectEndData)
|
|
|
+ await this.eduProcess?.save()
|
|
|
+ this.message.success('设置成功')
|
|
|
+ this.getEduProcess()
|
|
|
+ this.showModal = false
|
|
|
+ }
|
|
|
}
|