2 次代碼提交 a523c7f968 ... e478d9f952

作者 SHA1 備註 提交日期
  warrior e478d9f952 Merge branch 'master' of http://git.fmode.cn:3000/bin/edu-textbook 2 月之前
  warrior 62250c73c8 update 国家级管理员收集材料 2 月之前

+ 77 - 3
projects/textbook/src/modules/nav-admin/page-process/process-list/process-list.component.html

@@ -161,13 +161,17 @@
             <td nzEllipsis nz-popover [nzPopoverContent]="contentTemplate">
               {{ data?.get("desc") || "-" }}
               <ng-template #contentTemplate>
-                <div style="max-width: 400px;">
-                  {{data?.get('desc')}}
+                <div style="max-width: 400px">
+                  {{ data?.get("desc") }}
                 </div>
               </ng-template>
             </td>
             <td nzEllipsis>
-              {{ data?.get("num") || data?.get("num") == 0 ? data?.get("num") : "-" }}
+              {{
+                data?.get("num") || data?.get("num") == 0
+                  ? data?.get("num")
+                  : "-"
+              }}
             </td>
             <td nzEllipsis>
               {{
@@ -222,6 +226,22 @@
                       >暂停流程
                     </button>
                   </li>
+                  }@if (statusMap[data.id].collect){
+                  <li nz-menu-item>
+                    <button
+                      nz-button
+                      nzType="link"
+                      style="color: #231c1f"
+                      (click)="openEditCollect(data)"
+                    >
+                      <span
+                        nz-icon
+                        nzType="plus-circle"
+                        nzTheme="outline"
+                      ></span
+                      >收集源文件
+                    </button>
+                  </li>
                   } @if (statusMap[data.id].end){
                   <li nz-menu-item>
                     <button
@@ -365,3 +385,57 @@
     </button>
   </div>
 </nz-modal>
+
+<nz-modal
+  [(nzVisible)]="showModal"
+  nzTitle="收集教材源文件"
+  (nzOnCancel)="handleCancel()"
+  nzWidth="600px"
+>
+  <ng-container *nzModalContent>
+    <div nz-row class="depart-modal">
+      <div nz-col nzSpan="24">
+        <div class="row">
+          <div class="label">
+            开始时间 <span style="color: #e8353e">*</span>
+          </div>
+          <div class="value">
+            <nz-date-picker
+              nzFormat="yyyy-MM-dd HH:mm:ss"
+              [(ngModel)]="collectStartData"
+              [nzShowTime]="{ nzDefaultOpenValue: timeDefaultValue }"
+            ></nz-date-picker>
+          </div>
+        </div>
+        <div class="row">
+          <div class="label">截止时间 <span style="color: #e8353e">*</span></div>
+          <div class="value">
+            <nz-date-picker
+              nzFormat="yyyy-MM-dd HH:mm:ss"
+              [(ngModel)]="collectEndData"
+              [nzStatus]="collectEndData < collectStartData ? 'error' : ''"
+              [nzShowTime]="{ nzDefaultOpenValue: timeDefaultValue }"
+            ></nz-date-picker>
+          </div>
+        </div>
+        <div class="row">
+          <div class="label">收集教材</div>
+          <div class="value">
+            12
+          </div>
+        </div>
+      </div>
+    </div>
+  </ng-container>
+  <div *nzModalFooter>
+    <button nz-button nzType="default" (click)="handleCancel()">取消</button>
+    <button
+      nz-button
+      nzType="primary"
+      [disabled]="!this.collectStartData || !this.collectEndData"
+      (click)="editCollect()"
+    >
+      确定
+    </button>
+  </div>
+</nz-modal>

+ 6 - 1
projects/textbook/src/modules/nav-admin/page-process/process-list/process-list.component.scss

@@ -75,8 +75,13 @@
 }
 .depart-modal{
   .row{
-    width: 90%;
+    width: 100%;
     margin-bottom: 20px;
+    display: flex;
+    align-items: center;
+    .label{
+      width: 100px;
+    }
   }
   .tree{
     height: 180px;

+ 66 - 5
projects/textbook/src/modules/nav-admin/page-process/process-list/process-list.component.ts

@@ -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
+  }
 }

+ 1 - 1
projects/textbook/src/modules/nav-author/components/attachment/attachment.component.html

@@ -127,7 +127,7 @@
   <div class="author-content">
     <div class="title">2.图书编校质量自查结果记录表(必须提供)</div>
     <div class="text">
-      教材出版单位对申报教材的编校质量自查后,按要求提供图书编校质量自查结果记录表,并加盖出版社公章。全册教材的不同分册以不同文件分别上传。<a
+      教材出版单位对申报教材的编校质量自查后,按要求提供图书编校质量自查结果记录表,并加盖出版社公章。全册教材的不同分册文件按分册顺序排序后上传。<a
         (click)="downloadFile('图书编校质量自查结果记录表.docx')"
         >下载格式要求</a
       >

+ 0 - 1
projects/textbook/src/modules/nav-province-contact/modules.routes.ts

@@ -10,7 +10,6 @@ import { SubmittedComponent } from "./submitted/submitted.component";
 import { AuthGuard } from "./auth.guard";
 import { ActivityComponent } from "./activity/activity.component";
 import { ReviewEditComponent } from "./activity/review-edit/review-edit.component";
-// import { PageTextbookComponent } from "./page-textbook/page-textbook.component";
 
 const routes: Routes = [
   {

+ 1 - 1
projects/textbook/src/modules/nav-province-contact/page-textbook/page-textbook.component.html

@@ -1,7 +1,7 @@
 @if (!editLoading && eduProcess?.id) {
   <nz-page-header>
     <nz-page-header-title
-      >测试评审活动
+      >全部教材列表
       <br />
       <div class="subtitle">
         查看全部申报流程所提交的教材推荐表

+ 1 - 1
projects/textbook/src/modules/nav-review/approve/approve.component.ts

@@ -57,7 +57,7 @@ export class ApproveComponent implements OnInit {
   afterFilterObj: any = {
     showMore: true, //显示更多字段
     isCheck: false,
-    status: ['200'],
+    status: ['200','201','300','400'],
     contained: [],
     btns: {
       eduReivew: true,

+ 9 - 0
server/db/schemas/EduProcess.js

@@ -60,6 +60,15 @@ export const EduProcess = {
       "type": "Date",
       "required": false
     },
+
+    "collectStartData": {//收集文件开始时间
+      "type": "Date",
+      "required": false
+    },
+    "collectEndData": {//收集文件结束时间
+      "type": "Date",
+      "required": false
+    },
   },
   "classLevelPermissions": {
     "find": {