Browse Source

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

warrior 7 months ago
parent
commit
6081ffae1c

+ 1 - 1
README.md

@@ -20,7 +20,7 @@ npm run start
 
 ``` bash
 npx vite build
-cp .\dist\server\server.js temp-server.js
+cp ./dist/server/server.js temp-server.js
 node temp-server.js --local
 ```
 

+ 1 - 1
docker-front

@@ -1 +1 @@
-Subproject commit 4ce99679dd15b479ee2c74abe019e8e3474bc558
+Subproject commit f2aa87dcdcbea31ac16b3a7e5a2aa858de9f5aff

+ 2 - 2
projects/textbook/src/app/textbook/textbook.component.html

@@ -101,7 +101,7 @@
           {{ data?.get("unit") || "-" }}
         </td>
         <td nzEllipsis>
-          {{ data?.get("major").name || "-" }}
+          {{ data?.get("major")?.name || "-" }}
         </td>
         <td nzEllipsis>
           {{ data?.get("lang") || "-" }}
@@ -296,4 +296,4 @@
   </div>
 </div>
 
-}
+}

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

@@ -5,17 +5,17 @@
     class="login-form"
     (ngSubmit)="submitForm()"
   >
-    <div class="author-content">
+    <!-- <div class="author-content">
       <div class="title">教材电子版</div>
       <div class="text">
         教材出版单位配合按要求上传各地推荐的本单位出版的纸质教材最新印次的完整PDF电子版;数字教材上传全部教材内容电子版或填写能够查看全部教材内容的链接地址、账号;纸质教材附带数字资源的,上传纸质教材最新印次的完整PDF电子版,以及全部数字资源电子版或能够查看全部数字资源内容的链接地址、账号
-      </div>
+      </div> -->
       <!-- <nz-checkbox-group
         style="margin: 10px 0"
         formControlName="textbookTypes"
         [(ngModel)]="checkOptionsOne"
       ></nz-checkbox-group> -->
-      <label nz-checkbox [ngModelOptions]="{ standalone: true }" [ngModel]="true">纸质教材</label>
+      <!-- <label nz-checkbox [ngModelOptions]="{ standalone: true }" [ngModel]="true">纸质教材</label>
       <label nz-checkbox [ngModelOptions]="{ standalone: true }" [ngModel]="true">电子教材 / 资源</label>
       <div nz-row>
         <div nz-col nzSpan="12">
@@ -43,7 +43,7 @@
                   <span nz-icon nzType="upload"></span>上传教材
                 </div>
               </nz-upload>
-              <div class="text" style="margin: 10px 0">
+              <div class="text upText" style="margin: 10px 0">
                 支持批量上传 PDF、EPUB、AZW3、Mp4,单个文件小于 2M
               </div>
             </nz-form-control>
@@ -77,8 +77,8 @@
           </nz-form-item>
         </div>
       </div>
-    </div>
-    <div class="author-content">
+    </div> -->
+    <!-- <div class="author-content">
       <div class="title">所有作者政治审查意见</div>
       <div class="text">
         从本申报平台<a>下载格式要求</a>后,对应作者姓名上传“作者政治审查表”,支持
@@ -180,6 +180,68 @@
           }
         </tbody>
       </nz-table>
+    </div> -->
+    <div class="author-content">
+      <div class="title">教材版权信息</div>
+      
+      <nz-form-item class="row" style="margin-bottom: 16px">
+        <nz-form-label
+          class="label"
+          [nzNoColon]="true"
+          [nzSm]="10"
+          [nzXs]="10"
+          nzRequired
+          >版权页截图</nz-form-label
+        >
+        <nz-form-control
+          class="val"
+          nzErrorTip="请上传版权页截图"
+          style="width: 100%"
+        >
+          <nz-upload
+            formControlName="selfResults"
+            nzAction="https://www.mocky.io/v2/5cc8019d300000980a055e76"
+            [nzHeaders]="{ authorization: 'authorization-text' }"
+            (nzChange)="handleChange($event)"
+          >
+            <div style="color: #3e49b3">
+              <span nz-icon nzType="upload"></span>上传文件
+            </div>
+          </nz-upload>
+          <div class="text upText" style="margin: 10px 0">
+            支持批量上传 PDF、JPG、JPEG、PNG 格式,单个文件大小不超过 2M
+          </div>
+        </nz-form-control>
+      </nz-form-item>
+      <nz-form-item class="row" style="margin-bottom: 16px">
+        <nz-form-label
+          class="label"
+          [nzNoColon]="true"
+          [nzSm]="10"
+          [nzXs]="10"
+          nzRequired
+          >中国版本图书馆 CIP 查询截图</nz-form-label
+        >
+        <nz-form-control
+          class="val"
+          nzErrorTip="请上传中国版本图书馆 CIP 查询截图"
+          style="width: 100%"
+        >
+          <nz-upload
+            formControlName="selfResults"
+            nzAction="https://www.mocky.io/v2/5cc8019d300000980a055e76"
+            [nzHeaders]="{ authorization: 'authorization-text' }"
+            (nzChange)="handleChange($event)"
+          >
+            <div style="color: #3e49b3">
+              <span nz-icon nzType="upload"></span>上传文件
+            </div>
+          </nz-upload>
+          <div class="text upText" style="margin: 10px 0">
+            支持批量上传 PDF 格式,单个文件大小不超过 2M。如 CIP 数据中无“教材”字样的,须再上传内容提要或前言或后记中可以证明本书为教材的相关内容截图
+          </div>
+        </nz-form-control>
+      </nz-form-item>
     </div>
     <div class="author-content">
       <div class="title">图书编校质量自查结果记录表</div>
@@ -212,7 +274,7 @@
               <span nz-icon nzType="upload"></span>上传文件
             </div>
           </nz-upload>
-          <div class="text" style="margin: 10px 0">
+          <div class="text upText" style="margin: 10px 0">
             支持批量上传 PDF、JPG、JPEG、PNG 格式,单个文件大小不超过 2M
           </div>
         </nz-form-control>
@@ -251,7 +313,7 @@
               <span nz-icon nzType="upload"></span>上传文件
             </div>
           </nz-upload>
-          <div class="text" style="margin: 10px 0">
+          <div class="text upText" style="margin: 10px 0">
             支持批量上传 PDF、JPG、JPEG、PNG 格式,单个大小不超过 2M
           </div>
         </nz-form-control>
@@ -288,7 +350,7 @@
               <span nz-icon nzType="upload"></span>上传文件
             </div>
           </nz-upload>
-          <div class="text" style="margin: 10px 0">
+          <div class="text upText" style="margin: 10px 0">
             支持批量上传 PDF、JPG、JPEG、PNG 格式,单个文件大小不超过 2M
           </div>
         </nz-form-control>
@@ -308,11 +370,11 @@
           <span nz-icon nzType="upload"></span>上传文件
         </div>
       </nz-upload>
-      <div class="text" style="margin: 10px 0">
+      <div class="text upText" style="margin: 10px 0">
         支持批量上传 PDF、JPG、JPEG、PNG 格式,单个文件大小不超过 2M
       </div>
     </div>
-    <div class="author-content">
+    <!-- <div class="author-content">
       <div class="nav">教材作者诚信承诺</div>
       <div class="text">请填写作者诚信承诺文字内容,并上传所有作者签名</div>
       <nz-form-item class="row" style="margin-bottom: 16px">
@@ -336,8 +398,8 @@
           />
         </nz-form-control>
       </nz-form-item>
-    </div>
-    <div class="author-content">
+    </div> -->
+    <!-- <div class="author-content">
       <nz-form-label
         class="label"
         [nzNoColon]="true"
@@ -440,9 +502,9 @@
           }
         </tbody>
       </nz-table>
-    </div>
+    </div> -->
     <div class="author-content">
-      <div class="nav">申报单位承诺意见</div>
+      <div class="nav"><b>申报单位承诺意见</b></div>
       <div class="text">
         作者 /
         主编所在高校主管领导或出版单位主管领导在申报单位承诺意见表格签字并加盖高校
@@ -472,7 +534,7 @@
               <span nz-icon nzType="upload"></span>上传文件
             </div>
           </nz-upload>
-          <div class="text" style="margin: 10px 0">
+          <div class="text upText" style="margin: 10px 0">
             支持批量上传 PDF、JPG、JPEG、PNG 格式,单个文件大小不超过 2M
           </div>
         </nz-form-control>

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

@@ -28,7 +28,7 @@
     .title{
       font-family: PingFang SC;
       font-size: 16px;
-      font-weight: 500;
+      font-weight: 600;
       line-height: 22px;
       text-align: left;
       margin: 10px 0;
@@ -57,4 +57,7 @@
   // width: 200px;
   justify-content: end;
   padding-right: 100px;
+}
+.upText{
+  color: gray;
 }

+ 102 - 308
projects/textbook/src/modules/nav-author/components/basic-in/basic-in.component.html

@@ -1,42 +1,18 @@
 <div class="entry">
-  <form
-    nz-form
-    [formGroup]="validateForm"
-    class="login-form"
-    (ngSubmit)="submitForm()"
-  >
+  <form nz-form [formGroup]="validateForm" class="login-form" (ngSubmit)="submitForm()">
     <nz-form-item style="margin-bottom: 16px">
-      <nz-form-label
-        [nzSm]="8"
-        [nzNoColon]="true"
-        [nzXs]="8"
-        nzRequired
-        nzFor="user"
-        >申报教材名称</nz-form-label
-      >
+      <nz-form-label [nzSm]="8" [nzNoColon]="true" [nzXs]="8" nzRequired nzFor="user">申报教材名称</nz-form-label>
       <nz-form-control nzErrorTip="请输入申报教材名称" [nzSm]="12" [nzXs]="12">
         <nz-input-group>
-          <input
-            type="text"
-            nz-input
-            formControlName="title"
-            placeholder="请输入申报教材名称"
-          />
+          <input type="text" nz-input formControlName="title" placeholder="请输入申报教材名称" />
         </nz-input-group>
       </nz-form-control>
     </nz-form-item>
     <nz-form-item style="margin-bottom: 16px">
-      <nz-form-label [nzSm]="8" [nzNoColon]="true" [nzXs]="8" nzRequired
-        >国际标准书号(ISBN)</nz-form-label
-      >
+      <nz-form-label [nzSm]="8" [nzNoColon]="true" [nzXs]="8" nzRequired>国际标准书号(ISBN)</nz-form-label>
       <nz-form-control nzErrorTip="请输入国际标准书号" [nzSm]="12" [nzXs]="12">
         <nz-input-group [nzAddOnAfter]="autoButton">
-          <input
-            type="text"
-            nz-input
-            formControlName="ISBN"
-            placeholder="请输入国际标准书号"
-          />
+          <input type="text" nz-input formControlName="ISBN" placeholder="请输入国际标准书号" />
         </nz-input-group>
         <ng-template #autoButton>
           <button (click)="autoCompleteByISBN()" nz-button nzType="primary">自动补全</button>
@@ -44,47 +20,23 @@
       </nz-form-control>
     </nz-form-item>
     <nz-form-item style="margin-bottom: 16px">
-      <nz-form-label [nzSm]="8" [nzNoColon]="true" [nzXs]="8" nzRequired
-        >第一主编(作者)</nz-form-label
-      >
-      <nz-form-control
-        nzErrorTip="请输入第一主编(作者)"
-        [nzSm]="12"
-        [nzXs]="12"
-      >
+      <nz-form-label [nzSm]="8" [nzNoColon]="true" [nzXs]="8" nzRequired>第一主编(作者)</nz-form-label>
+      <nz-form-control nzErrorTip="请输入第一主编(作者)" [nzSm]="12" [nzXs]="12">
         <nz-input-group>
-          <input
-            type="text"
-            nz-input
-            formControlName="author"
-            placeholder="请输入第一主编(作者)"
-          />
+          <input type="text" nz-input formControlName="author" placeholder="请输入作者姓名" />
         </nz-input-group>
       </nz-form-control>
     </nz-form-item>
     <nz-form-item style="margin-bottom: 16px">
-      <nz-form-label [nzSm]="8" [nzNoColon]="true" [nzXs]="8" nzRequired
-        >第一主编(作者)单位</nz-form-label
-      >
-      <nz-form-control
-        nzErrorTip="请输入第一主编(作者)单位"
-        [nzSm]="12"
-        [nzXs]="12"
-      >
+      <nz-form-label [nzSm]="8" [nzNoColon]="true" [nzXs]="8" nzRequired>第一主编(作者)单位</nz-form-label>
+      <nz-form-control nzErrorTip="请输入第一主编(作者)单位" [nzSm]="12" [nzXs]="12">
         <nz-input-group>
-          <input
-            type="text"
-            nz-input
-            formControlName="unit"
-            placeholder="请输入第一主编(作者)单位"
-          />
+          <input type="text" nz-input formControlName="unit" placeholder="请输入作者单位" />
         </nz-input-group>
       </nz-form-control>
     </nz-form-item>
     <nz-form-item style="margin-bottom: 16px">
-      <nz-form-label [nzSm]="8" [nzNoColon]="true" [nzXs]="8" nzRequired
-        >申报类型</nz-form-label
-      >
+      <nz-form-label [nzSm]="8" [nzNoColon]="true" [nzXs]="8" nzRequired>申报类型</nz-form-label>
       <nz-form-control nzErrorTip="请输入申报类型" [nzSm]="12" [nzXs]="12">
         <nz-input-group>
           <!-- <input
@@ -94,28 +46,13 @@
             placeholder="请输入申报类型"
           /> -->
 
-          <nz-radio-group
-            style="display: flex; flex-direction: column"
-            formControlName="type"
-          >
-            <label nz-radio nzValue="单册" (click)="requiredTypeNumber(false)"
-              >单册</label
-            >
+          <nz-radio-group style="display: flex; flex-direction: column" formControlName="type">
+            <label nz-radio nzValue="单册" (click)="requiredTypeNumber(false)">单册</label>
             <div class="basic-row">
-              <label nz-radio nzValue="全册" (click)="requiredTypeNumber(true)"
-                >全册</label
-              >
+              <label nz-radio nzValue="全册" (click)="requiredTypeNumber(true)">全册</label>
               @if (validateForm.value.type =='全册') {
-              <nz-input-group
-                style="flex: 1; margin-left: 20px"
-                [nzSuffix]="suffixTemplateInfo"
-              >
-                <input
-                  type="number"
-                  formControlName="typeNumber"
-                  nz-input
-                  placeholder="输入册数"
-                />
+              <nz-input-group style="flex: 1; margin-left: 20px" [nzSuffix]="suffixTemplateInfo">
+                <input type="number" formControlName="typeNumber" nz-input placeholder="输入册数" />
               </nz-input-group>
               <ng-template #suffixTemplateInfo> 册 </ng-template>
               }
@@ -125,186 +62,127 @@
       </nz-form-control>
     </nz-form-item>
     <nz-form-item style="margin-bottom: 16px">
-      <nz-form-label [nzSm]="8" [nzNoColon]="true" [nzXs]="8" nzRequired
-        >教材应用对象及所诉学科专业类</nz-form-label
-      >
-      <nz-form-control
-        nzErrorTip="请输入教材应用对象及所诉学科专业类"
-        [nzSm]="12"
-        [nzXs]="12"
-      >
+      <nz-form-label [nzSm]="8" [nzNoColon]="true" [nzXs]="8" nzRequired>教材应用对象及所属学科专业类</nz-form-label>
+      <nz-form-control nzErrorTip="输入所属本科专业类代码(四位)搜索所属学科" [nzSm]="12" [nzXs]="12">
         <nz-input-group>
-          <nz-select
-            nzShowSearch
-            nzAllowClear
-            nzPlaceHolder="请输入搜索内容"
-            formControlName="majorPoniter"
-          >
+          <nz-select [nzOptionOverflowSize]="nzOptionOverflowSize" nzShowSearch nzAllowClear nzPlaceHolder="输入所属本科专业类代码(四位)搜索所属学科" formControlName="majorPoniter">
             @for(major of selectList; track major.code;let index = $index){
-            <nz-option
-              nzCustomContent
-              [nzValue]="major.name"
-              [nzLabel]="major.name"
-              >{{ major.name }}</nz-option
-            >
+            <nz-option nzCustomContent [nzValue]="major.name" [nzLabel]="major.name">
+              <div>{{ major.name }}</div>
+              <div style="font-size: 12px;color: gray;">{{ major.code }}</div>
+            </nz-option>
             }
           </nz-select>
         </nz-input-group>
       </nz-form-control>
     </nz-form-item>
     <nz-form-item style="margin-bottom: 16px">
-      <nz-form-label [nzSm]="8" [nzNoColon]="true" [nzXs]="8" nzRequired
-        >教材主要语种类型</nz-form-label
-      >
-      <nz-form-control
-        nzErrorTip="请输入教材主要语种类型"
-        [nzSm]="12"
-        [nzXs]="12"
-      >
+      <nz-form-label [nzSm]="8" [nzNoColon]="true" [nzXs]="8" nzRequired>教材主要语种类型</nz-form-label>
+      <nz-form-control nzErrorTip="选择教材主要语种" [nzSm]="12" [nzXs]="12">
         <nz-input-group>
-          <nz-select
-            nzShowSearch
-            nzAllowClear
-            nzPlaceHolder="请输入搜索内容"
-            formControlName="lang"
-          >
+          <nz-select nzShowSearch nzAllowClear nzPlaceHolder="选择教材主要语种" formControlName="lang">
             @for(lang of selectLang; track lang.lang;let index = $index){
-            <nz-option
-              nzCustomContent
-              [nzValue]="lang.name"
-              [nzLabel]="lang.name"
-              >{{ lang.name }}</nz-option
-            >
+            <nz-option nzCustomContent [nzValue]="lang.name" [nzLabel]="lang.name">{{ lang.name }}</nz-option>
             }
           </nz-select>
         </nz-input-group>
       </nz-form-control>
     </nz-form-item>
     <nz-form-item style="margin-bottom: 16px">
-      <nz-form-label [nzSm]="8" [nzNoColon]="true" [nzXs]="8" nzRequired
-        >其他主编姓名</nz-form-label
-      >
-      <nz-form-control nzErrorTip="请输入其他主编姓名" [nzSm]="12" [nzXs]="12">
+      <nz-form-label [nzSm]="8" [nzNoColon]="true" [nzXs]="8" nzRequired>其他主编姓名</nz-form-label>
+      <nz-form-control nzErrorTip="请输入其他主编姓名,使用「;」隔开" [nzSm]="12" [nzXs]="12">
         <nz-input-group>
-          <textarea
-            type="text"
-            nz-input
-            formControlName="authors"
-            placeholder="请输入其他主编姓名"
-          ></textarea>
+          <textarea type="text" nz-input formControlName="authors" placeholder="请输入其他主编姓名,使用「;」隔开"></textarea>
         </nz-input-group>
       </nz-form-control>
     </nz-form-item>
     <nz-form-item style="margin-bottom: 16px">
-      <nz-form-label [nzSm]="8" [nzNoColon]="true" [nzXs]="8" nzRequired
-        >其他编者姓名</nz-form-label
-      >
-      <nz-form-control nzErrorTip="请输入其他编者姓名" [nzSm]="12" [nzXs]="12">
+      <nz-form-label [nzSm]="8" [nzNoColon]="true" [nzXs]="8" nzRequired>其他编者姓名</nz-form-label>
+      <nz-form-control nzErrorTip="请输入其他编者姓名,使用「;」隔开" [nzSm]="12" [nzXs]="12">
         <nz-input-group>
-          <textarea
-            type="text"
-            nz-input
-            formControlName="editor"
-            placeholder="请输入其他编者姓名"
-          ></textarea>
+          <textarea type="text" nz-input formControlName="editor" placeholder="请输入其他编者姓名,使用「;」隔开"></textarea>
         </nz-input-group>
       </nz-form-control>
     </nz-form-item>
     <nz-form-item style="margin-bottom: 16px">
-      <nz-form-label [nzSm]="8" [nzNoColon]="true" [nzXs]="8" nzRequired
-        >是否重点立项教材</nz-form-label
-      >
+      <nz-form-label [nzSm]="8" [nzNoColon]="true" [nzXs]="8" nzRequired>是否重点立项教材</nz-form-label>
       <nz-form-control nzErrorTip="请输入完成项" [nzSm]="12" [nzXs]="12">
         <nz-input-group>
-          <nz-select
-            nzShowSearch
-            nzAllowClear
-            nzPlaceHolder="请输入是否重点立项教材"
-            formControlName="approval"
-          >
-            <nz-option nzCustomContent [nzValue]="true" [nzLabel]="'是'"
-              >是</nz-option
-            >
-            <nz-option nzCustomContent [nzValue]="false" [nzLabel]="'否'"
-              >否</nz-option
-            >
+          <nz-select nzShowSearch nzAllowClear nzPlaceHolder="请输入是否重点立项教材" formControlName="approval">
+            <nz-option nzCustomContent [nzValue]="'基础学科“101计划”核心教材'" [nzLabel]="'基础学科“101计划”核心教材'">基础学科“101计划”核心教材</nz-option>
+            <nz-option nzCustomContent [nzValue]="'战略性新兴领域教材'" [nzLabel]="'战略性新兴领域教材'">战略性新兴领域教材</nz-option>
+            <nz-option nzCustomContent [nzValue]="'“四新”重点建设教材'" [nzLabel]="'“四新”重点建设教材'">“四新”重点建设教材</nz-option>
+            <nz-option nzCustomContent [nzValue]="'否'" [nzLabel]="'否'">否</nz-option>
           </nz-select>
         </nz-input-group>
       </nz-form-control>
     </nz-form-item>
+    @if (validateForm.value.approval&&validateForm.value.approval != '否') {
+      <nz-form-item style="margin-bottom: 16px">
+        <nz-form-label [nzSm]="8" [nzNoColon]="true" [nzXs]="8" nzRequired>教材获批截图</nz-form-label>
+        <nz-form-control nzErrorTip="请上传教材获批截图" [nzSm]="12" [nzXs]="12">
+          <nz-input-group>
+            <app-comp-upload [width]="320" (change)="upload($event, 'approvedImgUrl')" title="上传教材获批截图"></app-comp-upload>
+          </nz-input-group>
+          <p style="color: gray;">支持上传 PDF 格式,文件大小不超过 2M</p>
+        </nz-form-control>
+      </nz-form-item>
+    }
+    
     <nz-form-item style="margin-bottom: 16px">
-      <nz-form-label [nzSm]="8" [nzNoColon]="true" [nzXs]="8" nzRequired
-        >出版单位</nz-form-label
-      >
+      <nz-form-label [nzSm]="8" [nzNoColon]="true" [nzXs]="8" nzRequired>出版单位</nz-form-label>
       <nz-form-control nzErrorTip="请输入出版单位" [nzSm]="12" [nzXs]="12">
-        <nz-input-group>
+        <!-- <nz-input-group>
           <input
             type="text"
             nz-input
             formControlName="editionUnit"
             placeholder="请输入出版单位"
           />
+        </nz-input-group> -->
+        <nz-input-group>
+          <nz-select nzShowSearch nzServerSearch nzPlaceHolder="选择出版单位" formControlName="editionUnit"
+            [nzShowArrow]="false" [nzFilterOption]="nzFilterOption" (nzOnSearch)="search($event)">
+            @for(edu of eduList; track edu;let index = $index){
+            <nz-option nzCustomContent [nzLabel]="edu?.get('name')" [nzValue]="edu?.get('name')">
+              {{edu?.get('name')}}
+            </nz-option>
+            }
+          </nz-select>
         </nz-input-group>
       </nz-form-control>
     </nz-form-item>
     <nz-form-item style="margin-bottom: 16px">
-      <nz-form-label [nzSm]="8" [nzNoColon]="true" [nzXs]="8" nzRequired
-        >初版时间</nz-form-label
-      >
+      <nz-form-label [nzSm]="8" [nzNoColon]="true" [nzXs]="8" nzRequired>初版时间</nz-form-label>
       <nz-form-control nzErrorTip="请输入初版时间" [nzSm]="12" [nzXs]="12">
         <nz-input-group>
-          <nz-date-picker
-            style="width: 100%"
-            formControlName="editionFirst"
-          ></nz-date-picker>
+          <nz-date-picker style="width: 100%" formControlName="editionFirst"></nz-date-picker>
         </nz-input-group>
       </nz-form-control>
     </nz-form-item>
     <nz-form-item style="margin-bottom: 16px">
-      <nz-form-label [nzSm]="8" [nzNoColon]="true" [nzXs]="8" nzRequired
-        >载体形式</nz-form-label
-      >
+      <nz-form-label [nzSm]="8" [nzNoColon]="true" [nzXs]="8" nzRequired>
+        载体形式
+        <span style="padding: 0 5px;" nz-icon nzType="info-circle" nzTheme="outline"></span>
+      </nz-form-label>
       <nz-form-control nzErrorTip="请输入载体形式" [nzSm]="12" [nzXs]="12">
         <nz-input-group>
-          <nz-select
-            nzShowSearch
-            nzAllowClear
-            nzPlaceHolder="请输入是否重点立项教材"
-            formControlName="carrierShape"
-          >
+          <nz-select nzShowSearch nzAllowClear nzPlaceHolder="选择载体形式" formControlName="carrierShape">
             @for(item of carrierOptions; track item.code;let index = $index){
-            <nz-option
-              nzCustomContent
-              [nzValue]="item.name"
-              [nzLabel]="item.name"
-              >{{ item.name }}</nz-option
-            >
+            <nz-option nzCustomContent [nzValue]="item.name" [nzLabel]="item.name">{{ item.name }}</nz-option>
             }
           </nz-select>
         </nz-input-group>
       </nz-form-control>
     </nz-form-item>
     <nz-form-item style="margin-bottom: 16px">
-      <nz-form-label [nzSm]="8" [nzNoColon]="true" [nzXs]="8" nzRequired
-        >出版时间及版次</nz-form-label
-      >
+      <nz-form-label [nzSm]="8" [nzNoColon]="true" [nzXs]="8" nzRequired>出版时间及版次</nz-form-label>
       <nz-form-control nzErrorTip="请输入出版时间" [nzSm]="12" [nzXs]="12">
         <nz-input-group>
           <div class="basic-row">
-            <nz-date-picker
-              style="flex: 1"
-              formControlName="editionDate"
-            ></nz-date-picker>
-            <nz-input-group
-              style="width: 100px; margin-left: 20px"
-              [nzSuffix]="suffixTemplateInfo"
-            >
-              <input
-                type="number"
-                formControlName="editionNumber"
-                nz-input
-                placeholder="输入版次"
-              />
+            <nz-date-picker style="flex: 1" formControlName="editionDate"></nz-date-picker>
+            <nz-input-group style="width: 100px; margin-left: 20px" [nzSuffix]="suffixTemplateInfo">
+              <input type="number" formControlName="editionNumber" nz-input placeholder="输入版次" />
             </nz-input-group>
             <ng-template #suffixTemplateInfo> 次 </ng-template>
           </div>
@@ -312,26 +190,13 @@
       </nz-form-control>
     </nz-form-item>
     <nz-form-item style="margin-bottom: 16px">
-      <nz-form-label [nzSm]="8" [nzNoColon]="true" [nzXs]="8" nzRequired
-        >最新印次时间及印次</nz-form-label
-      >
+      <nz-form-label [nzSm]="8" [nzNoColon]="true" [nzXs]="8" nzRequired>最新印次时间及印次</nz-form-label>
       <nz-form-control nzErrorTip="请输入完整内容" [nzSm]="12" [nzXs]="12">
         <nz-input-group>
           <div class="basic-row">
-            <nz-date-picker
-              style="flex: 1"
-              formControlName="printDate"
-            ></nz-date-picker>
-            <nz-input-group
-              style="width: 100px; margin-left: 20px"
-              [nzSuffix]="suffixTemplateInfo"
-            >
-              <input
-                type="number"
-                formControlName="printNumber"
-                nz-input
-                placeholder="输入版次"
-              />
+            <nz-date-picker style="flex: 1" formControlName="printDate"></nz-date-picker>
+            <nz-input-group style="width: 100px; margin-left: 20px" [nzSuffix]="suffixTemplateInfo">
+              <input type="number" formControlName="printNumber" nz-input placeholder="输入印次" />
             </nz-input-group>
             <ng-template #suffixTemplateInfo> 次 </ng-template>
           </div>
@@ -339,49 +204,27 @@
       </nz-form-control>
     </nz-form-item>
 
-    <nz-form-item style="margin-bottom: 16px">
-      <nz-form-label [nzSm]="8" [nzNoColon]="true" [nzXs]="8" nzRequired
-        >初版以来合计印次</nz-form-label
-      >
-      <nz-form-control
-        nzErrorTip="请输入初版以来合计印次"
-        [nzSm]="12"
-        [nzXs]="12"
-      >
+    <nz-form-item style="margin-bottom: 16px"> 
+      <nz-form-label [nzSm]="8" [nzNoColon]="true" [nzXs]="8" nzRequired>初版以来合计印次</nz-form-label>
+      <nz-form-control nzErrorTip="请输入初版以来合计印次" [nzSm]="12" [nzXs]="12">
         <nz-input-group>
-          <nz-input-group [nzSuffix]="suffixTemplateInfo">
-            <input
-              type="number"
-              formControlName="printSum"
-              nz-input
-              placeholder="输入版次"
-            />
+          <nz-input-group [nzSuffix]="suffixTemplateInfo02">
+            <input type="number" formControlName="printSum" nz-input placeholder="输入合计印数" />
           </nz-input-group>
-          <ng-template #suffixTemplateInfo> 次 </ng-template>
+          <ng-template #suffixTemplateInfo02> 册 </ng-template>
         </nz-input-group>
       </nz-form-control>
     </nz-form-item>
     <nz-form-item style="margin-bottom: 16px">
-      <nz-form-label [nzSm]="8" [nzNoColon]="true" [nzXs]="8" nzRequired
-        >初版以来是否列为重点项目</nz-form-label
-      >
+      <nz-form-label [nzSm]="8" [nzNoColon]="true" [nzXs]="8" nzRequired>初版以来是否列为重点项目</nz-form-label>
       <nz-form-control nzErrorTip="" [nzSm]="12" [nzXs]="12">
         <nz-input-group>
-          <nz-radio-group
-            style="display: flex; flex-direction: column"
-            formControlName="importantProject"
-          >
+          <nz-radio-group style="display: flex; flex-direction: column" formControlName="importantProject">
             @for (item of importantProjectList; track item.value) {
-            <label (click)="onChangeRadio()" nz-radio [nzValue]="item.value">{{
-              item.title
-            }}</label>
-            } @if (validateForm.value.importantProject ==
-            '其他省部级及以上项目') {
-            <input
-              type="text"
-              formControlName="importantProjectOther"
-              nz-input
-            />
+            <label (click)="onChangeRadio()" nz-radio [nzValue]="item.value">{{item.title}}</label>
+            }
+            @if (validateForm.value.importantProject == '其他省部级及以上项目') {
+            <input type="text" formControlName="importantProjectOther" placeholder="请输入入选项目名称" nz-input />
             }
             <label nz-radio nzValue="">否</label>
           </nz-radio-group>
@@ -389,61 +232,22 @@
       </nz-form-control>
     </nz-form-item>
     <nz-form-item style="margin-bottom: 16px">
-      <nz-form-label [nzSm]="8" [nzNoColon]="true" [nzXs]="8" nzRequired
-        >版权页截图</nz-form-label
-      >
-      <nz-form-control nzErrorTip="请输入版权页截图" [nzSm]="12" [nzXs]="12">
+      <nz-form-label [nzSm]="8" [nzNoColon]="true" [nzXs]="8" nzRequired>版权页截图</nz-form-label>
+      <nz-form-control nzErrorTip="请上传版权页截图" [nzSm]="12" [nzXs]="12">
         <nz-input-group>
-          <!-- <nz-upload
-            formControlName="copyrightImgUrl"
-            nzAction="https://www.mocky.io/v2/5cc8019d300000980a055e76"
-            [nzHeaders]="{ authorization: 'authorization-text' }"
-            (nzChange)="handleChange($event)"
-          >
-            <button nz-button>
-              <span nz-icon nzType="upload"></span>
-              上传截图
-            </button>
-          </nz-upload> -->
-          <app-comp-upload
-            [width]="320"
-            (change)="upload($event, 'copyrightImgUrl')"
-            title="上传截图"
-          ></app-comp-upload>
+          <app-comp-upload [width]="320" (change)="upload($event, 'copyrightImgUrl')" title="上传截图"></app-comp-upload>
         </nz-input-group>
       </nz-form-control>
     </nz-form-item>
     <nz-form-item style="margin-bottom: 16px">
-      <nz-form-label [nzSm]="8" [nzNoColon]="true" [nzXs]="8" nzRequired
-        >中国版本图书馆CIP查询截图</nz-form-label
-      >
+      <nz-form-label [nzSm]="8" [nzNoColon]="true" [nzXs]="8" nzRequired>中国版本图书馆CIP查询截图</nz-form-label>
       <nz-form-control nzErrorTip="" [nzSm]="12" [nzXs]="12">
         <nz-input-group>
           <div class="row-block">
-            <!-- <nz-upload
-              formControlName="CIPImgUrl"
-              nzAction="https://www.mocky.io/v2/5cc8019d300000980a055e76"
-              [nzHeaders]="{ authorization: 'authorization-text' }"
-              (nzChange)="handleChange($event)"
-            >
-              <button nz-button>
-                <span nz-icon nzType="upload"></span>
-                上传截图
-              </button>
-            </nz-upload> -->
-            <app-comp-upload
-              [width]="320"
-              (change)="upload($event, 'CIPImgUrl')"
-              title="上传截图"
-            ></app-comp-upload>
+            <app-comp-upload [width]="320" (change)="upload($event, 'CIPImgUrl')" title="上传截图"></app-comp-upload>
             <div class="tips">
-              <span
-                nz-icon
-                nzType="exclamation-circle"
-                nzTheme="fill"
-                style="font-size: 16px; color: #3e49b3; margin-right: 4px"
-              ></span
-              >如 CIP
+              <span nz-icon nzType="exclamation-circle" nzTheme="fill"
+                style="font-size: 16px; color: #3e49b3; margin-right: 4px"></span>如 CIP
               数据中无“教材”字样的,须再上传内容提要或前言或后记中可以证明本书为教材的相关内容截图
             </div>
           </div>
@@ -453,20 +257,10 @@
   </form>
 </div>
 <div class="footer">
-  <button
-    nz-button
-    nzType="default"
-    style="margin-right: 20px"
-    (click)="submitForm('save')"
-  >
+  <button nz-button nzType="default" style="margin-right: 20px" (click)="submitForm('save')">
     保存本页
   </button>
-  <button
-    nz-button
-    nzType="primary"
-    style="background: #3e49b3; border: 1px #3e49b3"
-    (click)="submitForm('next')"
-  >
+  <button nz-button nzType="primary" style="background: #3e49b3; border: 1px #3e49b3" (click)="submitForm('next')">
     下一页
   </button>
-</div>
+</div>

+ 47 - 14
projects/textbook/src/modules/nav-author/components/basic-in/basic-in.component.ts

@@ -80,7 +80,7 @@ export class BasicInComponent implements OnInit {
     authors: FormControl<string>; //其他主编姓名
     editor: FormControl<string>; //其他编者姓名
 
-    approval: FormControl<boolean>; //是否为重点立项教材
+    approval: FormControl<string>; //是否为重点立项教材
     editionUnit: FormControl<string>; //出版单位
     editionFirst: FormControl<Date>; //初版时间
     carrierShape: FormControl<string>; //载体形式
@@ -94,7 +94,7 @@ export class BasicInComponent implements OnInit {
 
     importantProject: FormControl<string>; //初版以来是否列为重点项目
     importantProjectOther: FormControl<string>; //其他省部级及以上项目
-
+    approvedImgUrl:FormControl<string>//重点立项教材获批截图
     copyrightImgUrl: FormControl<string>; //版权页截图
     CIPImgUrl: FormControl<string>; //中国版本图书馆CIP查询截图
 
@@ -110,7 +110,7 @@ export class BasicInComponent implements OnInit {
     lang: ['', [Validators.required]],
     authors: ['', [Validators.required]],
     editor: ['', [Validators.required]],
-    approval: [false],
+    approval: ['', [Validators.required]],
     editionUnit: ['', [Validators.required]],
     editionFirst: [new Date(), [Validators.required]],
     carrierShape: ['', [Validators.required]],
@@ -121,10 +121,13 @@ export class BasicInComponent implements OnInit {
     printSum: [0, [Validators.required]],
     importantProject: ['', [Validators.required]],
     importantProjectOther: [''],
+    approvedImgUrl:[''],
     copyrightImgUrl: [''],
     CIPImgUrl: [''],
     // remember: [true],
   });
+  /** 所属学科专业类显示数量*/
+  nzOptionOverflowSize=5
   //教材应用对象及所诉学科专业类
   selectList: Array<any> = [
     {
@@ -135,7 +138,7 @@ export class BasicInComponent implements OnInit {
       name: '软件工程',
       code: 'M002',
     },
-    {
+    {        
       name: '生物工程学',
       code: 'M003',
     },
@@ -204,7 +207,7 @@ export class BasicInComponent implements OnInit {
       lang: [this.eduTextbook?.get('lang') || '', [Validators.required]],
       authors: [this.eduTextbook?.get('authors') || '', [Validators.required]],
       editor: [this.eduTextbook?.get('editor') || '', [Validators.required]],
-      approval: [this.eduTextbook?.get('approval') || false, [Validators.required]],
+      approval: [this.eduTextbook?.get('approval') || '', [Validators.required]],
       editionUnit: [this.eduTextbook?.get('editionUnit') || '', [Validators.required]],
       editionFirst: [this.eduTextbook?.get('editionFirst') || new Date(), [Validators.required]],
       carrierShape: [this.eduTextbook?.get('carrierShape') || '', [Validators.required]],
@@ -215,6 +218,7 @@ export class BasicInComponent implements OnInit {
       printSum: [this.eduTextbook?.get('printSum') || 0, [Validators.required]],
       importantProject: [this.eduTextbook?.get('importantProject') || '', [Validators.required]],
       importantProjectOther: [this.eduTextbook?.get('importantProjectOther') || ''],
+      approvedImgUrl: [this.eduTextbook?.get('approvedImgUrl') || 'https://www.jyvtc.edu.cn/yssj/resource/cms/2022/01/2022010610314324023.pdf', [Validators.required]],
       copyrightImgUrl: [this.eduTextbook?.get('copyrightImgUrl') || 'https://www.jyvtc.edu.cn/yssj/resource/cms/2022/01/2022010610314324023.pdf', [Validators.required]],
       CIPImgUrl: [this.eduTextbook?.get('CIPImgUrl') || 'https://www.jyvtc.edu.cn/yssj/resource/cms/2022/01/2022010610314324023.pdf', [Validators.required]],
     });
@@ -256,7 +260,7 @@ export class BasicInComponent implements OnInit {
   upload(e: any, type:string) {
     console.log(e);
     let file = e[0];
-    if(type == 'copyrightImgUrl' || type == 'CIPImgUrl' ){
+    if(type == 'copyrightImgUrl' || type == 'CIPImgUrl' ||type=='approvedImgUrl'){
       this.validateForm.value[type] = file
     }
   }
@@ -305,14 +309,20 @@ export class BasicInComponent implements OnInit {
         });
         return
       }
-      Object.values(this.validateForm.controls).forEach((control) => {
-        if (control.invalid) {
-          control.markAsDirty();
-          control.updateValueAndValidity({ onlySelf: true });
-        }
-      });
-      this.msg.warning('请填写完整的内容')
-      return
+      if(event == 'next'){
+        let params = this.validateForm.value
+        await this.saveEduTextbook(params, this.validateForm.valid)
+        this.state.emit({type:'next',textBook:this.eduTextbook});
+      }
+      // Object.values(this.validateForm.controls).forEach((control) => {
+      //   if (control.invalid) {
+      //     control.markAsDirty();
+      //     control.updateValueAndValidity({ onlySelf: true });
+      //   }
+        
+      // });
+      // this.msg.warning('请填写完整的内容')
+      // return
     }
     if(event == 'save'){
       let params = this.validateForm.value
@@ -366,6 +376,7 @@ export class BasicInComponent implements OnInit {
     this.eduTextbook?.set('importantProject', params.importantProject);
     this.eduTextbook?.set('importantProjectOther', params.importantProjectOther);
     this.eduTextbook?.set('copyrightImgUrl', params.copyrightImgUrl);
+    this.eduTextbook?.set('approvedImgUrl',params.approvedImgUrl)
     this.eduTextbook?.set('CIPImgUrl', params.CIPImgUrl);
     if(this.tbookSer.profile?.user?.department.objectId){
       this.eduTextbook?.set('department', {
@@ -377,4 +388,26 @@ export class BasicInComponent implements OnInit {
     await this.eduTextbook?.save();
     return
   }
+
+
+
+  selectedValue = null;
+  listOfOption: Array<{ value: string; text: string }> = [];
+  nzFilterOption = (): boolean => true;
+  eduTimeout:any
+  /**出版单位列表 */
+  eduList:Array<Parse.Object>=[]
+/**搜索出版单位 */
+  async search(value: string) {
+    clearTimeout(this.eduTimeout)
+    this.eduTimeout = setTimeout(async() => {
+      let query = new Parse.Query('EduProcess')
+      query.equalTo('company', this.tbookSer.company)
+      query.equalTo('branch','66865d66ad23a23355b12aa7')
+      query.contains('name',value)
+      query.limit(10)
+      this.eduList = await query.find()
+    }, 500);
+ 
+  }
 }

+ 13 - 7
projects/textbook/src/modules/nav-author/components/textbook-content/textbook-content.component.ts

@@ -106,13 +106,18 @@ export class TextbookContentComponent  implements OnInit {
         });
         return;
       }
-      Object.values(this.validateForm.controls).forEach((control) => {
-        if (control.invalid) {
-          control.markAsDirty();
-          control.updateValueAndValidity({ onlySelf: true });
-        }
-      });
-      this.msg.warning('请填写完整信息');
+      if (event == 'next') {
+      let params: any = this.validateForm.value;
+      await this.saveEduTextbook(params, true);
+        this.state.emit({ type: 'next', textBook: this.eduTextbook });
+      }
+      // Object.values(this.validateForm.controls).forEach((control) => {
+      //   if (control.invalid) {
+      //     control.markAsDirty();
+      //     control.updateValueAndValidity({ onlySelf: true });
+      //   }
+      // });
+      // this.msg.warning('请填写完整信息');
     }
     if (event == 'save') {
       let params = this.validateForm.value;
@@ -138,6 +143,7 @@ export class TextbookContentComponent  implements OnInit {
   }
   //删除作者信息
   onDel(idx: number) {
+    if(this.courses?.length==1)return
     this.courses.splice(idx, 1);
   }
 

+ 93 - 270
projects/textbook/src/modules/nav-author/components/textbook-pertain/textbook-pertain.component.html

@@ -1,71 +1,25 @@
 <div class="entry">
-  <form
-    nz-form
-    [formGroup]="validateForm"
-    class="login-form"
-    (ngSubmit)="submitForm()"
-  >
+  <form nz-form [formGroup]="validateForm" class="login-form" (ngSubmit)="submitForm()">
     <div class="first-head">
       <div nz-row>
         <div nz-col nzSpan="12">
           <nz-form-item class="row" style="margin-bottom: 16px">
-            <nz-form-label
-              class="label"
-              [nzNoColon]="true"
-              [nzSm]="16"
-              [nzXs]="16"
-              nzRequired
-              >适用专业代码(六位)及名称</nz-form-label
-            >
-            <nz-form-control
-              class="val"
-              nzErrorTip="适用专业代码(六位)及名称"
-              style="width: 100%"
-            >
-              <nz-select
-                style="width: 80%"
-                nzShowSearch
-                nzAllowClear
-                nzPlaceHolder="填写 6 位专业代码选择"
-                formControlName="major"
-                (ngModelChange)="changeCode()"
-                (nzOnSearch)="getCode($event)"
-              >
+            <nz-form-label class="label" [nzNoColon]="true" [nzSm]="16" [nzXs]="16"
+              nzRequired>适用专业代码(六位)及名称</nz-form-label>
+            <nz-form-control class="val" nzErrorTip="适用专业代码(六位)及名称" style="width: 100%">
+              <nz-select style="width: 80%" nzShowSearch nzAllowClear nzPlaceHolder="填写 6 位专业代码选择"
+                formControlName="major" (ngModelChange)="changeCode()" (nzOnSearch)="getCode($event)">
                 @for(major of selectList; track major.code;let index = $index){
-                <nz-option
-                  nzCustomContent
-                  [nzValue]="major.code"
-                  [nzLabel]="major.name"
-                  >{{ major.name }}</nz-option
-                >
+                <nz-option nzCustomContent [nzValue]="major.code" [nzLabel]="major.name">{{ major.name }}</nz-option>
                 }
               </nz-select>
             </nz-form-control>
           </nz-form-item>
           <nz-form-item class="row" style="margin-bottom: 16px">
-            <nz-form-label
-              class="label"
-              [nzNoColon]="true"
-              [nzSm]="8"
-              [nzXs]="8"
-              nzRequired
-              >课程学时</nz-form-label
-            >
-            <nz-form-control
-              class="val"
-              nzErrorTip="请填写课程学时"
-              style="width: 100%"
-            >
-              <nz-input-group
-                style="width: 80%"
-                [nzSuffix]="suffixTemplateInfo"
-              >
-                <input
-                  type="number"
-                  formControlName="period"
-                  nz-input
-                  placeholder="填写学时数"
-                />
+            <nz-form-label class="label" [nzNoColon]="true" [nzSm]="8" [nzXs]="8" nzRequired>课程学时</nz-form-label>
+            <nz-form-control class="val" nzErrorTip="请填写课程学时" style="width: 100%">
+              <nz-input-group style="width: 80%" [nzSuffix]="suffixTemplateInfo">
+                <input type="number" formControlName="period" nz-input placeholder="填写学时数" />
               </nz-input-group>
               <ng-template #suffixTemplateInfo> 学时 </ng-template>
             </nz-form-control>
@@ -73,45 +27,15 @@
         </div>
         <div nz-col nzSpan="12">
           <nz-form-item class="row" style="margin-bottom: 16px">
-            <nz-form-label
-              class="label"
-              [nzNoColon]="true"
-              [nzSm]="6"
-              [nzXs]="6"
-              nzRequired
-              >适用课程</nz-form-label
-            >
-            <nz-form-control
-              class="val"
-              nzErrorTip="请填写适用课程"
-              style="width: 100%"
-            >
-              <input
-                type="text"
-                formControlName="lessons"
-                nz-input
-                placeholder="填写适用课程名称,多门课程名称使用“;”分隔"
-              />
+            <nz-form-label class="label" [nzNoColon]="true" [nzSm]="6" [nzXs]="6" nzRequired>适用课程</nz-form-label>
+            <nz-form-control class="val" nzErrorTip="请填写适用课程" style="width: 100%">
+              <input type="text" formControlName="lessons" nz-input placeholder="填写适用课程名称,多门课程名称使用“;”分隔" />
             </nz-form-control>
           </nz-form-item>
           <nz-form-item class="row" style="margin-bottom: 16px">
-            <nz-form-label
-              class="label"
-              [nzNoColon]="true"
-              [nzSm]="6"
-              [nzXs]="6"
-              nzRequired
-              >适用课程性质</nz-form-label
-            >
-            <nz-form-control
-              class="val"
-              nzErrorTip="请填写适用课程性质"
-              style="width: 100%"
-            >
-              <nz-checkbox-group
-                [(ngModel)]="checkOptionsOne"
-                formControlName="characteristic"
-              ></nz-checkbox-group>
+            <nz-form-label class="label" [nzNoColon]="true" [nzSm]="6" [nzXs]="6" nzRequired>适用课程性质</nz-form-label>
+            <nz-form-control class="val" nzErrorTip="请填写适用课程性质" style="width: 100%">
+              <nz-checkbox-group [(ngModel)]="checkOptionsOne" formControlName="characteristic"></nz-checkbox-group>
             </nz-form-control>
           </nz-form-item>
         </div>
@@ -119,22 +43,12 @@
     </div>
     <div class="author-content">
       <div class="nav">作者信息</div>
-      <nz-form-label
-        class="title"
-        [nzNoColon]="true"
-        [nzSm]="24"
-        [nzXs]="24"
-        nzRequired
-      >
+      <nz-form-label class="title" [nzNoColon]="true" [nzSm]="24" [nzXs]="24" nzRequired>
         <span style="font-size: 16px">
           作者(含主编,不超过 6 人,教材中明确出现姓名)
         </span>
       </nz-form-label>
-      <nz-table
-        #basicTable
-        [nzData]="authorList"
-        [nzScroll]="{ x: (maxWidth || '1200') + 'px' }"
-      >
+      <nz-table #basicTable [nzData]="authorList" [nzScroll]="{ x: (maxWidth || '1200') + 'px' }">
         <thead>
           <tr>
             <th nzWidth="80px" nzLeft nzAlign="right">序号</th>
@@ -144,9 +58,17 @@
             <th nzWidth="160px">国籍</th>
             <th nzWidth="160px">职务</th>
             <th nzWidth="160px">职称</th>
-            <th nzWidth="160px">手机号码</th>
+            <th nzWidth="300px">手机号码</th>
             <th nzWidth="160px">电子邮箱</th>
             <th nzWidth="160px">分工</th>
+            <th nzWidth="100px" nzRight>
+              作者诚信承诺签名
+              <span style="color: red;">*</span>
+            </th>
+            <th nzWidth="100px" nzRight>
+              作者政治审查表
+              <span style="color: red;">*</span>
+            </th>
             <th nzWidth="100px" nzRight>操作</th>
           </tr>
         </thead>
@@ -155,158 +77,95 @@
           <tr>
             <td nzLeft nzAlign="right">{{ index + 1 }}</td>
             <td nzLeft>
-              <input
-                nz-input
-                placeholder="请输入作者姓名"
-                [ngModelOptions]="{ standalone: true }"
-                [(ngModel)]="data.name"
-                nzStatus=""
-              />
+              <input nz-input placeholder="请输入作者姓名" [ngModelOptions]="{ standalone: true }" [(ngModel)]="data.name"
+                nzStatus="" />
             </td>
             <td>
-              <input
-                nz-input
-                placeholder="请输入作者单位"
-                [ngModelOptions]="{ standalone: true }"
-                [(ngModel)]="data.unit"
-                nzStatus=""
-              />
+              <input nz-input placeholder="请输入作者单位" [ngModelOptions]="{ standalone: true }" [(ngModel)]="data.unit"
+                nzStatus="" />
             </td>
             <td>
-              <nz-date-picker
-                nzMode="month"
-                [ngModelOptions]="{ standalone: true }"
-                [(ngModel)]="data.birth"
-              ></nz-date-picker>
+              <nz-date-picker nzMode="month" [ngModelOptions]="{ standalone: true }"
+                [(ngModel)]="data.birth"></nz-date-picker>
             </td>
             <td>
-              <input
-                nz-input
-                placeholder="请输入作者国籍"
-                [ngModelOptions]="{ standalone: true }"
-                [(ngModel)]="data.nationality"
-                nzStatus=""
-              />
+              <input nz-input placeholder="请输入作者国籍" [ngModelOptions]="{ standalone: true }"
+                [(ngModel)]="data.nationality" nzStatus="" />
             </td>
             <td>
-              <input
-                nz-input
-                placeholder="请输入作者职务"
-                [ngModelOptions]="{ standalone: true }"
-                [(ngModel)]="data.job"
-                nzStatus=""
-              />
+              <input nz-input placeholder="请输入作者职务" [ngModelOptions]="{ standalone: true }" [(ngModel)]="data.job"
+                nzStatus="" />
             </td>
             <td>
-              <input
-                nz-input
-                placeholder="请输入作者职称"
-                [ngModelOptions]="{ standalone: true }"
-                [(ngModel)]="data.title"
-                nzStatus=""
-              />
+              <input nz-input placeholder="请输入作者职称" [ngModelOptions]="{ standalone: true }" [(ngModel)]="data.title"
+                nzStatus="" />
             </td>
             <td>
-              <input
-                type="number"
-                nz-input
-                placeholder="请输入作者手机号码"
-                [ngModelOptions]="{ standalone: true }"
-                [(ngModel)]="data.mobile"
-                nzStatus=""
-              />
+              <nz-input-group nzCompact>
+                <nz-select style="width: 90px;" [ngModel]="'+86'">
+                  <nz-option [nzLabel]="'+0000'" [nzValue]="'+0000'"></nz-option>
+                  <nz-option [nzLabel]="'+86'" [nzValue]="'+86'"></nz-option>
+                </nz-select>
+                <input type="number" nz-input placeholder="请输入作者手机号码" [ngModelOptions]="{ standalone: true }"
+                [(ngModel)]="data.mobile" nzStatus="" style="width: 160px;"/>
+              </nz-input-group>
             </td>
             <td>
-              <input
-                nz-input
-                placeholder="请输入作者邮箱"
-                [ngModelOptions]="{ standalone: true }"
-                [(ngModel)]="data.email"
-                nzStatus=""
-              />
+              <input nz-input placeholder="请输入作者邮箱" [ngModelOptions]="{ standalone: true }" [(ngModel)]="data.email"
+                nzStatus="" />
             </td>
             <td>
-              <nz-select
-                style="width: 80%"
-                nzShowSearch
-                nzAllowClear
-                nzPlaceHolder="请选择分工"
-                [ngModelOptions]="{ standalone: true }"
-                [(ngModel)]="data.work"
-              >
+              <nz-select style="width: 80%" nzShowSearch nzAllowClear nzPlaceHolder="请选择分工"
+                [ngModelOptions]="{ standalone: true }" [(ngModel)]="data.work">
                 @for(work of workOptions; track work){
                 <nz-option nzCustomContent [nzValue]="work" [nzLabel]="work">{{
                   work
-                }}</nz-option>
+                  }}</nz-option>
                 }
               </nz-select>
             </td>
             <td nzRight>
-              <a (click)="onPush('authorList', index)"
-                ><span
-                  nz-icon
-                  style="font-size: 20px; margin-right: 10px"
-                  nzType="plus-circle"
-                  nzTheme="outline"
-                ></span
-              ></a>
-              <a (click)="onDel('authorList', index)"
-                ><span
-                  nz-icon
-                  style="font-size: 20px"
-                  nzType="delete"
-                  nzTheme="outline"
-                ></span
-              ></a>
+              未上传
+              <app-comp-upload [width]="320" (change)="upload($event, 'signature',index)"
+                title="上传"></app-comp-upload>
+            </td>
+            <td nzRight>
+              未上传
+              <app-comp-upload [width]="320" (change)="upload($event, 'examine',index)"
+                title="上传"></app-comp-upload>
+            </td>
+            <td nzRight>
+              <a (click)="onPush('authorList', index)"><span nz-icon style="font-size: 20px; margin-right: 10px"
+                  nzType="plus-circle" nzTheme="outline"></span></a>
+              <a (click)="onDel('authorList', index)"><span nz-icon style="font-size: 20px" nzType="delete"
+                  nzTheme="outline"></span></a>
             </td>
           </tr>
           }
         </tbody>
       </nz-table>
+      <p>输入诚信承诺:本人自愿参加此次申报,已认真填写并检查以上材料,保证内容真实。</p>
+      <input nz-input placeholder="请输入承诺内容" [ngModelOptions]="{ standalone: true }" [(ngModel)]="promise" />
     </div>
     <div class="author-content">
       <div class="nav">第一主编(作者)情况</div>
       <nz-form-item class="row" style="margin-bottom: 16px">
-        <nz-form-label
-          class="title"
-          [nzNoColon]="true"
-          [nzSm]="24"
-          [nzXs]="24"
-          nzRequired
-        >
+        <nz-form-label class="title" [nzNoColon]="true" [nzSm]="24" [nzXs]="24" nzRequired>
           <span style="font-size: 16px"> 相关教学经历 </span>
         </nz-form-label>
-        <nz-form-control
-          class="val"
-          nzErrorTip="请输入第一主编(作者)承担学校教学任务、开展教学研究情况、教材编写情况以及取得的教学成果"
-          style="width: 100%"
-        >
-          <textarea
-            rows="4"
-            formControlName="authorDetails"
-            placeholder="请输入第一主编(作者)承担学校教学任务、开展教学研究情况、教材编写情况以及取得的教学成果"
-            nz-input
-          ></textarea>
+        <nz-form-control class="val" nzErrorTip="请输入第一主编(作者)承担学校教学任务、开展教学研究情况、教材编写情况以及取得的教学成果" style="width: 100%">
+          <textarea rows="4" formControlName="authorDetails" placeholder="请输入第一主编(作者)承担学校教学任务、开展教学研究情况、教材编写情况以及取得的教学成果"
+            nz-input></textarea>
         </nz-form-control>
       </nz-form-item>
     </div>
     <div class="author-content">
-      <nz-form-label
-        class="title"
-        [nzNoColon]="true"
-        [nzSm]="24"
-        [nzXs]="24"
-        nzRequired
-      >
+      <nz-form-label class="title" [nzNoColon]="true" [nzSm]="24" [nzXs]="24" nzRequired>
         <span style="font-size: 16px">
           相关科学研究项目、成果或论文专著(限5项)
         </span>
       </nz-form-label>
-      <nz-table
-        #basicTable
-        [nzData]="achievementOptions"
-        [nzScroll]="{ x: (maxWidth || '1200') + 'px' }"
-      >
+      <nz-table #basicTable [nzData]="achievementOptions" [nzScroll]="{ x: (maxWidth || '1200') + 'px' }">
         <thead>
           <tr>
             <th nzWidth="80px" nzLeft nzAlign="right">序号</th>
@@ -322,47 +181,22 @@
           <tr>
             <td nzLeft nzAlign="right">{{ index + 1 }}</td>
             <td nzLeft>
-              <input
-                nz-input
-                placeholder="请输入项目/成果/论文名称"
-                [ngModelOptions]="{ standalone: true }"
-                [(ngModel)]="data.name"
-                nzStatus=""
-              />
+              <input nz-input placeholder="请输入项目/成果/论文名称" [ngModelOptions]="{ standalone: true }"
+                [(ngModel)]="data.name" nzStatus="" />
             </td>
             <td>
-              <input
-                nz-input
-                placeholder="请输入单位名称"
-                [ngModelOptions]="{ standalone: true }"
-                [(ngModel)]="data.unit"
-                nzStatus=""
-              />
+              <input nz-input placeholder="请输入单位名称" [ngModelOptions]="{ standalone: true }" [(ngModel)]="data.unit"
+                nzStatus="" />
             </td>
             <td>
-              <nz-date-picker
-                nzMode="month"
-                [ngModelOptions]="{ standalone: true }"
-                [(ngModel)]="data.date"
-              ></nz-date-picker>
+              <nz-date-picker nzMode="month" [ngModelOptions]="{ standalone: true }"
+                [(ngModel)]="data.date"></nz-date-picker>
             </td>
             <td nzRight>
-              <a (click)="onPush('achievementOptions', index)"
-                ><span
-                  nz-icon
-                  style="font-size: 20px; margin-right: 10px"
-                  nzType="plus-circle"
-                  nzTheme="outline"
-                ></span
-              ></a>
-              <a (click)="onDel('achievementOptions', index)"
-                ><span
-                  nz-icon
-                  style="font-size: 20px"
-                  nzType="delete"
-                  nzTheme="outline"
-                ></span
-              ></a>
+              <a (click)="onPush('achievementOptions', index)"><span nz-icon style="font-size: 20px; margin-right: 10px"
+                  nzType="plus-circle" nzTheme="outline"></span></a>
+              <a (click)="onDel('achievementOptions', index)"><span nz-icon style="font-size: 20px" nzType="delete"
+                  nzTheme="outline"></span></a>
             </td>
           </tr>
           }
@@ -370,30 +204,19 @@
       </nz-table>
     </div>
   </form>
+  <a>
+    <span nz-icon nzType="download" nzTheme="outline"></span>
+    下载本页所有附件模板
+  </a>
 </div>
 <div class="footer">
-  <button
-    nz-button
-    nzType="default"
-    style="margin-right: 20px"
-    (click)="submitForm('save')"
-  >
+  <button nz-button nzType="default" style="margin-right: 20px" (click)="submitForm('save')">
     保存本页
   </button>
-  <button
-    nz-button
-    nzType="default"
-    style="margin-right: 20px"
-    (click)="submitForm('pre')"
-  >
+  <button nz-button nzType="default" style="margin-right: 20px" (click)="submitForm('pre')">
     上一页
   </button>
-  <button
-    nz-button
-    nzType="primary"
-    style="background: #3e49b3; border: 1px #3e49b3"
-    (click)="submitForm('next')"
-  >
+  <button nz-button nzType="primary" style="background: #3e49b3; border: 1px #3e49b3" (click)="submitForm('next')">
     下一页
   </button>
-</div>
+</div>

+ 48 - 8
projects/textbook/src/modules/nav-author/components/textbook-pertain/textbook-pertain.component.ts

@@ -16,6 +16,7 @@ import {
   Validators,
 } from '@angular/forms';
 import { textbookServer } from '../../../../services/textbook';
+import { CompUploadComponent } from '../../../../app/comp-upload/comp-upload.component';
 interface author {
   name: string;
   unit: string;
@@ -26,6 +27,8 @@ interface author {
   mobile: string;
   email: string;
   work: string;
+  signature:string;
+  examine:string;
 }
 interface achievementType {
   name: string;
@@ -42,6 +45,7 @@ interface achievementType {
     NzGridModule,
     NzCheckboxModule,
     NzTableModule,
+    CompUploadComponent,
   ],
   standalone: true,
   templateUrl: './textbook-pertain.component.html',
@@ -116,6 +120,8 @@ export class TextbookPertainComponent implements OnInit {
       mobile: '',
       email: '',
       work: '',
+      signature:'',
+      examine:'',
     },
   ];
   //相关科学研究项目、成果或论文专著(限5项)
@@ -127,6 +133,8 @@ export class TextbookPertainComponent implements OnInit {
     },
   ];
   workOptions = ['主编', '作者', '副主编', '写者'];
+  /**诚信承诺 */
+  promise:string=''
   constructor(
     public tbookSer: textbookServer,
     private fb: NonNullableFormBuilder,
@@ -136,6 +144,7 @@ export class TextbookPertainComponent implements OnInit {
 
   ngOnInit() {
     console.log(this.eduTextbook);
+
     if (this.eduTextbook.id) {
       this.checkOptionsOne =
         this.eduTextbook.get('characteristic') || this.checkOptionsOne;
@@ -157,10 +166,15 @@ export class TextbookPertainComponent implements OnInit {
         ],
       });
       this.authorList = this.eduTextbook.get('authorList') || this.authorList
+      console.log(this.authorList)
       this.achievementOptions = this.eduTextbook.get('achievementOptions') || this.achievementOptions
     }
   }
   async submitForm(event?: string): Promise<void> {
+    // if(this.promise!='本人自愿参加此次申报,已认真填写并检查以上材料,保证内容真实。'){
+    //   this.msg.warning('请输入承诺内容')
+    //   return
+    // }
     if (event == 'pre') {
       this.state.emit({ type: 'pre' });
       return
@@ -194,13 +208,25 @@ export class TextbookPertainComponent implements OnInit {
         });
         return;
       }
-      Object.values(this.validateForm.controls).forEach((control) => {
-        if (control.invalid) {
-          control.markAsDirty();
-          control.updateValueAndValidity({ onlySelf: true });
-        }
-      });
-      this.msg.warning('请填写完整信息');
+      if (event == 'next') {
+        // if(!authorListVrifly){
+        //   this.msg.warning('作者信息填写不完整')
+        //   return
+        // }else if(!achievementOptionsVrifly){
+        //   this.msg.warning('相关科学研究项目、成果或论文专著填写不完整')
+        //   return
+        // }
+      let params: any = this.validateForm.value;
+      await this.saveEduTextbook(params, true);
+        this.state.emit({ type: 'next', textBook: this.eduTextbook });
+      }
+      // Object.values(this.validateForm.controls).forEach((control) => {
+      //   if (control.invalid) {
+      //     control.markAsDirty();
+      //     control.updateValueAndValidity({ onlySelf: true });
+      //   }
+      // });
+      // this.msg.warning('请填写完整信息');
     }
     if (event == 'save') {
       let params = this.validateForm.value;
@@ -214,11 +240,21 @@ export class TextbookPertainComponent implements OnInit {
   }
   changeCode() {}
   getCode(e: any) {}
-
+  upload(e: any, type:string,index:number) {
+    console.log(e);
+    let file = e[0];
+    if(type == 'signature' || type == 'examine' ){
+      this.authorList[index][type] = file
+    }
+  }
   //添加作者信息
   onPush(type: string, idx: number) {
     switch (type) {
       case 'authorList':
+        if(this.authorList?.length>=6){
+          this.msg.warning('最多添加6条');
+          break;
+        }
         this.authorList.splice(idx + 1, 0, {
           name: '',
           unit: '',
@@ -229,6 +265,8 @@ export class TextbookPertainComponent implements OnInit {
           mobile: '',
           email: '',
           work: '',
+          signature:'',
+          examine:'',
         });
         break;
       case 'achievementOptions':
@@ -260,6 +298,8 @@ export class TextbookPertainComponent implements OnInit {
               mobile: '',
               email: '',
               work: '',
+              signature:'',
+              examine:'',
             },
           ];
           return;

+ 30 - 28
projects/textbook/src/services/languages.map.ts

@@ -2,33 +2,35 @@ export const languages = {
   options:[
     { lang: 'zh', name: '中文' },
     { lang: 'en', name: '英语' },
-    { lang: 'es', name: '西班牙语' },
-    { lang: 'fr', name: '法语' },
-    { lang: 'de', name: '德语' },
-    { lang: 'ru', name: '俄语' },
-    { lang: 'ja', name: '日语' },
-    { lang: 'ko', name: '韩语' },
-    { lang: 'ar', name: '阿拉伯语' },
-    { lang: 'pt', name: '葡萄牙语' },
-    { lang: 'it', name: '意大利语' },
-    { lang: 'nl', name: '荷兰语' },
-    { lang: 'pl', name: '波兰语' },
-    { lang: 'sv', name: '瑞典语' },
-    { lang: 'da', name: '丹麦语' },
-    { lang: 'no', name: '挪威语' },
-    { lang: 'fi', name: '芬兰语' },
-    { lang: 'el', name: '希腊语' },
-    { lang: 'tr', name: '土耳其语' },
-    { lang: 'hu', name: '匈牙利语' },
-    { lang: 'cs', name: '捷克语' },
-    { lang: 'ro', name: '罗马尼亚语' },
-    { lang: 'sk', name: '斯洛伐克语' },
-    { lang: 'bg', name: '保加利亚语' },
-    { lang: 'hr', name: '克罗地亚语' },
-    { lang: 'sr', name: '塞尔维亚语' },
-    { lang: 'sl', name: '斯洛文尼亚语' },
-    { lang: 'et', name: '爱沙尼亚语' },
-    { lang: 'lv', name: '拉脱维亚语' },
-    { lang: 'lt', name: '立陶宛语' },
+    { lang: 'or', name: '其他外国语' },
+    { lang: 'min', name: '中国少数名族语言' },
+    // { lang: 'es', name: '西班牙语' },
+    // { lang: 'fr', name: '法语' },
+    // { lang: 'de', name: '德语' },
+    // { lang: 'ru', name: '俄语' },
+    // { lang: 'ja', name: '日语' },
+    // { lang: 'ko', name: '韩语' },
+    // { lang: 'ar', name: '阿拉伯语' },
+    // { lang: 'pt', name: '葡萄牙语' },
+    // { lang: 'it', name: '意大利语' },
+    // { lang: 'nl', name: '荷兰语' },
+    // { lang: 'pl', name: '波兰语' },
+    // { lang: 'sv', name: '瑞典语' },
+    // { lang: 'da', name: '丹麦语' },
+    // { lang: 'no', name: '挪威语' },
+    // { lang: 'fi', name: '芬兰语' },
+    // { lang: 'el', name: '希腊语' },
+    // { lang: 'tr', name: '土耳其语' },
+    // { lang: 'hu', name: '匈牙利语' },
+    // { lang: 'cs', name: '捷克语' },
+    // { lang: 'ro', name: '罗马尼亚语' },
+    // { lang: 'sk', name: '斯洛伐克语' },
+    // { lang: 'bg', name: '保加利亚语' },
+    // { lang: 'hr', name: '克罗地亚语' },
+    // { lang: 'sr', name: '塞尔维亚语' },
+    // { lang: 'sl', name: '斯洛文尼亚语' },
+    // { lang: 'et', name: '爱沙尼亚语' },
+    // { lang: 'lv', name: '拉脱维亚语' },
+    // { lang: 'lt', name: '立陶宛语' },
   ]
 }

+ 1 - 0
server/cloud/authing/test/test-authing-org-sync.js

@@ -12,4 +12,5 @@ main()
 /**
  * Cloud Code test
  curl -X POST -H "Content-Type: application/json" -H 'X-Parse-Application-Id: edu-textbook' http://8.140.98.43/parse/functions/authingDepartSync
+ curl -X POST -H "Content-Type: application/json" -H 'X-Parse-Application-Id: edu-textbook' http://127.0.0.1:61337/parse/functions/authingDepartSync
  */

+ 13 - 2
server/cloud/authing/trigger-user-save.js

@@ -10,28 +10,39 @@ const managementClient  = new ManagementClient({
 /**
  * 用户创建前,创建用户至Authing
  * @desc 仅同步注册信息及密码,资料在afterSave中同步
+ * @example
+ * 注册:
+ curl -X POST -H "Content-Type: application/json" -H "X-Parse-Application-Id: edu-textbook" -d '{
+  "username": "333",
+  "password": "333"
+ }' http://127.0.0.1:61337/parse/users
+ * 删除:
  */
 export function defineUserBeforeSave(){
     Parse.Cloud.beforeSave("_User", async (request) => {
+        // console.log("UserBeforeSave")
         request.object = appendUserACL(request.object)
         let user = request.object;
         // 仅首次注册/创建用户/修改密码有password属性,同步Authing账号
         let password = user?.get("password");
+        // console.log(password)
         if(password){
             let mobile = user?.get("mobile");
             let email = user?.get("email");
             let username = user?.get("username");
             let externalId = user?.id;
             let authingUserExists = await findUserByMobileEmailUserName(user)
+            // console.log(authingUserExists)
             if(authingUserExists?.statusCode==404){ // 创建用户
                 let newuser = {
                     status:"Activated",
+                    password:password,
                 }
                 if(mobile){newuser.phone = mobile}
                 if(email){newuser.email = email}
                 if(username){newuser.username = username}
                 if(externalId){newuser.externalId = externalId}
-
+                // console.log(newuser)
                 result = await managementClient.createUser(newuser)
             }
             if(authingUserExists?.statusCode==200){
@@ -72,7 +83,7 @@ function appendUserACL(user){
 /**
  * 用户删除前,删除用户从Authing
  */
- export function defineUserBeforeDelete(){
+ export function defineUserAfterDelete(){
     Parse.Cloud.afterDelete("_User", async (request) => {
         let user = request.object;
         // console.log(user.toJSON());

+ 10 - 2
server/db/schemas/EduTextbook.js

@@ -76,8 +76,12 @@ export const EduTextbook = {
             "type": "String",
             "required": false
         },
-        "approval": {
-            "type": "Boolean",
+        // "approval": {//是否为重点立项教材
+        //     "type": "Boolean",
+        //     "required": false
+        // },
+        "approval": {//是否为重点立项教材
+            "type": "String",
             "required": false
         },
         "edition": {
@@ -208,6 +212,10 @@ export const EduTextbook = {
             "type": "String",
             "required": false
         },
+        "approvedImgUrl":{//重点立项教材获批截图            
+            "type":'String',
+            "required": false
+        },
         "eduProcess": {//所属流程
             "type": "Pointer",
             "targetClass":"EduProcess",

+ 2 - 2
server/server.js

@@ -44,7 +44,7 @@ global.config["LOCAL"] = argv.local || process.env["LOCAL"] || appConfig["LOCAL"
 
 import  {textbookRouter} from "./api/textbook/routes";
 import { defineAliOssSTS } from "./cloud/aliyun"
-import { defineAuthingLogin, defineUserBeforeDelete, defineUserBeforeSave } from "./cloud/authing"
+import { defineAuthingLogin, defineUserAfterDelete, defineUserBeforeSave } from "./cloud/authing"
 import { defineAuthingDepartSync } from "./cloud/authing"
 import { defineUserAfterSave } from "./cloud/authing"
 import { defineTbookISBN } from "./cloud/tbook"
@@ -184,7 +184,7 @@ async function initParseAndDatabase(){
       defineAliOssSTS();
       defineUserAfterSave();
       defineUserBeforeSave();
-      defineUserBeforeDelete();
+      defineUserAfterDelete();
       defineTbookISBN();
     });