Browse Source

Merge branch 'master' of http://git.fmode.cn:3000/bin/edu-textbook

cehn 7 months ago
parent
commit
c0b68e2a48

+ 37 - 0
projects/textbook/src/app/textbook/textbook.component.ts

@@ -711,7 +711,40 @@ export class TextbookComponent implements OnInit {
     let data: any = await this.getTextbook('', true);
     let table = `<table border="1px" cellspacing="0" cellpadding="0">
         <thead>
+        <tr>
+                <th colspan="10" style="font-size: 20px;font-family: '黑体';">“十四五”普通高等教育本科国家级规划教材推荐汇总表</th>
+            </tr>
+            <tr>
+                <th></th><th></th><th></th><th></th><th></th>
+                <th></th><th></th><th></th><th></th><th></th>
+            </tr>
+            <tr>
+                <th></th><th></th><th></th><th></th><th></th>
+                <th></th><th></th><th></th><th></th><th></th>
+            </tr>
+            <tr>
+                <th></th><th></th>
+                <th style="font-size: 12px;font-family: '黑体';text-align: left;">单位名称(公章):</th>
+                <th colspan="3"></th>
+                <th></th><th></th><th></th>
+            </tr>
+            <tr>
+                <th></th><th></th><th></th><th></th><th></th>
+                <th></th><th></th><th></th><th></th><th></th>
+            </tr>
+            <tr>
+                <th></th><th></th>
+                <th style="font-size: 12px;font-family: '黑体';text-align: left;">申报工作联系人:</th>
+                <th colspan="2" style="font-size: 12px;font-family: '黑体';text-align: left;">姓名</th>
+                <th colspan="2" style="font-size: 12px;font-family: '黑体';text-align: left;">电话</th>
+                <th></th><th></th><th></th>
+            </tr>
+            <tr>
+                <th></th><th></th><th></th><th></th><th></th>
+                <th></th><th></th><th></th><th></th><th></th>
+            </tr>
           <tr>
+            <th>序号</th>
             <th>申报编号</th>
             <th>申报教材名称</th>
             <th>第一主编/作者</th>
@@ -728,6 +761,10 @@ export class TextbookComponent implements OnInit {
     let _body = '';
     for (var row = 0; row < data.length; row++) {
       _body += '<tr>';
+      _body += '<td>';
+      _body += `${row+1}`;
+      _body += '</td>';
+
       _body += '<td>';
       _body += `${data[row].get('code') || ''}`;
       _body += '</td>';

+ 32 - 18
projects/textbook/src/modules/nav-admin/page-process/process-create/process-create.component.html

@@ -32,7 +32,7 @@
               style="width: 100%"
             >
               <nz-input-group
-                [nzAddOnAfter]="validateForm.value.name.length + '/' + 50"
+                [nzAddOnAfter]="validateForm.value.name?.length + '/' + 50"
               >
                 <input
                   nz-input
@@ -53,23 +53,21 @@
               [nzNoColon]="true"
               [nzSm]="18"
               [nzXs]="18"
-              >流程描述</nz-form-label
+              >推荐限额</nz-form-label
             >
             <nz-form-control
               class="val"
-              nzErrorTip="请填写合集描述"
+              nzErrorTip="请填写推荐限额"
               style="width: 100%"
             >
-              <nz-input-group
-                [nzAddOnAfter]="validateForm.value.desc.length + '/' + 50"
-              >
+              <nz-input-group>
                 <input
                   nz-input
-                  type="text"
-                  placeholder="请填流程描述"
-                  formControlName="desc"
+                  type="number"
+                  placeholder="请输入限额数值,单本教材与全册教材均占 1 份额度"
+                  formControlName="num"
                   nzStatus=""
-                  maxlength="50"
+                  maxlength="3"
                 />
               </nz-input-group>
             </nz-form-control>
@@ -183,31 +181,47 @@
       </div>
       <div class="rows" nz-row>
         <div nz-col nzSpan="11">
+
+
           <nz-form-item class="row" style="margin-bottom: 6px">
             <nz-form-label
               class="label"
               [nzNoColon]="true"
               [nzSm]="18"
               [nzXs]="18"
-              >推荐限额</nz-form-label
+              >流程描述</nz-form-label
             >
             <nz-form-control
               class="val"
-              nzErrorTip="请填写推荐限额"
+              nzErrorTip="请填写合集描述"
               style="width: 100%"
             >
-              <nz-input-group>
+              <!-- <nz-input-group
+                [nzAddOnAfter]="validateForm.value.desc.length + '/' + 50"
+              >
                 <input
                   nz-input
-                  type="number"
-                  placeholder="请输入限额数值,单本教材与全册教材均占 1 份额度"
-                  formControlName="num"
+                  type="text"
+                  placeholder="请填流程描述"
+                  formControlName="desc"
                   nzStatus=""
-                  maxlength="3"
+                  maxlength="50"
                 />
-              </nz-input-group>
+              </nz-input-group> -->
+
+              <nz-textarea-count [nzMaxCharacterCount]="500">
+                <textarea 
+                placeholder="请填写流程描述" 
+                maxlength="500" 
+                rows="4" formControlName="desc"
+                 nz-input></textarea>
+              </nz-textarea-count>
+
             </nz-form-control>
           </nz-form-item>
+
+
+          
         </div>
         <div nz-col nzSpan="11"></div>
       </div>

+ 35 - 23
projects/textbook/src/modules/nav-admin/page-process/process-create/process-create.component.ts

@@ -45,16 +45,17 @@ export class ProcessCreateComponent implements OnInit {
   searchValue: string = ''; //搜索部门内容
 
   validateForm: FormGroup<{
-    name: FormControl<Array<string> | any>; //流程名称
-    desc: FormControl<Array<string> | any>; //流程描述
+    name: FormControl<string>; //流程名称
+    desc: FormControl<string>; //流程描述
     code: FormControl<string | any>; //流程唯一标识
     num: FormControl<number | any>; //报送配额
     branch: FormControl<Array<string> | any>; //所属分类
     startDate: FormControl<Date>; //开始时间
     deadline: FormControl<Date>; //结束时间
+
   }> = this.fb.group({
     name: ['', [Validators.required]],
-    desc: ['',],
+    desc: ['',[Validators.maxLength(500)]],
     code: ['', [Validators.required]],
     num: ['',],
     branch: ['', [Validators.required]],
@@ -89,28 +90,39 @@ export class ProcessCreateComponent implements OnInit {
         query.include('branch', 'department','profileSubmitted');
         query.equalTo('objectId', id);
         this.eduProcess = await query.first();
-        this.validateForm = this.fb.group({
-          name: [this.eduProcess?.get('name') || '', [Validators.required]],
-          desc: [this.eduProcess?.get('desc') || '',],
-          code: [this.eduProcess?.get('code') || '', [Validators.required]],
-          num: [this.eduProcess?.get('num') || ''],
-          branch: [
-            this.eduProcess?.get('branch')?.id || '',
-            [Validators.required],
-          ],
-          startDate: [
-            this.eduProcess?.get('startDate')
+        this.validateForm.get('name')?.setValue(this.eduProcess?.get('name') || '')
+        this.validateForm.get('desc')?.setValue(this.eduProcess?.get('desc') || '')
+        this.validateForm.get('code')?.setValue(this.eduProcess?.get('code') || '')
+        this.validateForm.get('num')?.setValue(this.eduProcess?.get('num') || '')
+        this.validateForm.get('branch')?.setValue(this.eduProcess?.get('branch')?.id || '')
+        this.validateForm.get('startDate')?.setValue(this.eduProcess?.get('startDate')
               ? this.eduProcess?.get('startDate')
-              : new Date('2024/07/20'),
-            [Validators.required],
-          ],
-          deadline: [
-            this.eduProcess?.get('deadline')
+              : new Date('2024/07/20'))
+        this.validateForm.get('deadline')?.setValue( this.eduProcess?.get('deadline')
               ? this.eduProcess?.get('deadline')
-              : new Date('2024-09-20'),
-            [Validators.required],
-          ],
-        });
+              : new Date('2024-09-20'))
+        // this.validateForm = this.fb.group({
+        //   name: [this.eduProcess?.get('name') || '', [Validators.required]],
+        //   desc: [this.eduProcess?.get('desc') || '',[Validators.maxLength(100)]],
+        //   code: [this.eduProcess?.get('code') || '', [Validators.required]],
+        //   num: [this.eduProcess?.get('num') || ''],
+        //   branch: [
+        //     this.eduProcess?.get('branch')?.id || '',
+        //     [Validators.required],
+        //   ],
+        //   startDate: [
+        //     this.eduProcess?.get('startDate')
+        //       ? this.eduProcess?.get('startDate')
+        //       : new Date('2024/07/20'),
+        //     [Validators.required],
+        //   ],
+        //   deadline: [
+        //     this.eduProcess?.get('deadline')
+        //       ? this.eduProcess?.get('deadline')
+        //       : new Date('2024-09-20'),
+        //     [Validators.required],
+        //   ],
+        // });
       }
       this.profileId = this.eduProcess?.get('profileSubmitted')?.id || '';
       this.department = this.eduProcess?.get('department')?.id || '';

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

@@ -158,8 +158,13 @@
             <td nzEllipsis>
               {{ data?.get("code") || "-" }}
             </td>
-            <td nzEllipsis>
+            <td nzEllipsis nz-popover [nzPopoverContent]="contentTemplate">
               {{ data?.get("desc") || "-" }}
+              <ng-template #contentTemplate>
+                <div style="max-width: 400px;">
+                  {{data?.get('desc')}}
+                </div>
+              </ng-template>
             </td>
             <td nzEllipsis>
               {{ data?.get("num") || "-" }}

+ 3 - 0
projects/textbook/src/modules/nav-admin/page-process/process-list/process-list.component.ts

@@ -25,6 +25,8 @@ import { NzEmptyModule } from 'ng-zorro-antd/empty';
 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';
+
 interface nodes {
   title: string;
   key: string;
@@ -57,6 +59,7 @@ interface depart {
     NzEmptyModule,
     NzModalModule,
     NzRadioModule,
+    NzPopoverModule
   ],
   standalone: true,
 })

+ 34 - 117
projects/textbook/src/modules/nav-province-contact/page-process/process-create/process-create.component.html

@@ -6,68 +6,28 @@
   </nz-breadcrumb>
 </nz-page-header>
 }
-<div
-  class="content"
-  id="process"
-  [style.padding]="isEdit ? '0' : '0 24px 16px'"
->
+<div class="content" id="process" [style.padding]="isEdit ? '0' : '0 24px 16px'">
   <div class="title">基本信息</div>
   <div class="fill-template">
     <div class="rows" nz-row>
       <div nz-col nzSpan="11">
         <nz-form-item class="row" style="margin-bottom: 6px">
-          <nz-form-label
-            class="label"
-            [nzNoColon]="true"
-            [nzSm]="18"
-            [nzXs]="18"
-            nzRequired
-            >流程名称</nz-form-label
-          >
-          <nz-form-control
-            class="val"
-            nzErrorTip="请填写流程名称"
-            style="width: 100%"
-          >
+          <nz-form-label class="label" [nzNoColon]="true" [nzSm]="18" [nzXs]="18" nzRequired>流程名称</nz-form-label>
+          <nz-form-control class="val" nzErrorTip="请填写流程名称" style="width: 100%">
             <nz-input-group>
-              <input
-                nz-input
-                type="text"
-                placeholder="请填写流程名称"
-                disabled="true"
-                [ngModel]="eduProcess?.get('name')"
-                nzStatus=""
-                maxlength="50"
-              />
+              <input nz-input type="text" placeholder="请填写流程名称" disabled="true" [ngModel]="eduProcess?.get('name')"
+                nzStatus="" maxlength="50" />
             </nz-input-group>
           </nz-form-control>
         </nz-form-item>
       </div>
       <div nz-col nzSpan="11">
         <nz-form-item class="row" style="margin-bottom: 6px">
-          <nz-form-label
-            class="label"
-            [nzNoColon]="true"
-            [nzSm]="18"
-            [nzXs]="18"
-            nzRequired
-            >流程描述</nz-form-label
-          >
-          <nz-form-control
-            class="val"
-            nzErrorTip="请填写合集描述"
-            style="width: 100%"
-          >
+          <nz-form-label class="label" [nzNoColon]="true" [nzSm]="18" [nzXs]="18" nzRequired>推荐限额</nz-form-label>
+          <nz-form-control class="val" nzErrorTip="请填写推荐限额" style="width: 100%">
             <nz-input-group>
-              <input
-                nz-input
-                type="text"
-                placeholder="请填流程描述"
-                disabled="true"
-                [ngModel]="eduProcess?.get('desc')"
-                nzStatus=""
-                maxlength="50"
-              />
+              <input nz-input type="text" placeholder="请填写流程唯一标识" disabled="true" [ngModel]="eduProcess?.get('num')"
+                nzStatus="" maxlength="50" />
             </nz-input-group>
           </nz-form-control>
         </nz-form-item>
@@ -76,48 +36,21 @@
     <div class="rows" nz-row>
       <div nz-col nzSpan="11">
         <nz-form-item class="row" style="margin-bottom: 6px">
-          <nz-form-label
-            class="label"
-            [nzNoColon]="true"
-            [nzSm]="18"
-            [nzXs]="18"
-            nzRequired
-            >流程唯一标识</nz-form-label
-          >
-          <nz-form-control
-            class="val"
-            nzErrorTip="请填写流程唯一标识"
-            style="width: 100%"
-          >
+          <nz-form-label class="label" [nzNoColon]="true" [nzSm]="18" [nzXs]="18" nzRequired>流程唯一标识</nz-form-label>
+          <nz-form-control class="val" nzErrorTip="请填写流程唯一标识" style="width: 100%">
             <nz-input-group>
-              <input
-                nz-input
-                type="text"
-                placeholder="请填写流程唯一标识"
-                disabled="true"
-                [ngModel]="eduProcess?.get('code')"
-                nzStatus=""
-                maxlength="50"
-              />
+              <input nz-input type="text" placeholder="请填写流程唯一标识" disabled="true" [ngModel]="eduProcess?.get('code')"
+                nzStatus="" maxlength="50" />
             </nz-input-group>
           </nz-form-control>
         </nz-form-item>
       </div>
       <div nz-col nzSpan="11">
         <nz-form-item class="row">
-          <nz-form-label class="label" [nzNoColon]="true" nzRequired
-            >流程所属类别</nz-form-label
-          >
+          <nz-form-label class="label" [nzNoColon]="true" nzRequired>流程所属类别</nz-form-label>
           <nz-input-group>
-            <input
-              nz-input
-              type="text"
-              placeholder="请填写流程唯一标识"
-              disabled="true"
-              [ngModel]="eduProcess?.get('branch')?.get('name')"
-              nzStatus=""
-              maxlength="50"
-            />
+            <input nz-input type="text" placeholder="请填写流程唯一标识" disabled="true"
+              [ngModel]="eduProcess?.get('branch')?.get('name')" nzStatus="" maxlength="50" />
           </nz-input-group>
         </nz-form-item>
       </div>
@@ -125,14 +58,7 @@
     <div class="rows" nz-row>
       <div nz-col nzSpan="11">
         <nz-form-item class="row" style="margin-bottom: 6px">
-          <nz-form-label
-            class="label"
-            [nzNoColon]="true"
-            [nzSm]="18"
-            [nzXs]="18"
-            nzRequired
-            >开始时间</nz-form-label
-          >
+          <nz-form-label class="label" [nzNoColon]="true" [nzSm]="18" [nzXs]="18" nzRequired>开始时间</nz-form-label>
           <div class="date">
             {{ eduProcess?.get("startDate") | date : "yyyy-MM-dd HH:MM" }}
           </div>
@@ -140,14 +66,7 @@
       </div>
       <div nz-col nzSpan="11">
         <nz-form-item class="row" style="margin-bottom: 6px">
-          <nz-form-label
-            class="label"
-            [nzNoColon]="true"
-            [nzSm]="18"
-            [nzXs]="18"
-            nzRequired
-            >结束时间</nz-form-label
-          >
+          <nz-form-label class="label" [nzNoColon]="true" [nzSm]="18" [nzXs]="18" nzRequired>结束时间</nz-form-label>
           <div class="date">
             {{ eduProcess?.get("deadline") | date : "yyyy-MM-dd HH:MM" }}
           </div>
@@ -156,33 +75,31 @@
     </div>
     <div class="rows" nz-row>
       <div nz-col nzSpan="11">
+       
         <nz-form-item class="row" style="margin-bottom: 6px">
-          <nz-form-label
-            class="label"
-            [nzNoColon]="true"
-            [nzSm]="18"
-            [nzXs]="18"
-            nzRequired
-            >推荐限额</nz-form-label
-          >
-          <nz-form-control
-            class="val"
-            nzErrorTip="请填写推荐限额"
-            style="width: 100%"
-          >
-            <nz-input-group>
+          <nz-form-label class="label" [nzNoColon]="true" [nzSm]="18" [nzXs]="18" nzRequired>流程描述</nz-form-label>
+          <nz-form-control class="val" nzErrorTip="请填写合集描述" style="width: 100%">
+            <nz-textarea-count [nzMaxCharacterCount]="500">
+              <textarea 
+              placeholder="请填写流程描述" 
+              [disabled]="true" maxlength="500" rows="4" 
+              [ngModel]="eduProcess?.get('desc')"
+                nz-input></textarea>
+            </nz-textarea-count>
+            <!-- <nz-input-group>
               <input
                 nz-input
                 type="text"
-                placeholder="请填写流程唯一标识"
+                placeholder="请填流程描述"
                 disabled="true"
-                [ngModel]="eduProcess?.get('num')"
+                [ngModel]="eduProcess?.get('desc')"
                 nzStatus=""
                 maxlength="50"
               />
-            </nz-input-group>
+            </nz-input-group> -->
           </nz-form-control>
         </nz-form-item>
+        
       </div>
       <div nz-col nzSpan="11"></div>
     </div>
@@ -251,4 +168,4 @@
     </div>
   </div>
   } -->
-</div>
+</div>