浏览代码

教材创建-其他作者意见

cehn 8 月之前
父节点
当前提交
ad2f2ae43d

+ 14 - 0
projects/textbook/src/modules/nav-author/components/create/author-file/author-file.component.html

@@ -106,3 +106,17 @@
     }
   </tbody>
 </nz-table>
+<div class="val" style="width: 100%">
+  <div class="text">其他编者</div>
+  @if (otherEditor) {
+  <a style="color: #3e49b3;" (click)="openFile(otherEditor)">
+    <span nz-icon nzType="file" nzTheme="outline"></span>
+    其他编者政治审查意见
+  </a>
+  }
+  <app-comp-upload [type]="'pdf'" [width]="320" (change)="upload($event, 'otherEditor')"
+    title="上传文件"></app-comp-upload>
+  <div class="text upText">
+    支持上传PDF,大小不超过 2M
+  </div>
+</div>

+ 11 - 0
projects/textbook/src/modules/nav-author/components/create/author-file/author-file.component.scss

@@ -0,0 +1,11 @@
+.text{
+  font-family: PingFang SC;
+  font-size: 14px;
+  font-weight: 400;
+  line-height: 22px;
+  text-align: left;
+  margin: 10px 0;
+}
+.upText{
+  color: gray;
+}

+ 9 - 3
projects/textbook/src/modules/nav-author/components/create/author-file/author-file.component.ts

@@ -30,7 +30,7 @@ interface author {
   work: string;
   signature?: string;
   examine?: string;
-  otherEditor?:string
+  // otherEditor?:string
 }
 @Component({
   selector: 'app-author-file',
@@ -69,9 +69,11 @@ export class AuthorFileComponent implements OnInit {
       work: '',
       signature: '',
       examine: '',
-      otherEditor:''
+      // otherEditor:''
     },
   ];
+  otherEditor?:string //其他作者附件
+
   constructor(
     private msg: NzMessageService
   ) {}
@@ -88,11 +90,14 @@ export class AuthorFileComponent implements OnInit {
     this.eduTextbookVolume = r;
     this.authorList =
       this.eduTextbookVolume.get('authorList') || this.authorList;
+    this.otherEditor = this.eduTextbookVolume.get('otherEditor')
   }
   upload(e: any, type: string, index?: any) {
     let file = e[e?.length - 1 || 0];
-    if (type == 'signature' || type == 'examine' || type == 'otherEditor') {
+    if (type == 'signature' || type == 'examine') {
       this.authorList[index][type] = file?.url;
+    }else if(type == 'otherEditor'){
+      this.otherEditor = file?.url;
     }
     console.log(this.authorList);
   }
@@ -101,6 +106,7 @@ export class AuthorFileComponent implements OnInit {
       Object.keys(item).some((key) => key != 'otherEditor' && (item[key] == '' || item[key] == undefined))
     );
     this.eduTextbookVolume?.set('authorList', this.authorList);
+    this.otherEditor && this.eduTextbookVolume?.set('otherEditor', this.otherEditor);
     await this.eduTextbookVolume?.save();
     return coursesVrifly;
   }

+ 1 - 0
projects/textbook/src/modules/nav-province-contact/activity/review-edit/review-edit.component.html

@@ -120,6 +120,7 @@
               <label
                 nz-checkbox
                 [ngModel]="this.setOfCheckedProfileAll.has(item.id)"
+                (ngModelChange)="updateAllChecked(item)"
                 >{{
                   item?.get("user")?.get("name") ||
                     item?.get("user")?.get("username")

+ 3 - 3
projects/textbook/src/modules/nav-province-contact/components/review-details/review-details.component.ts

@@ -214,8 +214,8 @@ export class ReviewDetailsComponent implements OnInit {
           <tr>
             <th>序号</th>
             <th>申报教材名称</th>
-            <th>所属评审组</th>
-            ${this.filterObj.showGroup ? '<th>评审专家</th>' : ''}
+            ${this.filterObj.showGroup ? '<th>所属评审组</th>' : ''}
+            <th>评审专家</th>
             <th>提交时间</th>
             <th>分值</th>
           </tr>
@@ -263,7 +263,7 @@ export class ReviewDetailsComponent implements OnInit {
       table += _body;
       table += '</tbody>';
       table += '</table>';
-      let title = '评审详情表';
+      let title = '评审明细表';
       this.excel(table, `${title}.xls`);
       this.showLoading = false;
     } catch (err) {

+ 4 - 3
projects/textbook/src/modules/nav-review/approve/approve.component.html

@@ -2,8 +2,8 @@
   <!--title-->
   <nz-page-header-title
     >{{ activity?.get("name") || "暂无评审活动" }}
-    @if (activity?.id || !isStart) { @if (authCompute && eduProcess?.get('status') ==
-    '201'){
+    @if (activity?.id || !isStart) { @if (authCompute &&
+    eduProcess?.get('status') == '201'){
     <nz-tag style="margin-left: 10px" [nzColor]="'blue'"> 评审中</nz-tag>
     }@else if (isEnd) {
     <nz-tag style="margin-left: 10px" nzColor="default"> 已结束</nz-tag>
@@ -46,12 +46,13 @@
   [(nzVisible)]="mrakVisible"
   nzTitle="填写评审打分"
   (nzOnCancel)="handleCancel()"
-  nzWidth="460px"
+  [nzWidth]="srcUrl ? '680px' : '400px'"
   nzCentered
 >
   <ng-container *nzModalContent>
     <div nz-row class="modal">
       @if (srcUrl) {
+      <div class="download" (click)="openUrl()">点击在新窗口打开评审规则附件</div>
       <div class="proview-pdf">
         <iframe [src]="srcUrl" frameborder="0"></iframe>
       </div>

+ 14 - 7
projects/textbook/src/modules/nav-review/approve/approve.component.scss

@@ -39,12 +39,19 @@
   justify-content: center;
   background: rgb(0 0 0 / 30%);
 }
-.proview-pdf{
-  width: 100%;
-  margin: 10px auto;
-  height: 300px;
-  iframe{
-    height: 100%;
+.modal{
+  .proview-pdf{
     width: 100%;
+    margin: 10px auto;
+    height: 300px;
+    iframe{
+      height: 100%;
+      width: 100%;
+    }
   }
-}
+  .download{
+    color: #0054e9;
+    cursor: pointer;
+  }
+}
+

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

@@ -154,9 +154,24 @@ export class ApproveComponent implements OnInit {
     query.notEqualTo('isDeleted', true);
     query.equalTo('eduProcess', this.eduProcess?.id);
     this.activity = await query.first();
-    this.srcUrl = this.sanitizer.bypassSecurityTrustResourceUrl(
-      this.activity?.get('reviewDetails')?.url + '#toolbar=0'
-    );
+    let url = this.activity?.get('reviewDetails')?.url?.replaceAll('http://', 'https://');
+    console.log(url);
+    if(url){
+      this.srcUrl = this.sanitizer.bypassSecurityTrustResourceUrl(
+        url + '#toolbar=0'
+      );
+    }
+  }
+  openUrl(){
+    let url = this.activity?.get('reviewDetails')?.url?.replaceAll('http://', 'https://');
+    window.open(url)
+    
+    // const a = document.createElement('a'); // 创建一个&lt;a&gt;元素
+    // a.href = url; // 设置链接的href属性为要下载的文件的URL
+    // a.download = '报送流程'; // 设置下载文件的名称
+    // document.body.appendChild(a); // 将&lt;a&gt;元素添加到文档中
+    // a.click(); // 模拟点击&lt;a&gt;元素
+    // document.body.removeChild(a); // 下载后移除&lt;a&gt;元素
   }
   //切换tab
   async onSelectChange(e: number) {
@@ -200,6 +215,7 @@ export class ApproveComponent implements OnInit {
     let query = new Parse.Query('EduReview');
     query.notEqualTo('isDeleted', true);
     query.equalTo('eduTextbook', e);
+    query.equalTo('profile',this.tbookSer.profile?.objectId)
     this.eduReview = await query.first();
     if (!this.eduReview?.id) {
       let obj = Parse.Object.extend('EduReview');