Browse Source

自考管理端-前端

haogh 2 months ago
parent
commit
d88ac6ff50
89 changed files with 10617 additions and 244 deletions
  1. 2 2
      src/app/routes/frame/optr-password/optr-password.component.html
  2. 2 2
      src/app/routes/frame/optr-password/optr-password.component.ts
  3. 2 2
      src/app/routes/frame/optrtree/optrtree.component.html
  4. 2 2
      src/app/routes/frame/optrtree/optrtree.component.ts
  5. 19 7
      src/app/routes/hm-soft/by/audit/final-audit-a/final-audit-a.component.html
  6. 46 0
      src/app/routes/hm-soft/by/audit/final-audit-a/final-audit-a.component.scss
  7. 18 5
      src/app/routes/hm-soft/by/audit/final-audit-b/final-audit-b.component.html
  8. 46 0
      src/app/routes/hm-soft/by/audit/final-audit-b/final-audit-b.component.scss
  9. 1276 0
      src/app/routes/hm-soft/by/audit/school-audit/query-by-score.component.html
  10. 106 0
      src/app/routes/hm-soft/by/audit/school-audit/query-by-score.component.scss
  11. 298 0
      src/app/routes/hm-soft/by/audit/school-audit/query-by-score.component.ts
  12. 22 0
      src/app/routes/hm-soft/by/audit/school-audit/query-by-score.module.ts
  13. 9 3
      src/app/routes/hm-soft/by/audit/school-audit/school-audit.component.html
  14. 46 0
      src/app/routes/hm-soft/by/audit/school-audit/school-audit.component.scss
  15. 16 9
      src/app/routes/hm-soft/by/audit/social-audit/social-audit.component.html
  16. 46 0
      src/app/routes/hm-soft/by/audit/social-audit/social-audit.component.scss
  17. 1 0
      src/app/routes/hm-soft/by/by-files-pdf-viewer/by-files-pdf-viewer-modal.ts
  18. 3 0
      src/app/routes/hm-soft/by/by.module.ts
  19. 426 0
      src/app/routes/hm-soft/by/replace/by-course-repl-detail-pre/by-course-repl-detail-pre.component.html
  20. 0 0
      src/app/routes/hm-soft/by/replace/by-course-repl-detail-pre/by-course-repl-detail-pre.component.scss
  21. 25 0
      src/app/routes/hm-soft/by/replace/by-course-repl-detail-pre/by-course-repl-detail-pre.component.spec.ts
  22. 312 0
      src/app/routes/hm-soft/by/replace/by-course-repl-detail-pre/by-course-repl-detail-pre.component.ts
  23. 22 0
      src/app/routes/hm-soft/by/replace/by-course-repl-detail-pre/by-course-repl-detail-pre.module.ts
  24. 20 8
      src/app/routes/hm-soft/by/statistic/by-name-list/by-name-list.component.html
  25. 12 4
      src/app/routes/hm-soft/by/statistic/by-name-list/by-name-list.component.ts
  26. 2 2
      src/app/routes/hm-soft/cf/cf-operate-time/cf-operate-time.component.ts
  27. 2 1
      src/app/routes/hm-soft/common/modal/stdRegInfo/flex-std-reg-info.ts
  28. 60 2
      src/app/routes/hm-soft/mk/cert_edu_apply/cert_edu_apply.component.local.html
  29. 35 0
      src/app/routes/hm-soft/mk/cert_edu_apply/cert_edu_apply.component.local.ts
  30. 59 2
      src/app/routes/hm-soft/mk/cert_edu_apply/cert_edu_apply.component.prov.html
  31. 37 0
      src/app/routes/hm-soft/mk/cert_edu_apply/cert_edu_apply.component.prov.ts
  32. 65 3
      src/app/routes/hm-soft/mk/cert_nedu_apply/cert_nedu_apply.component.local.html
  33. 42 0
      src/app/routes/hm-soft/mk/cert_nedu_apply/cert_nedu_apply.component.local.ts
  34. 64 3
      src/app/routes/hm-soft/mk/cert_nedu_apply/cert_nedu_apply.component.prov.html
  35. 43 0
      src/app/routes/hm-soft/mk/cert_nedu_apply/cert_nedu_apply.component.prov.ts
  36. 900 0
      src/app/routes/hm-soft/pl/pl-course-pre/pl-course-pre.component.html
  37. 0 0
      src/app/routes/hm-soft/pl/pl-course-pre/pl-course-pre.component.scss
  38. 25 0
      src/app/routes/hm-soft/pl/pl-course-pre/pl-course-pre.component.spec.ts
  39. 347 0
      src/app/routes/hm-soft/pl/pl-course-pre/pl-course-pre.component.ts
  40. 22 0
      src/app/routes/hm-soft/pl/pl-course-pre/pl-course-pre.module.ts
  41. 641 0
      src/app/routes/hm-soft/pl/pl-major-apply-pro-query/majorapplyproquery.component.html
  42. 106 0
      src/app/routes/hm-soft/pl/pl-major-apply-pro-query/majorapplyproquery.component.scss
  43. 504 0
      src/app/routes/hm-soft/pl/pl-major-apply-pro-query/majorapplyproquery.component.ts
  44. 22 0
      src/app/routes/hm-soft/pl/pl-major-apply-pro-query/majorapplyproquery.module.ts
  45. 639 0
      src/app/routes/hm-soft/pl/pl-major-apply-pro/majorapplypro.component.html
  46. 106 0
      src/app/routes/hm-soft/pl/pl-major-apply-pro/majorapplypro.component.scss
  47. 504 0
      src/app/routes/hm-soft/pl/pl-major-apply-pro/majorapplypro.component.ts
  48. 22 0
      src/app/routes/hm-soft/pl/pl-major-apply-pro/majorapplypro.module.ts
  49. 1 1
      src/app/routes/hm-soft/pl/pl-major-apply/majorapply.component.html
  50. 549 0
      src/app/routes/hm-soft/pl/pl-major-course-pre/pl-major-course-pre.component.html
  51. 0 0
      src/app/routes/hm-soft/pl/pl-major-course-pre/pl-major-course-pre.component.scss
  52. 25 0
      src/app/routes/hm-soft/pl/pl-major-course-pre/pl-major-course-pre.component.spec.ts
  53. 305 0
      src/app/routes/hm-soft/pl/pl-major-course-pre/pl-major-course-pre.component.ts
  54. 22 0
      src/app/routes/hm-soft/pl/pl-major-course-pre/pl-major-course-pre.module.ts
  55. 28 0
      src/app/routes/hm-soft/pl/pl-major-course/pl-major-course.component.html
  56. 25 2
      src/app/routes/hm-soft/pl/pl-major-course/pl-major-course.component.ts
  57. 481 0
      src/app/routes/hm-soft/pl/pl-major-pre/pl-major-pre.component.html
  58. 0 0
      src/app/routes/hm-soft/pl/pl-major-pre/pl-major-pre.component.scss
  59. 25 0
      src/app/routes/hm-soft/pl/pl-major-pre/pl-major-pre.component.spec.ts
  60. 203 0
      src/app/routes/hm-soft/pl/pl-major-pre/pl-major-pre.component.ts
  61. 22 0
      src/app/routes/hm-soft/pl/pl-major-pre/pl-major-pre.module.ts
  62. 93 5
      src/app/routes/hm-soft/pl/pl-major-query/pl-major.component.query.html
  63. 48 3
      src/app/routes/hm-soft/pl/pl-major-query/pl-major.component.query.ts
  64. 84 4
      src/app/routes/hm-soft/pl/pl-major/pl-major.component.html
  65. 44 2
      src/app/routes/hm-soft/pl/pl-major/pl-major.component.ts
  66. 7 5
      src/app/routes/hm-soft/pl/pl-std-record/junior-std-record-audith/junior-std-record-audith.component.html
  67. 22 3
      src/app/routes/hm-soft/pl/pl-std-record/junior-std-record-audith/junior-std-record-audith.component.ts
  68. 4 4
      src/app/routes/hm-soft/pl/pl-std-record/pl-junior-std-record/pl-junior-std-record.component.html
  69. 16 5
      src/app/routes/hm-soft/pl/pl-std-record/pl-junior-std-record/pl-junior-std-record.component.ts
  70. 489 0
      src/app/routes/hm-soft/pl/pl-textbook-pre/pl-textbook-pre.component.html
  71. 0 0
      src/app/routes/hm-soft/pl/pl-textbook-pre/pl-textbook-pre.component.scss
  72. 317 0
      src/app/routes/hm-soft/pl/pl-textbook-pre/pl-textbook-pre.component.ts
  73. 22 0
      src/app/routes/hm-soft/pl/pl-textbook-pre/pl-textbook-pre.module.ts
  74. 155 78
      src/app/routes/hm-soft/pl/pl-textbook/pl-textbook.component.html
  75. 113 59
      src/app/routes/hm-soft/pl/pl-textbook/pl-textbook.component.ts
  76. 12 0
      src/app/routes/hm-soft/pl/pl.module.ts
  77. 22 1
      src/app/routes/hm-soft/std/std-break-discipline/std-break-discipline.add.component.html
  78. 37 3
      src/app/routes/hm-soft/std/std-break-discipline/std-break-discipline.add.component.ts
  79. 8 0
      src/app/routes/hm-soft/std/std-break-discipline/std-break-discipline.audit.component.html
  80. 7 0
      src/app/routes/hm-soft/std/std-break-discipline/std-break-discipline.audit.component.ts
  81. 254 2
      src/app/routes/hm-soft/std/std-break-discipline/std-break-discipline.provinceadd.component.html
  82. 83 2
      src/app/routes/hm-soft/std/std-break-discipline/std-break-discipline.provinceadd.component.ts
  83. 5 0
      src/app/routes/hm-soft/std/std_ticket/std_ticket.component.html
  84. 39 0
      src/app/routes/hm-soft/std/std_ticket/std_ticket.component.ts
  85. 16 1
      src/app/routes/hm-soft/sys/sys-app-news/sys-app-news.component.html
  86. 3 1
      src/app/routes/hm-soft/sys/sys-app-news/sys-app-news.component.ts
  87. 4 3
      src/app/routes/home/home/home.component.html
  88. 3 3
      src/app/routes/home/home/home.component.ts
  89. BIN
      src/assets/img/top.png

+ 2 - 2
src/app/routes/frame/optr-password/optr-password.component.html

@@ -30,7 +30,7 @@
                     <div class="row mb-1">
                       <label class="col-lg-3 col-form-label text-lg-right required">新密码:</label>
                       <div class="col-lg-9">
-                        <input class="form-control" type="password" formControlName="new_password" [formControl]="formModel.get('new_password')" placeholder="密码中必须包含字母、数字、特殊字符至少8个字符!"
+                        <input class="form-control" type="password" formControlName="new_password" [formControl]="formModel.get('new_password')" placeholder="密码中必须包含字母、数字、特殊字符至少10个字符!"
                           [(ngModel)]="item.new_password" />
  
                         <span class="text-danger" *ngIf="formModel.get('new_password').hasError('required') && (formModel.get('new_password').dirty || formModel.get('new_password').touched)">请输入新密码</span>
@@ -40,7 +40,7 @@
                     <div class="row mb-1">
                         <label class="col-lg-3 col-form-label text-lg-right required">新密码确定:</label>
                         <div class="col-lg-9">
-                            <input class="form-control" type="password" formControlName="new_password_confirm" [formControl]="formModel.get('new_password_confirm')" placeholder="密码中必须包含字母、数字、特殊字符至少8个字符!"
+                            <input class="form-control" type="password" formControlName="new_password_confirm" [formControl]="formModel.get('new_password_confirm')" placeholder="密码中必须包含字母、数字、特殊字符至少10个字符!"
                             [(ngModel)]="item.new_password_confirm" />
                          
                           <span class="text-danger" *ngIf="formModel.get('new_password_confirm').hasError('required') && (formModel.get('new_password_confirm').dirty || formModel.get('new_password_confirm').touched)">请输入新密码</span>

+ 2 - 2
src/app/routes/frame/optr-password/optr-password.component.ts

@@ -45,9 +45,9 @@ export class OptrPasswordComponent extends FlexTableComponent implements OnInit
       AppComponent.alert({ 'title': '提示', 'text': '两次密码不一致,请重新输入!' });
       return;
     }
-    var regex = new RegExp('(?=.*[0-9])(?=.*[a-zA-Z])(?=.*[^a-zA-Z0-9]).{8,30}');
+    var regex = new RegExp('(?=.*[0-9])(?=.*[a-zA-Z])(?=.*[^a-zA-Z0-9]).{10,30}');
     if (!regex.test(this.item.new_password)) {
-      AppComponent.alert({ 'title': '提示', 'text': '密码中必须包含字母、数字、特殊字符至少8个字符!' });
+      AppComponent.alert({ 'title': '提示', 'text': '密码中必须包含字母、数字、特殊字符至少10个字符!' });
       return;
     }
      

+ 2 - 2
src/app/routes/frame/optrtree/optrtree.component.html

@@ -153,9 +153,9 @@
         <span class="text-danger"
           *ngIf="formModel.get('passwordGroup.login_pass').hasError('required') && (formModel.get('passwordGroup.login_pass').dirty || formModel.get('passwordGroup.login_pass').touched)">请输入操作员登录密码</span>
         <span class="text-danger"
-          *ngIf="formModel.get('passwordGroup.login_pass').hasError('rangewords') && (formModel.get('passwordGroup.login_pass').dirty || formModel.get('passwordGroup.login_pass').touched) ">登录密码最少需要6个字符,最大允许24个字符</span>
+          *ngIf="formModel.get('passwordGroup.login_pass').hasError('rangewords') && (formModel.get('passwordGroup.login_pass').dirty || formModel.get('passwordGroup.login_pass').touched) ">登录密码最少需要10个字符,最大允许24个字符</span>
         <span class="text-danger"
-        *ngIf="formModel.get('passwordGroup.login_pass').hasError('pattern') && (formModel.get('passwordGroup.login_pass').dirty ||formModel.get('passwordGroup.login_pass').touched)">登录密码需要包含字母、数字或者特殊字符,密码长度最少需要6个字符</span>
+        *ngIf="formModel.get('passwordGroup.login_pass').hasError('pattern') && (formModel.get('passwordGroup.login_pass').dirty ||formModel.get('passwordGroup.login_pass').touched)">登录密码需要包含字母、数字或者特殊字符,密码长度最少需要10个字符</span>
       
       </div>
 

+ 2 - 2
src/app/routes/frame/optrtree/optrtree.component.ts

@@ -234,9 +234,9 @@ export class OptrtreeComponent extends FlexTableComponent implements OnInit {
 
   async save() {
     if(!this.item.optr_id){
-      var regex = new RegExp('(?=.*[0-9])(?=.*[a-zA-Z])(?=.*[^a-zA-Z0-9]).{8,30}');
+      var regex = new RegExp('(?=.*[0-9])(?=.*[a-zA-Z])(?=.*[^a-zA-Z0-9]).{10,30}');
       if (!regex.test(this.item.login_pass)) {
-        AppComponent.alert({ 'title': '提示', 'text': '密码中必须包含字母、数字、特殊字符至少8个字符!' });
+        AppComponent.alert({ 'title': '提示', 'text': '密码中必须包含字母、数字、特殊字符至少10个字符!' });
         return;
       }
     }

+ 19 - 7
src/app/routes/hm-soft/by/audit/final-audit-a/final-audit-a.component.html

@@ -313,7 +313,7 @@
                         <td style="text-align: right" width="7%">身份证</td>
                         <td width="23%"><input class="form-control" type="text" [(ngModel)]="item.cert_no" [ngModelOptions]="{standalone: true}" readonly/></td>
                         <td rowspan="8" style="width:19%;text-align: center">
-                            <div *ngIf="item.photo_path" class="text-muted" style="vertical-align:middle;width: 180px;height: 240px;border:solid 1.5px #000000;">
+                            <div *ngIf="item.photo_path" class="text-muted image-container" style="width: 180px;height: 240px;border:solid 1.5px #000000;">
                                 <img  [src]="item.photo_path" style="width: 100%;height: 100%;">
                                 <button class="btn btn-info" style="margin-top:15px;" (click)="setStdByPhoto(); " title="将考生照片调整至宽480*高640且大小20-40KB并设为毕业照片。">
                                     <i class="fa fa-info-circle"> </i> 调整并设为毕业照片
@@ -321,14 +321,24 @@
                             </div>
                         </td>
                         <td rowspan="8" style="width:19%;text-align: center">
-                            <div *ngIf="item.by_photo_path" class="text-muted" style="width: 180px;height: 240px;border:solid 1.5px #000000;">
-                                <img [src]="item.by_photo_path" style="width: 100%;height: 100%;" alt="替换照片" (click)="showUploadImgDialog(uploadImgModal);" title="点击照片可重新上传照片。">
-                            </div>
+                            <div *ngIf="item.by_photo_path" class="text-muted image-container" style="width: 180px;height: 240px;border:solid 1.5px #000000;">
+                                <img [src]="item.by_photo_path" style="width: 100%;height: 100%;" alt="" >
+                                <div class="line1"></div>
+                                <div class="line2"></div>
+                                <div class="line3"></div>
+                                <div class="line4"></div>
+
+                                <button class="btn btn-info" style="margin-top:15px;" (click)="showUploadImgDialog(uploadImgModal);" title="照片要求:宽480像素*高640像素,人像居中,蓝底,文件大小在20KB至40KB。">
+                                    <i class="fa fa-info-circle"> </i> 重新上传照片
+                                </button>
+
+                            </div>  
                             <div *ngIf="!item.by_photo_path" class="text-muted" style="align-content: center;">
-                                <button class="btn btn-info" (click)="showUploadImgDialog(uploadImgModal);" title="照片要求:宽480像素*高640像素,人像居中,蓝底,文件大小在20KB至40KB。">
-                                    <i class="fa fa-info-circle"> </i> 上传照片
+                                <button class="btn btn-info" (click)="showUploadImgDialog(uploadImgModal); " title="照片要求:宽480像素*高640像素,人像居中,蓝底,文件大小在20KB至40KB。">
+                                    <i class="fa fa-info-circle"> </i> 上传毕业照片
                                 </button>
                             </div>
+                           
                         </td>
                     </tr>
                         <tr>
@@ -408,7 +418,9 @@
                                         
                                         <div style="text-align: right;font-size:13px;">
                                                 <span class="ml-sm" >照片要求:宽480像素*高640像素,人像居中,蓝底,文件大小在20KB至40KB。</span>
-                                       </div>
+                                                <br>
+                                                <span class="ml-sm" >请根据毕业照片上的网格,确认人像要居中以及眼睛不能过高或过低。</span>
+                                            </div>
                                 </td>
                             </tr>
     

+ 46 - 0
src/app/routes/hm-soft/by/audit/final-audit-a/final-audit-a.component.scss

@@ -0,0 +1,46 @@
+.image-container {
+    position: relative;
+    display: inline-block;
+  }
+   
+  .image-container img {
+    display: block; /* Remove any default spacing below the image */
+    width: 100%; /* Optional: you can set a specific width */
+  }
+   
+  .line1 {
+    position: absolute;
+    top: 80px; /* 线条的起始垂直位置 */
+    left: 0;
+    width: 100%; /* 线条的长度 */
+    height: 1px; /* 线条的粗细 */
+    background:#F2F1F1; /* 线条的颜色 */
+  }
+
+  .line2 {
+    position: absolute;
+    top: 160px; /* 线条的起始垂直位置 */
+    left: 0;
+    width: 100%; /* 线条的长度 */
+    height: 1px; /* 线条的粗细 */
+    background:#F2F1F1; /* 线条的颜色 */
+  }
+
+  .line3 {
+    position: absolute;
+    top: 0; /* 线条的起始垂直位置 */
+    left: 60px;
+    height: 100%; /* 线条的长度 */
+    width: 1px; /* 线条的粗细 */
+    background:#F2F1F1; /* 线条的颜色 */
+  }
+
+  .line4 {
+    position: absolute;
+    top: 0; /* 线条的起始垂直位置 */
+    left: 120px;
+    height: 100%; /* 线条的长度 */
+    width: 1px; /* 线条的粗细 */
+    background:#F2F1F1; /* 线条的颜色 */
+  }
+ 

+ 18 - 5
src/app/routes/hm-soft/by/audit/final-audit-b/final-audit-b.component.html

@@ -311,7 +311,7 @@
                         <td style="text-align: right" width="7%">身份证</td>
                         <td width="23%"><input class="form-control" type="text" [(ngModel)]="item.cert_no" [ngModelOptions]="{standalone: true}" readonly/></td>
                         <td rowspan="8" style="width:19%;text-align: center">
-                            <div *ngIf="item.photo_path" class="text-muted" style="vertical-align:middle;width: 180px;height: 240px;border:solid 1.5px #000000;">
+                            <div *ngIf="item.photo_path" class="text-muted image-container" style="width: 180px;height: 240px;border:solid 1.5px #000000;">
                                 <img  [src]="item.photo_path" style="width: 100%;height: 100%;">
                                 <button class="btn btn-info" style="margin-top:15px;" (click)="setStdByPhoto(); " title="将考生照片调整至宽480*高640且大小20-40KB并设为毕业照片。">
                                     <i class="fa fa-info-circle"> </i> 调整并设为毕业照片
@@ -319,14 +319,25 @@
                             </div>
                         </td>
                         <td rowspan="8" style="width:19%;text-align: center">
-                            <div *ngIf="item.by_photo_path" class="text-muted" style="width: 180px;height: 240px;border:solid 1.5px #000000;">
-                                <img [src]="item.by_photo_path" style="width: 100%;height: 100%;" alt="替换照片" (click)="showUploadImgDialog(uploadImgModal);" title="点击照片可重新上传照片。">
+                            <div *ngIf="item.by_photo_path" class="text-muted image-container" style="width: 180px;height: 240px;border:solid 1.5px #000000;">
+                                <img [src]="item.by_photo_path" style="width: 100%;height: 100%;" alt="" >
+                                <div class="line1"></div>
+                                <div class="line2"></div>
+                                <div class="line3"></div>
+                                <div class="line4"></div>
+
+                                <button class="btn btn-info" style="margin-top:15px;" (click)="showUploadImgDialog(uploadImgModal);" title="照片要求:宽480像素*高640像素,人像居中,蓝底,文件大小在20KB至40KB。">
+                                    <i class="fa fa-info-circle"> </i> 重新上传照片
+                                </button>
+
                             </div>
+
                             <div *ngIf="!item.by_photo_path" class="text-muted" style="align-content: center;">
-                                <button class="btn btn-info" (click)="showUploadImgDialog(uploadImgModal);" title="照片要求:宽480像素*高640像素,人像居中,蓝底,文件大小在20KB至40KB。">
-                                    <i class="fa fa-info-circle"> </i> 上传照片
+                                <button class="btn btn-info" (click)="showUploadImgDialog(uploadImgModal); " title="照片要求:宽480像素*高640像素,人像居中,蓝底,文件大小在20KB至40KB。">
+                                    <i class="fa fa-info-circle"> </i> 上传毕业照片
                                 </button>
                             </div>
+
                         </td>
                     </tr>
                         <tr>
@@ -406,6 +417,8 @@
                                         
                                         <div style="text-align: right;font-size:13px;">
                                                 <span class="ml-sm" >照片要求:宽480像素*高640像素,人像居中,蓝底,文件大小在20KB至40KB。</span>
+                                                <br>
+                                                <span class="ml-sm" >请根据毕业照片上的网格,确认人像要居中以及眼睛不能过高或过低。</span>
                                        </div>
                                 </td>
                             </tr>

+ 46 - 0
src/app/routes/hm-soft/by/audit/final-audit-b/final-audit-b.component.scss

@@ -0,0 +1,46 @@
+.image-container {
+    position: relative;
+    display: inline-block;
+  }
+   
+  .image-container img {
+    display: block; /* Remove any default spacing below the image */
+    width: 100%; /* Optional: you can set a specific width */
+  }
+   
+  .line1 {
+    position: absolute;
+    top: 80px; /* 线条的起始垂直位置 */
+    left: 0;
+    width: 100%; /* 线条的长度 */
+    height: 1px; /* 线条的粗细 */
+    background:#F2F1F1; /* 线条的颜色 */
+  }
+
+  .line2 {
+    position: absolute;
+    top: 160px; /* 线条的起始垂直位置 */
+    left: 0;
+    width: 100%; /* 线条的长度 */
+    height: 1px; /* 线条的粗细 */
+    background:#F2F1F1; /* 线条的颜色 */
+  }
+
+  .line3 {
+    position: absolute;
+    top: 0; /* 线条的起始垂直位置 */
+    left: 60px;
+    height: 100%; /* 线条的长度 */
+    width: 1px; /* 线条的粗细 */
+    background:#F2F1F1; /* 线条的颜色 */
+  }
+
+  .line4 {
+    position: absolute;
+    top: 0; /* 线条的起始垂直位置 */
+    left: 120px;
+    height: 100%; /* 线条的长度 */
+    width: 1px; /* 线条的粗细 */
+    background:#F2F1F1; /* 线条的颜色 */
+  }
+ 

+ 1276 - 0
src/app/routes/hm-soft/by/audit/school-audit/query-by-score.component.html

@@ -0,0 +1,1276 @@
+<div class="panel panel-default">
+        <!--标题-->
+        <div class="panel-title">
+            <nav aria-label="breadcrumb">
+                <ol class="breadcrumb">
+                    <!-- TODO 
+                    <li class="breadcrumb-item">毕业审核</li>-->
+                    <li class="breadcrumb-item active" aria-current="page">毕业证明</li>
+                </ol>
+            </nav>
+        </div>
+
+        <div [hidden]="editShowType=='only'||editShowType=='only1'" class="panel-title panel-heading jf-org-tab" style="margin-top:0px;margin-bottom:-1px;">
+            <div class="panel-control" style="float:left;">
+                <ul class="nav nav-tabs">
+                    <li [class]='0 == isActive? "li-class-active" : "li-class" ' (click)="changeLi($event,0,1)">毕业成绩</li>
+                    <li [class]='1 == isActive? "li-class-active" : "li-class" ' (click)="changeLi($event,1,2)">平时成绩</li>
+                   
+    
+                </ul>
+            </div>
+        </div>
+        
+        <div *ngIf="0 == isActive" class="panel-body ml-sm" [hidden]="editShowType=='only' || editShowType=='authQuery'">
+            <div class="card card-default">
+                <div class="card-body">
+                    <!--查询条件-->
+                    <div class="row mb-3 ml-1" [hidden]="editShowType=='only' || editShowType=='authQuery'">
+                        <div class="col-lg-12">
+                            
+                            <form (ngSubmit)="searchData($event)" class="form-inline">
+                                    <table>
+                                            <tr>
+                                                <td>
+                                        <div class="input-group mr-1 input-group-sm">
+                                            <label>关键字:</label>
+                                            <input name="keyword" [(ngModel)]="query.query" class="input-sm form-control" type="text"
+                                                        value="" maxlength="50" placeholder="请输入姓名、准考证号、身份证号、毕业证号查询" style="width:400px;" >
+                                        </div>
+                                    </td>
+                                    <td>
+                                        <button class="btn btn-primary btn-rounded btn-outline btn-sm  mr-1" (click)="searchData($event)">
+                                            <i class="fa fa-search"></i> 查询</button>
+                                        
+                                    </td>
+                                       
+                                        </tr>
+                                        </table>
+                                </form>
+                        </div>
+                    </div>
+    
+                  
+                    <!--表格-->
+                    <div class="row">
+                        <div class="col-lg-12 ml-0" [hidden]="editShowType=='only' || editShowType=='authQuery'">
+                                <table class="table table-sm table-striped table-hover table-bordered bg-white">
+                                        <thead>
+                                            <tr>
+                                                <th>
+                                                    <div class="checkbox c-checkbox">
+                                                        <label>
+                                                            <input type="checkbox" (change)="framePager.checkedMasterToggle($event)" />
+                                                            <span class="fa fa-check"></span>
+                                                        </label>
+                                                    </div>
+                                                </th>
+                                                <th>序号</th>
+                                                <th align="center">毕业日期</th>
+                                                <th align="center">准考证</th>
+                                                <th>身份证</th>
+                                                <th>姓名</th>
+                                                <th>毕业证书号</th>
+                                                <th>专业层次</th>
+                                                <th>专业名称</th>
+                                                
+                                                <th>主考学校</th>
+                                                
+                                                
+                                                
+                                                <th align="center" nowrap>操作</th>
+                                                
+                                            </tr>
+                                        </thead>
+                                        <tbody>
+                                            <tr *ngFor="let item of framePager.getRecords(); let i = index">
+                                                <td>
+                                                    <div class="checkbox c-checkbox input-group-sm">
+                                                        <label>
+                                                            <input type="checkbox" [value]="item.id" [(checked)]="item.isChecked"
+                                                                [(ngModel)]="item.isChecked" />
+                                                            <span class="fa fa-check"></span>
+                                                        </label>
+                                                    </div>
+                                                </td>
+                                                <td>{{framePager.pageStart + i}}</td>
+                                                <td align="center">{{item.exam_year_month}}</td>
+                                                <td align="center">{{item.ticket_no}}</td>
+                                                <td>{{item.cert_no}}</td>
+                                                <td>{{item.std_name}}</td>
+                                                <td>{{item.diaplma_no}}</td>
+                                                <td  [innerHTML]="item.major_level | frameDict:'MajorLevel'"></td>
+                                                <td>{{item.major_code}}-{{item.major_name}}</td>
+                                                
+                                                <td>{{item.org_code}}-{{item.org_name}}</td>
+                                               
+                                                
+                                                    <td align="center">
+                                                        <a href="#" (click)="showEditWin(item)" title="详情"><em
+                                                                class="fa-lg fas icon-list mr-1"></em></a>
+                                                        &nbsp;&nbsp;&nbsp;&nbsp;
+                                                        <a href="#" *ngIf="item.id>0" (click)="downloadByScoreTable(item.id)" title="下载毕业成绩证明">
+                                                            <i class="fa fa-download"></i>
+                                                        </a>  
+                                                      
+                                                    </td>
+                                               
+                                            </tr>
+                                        </tbody>
+                                    </table>
+                            <!-- TODO -->
+                            <frame-pager [url]="QUERY_URL" [autoLoad]="false" hideSearch="true" hasCheck="true" #framePager (preReqEvent)="search($event)"></frame-pager>
+                        </div>
+    
+                        <!-- 编辑页面 -->
+                        <div class="col-lg-12" *ngIf="item && editShowType != null && editShowType!='modal'">
+                            <ng-container *ngTemplateOutlet="editTemplateModal">
+                            </ng-container>
+                        </div>
+                    </div>
+                </div>
+            </div>
+        </div>
+
+        <div *ngIf="1 == isActive" class="panel-body ml-sm" [hidden]="editShowType=='only1' || editShowType=='authQuery'">
+            <div class="card card-default">
+                <div class="card-body">
+                    <!--查询条件-->
+                    <div class="row mb-3 ml-1" [hidden]="editShowType=='only1' || editShowType=='authQuery'">
+                        <div class="col-lg-12">
+                            
+                            <form (ngSubmit)="searchStd()" class="form-inline">
+                                <div class="input-group mr-1 input-group-sm">
+                                    <label>准考证号:</label>
+                                    <input name="ticket_no" [(ngModel)]="ticket_no" class="input-sm form-control" type="text" value=""
+                                      maxlength="64" placeholder="请输入准考证号">
+                                  </div>
+                                  <div class="input-group mr-1 input-group-sm">
+                                    <label>考生姓名:</label>
+                                    <input name="std_name" [(ngModel)]="std_name" class="input-sm form-control" type="text" value=""
+                                      maxlength="64" placeholder="请输入考生姓名">
+                                  </div>
+                                  <div class="input-group mr-1 input-group-sm">
+                                    <label>证件号码:</label>
+                                    <input name="cert_no" [(ngModel)]="cert_no" class="input-sm form-control" type="text" value=""
+                                      maxlength="64" placeholder="请输入证件号码">
+                                  </div>
+                                  <div class="input-group mr-1 input-group-sm">
+                                    <label>手机号码:</label>
+                                    <input name="std_mobile" [(ngModel)]="std_mobile" class="input-sm form-control" type="text" value=""
+                                      maxlength="64" placeholder="请输入手机号码">
+                                  </div>
+                                  <button class="btn btn-primary btn-rounded btn-outline btn-sm  mr-1">
+                                    <i class="fa fa-search"></i> 查询</button>
+                                </form>
+                        </div>
+                    </div>
+    
+                  
+
+                    <!--表格-->
+                    <div class="row">
+                        <div class="col-lg-12 ml-0" [hidden]="editShowType=='only1' || editShowType=='authQuery'">
+                            <table class="table table-sm table-striped table-hover table-bordered bg-white">
+                                <thead>
+                                  <tr>
+                                    <th align="center">准考证号</th>
+                                    <th>考生姓名</th>
+                                    <th>证件号码</th>
+                                    <th>专业</th>
+                                    <th>主考学校</th>
+                                    <th>手机号码</th>
+                                    <th style="width: 80px;" align="center">操作</th>
+                                  </tr>
+                                </thead>
+                                <tbody>
+                                  <tr *ngFor="let item of stdList; let i = index" >
+                                    
+                                    <td align="center">{{item.ticket_no}}</td>
+                                    <td>{{item.std_name}}</td>
+                                    <td>{{item.cert_no}}</td>
+                                    <td>{{item.major_name}}</td>
+                                    <td>{{item.school_name}}</td>
+                                    <td>{{item.std_mobile}}</td>
+                                    <td align="center">
+                                      <a href="#" *ngIf="item.id>0" (click)="showEditWin1(item)" title="详情"><em
+                                          class="fa-lg fas icon-list mr-1"></em></a>
+                                      
+                                    </td>
+                                  </tr>
+                                </tbody>
+                              </table>
+                        </div>
+    
+                        <!-- 编辑页面 -->
+                        <div class="col-lg-12" *ngIf="item && editShowType != null && editShowType!='modal'">
+                            <ng-container *ngTemplateOutlet="editTemplateModal">
+                            </ng-container>
+                        </div>
+                    </div>
+                </div>
+            </div>
+        </div>
+
+        <!-- only 审核界面-->
+        <div class="col-lg-12" *ngIf="item && editShowType != null && editShowType =='only'">
+            <ng-container *ngTemplateOutlet="editTemplateModal">
+            </ng-container>
+        </div>
+        <div class="col-lg-12" *ngIf="item && editShowType != null && editShowType =='only1'">
+            <ng-container *ngTemplateOutlet="editTemplateModal1">
+            </ng-container>
+        </div>
+        <!-- authQuery 审核记录查询-->
+        <div class="col-lg-12" *ngIf="item && editShowType != null && editShowType =='authQuery'">
+            <ng-container *ngTemplateOutlet="authQueryModal">
+            </ng-container>
+        </div>
+        <!--录入分数界面-->
+        <div class="col-lg-12" *ngIf="item && editShowType != null && editShowType =='input'">
+            <ng-container *ngTemplateOutlet="manualInputModal">
+            </ng-container>
+        </div>
+        <!--课程顶替界面-->
+        <div class="col-lg-12" *ngIf="item && editShowType != null && editShowType =='repl'">
+            <ng-container *ngTemplateOutlet="courseReplModal">
+            </ng-container>
+        </div>
+        <!--创建毕业申请-考生引用界面-->
+        <div class="col-lg-12" *ngIf="item && editShowType != null && editShowType =='stdRef'">
+            <ng-container *ngTemplateOutlet="stdRefModal">
+            </ng-container>
+        </div>
+    </div>
+    
+<!--******************************************************毕业审核详情界面****************************************************-->
+<ng-template #editFormTemplate>
+    <form [formGroup]="formModel" *ngIf="item" class="form-validate form-horizontal" novalidate="">
+            <input type="hidden" class="form-control" formControlName="id" [(ngModel)]="item.id" [formControl]="formModel.controls['id']" />
+            <div class="row mb-1">
+                <!-- 学生基础信息 -->
+                <table class="table table-sm table-striped table-hover table-bordered bg-white">
+                    <tbody>
+                            <tr>
+                                <td style="text-align: right" width="9%">姓名</td>
+                                <td width="23%"><input class="form-control" type="text" [ngModelOptions]="{standalone: true}" [(ngModel)]="item.std_name" readonly/></td>
+                                <td style="text-align: right" width="7%">身份证</td>
+                                <td width="23%"><input class="form-control" type="text" [ngModelOptions]="{standalone: true}" [(ngModel)]="item.cert_no" readonly/></td>
+                                <td rowspan="7" style="width:20%;text-align: center">
+                                        <span *ngIf="item.photo_path">考生照片</span>
+                                    <div *ngIf="item.photo_path" class="text-muted" style="vertical-align:middle;">
+                                        <img  [src]="item.photo_path" style="width: 200;height: 200px">
+                                    </div>
+                                </td>
+                                <td rowspan="7" style="width:20%;text-align: center">
+                                    <span *ngIf="item.by_photo">毕业照片</span>
+                                    <div *ngIf="item.by_photo" class="text-muted">
+                                        <img [src]="item.by_photo" style="width: 200;height: 200px;" >
+                                    </div>
+
+                                    <span *ngIf="!item.by_photo && item.by_photo_path">毕业照片</span>
+                                    <div *ngIf="!item.by_photo && item.by_photo_path" class="text-muted">
+                                        <img [src]="item.by_photo_path" style="width: 200;height: 200px;" >
+                                    </div>
+                                    
+                                </td>
+                            </tr>
+                            <tr>
+                                <td style="text-align: right">准考证</td>
+                                <td><input class="form-control" type="text" [ngModelOptions]="{standalone: true}" [(ngModel)]="item.ticket_no" readonly/></td>
+                                <td style="text-align: right">性别</td>
+                                <td>
+                                    <select [ngModelOptions]="{standalone: true}" disabled
+                                        [(ngModel)]="item.std_sex" 
+                                        frameDict [dictName]="'StdSexType'" 
+                                        class="form-control">
+                                    </select>
+                                </td>
+                            </tr>
+                            <tr>
+                                <td style="text-align: right">民族</td>
+                                <td>
+                                    <select [ngModelOptions]="{standalone: true}" disabled
+                                        [(ngModel)]="item.nation" 
+                                        frameDict [dictName]="'std_nation'" 
+                                        class="form-control">
+                                    </select>
+                                </td>
+                                <td style="text-align: right">出生日期</td>
+                                <td>
+                                    <input class="form-control" type="text" readonly [ngModelOptions]="{standalone: true}"  DateTimePicker [dpType]="'date'" [dpValue]="item.std_birth" [(ngModel)]="item.std_birth"/>
+                                </td>
+                            </tr>
+                            <tr>
+                                <td style="text-align: right">省市自治区</td>
+                                <td><input class="form-control" type="text" readonly [ngModelOptions]="{standalone: true}" [(ngModel)]="item.native_prov"/></td>
+                                <td style="text-align: right">市(县)</td>
+                                <td><input class="form-control" type="text" readonly [ngModelOptions]="{standalone: true}" [(ngModel)]="item.native_city"/></td>
+                            </tr>
+                            <tr>
+                                <td style="text-align: right">政治面貌</td>
+                                <td>
+                                    <select
+                                        [(ngModel)]="item.political" disabled
+                                        frameDict [dictName]="'std_political_status'" 
+                                        [ngModelOptions]="{standalone: true}"
+                                        class="form-control">
+                                    </select>
+                                </td>
+                                <td style="text-align: right">考前学历</td>
+                                <td><input class="form-control" type="text" readonly [(ngModel)]="item.pre_edu" [ngModelOptions]="{standalone: true}"/></td>
+                            </tr>
+                            <tr>
+                                <td style="text-align: right">工作单位</td>
+                                <td><input class="form-control" type="text" readonly [ngModelOptions]="{standalone: true}" [(ngModel)]="item.work_unit"/></td>
+                                <td style="text-align: right">联系电话</td>
+                                <td><input class="form-control" type="text" readonly [ngModelOptions]="{standalone: true}" [(ngModel)]="item.telephone"/></td>
+                            </tr>
+                            <tr>
+                                <td style="text-align: right">家庭地址</td>
+                                <td><input class="form-control" type="text" readonly [ngModelOptions]="{standalone: true}" [(ngModel)]="item.address"/></td>
+                                <td style="text-align: right">邮政编码</td>
+                                <td><input class="form-control" type="text" readonly [ngModelOptions]="{standalone: true}" [(ngModel)]="item.post_code"/></td>
+                            </tr>
+
+                            <tr>
+                                <td style="text-align: right">毕业证书号</td>
+                                <td><input class="form-control" type="text" [ngModelOptions]="{standalone: true}" [(ngModel)]="item.diaplma_no" readonly/></td>
+                                <td style="text-align: right">专业层次</td>
+                                <td><input class="form-control" type="text" [ngModelOptions]="{standalone: true}" [(ngModel)]="majorLevel" readonly/></td>
+                            </tr>
+                            <tr>
+                                <td style="text-align: right">主考学校</td>
+                                <td><input class="form-control" type="text" [ngModelOptions]="{standalone: true}" [(ngModel)]="item.org_name" readonly/></td>
+    
+                               
+                                <td style="text-align: right">专业</td>
+    
+                                <td>
+                                        {{item.major_code}}-{{item.major_name}}
+                                </td>
+                                <td colspan="2">
+                                        
+                                       
+                                </td>
+                            </tr>
+                    </tbody>
+                </table>
+            </div>
+
+            <div class="row mb-1">
+               
+                <table class="table table-sm table-striped table-hover table-bordered bg-white">
+                    <thead>
+                        <tr>
+                            <th>序号</th>
+                            <th align="center">课程代码</th>
+                            <th>课程名称</th>
+                            <th align="center">学分</th>
+                            <th align="center">成绩</th>
+                            
+                        </tr>
+                    </thead>
+                    <tbody>
+                        <tr *ngFor="let it of scoreList; let i = index">
+                            <td>{{i+1}}</td>
+                            <td align="center">{{it.course_code}}</td>
+                            <td>{{it.course_name}}</td>
+                            <td align="right">{{it.course_score}}</td>
+                            <td align="right">{{formateFinalScore(it)}}</td>                           
+                        </tr>
+                    </tbody>
+                </table>
+            </div>
+            
+           
+    </form>
+   
+</ng-template>
+
+<ng-template #editTemplateModal>
+    <div class="modal-content">
+        <div class="modal-header info-success-qm">
+            <div class="pull-left">
+                <em class="fa-lg fas fa-edit "></em> 详情页面
+            </div>
+            <button type="button" class="close" (click)="hideModal()">×</button>
+        </div>
+
+        <!-- 1@3 -->
+        <div class="modal-body">
+            <div [ngTemplateOutlet]="editFormTemplate"></div>
+        </div>
+
+        <div class="modal-footer" style="text-align: center">
+           
+            <button class="btn btn-default" (click)="hideModal()">
+                <i class="icon-close"> </i> 关闭
+            </button>
+        </div>
+    </div>
+</ng-template>
+
+
+
+<ng-template #editFormTemplate1>
+    <form [formGroup]="formModel" *ngIf="item" class="form-validate form-horizontal" novalidate="">
+            <input type="hidden" class="form-control" formControlName="id" [(ngModel)]="item.id" [formControl]="formModel.controls['id']" />
+            <div class="row mb-1">
+                <!-- 学生基础信息 -->
+                <table class="table table-sm table-striped table-hover table-bordered bg-white">
+                        <tbody>
+                                <tr>
+                                    <td style="text-align: right" width="9%">姓名</td>
+                                    <td width="23%"><input class="form-control" type="text" [ngModelOptions]="{standalone: true}" [(ngModel)]="item.std_name" readonly/></td>
+                                    <td style="text-align: right" width="7%">身份证</td>
+                                    <td width="23%"><input class="form-control" type="text" [ngModelOptions]="{standalone: true}" [(ngModel)]="item.cert_no" readonly/></td>
+                                    <td rowspan="7" style="width:20%;text-align: center;">
+                                        <div *ngIf="item.photo_path" class="text-muted" style="vertical-align:middle;">
+                                            <img  [src]="item.photo_path" style="width: 200;height: 200px">
+                                        </div>
+                                    </td>
+                                    
+                                </tr>
+                                <tr>
+                                    <td style="text-align: right">准考证</td>
+                                    <td><input class="form-control" type="text" [ngModelOptions]="{standalone: true}" [(ngModel)]="item.ticket_no" readonly/></td>
+                                    <td style="text-align: right">性别</td>
+                                    <td>
+                                        <select [ngModelOptions]="{standalone: true}" disabled
+                                            [(ngModel)]="item.std_sex" 
+                                            frameDict [dictName]="'StdSexType'" 
+                                            class="form-control">
+                                        </select>
+                                    </td>
+                                </tr>
+                                <tr>
+                                    <td style="text-align: right">民族</td>
+                                    <td>
+                                        <select [ngModelOptions]="{standalone: true}" disabled
+                                            [(ngModel)]="item.std_nation" 
+                                            frameDict [dictName]="'std_nation'" 
+                                            class="form-control">
+                                        </select>
+                                    </td>
+                                    <td style="text-align: right">出生日期</td>
+                                    <td>
+                                        <input class="form-control" type="text" readonly [ngModelOptions]="{standalone: true}"  DateTimePicker [dpType]="'date'" [dpValue]="item.std_birth" [(ngModel)]="item.std_birth"/>
+                                    </td>
+                                </tr>
+                               
+                                <tr>
+                                    <td style="text-align: right">政治面貌</td>
+                                    <td>
+                                        <select
+                                            [(ngModel)]="item.political_status" disabled
+                                            frameDict [dictName]="'std_political_status'" 
+                                            [ngModelOptions]="{standalone: true}"
+                                            class="form-control">
+                                        </select>
+                                    </td>
+                                    <td style="text-align: right">学历</td>
+                                    <td>
+                                        <select
+                                            [(ngModel)]="item.std_edu" disabled
+                                            frameDict [dictName]="'std_edu'" 
+                                            [ngModelOptions]="{standalone: true}"
+                                            class="form-control">
+                                        </select>
+    
+                                    </td>
+                                </tr>
+                                
+                                <tr>
+                                    <td style="text-align: right">手机号码</td>
+                                    <td>
+                                            <input class="form-control" type="text" maxlength="11" readonly [(ngModel)]="item.std_mobile" [ngModelOptions]="{standalone: true}" />
+    
+                                    </td>
+                             </tr>
+    
+                                
+                                <tr>
+                                    <td style="text-align: right">专业层次</td>
+                                    <td>
+                                        <select class="custom-select"  frameDict [dictName]="'MajorLevel'"  [(dictValue)]="item.major_level"  [(ngModel)]="item.major_level"
+                                        (change)="majorLevelChange(item.major_level)" [ngModelOptions]="{standalone: true}">
+                                        </select>
+                                    </td>
+        
+                                   
+                                    <td style="text-align: right">专业</td>
+                                    <td>
+                                        <flex-select [allowClear]="true" [(items)]="majorArray" respDataPath="array" optionTextField="major_full_name" optionValueField="id"
+                                        [(ngModel)]="item.major_id" placeholder="请选择" width="300" noResultsFound="无数据" (ngModelChange)="majorChange(item)"
+                                        [ngModelOptions]="{standalone: true}">
+                                        </flex-select>
+                                   
+                                            
+                                    </td>
+                                   
+                                </tr>
+                        </tbody>
+                    </table>
+            </div>
+
+             <!-- 工具栏 -->
+             <div class="row mb-2" >
+                    <div class="col-lg-12">
+                        <div class="pull-left" style="text-align: right;">
+                            <button class="btn btn-primary mr-1 btn-sm" data-toggle="tooltip" data-placement="left"
+                                (click)="downloadStdMajorScoreTable(item)" title="下载专业成绩证明">
+                                下载专业成绩证明</button>
+                            
+                                
+                        </div>
+
+                    </div>
+
+                   
+
+                </div>
+
+            <div class="row mb-1">
+               
+                    <table class="table table-sm table-striped table-hover table-bordered bg-white">
+                            <thead>
+                              <tr align="center">
+                                <th>序号</th>
+                                <th  align="center">考试年月</th>
+                                <th>考生姓名</th>
+                                <th  align="center">准考证号</th>
+                                <th>身份证</th>
+                                <th  align="center">课程代码</th>
+                                <th>课程名称</th>
+                                <th  align="center">成绩</th>
+                                 <!--<th>状态</th> -->
+                                <th>成绩来源</th>
+                                <th>成绩性质</th>
+                                <th>专业</th>
+                                <th>主考学校</th> 
+                              </tr>
+                            </thead>
+                            <tbody>
+                              <tr *ngFor="let item of historyScore; let i = index" align="center">
+                                <td title="红色表示课程成绩未合格" *ngIf="item.id != null"><font *ngIf="item.remark == 'red'" color="red">{{item.id}}</font><font *ngIf="item.remark != 'red'">{{item.id}}</font></td>
+                                <td title="红色表示课程成绩未合格" *ngIf="item.id == null"><font *ngIf="item.remark == 'red'" color="red">{{i+1}}</font><font *ngIf="item.remark != 'red'">{{i+1}}</font></td>
+                                <td  align="center" title="红色表示课程成绩未合格"><font *ngIf="item.remark == 'red'" color="red">{{item.year_code}}</font><font *ngIf="item.remark != 'red'">{{item.year_code}}</font></td>
+                                <td title="红色表示课程成绩未合格"><font *ngIf="item.remark == 'red'" color="red">{{item.std_name}}</font><font *ngIf="item.remark != 'red'">{{item.std_name}}</font></td>
+                                <td  align="center" title="红色表示课程成绩未合格"><font *ngIf="item.remark == 'red'" color="red">{{item.ticket_no}}</font><font *ngIf="item.remark != 'red'">{{item.ticket_no}}</font></td>
+                                <td title="红色表示课程成绩未合格"><font *ngIf="item.remark == 'red'" color="red">{{item.cert_no}}</font><font *ngIf="item.remark != 'red'">{{item.cert_no}}</font></td>
+                                <td  align="center" title="红色表示课程成绩未合格"><font *ngIf="item.remark == 'red'" color="red">{{item.course_code}}</font><font *ngIf="item.remark != 'red'">{{item.course_code}}</font></td>
+                                <td title="红色表示课程成绩未合格"><font *ngIf="item.remark == 'red'" color="red">{{item.course_name}}</font><font *ngIf="item.remark != 'red'">{{item.course_name}}</font></td>
+                                <td  align="right" title="红色表示课程成绩未合格"><font *ngIf="item.remark == 'red'" color="red">{{item.final_score}}</font><font *ngIf="item.remark != 'red'">{{item.final_score}}</font></td>
+                                 <!--<td>{{item.status_name}}</td> -->
+                                <td title="红色表示课程成绩未合格"><font *ngIf="item.remark == 'red'" color="red">{{item.score_source_name}}</font><font *ngIf="item.remark != 'red'">{{item.score_source_name}}</font></td>
+                                <td title="红色表示课程成绩未合格"><font *ngIf="item.remark == 'red'" color="red">{{item.score_type_name}}</font><font *ngIf="item.remark != 'red'">{{item.score_type_name}}</font></td>
+                                <td title="红色表示课程成绩未合格"><font *ngIf="item.remark == 'red'" color="red">{{item.major_name}}</font><font *ngIf="item.remark != 'red'">{{item.major_name}}</font></td>
+                                <td title="红色表示课程成绩未合格"><font *ngIf="item.remark == 'red'" color="red">{{item.org_name}}</font><font *ngIf="item.remark != 'red'">{{item.org_name}}</font></td> 
+                  
+                              </tr>
+                              
+                            </tbody>
+                          </table>
+            </div>
+            
+           
+    </form>
+   
+</ng-template>
+
+<ng-template #editTemplateModal1>
+    <div class="modal-content">
+        <div class="modal-header info-success-qm">
+            <div class="pull-left">
+                <em class="fa-lg fas fa-edit "></em> 详情页面
+            </div>
+            <button type="button" class="close" (click)="hideModal()">×</button>
+        </div>
+
+        <!-- 1@3 -->
+        <div class="modal-body">
+            <div [ngTemplateOutlet]="editFormTemplate1"></div>
+        </div>
+
+        <div class="modal-footer" style="text-align: center">
+           
+            <button class="btn btn-default" (click)="hideModal()">
+                <i class="icon-close"> </i> 关闭
+            </button>
+        </div>
+    </div>
+</ng-template>
+
+    
+<!-- ***********************************************审核记录查询框******************************************************* -->
+<ng-template #authQueryModal>
+    <div class="modal-content">
+        <div class="modal-header info-success-qm">
+            <div class="pull-left">
+                <em class="fa-lg fas fa-edit "></em> 查看页面
+            </div>
+            <button type="button" class="close" (click)="hideModal()">×</button>
+        </div>
+
+        <!-- 1@3 -->
+        <div class="modal-body">
+            <div [ngTemplateOutlet]="authQueryTemplate"></div>
+        </div>
+
+        <div class="modal-footer" style="text-align: center">
+            <button class="btn btn-default" (click)="hideModal()">
+                <i class="icon-close"> </i> 关闭
+            </button>
+        </div>
+    </div>
+</ng-template>
+    
+<ng-template #authQueryTemplate>
+    <form [formGroup]="formModel" *ngIf="item" class="form-validate form-horizontal" novalidate="">
+            <input type="hidden" class="form-control" formControlName="id" [(ngModel)]="item.id" [formControl]="formModel.controls['id']" />
+            <div class="row mb-1">
+                <!-- 学生基础信息 -->
+                <table class="table table-sm table-striped table-hover table-bordered bg-white">
+                    <tbody>
+                        <tr>
+                            <td colspan="2">准考证号:{{item.ticket_no}}</td>
+                        </tr>
+                        <tr>
+                            <td>姓名:{{item.std_name}}</td>
+                            <td>性别:{{item.std_sex | frameDict:'StdSexType'}}</td>
+                        </tr>
+                        <tr>
+                            <td>主考学校:{{item.school_name}}</td>
+                            <td>专业:{{item.major_name}}</td>
+                        </tr>
+                        <tr>
+                            <td>身份证号码:{{item.cert_no}}</td>
+                            <td>联系电话:{{item.telephone}}</td>
+                        </tr>
+                    </tbody>
+                </table>
+            </div>
+            <div class="row mb-1" style="text-align: center">
+                <label class="col-lg-2 col-form-label text-lg-left">审核流程信息</label>
+            </div>
+            <div class="row mb-1">
+                <!-- 审核流程列表 -->
+                <table class="table table-sm table-striped table-hover table-bordered bg-white">
+                    <thead>
+                        <tr>
+                            <th width="10%">序号</th>
+                            <th>审核类型</th>
+                            <th>审核时间</th>
+                            <th>审核人</th>
+                            <th>审核意见</th>
+                        </tr>
+                    </thead>
+                    <tbody>
+                        <tr *ngFor="let it of authList; let i = index">
+                            <td>{{i+1}}</td>
+                            <td>{{it.auth_type | frameDict:'ByAuthType'}}</td>
+                            <td>{{it.auth_time}}</td>
+                            <td>{{it.optr_name}}</td>
+                            <td>{{it.auth_remark}}</td>
+                        </tr>
+                    </tbody>
+                </table>
+            </div>
+            <div class="row mb-1" style="text-align: center">
+                <label class="col-lg-2 col-form-label text-lg-left">成绩列表</label>
+            </div>
+            <div class="row mb-1">
+                <!-- 成绩列表 -->
+                <table class="table table-sm table-striped table-hover table-bordered bg-white">
+                    <thead>
+                        <tr>
+                            <th>序号</th>
+                            <th>课程代码</th>
+                            <th>课程名称</th>
+                            <th>课程性质</th>
+                            <th>成绩来源</th>
+                            <th>原始成绩</th>
+                            <th>最终成绩</th>
+                            <th>是否合格</th>
+                            
+                        </tr>
+                    </thead>
+                    <tbody>
+                        <tr *ngFor="let it of scoreList; let i = index">
+
+                            <td>{{i+1}}</td>
+                            <td>{{it.course_code}}</td>
+                            <td>{{it.course_name}}</td>
+                            <td [innerHTML]="it.course_nature | frameDict:'CourseNature'"></td>
+                            <td [innerHTML]="it.score_source | frameDict:'ScoreSource'"></td><!--成绩来源-->
+                            <td>{{formateOrignScore(it)}}</td><!--原始成绩-->
+                            <td>{{formateFinalScore(it)}}</td><!--最终成绩(合成后)-->
+                            <td [innerHTML]="it.is_passed | frameDict:'YesOrNo'"></td>
+
+                        </tr>
+                    </tbody>
+                </table>
+            </div>
+    </form>
+</ng-template>
+
+<!--*******************************手工录入分数**********************************************************************-->
+<ng-template #manualInputModal>
+    <div class="modal-content">
+        <div class="modal-header info-success-qm">
+            <div class="pull-left">
+                <em class="fa-lg fas fa-edit "></em> 编辑页面
+            </div>
+            <button type="button" class="close" (click)="inputModalWin.hide()">×</button>
+        </div>
+
+        <!-- 1@3 -->
+        <div class="modal-body">
+            <div [ngTemplateOutlet]="manualInputTemplate"></div>
+        </div>
+
+        <div class="modal-footer">
+            <button class="btn btn-info" (click)="saveMannualInput()">
+                <i class="fa fa-info-circle"> </i> 保存
+            </button>
+            <button class="btn btn-default" (click)="inputModalWin.hide()">
+                <i class="icon-close"> </i> 取消
+            </button>
+        </div>
+    </div>
+</ng-template>
+
+<ng-template #manualInputTemplate>
+    <form [formGroup]="scoreFormModel" class="form-validate form-horizontal" novalidate="">
+            <div class="row mb-1">
+                <label class="col-md-2 col-form-label text-md-right">课程代码</label>
+                <div class="col-md-3">
+                    <input type="text" class="form-control" formControlName="course_code" [(ngModel)]="inputScore.course_code" [formControl]="scoreFormModel.controls['course_code']"/>
+                    <span class="text-danger" *ngIf="scoreFormModel.get('course_code').hasError('required') && (scoreFormModel.get('course_code').dirty || scoreFormModel.get('course_code').touched)">请输入课程代码</span>
+                </div>
+            </div>
+            <div class="row mb-1">
+                <label class="col-md-2 col-form-label text-md-right">课程名称</label>
+                <div class="col-md-3">
+                    <input type="text" class="form-control" formControlName="course_name" [(ngModel)]="inputScore.course_name" [formControl]="scoreFormModel.controls['course_name']"/>
+                    <span class="text-danger" *ngIf="scoreFormModel.get('course_name').hasError('required') && (scoreFormModel.get('course_name').dirty || scoreFormModel.get('course_name').touched)">请输入课程代码</span>
+                </div>
+            </div>
+            <div class="row mb-1">
+                <label class="col-md-2 col-form-label text-md-right">最终成绩</label>
+                <div class="col-md-3">
+                    <input class="form-control" formControlName="final_score" type="number" 
+                        [(ngModel)]="inputScore.final_score" [formControl]="scoreFormModel.controls['final_score']"  width="100"/>
+                    <span class="text-danger" *ngIf="scoreFormModel.get('final_score').hasError('required') && (scoreFormModel.get('final_score').dirty || scoreFormModel.get('final_score').touched)">请输入最终成绩</span>
+                </div>
+            </div>
+    </form>
+</ng-template>
+
+<!--*****************************课程顶替**************************************************************************-->
+<ng-template #courseReplModal>
+    <div class="modal-content">
+        <div class="modal-header info-success-qm">
+            <div class="pull-left">
+                <em class="fa-lg fas fa-edit "></em> 课程顶替
+            </div>
+            <button type="button" class="close" (click)="courseReplWin.hide()">×</button>
+        </div>
+
+        <!-- 1@3 -->
+        <div class="modal-body">
+            <div [ngTemplateOutlet]="courseReplTemplate"></div>
+        </div>
+
+        <div class="modal-footer">
+            <button class="btn btn-info" (click)="replSave()">
+                <i class="fa fa-info-circle"> </i> 顶替
+            </button>
+            <button class="btn btn-default" (click)="courseReplWin.hide()">
+                <i class="icon-close"> </i> 取消
+            </button>
+        </div>
+    </div>
+</ng-template>
+
+<ng-template #courseReplTemplate>
+    <div class="col-lg-12 ml-0">
+        <!-- 审核流程列表 -->
+        <table class="table table-sm table-striped table-hover table-bordered bg-white">
+            <thead>
+                <tr>
+                    <th>
+                        <div class="checkbox c-checkbox">
+                            <label>
+                            </label>
+                        </div>
+                    </th>
+                    <th width="10%">序号</th>
+                    <th>课程代码</th>
+                    <th>课程名称</th>
+                    <th>分数</th>
+                </tr>
+            </thead>
+            <tbody>
+                <tr *ngFor="let it of replScoreList; let i = index">
+                    <td>
+                        <div class="checkbox c-checkbox input-group-sm">
+                            <label>
+                                <label class="radio-inline c-radio" style="margin: 0px !important">
+                                    <input type="radio" name="radio" [value]="it.id" (click)="replRadioCheckFun(it)"/>
+                                    <span class="fa fa-circle" style="margin: 0px !important"></span>
+                                  </label>
+                            </label>
+                        </div>
+                    </td>
+                    <td>{{i+1}}</td>
+                    <td>{{it.course_code}}</td>
+                    <td>{{it.course_name}}</td>
+                    <td>{{it.final_score}}</td>
+                </tr>
+            </tbody>
+        </table>
+    </div>
+</ng-template>
+
+<!--**********************************老生成绩*******************************************************************-->
+<ng-template #oldCjModal>
+        <div class="modal-content">
+            <div class="modal-header info-success-qm">
+                <div class="pull-left">
+                    <em class="fa-lg fas fa-edit "></em> 老生成绩
+                </div>
+                <button type="button" class="close" (click)="oldCjWin.hide()">×</button>
+            </div>
+    
+            <!-- 1@3 -->
+            <div class="modal-body">
+                <div [ngTemplateOutlet]="oldCjTemplate"></div>
+            </div>
+    
+            <div class="modal-footer">
+                <button class="btn btn-info" (click)="selectOldCj()">
+                    <i class="fa fa-info-circle"> </i> 选择
+                </button>
+                <button class="btn btn-default" (click)="oldCjWin.hide()">
+                    <i class="icon-close"> </i> 取消
+                </button>
+            </div>
+        </div>
+</ng-template>
+    
+<ng-template #oldCjTemplate>
+        <div class="row mb-3 ml-1">
+            <div class="col-lg-10  ml-0 form-inline">
+                <div class="input-group mr-1 input-group-sm">
+                    <label>关键字:</label>
+                    <input name="keyword" [(ngModel)]="oldCjQuery.query" class="input-sm form-control" type="text"
+                                value="" maxlength="50" placeholder="请输入查询关键字" width="40">
+                </div>
+                <button class="btn btn-primary btn-rounded btn-outline btn-sm  mr-1" (click)="oldCjPager.goSearch()">
+                        <i class="fa fa-search"></i> 查询</button>
+            </div>
+        </div>
+        <div class="row mb-2">
+            <div class="col-lg-12 ml-0">
+                <!-- 审核流程列表 -->
+                <table class="table table-sm table-striped table-hover table-bordered bg-white">
+                    <thead>
+                        <tr>
+                            <th>
+                                <div class="checkbox c-checkbox">
+                                    <label>
+                                        <input type="checkbox" (change)="oldCjPager.checkedMasterToggle($event)" />
+                                        <span class="fa fa-check"></span>
+                                    </label>
+                                </div>
+                            </th>
+                            <th width="10%">序号</th>
+                            <th>考生姓名</th>
+                            <th>准考证号</th>
+                            <th>专业代号</th>
+                            <th>课程代码</th>
+                            <th>成绩</th>
+                            <th>年</th>
+                            <th>月</th>
+                        </tr>
+                    </thead>
+                    <tbody>
+                        <tr *ngFor="let it of oldCjPager.getRecords(); let i = index">
+                            <td>
+                                <div class="checkbox c-checkbox input-group-sm">
+                                    <label>
+                                        <input type="checkbox" [value]="it.id" [(checked)]="it.isChecked"
+                                            [(ngModel)]="it.isChecked" />
+                                        <span class="fa fa-check"></span>
+                                    </label>
+                                </div>
+                            </td>
+                            <td>{{i+1}}</td>
+                            <td>{{it.xingming}}</td>
+                            <td>{{it.zhunkaozhenghao}}</td>
+                            <td>{{it.zhuanyedaihao}}</td>
+                            <td>{{it.kechengdaihao}}</td>
+                            <td>{{it.chengji}}</td>
+                            <td>{{it.nian}}</td>
+                            <td>{{it.yue}}</td>
+                        </tr>
+                    </tbody>
+                </table>
+                <frame-pager [url]="OLD_CJ_URL" hideSearch="true" hasCheck="true" #oldCjPager (preReqEvent)="oldCjSearch($event)"></frame-pager>
+            </div>
+        </div>
+</ng-template>
+
+<!--**********************************转入成绩关联-单选-radio*******************************************************************-->
+<ng-template #turnInAssocitModal>
+    <div class="modal-content">
+        <div class="modal-header info-success-qm">
+            <div class="pull-left">
+                <em class="fa-lg fas fa-edit "></em> 转入关联
+            </div>
+            <button type="button" class="close" (click)="turnInAssocitWin.hide()">×</button>
+        </div>
+
+        <!-- 1@3 -->
+        <div class="modal-body">
+            <div [ngTemplateOutlet]="turnInAssocitTemplate"></div>
+        </div>
+
+        <div class="modal-footer">
+            <button class="btn btn-info" (click)="selectTurnInScore()">
+                <i class="fa fa-info-circle"> </i> 选择
+            </button>
+            <button class="btn btn-default" (click)="turnInAssocitWin.hide()">
+                <i class="icon-close"> </i> 取消
+            </button>
+        </div>
+    </div>
+</ng-template>
+
+<ng-template #turnInAssocitTemplate>
+    <div class="row mb-3 ml-1">
+        <div class="col-lg-10  ml-0 form-inline">
+            <div class="input-group mr-1 input-group-sm">
+                <label>姓名:</label>
+                <input name="stdName" [(ngModel)]="turnInQuery.stdName" class="input-sm form-control" type="text"
+                            value="" maxlength="50" placeholder="请输入考生姓名" width="40">
+            </div>&nbsp;
+            <div class="input-group mr-1 input-group-sm">
+                <label>准考证号:</label>
+                <input name="ticketNo" [(ngModel)]="turnInQuery.ticketNo" class="input-sm form-control" type="text"
+                            value="" maxlength="50" placeholder="请输入准考证号" width="40">
+            </div>
+        </div>
+    </div>
+    <div class="row mb-3 ml-1">
+        <div class="col-lg-10  ml-0 form-inline">
+            <div class="input-group mr-1 input-group-sm">
+                <label>课程代码:</label>
+                <input name="courseCode" [(ngModel)]="turnInQuery.courseCode" class="input-sm form-control" type="text"
+                            value="" maxlength="50" placeholder="请输入课程代码" width="40">
+            </div>&nbsp;
+            <button class="btn btn-primary btn-rounded btn-outline btn-sm  mr-1" (click)="turnInQueryRequest()">
+                <i class="fa fa-search"></i> 查询</button>
+        </div>
+    </div>
+    <div class="row mb-2">
+        <div class="col-lg-12 ml-0">
+            <table class="table table-sm table-striped table-hover table-bordered bg-white">
+                <thead>
+                    <tr>
+                        <th>
+                            <div class="checkbox c-checkbox">
+                                <label>
+                                </label>
+                            </div>
+                        </th>
+                        <th width="10%">序号</th>
+                        <th>考生姓名</th>
+                        <th>准考证号</th>
+                        <th>课程代码</th>
+                        <th>课程名称</th>
+                        <th>转入成绩</th>
+                    </tr>
+                </thead>
+                <tbody>
+                    <tr *ngFor="let it of turnInScoreList; let i = index">
+                        <td>
+                            <div class="checkbox c-checkbox input-group-sm">
+                                <label class="radio-inline c-radio" style="margin: 0px !important">
+                                    <input type="radio" name="radio" [value]="it.id" (click)="turnInSelect(it)"  [(ngModel)]="radioItem.id"/>
+                                    <span class="fa fa-circle" style="margin: 0px !important"></span>
+                                </label>
+                            </div>
+                        </td>
+                        <td>{{i+1}}</td>
+                        <td>{{it.std_name}}</td>
+                        <td>{{it.ticket_no}}</td>
+                        <td>{{it.course_code}}</td>
+                        <td>{{it.course_name}}</td>
+                        <td>{{it.final_score}}</td>
+                    </tr>
+                </tbody>
+            </table>
+        </div>
+    </div>
+</ng-template>
+
+<!--**********************************关联准考证*******************************************************************-->
+<ng-template #ticketNoAssocitModal>
+    <div class="modal-content">
+        <div class="modal-header info-success-qm">
+            <div class="pull-left">
+                <em class="fa-lg fas fa-edit "></em> 关联准考证
+            </div>
+            <button type="button" class="close" (click)="closeAssoTicketWin();">×</button>
+        </div>
+
+        <!-- 1@3 -->
+        <div class="modal-body">
+            <div [ngTemplateOutlet]="ticketNoAssocitTemplate"></div>
+        </div>
+
+        <div class="modal-footer">
+
+        </div>
+    </div>
+</ng-template>
+
+<ng-template #ticketNoAssocitTemplate>
+    <div class="row mb-3 ml-1">
+        <div class="col-lg-10  ml-0 form-inline">
+            <div class="input-group mr-1 input-group-sm">
+                <label>准考证号:</label>
+                <input name="ticketNo" [(ngModel)]="ticketAssoQuery.ticketNo" class="input-sm form-control" type="text"
+                            value="" maxlength="50" placeholder="请输入准考证号" width="40">
+            </div>
+            <button class="btn btn-primary btn-rounded btn-outline btn-sm  mr-1" (click)="findStdTicketRefList();">
+                <i class="fa fa-search"></i> 查询
+            </button>&nbsp;&nbsp;
+            <button class="btn btn-primary bg-danger btn-sm  mr-1" (click)="selectTicketNoAssocit()">
+                <i class="fa fa-docker"> </i> 关联
+            </button>&nbsp;&nbsp;
+            <button class="btn btn-primary bg-danger btn-sm  mr-1" (click)="unSelectTicketNoAssocit()">
+                <i class="fa fa-undo"> </i> 取消关联
+            </button>&nbsp;
+        </div>
+    </div>
+    <div class="row mb-2">
+        <div class="col-lg-12 ml-0">
+            <table class="table table-sm table-striped table-hover table-bordered bg-white">
+                <thead>
+                    <tr>
+                        <th width="6%">
+                            <div class="checkbox c-checkbox">
+                                <label>
+                                </label>
+                            </div>
+                        </th>
+                        <th width="6%">序号</th>
+                        <th>考生姓名</th>
+                        <th>身份证</th>
+                        <th>准考证号</th>
+                        <th>学校</th>
+                        <th>手机号码</th>
+                        <th>地址</th>
+                        <th>关联状态</th>
+                    </tr>
+                </thead>
+                <tbody>
+                    <tr *ngFor="let it of stdTicketRefList; let i = index">
+                        <td>
+                            <div class="checkbox c-checkbox input-group-sm">
+                                <label class="radio-inline c-radio" style="margin: 0px !important">
+                                    <input type="radio" name="radio" [value]="it.id" (click)="stdTicketCheckFun(it)"  [(ngModel)]="ticketRadioItem.id"/>
+                                    <span class="fa fa-circle" style="margin: 0px !important"></span>
+                                  </label>
+                            </div>
+                        </td>
+                        <td>{{i+1}}</td>
+                        <td>{{it.std_name}}</td>
+                        <td>{{it.cert_no}}</td>
+                        <td>{{it.ticket_no}}</td>
+                        <!--<td [innerHTML]="it.std_source| frameDict:'StudentType'"></td>-->
+                        <td>{{it.school_name}}</td>
+                        <td>{{it.std_mobile}}</td>
+                        <td>{{it.std_address}}</td>
+                        <td>{{it.assoStatus}}</td>
+                    </tr>
+                </tbody>
+            </table>
+        </div>
+    </div>
+    <!--选中的考生准考证对应的成绩-->
+    <div class="row mb-2">
+        <div class="col-lg-12 ml-0" *ngIf="showTicketPage == true">
+            <table class="table table-sm table-striped table-hover table-bordered bg-white">
+                <thead>
+                    <tr>
+                        <th>
+                            <div class="checkbox c-checkbox input-group-sm">
+                                <label>
+                                    <!--<input type="checkbox" (change)="ticketAssoPager.checkedMasterToggle($event)" />
+                                    <span class="fa fa-check"></span>-->
+                                </label>
+                            </div>
+                        </th>
+                        <th width="10%">序号</th>
+                        <th>考生姓名</th>
+                        <th>准考证号</th>
+                        <th>课程代码</th>
+                        <th>课程名称</th>
+                        <th>成绩</th>
+                    </tr>
+                </thead>
+                <tbody>
+                    <tr *ngFor="let it of ticketAssoPager.getRecords(); let i = index">
+                        <td>
+                            <div class="checkbox c-checkbox input-group-sm">
+                                <label>
+                                    <!--<input type="checkbox" [value]="it.id" [(checked)]="it.isChecked"
+                                        [(ngModel)]="it.isChecked" />
+                                    <span class="fa fa-check"></span>-->
+                                </label>
+                            </div>
+                        </td>
+                        <td>{{i+1}}</td>
+                        <td>{{it.std_name}}</td>
+                        <td>{{it.ticket_no}}</td>
+                        <td>{{it.course_code}}</td>
+                        <td>{{it.course_name}}</td>
+                        <td>{{it.final_score}}</td>
+                    </tr>
+                </tbody>
+            </table>
+            <frame-pager [url]="TICKET_ASSO_SCORE_URL" hideSearch="true" hasCheck="true" #ticketAssoPager (preReqEvent)="ticketAssoSearch($event)"></frame-pager>
+        </div>
+    </div>    
+</ng-template>
+
+<!--**********************************毕业申请-手工引用考生*******************************************************************-->
+<ng-template #stdRefModal>
+    <div class="modal-content">
+        <div class="modal-header info-success-qm">
+            <div class="pull-left">
+                <em class="fa-lg fas fa-edit "></em> 毕业申请
+            </div>
+            <button type="button" class="close" (click)="stdRefWin.hide()">×</button>
+        </div>
+
+        <!-- 1@3 -->
+        <div class="modal-body">
+            <div [ngTemplateOutlet]="stdRefTemplate"></div>
+        </div>
+
+        <div class="modal-footer">
+            <button class="btn btn-info" (click)="selectStdRef()">
+                <i class="fa fa-info-circle"> </i> 选择
+            </button>
+            <button class="btn btn-default" (click)="stdRefWin.hide()">
+                <i class="icon-close"> </i> 取消
+            </button>
+        </div>
+    </div>
+</ng-template>
+
+<ng-template #stdRefTemplate>
+    <div class="row mb-3 ml-1">
+        <div class="col-lg-10  ml-0 form-inline">
+            <div class="input-group mr-1 input-group-sm">
+                <label>准考证:</label>
+                <input name="ticketNo" [(ngModel)]="stdRefQuery.ticketNo" class="input-sm form-control" type="text"
+                            value="" maxlength="30" placeholder="请输入准考证号" width="40">
+            </div>
+            <div class="input-group mr-1 input-group-sm">
+                <label>身份证:</label>
+                <input name="certNo" [(ngModel)]="stdRefQuery.certNo" class="input-sm form-control" type="text"
+                            value="" maxlength="30" placeholder="请输入身份证号" width="40">
+            </div>
+            <button class="btn btn-primary btn-rounded btn-outline btn-sm  mr-1" (click)="findStdRefList();">
+                    <i class="fa fa-search"></i> 查询</button>
+        </div>
+    </div>
+    <div class="row mb-4">
+        <div class="col-lg-12 ml-0">
+            <!-- 审核流程列表 -->
+            <table class="table table-sm table-striped table-hover table-bordered bg-white">
+                <thead>
+                    <tr>
+                        <th width="6%">
+                            <div class="checkbox c-checkbox">
+                                <label>
+                                </label>
+                            </div>
+                        </th>
+                        <th width="6%">序号</th>
+                        <th>考生姓名</th>
+                        <th>身份证</th>
+                        <th>准考证号</th>
+                        <th>考生来源</th>
+                        <th>学校</th>
+                        <th>性别</th>
+                        <th>手机号码</th>
+                        <th>地址</th>
+                    </tr>
+                </thead>
+                <tbody>
+                    <tr *ngFor="let it of stdRefList; let i = index">
+                        <td>
+                            <div class="checkbox c-checkbox input-group-sm">
+                                <label class="radio-inline c-radio" style="margin: 0px !important">
+                                    <input type="radio" name="radio" [value]="it.id" (click)="stdRefRadioCheckFun(it)"  [(ngModel)]="radioItem.id"/>
+                                    <span class="fa fa-circle" style="margin: 0px !important"></span>
+                                  </label>
+                            </div>
+                        </td>
+                        <td>{{i+1}}</td>
+                        <td>{{it.std_name}}</td>
+                        <td>{{it.cert_no}}</td>
+                        <td>{{it.ticket_no}}</td>
+                        <td [innerHTML]="it.std_source| frameDict:'StudentType'"></td>
+                        <td>{{it.school_name}}</td>
+                        <td [innerHTML]="it.std_sex| frameDict:'StdSexType'"></td>
+                        <td>{{it.std_mobile}}</td>
+                        <td>{{it.std_address}}</td>
+                    </tr>
+                </tbody>
+            </table>
+        </div>
+    </div>
+    <div class="row mb-2">
+        <div class="col-lg-12 ml-0 form-inline">
+            <div class="input-group mr-1 input-group-sm">
+                <label>专业:</label>
+                <flex-select [allowClear]="true"
+                    [(items)] = "majorList"
+                    respDataPath= "array"
+                    optionValueField="id"
+                    optionTextField="major_full_name"
+                    [(ngModel)]="stdRefQuery.majorId"
+                    placeholder="请选择"
+                    [ngModelOptions]="{standalone: true}"
+                    width = "100"
+                    noResultsFound = "无数据"
+                    >
+                </flex-select>
+            </div>&nbsp;&nbsp;
+            <div class="input-group mr-1 input-group-sm">
+                <label>主考学校:</label>
+                <flex-select [allowClear]="true"
+                    [(items)] = "masterSchoolList"
+                    respDataPath= "array"
+                    optionValueField="id"
+                    optionTextField="org_name"
+                    [(ngModel)]="stdRefQuery.masterSchoolId"
+                    placeholder="请选择"
+                    [ngModelOptions]="{standalone: true}"
+                    width = "100"
+                    noResultsFound = "无数据"
+                    >
+                </flex-select>
+            </div>&nbsp;&nbsp;
+        </div>
+    </div>
+</ng-template>

+ 106 - 0
src/app/routes/hm-soft/by/audit/school-audit/query-by-score.component.scss

@@ -0,0 +1,106 @@
+.modal-xlg {
+    max-width: 1100px;
+}
+
+.jf-org {
+    border-width: 0;
+    background-color: #ecf0f5;
+}
+
+.jf-org .jf-org-tab {
+    background-color: #fff;
+    border-color: #fff;
+    height: 40px;
+    line-height: 40px;
+}
+
+.panel-control {
+    padding-left: 0;
+    height: 100%;
+    position: relative;
+    padding: 0 0px;
+}
+
+.panel-control:before {
+    content: '';
+    display: inline-block;
+    height: 100%;
+    vertical-align: middle;
+    left: -1em;
+    position: relative;
+}
+
+.nav {
+    padding-left: 0;
+    list-style: none;
+}
+
+.nav-tabs {
+    margin: 0;
+    display: inline-block;
+    height: 40px;
+    vertical-align: bottom;
+    border: 0;
+}
+
+.nav-tabs:before {
+    display: table;
+    content: " ";
+}
+
+
+.panel-heading {
+    position: relative;
+    height: 40px;
+    padding: 0;
+    color: #2b425b;
+    border-bottom: 1px solid transparent;
+    border-top-left-radius: 3px;
+    border-top-right-radius: 3px;
+    background-color: #fff;
+}
+
+
+.nav-tabs > li:hover {
+    background-color: #edf2f6;
+    color: #35a4f2;
+    
+}
+
+
+.li-class-active{
+    display: inline-block;
+    text-align: center;
+    width: 150px;
+    color: #35a4f2;
+    background-color: #edf2f6;
+    cursor:pointer;
+    line-height: 40px;
+    border-top-left-radius: 0;
+    border-top-right-radius: 0;
+    padding: 0 15px;
+    border-radius: 0;
+    margin-right: 0;
+    border-right: 1px solid #ddd;
+    opacity: .6;
+}
+
+.li-class{
+    display: inline-block;
+    text-align: center;
+    width: 150px;
+    color: #000;
+    background-color: #fff;
+    cursor:pointer;
+    line-height: 40px;
+    border-top-left-radius: 0;
+    border-top-right-radius: 0;
+    padding: 0 15px;
+    border-radius: 0;
+    margin-right: 0;
+    border-right: 1px solid #ddd;
+    opacity: .6;
+}
+
+
+

+ 298 - 0
src/app/routes/hm-soft/by/audit/school-audit/query-by-score.component.ts

@@ -0,0 +1,298 @@
+import { Component, OnInit, TemplateRef, ViewChild } from "@angular/core";
+import { FormBuilder, Validators, FormGroup} from '@angular/forms';
+import { CustomValidators } from 'ng2-validation';
+import { BsModalService } from "ngx-bootstrap/modal";
+import { FlexTableComponent } from "../../../../../shared/common/FlexTable.component";
+import { AppComponent } from "../../../../../app.component";
+import {FrameUploaderComponent} from '../../../../../core/uploader/uploader.component';
+import { FrameRequest } from "../../../../../shared/frame/frame-request";
+import { FramePagerComponent } from "../../../../../core/pager/pager.component";
+import { FrameFunction } from "../../../../../shared/frame/frame_function";
+import { ThemesService } from "../../../../../core/themes/themes.service";
+import * as _ from 'lodash';
+
+@Component({
+  selector: "app-pl-querybyscore",
+  templateUrl: "./query-by-score.component.html",
+  styleUrls: ["./query-by-score.component.scss"]
+})
+export class QueryByScoreComponent extends FlexTableComponent implements OnInit {
+
+  @ViewChild('uploader')
+  uploader: FrameUploaderComponent;
+  @ViewChild('framePager')
+  framePager:FramePagerComponent;
+  @ViewChild('oldCjPager')
+  oldCjPager:FramePagerComponent;
+  @ViewChild('ticketAssoPager')
+  ticketAssoPager:FramePagerComponent;
+
+  courseList=[];
+  //TODO
+  QUERY_URL = "by/byApply/queryPage.htm";
+  DELETE_URL = "by/byApply/delete.htm";
+  GET_URL = "by/byApply/get.htm";
+  ADD_URL = "by/byApply/add.htm";
+  EDIT_URL = "by/byApply/edit.htm";
+
+  ORG_LIST_URL = "cf/cfOrganization/list.htm";
+  AUTH_DETAIL_URL = "by/byApply/getdetail.htm";
+  AUTH_LIST_URL = "by/byApply/viewauth.htm";//审核记录
+  OLD_CJ_URL = "hz/cjJigechengjiOld/page.htm";
+  UPLOAD_URL = "pl/byApply/upload.htm";
+  TICKET_ASSO_SCORE_URL = "kj/kjUnifiedScoreDetail/ticketassopage.htm";//准考证关联成绩查询
+
+  List_URL = "std/stdRegInfo/list.htm";
+
+  HISTROY_SCORE_URL = "kj/kjUnifiedScoreDetail/byPrediction.htm";
+
+
+  orgList = [];
+  filePath : String;
+  scoreList = [];//考生的毕业成绩Map
+  majorList = [];
+
+
+
+  majorLevel = "";
+
+
+  photo_url: any;
+
+
+  constructor(
+    public bsModalService: BsModalService,
+    fb: FormBuilder
+  ) {
+    super();
+    this.formModel = fb.group({
+      id: [null],
+      'std_name' : [null],
+      'cert_no': [null],
+      'ticket_no': [null],
+      'std_sex': [null],
+      'nation': [null],
+      'std_birth': [null],
+      'native_prov': [null],
+      'native_city': [null],
+      'political': [null],
+      'pre_edu': [null],
+      'work_unit': [null],
+      'telephone': [null],
+      'address': [null],
+      'post_code': [null],
+      'radioSelect' : [null, Validators.compose([Validators.required])],
+      'remark' : [null, Validators.compose([Validators.required])],
+    });
+    
+  }
+
+  ngOnInit() {
+  
+    FrameRequest.requestMap("by/byApply/initdata.htm", {}, async (map)=>{
+     
+			this.photo_url = map.photo_url;
+    });
+
+  }
+
+  public query = {
+    query: "",
+    cityOrgId: "",
+    masterSchoolId: "",
+    jionSchoolId: "",
+    examTimeId: "",
+    majorId: "",
+    status: "",
+    std_source:""
+  };
+
+  
+
+  isActive=0;
+
+  stdList = [];
+  ticket_no: any;
+  std_name: any;
+  cert_no: any;
+  std_mobile: any;
+
+  majorArraySource: any;
+  majorArray: any;
+
+  historyScore = []; //考生历史成绩
+  orderNum : any;
+
+  searchData(event){
+    if(!this.query.query){
+      AppComponent.alert({title:"信息提示",text:"请填写关键字!"});
+      return;
+    }else{
+      
+      this.framePager.reload();
+
+    }
+
+  }
+
+  searchStd() {
+    FrameRequest.requestArray(this.List_URL, {
+      ticket_no : this.ticket_no === undefined ? '': this.ticket_no,
+      std_name :this.std_name === undefined ? '': this.std_name,
+      cert_no : this.cert_no === undefined ? '': this.cert_no,
+      std_mobile: this.std_mobile === undefined ? '': this.std_mobile,
+    }, (array) => {
+      this.stdList = array;
+      if(array && array.length>0){
+        
+      }else{
+        AppComponent.GobalComponent.errorMsg("没有可查询的记录");
+      }
+     
+     });
+  }
+
+
+  //弹出审核框
+  showEditWin(obj) {
+   
+   
+    this.editShowType="only";
+    FrameRequest.requestMap(this.AUTH_DETAIL_URL, {id: obj.id}, (map) => {
+      this.item = map.detail;
+      this.majorLevel = map.majorLevel;
+      //this.scoreList = map.scoreMap;
+    });
+    //详情界面的成绩
+    FrameRequest.requestArray("by/byApply/getscorelistForQuery.htm", {id: obj.id}, (arrary)=>{
+      this.scoreList = arrary;
+    });
+  }
+
+    //弹出审核框
+    showEditWin1(obj) {
+
+      this.editShowType="only1";
+
+      FrameRequest.requestEntity("std/stdRegInfo/get.htm",{id: obj.id}, async (entity) => {
+        if(entity) {
+          this.item = entity;
+
+          FrameRequest.requestArray('std/stdRegInfo/queryOpenMajorAndStdMajor.htm',{major_id:this.item.major_id}, (array) => {
+              this.majorArraySource = array;
+              this.majorLevelChange(this.item.major_level);
+              this.majorChange(this.item);
+            })
+
+        }
+       
+      });
+
+     
+    }
+
+    majorLevelChange(major_level){
+     
+      this.majorFilterByLevel(major_level);
+  
+    }
+  
+    majorFilterByLevel(major_level){
+      this.majorArray = _.filter(this.majorArraySource,{'major_level': parseInt(major_level)});
+      
+    }
+
+    majorChange(item) {
+      if(!item.major_id){
+        item.major_id = "";
+      }
+      AppComponent.GobalComponent.setLoading(true);
+      FrameRequest.requestArray(this.HISTROY_SCORE_URL, {
+        ticket_no : item.ticket_no, 
+        major_id : item.major_id
+      }, (array) => {
+        this.historyScore = array;
+        this.orderNum = array.length;
+        AppComponent.GobalComponent.setLoading(false);
+      },(error)=>{
+        AppComponent.GobalComponent.setLoading(false);
+      }
+     );
+      
+    }
+
+
+
+
+  formateOrignScore(item) {
+    if (item.score_source == '顶替' || item.origin_score == '888') {
+      return '顶替';
+    } else if (item.score_source == '免考' || item.origin_score == '999') {
+      return '免考';
+    }
+    if (item.origin_score == '-9') {
+      return '缺考';
+    } else if (item.origin_score == '-3') {
+      return '违纪';
+    } else if (item.origin_score == '-2') {
+      return '免考';
+    } else if (item.origin_score == '-1') {
+      return '舞弊';
+    }
+    return item.origin_score;
+  }
+
+  formateFinalScore(item) {
+    if (item.score_source == '顶替' || item.final_score == '888') {
+      return '顶替';
+    } else if (item.score_source == '免考' || item.final_score == '999') {
+      return '免考';
+    }
+    if (item.final_score == '-9') {
+      return '缺考';
+    } else if (item.final_score == '-3') {
+      return '违纪';
+    } else if (item.final_score == '-2') {
+      return '免考';
+    } else if (item.final_score == '-1') {
+      return '舞弊';
+    }
+    return item.final_score;
+  }
+
+  
+
+  
+  downloadByScoreTable(id) {
+
+      AppComponent.GobalComponent.setLoading(true);
+      FrameRequest.download("by/byApply/downloadByScoreTable.htm",  {ids: id}, ()=>{
+          AppComponent.GobalComponent.setLoading(false);
+          AppComponent.GobalComponent.successMsg("下载成功!");
+      });
+
+  }
+
+  downloadStdMajorScoreTable(item) {
+    if (!item.major_id) {
+      AppComponent.alert({title:"信息提示",text:"请选择专业!"});
+      return;
+    }
+
+    AppComponent.GobalComponent.setLoading(true);
+    FrameRequest.download("by/byApply/downloadStdScoreTable.htm",  {std_id:item.id,major_id:item.major_id}, ()=>{
+        AppComponent.GobalComponent.setLoading(false);
+        AppComponent.GobalComponent.successMsg("下载成功!");
+    });
+
+}
+
+
+
+  changeLi(event,index,status){
+    //点击时,将索引值赋值给变量isActive可以实现点击切换样式
+    this.isActive = index;
+    
+  }
+
+}

+ 22 - 0
src/app/routes/hm-soft/by/audit/school-audit/query-by-score.module.ts

@@ -0,0 +1,22 @@
+import { NgModule} from '@angular/core';
+import { Routes, RouterModule } from '@angular/router';
+import { SharedModule } from '../../../../../shared/shared.module';
+import { HmSoftModule } from '../../../hmsoft.module';
+import { QueryByScoreComponent } from './query-by-score.component';
+ 
+const routes: Routes = [
+    { path: '', component: QueryByScoreComponent },
+];
+ 
+@NgModule({
+    imports: [
+      SharedModule,
+      HmSoftModule,
+      RouterModule.forChild(routes)
+    ],
+    declarations: [
+        QueryByScoreComponent
+    ],
+  
+  })
+export class QueryByScoreModule { }

+ 9 - 3
src/app/routes/hm-soft/by/audit/school-audit/school-audit.component.html

@@ -344,7 +344,7 @@
                         <td width="23%"><input class="form-control" type="text" [(ngModel)]="item.cert_no" [ngModelOptions]="{standalone: true}" readonly/></td>
                         <td rowspan="8" style="width:12%;text-align: center">
                                 <span *ngIf="item.photo_path">考生照片</span>
-                            <div *ngIf="item.photo_path" class="text-muted" style="vertical-align:middle;width: 180px;height: 240px;border:solid 1.5px #000000;">
+                            <div *ngIf="item.photo_path" class="text-muted image-container" style="width: 180px;height: 240px;border:solid 1.5px #000000;">
                                 <img  [src]="item.photo_path" style="width: 100%;height: 100%;" title="照片要求:宽480像素*高640像素,人像居中,蓝底,文件大小在20KB至40KB。">
                                 <button class="btn btn-info" style="margin-top:15px;" (click)="setStdByPhoto(); " title="将考生照片调整至宽480*高640且大小20-40KB并设为毕业照片。">
                                     <i class="fa fa-info-circle"> </i> 调整并设为毕业照片
@@ -354,7 +354,7 @@
 
                         <td rowspan="8" style="width:12%;text-align: center">
                                 <span *ngIf="item.std_by_photo">考生上传的毕业照片</span>
-                            <div *ngIf="item.std_by_photo" class="text-muted" style="width: 180px;height: 240px;border:solid 1.5px #000000;">
+                            <div *ngIf="item.std_by_photo" class="text-muted image-container" style="width: 180px;height: 240px;border:solid 1.5px #000000;">
                                 <img [src]="item.std_by_photo" style="width: 100%;height: 100%;" title="考生上传的毕业照片">
                                 <button class="btn btn-info" style="margin-top:15px;" (click)="changeStdByPhoto(); " title="将考生上传的照片作为毕业照片。">
                                     <i class="fa fa-info-circle"> </i> 设为毕业照片
@@ -365,8 +365,12 @@
 
                         <td rowspan="8" style="width:12%;text-align: center">
                                 <span *ngIf="item.by_photo_path">毕业照片</span>
-                            <div *ngIf="item.by_photo_path" class="text-muted" style="width: 180px;height: 240px;border:solid 1.5px #000000;">
+                            <div *ngIf="item.by_photo_path" class="text-muted image-container" style="width: 180px;height: 240px;border:solid 1.5px #000000;">
                                 <img [src]="item.by_photo_path" style="width: 100%;height: 100%;" alt="替换照片" (click)="showUploadImgDialog(uploadImgModal);" title="点击照片可重新上传照片。">
+                                <div class="line1"></div>
+                                <div class="line2"></div>
+                                <div class="line3"></div>
+                                <div class="line4"></div>
                                 <button class="btn btn-info" style="margin-top:15px;" (click)="showUploadImgDialog(uploadImgModal); " title="照片要求:宽480像素*高640像素,人像居中,蓝底,文件大小在20KB至40KB。">
                                     <i class="fa fa-info-circle"> </i> 重新上传毕业照片
                                 </button>
@@ -455,6 +459,8 @@
                                     
                                     <div style="text-align: right;font-size:13px;">
                                             <span class="ml-sm" >照片要求:宽480像素*高640像素,人像居中,蓝底,文件大小在20KB至40KB。</span>
+                                            <br>
+                                                <span class="ml-sm" >请根据毕业照片上的网格,确认人像要居中以及眼睛不能过高或过低。</span>
                                    </div>
                             </td>
                         </tr>

+ 46 - 0
src/app/routes/hm-soft/by/audit/school-audit/school-audit.component.scss

@@ -0,0 +1,46 @@
+.image-container {
+    position: relative;
+    display: inline-block;
+  }
+   
+  .image-container img {
+    display: block; /* Remove any default spacing below the image */
+    width: 100%; /* Optional: you can set a specific width */
+  }
+   
+  .line1 {
+    position: absolute;
+    top: 80px; /* 线条的起始垂直位置 */
+    left: 0;
+    width: 100%; /* 线条的长度 */
+    height: 1px; /* 线条的粗细 */
+    background:#F2F1F1; /* 线条的颜色 */
+  }
+
+  .line2 {
+    position: absolute;
+    top: 160px; /* 线条的起始垂直位置 */
+    left: 0;
+    width: 100%; /* 线条的长度 */
+    height: 1px; /* 线条的粗细 */
+    background:#F2F1F1; /* 线条的颜色 */
+  }
+
+  .line3 {
+    position: absolute;
+    top: 0; /* 线条的起始垂直位置 */
+    left: 60px;
+    height: 100%; /* 线条的长度 */
+    width: 1px; /* 线条的粗细 */
+    background:#F2F1F1; /* 线条的颜色 */
+  }
+
+  .line4 {
+    position: absolute;
+    top: 0; /* 线条的起始垂直位置 */
+    left: 120px;
+    height: 100%; /* 线条的长度 */
+    width: 1px; /* 线条的粗细 */
+    background:#F2F1F1; /* 线条的颜色 */
+  }
+ 

+ 16 - 9
src/app/routes/hm-soft/by/audit/social-audit/social-audit.component.html

@@ -335,7 +335,7 @@
                         <td width="23%"><input class="form-control" type="text" [(ngModel)]="item.cert_no" [ngModelOptions]="{standalone: true}" readonly/></td>
                         <td rowspan="8" style="width:12%;text-align: center">
                                 <span *ngIf="item.photo_path">考生照片</span>
-                            <div *ngIf="item.photo_path" class="text-muted" style="vertical-align:middle;width: 180px;height: 240px;border:solid 1.5px #000000;">
+                            <div *ngIf="item.photo_path" class="text-muted image-container" style="width: 180px;height: 240px;border:solid 1.5px #000000;">
                                 <img  [src]="item.photo_path" style="width: 100%;height: 100%;" title="照片要求:宽480像素*高640像素,人像居中,蓝底,文件大小在20KB至40KB。">
                                 <button class="btn btn-info" style="margin-top:15px;" (click)="setStdByPhoto(); " title="将考生照片调整至宽480*高640且大小20-40KB并设为毕业照片。">
                                     <i class="fa fa-info-circle"> </i> 调整并设为毕业照片
@@ -345,7 +345,7 @@
 
                         <td rowspan="8" style="width:12%;text-align: center">
                                 <span *ngIf="item.std_by_photo">考生上传的毕业照片</span>
-                            <div *ngIf="item.std_by_photo" class="text-muted" style="width: 180px;height: 240px;border:solid 1.5px #000000;">
+                            <div *ngIf="item.std_by_photo" class="text-muted image-container" style="width: 180px;height: 240px;border:solid 1.5px #000000;">
                                 <img [src]="item.std_by_photo" style="width: 100%;height: 100%;" title="考生上传的毕业照片">
                                 <button class="btn btn-info" style="margin-top:15px;" (click)="changeStdByPhoto(); " title="将考生上传的照片作为毕业照片。">
                                     <i class="fa fa-info-circle"> </i> 设为毕业照片
@@ -356,12 +356,16 @@
 
                         <td rowspan="8" style="width:12%;text-align: center">
                                 <span *ngIf="item.by_photo_path">毕业照片</span>
-                            <div *ngIf="item.by_photo_path" class="text-muted" style="width: 180px;height: 240px;border:solid 1.5px #000000;">
-                                <img [src]="item.by_photo_path" style="width: 100%;height: 100%;" alt="替换照片" (click)="showUploadImgDialog(uploadImgModal);" title="点击照片可重新上传照片。">
-                                <button class="btn btn-info" style="margin-top:15px;" (click)="showUploadImgDialog(uploadImgModal); " title="照片要求:宽480像素*高640像素,人像居中,蓝底,文件大小在20KB至40KB。">
-                                    <i class="fa fa-info-circle"> </i> 重新上传毕业照片
-                                </button>
-                            </div>
+                                <div *ngIf="item.by_photo_path" class="text-muted image-container" style="width: 180px;height: 240px;border:solid 1.5px #000000;">
+                                        <img [src]="item.by_photo_path" style="width: 100%;height: 100%;" alt="替换照片" (click)="showUploadImgDialog(uploadImgModal);" title="点击照片可重新上传照片。">
+                                        <div class="line1"></div>
+                                        <div class="line2"></div>
+                                        <div class="line3"></div>
+                                        <div class="line4"></div>
+                                        <button class="btn btn-info" style="margin-top:15px;" (click)="showUploadImgDialog(uploadImgModal); " title="照片要求:宽480像素*高640像素,人像居中,蓝底,文件大小在20KB至40KB。">
+                                            <i class="fa fa-info-circle"> </i> 重新上传毕业照片
+                                        </button>
+                                    </div>
                             <div *ngIf="!item.by_photo_path" class="text-muted" style="align-content: center;">
                                 <button class="btn btn-info" (click)="showUploadImgDialog(uploadImgModal); " title="照片要求:宽480像素*高640像素,人像居中,蓝底,文件大小在20KB至40KB。">
                                     <i class="fa fa-info-circle"> </i> 上传毕业照片
@@ -446,7 +450,10 @@
                                         
                                         <div style="text-align: right;font-size:13px;">
                                                 <span class="ml-sm" >照片要求:宽480像素*高640像素,人像居中,蓝底,文件大小在20KB至40KB。</span>
-                                       </div>
+                                                <br>
+                                                <span class="ml-sm" >请根据毕业照片上的网格,确认人像要居中以及眼睛不能过高或过低。</span>
+
+                                            </div>
                                 </td>
                             </tr>
     

+ 46 - 0
src/app/routes/hm-soft/by/audit/social-audit/social-audit.component.scss

@@ -0,0 +1,46 @@
+.image-container {
+    position: relative;
+    display: inline-block;
+  }
+   
+  .image-container img {
+    display: block; /* Remove any default spacing below the image */
+    width: 100%; /* Optional: you can set a specific width */
+  }
+   
+  .line1 {
+    position: absolute;
+    top: 80px; /* 线条的起始垂直位置 */
+    left: 0;
+    width: 100%; /* 线条的长度 */
+    height: 1px; /* 线条的粗细 */
+    background:#F2F1F1; /* 线条的颜色 */
+  }
+
+  .line2 {
+    position: absolute;
+    top: 160px; /* 线条的起始垂直位置 */
+    left: 0;
+    width: 100%; /* 线条的长度 */
+    height: 1px; /* 线条的粗细 */
+    background:#F2F1F1; /* 线条的颜色 */
+  }
+
+  .line3 {
+    position: absolute;
+    top: 0; /* 线条的起始垂直位置 */
+    left: 60px;
+    height: 100%; /* 线条的长度 */
+    width: 1px; /* 线条的粗细 */
+    background:#F2F1F1; /* 线条的颜色 */
+  }
+
+  .line4 {
+    position: absolute;
+    top: 0; /* 线条的起始垂直位置 */
+    left: 120px;
+    height: 100%; /* 线条的长度 */
+    width: 1px; /* 线条的粗细 */
+    background:#F2F1F1; /* 线条的颜色 */
+  }
+ 

+ 1 - 0
src/app/routes/hm-soft/by/by-files-pdf-viewer/by-files-pdf-viewer-modal.ts

@@ -54,6 +54,7 @@ export class ByFilesPdfViewerModal extends FlexModalComponent implements OnInit
 	}
 
 	FrameRequest.downloadService(this.PDF_URL, {id: checkedArray.join()}).subscribe(res => {
+		debugger
 		let content = res.headers.get('content-disposition');
 		this.pdfname = content.substring(content.indexOf("=")+1,content.length);
 		let blob = new Blob([res.json()], { type: "application/pdf" });

+ 3 - 0
src/app/routes/hm-soft/by/by.module.ts

@@ -6,6 +6,7 @@ import { HmSoftSharedModule } from '../hmsoft.shared.module';
 
 const routes: Routes = [
 	{ path: 'schoolquery', loadChildren: './audit/school-audit/school-query.module#ShoolQueryModule'},
+	{ path: 'querybyscore', loadChildren: './audit/school-audit/query-by-score.module#QueryByScoreModule'},
 	{ path: 'graduatestatistic', loadChildren: './statistic/graduate-statistic/graduate-statistic.module#GraduateStatisticModule'},
 	{ path: 'turnin', loadChildren: './turn-in/by-turn-in-apply/by-turn-in-apply.module#ByTurnInApplyModule'},
 	{ path: 'inplace', loadChildren: './turn-time/by-turn-in-place/by-turn-in-place.module#ByTurnInPlaceModule'},
@@ -17,6 +18,8 @@ const routes: Routes = [
 	{ path: 'turninadd', loadChildren: './turn-in/by-turn-in-add/by-turn-in-add.module#ByTurnInAddModule'},
 	{ path: 'schoolaudit', loadChildren: './audit/school-audit/school-audit.module#ShoolAuditModule'},
 	{ path: 'repldetail', loadChildren: './replace/by-course-repl-detail/by-course-repl-detail.module#ByCourseReplDetailModule'},
+	{ path: 'repldetailPre', loadChildren: './replace/by-course-repl-detail-pre/by-course-repl-detail-pre.module#ByCourseReplDetailPreModule'},
+
 	{ path: 'finaledit', loadChildren: './audit/final-edit/final-edit.module#FinalEditModule'},
 	{ path: 'namelist', loadChildren: './statistic/by-name-list/by-name-list.module#ByNameListModule'},
 	{ path: 'bytime', loadChildren: './base/bytime/by-time.module#ByTimeModule'},

+ 426 - 0
src/app/routes/hm-soft/by/replace/by-course-repl-detail-pre/by-course-repl-detail-pre.component.html

@@ -0,0 +1,426 @@
+<div class="panel panel-default">
+  <div>
+    <!--标题-->
+    <div class="panel-title">
+      <nav aria-label="breadcrumb">
+        <ol class="breadcrumb">
+          <li class="breadcrumb-item active" aria-current="page">课程顶替管理</li>
+        </ol>
+      </nav>
+    </div>
+  </div>
+
+  <div class="panel-body ml-sm " [hidden]="editShowType=='only'">
+    <!--查询条件-->
+    <div class="row mb-3 ml-1" [hidden]="editShowType=='only'">
+      <div class="col-lg-12">
+        <form class="form-inline">
+          <!-- 支持排序 -->
+          <div class="input-group mr-1 input-group-sm">
+            <label>关键字:</label>
+            <input name="query" [(ngModel)]="query.query" class="input-sm form-control" type="text" value=""
+              maxlength="64" placeholder="请输入查询关键字">
+          </div>
+          <div class="input-group mr-1 input-group-sm">
+            <label>专业:</label>
+            <flex-select [allowClear]="true"[(items)] = "allMajorList"  optionValueField="id"
+              optionTextField="major_full_name" [(ngModel)]="query.major_id" placeholder="请选择" width="100"
+              noResultsFound="无数据" [ngModelOptions]="{standalone: true}">
+            </flex-select>
+          </div>
+          <div class="input-group mr-1 input-group-sm">
+            <label>原顶替课程:</label>
+            <flex-select [allowClear]="true"[(items)] = "allCourseList"  optionValueField="id"
+              optionTextField="code_course_name" [(ngModel)]="query.old_course_id" placeholder="请选择" width="100"
+              noResultsFound="无数据" [ngModelOptions]="{standalone: true}">
+            </flex-select>
+          </div>
+          <div class="input-group mr-1 input-group-sm">
+            <label>现课程:</label>
+            <flex-select [allowClear]="true"[(items)] = "allCourseList"  optionValueField="id"
+              optionTextField="code_course_name" [(ngModel)]="query.repl_course_id" placeholder="请选择" width="100"
+              noResultsFound="无数据" [ngModelOptions]="{standalone: true}">
+            </flex-select>
+          </div>
+          <button class="btn btn-primary btn-rounded btn-outline btn-sm  mr-1" (click)="framePager.goSearch()">
+            <i class="fa fa-search"></i> 查询</button>
+            <button class="btn btn-primary mr-1 btn-sm" (click)="export()" data-toggle="tooltip" data-placement="left"
+            title="导出">
+            <i class="fa icon-cloud-download"> 导出</i>
+          </button>
+        </form>
+      </div>
+    </div>
+
+    <!-- 工具栏 -->
+    <div class="row mb-2" [hidden]="editShowType=='only'">
+      <div class="col-lg-12">
+        <div class="pull-left" style="text-align: right;">
+          <button class="btn btn-primary mr-1 btn-sm" data-toggle="tooltip" data-placement="left"
+            (click)="shouModalWin(majorChooseModal,'modal-md')" title="添加">
+            <i class="fa fa-plus"></i> 新建计划课程顶替</button>
+          <button class="btn mr-1 btn-sm bg-danger" (click)="delete()" data-toggle="tooltip" data-placement="left"
+            title="删除">
+            <i class="fa fa-trash"> 删除</i>
+          </button>
+         
+        </div>
+
+      </div>
+    </div>
+
+    <!--表格-->
+    <div class="row" [hidden]="editShowType=='only'">
+      <div class="col-sm-12 ml-0">
+        <table class="table table-sm table-striped table-hover table-bordered bg-white">
+          <thead>
+            <tr>
+              <th>
+                <div class="checkbox c-checkbox">
+                  <label>
+                    <input type="checkbox" (change)="framePager.checkedMasterToggle($event)" />
+                    <span class="fa fa-check"></span>
+                  </label>
+                </div>
+              </th>
+              <!--<th>批次</th>-->
+              <th>专业名称</th>
+              <th align="center">专业层次</th>
+              <th>原课程代码-课程名称</th>
+              <th>现课程代码-课程名称</th>
+              <th>顶替规则</th>
+              <th style="width: 80px;" align="center">操作</th>
+            </tr>
+          </thead>
+          <tbody>
+            <tr *ngFor="let item of framePager.getRecords(); let i = index">
+              <td>
+                <div class="checkbox c-checkbox input-group-sm">
+                  <label>
+                    <input type="checkbox" [value]="item.id" [(checked)]="item.isChecked"
+                      [(ngModel)]="item.isChecked" />
+                    <span class="fa fa-check"></span>
+                  </label>
+                </div>
+              </td>
+              <!--<td align="center">{{item.year}}</td>-->
+              <td >{{item.major_code}}-{{item.major_name}}</td>
+              <td align="center">{{item.major_level | frameDict: 'MajorLevel'}}</td>
+              <td [innerHTML]="item.old_course_names | strReplace: '|':'<br>' "></td>
+              <td  [innerHTML]="item.repl_course_names | strReplace: '|':'<br>' "></td>
+              <td >{{item.remark}}</td>
+              <td align="center">
+                <a href="#" *ngIf="item.id>0" frameRole res="major_manage" (click)="delete(item)" title="删除"><em
+                    class="fa-lg fas fa-trash mr-1" style="color:#F56D6D"></em></a>
+              </td>
+            </tr>
+          </tbody>
+        </table>
+        <frame-pager [url]="QUERY_URL" hideSearch="true" hasCheck="true" #framePager (preReqEvent)="search($event)">
+        </frame-pager>
+      </div>
+      <!-- 编辑页面 -->
+      <div class="col-lg-12" *ngIf="item && editShowType != null &&editShowType!='modal'">
+        <ng-container *ngTemplateOutlet="editTemplateModal">
+        </ng-container>
+      </div>
+
+    </div>
+  </div>
+  <!-- only编辑页面-->
+  <div class="col-lg-12" *ngIf="editShowType != null &&editShowType =='only'">
+    <ng-container *ngTemplateOutlet="editTemplateModal">
+    </ng-container>
+  </div>
+</div>
+
+<!--编辑界面模板-->
+<ng-template #editFormTemplate>
+  <div class="row mt-3">
+    <div class="col-lg-12">
+      <h3 class="text-center font-weight-bold">{{major.major_name}}({{major.major_code}})专业新旧课程衔接</h3>
+    </div>
+  </div>
+  <div class="row mt-3">
+    <div class="col-lg-12">
+      <h5 class="col-lg-3 text-lg-left text-dark"><strong>专业下已做新旧课程衔接:</strong></h5>
+    </div>
+  </div>
+
+  <div class="row mt-3">
+    <div class="col-lg-12">
+      <table class="table table-sm table-striped table-hover table-bordered bg-white">
+        <thead>
+          <tr>
+            <th >序号</th>
+            <th >原计划规定课程及代号</th>
+            <th >新计划规定课程及代号</th>
+          </tr>
+        </thead>
+        <tbody>
+          <tr *ngFor="let has of hasList; let i = index">
+            <td >{{i+1}}</td>
+            <td  [innerHTML]="has.old_course_names | strReplace: '|':'<br>' "></td>
+            <td  [innerHTML]="has.repl_course_names | strReplace: '|':'<br>' "></td>
+          </tr>
+        </tbody>
+      </table>
+    </div>
+  </div>
+
+  <div class="row mt-3">
+    <div class="col-lg-12">
+      <h5 class="col-lg-3 text-lg-left text-dark"><strong>选择专业课程【被顶替课程】:</strong></h5>
+    </div>
+  </div>
+
+  <div class="row mt-3">
+
+    <div class="col col-lg-5">
+
+      <div class="card bg-light">
+        <div class="card-header">
+          <div class="col-lg-10">
+            <div class="input-group mr-1 input-group-sm">
+              <label>被顶替课程:</label>
+              <input class="input-sm form-control" type="text" placeholder="请输入课程代码或者名称" [(ngModel)]="query.mcName" (keyup) = "keyChange($event, query.mcName,0)" />
+              <button class="btn btn-primary btn-rounded btn-outline btn-sm  mr-1" (click)="getCourse(query.mcName,0)">
+                查询</button>
+            </div>
+          </div>
+        </div>
+        <scrollable class="list-group" style="height: 320px; overflow-y: auto;">
+          <div *ngFor='let item of mcList; let i = index'>
+            <a href="#" *ngIf="item" (click)="item.selected = !(item.selected?item.selected:false)" (dblclick)="item.selected=true;moveRight(0)"
+              [ngClass]="item.selected? 'active':''"
+              class="list-group-item list-group-item-action flex-column align-items-start">
+              <div class="d-flex w-100 justify-content-between">
+                <h5 class="mb-1">({{item.course_code}})-{{item.course_name}}-{{item.course_score}}</h5>
+              </div>
+            </a>
+          </div>
+        </scrollable>
+      </div>
+
+    </div>
+
+    <div style="width:20px;vertical-align: middle">
+      <div style="margin: 0 auto;top: 30%;position: relative;">
+        <a href="#" (click)="moveRight(0)"><em class="fa fa-angle-right bgicon"></em></a><br>
+        <a href="#" (click)="moveLeft(0)"><em class="fa fa-angle-left bgicon"></em></a><br>
+      </div>
+    </div>
+
+    <div class="col col-lg-5">
+
+      <div class="card bg-light">
+        <div class="card-header">
+          选择后专业课程
+        </div>
+        <scrollable class="list-group" style="height: 320px; overflow-y: auto;">
+          <div *ngFor='let item of mcArray; let i = index'>
+            <a href="#" *ngIf="item" (click)="item.selected = !(item.selected?item.selected:false)" (dblclick)="item.selected=true;moveLeft(0)"
+              [ngClass]="item.selected? 'active':''"
+              class="list-group-item list-group-item-action flex-column align-items-start">
+              <div class="d-flex w-100 justify-content-between">
+                <h5 class="mb-1">({{item.course_code}})-{{item.course_name}}-{{item.course_score}}</h5>
+              </div>
+            </a>
+          </div>
+        </scrollable>
+      </div>
+
+    </div>
+  </div>
+
+  <div class="row mt-3">
+    <div class="col-lg-12">
+      <h5 class="col-lg-3 text-lg-left text-dark"><strong>选择顶替课程【原课程】:</strong></h5>
+    </div>
+  </div>
+  <div class="row mt-3">
+
+    <div class="col col-lg-5">
+
+      <div class="card bg-light">
+        <div class="card-header">
+          <div class="col-lg-10">
+            <div class="input-group mr-1 input-group-sm">
+              <label>顶替课程:</label>
+              <input class="input-sm form-control" type="text" placeholder="请输入课程代码或者名称" [(ngModel)]="query.oldName"  (keyup) = "keyChange($event, query.oldName,1)"/>
+              <button class="btn btn-primary btn-rounded btn-outline btn-sm  mr-1" (click)="getCourse(query.oldName,1)">
+                查询</button>
+            </div>
+          </div>
+        </div>
+        <scrollable class="list-group" style="height: 320px; overflow-y: auto;">
+          <div *ngFor='let item of oldList; let i = index'>
+            <a href="#" *ngIf="item" (click)="item.selected = !(item.selected?item.selected:false)" (dblclick)="item.selected=true;moveRight(1);"
+              [ngClass]="item.selected? 'active':''"
+              class="list-group-item list-group-item-action flex-column align-items-start">
+              <div class="d-flex w-100 justify-content-between">
+                <h5 class="mb-1">({{item.course_code}})-{{item.course_name}}-{{item.course_score}}</h5>
+              </div>
+            </a>
+          </div>
+        </scrollable>
+      </div>
+
+    </div>
+
+    <div style="width:20px;vertical-align: middle">
+      <div style="margin: 0 auto;top: 30%;position: relative;">
+        <a href="#" (click)="moveRight(1)"><em class="fa fa-angle-right bgicon"></em></a><br>
+        <a href="#" (click)="moveLeft(1)"><em class="fa fa-angle-left bgicon"></em></a><br>
+      </div>
+    </div>
+
+    <div class="col col-lg-5">
+
+      <div class="card bg-light">
+        <div class="card-header">
+          选择后专业课程
+        </div>
+        <scrollable class="list-group" style="height: 320px; overflow-y: auto;">
+          <div *ngFor='let item of oldArray; let i = index'>
+            <a href="#" *ngIf="item" (click)="item.selected = !(item.selected?item.selected:false)" (dblclick)="item.selected=true;moveLeft(1);"
+              [ngClass]="item.selected? 'active':''"
+              class="list-group-item list-group-item-action flex-column align-items-start">
+              <div class="d-flex w-100 justify-content-between">
+                <h5 class="mb-1">({{item.course_code}})-{{item.course_name}}-{{item.course_score}}</h5>
+              </div>
+            </a>
+          </div>
+        </scrollable>
+      </div>
+
+    </div>
+  </div>
+
+  <div class="row mt-3">
+
+    <label class="col col-lg-2 col-form-label text-lg-left">是否适用全部专业:</label>
+    <div class="col-lg-2">
+      <select class="custom-select" [(ngModel)]="replDetail.is_all" frameDict [dictName]="'YesOrNo'"
+        [(dictValue)]="replDetail.is_all" (change)="chooseMajor()">
+      </select>
+    </div>
+
+    <label class="col col-lg-2 col-form-label text-lg-left">选择顶替规则:</label>
+    <div class="col-lg-2">
+      <select class="custom-select" [(ngModel)]="replDetail.rule_id" style="width:350px;">
+        <option *ngFor="let rule of replyRuleList" value="{{rule.id}}">
+          {{rule.remark}}
+        </option>
+      </select>
+    </div>
+
+  </div>
+
+  <div class="row mt-3" [hidden]="majorChooseFlag">
+    <div class="col-lg-12">
+      <h5 class="col-lg-3 text-lg-left text-dark"><strong>规则适用专业</strong></h5>
+    </div>
+  </div>
+
+  <div class="row mt-3" [hidden]="majorChooseFlag">
+    <div class="col-lg-12">
+      <table class="table table-bordered">
+        <thead>
+          <tr>
+            <th>序号</th>
+            <th>专业代码-专业名称</th>
+            <th>操作</th>
+          </tr>
+        </thead>
+        <tr *ngFor="let item of majorList; let i = index">
+          <td>{{i+1}}</td>
+          <td>{{item.major_code}}-{{item.major_name}}</td>
+          <td>
+            <a href="#" *ngIf="item.id>0" frameRole res="major_manage" (click)="deleteMajor(item.id)" title="删除">
+              <em class="fa-lg fas fa-trash mr-1" style="color:#F56D6D"></em>
+            </a>
+          </td>
+        </tr>
+      </table>
+    </div>
+  </div>
+
+  <div class="row mt-3">
+    <label class="col-lg-2 col-form-label text-lg-right">说明</label>
+    <div class="col-lg-10">
+      <textarea class="form-control"  placeholder="请填说明" [(ngModel)]="replDetail.remark"
+        rows="8"></textarea>
+    </div>
+  </div>
+
+</ng-template>
+
+
+<ng-template #editTemplateModal>
+  <div class="modal-content">
+    <div class="modal-header info-success-qm">
+      <div class="pull-left">
+        <em class="fa-lg fas fa-edit "></em> 课程顶替管理
+      </div>
+
+      <button type="button" class="close" (click)="hideReplyDetailModal()">×</button>
+    </div>
+
+    <div class="modal-body">
+      <div [ngTemplateOutlet]="editFormTemplate"></div>
+
+    </div>
+    <div class="modal-footer">
+      <button class="btn btn-info" (click)="saveReplyDetail()">
+        <i class="fa fa-info-circle"> </i> 保存
+      </button>
+      <button class="btn btn-default" (click)="hideReplyDetailModal()">
+        <i class="icon-close"> </i> 关闭
+      </button>
+    </div>
+  </div>
+</ng-template>
+
+<!-- 专业选择窗口 -->
+<ng-template #majorChooseModal>
+  <div class="modal-content">
+    <div class="modal-header info-success-qm">
+      <div class="pull-left">
+        <em class="fa-lg fas fa-edit "></em> 选择专业
+      </div>
+
+      <button type="button" class="close" (click)="hideModal()">×</button>
+    </div>
+
+    <div class="modal-body">
+      <div [ngTemplateOutlet]="majorChooseTemplate"></div>
+
+    </div>
+    <div class="modal-footer">
+      <button class="btn btn-info" (click)="showEdit(editTemplateModal,'only')">
+        <i class="fa fa-info-circle"> </i> 确定
+      </button>
+      <button class="btn btn-default" (click)="hideModal()">
+        <i class="icon-close"> </i> 取消
+      </button>
+    </div>
+  </div>
+</ng-template>
+
+<ng-template #majorChooseTemplate>
+  <form [formGroup]="formModel" (ngSubmit)="showEdit(editTemplateModal,'only')" class="form-validate form-horizontal"
+    novalidate>
+    <div class="row mt-3">
+      <label class="col-lg-3 col-form-label text-lg-right">专业:</label>
+      <div class="col-lg-6">
+        <flex-select [allowClear]="true" [(items)]="allMajorList" optionValueField="id"
+          optionTextField="major_full_name" [(ngModel)]="major_id" placeholder="请选择" formControlName="major_id"
+          [formControl]="formModel.controls['major_id']" width="222" noResultsFound="无数据">
+        </flex-select>
+        <span class="text-danger"
+          *ngIf="formModel.get('major_id').hasError('required') && (formModel.get('major_id').dirty || formModel.get('major_id').touched)">请选择专业</span>
+      </div>
+    </div>
+  </form>
+</ng-template>

+ 0 - 0
src/app/routes/hm-soft/by/replace/by-course-repl-detail-pre/by-course-repl-detail-pre.component.scss


+ 25 - 0
src/app/routes/hm-soft/by/replace/by-course-repl-detail-pre/by-course-repl-detail-pre.component.spec.ts

@@ -0,0 +1,25 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { ByCourseReplDetailPreComponent } from './by-course-repl-detail-pre.component';
+
+describe('ByCourseReplDetailComponent', () => {
+  let component: ByCourseReplDetailPreComponent;
+  let fixture: ComponentFixture<ByCourseReplDetailPreComponent>;
+
+  beforeEach(async(() => {
+    TestBed.configureTestingModule({
+      declarations: [ ByCourseReplDetailPreComponent ]
+    })
+    .compileComponents();
+  }));
+
+  beforeEach(() => {
+    fixture = TestBed.createComponent(ByCourseReplDetailPreComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});

+ 312 - 0
src/app/routes/hm-soft/by/replace/by-course-repl-detail-pre/by-course-repl-detail-pre.component.ts

@@ -0,0 +1,312 @@
+import { Component, OnInit, TemplateRef } from '@angular/core';
+import { FlexTableComponent } from '../../../../../shared/common/FlexTable.component';
+import { Validators, FormBuilder } from '@angular/forms';
+import { BsModalService } from 'ngx-bootstrap/modal';
+import { FrameRequest } from '../../../../../shared/frame/frame-request';
+import { AppComponent } from '../../../../../app.component';
+
+@Component({
+  selector: 'app-by-course-repl-detail-pre',
+  templateUrl: './by-course-repl-detail-pre.component.html',
+  styleUrls: ['./by-course-repl-detail-pre.component.scss']
+})
+export class ByCourseReplDetailPreComponent extends FlexTableComponent implements OnInit {
+
+  public query = {
+    query: "",
+    mcName: "",
+    oldName: "",
+    major_id : "",
+    old_course_id: "",
+    repl_course_id : ""
+  };
+  QUERY_URL = "by/byCourseReplDetailPre/page.htm";
+  ADD_URL = "by/byCourseReplDetailPre/add.htm";
+  DELETE_URL = "by/byCourseReplDetailPre/delete.htm";
+  GET_URL = "by/byCourseReplDetailPre/get.htm";
+  EDIT_URL = "by/byCourseReplDetailPre/edit.htm";
+  DETAIL_URL = "by/byCourseReplDetailPre/detail.htm";
+  MAJOR_URL = "pl/plMajorPre/list.htm";
+  COURSE_MAJOR_URL = "pl/plMajorPre/listMajor.htm ";
+  RULE_LIST_URL = "by/byCourseReplRule/list.htm";
+  DOWN_LOAD_URL = "by/byCourseReplDetailPre/export.htm";
+  COURSE_LIST_URL = "pl/plCoursePre/listAll.htm";
+
+  private major_id: any;
+  private hasList = []; //已关联的顶替规则
+  private mcList = []; //专业课程
+  private oldList = []; //老专业课程
+  private major: any; //专业信息
+  private mcArray = []; //选择的专业课程
+  private oldArray = []; //选择的老课程
+  private replDetail: any;
+  private replyRuleList = []; //根据选择的课程过滤的规则
+  private majorList = []; //使用的专业列表
+  private majorChooseFlag = true;
+  private mcTempList = [];//专业课程中间变量
+  private oldTempList = []; //老课程中间变量
+  allMajorList = [];
+  allCourseList = []; //所有的课程
+
+  constructor(public bsModalService: BsModalService, fb: FormBuilder) {
+    super();
+    this.formModel = fb.group({
+      major_id: [null, Validators.required]
+    });
+  }
+
+  ngOnInit() {
+    this.major = {};
+    this.replDetail = {};
+    FrameRequest.requestArray(this.MAJOR_URL, {}, (array) => {
+      this.allMajorList = array;
+    });
+    FrameRequest.requestArray(this.COURSE_LIST_URL, {}, (array) => {
+      this.allCourseList = array;
+    });
+
+    this.loadOldCourseData(null);
+  }
+
+
+  showEdit(template: TemplateRef<any>, editShowType) {
+    this.hideModal();
+    this.loadData();
+    if(this.replDetail){
+      this.replDetail.is_all='0';
+    }
+    this.editShowType = editShowType;
+  }
+
+  //加载数据
+  loadData() {
+    FrameRequest.requestMap(this.DETAIL_URL, { major_id: this.major_id }, (map) => {
+      this.major = map['major'];
+      this.hasList = map['hasList'];
+      this.mcList = map['mcList'];
+      this.mcTempList = map['mcList'];
+    });
+  }
+
+ //加载老课程数据
+ loadOldCourseData(oldName) {
+   if(null == oldName){
+     oldName = '';
+   }
+   
+  FrameRequest.requestMap("by/byCourseReplDetailPre/loadOldCourse.htm", {name:oldName}, (map) => {
+    this.oldList = map['oldList'];
+    this.oldTempList = map['oldList'];
+  });
+} 
+
+  chooseMajor() {
+    //根据选择的课程数目,查询适用的规则
+    if (this.oldArray && this.oldArray.length > 0 && this.mcArray && this.mcArray.length > 0) {
+      FrameRequest.requestArray(this.RULE_LIST_URL,
+        { old_num: this.oldArray.length, repl_num: this.mcArray.length }, (array) => {
+          this.replyRuleList = array;
+          this.replDetail.rule_id=this.replyRuleList[0].id;
+        });
+    }
+    //适用全部专业
+    if (this.replDetail.is_all == 1) {
+      if (this.mcArray && this.mcArray.length > 0) {
+        this.majorChooseFlag = false;
+        FrameRequest.requestArray(this.COURSE_MAJOR_URL,
+          {
+            course_ids: this.getIds(this.mcArray, 'mc').join(),
+            major_id: this.major_id
+          }, (array) => {
+            this.majorList = array;
+          });
+      }
+
+    } else {
+      this.majorChooseFlag = true;
+    }
+  }
+
+  //mc:专业课程
+  getIds(array: any, flag: any) {
+    let ids = [];
+    for (let i = 0; i < array.length; i++) {
+      if (flag === 'mc') {
+        ids.push(array[i]['course_id']);
+      } else {
+        ids.push(array[i]['id']);
+      }
+    }
+    return ids;
+  }
+
+  deleteMajor(major_id: number) {
+    this.majorList.splice(this.majorList.findIndex(major => major.id === major_id), 1);
+  }
+
+  //保存
+  saveReplyDetail() {
+    if (!this.checkNull()) return;
+    FrameRequest.request(this.ADD_URL, {
+      major_id: this.major_id,
+      rule_id: this.replDetail.rule_id,
+      is_all: this.replDetail.is_all,
+      remark: this.replDetail.remark,
+      old_course_ids: this.getIds(this.oldArray, 'course').join(),
+      repl_course_ids: this.getIds(this.mcArray, 'mc').join(),
+      major_ids: this.getIds(this.majorList, 'major').join()
+    }, () => {
+      AppComponent.GobalComponent.successMsg("保存成功");
+      //this.hideModal();
+      //this.framePager.reload();
+      this.loadData();
+      this.mcArray = [];
+      this.oldArray = [];
+      this.replyRuleList = [];
+      this.majorChooseFlag = true;
+      if(this.replDetail){
+        this.replDetail.is_all='0';
+      }
+
+    });
+  }
+
+  hideReplyDetailModal(){
+    this.hideModal();
+    this.framePager.reload();
+  }
+
+  //过滤课程
+  getCourse(keyword: string, flag: number) {
+    // 根据查询条件重新加载老课程信息
+    this.loadOldCourseData(keyword);
+
+    let tempArr = [];
+    tempArr = (flag === 0) ? this.mcTempList : this.oldTempList;
+    if (!keyword) {
+      (flag === 0) ? (this.mcList = this.mcTempList) : (this.oldList = this.oldTempList);
+    } else {
+      let arr = [];
+      for (let i = 0; i < tempArr.length; i++) {
+        if (tempArr[i]["course_code"].indexOf(keyword) >= 0
+          || tempArr[i]['course_name'].indexOf(keyword) >= 0) {
+          arr.push(tempArr[i]);
+        }
+      }
+      (flag === 0) ? (this.mcList = arr) : (this.oldList = arr);
+    }
+  }
+
+
+  checkNull(): boolean {
+    if (!this.mcArray || this.mcArray.length === 0) {
+      AppComponent.alert({ title: '提示', text: '请选择专业课程!' });
+      return false;
+    }
+    if (!this.oldArray || this.oldArray.length === 0) {
+      AppComponent.alert({ title: '提示', text: '请选择顶替课程!' });
+      return false;
+    }
+    if (this.replDetail.is_all === undefined || this.replDetail.is_all === '') {
+      AppComponent.alert({ title: '提示', text: '请选择是否适用全部专业!' });
+      return false;
+    }
+    if (!this.replDetail.rule_id) {
+      AppComponent.alert({ title: '提示', text: '请选择顶替规则!' });
+      return false;
+    }
+    return true;
+  }
+
+  moveRight(flag: number) {
+    let selectedArray = [];
+    let unselectedArray = [];
+    let list = [];
+    if (flag === 0) {
+      list = this.mcList;
+    } else {
+      list = this.oldList;
+    }
+    for (let index = 0; index < list.length; index++) {
+      let item = list[index];
+      if (item.selected === true) {
+        item.selected = false;
+        selectedArray.push(item);
+      } else {
+        unselectedArray.push(item);
+      }
+    }
+    if (flag == 0) {
+      this.mcList = unselectedArray;
+      this.mcTempList = this.remove(this.mcTempList, selectedArray);
+      this.mcArray = this.mcArray.concat(selectedArray);
+    } else {
+      this.oldList = unselectedArray;
+      this.oldTempList = this.remove(this.oldTempList, selectedArray);
+      this.oldArray = this.oldArray.concat(selectedArray);
+    }
+
+    this.chooseMajor();
+
+  }
+
+  //数组中添加元素
+  add(mcTempList: any[], selectedArray: any[]): any[] {
+    for (let i = 0; i < selectedArray.length; i++) {
+      mcTempList.push(selectedArray[i]);
+    }
+    return mcTempList;
+  }
+
+  //数组中移除元素
+  remove(oldTempList: any[], selectedArray: any[]) {
+    for (let i = 0; i < selectedArray.length; i++) {
+      oldTempList.splice(oldTempList.findIndex(item => item.id === selectedArray[i]['id']), 1);
+    }
+    return oldTempList;
+  }
+  
+  moveLeft(flag: number) {
+    let selectedArray = [];
+    let unselectedArray = [];
+    let array = [];
+    if (flag === 0) {
+      array = this.mcArray;
+    } else {
+      array = this.oldArray;
+    }
+    for (let index = 0; index < array.length; index++) {
+      let item = array[index];
+      if (item.selected === true) {
+        item.selected = false;
+        selectedArray.push(item);
+      } else {
+        unselectedArray.push(item);
+      }
+    }
+    if (flag === 0) {
+      this.mcArray = unselectedArray;
+      this.mcList = this.mcList.concat(selectedArray);
+      this.mcTempList = this.add(this.mcTempList, selectedArray);
+    } else {
+      this.oldArray = unselectedArray;
+      this.oldList = this.oldList.concat(selectedArray);
+      this.oldTempList = this.add(this.oldTempList, selectedArray);
+    }
+
+    this.chooseMajor();
+  }
+
+  //导出
+  export() {
+    FrameRequest.download(this.DOWN_LOAD_URL, {RequestLoading: true});
+  }
+
+  keyChange(event,keyword: string, flag: number) {
+    let keycode = window.event ? event.keyCode : event.which;
+    if(keycode == 13){//回车键
+      this.getCourse(keyword, flag);
+    }
+  }
+
+}

+ 22 - 0
src/app/routes/hm-soft/by/replace/by-course-repl-detail-pre/by-course-repl-detail-pre.module.ts

@@ -0,0 +1,22 @@
+import { NgModule} from '@angular/core';
+import { Routes, RouterModule } from '@angular/router';
+import { SharedModule } from '../../../../../shared/shared.module';
+import { HmSoftModule } from '../../../hmsoft.module';
+import { ByCourseReplDetailPreComponent } from './by-course-repl-detail-pre.component';
+ 
+const routes: Routes = [
+    { path: '', component: ByCourseReplDetailPreComponent },
+];
+ 
+@NgModule({
+    imports: [
+      SharedModule,
+      HmSoftModule,
+      RouterModule.forChild(routes)
+    ],
+    declarations: [
+        ByCourseReplDetailPreComponent
+    ],
+  
+  })
+export class ByCourseReplDetailPreModule { }

+ 20 - 8
src/app/routes/hm-soft/by/statistic/by-name-list/by-name-list.component.html

@@ -22,12 +22,12 @@
                             <div class="input-group mr-1 input-group-sm">
                                 <label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;关键字:</label>
                                 <input name="keyword" [(ngModel)]="query.query" class="input-sm form-control" type="text"
-                                            value="" maxlength="50" placeholder="请输入查询关键字" width="40">
+                                            value="" maxlength="50" placeholder="请输入查询关键字" width="60">
                             </div>
                         </td>
                         <td>
                             <div class="input-group mr-1 input-group-sm">
-                                <label>时间批次:</label>
+                                <label>毕业批次:</label>
                                 <flex-select [allowClear]="true"
                                     [url]= "'pl/plExamTime/listPlExamTimeForBy.htm'"
                                     respDataPath= "array"
@@ -36,7 +36,7 @@
                                     [(ngModel)]="query.exam_time_id"
                                     placeholder="请选择"
                                     [ngModelOptions]="{standalone: true}"
-                                    width = "100"
+                                    width = "150"
                                     noResultsFound = "无数据"
                                     (ngModelChange)="chooseMajor()"
                                     >
@@ -47,7 +47,7 @@
                             <div class="input-group mr-1 input-group-sm" *ngIf="logOrgType == 0">
                                 <label>受理单位:</label>
                                 <flex-select [allowClear]="true" [url]="ORG_URL" respDataPath="array" optionValueField="org_id"
-                                  optionTextField="org_name" [(ngModel)]="query.org_id" placeholder="请选择" width="100"
+                                  optionTextField="org_name" [(ngModel)]="query.org_id" placeholder="请选择" width="150"
                                   noResultsFound="无数据" [ngModelOptions]="{standalone: true}" (ngModelChange)="chooseMajor()">
                                 </flex-select>
                             </div>
@@ -58,7 +58,7 @@
                             <div class="input-group mr-1 input-group-sm" *ngIf="logOrgType == 0">
                                 <label>主考学校:</label>
                                 <flex-select [allowClear]="true" [url]="SCHOOL_URL" respDataPath="array" optionValueField="id"
-                                  optionTextField="org_name" [(ngModel)]="query.school_id" placeholder="请选择" width="100"
+                                  optionTextField="org_name" [(ngModel)]="query.school_id" placeholder="请选择" width="150"
                                   noResultsFound="无数据" [ngModelOptions]="{standalone: true}">
                                 </flex-select>
                               </div>
@@ -74,13 +74,25 @@
                                     [(ngModel)]="query.major_id"
                                     placeholder="请选择"
                                     [ngModelOptions]="{standalone: true}"
-                                    width = "100"
+                                    width = "150"
                                     noResultsFound = "无数据"
                                     >
                                 </flex-select>
                             </div>
                         </td>
-                        <td align="right">
+                        <td>
+                            <div class="input-group mr-1 input-group-sm">
+                                <label>毕业状态:</label>
+                                    <select name="status" 
+                                        width = "150"
+                                        [(ngModel)]="query.status" 
+                                        frameDict [dictName]="'ByStatus'" 
+                                        [ngModelOptions]="{standalone: true}"
+                                        class="form-control">
+                                    </select>
+                            </div>
+                        </td>
+                        <td>
                             <button class="btn btn-primary btn-rounded btn-outline btn-sm  mr-1" (click)="framePager.goSearch()">
                                 <i class="fa fa-search"></i> 查询</button>
                             <button class="btn btn-primary btn-rounded btn-outline btn-sm  mr-1" (click)="reset()">
@@ -95,7 +107,7 @@
                 <!-- 工具栏 -->
                 <div class="row mb-2" [hidden]="editShowType=='only'">
                     <div class="col-lg-12">
-                        <div class="pull-left">
+                        <div class="pull-left" style="text-align: right;">
                             <button class="btn btn-primary mr-1 btn-sm" data-toggle="tooltip" data-placement="left"
                                 (click)="exportNameList()" title="毕业生名册pdf">
                                 <i class="fa fa-plus"></i> 毕业生名册pdf</button>   

+ 12 - 4
src/app/routes/hm-soft/by/statistic/by-name-list/by-name-list.component.ts

@@ -84,7 +84,8 @@ export class ByNameListComponent extends FlexTableComponent implements OnInit {
     exam_time_id: "",
     std_source: "",
     org_id: "",
-    school_id: ""
+    school_id: "",
+    status:""
   };
 
   search(param) {
@@ -104,11 +105,15 @@ export class ByNameListComponent extends FlexTableComponent implements OnInit {
     if (!this.query.school_id) {
       this.query.school_id="";
     }
+    if (!this.query.status) {
+      this.query.status="";
+    }
     param.exam_time_id = this.query.exam_time_id;
     param.major_id = this.query.major_id;
     param.std_source = this.query.std_source;
     param.org_id = this.query.org_id;
     param.school_id = this.query.school_id;
+    param.status = this.query.status;
   }
 
 
@@ -130,7 +135,8 @@ export class ByNameListComponent extends FlexTableComponent implements OnInit {
       examTimeId: this.query.exam_time_id,
       majorId: this.query.major_id,
       orgId: this.query.org_id,
-      schoolId:this.query.school_id
+      schoolId:this.query.school_id,
+      status:this.query.status
     };
 
     AppComponent.confirmForTitle("温馨提醒","毕业生名册打印时,纸张选择A3,方向选择横向,根据打印预览效果,打印方式选择适合打印边际或实际大小。",()=>{
@@ -156,7 +162,8 @@ exportNameListForXls() {
     examTimeId: this.query.exam_time_id,
     majorId: this.query.major_id,
     orgId: this.query.org_id,
-    schoolId:this.query.school_id
+    schoolId:this.query.school_id,
+    status:this.query.status
   };
   //下载
   AppComponent.GobalComponent.setLoading(true);
@@ -177,7 +184,8 @@ exportNameListForJpg() {
     examTimeId: this.query.exam_time_id,
     majorId: this.query.major_id,
     orgId: this.query.org_id,
-    schoolId:this.query.school_id
+    schoolId:this.query.school_id,
+    status:this.query.status
   };
   //下载
   AppComponent.GobalComponent.setLoading(true);

+ 2 - 2
src/app/routes/hm-soft/cf/cf-operate-time/cf-operate-time.component.ts

@@ -38,8 +38,8 @@ export class CfOperateTimeComponent implements OnInit {
       exam_time_id: ["",Validators.required],
       collect_start_time: ["",null],
       collect_end_time: ["",null],
-      personal_start_time: ["",Validators.required],
-      personal_end_time: ["",Validators.required],
+      personal_start_time: ["",null],
+      personal_end_time: ["",null],
       pay_start_time: ["",null],
       pay_end_time: ["",null]
     });

+ 2 - 1
src/app/routes/hm-soft/common/modal/stdRegInfo/flex-std-reg-info.ts

@@ -15,9 +15,10 @@ export class StdRegInfoModal extends FlexModalComponent implements OnInit {
     "cert_no": "",
     "ticket_no": "",
     "belong_city_id": "",
+    "real_data":"1"
   };
 
-  QUERY_URL = "std/stdRegInfo/page.htm";
+  QUERY_URL = "std/stdRegInfo/page.htm?loadtrue=1";
   
   constructor(
     public bsModalService: BsModalService,

+ 60 - 2
src/app/routes/hm-soft/mk/cert_edu_apply/cert_edu_apply.component.local.html

@@ -304,7 +304,7 @@
         <tr>
             <td align="right">附件:</td>
             <td>
-                <img *ngIf="!isPakage(item.file_path)" style="width:200px;height: 200px" [src]="item.file_path">
+                <img *ngIf="!isPakage(item.file_path)" style="width:200px;height: 200px" [src]="item.file_path" (click)="showImg(imgeTemplateModal,item.file_path)">
                 <a *ngIf="isPakage(item.file_path)" [href]="item.file_path">打包压缩文件下载</a>
                 <br>
             </td>
@@ -359,4 +359,62 @@
             </button>
         </div>
     </div>
-</ng-template>
+</ng-template>
+
+
+            
+<ng-template #imgeTemplateModal>
+    <div class="modal-content"  style="width: 1200px;">
+      <div class="modal-header info-success-qm">
+        <div class="pull-left">
+          <em class="fa-lg fas fa-edit "></em> 图片详情
+        </div>
+        <button type="button" class="close" (click)="bsModalWin2.hide()">×</button>
+      </div>
+
+      <div style="text-align: center;padding-bottom: 0px;padding-top: 10px;">
+        <button class="btn btn-default" (click)="rotate(0)">
+            左旋转
+          </button>&nbsp;&nbsp;&nbsp;
+          <button class="btn btn-default" (click)="rotate(1)">
+              右旋转
+            </button>&nbsp;&nbsp;&nbsp;
+      <button class="btn btn-default" (click)="bsModalWin2.hide()">
+        <i class="icon-close"> </i> 关闭
+      </button>
+    </div>
+  
+      <!-- 1@3 -->
+      <div class="modal-body">
+        <div [ngTemplateOutlet]="imgeFormTemplate"></div>
+      </div>
+  
+      <div style="text-align: center;padding-bottom: 10px;">
+          <button class="btn btn-default" (click)="rotate(0)">
+              左旋转
+            </button>&nbsp;&nbsp;&nbsp;
+            <button class="btn btn-default" (click)="rotate(1)">
+                右旋转
+              </button>&nbsp;&nbsp;&nbsp;
+        <button class="btn btn-default" (click)="bsModalWin2.hide()">
+          <i class="icon-close"> </i> 关闭
+        </button>
+      </div>
+    </div>
+  </ng-template>
+
+
+  
+<ng-template #imgeFormTemplate>
+      
+      
+      <div class="row mb-1">
+        <div class="col-lg-12 col-form-label" style="overflow-y:auto;text-align: center;">
+          <img  [id]="file_path" [src]="file_path">
+        </div>
+  
+      </div>
+  
+  
+  </ng-template>
+  

+ 35 - 0
src/app/routes/hm-soft/mk/cert_edu_apply/cert_edu_apply.component.local.ts

@@ -40,6 +40,10 @@ export class CertEduApplyComponentLocal extends FlexTableComponent implements On
     bsModalWin_verify : any;
     certTypeList = [];
     orgList:any;
+    bsModalWin2 = null;
+    file_path = null;
+    curr_id = null;
+    current = 0;
 
     ngOnInit() {
         FrameRequest.requestArray('cf/cfOrganization/list.htm', {org_type: [1,4], status: 1}, (array) => {
@@ -309,6 +313,37 @@ export class CertEduApplyComponentLocal extends FlexTableComponent implements On
     
       }
 
+    
+showImg(editFormTemplateModal,path) {
+    this.file_path = path;
+    this.curr_id = path;
+    this.current =0;
+   
+    let css = "modal-bg";
+    this.bsModalWin2 = this.bsModalService.show(editFormTemplateModal, { class: css });
+  
+  }
+  
+  rotate(i){
+  
+    var imge = document.getElementById(this.curr_id);
+    if(i ==0){
+      this.current = (this.current-90)%360
+    }else if(i ==1){
+      this.current = (this.current+90)%360
+    }
+  
+    
+  
+  imge.style.transform='rotate('+this.current+'deg)';
+  
+  if(imge.offsetWidth>imge.offsetHeight){
+    imge.style.marginTop = (imge.offsetWidth-imge.offsetHeight)/2+"px";
+  
+  }
+    
+  }
+
 }
 
 

+ 59 - 2
src/app/routes/hm-soft/mk/cert_edu_apply/cert_edu_apply.component.prov.html

@@ -298,7 +298,7 @@
         <tr>
             <td  align="right">附件:</td>
             <td>
-                <img *ngIf="!isPakage(item.file_path)" style="width:200px;height: 200px" [src]="item.file_path">
+                <img *ngIf="!isPakage(item.file_path)" style="width:200px;height: 200px" [src]="item.file_path" (click)="showImg(imgeTemplateModal,item.file_path)">
                 <a *ngIf="isPakage(item.file_path)" [href]="item.file_path">打包压缩文件下载</a>
             </td>
         </tr>
@@ -416,4 +416,61 @@
                 </button>
             </div>
         </div>
-    </ng-template>
+    </ng-template>
+
+
+                     
+<ng-template #imgeTemplateModal>
+    <div class="modal-content"  style="width: 1200px;">
+      <div class="modal-header info-success-qm">
+        <div class="pull-left">
+          <em class="fa-lg fas fa-edit "></em> 图片详情
+        </div>
+        <button type="button" class="close" (click)="bsModalWin2.hide()">×</button>
+      </div>
+
+      <div style="text-align: center;padding-bottom: 0px;padding-top: 10px;">
+        <button class="btn btn-default" (click)="rotate(0)">
+            左旋转
+          </button>&nbsp;&nbsp;&nbsp;
+          <button class="btn btn-default" (click)="rotate(1)">
+              右旋转
+            </button>&nbsp;&nbsp;&nbsp;
+      <button class="btn btn-default" (click)="bsModalWin2.hide()">
+        <i class="icon-close"> </i> 关闭
+      </button>
+    </div>
+  
+      <!-- 1@3 -->
+      <div class="modal-body">
+        <div [ngTemplateOutlet]="imgeFormTemplate"></div>
+      </div>
+  
+      <div style="text-align: center;padding-bottom: 10px;">
+          <button class="btn btn-default" (click)="rotate(0)">
+              左旋转
+            </button>&nbsp;&nbsp;&nbsp;
+            <button class="btn btn-default" (click)="rotate(1)">
+                右旋转
+              </button>&nbsp;&nbsp;&nbsp;
+        <button class="btn btn-default" (click)="bsModalWin2.hide()">
+          <i class="icon-close"> </i> 关闭
+        </button>
+      </div>
+    </div>
+  </ng-template>
+
+
+  
+<ng-template #imgeFormTemplate>
+      
+      
+      <div class="row mb-1">
+        <div class="col-lg-12 col-form-label" style="overflow-y:auto;text-align: center;">
+          <img  [id]="file_path" [src]="file_path">
+        </div>
+  
+      </div>
+  
+  
+  </ng-template>

+ 37 - 0
src/app/routes/hm-soft/mk/cert_edu_apply/cert_edu_apply.component.prov.ts

@@ -55,6 +55,11 @@ export class CertEduApplyComponentProv extends FlexTableComponent implements OnI
     orgList = [];
     status:any;
 
+    bsModalWin2 = null;
+    file_path = null;
+    curr_id = null;
+    current = 0;
+
     constructor(
         public bsModalService: BsModalService,
         fb: FormBuilder
@@ -290,6 +295,38 @@ export class CertEduApplyComponentProv extends FlexTableComponent implements OnI
         });
     
       }
+
+      
+  
+showImg(editFormTemplateModal,path) {
+    this.file_path = path;
+    this.curr_id = path;
+    this.current =0;
+   
+    let css = "modal-bg";
+    this.bsModalWin2 = this.bsModalService.show(editFormTemplateModal, { class: css });
+  
+  }
+  
+  rotate(i){
+  
+    var imge = document.getElementById(this.curr_id);
+    if(i ==0){
+      this.current = (this.current-90)%360
+    }else if(i ==1){
+      this.current = (this.current+90)%360
+    }
+  
+    
+  
+  imge.style.transform='rotate('+this.current+'deg)';
+  
+  if(imge.offsetWidth>imge.offsetHeight){
+    imge.style.marginTop = (imge.offsetWidth-imge.offsetHeight)/2+"px";
+  
+  }
+    
+  }
 }
 
 

+ 65 - 3
src/app/routes/hm-soft/mk/cert_nedu_apply/cert_nedu_apply.component.local.html

@@ -437,10 +437,15 @@
                 <table class="table table-sm table-striped table-hover table-bordered bg-white">
                     <tr>
                         <td align="right" width="115px;">附件:</td>
-                        <td>
-                            <img style="width:200px;height: 200px" [src]="item.file_path">
+                        <td *ngIf="!isPakage(item.file_path)">
+                            <img  style="width:200px;height: 200px" [src]="item.file_path" (click)="showImg(imgeTemplateModal,item.file_path)">
+                            
+                        </td>
+                        <td *ngIf="isPakage(item.file_path)">
+                            <a  [href]="item.file_path">打包压缩文件下载</a>
                             
                         </td>
+                        
                     </tr>
                 </table>
             </div>  
@@ -489,4 +494,61 @@
             </button>
         </div>
     </div>
-</ng-template>
+</ng-template>
+
+    
+                  
+<ng-template #imgeTemplateModal>
+    <div class="modal-content"  style="width: 1200px;">
+      <div class="modal-header info-success-qm">
+        <div class="pull-left">
+          <em class="fa-lg fas fa-edit "></em> 图片详情
+        </div>
+        <button type="button" class="close" (click)="bsModalWin2.hide()">×</button>
+      </div>
+
+      <div style="text-align: center;padding-bottom: 0px;padding-top: 10px;">
+        <button class="btn btn-default" (click)="rotate(0)">
+            左旋转
+          </button>&nbsp;&nbsp;&nbsp;
+          <button class="btn btn-default" (click)="rotate(1)">
+              右旋转
+            </button>&nbsp;&nbsp;&nbsp;
+      <button class="btn btn-default" (click)="bsModalWin2.hide()">
+        <i class="icon-close"> </i> 关闭
+      </button>
+    </div>
+  
+      <!-- 1@3 -->
+      <div class="modal-body">
+        <div [ngTemplateOutlet]="imgeFormTemplate"></div>
+      </div>
+  
+      <div style="text-align: center;padding-bottom: 10px;">
+          <button class="btn btn-default" (click)="rotate(0)">
+              左旋转
+            </button>&nbsp;&nbsp;&nbsp;
+            <button class="btn btn-default" (click)="rotate(1)">
+                右旋转
+              </button>&nbsp;&nbsp;&nbsp;
+        <button class="btn btn-default" (click)="bsModalWin2.hide()">
+          <i class="icon-close"> </i> 关闭
+        </button>
+      </div>
+    </div>
+  </ng-template>
+
+
+  
+<ng-template #imgeFormTemplate>
+      
+      
+      <div class="row mb-1">
+        <div class="col-lg-12 col-form-label" style="overflow-y:auto;text-align: center;">
+          <img  [id]="file_path" [src]="file_path">
+        </div>
+  
+      </div>
+  
+  
+  </ng-template>

+ 42 - 0
src/app/routes/hm-soft/mk/cert_nedu_apply/cert_nedu_apply.component.local.ts

@@ -60,6 +60,11 @@ export class CertNeduApplyComponentLocal extends FlexTableComponent implements O
     bsModalWin_verify : any;
     orgList:any;
 
+    bsModalWin2 = null;
+    file_path = null;
+    curr_id = null;
+    current = 0;
+
     constructor(
         public bsModalService: BsModalService,
         fb: FormBuilder
@@ -224,6 +229,43 @@ export class CertNeduApplyComponentLocal extends FlexTableComponent implements O
       changeRemark(remark){
         this.item.verify_remark1=remark;
     }
+
+    isPakage(path){
+        if(path.indexOf('zip') != -1 || path.indexOf('rar') != -1){
+            return true;
+        }
+        return false;
+    }
+    
+showImg(editFormTemplateModal,path) {
+    this.file_path = path;
+    this.curr_id = path;
+    this.current =0;
+   
+    let css = "modal-bg";
+    this.bsModalWin2 = this.bsModalService.show(editFormTemplateModal, { class: css });
+  
+  }
+  
+  rotate(i){
+  
+    var imge = document.getElementById(this.curr_id);
+    if(i ==0){
+      this.current = (this.current-90)%360
+    }else if(i ==1){
+      this.current = (this.current+90)%360
+    }
+  
+    
+  
+  imge.style.transform='rotate('+this.current+'deg)';
+  
+  if(imge.offsetWidth>imge.offsetHeight){
+    imge.style.marginTop = (imge.offsetWidth-imge.offsetHeight)/2+"px";
+  
+  }
+    
+  }
 }
 
 

+ 64 - 3
src/app/routes/hm-soft/mk/cert_nedu_apply/cert_nedu_apply.component.prov.html

@@ -445,8 +445,12 @@
                     <table class="table table-sm table-striped table-hover table-bordered bg-white">
                         <tr>
                             <td align="right" width="115px;">附件:</td>
-                            <td>
-                                <img style="width:200px;height: 200px" [src]="item.file_path">
+                            <td *ngIf="!isPakage(item.file_path)">
+                                <img  style="width:200px;height: 200px" [src]="item.file_path" (click)="showImg(imgeTemplateModal,item.file_path)">
+                                
+                            </td>
+                            <td *ngIf="isPakage(item.file_path)">
+                                <a  [href]="item.file_path">打包压缩文件下载</a>
                                 
                             </td>
                         </tr>
@@ -540,4 +544,61 @@
                 </button>
             </div>
         </div>
-    </ng-template>
+    </ng-template>
+
+       
+                  
+<ng-template #imgeTemplateModal>
+    <div class="modal-content"  style="width: 1200px;">
+      <div class="modal-header info-success-qm">
+        <div class="pull-left">
+          <em class="fa-lg fas fa-edit "></em> 图片详情
+        </div>
+        <button type="button" class="close" (click)="bsModalWin2.hide()">×</button>
+      </div>
+
+      <div style="text-align: center;padding-bottom: 0px;padding-top: 10px;">
+        <button class="btn btn-default" (click)="rotate(0)">
+            左旋转
+          </button>&nbsp;&nbsp;&nbsp;
+          <button class="btn btn-default" (click)="rotate(1)">
+              右旋转
+            </button>&nbsp;&nbsp;&nbsp;
+      <button class="btn btn-default" (click)="bsModalWin2.hide()">
+        <i class="icon-close"> </i> 关闭
+      </button>
+    </div>
+  
+      <!-- 1@3 -->
+      <div class="modal-body">
+        <div [ngTemplateOutlet]="imgeFormTemplate"></div>
+      </div>
+  
+      <div style="text-align: center;padding-bottom: 10px;">
+          <button class="btn btn-default" (click)="rotate(0)">
+              左旋转
+            </button>&nbsp;&nbsp;&nbsp;
+            <button class="btn btn-default" (click)="rotate(1)">
+                右旋转
+              </button>&nbsp;&nbsp;&nbsp;
+        <button class="btn btn-default" (click)="bsModalWin2.hide()">
+          <i class="icon-close"> </i> 关闭
+        </button>
+      </div>
+    </div>
+  </ng-template>
+
+
+  
+<ng-template #imgeFormTemplate>
+      
+      
+      <div class="row mb-1">
+        <div class="col-lg-12 col-form-label" style="overflow-y:auto;text-align: center;">
+          <img  [id]="file_path" [src]="file_path">
+        </div>
+  
+      </div>
+  
+  
+  </ng-template>

+ 43 - 0
src/app/routes/hm-soft/mk/cert_nedu_apply/cert_nedu_apply.component.prov.ts

@@ -56,6 +56,11 @@ export class CertNeduApplyComponentProv extends FlexTableComponent implements On
     bsModalWin_verify : any;
     status:any;
 
+    bsModalWin2 = null;
+    file_path = null;
+    curr_id = null;
+    current = 0;
+
     constructor(
         public bsModalService: BsModalService,
         fb: FormBuilder
@@ -285,6 +290,44 @@ export class CertNeduApplyComponentProv extends FlexTableComponent implements On
     
       }
 
+      isPakage(path){
+        if(path.indexOf('zip') != -1 || path.indexOf('rar') != -1){
+            return true;
+        }
+        return false;
+    }
+
+    
+showImg(editFormTemplateModal,path) {
+    this.file_path = path;
+    this.curr_id = path;
+    this.current =0;
+   
+    let css = "modal-bg";
+    this.bsModalWin2 = this.bsModalService.show(editFormTemplateModal, { class: css });
+  
+  }
+  
+  rotate(i){
+  
+    var imge = document.getElementById(this.curr_id);
+    if(i ==0){
+      this.current = (this.current-90)%360
+    }else if(i ==1){
+      this.current = (this.current+90)%360
+    }
+  
+    
+  
+  imge.style.transform='rotate('+this.current+'deg)';
+  
+  if(imge.offsetWidth>imge.offsetHeight){
+    imge.style.marginTop = (imge.offsetWidth-imge.offsetHeight)/2+"px";
+  
+  }
+    
+  }
+
 }
 
 

+ 900 - 0
src/app/routes/hm-soft/pl/pl-course-pre/pl-course-pre.component.html

@@ -0,0 +1,900 @@
+<div class="panel panel-default">
+  <!--标题-->
+  <div class="panel-title">
+    <nav aria-label="breadcrumb">
+      <ol class="breadcrumb">
+        <li class="breadcrumb-item">计划管理</li>
+        <li class="breadcrumb-item active" aria-current="page">课程管理</li>
+      </ol>
+    </nav>
+  </div>
+  <div class="panel-body ml-sm"
+    [hidden]="editShowType=='only' || editShowType=='examArea' || editShowType == 'examAreaLimit' || editShowType == 'socialEnrol'">
+    <div class="card card-default">
+      <div class="card-body">
+        <!--查询条件-->
+        <div class="row mb-3 ml-1"
+          [hidden]="editShowType=='only' || editShowType=='examArea' || editShowType == 'examAreaLimit' || editShowType == 'socialEnrol'">
+          <div class="col-lg-12">
+            <form class="form-inline">
+              <table>
+                <tr>
+                  <td>
+                  <div class="input-group mr-1 input-group-sm">
+                  <label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;关键字:</label>
+                  <input name="query" style="width:180px;" [(ngModel)]="query.query" class="input-sm form-control" type="text" value=""
+                    maxlength="64" placeholder="请输入查询关键字">
+                </div>
+              </td>
+              <td>
+                <div class="input-group mr-1 input-group-sm">
+                  <label>课程属性:</label>
+                  <select name="nation_exam" style="width:180px;" [(ngModel)]="query.nation_exam" frameDict [dictName]="'NationExam'"
+                    class="form-control">
+                  </select>
+                </div>
+                </td>
+                <td>
+                <div class="input-group mr-1 input-group-sm">
+                  <label>课程类型:</label>
+                  <select name="special_flag" style="width:180px;" [(ngModel)]="query.special_flag" frameDict [dictName]="'CourseSpecial'"
+                    class="form-control">
+                  </select>
+                </div>
+                </td>
+                <td></td>
+              </tr>
+              <tr>
+                <td>
+                <div class="input-group mr-1 input-group-sm">
+                  <label>课程筛选:</label>
+                  <select name="course_filter" style="width:180px;" [(ngModel)]="query.course_filter" frameDict [dictName]="'course_filter'"
+                    class="form-control">
+                  </select>
+                </div>
+                </td>
+                <!--
+                <td>
+                <div class="input-group mr-1 input-group-sm">
+                  <label>课程状态:</label>
+                  <select name="status" style="width:180px;" [(ngModel)]="query.status" frameDict [dictName]="'CourseStatus'"
+                  class="form-control">
+                </select>
+                </div>
+                </td>
+                -->
+                <td>
+                  <div class="input-group mr-1 input-group-sm">
+                    <label>评阅方式:</label>
+                    <select name="is_net_mark" style="width:180px;" [(ngModel)]="query.is_net_mark" frameDict [dictName]="'is_net_mark'"
+                      class="form-control">
+                    </select>
+                  </div>
+                  </td>
+
+                <td>
+                <button class="btn btn-primary btn-rounded btn-outline btn-sm  mr-1" (click)="framePager.goSearch()">
+                  <i class="fa fa-search"></i> 查询</button>
+                <button class="btn btn-primary btn-rounded btn-outline btn-sm  mr-1" (click)="reset()">
+                  <i class="fa fa-undo"></i> 重置</button>
+                  <button class="btn btn-primary btn-rounded btn-outline btn-sm  mr-1" (click)="downXls()">
+                    <i class="fa icon-cloud-download"></i> 导出</button>
+               </td>
+                </tr>
+                </table>
+            </form>
+          </div>
+        </div>
+
+        <!-- 工具栏 -->
+        <div class="row mb-2"
+          [hidden]="editShowType=='only' || editShowType=='examArea' || editShowType == 'examAreaLimit' || editShowType == 'socialEnrol'">
+          <div class="col-lg-12">
+            <div class="pull-left" style="text-align: right;">
+              <button class="btn btn-primary mr-1 btn-sm" data-toggle="tooltip" data-placement="left"
+                (click)="goEdit(editTemplateModal,'only','modal-lg',null)" title="添加">
+                <i class="fa fa-plus"></i> 添加</button>
+              <button class="btn mr-1 btn-sm bg-danger" (click)="delete()" data-toggle="tooltip" data-placement="left"
+                title="删除">
+                <i class="fa fa-trash"> 删除</i>
+              </button>
+              <!--
+              <button id="open" class="btn btn-primary mr-1 btn-sm" data-toggle="tooltip" data-placement="left"
+                title="开考" (click)="open(1)">
+                <i class="fa icon-control-start"></i> 开考</button>
+              <button id="stop" class="btn btn-primary mr-1 btn-sm" data-toggle="tooltip" data-placement="left"
+                title="停考" (click)="open(0)">
+                <i class="fa icon-power"></i> 停考</button>
+                -->
+             
+                
+            </div>
+          </div>
+        </div>
+
+        <!--表格-->
+        <div class="row">
+          <div class="col-lg-12 ml-0"
+            [hidden]="editShowType=='only' || editShowType=='examArea' || editShowType=='examAreaLimit' || editShowType == 'socialEnrol'">
+            <table class="table table-sm table-striped table-hover table-bordered bg-white">
+              <thead>
+                <tr>
+                  <th>
+                    <div class="checkbox c-checkbox">
+                      <label>
+                        <input type="checkbox" (change)="framePager.checkedMasterToggle($event)" />
+                        <span class="fa fa-check"></span>
+                      </label>
+                    </div>
+                  </th>
+
+                  <th>序号</th>
+                  <th align="center">课程代码</th>
+                  <th>课程名称</th>
+                  <!-- <th>课程国标代码</th> -->
+                  <th align="center">学分</th>
+                  <!-- <th>课程性质</th> -->
+                  <th align="center">课程属性</th>
+                  <!--<th>课程状态</th>-->
+                  <th>课程类型</th>
+                  <th align="center">报考费用</th>
+                  <!--<th>关联教材</th>-->
+                  <th style="width: 80px;" align="center">操作</th>
+                </tr>
+              </thead>
+              <tbody>
+                <tr *ngFor="let item of framePager.getRecords(); let i = index">
+                  <td>
+                    <div class="checkbox c-checkbox input-group-sm">
+                      <label>
+                        <input type="checkbox" [value]="item.id" [(checked)]="item.isChecked"
+                          [(ngModel)]="item.isChecked" />
+                        <span class="fa fa-check"></span>
+                      </label>
+                    </div>
+                  </td>
+
+                  <td>{{framePager.pageStart+i}}</td>
+                  <td align="center">{{item.course_code}}</td>
+                  <td><a href="#" (click)="goDetail(detailTemplateModal,'modal-lg', item)">{{item.course_name}}</a></td>
+                  <!-- <td>{{item.course_standard_code}}</td> -->
+                  <td align="right">{{item.course_score}}</td>
+                  <!-- <td [innerHTML]="item.course_exam_type | frameDict: 'CourseNature'"></td> -->
+                  <td  align="center" [innerHTML]="item.is_nation_exam | frameDict:'NationExam' "></td>
+                  <!--<td [innerHTML]="item.status | frameDict: 'CourseStatus'"></td>-->
+                  <td>{{item.special_flag | frameDict: 'CourseSpecial'}}</td>
+                  <!-- <td>{{item.course_type | frameDict: 'CourseType'}}</td> -->
+                  <td align="center">{{item.price}}</td>
+                  <!--
+                  <ng-container *ngIf="item.textbook_name;else elseTemplate ">
+                    <a href="#" (click)="goTextbookLog(textbookLogTemplateModal,'modal-lg', item)">
+                      <td [innerHTML]="item.textbook_name"></td>
+                    </a>
+                  </ng-container>
+                  <ng-template #elseTemplate>
+                    <td [innerHTML]="item.textbook_name"></td>
+                  </ng-template>
+-->
+                  <td align="center">
+                    <a href="#" (click)="goEdit(editTemplateModal,'only','modal-lg',item)" title="编辑"><em
+                        class="fa-lg fas fa-edit mr-1"></em></a>
+                    <a href="#" (click)="delete(item)" title="删除"><em class="fa-lg fas fa-trash mr-1"
+                        style="color:#F56D6D"></em></a>
+                  </td>
+                </tr>
+              </tbody>
+            </table>
+            <!-- TODO -->
+            <frame-pager [url]="QUERY_URL" hideSearch="true" hasCheck="true" #framePager (preReqEvent)="search($event)">
+            </frame-pager>
+          </div>
+
+          <!-- 编辑页面 -->
+          <div class="col-lg-12" *ngIf="item && editShowType != null &&editShowType =='show' ">
+            <ng-container *ngTemplateOutlet="editTemplateModal">
+            </ng-container>
+          </div>
+        </div>
+      </div>
+    </div>
+  </div>
+  <!-- only编辑页面 -->
+  <div class="col-lg-12" *ngIf="item && editShowType != null &&editShowType =='only' ">
+    <ng-container *ngTemplateOutlet="editTemplateModal">
+    </ng-container>
+  </div>
+  <!-- 考区指定编辑页面 -->
+  <div class="col-lg-12" *ngIf="editShowType != null &&editShowType =='examArea'">
+    <ng-container *ngTemplateOutlet="courseAssignTemplateModal">
+    </ng-container>
+  </div>
+
+  <!-- 考区限制编辑页面 -->
+  <div class="col-lg-12" *ngIf="editShowType != null &&editShowType =='examAreaLimit'">
+    <ng-container *ngTemplateOutlet="courseLimitTemplateModal">
+    </ng-container>
+  </div>
+
+  <!-- 社会考生课程显示页面 -->
+  <div class="col-lg-12" *ngIf="editShowType != null &&editShowType =='socialEnrol'">
+    <ng-container *ngTemplateOutlet="socialEnrolTemplateModal">
+    </ng-container>
+  </div>
+
+</div>
+
+
+
+<ng-template #editFormTemplate>
+  <form [formGroup]="formModel" *ngIf="item" class="form-validate form-horizontal" novalidate="">
+    <input type="hidden" class="form-control" formControlName="id" [(ngModel)]="item.id"
+      [formControl]="formModel.controls['id']" />
+    <div class="row mb-1">
+
+      <label class="col-lg-2 col-form-label text-lg-right">课程代码 </label>
+      <div class="col-lg-4">
+
+        <input [readonly]="item.id" maxlength="6" class="form-control" type="text" placeholder="请输入课程代码" formControlName="course_code"
+          [formControl]="formModel.get('course_code')" [(ngModel)]="item.course_code" />
+        <span class="text-danger"
+          *ngIf="formModel.get('course_code').hasError('required') && (formModel.get('course_code').dirty || formModel.get('course_code').touched)">请输入课程代码</span>
+        <span class="text-danger"
+          *ngIf="formModel.controls['course_code'].hasError('pattern') && (formModel.controls['course_code'].dirty ||formModel.controls['course_code'].touched)">课程代码只能为字母和数字</span>
+        <!--
+          <span class="text-danger"
+          *ngIf="formModel.get('course_code').hasError('rangeLength') && (formModel.get('course_code').dirty ||formModel.get('course_code').touched)">最小为3位,最大为6位</span>
+      -->
+        </div>
+
+      <label class="col-lg-2 col-form-label text-lg-right">课程名称</label>
+      <div class="col-lg-4">
+
+        <input class="form-control" type="text" placeholder="请输入课程名称" formControlName="course_name"
+          [formControl]="formModel.get('course_name')" [(ngModel)]="item.course_name" />
+
+        <span class="text-danger"
+          *ngIf="formModel.get('course_name').hasError('required') && (formModel.get('course_name').dirty || formModel.get('course_name').touched)">请输入课程名称</span>
+      </div>
+    </div>
+
+    <div class="row mb-1">
+<!--
+      <label class="col-lg-2 col-form-label text-lg-right">课程国标代码</label>
+      <div class="col-lg-4">
+
+        <input class="form-control" type="text" placeholder="请输入课程国际代码" formControlName="course_standard_code"
+          [formControl]="formModel.get('course_standard_code')" [(ngModel)]="item.course_standard_code" />
+        <span class="text-danger"
+          *ngIf="formModel.controls['course_standard_code'].hasError('pattern') && (formModel.controls['course_standard_code'].dirty ||formModel.controls['course_standard_code'].touched)">国标代码只能为字符和数字</span>
+      </div>
+-->
+      <label class="col-lg-2 col-form-label text-lg-right">课程学分</label>
+      <div class="col-lg-4">
+        <input class="form-control" type="number" placeholder="请输入课程学分" formControlName="course_score"
+          [formControl]="formModel.get('course_score')" [(ngModel)]="item.course_score" />
+      </div>
+
+      <label class="col-lg-2 col-form-label text-lg-right">课程属性</label>
+      <div class="col-lg-4">
+
+        <select class="custom-select" formControlName="is_nation_exam"
+          [formControl]="formModel.controls['is_nation_exam']" [(ngModel)]="item.is_nation_exam" frameDict
+          [dictName]="'NationExam'" [(dictValue)]="item.is_nation_exam" [tipFlag]="true">
+        </select>
+        <span class="text-danger"
+          *ngIf="formModel.get('is_nation_exam').hasError('required') && (formModel.get('is_nation_exam').dirty || formModel.get('is_nation_exam').touched)">请选择课程属性</span>
+      </div>
+
+    </div>
+    
+
+    <div class="row mb-1">
+      <!--
+      <label class="col-lg-2 col-form-label text-lg-right">课程状态</label>
+      <div class="col-lg-4">
+        <select class="custom-select" formControlName="status" [formControl]="formModel.controls['status']"
+          [(ngModel)]="item.status" frameDict [dictName]="'CourseStatus'" [(dictValue)]="item.status" [tipFlag]="true">
+        </select>
+        <span class="text-danger"
+          *ngIf="formModel.get('status').hasError('required') && (formModel.get('status').dirty || formModel.get('status').touched)">请选择课程状态</span>
+      </div>
+    -->
+
+      <label class="col-lg-2 col-form-label text-lg-right">课程类型</label>
+      <div class="col-lg-4">
+        <select class="custom-select" formControlName="special_flag" [formControl]="formModel.controls['special_flag']"
+          [(ngModel)]="item.special_flag" frameDict [dictName]="'CourseSpecial'" [(dictValue)]="item.special_flag"
+          [tipFlag]="true">
+        </select>
+        <span class="text-danger"
+          *ngIf="formModel.get('special_flag').hasError('required') && (formModel.get('special_flag').dirty || formModel.get('special_flag').touched)">请选择课程类型</span>
+      </div>
+
+      <label class="col-lg-2 col-form-label text-lg-right">评阅方式</label>
+      <div class="col-lg-4">
+        <select class="custom-select" formControlName="is_net_mark" [formControl]="formModel.controls['is_net_mark']"
+          [(ngModel)]="item.is_net_mark" frameDict [dictName]="'is_net_mark'" [(dictValue)]="item.is_net_mark"
+          [tipFlag]="true">
+        </select>
+        <span class="text-danger"
+          *ngIf="formModel.get('is_net_mark').hasError('required') && (formModel.get('is_net_mark').dirty || formModel.get('is_net_mark').touched)">请选择评阅方式</span>
+      </div>
+    </div>
+
+    <div class="row mb-1">
+
+        <!-- <label class="col-lg-2 col-form-label text-lg-right">课程性质</label>
+        <div class="col-lg-4">
+  
+          <select class="custom-select" formControlName="course_exam_type"
+            [formControl]="formModel.controls['course_exam_type']" [(ngModel)]="item.course_exam_type" frameDict
+            [dictName]="'CourseNature'" [(dictValue)]="item.course_exam_type" [tipFlag]="true">
+          </select>
+  
+          <span class="text-danger"
+            *ngIf="formModel.get('course_exam_type').hasError('required') && (formModel.get('course_exam_type').dirty || formModel.get('course_exam_type').touched)">请输入课程类型</span>
+        </div> -->
+        <!--
+        <label class="col-lg-2 col-form-label text-lg-right">课程类型</label>
+        <div class="col-lg-4">
+          <select class="custom-select" formControlName="course_type" [formControl]="formModel.controls['course_type']"
+            [(ngModel)]="item.course_type" frameDict [dictName]="'CourseType'" [(dictValue)]="item.course_type"
+            [tipFlag]="true">
+          </select>
+        </div>
+      -->
+      
+  
+  
+  
+       
+  
+        <label class="col-lg-2 col-form-label text-lg-right">收费标准</label>
+        <div class="col-lg-4">
+  
+          <flex-select [allowClear]="true" [(items)]="feeList" [(ngModel)]="item.fee_code" optionValueField="fee_item_code"
+            optionTextField="full_name" placeholder="请选择" formControlName="fee_code"
+            [formControl]="formModel.controls['fee_code']" width="220" noResultsFound="无数据">
+          </flex-select>
+          <span class="text-danger"
+            *ngIf="formModel.get('fee_code').hasError('required') && (formModel.get('fee_code').dirty || formModel.get('fee_code').touched)">请选择课程收费标准</span>
+        </div>
+  
+      </div>
+
+    <div class="row mb-1">
+      <label class="col-lg-2 col-form-label text-lg-right">描述信息</label>
+      <div class="col-lg-10">
+        <textarea class="form-control" formControlName="remark" placeholder="请填写描述信息" [(ngModel)]="item.remark"
+          rows="5"></textarea>
+      </div>
+    </div>
+
+  </form>
+</ng-template>
+
+<ng-template #editTemplateModal>
+  <div class="modal-content">
+    <div class="modal-header info-success-qm">
+      <div class="pull-left">
+        <em class="fa-lg fas fa-edit "></em> 编辑页面
+      </div>
+      <button type="button" class="close" (click)="hideModal()">×</button>
+    </div>
+
+    <!-- 1@3 -->
+    <div class="modal-body">
+      <div [ngTemplateOutlet]="editFormTemplate"></div>
+    </div>
+
+    <div class="modal-footer">
+      <button class="btn btn-info" (click)="save()">
+        <i class="fa fa-info-circle"> </i> 保存
+      </button>
+      <button class="btn btn-default" (click)="hideModal()">
+        <i class="icon-close"> </i> 取消
+      </button>
+    </div>
+  </div>
+</ng-template>
+
+<!--课程详情页面-->
+<ng-template #detailTemplateModal>
+  <div class="modal-content">
+
+    <div class="modal-header info-success-qm">
+      <div class="pull-left">
+        <em class="fa-lg fas fa-edit "></em> 课程详情
+      </div>
+      <button type="button" class="close" (click)="hideModal()">×</button>
+    </div>
+
+    <!-- 具体的元素 -->
+    <div class="modal-body">
+      <div [ngTemplateOutlet]="detailFormTemplate"></div>
+    </div>
+
+    <div class="modal-footer">
+      <button class="btn btn-default" (click)="hideModal()">
+        <i class="icon-close"> </i> 关闭
+      </button>
+    </div>
+
+  </div>
+</ng-template>
+
+<ng-template #detailFormTemplate>
+  <p class="font-weight-bold">课程信息</p>
+
+  <div class="row mb-1">
+    <label class="col-lg-2 col-form-label text-lg-right">课程代码</label>
+    <div class="col-lg-4 col-form-label">
+      {{course.course_code}}
+    </div>
+    <label class="col-lg-2 col-form-label text-lg-right">课程名称</label>
+    <div class="col-lg-4 col-form-label">
+        {{course.course_name}}
+    </div>
+  </div>
+
+  <div class="row mb-1">
+    <label class="col-lg-2 col-form-label text-lg-right">课程学分</label>
+    <div class="col-lg-4 col-form-label">
+        {{course.course_score}}
+    </div>
+    <label class="col-lg-2 col-form-label text-lg-right">课程类型</label>
+    <div class="col-lg-4 col-form-label">
+       
+      <span [innerHTML]="course.special_flag | frameDict: 'CourseSpecial'" ></span>
+    </div>
+  </div>
+
+  <p class="font-weight-bold">课程属专业列表</p>
+  <div class="row">
+    <div class="col-lg-12 ml-0">
+      <table class="table table-sm table-striped table-hover table-bordered bg-white">
+        <thead>
+          <th>序号</th>
+         <!-- <th>批次</th>-->
+          <th align="center">专业代码</th>
+          <th>专业名称</th>
+          <th align="center">专业层次</th>
+          <th align="center">专业状态</th>
+        </thead>
+        <tbody>
+          <tr *ngFor="let item of majorList; let i = index">
+            <td>{{i+1}}</td>
+            <!--<td>{{item.year}}</td>-->
+            <td align="center">{{item.major_code}}</td>
+            <td><a href="#" (click)="navigateMajor(item.major_code,item.year)">{{item.major_name}}</a></td>
+            <td align="center" [innerHTML]="item.major_level | frameDict: 'MajorLevel'"></td>
+            <td align="center">{{item.status | frameDict: 'CourseStatus'}}</td>
+          </tr>
+        </tbody>
+      </table>
+    </div>
+  </div>
+
+</ng-template>
+
+<!-- 课程指定 -->
+<ng-template #courseAssignTemplateModal>
+  <div class="modal-content">
+
+    <div class="modal-header info-success-qm">
+      <div class="pull-left">
+        <em class="fa-lg fas fa-edit "></em> 课程指定
+      </div>
+      <button type="button" class="close" (click)="hideModal()">×</button>
+    </div>
+
+    <!-- 具体的元素 -->
+    <div class="modal-body">
+      <div [ngTemplateOutlet]="courseAssignFormTemplate"></div>
+    </div>
+
+    <div class="modal-footer">
+      <button class="btn btn-default" (click)="saveExamArea()">
+        <i class="icon-close"> </i> 保存
+      </button>
+      <button class="btn btn-default" (click)="hideModal()">
+        <i class="icon-close"> </i> 关闭
+      </button>
+    </div>
+
+  </div>
+</ng-template>
+
+<ng-template #courseAssignFormTemplate>
+
+
+  <div class="row">
+    <div class="col-lg-12">
+      <h4>已指定考区列表</h4>
+    </div>
+  </div>
+
+  <div class="panel-body ml-sm">
+    <div class="card card-default">
+      <div class="card-body">
+
+        <div class="row mb-3 ml-1">
+          <div class="col-lg-12">
+            <form class="form-inline">
+              <div class="input-group mr-1 input-group-sm">
+                <label>关键字 :</label>
+                <input name="keyword" [(ngModel)]="query.query" class="input-sm form-control" type="text" maxlength="64"
+                  placeholder="请输入查询关键字">
+              </div>
+              <div class="input-group mr-1 input-group-sm">
+                <label>考试批次:</label>
+                <flex-select [allowClear]="true" [url]="EXAM_TIME_URL" respDataPath="array" optionValueField="id"
+                  optionTextField="exam_year_month" [(ngModel)]="query.exam_time_id" placeholder="请选择"
+                  [ngModelOptions]="{standalone: true}" width="100" noResultsFound="无数据">
+                </flex-select>
+              </div>
+              <button class="btn btn-primary btn-rounded btn-outline btn-sm  mr-1" (click)="framePager2.goSearch()">
+                <i class="fa fa-search"></i> 查询</button>
+            </form>
+          </div>
+        </div>
+
+        <div class="row mb-3">
+          <div class="col-lg-12">
+            <table class="table table-sm table-striped table-hover table-bordered bg-white">
+              <thead>
+                <tr>
+                  <th align="center">考试批次</th>
+                  <th align="center">考区代码</th>
+                  <th>考区名称</th>
+                  <th style="width: 80px;" align="center">操作</th>
+                </tr>
+              </thead>
+              <tbody>
+                <tr *ngFor="let item of framePager2.getRecords(); let i = index">
+                  <td align="center">{{item.exam_year_month}}</td>
+                  <td align="center">{{item.org_code}}</td>
+                  <td>{{item.org_name}}</td>
+                  <td align="center">
+                    <a href="#" *ngIf="item.id>0" (click)="deleteExamArea(item.id)" title="删除">
+                      <em class="fa-lg fas fa-trash mr-1" style="color:#F56D6D"></em>
+                    </a>
+                  </td>
+                </tr>
+              </tbody>
+            </table>
+            <frame-pager [url]="EXAM_QUERY_URL" hideSearch="true" hasCheck="true" #framePager2
+              (preReqEvent)="search($event)"></frame-pager>
+          </div>
+        </div>
+
+      </div>
+    </div>
+  </div>
+
+
+  <div class="row">
+    <div class="col-lg-12">
+      <h4>指定考区</h4>
+    </div>
+  </div>
+
+  <div class="panel-body ml-sm">
+    <div class="card card-default">
+      <div class="card-body">
+
+        <div class="row mb-3">
+          <label class="col-lg-2 col-form-label text-lg-right">考试批次</label>
+          <div class="col-lg-10">
+            <flex-select [allowClear]="true" [url]="EXAM_TIME_URL" respDataPath="array" optionValueField="id"
+              optionTextField="exam_year_month" [(ngModel)]="items.exam_time_id" placeholder="请选择"
+              [ngModelOptions]="{standalone: true}" width="222" noResultsFound="无数据">
+            </flex-select>
+          </div>
+        </div>
+
+        <!-- <div class="row mb-3">
+          <label class="col-lg-2 col-form-label text-lg-right">考区指定</label>
+          <div class="col-lg-10">
+            <div class="checkbox c-checkbox">
+              <label>
+                <input type="checkbox" checked [(ngModel)]="examArea" (change)="showExamArea()" />
+                <span class="fa fa-check"></span>全部考区
+              </label>
+            </div>
+          </div>
+        </div> -->
+
+        <div class="row mb-3">
+          <label class="col-lg-2 col-form-label text-lg-right">选择考区</label>
+          <div class="col-lg-6">
+            <flex-select [url]="EXAM_AREA_URL" respDataPath="array" optionValueField="id" optionTextField="org_name"
+              [(ngModel)]="items.exam_area_id" placeholder="请选择" [ngModelOptions]="{standalone: true}" width="222"
+              noResultsFound="无数据">
+            </flex-select>
+          </div>
+          <div class="col-lg-2">
+            <button class="btn btn-primary mr-1 btn-sm" data-toggle="tooltip" data-placement="left"
+              (click)="addExamArea()" title="添加">
+              <i class="fa fa-plus"></i>添加考区</button>
+          </div>
+        </div>
+
+        <div class="row mb-3" [hidden]="examAreaChooseFlag">
+          <label class="col-lg-2 col-form-label text-lg-right">已选考区</label>
+          <div class="col-lg-10">
+            <table class="table table-bordered">
+              <tr *ngFor="let item of examAreaList">
+                <td>{{item.org_name}}</td>
+                <td align="center">{{item.org_code}}</td>
+                <td align="center">
+                  <a href="#" *ngIf="item.id>0" (click)="deleteElement(item.id,'school')" title="删除">
+                    <em class="fa-lg fas fa-trash mr-1" style="color:#F56D6D"></em>
+                  </a>
+                </td>
+              </tr>
+            </table>
+          </div>
+        </div>
+
+      </div>
+    </div>
+  </div>
+</ng-template>
+
+
+
+<!--课程详情页面-->
+<ng-template #textbookLogTemplateModal>
+  <div class="modal-content">
+
+    <div class="modal-header info-success-qm">
+      <div class="pull-left">
+        <em class="fa-lg fas fa-edit "></em> 课程教材日志
+      </div>
+      <button type="button" class="close" (click)="hideModal()">×</button>
+    </div>
+
+    <!-- 具体的元素 -->
+    <div class="modal-body">
+      <div [ngTemplateOutlet]="textbookLogTemplate"></div>
+    </div>
+
+    <div class="modal-footer">
+      <button class="btn btn-default" (click)="hideModal()">
+        <i class="icon-close"> </i> 关闭
+      </button>
+    </div>
+
+  </div>
+</ng-template>
+
+<ng-template #textbookLogTemplate>
+
+  <p class="font-weight-bold">课程关联教材历史信息</p>
+  <div class="row">
+    <div class="col-lg-12 ml-0">
+      <table class="table table-sm table-striped table-hover table-bordered bg-white">
+        <thead>
+          <th>序号</th>
+          <th>批次</th>
+          <th>课程名称</th>
+          <th>教材名称</th>
+          <th>操作人</th>
+          <th>操作时间</th>
+        </thead>
+        <tbody>
+          <tr *ngFor="let item of ctBookLog; let i = index">
+            <td>{{i+1}}</td>
+            <td>{{item.year_code}}</td>
+            <td>{{item.course_name}}</td>
+            <td>{{item.textbook_name}}</td>
+            <td>{{item.operator}}</td>
+            <td>{{item.oper_time}}</td>
+          </tr>
+        </tbody>
+      </table>
+    </div>
+  </div>
+
+</ng-template>
+
+
+
+
+<!-- 课程限制 -->
+<ng-template #courseLimitTemplateModal>
+  <div class="modal-content">
+
+    <div class="modal-header info-success-qm">
+      <div class="pull-left">
+        <em class="fa-lg fas fa-edit "></em> 课程限制
+      </div>
+      <button type="button" class="close" (click)="hideModal()">×</button>
+    </div>
+
+    <!-- 具体的元素 -->
+    <div class="modal-body">
+      <div [ngTemplateOutlet]="courseLimitFormTemplate"></div>
+    </div>
+
+    <div class="modal-footer">
+      <button class="btn btn-default" (click)="saveExamAreaLimit()">
+        <i class="icon-close"> </i> 保存
+      </button>
+      <button class="btn btn-default" (click)="hideModal()">
+        <i class="icon-close"> </i> 关闭
+      </button>
+    </div>
+
+  </div>
+</ng-template>
+
+<ng-template #courseLimitFormTemplate>
+
+  <div class="row">
+    <div class="col-lg-12">
+      <h4>已限定考区列表</h4>
+    </div>
+  </div>
+
+  <div class="panel-body ml-sm">
+    <div class="card card-default">
+      <div class="card-body">
+
+        <div class="row mb-3 ml-1">
+          <div class="col-lg-12">
+            <form class="form-inline">
+              <div class="input-group mr-1 input-group-sm">
+                <label>关键字 :</label>
+                <input name="keyword" [(ngModel)]="query.query" class="input-sm form-control" type="text" maxlength="64"
+                  placeholder="请输入查询关键字">
+              </div>
+              <div class="input-group mr-1 input-group-sm">
+                <label>考试批次:</label>
+                <flex-select [allowClear]="true" [url]="EXAM_TIME_URL" respDataPath="array" optionValueField="id"
+                  optionTextField="exam_year_month" [(ngModel)]="query.exam_time_id" placeholder="请选择"
+                  [ngModelOptions]="{standalone: true}" width="100" noResultsFound="无数据">
+                </flex-select>
+              </div>
+              <button class="btn btn-primary btn-rounded btn-outline btn-sm  mr-1" (click)="framePager3.goSearch()">
+                <i class="fa fa-search"></i> 查询</button>
+            </form>
+          </div>
+        </div>
+
+        <div class="row mb-3">
+          <div class="col-lg-12">
+            <table class="table table-sm table-striped table-hover table-bordered bg-white">
+              <thead>
+                <tr>
+                  <th align="center">考试批次</th>
+                  <th align="center">考区代码</th>
+                  <th>考区名称</th>
+                  <th style="width: 80px;" align="center">操作</th>
+                </tr>
+              </thead>
+              <tbody>
+                <tr *ngFor="let item of framePager3.getRecords(); let i = index">
+                  <td align="center">{{item.exam_year_month}}</td>
+                  <td align="center">{{item.org_code}}</td>
+                  <td>{{item.org_name}}</td>
+                  <td align="center">
+                    <a href="#" *ngIf="item.id>0" (click)="deleteExamAreaLimit(item.id)" title="删除">
+                      <em class="fa-lg fas fa-trash mr-1" style="color:#F56D6D"></em>
+                    </a>
+                  </td>
+                </tr>
+              </tbody>
+            </table>
+            <frame-pager [url]="EXAM_LIMIT_QUERY_URL" hideSearch="true" hasCheck="true" #framePager3
+              (preReqEvent)="search($event)"></frame-pager>
+          </div>
+        </div>
+
+      </div>
+    </div>
+  </div>
+
+
+  <div class="row">
+    <div class="col-lg-12">
+      <h4>考区限制</h4>
+    </div>
+  </div>
+
+  <div class="panel-body ml-sm">
+    <div class="card card-default">
+      <div class="card-body">
+
+        <div class="row mb-3">
+          <label class="col-lg-2 col-form-label text-lg-right">考试批次</label>
+          <div class="col-lg-10">
+            <flex-select [allowClear]="true" [url]="EXAM_TIME_URL" respDataPath="array" optionValueField="id"
+              optionTextField="exam_year_month" [(ngModel)]="items.exam_time_id" placeholder="请选择"
+              [ngModelOptions]="{standalone: true}" width="222" noResultsFound="无数据">
+            </flex-select>
+          </div>
+        </div>
+
+        <div class="row mb-3">
+          <label class="col-lg-2 col-form-label text-lg-right">选择考区</label>
+          <div class="col-lg-6">
+            <flex-select [url]="EXAM_AREA_URL" respDataPath="array" optionValueField="id" optionTextField="org_name"
+              [(ngModel)]="items.exam_area_id" placeholder="请选择" [ngModelOptions]="{standalone: true}" width="222"
+              noResultsFound="无数据">
+            </flex-select>
+          </div>
+          <div class="col-lg-2">
+            <button class="btn btn-primary mr-1 btn-sm" data-toggle="tooltip" data-placement="left"
+              (click)="addExamArea()" title="添加">
+              <i class="fa fa-plus"></i>添加考区限制</button>
+          </div>
+        </div>
+
+        <div class="row mb-3" [hidden]="examAreaChooseFlag">
+          <label class="col-lg-2 col-form-label text-lg-right">已选考区限制</label>
+          <div class="col-lg-10">
+            <table class="table table-bordered">
+              <tr *ngFor="let item of examAreaList">
+                <td>{{item.org_name}}</td>
+                <td align="center">{{item.org_code}}</td>
+                <td align="center">
+                  <a href="#" *ngIf="item.id>0" (click)="deleteElement(item.id,'school')" title="删除">
+                    <em class="fa-lg fas fa-trash mr-1" style="color:#F56D6D"></em>
+                  </a>
+                </td>
+              </tr>
+            </table>
+          </div>
+        </div>
+
+      </div>
+    </div>
+  </div>
+</ng-template>
+
+
+
+
+<!-- 课程限制 -->
+<ng-template #socialEnrolTemplateModal>
+  <div class="modal-content">
+
+    <div class="modal-header info-success-qm">
+      <div class="pull-left">
+        <em class="fa-lg fas fa-edit "></em> 社会考生课程限制
+      </div>
+      <button type="button" class="close" (click)="hideModal()">×</button>
+    </div>
+
+    <!-- 具体的元素 -->
+    <div class="modal-body">
+      <div [ngTemplateOutlet]="socialEnrolFormTemplate"></div>
+    </div>
+
+    <div class="modal-footer">
+      <button class="btn btn-default" (click)="saveSocialEnrol()">
+        <i class="icon-close"> </i> 保存
+      </button>
+      <button class="btn btn-default" (click)="hideModal()">
+        <i class="icon-close"> </i> 关闭
+      </button>
+    </div>
+
+  </div>
+</ng-template>
+
+
+<ng-template #socialEnrolFormTemplate>
+
+  <div class="row">
+    <label class="col-lg-2 col-form-label text-lg-right">社会考生是否可报考:</label>
+    <div class="col-lg-4">
+      <select name="is_social_enrol" [(ngModel)]="is_social_enrol" frameDict [dictName]="'is_social_enrol'"
+        class="form-control">
+      </select>
+    </div>
+  </div>
+
+</ng-template>

+ 0 - 0
src/app/routes/hm-soft/pl/pl-course-pre/pl-course-pre.component.scss


+ 25 - 0
src/app/routes/hm-soft/pl/pl-course-pre/pl-course-pre.component.spec.ts

@@ -0,0 +1,25 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { PlCourseComponent } from './pl-course.component';
+
+describe('PlCourseComponent', () => {
+  let component: PlCourseComponent;
+  let fixture: ComponentFixture<PlCourseComponent>;
+
+  beforeEach(async(() => {
+    TestBed.configureTestingModule({
+      declarations: [ PlCourseComponent ]
+    })
+    .compileComponents();
+  }));
+
+  beforeEach(() => {
+    fixture = TestBed.createComponent(PlCourseComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});

+ 347 - 0
src/app/routes/hm-soft/pl/pl-course-pre/pl-course-pre.component.ts

@@ -0,0 +1,347 @@
+import { Component, OnInit, TemplateRef, ViewChild } from '@angular/core';
+import { FormBuilder, Validators } from '@angular/forms';
+import { BsModalService } from "ngx-bootstrap/modal";
+import { FlexTableComponent } from '../../../../shared/common/FlexTable.component';
+import { FrameRequest } from '../../../../shared/frame/frame-request';
+import { AppComponent } from '../../../../app.component';
+import { FramePagerComponent } from '../../../../core/pager/pager.component';
+import { CustomValidators } from 'ng2-validation';
+import * as _ from 'lodash';
+import { Router } from '@angular/router';
+
+@Component({
+  selector: 'app-pl-course-pre',
+  templateUrl: './pl-course-pre.component.html',
+  styleUrls: ['./pl-course-pre.component.scss']
+})
+export class PlCoursePreComponent extends FlexTableComponent implements OnInit {
+
+  public query = {
+    "query": "",
+    "nation_exam": "",
+    "course_id": "",
+    "exam_time_id": "",
+    "special_flag": "",
+    "course_filter" : "",
+    "status" : "",
+    "is_net_mark":""
+  };
+  QUERY_URL = "pl/plCoursePre/page.htm";
+  DELETE_URL = "pl/plCoursePre/delete.htm";
+  GET_URL = "pl/plCoursePre/get.htm";
+  ADD_URL = "pl/plCoursePre/add.htm";
+  EDIT_URL = "pl/plCoursePre/edit.htm";
+  OPEN_URL = "pl/plCoursePre/status.htm";
+  DETAIL_URL = "pl/plCoursePre/detail.htm";
+  EXAM_TIME_URL = "pl/plExamTime/listtime.htm";
+  EXAM_AREA_URL = "cf/cfOrganization/list.htm?org_type=4&status=1";//考区
+  SCHOOL_FIND_URL = "cf/cfOrganization/get.htm";
+  EXAM_QUERY_URL = "pl/plExamAreaCourse/page.htm";
+  EXAM_ADD_URL = "pl/plExamAreaCourse/add.htm";
+  EXAM_DELETE_URL = "pl/plExamAreaCourse/delete.htm";
+  TEXTBOOK_LOG_URL = "pl/plCourse/ctbookLog.htm";
+
+  EXAM_LIMIT_QUERY_URL = "pl/plExamAreaCourseLimit/page.htm"; //课程限制考区列表
+  EXAM_LIMIT_ADD_URL = "pl/plExamAreaCourseLimit/add.htm"; //课程限制保存
+  EXAM_LIMIT_DELETE_URL = "pl/plExamAreaCourseLimit/delete.htm"; //删除课程限制
+  SOCIAL_ENROL_URL = "pl/plCoursePre/editsocial.htm"; //社会考生限制
+  FEE_LIST_URL = "cf/cfFeeScale/list.htm";
+
+
+  course = [];
+  examAreaIds = [];
+  courseIds = [];
+  items: any;
+  majorList: any;
+  examAreaList = [];//已选择考区
+  examAreaFlag = true;//考区是否显示
+  examAreaChooseFlag = true;//已选择的考区
+  ctBookLog = [];
+  is_social_enrol;
+  feeList = [];
+
+  @ViewChild('framePager2')
+  framePager2: FramePagerComponent; //课程指定分页
+  @ViewChild('framePager3')
+  framePager3: FramePagerComponent; //课程限制分页
+
+  constructor(
+    public bsModalService: BsModalService,
+    private router: Router,
+    fb: FormBuilder
+  ) {
+    super();
+    this.formModel = fb.group({
+      id: [null],
+      'course_code': [null, Validators.compose([Validators.required, Validators.pattern("^[a-zA-Z0-9]+$")])],
+      'course_name': [null, Validators.compose([Validators.required])],
+      //'course_standard_code': [null, Validators.pattern("^[a-zA-Z0-9 ]+$")],
+      'course_score': [null, Validators.compose([Validators.required])],
+      'course_exam_type': [null, null],
+      'is_nation_exam': [null, Validators.compose([Validators.required])],
+      'status': [null],
+      'special_flag': [null, Validators.compose([Validators.required])],
+      'remark': [null, null],
+      'is_net_mark': [null, Validators.required],
+      'course_type': [null],
+      'fee_code': [null, Validators.required]
+    });
+  }
+
+  ngOnInit() {
+    this.items = {};
+    FrameRequest.requestArray(this.FEE_LIST_URL, {}, (array) => {
+      this.feeList = array;
+    });
+  }
+
+  /**
+   * 开考和停考
+   */
+  open(flag) {
+    let checkedArray = this.framePager.getCheckedArray((item) => item.id);
+    if (checkedArray.length === 0) {
+      AppComponent.alert({ title: "信息提示", text: "请选择数据!" });
+      return;
+    }
+    FrameRequest.request(this.OPEN_URL, { ids: checkedArray.join(), flag: flag }, () => {
+      if (flag === 0) {
+        AppComponent.GobalComponent.successMsg('课程停考成功');
+      } else {
+        AppComponent.GobalComponent.successMsg('课程开考成功');
+      }
+      this.framePager.reload();
+    });
+  }
+
+  /**
+   * 课程详情
+   */
+  goDetail(template: TemplateRef<any>, modalClass, item?) {
+    this.bsModalWin = this.bsModalService.show(template, { class: modalClass });
+    FrameRequest.requestMap(this.DETAIL_URL, { id: item.id }, (map) => {
+      this.course = map['course'];
+      this.majorList = map['majorList'];
+    });
+  }
+
+  //课程考区指定界面
+  goCourseExamArea() {
+    this.courseIds = [];
+    this.courseIds = this.framePager.getCheckedArray(item => item.id);
+    if (!this.courseIds || this.courseIds.length === 0 || this.courseIds.length > 1) {
+      AppComponent.alert({ title: "信息提示", text: "请选择一门课程!" });
+      return;
+    }
+    this.query.query = "";
+    this.editShowType = 'examArea';
+  }
+
+  //分页查询考区课程信息
+  search(param) {
+    if (this.query.exam_time_id === null) {
+      this.query.exam_time_id = '';
+    }
+    if (this.query.nation_exam === null) {
+      this.query.nation_exam = '';
+    }
+    if (this.query.special_flag === null) {
+      this.query.special_flag = '';
+    }
+    if (this.query.course_filter === null) {
+      this.query.course_filter = '';
+    }
+    if (this.query.status === null) {
+      this.query.status = '';
+    }
+    if (this.query.is_net_mark === null) {
+      this.query.is_net_mark = '';
+    }
+
+    let searchCondition = this.query;
+    _.assignIn(param, searchCondition);
+    param.course_id = this.courseIds.join();
+  }
+
+
+  //将考区增加到列表中
+  addExamArea() {
+    FrameRequest.requestEntity(this.SCHOOL_FIND_URL, { id: this.items.exam_area_id }, (entity) => {
+      this.examAreaIds = this.examAreaList.map((examArea) => examArea.id);
+      if (!this.contains(this.examAreaIds, entity.id)) {
+        this.examAreaList.push(entity);
+      }
+      this.examAreaChooseFlag = false;
+    });
+  }
+  //从考区列表中移除考区
+  deleteElement(id: number, flag?: string) {
+    this.examAreaList.splice(this.examAreaList.findIndex(examArea => examArea.id === id), 1);
+  }
+
+
+  //保存考区课程关系
+  saveExamArea() {
+    if (!this.nullJudge()) return;
+    let exam_ids = this.examAreaList.map(item => item.id);
+    FrameRequest.request(this.EXAM_ADD_URL, {
+      course_id: this.courseIds.join(), exam_time_id: this.items.exam_time_id, exam_ids: exam_ids.join()
+    }, () => {
+      AppComponent.GobalComponent.successMsg("考区设置成功");
+      this.framePager2.reload();
+      this.examAreaList = [];
+      this.examAreaChooseFlag = true;
+      this.items.exam_time_id = "";
+      this.items.exam_area_id = "";
+    });
+    // if (this.examArea) {//全部考区
+    //   AppComponent.GobalComponent.successMsg("考区设置成功");
+    // } else { //部分考区
+    // }
+  }
+
+  //删除考区课程关系
+  deleteExamArea(id: number) {
+    FrameRequest.request(this.EXAM_DELETE_URL, { ids: id }, () => {
+      AppComponent.GobalComponent.successMsg("删除成功");
+      this.framePager2.reload();
+    })
+  }
+
+
+  contains(ids: any, id: number) {
+    for (let i = 0; i < ids.length; i++) {
+      if (ids[i] == id) return true;
+    }
+    return false;
+  }
+
+  nullJudge() {
+    if (!this.items.exam_time_id) {
+      AppComponent.alert({ 'title': '提示', text: '请选择考试时间' });
+      return false;
+    }
+    if (this.examAreaList.length === 0) {
+      AppComponent.alert({ 'title': '提示', text: '请选择考区' });
+      return false;
+    }
+    return true;
+  }
+
+  //跳转到专业模块
+  navigateMajor(major_code: any, year_code: any) {
+    this.hideModal();
+    this.router.navigate(['/hmsoft/pl/major'], {
+      queryParams: {
+        major_code: major_code,
+        year_code: year_code
+      }
+    });
+  }
+
+
+  /**
+   * 课程详情
+   */
+  goTextbookLog(template: TemplateRef<any>, modalClass, item?) {
+    this.bsModalWin = this.bsModalService.show(template, { class: modalClass });
+    FrameRequest.requestArray(this.TEXTBOOK_LOG_URL, { course_id: item.id }, (array) => {
+      this.ctBookLog = array;
+    });
+  }
+
+  //课程限制
+  goCourseExamAreaLimit() {
+    this.courseIds = [];
+    this.courseIds = this.framePager.getCheckedArray(item => item.id);
+    if (!this.courseIds || this.courseIds.length === 0 || this.courseIds.length > 1) {
+      AppComponent.alert({ title: "信息提示", text: "请选择一门课程!" });
+      return;
+    }
+    this.query.query = "";
+    this.editShowType = 'examAreaLimit';
+  }
+
+  //保存课程限制
+  saveExamAreaLimit() {
+    if (!this.nullJudge()) return;
+    let exam_ids = this.examAreaList.map(item => item.id);
+    FrameRequest.request(this.EXAM_LIMIT_ADD_URL, {
+      course_id: this.courseIds.join(), exam_time_id: this.items.exam_time_id, exam_ids: exam_ids.join()
+    }, () => {
+      AppComponent.GobalComponent.successMsg("考区限制设置成功");
+      this.framePager3.reload();
+      this.examAreaList = [];
+      this.examAreaChooseFlag = true;
+      this.items.exam_time_id = "";
+      this.items.exam_area_id = "";
+      this.query.exam_time_id = "";
+    });
+  }
+
+  //删除考区课程限制
+  deleteExamAreaLimit(id: number) {
+    FrameRequest.request(this.EXAM_LIMIT_DELETE_URL, { ids: id }, () => {
+      AppComponent.GobalComponent.successMsg("删除成功");
+      this.framePager3.reload();
+    })
+  }
+
+  //社会考生课程限制
+  goSocialEnrol() {
+    this.courseIds = [];
+    this.courseIds = this.framePager.getCheckedArray(item => item.id);
+    if (!this.courseIds || this.courseIds.length === 0 ) {
+      AppComponent.alert({ title: "信息提示", text: "请选择至少一门课程!" });
+      return;
+    }
+    FrameRequest.requestEntity(this.GET_URL, {id: this.courseIds[0]}, (entity) => {
+        if(entity && entity.is_social_enrol != undefined) {
+          this.is_social_enrol = entity.is_social_enrol;
+        }
+    });
+    this.query.query = "";
+    this.editShowType = 'socialEnrol';
+  }
+
+  // 保存社会考生课程限制
+  saveSocialEnrol() {
+    if(this.is_social_enrol === ' ' || this.is_social_enrol === undefined)  {
+      AppComponent.alert({ title: "信息提示", text: "请选择是否允许社会考生报考!" });
+      return;
+    }
+    FrameRequest.request(this.SOCIAL_ENROL_URL, {  
+      course_ids: this.courseIds.join(), 
+      is_social_enrol : this.is_social_enrol  }, () => {
+      AppComponent.GobalComponent.successMsg("设置成功");
+      this.hideModal();
+      this.framePager.reload();
+    });
+  }
+
+  downXls() {
+    let param = {
+      query: this.query.query,
+      nation_exam: this.query.nation_exam,
+      special_flag : this.query.special_flag,
+      course_filter:this.query.course_filter,
+      status:this.query.status,
+      is_net_mark:this.query.is_net_mark
+  };
+  AppComponent.GobalComponent.setLoading(true);
+  FrameRequest.download("pl/plCourse/downxls.htm", param, ()=>{
+      AppComponent.GobalComponent.setLoading(false);
+      AppComponent.GobalComponent.successMsg("导出成功!");
+  });
+  }
+
+  //考区(停用)
+  // showExamArea() {
+  //   if (!this.examArea) {
+  //     this.examAreaFlag = false;
+  //   } else {
+  //     this.examAreaFlag = true;
+  //     this.examAreaChooseFlag = true;
+  //   }
+  // }
+}

+ 22 - 0
src/app/routes/hm-soft/pl/pl-course-pre/pl-course-pre.module.ts

@@ -0,0 +1,22 @@
+import { NgModule} from '@angular/core';
+import { Routes, RouterModule } from '@angular/router';
+import { SharedModule } from '../../../../shared/shared.module';
+import { HmSoftModule } from '../../hmsoft.module';
+import { PlCoursePreComponent } from './pl-course-pre.component';
+ 
+const routes: Routes = [
+    { path: '', component: PlCoursePreComponent },
+];
+ 
+@NgModule({
+    imports: [
+      SharedModule,
+      HmSoftModule,
+      RouterModule.forChild(routes)
+    ],
+    declarations: [
+        PlCoursePreComponent
+    ],
+  
+  })
+export class PlCoursePreModule { }

+ 641 - 0
src/app/routes/hm-soft/pl/pl-major-apply-pro-query/majorapplyproquery.component.html

@@ -0,0 +1,641 @@
+<div class="panel panel-default">
+    <!--标题-->
+    <div class="panel-title" style="margin-bottom:0px;">
+        <nav aria-label="breadcrumb">
+            <ol class="breadcrumb" style="margin-bottom:0px;">
+                <!-- TODO
+                <li class="breadcrumb-item">专业管理</li> -->
+                <li class="breadcrumb-item active" aria-current="page">专本衔接专业备案查询</li>
+            </ol>
+        </nav>
+    </div>
+
+    
+
+    <div class="panel-body ml-sm" [hidden]="editShowType=='only' || editShowType=='applyTimeFilter'">
+        <div class="card card-default">
+            <div class="card-body">
+                <!--查询条件-->
+                <div class="row mb-3 ml-1" [hidden]="editShowType=='only' || editShowType=='applyTimeFilter'">
+                    <div class="col-lg-12">
+                        <form (ngSubmit)="framePager.goSearch()" class="form-inline">
+                            <table>
+                                <tr>
+                                    <td>
+                            <div class="input-group mr-1 input-group-sm">
+                                <label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;年度:</label>
+                                <flex-select [allowClear]="true"
+                                    [(items)] = "yearCodeList"
+                                    respDataPath= "array"
+                                    optionValueField="year"
+                                    optionTextField="year"
+                                    [(ngModel)]="query.year"
+                                    placeholder="请选择"
+                                    [ngModelOptions]="{standalone: true}"
+                                    width = "160"
+                                    noResultsFound = "无数据"
+                                    >
+                                </flex-select>
+                            </div>
+                        </td>
+                        <td>
+                            <div class="input-group mr-1 input-group-sm">
+                                <label>主考学校:</label>
+                                <flex-select [allowClear]="true"
+                                    [(items)] = "masterSchoolList"
+                                    respDataPath= "array"
+                                    optionValueField="id"
+                                    optionTextField="org_name"
+                                    [(ngModel)]="query.school_id"
+                                    placeholder="请选择"
+                                    [ngModelOptions]="{standalone: true}"
+                                    width = "160"
+                                    noResultsFound = "无数据"
+                                    >
+                                </flex-select>
+                            </div>
+                            </td>
+                        </tr>
+                        <tr>
+                            <td>
+                            <div class="input-group mr-1 input-group-sm">
+                                    <label>衔接学校:</label>
+                                    <flex-select [allowClear]="true"
+                                    [(items)]="joinSchoolList"
+                                    respDataPath= "array"
+                                    optionValueField="id"
+                                    optionTextField="org_name"
+                                    [(ngModel)]="query.join_school_id"
+                                    [ngModelOptions]="{standalone: true}"
+                                    placeholder="请选择"
+                                    width = "160"
+                                    noResultsFound = "无数据"
+                                    >
+                                </flex-select>
+                                </div>
+
+                            </td>
+                            
+                             
+                            <!-- <div class="input-group mr-1 input-group-sm">
+                                <label>申报学校:</label>
+                                <flex-select [allowClear]="true"
+                                    [(items)] = "masterSchoolList"
+                                    respDataPath= "array"
+                                    optionValueField="id"
+                                    optionTextField="org_name"
+                                    [(ngModel)]="query.applySchoolId"
+                                    placeholder="请选择"
+                                    [ngModelOptions]="{standalone: true}"
+                                    width = "40"
+                                    noResultsFound = "无数据"
+                                    >
+                                </flex-select>
+                            </div> 
+                            -->
+                            <td>
+                            <div class="input-group mr-1 input-group-sm">
+                                <label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;专业:</label>
+                                <flex-select [allowClear]="true"
+                                    [(items)] = "majorList"
+                                    respDataPath= "array"
+                                    optionValueField="id"
+                                    optionTextField="full_name"
+                                    [(ngModel)]="query.major_id"
+                                    placeholder="请选择"
+                                    [ngModelOptions]="{standalone: true}"
+                                    width = "160"
+                                    noResultsFound = "无数据"
+                                    >
+                                </flex-select>
+                            </div>
+                        </td>
+                        <td>
+                            <button class="btn btn-primary btn-rounded btn-outline btn-sm  mr-1" (click)="framePager.goSearch()">
+                                <i class="fa fa-search"></i> 查询</button>
+                            <button class="btn btn-primary btn-rounded btn-outline btn-sm  mr-1" (click)="resetQuery()">
+                                <i class="fa fa-undo"></i> 重置</button>
+                            </td>
+                            </tr>
+                            </table>
+                            </form>
+                    </div>
+                </div>
+
+                <!-- 工具栏 -->
+                <div *ngIf="query.status==1" class="row mb-2" [hidden]="editShowType=='only' || editShowType=='applyTimeFilter'">
+                    <div class="col-lg-12">
+                        <div class="pull-left" style="text-align: right;">
+                           <!--
+                            <button class="btn btn-primary mr-1 btn-sm" data-toggle="tooltip" data-placement="left"
+                                (click)="toApply()" title="专业备案">
+                                <i class="fa fa-plus"></i> 专业备案</button>&nbsp;&nbsp;
+                            
+                                <button class="btn btn-primary mr-1 btn-sm" data-toggle="tooltip" data-placement="left"
+                                (click)="submitApply();" title="提交申请">
+                                <i class="fa fa-plus"></i> 提交申请</button>&nbsp;&nbsp;
+                            
+                                <button class="btn mr-1 btn-sm bg-danger" (click)="proxyDelete()" data-toggle="tooltip"
+                                data-placement="left" title="删除">
+                                <i class="fa fa-trash"></i>删除</button>&nbsp;&nbsp;
+                                -->
+                        </div>
+                    </div>
+                </div>
+
+                <!--表格-->
+                <div class="row">
+                    <div class="col-lg-12 ml-0" [hidden]="editShowType=='only' || editShowType=='applyTimeFilter'">
+                        <table class="table table-sm table-striped table-hover table-bordered bg-white">
+                            <thead>
+                                <tr>
+                                    <!--<th>
+                                        <div class="checkbox c-checkbox">
+                                            <label>
+                                                <input type="checkbox" (change)="framePager.checkedMasterToggle($event)" />
+                                                <span class="fa fa-check"></span>
+                                            </label>
+                                        </div>
+                                    </th>
+                                -->
+                                    <th>序号</th>
+                                    <th align="center">年度</th>
+                                    <th>主考院校</th>
+                                    <th>衔接学校</th>
+                                    <th>专业代码</th>
+                                    <th>专业名称</th>
+                                    <th align="center">备案日期</th>
+                                   
+                                    <!--<th align="center">是否驳回</th>
+                                    <th style="width: 80px;" align="center">操作</th>-->
+                                </tr>
+                            </thead>
+                            <tbody>
+                                <tr *ngFor="let item of framePager.getRecords(); let i = index">
+                                    <!--
+                                    <td>
+                                        <div class="checkbox c-checkbox input-group-sm">
+                                            <label>
+                                                <input type="checkbox" [value]="item.id" [(checked)]="item.isChecked"
+                                                    [(ngModel)]="item.isChecked" />
+                                                <span class="fa fa-check"></span>
+                                            </label>
+                                        </div>
+                                    </td>
+                                    -->
+                                    <td>{{framePager.pageStart + i}}</td>
+                                    <td align="center">{{item.year}}</td>
+                                    <td>{{item.master_school}}</td>
+                                    <td>{{item.join_school}}</td>
+                                    <td>{{item.major_code}}</td>
+                                    <td>{{item.major_name}}</td>
+
+                                    <td align="center">{{item.apply_date.substring(0,10)}}</td>
+                                   <!-- <td align="center" [innerHTML]="item.is_auth_back | frameDict:'YesOrNo'"></td>
+                                    <td align="center">
+                                                                            
+                                        <a href="#" (click)="proxyDelete(item)" title="删除"><em class="fa-lg fas fa-trash mr-1"
+                                                style="color:#F56D6D"></em></a>     
+                                    </td>
+                                    -->
+                                </tr>
+                            </tbody>
+                        </table>
+                        <!-- TODO -->
+                        <frame-pager [url]="QUERY_URL" hideSearch="true" hasCheck="true" #framePager (preReqEvent)="search($event)"></frame-pager>
+                    </div>
+
+                    <!-- 编辑页面 -->
+                    <div class="col-lg-12" *ngIf="item && editShowType != null && editShowType!='modal'">
+                        <ng-container *ngTemplateOutlet="editTemplateModal">
+                        </ng-container>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+    <!-- only编辑页面-->
+    <div class="col-lg-12" *ngIf="item && editShowType != null && editShowType =='only'">
+        <ng-container *ngTemplateOutlet="editTemplateModal">
+        </ng-container>
+    </div>
+    <!-- 申报时间过滤界面-->
+    <div class="col-lg-12" *ngIf="editShowType != null && editShowType =='applyTimeFilter'">
+        <ng-container *ngTemplateOutlet="applyTimeListModal">
+        </ng-container>
+    </div>        
+</div>
+<div class="row">
+    <frame-uploader #uploader [silenceUpload]="true" [autoUpload]="true" [(uploadUrl)]="UPLOAD_URL"></frame-uploader>
+</div>
+<!--申报界面-->
+<ng-template #editFormTemplate>
+    <form [formGroup]="formModel" *ngIf="item" class="form-validate form-horizontal" novalidate="">
+        <input type="hidden" class="form-control" formControlName="id" [(ngModel)]="item.id" [formControl]="formModel.controls['id']" />
+
+            <!--主考学校信息查看,全日制才显示
+            <div class="row mb-1">
+                    <label class="col-lg-2 col-form-label text-lg-right">主考学校</label>
+                    <div class="col-lg-8">
+                        <table class="table table-bordered">
+                            <thead>
+                                <tr>
+                                    <th>主考学校代码</th>
+                                    <th>主考学校名称</th>
+                                   
+                                </tr>
+                            </thead>
+                            <tbody>
+                                <tr *ngIf="!item.id">
+                                    <td>{{curOrg.org_code_bz}}</td>
+                                    <td>{{curOrg.org_name}}</td>
+                                   
+                                </tr>
+                                <tr *ngIf="item.id">
+                                    <td>{{item.masterSchool.org_code_bz}}</td>
+                                    <td>{{item.masterSchool.org_name}}</td>
+                                </tr>
+                            </tbody>
+                        </table>
+                    </div>
+            </div>
+            -->
+            
+            <div class="row mb-2">
+                <label class="col-lg-2 col-form-label text-lg-right">年度</label>
+                <div class="col-lg-8">
+                    <flex-select [allowClear]="true"
+                        [(items)] = "yearCodeList"
+                        optionValueField="year"
+                        optionTextField="year"
+                        [(ngModel)]="item.year"
+                        placeholder="请选择"
+                        formControlName="year" 
+                        [formControl]="formModel.controls['year']" 
+                        width = "250"
+                        noResultsFound = "无数据"
+                        >
+                    </flex-select>
+                    <span class="text-danger" *ngIf="formModel.get('year').hasError('required') && (formModel.get('year').dirty || formModel.get('year').touched)">请选择年度</span>
+                </div>
+            </div>
+
+            <div class="row mb-2">
+                <label class="col-lg-2 col-form-label text-lg-right">主考学校</label>
+                <div class="col-lg-8 form-inline">
+                    <flex-select [allowClear]="true"
+                    [(items)] = "masterSchoolList"
+                    respDataPath= "array"
+                    optionValueField="id"
+                    optionTextField="org_name"
+                    [(ngModel)]="item.school_id"
+                    placeholder="请选择"
+                    formControlName="school_id" 
+                    [formControl]="formModel.controls['school_id']" 
+                    width = "250"
+                    noResultsFound = "无数据"
+                    >
+                </flex-select>
+                <span class="text-danger" *ngIf="formModel.get('school_id').hasError('required') && (formModel.get('school_id').dirty || formModel.get('school_id').touched)">请选择主考学校</span>
+
+                   
+                    
+                </div>
+        </div>
+
+                <div class="row mb-2">
+                    <label class="col-lg-2 col-form-label text-lg-right">衔接学校</label>
+                    <div class="col-lg-8 form-inline">
+                        <flex-select [allowClear]="true"
+                            [(items)]="joinSchoolList"
+                            respDataPath= "array"
+                            optionValueField="id"
+                            optionTextField="org_name"
+                            [(ngModel)]="item.join_school_id"
+                            formControlName="join_school_id" 
+                            [formControl]="formModel.controls['join_school_id']" 
+                            placeholder="请选择"
+                            width = "250"
+                            noResultsFound = "无数据"
+                            >
+                        </flex-select>
+                        <span class="text-danger" *ngIf="formModel.get('join_school_id').hasError('required') && (formModel.get('join_school_id').dirty || formModel.get('join_school_id').touched)">请选择衔接学校</span>
+
+                        
+                    </div>
+            </div>
+
+            
+            <!--<div class="row mb-2">
+                <label class="col-lg-2 col-form-label text-lg-right">专业层次</label>
+                <div class="col-lg-8">
+                        <flex-select [allowClear]="true"
+                        [(items)] = "eduLevelList"
+                        respDataPath= "array"
+                        optionValueField="key"
+                        optionTextField="val"
+                        [(ngModel)]="item.major_level"
+                        placeholder="请选择"
+                        formControlName="major_level" 
+                        [formControl]="formModel.controls['major_level']" 
+                        width = "100"
+                        noResultsFound = "无数据"
+                        >
+                    </flex-select>
+                    <span class="text-danger" *ngIf="formModel.get('major_level').hasError('required') && (formModel.get('major_level').dirty || formModel.get('major_level').touched)">请选择专业层次</span>
+                </div>
+            </div>
+
+            <div class="row mb-2">
+                <label class="col-lg-2 col-form-label text-lg-right">申报形式</label>
+                <div class="col-lg-8">
+                    <select class="custom-select" formControlName="apply_form" [formControl]="formModel.controls['apply_form']"  style="width: 290px;"
+                    [(ngModel)]="item.apply_form" frameDict [dictName]="'MajorApplyForm'" [(dictValue)]="item.apply_form">
+                    </select>
+                    <span class="text-danger" *ngIf="formModel.get('apply_form').hasError('required') && (formModel.get('apply_form').dirty || formModel.get('apply_form').touched)">请选择申报形式</span>&nbsp;&nbsp;
+
+                </div>
+            </div>
+-->
+           
+
+            <div class="row mb-2">
+                <label class="col-lg-2 col-form-label text-lg-right">备案专业</label>
+                <div class="col-lg-8  form-inline">
+                    <flex-select [allowClear]="true"
+                        [(items)] = "majorList"
+                        respDataPath= "array"
+                        optionValueField="id"
+                        optionTextField="full_name"
+                        [(ngModel)]="item.major_id"
+                        placeholder="请选择"
+                        formControlName="major_id" 
+                        [formControl]="formModel.controls['major_id']" 
+                        width = "250"
+                        noResultsFound = "无数据"
+                        >
+                    </flex-select>
+                    
+                    <button class="btn btn-primary mr-1 btn-sm" data-toggle="tooltip" data-placement="left" (click)="addMultiMajor()" title="添加">
+                        <i class="fa fa-plus"></i> 添加专业</button>
+                        
+                </div>
+            </div>
+
+            <div class="row mb-1">
+                    <!-- 审核流程列表 -->
+                    <label class="col-lg-2 col-form-label text-lg-right">备案专业</label>
+                    <div class="col-lg-8">
+                        <table class="table table-sm table-striped table-hover table-bordered bg-white">
+                            <thead>
+                                <tr>
+                                    <th>专业代码</th>
+                                    <th>专业名称</th>
+                                    <th align="center">专业层次</th>
+                                </tr>
+                            </thead>
+                            <tbody>
+                                <tr *ngFor="let it of appledMajorList; let i = index">
+                                   
+                                    <td>{{it.major_code}}</td>
+                                    <td>{{it.major_name}}</td>
+                                    <td align="center" [innerHTML]="it.major_level| frameDict:'MajorLevel'"></td>
+                                </tr>
+                            </tbody>
+                        </table>
+                    </div>
+                </div>
+            
+            <!-- 审核记录查询 
+        <div class="row mb-1">
+           
+            <label class="col-lg-2 col-form-label text-lg-right">审核记录</label>
+            <div class="col-lg-8">
+                <table class="table table-sm table-striped table-hover table-bordered bg-white">
+                    <thead>
+                        <tr>
+                            <th>审核类型</th>
+                            <th align="center">审核时间</th>
+                            <th>审核人</th>
+                            <th>审核意见</th>
+                        </tr>
+                    </thead>
+                    <tbody>
+                        <tr *ngFor="let it of authList; let i = index">
+                            <td>{{it.auth_type | frameDict:'MajorApplyAuthType'}}</td>
+                            <td align="center">{{it.auth_time}}</td>
+                            <td>{{it.optr_name}}</td>
+                            <td>{{it.auth_remark}}</td>
+                        </tr>
+                    </tbody>
+                </table>
+            </div>
+        </div>
+        -->
+           
+            <div class="row mb-2" [hidden]="isHiddenMajorFlag">
+                    <label class="col-lg-2 col-form-label text-lg-right">已选专业</label>
+                    <div class="col-lg-8">
+                        <table class="table table-bordered">
+                            <thead>
+                                <tr>
+                                    <th align="center">专业代码</th>
+                                    <th>专业名称</th>
+                                    <th style="width: 80px;" *ngIf="curApplyForm === 1">衔接学校</th>
+                                    <th style="width: 60px;" align="center">操作</th>
+                                </tr>
+                            </thead>
+                            <tbody>
+                                <tr *ngFor="let key of getKeys(selectMajorMap)">
+                                        <td align="center">{{selectMajorMap[key].major_code}}</td>
+                                        <td>{{selectMajorMap[key].major_name}}</td>
+                                        <td *ngIf="curApplyForm === 1" style="text-align:center">
+                                            <a href="#"  (click)="showJoinSchoolDialog(joinSchoolModal,key);" title="衔接学校">
+                                                <em class="fa-lg fas fa-train mr-1"></em>
+                                            </a>
+                                        </td>
+                                        <td style="text-align:center">
+                                            <a href="#"  (click)="deleteMajor(key)" title="删除">
+                                                <em class="fa-lg fas fa-trash mr-1" style="color:#F56D6D"></em>
+                                            </a>
+                                        </td>
+                                    </tr>
+                            </tbody>
+
+                        </table>
+                    </div>
+            </div>
+        
+           
+           
+            <!--
+            <div class="row mb-1">
+                <label class="col-lg-2 col-form-label text-lg-right">说明</label>
+                <div class="col-lg-8">
+                    <textarea class="form-control" formControlName="apply_remark" [formControl]="formModel.controls['apply_remark']" maxlength="256"
+                        [(ngModel)]="item.apply_remark" rows="3"></textarea>
+                </div>
+                <span class="text-danger" *ngIf="formModel.get('apply_remark').hasError('required') && (formModel.get('apply_remark').dirty || formModel.get('apply_remark').touched)">请填写申报说明</span>
+            </div>
+            -->
+    </form>
+</ng-template>
+
+<ng-template #editTemplateModal>
+    <div class="modal-content">
+        <div class="modal-header info-success-qm">
+            <div class="pull-left">
+                <em class="fa-lg fas fa-edit "></em> 申报页面
+            </div>
+            <button type="button" class="close" (click)="hideModal()">×</button>
+        </div>
+
+        <!-- 1@3 -->
+        <div class="modal-body">
+            <div [ngTemplateOutlet]="editFormTemplate"></div>
+        </div>
+
+        <div class="modal-footer">
+            <button class="btn btn-info" (click)="save()" *ngIf="!item.id">
+                <i class="fa fa-info-circle"> </i> 保存
+            </button>
+            <!--
+            <button class="btn btn-info" (click)="save()" *ngIf="item.id && item.status==1">
+                <i class="fa fa-info-circle"> </i> 修改
+            </button>
+           -->
+            <button class="btn btn-default" (click)="hideModal()">
+                <i class="icon-close"> </i> 关闭
+            </button>
+        </div>
+    </div>
+</ng-template>
+
+<!--*********************************申请备案时间列表*********************************************-->
+<!-- 开考类型对应申报时间列表界面 -->
+<ng-template #applyTimeListModal>
+    <div class="modal-content">
+      
+          <div class="modal-header info-success-qm">
+            <div class="pull-left">
+              <em class="fa-lg fas fa-edit "></em> 专业申报
+            </div>
+            <button type="button" class="close" (click)="hideModal()">×</button>
+          </div>
+      
+          <div class="modal-body">
+            <div [ngTemplateOutlet]="applyTimeTemplate"></div>
+          </div>
+      
+          <div class="modal-footer">
+            <button class="btn btn-default" (click)="hideModal()">
+              <i class="icon-close"> </i> 关闭
+            </button>
+          </div>
+    </div>
+</ng-template>
+      
+      
+<ng-template #applyTimeTemplate>
+    <div class="row">
+        <div class="col-lg-12">
+            <table class="table table-sm table-striped table-hover table-bordered bg-white">
+              <thead>
+                <tr>
+                  <th>序号</th>
+                  <th align="center">申报形式</th>
+                  <th align="center">申报时间范围</th>
+                  <th align="center">年度</th>
+                  <th align="center">操作</th>
+                </tr>
+              </thead>
+              <tbody>
+                <tr *ngFor="let item of applyTimeList; let i = index">
+                  <td>{{i+1}}</td>
+                  <td align="center">{{item.dict_text}}</td>
+                  <td align="center">{{item.apply_start_time}} 到 {{item.apply_end_time}}</td>
+                  <td align="center">{{item.year_code}}</td>
+                  <td align="center">
+                    <a href="#" (click)="enterApply(item.apply_form,item.year_code)" title="进入专业申报">进入专业申报</a>
+                  </td>
+                </tr>
+              </tbody>
+            </table>
+        </div>
+    </div>
+</ng-template>
+
+<!--****************************衔接学校维护-专本衔接才有***********************-->
+<ng-template #joinSchoolModal>
+    <div class="modal-content">
+      
+          <div class="modal-header info-success-qm">
+            <div class="pull-left">
+              <em class="fa-lg fas fa-edit "></em> 衔接学校维护
+            </div>
+            <button type="button" class="close" (click)="hiderJoinModal()">×</button>
+          </div>
+      
+          <div class="modal-body">
+            <div [ngTemplateOutlet]="joinSchoolTemplate"></div>
+          </div>
+      
+          <div class="modal-footer">
+            <button class="btn btn-info" (click)="hiderJoinModal()">
+                <i class="fa fa-info-circle"> </i> 确定
+            </button>&nbsp;&nbsp;
+            <button class="btn btn-default" (click)="hiderJoinModal()">
+              <i class="icon-close"> </i> 关闭
+            </button>
+          </div>
+    </div>
+</ng-template>
+      
+      
+<ng-template #joinSchoolTemplate>
+    <div class="row mb-2">
+            <label class="col-lg-2 col-form-label text-lg-right">衔接学校</label>
+            <div class="col-lg-8 form-inline">
+                <flex-select [allowClear]="true"
+                    [(items)]="joinSchoolList"
+                    respDataPath= "array"
+                    optionValueField="id"
+                    optionTextField="org_name"
+                    [(ngModel)]="joinQuery.orgId"
+                    [ngModelOptions]="{standalone: true}"
+                    placeholder="请选择"
+                    width = "100"
+                    noResultsFound = "无数据"
+                    >
+                </flex-select>&nbsp;&nbsp;
+                <button class="btn btn-primary mr-1 btn-sm" data-toggle="tooltip" data-placement="left" (click)="addMultiJoinSchool()" title="添加">
+                        <i class="fa fa-plus"></i> 添加衔接学校</button>
+            </div>
+    </div>
+    <div class="row mb-2">
+        <div class="col-lg-12">
+            <table class="table table-sm table-striped table-hover table-bordered bg-white">
+              <thead>
+                <tr>
+                  <th>序号</th>
+                  <th>衔接学校代码</th>
+                  <th>衔接学校名称</th>
+                  <th>操作</th>
+                </tr>
+              </thead>
+              <tbody>
+                <tr *ngFor="let key of getKeys(currJoinSchoolMap); let i = index">
+                  <td>{{i+1}}</td>
+                  <td>{{currJoinSchoolMap[key].org_code}}</td>
+                  <td>{{currJoinSchoolMap[key].org_name}}</td>
+                  <td>
+                    <a href="#" (click)="deleteJoinSchool(currJoinSchoolMap[key].id)" title="删除">
+                        <em class="fa-lg fas fa-trash mr-1" style="color:#F56D6D"></em>
+                    </a>
+                  </td>
+                </tr>
+              </tbody>
+            </table>
+        </div>
+    </div>
+</ng-template>

+ 106 - 0
src/app/routes/hm-soft/pl/pl-major-apply-pro-query/majorapplyproquery.component.scss

@@ -0,0 +1,106 @@
+.modal-xlg {
+    max-width: 1100px;
+}
+
+.jf-org {
+    border-width: 0;
+    background-color: #ecf0f5;
+}
+
+.jf-org .jf-org-tab {
+    background-color: #fff;
+    border-color: #fff;
+    height: 40px;
+    line-height: 40px;
+}
+
+.panel-control {
+    padding-left: 0;
+    height: 100%;
+    position: relative;
+    padding: 0 0px;
+}
+
+.panel-control:before {
+    content: '';
+    display: inline-block;
+    height: 100%;
+    vertical-align: middle;
+    left: -1em;
+    position: relative;
+}
+
+.nav {
+    padding-left: 0;
+    list-style: none;
+}
+
+.nav-tabs {
+    margin: 0;
+    display: inline-block;
+    height: 40px;
+    vertical-align: bottom;
+    border: 0;
+}
+
+.nav-tabs:before {
+    display: table;
+    content: " ";
+}
+
+
+.panel-heading {
+    position: relative;
+    height: 40px;
+    padding: 0;
+    color: #2b425b;
+    border-bottom: 1px solid transparent;
+    border-top-left-radius: 3px;
+    border-top-right-radius: 3px;
+    background-color: #fff;
+}
+
+
+.nav-tabs > li:hover {
+    background-color: #edf2f6;
+    color: #35a4f2;
+    
+}
+
+
+.li-class-active{
+    display: inline-block;
+    text-align: center;
+    width: 150px;
+    color: #35a4f2;
+    background-color: #edf2f6;
+    cursor:pointer;
+    line-height: 40px;
+    border-top-left-radius: 0;
+    border-top-right-radius: 0;
+    padding: 0 15px;
+    border-radius: 0;
+    margin-right: 0;
+    border-right: 1px solid #ddd;
+    opacity: .6;
+}
+
+.li-class{
+    display: inline-block;
+    text-align: center;
+    width: 150px;
+    color: #000;
+    background-color: #fff;
+    cursor:pointer;
+    line-height: 40px;
+    border-top-left-radius: 0;
+    border-top-right-radius: 0;
+    padding: 0 15px;
+    border-radius: 0;
+    margin-right: 0;
+    border-right: 1px solid #ddd;
+    opacity: .6;
+}
+
+
+

+ 504 - 0
src/app/routes/hm-soft/pl/pl-major-apply-pro-query/majorapplyproquery.component.ts

@@ -0,0 +1,504 @@
+import { Component, OnInit, TemplateRef, ViewChild, ViewContainerRef } from "@angular/core";
+import { FormBuilder, Validators } from '@angular/forms';
+import { CustomValidators } from 'ng2-validation';
+import { BsModalService } from "ngx-bootstrap/modal";
+import { FlexTableComponent } from "../../../../shared/common/FlexTable.component";
+import { FrameUploaderComponent} from '../../../../core/uploader/uploader.component';
+import { AppComponent } from "../../../../app.component";
+import { FrameRequest } from "../../../../shared/frame/frame-request";
+import { FramePagerComponent } from "../../../../core/pager/pager.component";
+import { FrameVariable } from "../../../../shared/frame/frame-variable";
+import { FrameFunction } from "../../../../shared/frame/frame_function";
+
+declare var $: any;
+
+@Component({
+  selector: "app-pl-majorapplyproquery",
+  templateUrl: "./majorapplyproquery.component.html",
+  styleUrls: ["./majorapplyproquery.component.scss"]
+})
+export class MajorApplyProQueryComponent extends FlexTableComponent
+  implements OnInit {
+
+  @ViewChild('framePager')
+  framePager:FramePagerComponent;
+  
+  @ViewChild('editTemplateModal')
+  editTemplateModal:TemplateRef<any>;
+
+  @ViewChild('uploader')
+  uploader: FrameUploaderComponent;
+
+  joinSchoolWin: any;
+
+/**
+ * 机构类型.
+ */
+ OrgTypeEnum = {
+    PROVINCE_EXAM:0,
+    SCHOOL_EXAM:1,
+    CITY_EXAM:2,
+    ASSIST_EXAM:3,
+    EXAM_AREA:4,
+    STUDY_CENTER:5
+  };          
+  
+  applyTimeList = [];
+  masterSchoolList = [];//主考学校
+  joinSchoolList = []; //所有衔接学校
+  currJoinSchoolMap = {};//专业对应的衔接学校
+  currSelectMajorId="";//当前选择的专业--衔接学校添加到该专业下
+  majorList = [];//专业列表-列表查询
+  filterMajorList = [];//
+  curOrg = {id:"",org_code:"",org_name:"",contact_number:"",org_type:"",org_code_bz:""};//当前登录人的机构
+  selectMajorMap = {};//申报界面选择的专业map
+  //schoolIds = [];//提交选择的衔接学校、主考学校列表
+  majorIds = [];//提交选择的专业数组
+  joinSchoolIds = []; //衔接学校ID数组
+  //applyMasterShoolId : any;//申报选择主考学校
+  eduLevel : any;
+  isHiddenMajorFlag = true;//默认不显示已添加专业列表
+  isHiddenSchoolFlag = true;//默认不显示已添加衔接学校列表
+  isHiddenJoinSchoolFlag = true; //衔接学校是否显示
+  curApplyForm : any;
+  curYearCode : any;//申报界面使用的年度码
+  curYear : any;//申报界面使用的年度码
+
+  yearCodeList = [];
+
+  authList = [];//已审核记录
+  appledMajorList = [];//之前申请的专业列表
+  appledJoinSchoolMap = {};//之前申请的专本衔接,majorId--List<专本衔接学校>
+
+  isActive=0;
+
+  public query = {
+    year: "",
+    school_id:"",  //主考学校
+    join_school_id: "",  //申报学校
+    major_id: "",
+    status:"" 
+  };
+
+  public joinQuery = {
+    orgId:""  //专本衔接学校维护界面 选择的衔接学校ID
+  }
+
+  QUERY_URL = "pl/plMajorApplyPro/page.htm";
+  DELETE_URL = "pl/plMajorApplyPro/delete.htm";
+  GET_URL = "pl/plMajorApplyPro/get.htm";
+  ADD_URL = "pl/plMajorApplyPro/add.htm";
+  EDIT_URL = "pl/plMajorApplyPro/edit.htm";
+
+  YEARCODE_URL = "pl/plYearCode/listYear.htm";
+
+  UPLOAD_URL = "pl/plMajorApplyPro/upload.htm";
+  DOWNLOAD_URL = "pl/plMajorApplyPro/download.htm";
+  GET_APPLY_INFO = "pl/plMajorApplyPro/applyinfo.htm";
+
+  constructor(public bsModalService: BsModalService, fb: FormBuilder) {
+    super();
+    // CustomValidators.rangeLength([1, 6])
+    this.formModel = fb.group({
+      id: [null],
+       'year': [null, Validators.compose([Validators.required])],
+       //'file_path': [null],
+       'major_id': [null],
+      // 'apply_form': [null, Validators.compose([Validators.required])],
+      // 'apply_no': [null, Validators.compose([Validators.required])],
+      'school_id': [null, Validators.compose([Validators.required])],
+      'join_school_id': [null, Validators.compose([Validators.required])],
+      
+       'apply_remark' : [null]
+    });
+  }
+
+  ngOnInit() {
+    this.query.status = "1";
+    //基础数据(主考学校列表、专业列表、当前登录机构对象)
+    FrameRequest.requestMap("pl/plMajorApply/basedata.htm", {org_type:[1]}, (map)=>{
+      this.curOrg = map.curOrg;
+     // this.masterSchoolList = map.schoolList;
+     // this.majorList = map.majorList;
+    //  this.joinSchoolList = map.joinSchoolList;
+      this.curYearCode = map.year_code;
+      this.curYear = map.year;
+    });
+    FrameRequest.requestArray(this.YEARCODE_URL, {}, (array)=>{
+      this.yearCodeList = array;
+    });
+
+    FrameRequest.requestArray("cf/cfOrganization/list.htm", {org_type:5,status:1}, (array)=>{
+      this.joinSchoolList = array;
+    });
+
+    FrameRequest.requestArray("pl/plMajor/queryMajorByStatus.htm", {status:1,major_level:1}, (arrary) => {
+      this.majorList = arrary;
+    });
+
+    this.preShowModalWin();
+
+    FrameRequest.requestArray("cf/cfOrganization/list.htm?org_type=1&status=1", {}, (array)=>{
+      this.masterSchoolList = array;
+    });
+  }
+
+  search(param) {
+    if (this.query.year == null) {
+      this.query.year="";
+    }
+    if (this.query.join_school_id == null) {
+      this.query.join_school_id="";
+    }
+    if (this.query.school_id == null) {
+      this.query.school_id="";
+    }
+    if (this.query.major_id == null) {
+      this.query.major_id="";
+    }
+    
+    param.year=this.query.year;
+    param.join_school_id=this.query.join_school_id;
+    param.school_id=this.query.school_id;
+    param.major_id=this.query.major_id;
+    param.status=this.query.status;
+  }
+
+  resetQuery(){
+    this.query.year="";
+    this.query.school_id="";
+    this.query.join_school_id="";
+    this.query.major_id="";
+  }
+  
+
+  //删除代理
+  proxyDelete(item?) {
+    AppComponent.confirm("确定删除吗?",()=>{
+      FrameRequest.request(this.DELETE_URL, {id:item.id,detail_id:item.detail_id}, (ret)=>{
+        if (ret.errorCode == 0) {
+          this.hideModal();
+          this.framePager.reload();
+          AppComponent.GobalComponent.successMsg("删除成功");
+          
+        }
+      });
+    });
+
+    
+    
+   
+  }
+
+  async preShowModalWin(){
+    FrameRequest.requestArray("pl/majorApplyTime/applytimelist.htm", {}, (arr)=>{
+      this.applyTimeList = arr;
+    });
+    return true
+  }
+
+  //进入申报界面
+  enterApply(apply_form, year_code) {
+    this.hideModal();
+    this.item = {};
+    this.appledMajorList = [];
+    this.selectMajorMap = {};
+    //this.shouModalWin(this.editTemplateModal,'modal-lg');
+    this.goEdit(this.editTemplateModal,'only','modal-lg',this.item);
+    this.curApplyForm = apply_form;
+    this.curYearCode = year_code;
+    this.selectMajorMap = {};//清空专业选择
+    this.appledJoinSchoolMap = {};
+    //init
+    this.item.year_code = year_code;
+   // FrameRequest.requestArray("pl/plMajorApplyDir/dirmajorlist.htm", {year: String(year_code).substring(0,4),applyForm: apply_form}, (arr)=>{
+   //   this.majorList = arr;
+   // });
+  }
+
+  async toApply() {
+    
+    this.item = {};
+    this.item.year = this.curYear;
+    this.appledMajorList = [];
+    this.selectMajorMap = {};//清空专业选择
+    //this.appledJoinSchoolMap = {};
+    this.goEdit(this.editTemplateModal,'only','modal-lg',this.item);
+
+  }
+
+  
+  //申报时间列表界面
+  addMultiMajor() {
+    if (this.item.major_id) {
+      let major = this.getMajor(this.item.major_id);
+      this.selectMajorMap[this.item.major_id] = {
+        major_code:major.major_code,
+        major_name:major.major_name,
+        major_score:major.major_score
+      };
+      this.isHiddenMajorFlag = false;
+    }
+  }
+  
+  getMajor(majorId) {
+    for (let major of this.majorList) {
+      if (major.id == majorId) {
+        return major;
+      }
+    }
+    return null;
+  }
+
+  //列表删除专业
+  deleteMajor(key) {
+    delete this.selectMajorMap[key];
+    if (this.getKeys(this.selectMajorMap).length == 0) {//删除完后隐藏
+      this.isHiddenSchoolFlag = true;
+    }
+  }
+
+  getKeys(item) {
+    return Object.keys(item);
+  }
+
+  //上传申报资料
+  uploadFile() {
+    let obj = this.item;
+    
+      //上传文书
+      let param = {yearCode: this.item.year_code};
+      this.uploader.choooseFileAndUpload(param, ((ret) => {
+        if (ret.errorCode == 0) {
+          obj.file_path = ret.map.file_path;
+          obj.file_name = ret.map.file_name;
+          AppComponent.GobalComponent.successMsg("上传成功!");
+        }else if (ret.errorCode == -1) {
+         
+          AppComponent.GobalComponent.errorMsg(ret.errorMsg);
+        }
+      }));
+  }
+
+  //下载申报资料
+  downloadFile(id) {
+    FrameRequest.download(this.DOWNLOAD_URL,  { id: id });
+  }
+  
+  //代理打开 详情审批界面
+  proxyGoEdit(item) {
+    //先清空以前的数据
+    this.authList = [];
+    this.appledMajorList = [];
+    this.selectMajorMap = {};
+    this.curApplyForm = item.apply_form;
+    this.curYear = item.year;
+    //获取申请详情
+    FrameRequest.requestMap(this.GET_APPLY_INFO, {id: item.id}, async (map) => {
+      this.authList = map.authList;
+      this.appledMajorList = map.applyMajorList;
+
+      if (!item.id) {//新建
+        this.appledJoinSchoolMap={};
+      } else {//修改
+        let arr = map.joinSchoolMap;//java的map返回到前端后是数组
+        let mIds = Object.keys(arr);
+        for (let mId of mIds) {
+          let joinShools = arr[mId];
+          this.appledJoinSchoolMap[mId] = {};
+          for (let join of joinShools) {
+            this.appledJoinSchoolMap[mId][join.id] = {
+              id: join.id,
+              org_code: join.org_code,
+              org_name: join.org_name
+            }
+          }
+        }
+      }
+
+      for(let major of this.appledMajorList) {
+        this.selectMajorMap[major.id] = {
+          major_code:major.major_code,
+          major_name:major.major_name,
+          major_score:major.major_score,
+          major_level:major.major_level
+        };
+      }
+      this.isHiddenMajorFlag=false;
+    //  FrameRequest.requestArray("pl/plMajorApplyDir/dirmajorlist.htm", {year: String(item.year_code).substring(0,4),applyForm: item.apply_form}, (arr)=>{
+    //    this.majorList = arr;
+    //  });
+
+
+      //打开编辑
+      this.goEdit(this.editTemplateModal,'only','modal-lg',item);
+    });
+  }
+
+  //进入修改界面,带出最后一个专业显示,避免提交报专业不存在
+  async aftGoEditEvent(entity?){
+    if (this.appledMajorList.length > 0) {
+      this.item.major_id = this.appledMajorList[this.appledMajorList.length - 1].id;
+    }
+  }
+
+  //覆盖父类
+  async save() {
+    
+    if (!FrameFunction.validForm(this.formModel)) {
+      return;
+    }
+
+   
+
+    this.majorIds = this.getKeys(this.selectMajorMap);
+   //this.majorIds = this.item.major_id;
+
+    if (this.majorIds.length == 0) {
+      AppComponent.alert({title:"信息提示",text:"请添加专业!"});
+      return;
+    }
+
+    if(!this.item.apply_remark){
+      this.item.apply_remark = "";
+    }
+    
+    let submitUrl = "";
+    this.item.major_id_arr = this.majorIds;
+    this.item.RequestLoading = true;
+    //this.item.org_id = this.curOrg.id;
+   // this.item.school_id = this.curOrg.id;
+    //this.item.status = 0;//新建状态
+    delete this.item.masterSchool;
+    if (!this.item.id) {
+      submitUrl = this.ADD_URL;
+      delete this.item.id;
+      this.item.is_auth_back = 0;//默认没有退回
+     // this.item.apply_form = this.curApplyForm;
+     // this.item.status=1;
+    } else {
+      submitUrl = this.EDIT_URL;
+    }
+
+    if(!this.item.apply_no){
+      this.item.apply_no = "";
+    }
+
+    FrameRequest.request(submitUrl, this.item, (ret)=>{
+      if (ret.errorCode == 0) {
+        this.hideModal();
+        this.framePager.reload();
+        AppComponent.GobalComponent.successMsg("提交成功");
+        //清空
+        //this.schoolIds = [];
+        this.majorIds = [];
+        this.joinSchoolIds = [];
+      }
+    });
+  }
+
+  //获取申报审核基础数据
+  getApplyBaseInfo(applyId) {
+    FrameRequest.requestMap(this.GET_APPLY_INFO, {id: applyId}, async (map) => {
+      this.authList = map.authList;
+      this.appledMajorList = map.applyMajorList;
+      for(let major of this.appledMajorList) {
+        this.selectMajorMap[major.id] = {
+          major_code:major.major_code,
+          major_name:major.major_name,
+          major_score:major.major_score,
+          major_level:major.major_level
+        };
+      }
+      this.isHiddenMajorFlag=false;
+    });
+  }
+
+  //提交申请备案
+  submitApply() {
+    let arr = this.framePager.getCheckedArray();
+    if (arr.length > 0) {
+      for (let i=0; i<arr.length; i++) {
+        if (arr[i].status != 0) {
+          AppComponent.alert({title:"信息提示",text:"只能提交新建状态申请!"});
+          return false;
+        }
+      }
+    }
+    AppComponent.confirm("确定提交",()=>{
+      let checkedArray = [];
+      checkedArray = this.framePager.getCheckedArray((item)=>item.id);
+      FrameRequest.request("pl/plMajorApply/batchsubmit.htm", {ids:checkedArray.join()}, (ret)=>{
+        if (ret.errorCode == 0) {
+          this.framePager.reload();
+          AppComponent.GobalComponent.successMsg("提交成功!");
+        }
+      });
+    });
+  }
+
+  //维护指定专业的专本衔接学校
+  showJoinSchoolDialog(templateModal, majorId) {
+    this.joinSchoolWin = this.bsModalService.show(templateModal, { class: "modal-lg" });
+    //appledJoinSchoolMap--查询当前专业对应的衔接学校列表
+    this.currSelectMajorId = majorId;
+    let arr = this.appledJoinSchoolMap[majorId];
+    if (arr) {//不是数组对象
+      /*for (let jo of arr) {
+        this.currJoinSchoolMap[jo.id] = {
+          id: jo.id,
+          org_code: jo.org_code,
+          org_name: jo.org_name
+        }
+      }*/
+      this.currJoinSchoolMap = arr;
+    } else {
+      this.currJoinSchoolMap={};//新选的专业时清空.
+    }
+  }
+
+  //添加衔接学校
+  addMultiJoinSchool() {
+    let org = this.getJoinSchool(this.joinQuery.orgId);
+    if (!this.appledJoinSchoolMap[this.currSelectMajorId]) {
+      this.appledJoinSchoolMap[this.currSelectMajorId] = {};
+    }
+    this.appledJoinSchoolMap[this.currSelectMajorId][org.id] = {
+      id: org.id,
+      org_code: org.org_code,
+      org_name: org.org_name
+    };
+    this.currJoinSchoolMap[org.id] = {
+      id: org.id,
+      org_code: org.org_code,
+      org_name: org.org_name
+    };
+  }
+
+  //列表删除衔接学校
+  deleteJoinSchool(orgId) {
+    delete this.appledJoinSchoolMap[orgId];
+    delete this.currJoinSchoolMap[orgId];
+  }
+
+  getJoinSchool(schoolId) {
+    for (let school of this.joinSchoolList) {
+      if (school.id == schoolId) {
+        return school;
+      }
+    }
+    return null;
+  }
+
+  hiderJoinModal() {
+    this.joinSchoolWin.hide();
+    this.joinQuery.orgId = "";//关闭衔接学校维护窗口后清空!
+  }
+
+  //下载申报资料
+  downloadApplyFile(applyId) {
+    FrameRequest.download(this.DOWNLOAD_URL,  { id: applyId });
+  }
+
+  
+}

+ 22 - 0
src/app/routes/hm-soft/pl/pl-major-apply-pro-query/majorapplyproquery.module.ts

@@ -0,0 +1,22 @@
+import { NgModule} from '@angular/core';
+import { Routes, RouterModule } from '@angular/router';
+import { SharedModule } from '../../../../shared/shared.module';
+import { HmSoftModule } from '../../hmsoft.module';
+import { MajorApplyProQueryComponent } from './majorapplyproquery.component';
+ 
+const routes: Routes = [
+    { path: '', component: MajorApplyProQueryComponent },
+];
+ 
+@NgModule({
+    imports: [
+      SharedModule,
+      HmSoftModule,
+      RouterModule.forChild(routes)
+    ],
+    declarations: [
+        MajorApplyProQueryComponent
+    ],
+  
+  })
+export class MajorApplyProQueryModule { }

+ 639 - 0
src/app/routes/hm-soft/pl/pl-major-apply-pro/majorapplypro.component.html

@@ -0,0 +1,639 @@
+<div class="panel panel-default">
+    <!--标题-->
+    <div class="panel-title" style="margin-bottom:0px;">
+        <nav aria-label="breadcrumb">
+            <ol class="breadcrumb" style="margin-bottom:0px;">
+                <!-- TODO
+                <li class="breadcrumb-item">专业管理</li> -->
+                <li class="breadcrumb-item active" aria-current="page">专本衔接专业备案</li>
+            </ol>
+        </nav>
+    </div>
+
+    
+
+    <div class="panel-body ml-sm" [hidden]="editShowType=='only' || editShowType=='applyTimeFilter'">
+        <div class="card card-default">
+            <div class="card-body">
+                <!--查询条件-->
+                <div class="row mb-3 ml-1" [hidden]="editShowType=='only' || editShowType=='applyTimeFilter'">
+                    <div class="col-lg-12">
+                        <form (ngSubmit)="framePager.goSearch()" class="form-inline">
+                            <table>
+                                <tr>
+                                    <td>
+                            <div class="input-group mr-1 input-group-sm">
+                                <label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;年度:</label>
+                                <flex-select [allowClear]="true"
+                                    [(items)] = "yearCodeList"
+                                    respDataPath= "array"
+                                    optionValueField="year"
+                                    optionTextField="year"
+                                    [(ngModel)]="query.year"
+                                    placeholder="请选择"
+                                    [ngModelOptions]="{standalone: true}"
+                                    width = "160"
+                                    noResultsFound = "无数据"
+                                    >
+                                </flex-select>
+                            </div>
+                        </td>
+                        <td>
+                            <div class="input-group mr-1 input-group-sm">
+                                <label>主考学校:</label>
+                                <flex-select [allowClear]="true"
+                                    [(items)] = "masterSchoolList"
+                                    respDataPath= "array"
+                                    optionValueField="id"
+                                    optionTextField="org_name"
+                                    [(ngModel)]="query.school_id"
+                                    placeholder="请选择"
+                                    [ngModelOptions]="{standalone: true}"
+                                    width = "160"
+                                    noResultsFound = "无数据"
+                                    >
+                                </flex-select>
+                            </div>
+                            </td>
+                        </tr>
+                        <tr>
+                            <td>
+                            <div class="input-group mr-1 input-group-sm">
+                                    <label>衔接学校:</label>
+                                    <flex-select [allowClear]="true"
+                                    [(items)]="joinSchoolList"
+                                    respDataPath= "array"
+                                    optionValueField="id"
+                                    optionTextField="org_name"
+                                    [(ngModel)]="query.join_school_id"
+                                    [ngModelOptions]="{standalone: true}"
+                                    placeholder="请选择"
+                                    width = "160"
+                                    noResultsFound = "无数据"
+                                    >
+                                </flex-select>
+                                </div>
+
+                            </td>
+                            
+                             
+                            <!-- <div class="input-group mr-1 input-group-sm">
+                                <label>申报学校:</label>
+                                <flex-select [allowClear]="true"
+                                    [(items)] = "masterSchoolList"
+                                    respDataPath= "array"
+                                    optionValueField="id"
+                                    optionTextField="org_name"
+                                    [(ngModel)]="query.applySchoolId"
+                                    placeholder="请选择"
+                                    [ngModelOptions]="{standalone: true}"
+                                    width = "40"
+                                    noResultsFound = "无数据"
+                                    >
+                                </flex-select>
+                            </div> 
+                            -->
+                            <td>
+                            <div class="input-group mr-1 input-group-sm">
+                                <label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;专业:</label>
+                                <flex-select [allowClear]="true"
+                                    [(items)] = "majorList"
+                                    respDataPath= "array"
+                                    optionValueField="id"
+                                    optionTextField="full_name"
+                                    [(ngModel)]="query.major_id"
+                                    placeholder="请选择"
+                                    [ngModelOptions]="{standalone: true}"
+                                    width = "160"
+                                    noResultsFound = "无数据"
+                                    >
+                                </flex-select>
+                            </div>
+                        </td>
+                        <td>
+                            <button class="btn btn-primary btn-rounded btn-outline btn-sm  mr-1" (click)="framePager.goSearch()">
+                                <i class="fa fa-search"></i> 查询</button>
+                            <button class="btn btn-primary btn-rounded btn-outline btn-sm  mr-1" (click)="resetQuery()">
+                                <i class="fa fa-undo"></i> 重置</button>
+                            </td>
+                            </tr>
+                            </table>
+                            </form>
+                    </div>
+                </div>
+
+                <!-- 工具栏 -->
+                <div *ngIf="query.status==1" class="row mb-2" [hidden]="editShowType=='only' || editShowType=='applyTimeFilter'">
+                    <div class="col-lg-12">
+                        <div class="pull-left" style="text-align: right;">
+                            <button class="btn btn-primary mr-1 btn-sm" data-toggle="tooltip" data-placement="left"
+                                (click)="toApply()" title="专业备案">
+                                <i class="fa fa-plus"></i> 专业备案</button>&nbsp;&nbsp;
+                            <!--
+                                <button class="btn btn-primary mr-1 btn-sm" data-toggle="tooltip" data-placement="left"
+                                (click)="submitApply();" title="提交申请">
+                                <i class="fa fa-plus"></i> 提交申请</button>&nbsp;&nbsp;
+                            
+                                <button class="btn mr-1 btn-sm bg-danger" (click)="proxyDelete()" data-toggle="tooltip"
+                                data-placement="left" title="删除">
+                                <i class="fa fa-trash"></i>删除</button>&nbsp;&nbsp;
+                                -->
+                        </div>
+                    </div>
+                </div>
+
+                <!--表格-->
+                <div class="row">
+                    <div class="col-lg-12 ml-0" [hidden]="editShowType=='only' || editShowType=='applyTimeFilter'">
+                        <table class="table table-sm table-striped table-hover table-bordered bg-white">
+                            <thead>
+                                <tr>
+                                    <!--<th>
+                                        <div class="checkbox c-checkbox">
+                                            <label>
+                                                <input type="checkbox" (change)="framePager.checkedMasterToggle($event)" />
+                                                <span class="fa fa-check"></span>
+                                            </label>
+                                        </div>
+                                    </th>
+                                -->
+                                    <th>序号</th>
+                                    <th align="center">年度</th>
+                                    <th>主考院校</th>
+                                    <th>衔接学校</th>
+                                    <th>专业代码</th>
+                                    <th>专业名称</th>
+                                    <th align="center">备案日期</th>
+                                   
+                                    <!--<th align="center">是否驳回</th>-->
+                                    <th style="width: 80px;" align="center">操作</th>
+                                </tr>
+                            </thead>
+                            <tbody>
+                                <tr *ngFor="let item of framePager.getRecords(); let i = index">
+                                    <!--
+                                    <td>
+                                        <div class="checkbox c-checkbox input-group-sm">
+                                            <label>
+                                                <input type="checkbox" [value]="item.id" [(checked)]="item.isChecked"
+                                                    [(ngModel)]="item.isChecked" />
+                                                <span class="fa fa-check"></span>
+                                            </label>
+                                        </div>
+                                    </td>
+                                    -->
+                                    <td>{{framePager.pageStart + i}}</td>
+                                    <td align="center">{{item.year}}</td>
+                                    <td>{{item.master_school}}</td>
+                                    <td>{{item.join_school}}</td>
+                                    <td>{{item.major_code}}</td>
+                                    <td>{{item.major_name}}</td>
+
+                                    <td align="center">{{item.apply_date.substring(0,10)}}</td>
+                                   <!-- <td align="center" [innerHTML]="item.is_auth_back | frameDict:'YesOrNo'"></td>-->
+                                    <td align="center">
+                                                                            
+                                        <a href="#" (click)="proxyDelete(item)" title="删除"><em class="fa-lg fas fa-trash mr-1"
+                                                style="color:#F56D6D"></em></a>     
+                                    </td>
+                                </tr>
+                            </tbody>
+                        </table>
+                        <!-- TODO -->
+                        <frame-pager [url]="QUERY_URL" hideSearch="true" hasCheck="true" #framePager (preReqEvent)="search($event)"></frame-pager>
+                    </div>
+
+                    <!-- 编辑页面 -->
+                    <div class="col-lg-12" *ngIf="item && editShowType != null && editShowType!='modal'">
+                        <ng-container *ngTemplateOutlet="editTemplateModal">
+                        </ng-container>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+    <!-- only编辑页面-->
+    <div class="col-lg-12" *ngIf="item && editShowType != null && editShowType =='only'">
+        <ng-container *ngTemplateOutlet="editTemplateModal">
+        </ng-container>
+    </div>
+    <!-- 申报时间过滤界面-->
+    <div class="col-lg-12" *ngIf="editShowType != null && editShowType =='applyTimeFilter'">
+        <ng-container *ngTemplateOutlet="applyTimeListModal">
+        </ng-container>
+    </div>        
+</div>
+<div class="row">
+    <frame-uploader #uploader [silenceUpload]="true" [autoUpload]="true" [(uploadUrl)]="UPLOAD_URL"></frame-uploader>
+</div>
+<!--申报界面-->
+<ng-template #editFormTemplate>
+    <form [formGroup]="formModel" *ngIf="item" class="form-validate form-horizontal" novalidate="">
+        <input type="hidden" class="form-control" formControlName="id" [(ngModel)]="item.id" [formControl]="formModel.controls['id']" />
+
+            <!--主考学校信息查看,全日制才显示
+            <div class="row mb-1">
+                    <label class="col-lg-2 col-form-label text-lg-right">主考学校</label>
+                    <div class="col-lg-8">
+                        <table class="table table-bordered">
+                            <thead>
+                                <tr>
+                                    <th>主考学校代码</th>
+                                    <th>主考学校名称</th>
+                                   
+                                </tr>
+                            </thead>
+                            <tbody>
+                                <tr *ngIf="!item.id">
+                                    <td>{{curOrg.org_code_bz}}</td>
+                                    <td>{{curOrg.org_name}}</td>
+                                   
+                                </tr>
+                                <tr *ngIf="item.id">
+                                    <td>{{item.masterSchool.org_code_bz}}</td>
+                                    <td>{{item.masterSchool.org_name}}</td>
+                                </tr>
+                            </tbody>
+                        </table>
+                    </div>
+            </div>
+            -->
+            
+            <div class="row mb-2">
+                <label class="col-lg-2 col-form-label text-lg-right">年度</label>
+                <div class="col-lg-8">
+                    <flex-select [allowClear]="true"
+                        [(items)] = "yearCodeList"
+                        optionValueField="year"
+                        optionTextField="year"
+                        [(ngModel)]="item.year"
+                        placeholder="请选择"
+                        formControlName="year" 
+                        [formControl]="formModel.controls['year']" 
+                        width = "250"
+                        noResultsFound = "无数据"
+                        >
+                    </flex-select>
+                    <span class="text-danger" *ngIf="formModel.get('year').hasError('required') && (formModel.get('year').dirty || formModel.get('year').touched)">请选择年度</span>
+                </div>
+            </div>
+
+            <div class="row mb-2">
+                <label class="col-lg-2 col-form-label text-lg-right">主考学校</label>
+                <div class="col-lg-8 form-inline">
+                    <flex-select [allowClear]="true"
+                    [(items)] = "masterSchoolList"
+                    respDataPath= "array"
+                    optionValueField="id"
+                    optionTextField="org_name"
+                    [(ngModel)]="item.school_id"
+                    placeholder="请选择"
+                    formControlName="school_id" 
+                    [formControl]="formModel.controls['school_id']" 
+                    width = "250"
+                    noResultsFound = "无数据"
+                    >
+                </flex-select>
+                <span class="text-danger" *ngIf="formModel.get('school_id').hasError('required') && (formModel.get('school_id').dirty || formModel.get('school_id').touched)">请选择主考学校</span>
+
+                   
+                    
+                </div>
+        </div>
+
+                <div class="row mb-2">
+                    <label class="col-lg-2 col-form-label text-lg-right">衔接学校</label>
+                    <div class="col-lg-8 form-inline">
+                        <flex-select [allowClear]="true"
+                            [(items)]="joinSchoolList"
+                            respDataPath= "array"
+                            optionValueField="id"
+                            optionTextField="org_name"
+                            [(ngModel)]="item.join_school_id"
+                            formControlName="join_school_id" 
+                            [formControl]="formModel.controls['join_school_id']" 
+                            placeholder="请选择"
+                            width = "250"
+                            noResultsFound = "无数据"
+                            >
+                        </flex-select>
+                        <span class="text-danger" *ngIf="formModel.get('join_school_id').hasError('required') && (formModel.get('join_school_id').dirty || formModel.get('join_school_id').touched)">请选择衔接学校</span>
+
+                        
+                    </div>
+            </div>
+
+            
+            <!--<div class="row mb-2">
+                <label class="col-lg-2 col-form-label text-lg-right">专业层次</label>
+                <div class="col-lg-8">
+                        <flex-select [allowClear]="true"
+                        [(items)] = "eduLevelList"
+                        respDataPath= "array"
+                        optionValueField="key"
+                        optionTextField="val"
+                        [(ngModel)]="item.major_level"
+                        placeholder="请选择"
+                        formControlName="major_level" 
+                        [formControl]="formModel.controls['major_level']" 
+                        width = "100"
+                        noResultsFound = "无数据"
+                        >
+                    </flex-select>
+                    <span class="text-danger" *ngIf="formModel.get('major_level').hasError('required') && (formModel.get('major_level').dirty || formModel.get('major_level').touched)">请选择专业层次</span>
+                </div>
+            </div>
+
+            <div class="row mb-2">
+                <label class="col-lg-2 col-form-label text-lg-right">申报形式</label>
+                <div class="col-lg-8">
+                    <select class="custom-select" formControlName="apply_form" [formControl]="formModel.controls['apply_form']"  style="width: 290px;"
+                    [(ngModel)]="item.apply_form" frameDict [dictName]="'MajorApplyForm'" [(dictValue)]="item.apply_form">
+                    </select>
+                    <span class="text-danger" *ngIf="formModel.get('apply_form').hasError('required') && (formModel.get('apply_form').dirty || formModel.get('apply_form').touched)">请选择申报形式</span>&nbsp;&nbsp;
+
+                </div>
+            </div>
+-->
+           
+
+            <div class="row mb-2">
+                <label class="col-lg-2 col-form-label text-lg-right">备案专业</label>
+                <div class="col-lg-8  form-inline">
+                    <flex-select [allowClear]="true"
+                        [(items)] = "majorList"
+                        respDataPath= "array"
+                        optionValueField="id"
+                        optionTextField="full_name"
+                        [(ngModel)]="item.major_id"
+                        placeholder="请选择"
+                        formControlName="major_id" 
+                        [formControl]="formModel.controls['major_id']" 
+                        width = "250"
+                        noResultsFound = "无数据"
+                        >
+                    </flex-select>
+                    
+                    <button class="btn btn-primary mr-1 btn-sm" data-toggle="tooltip" data-placement="left" (click)="addMultiMajor()" title="添加">
+                        <i class="fa fa-plus"></i> 添加专业</button>
+                        
+                </div>
+            </div>
+
+            <div class="row mb-1">
+                    <!-- 审核流程列表 -->
+                    <label class="col-lg-2 col-form-label text-lg-right">备案专业</label>
+                    <div class="col-lg-8">
+                        <table class="table table-sm table-striped table-hover table-bordered bg-white">
+                            <thead>
+                                <tr>
+                                    <th>专业代码</th>
+                                    <th>专业名称</th>
+                                    <th align="center">专业层次</th>
+                                </tr>
+                            </thead>
+                            <tbody>
+                                <tr *ngFor="let it of appledMajorList; let i = index">
+                                   
+                                    <td>{{it.major_code}}</td>
+                                    <td>{{it.major_name}}</td>
+                                    <td align="center" [innerHTML]="it.major_level| frameDict:'MajorLevel'"></td>
+                                </tr>
+                            </tbody>
+                        </table>
+                    </div>
+                </div>
+            
+            <!-- 审核记录查询 
+        <div class="row mb-1">
+           
+            <label class="col-lg-2 col-form-label text-lg-right">审核记录</label>
+            <div class="col-lg-8">
+                <table class="table table-sm table-striped table-hover table-bordered bg-white">
+                    <thead>
+                        <tr>
+                            <th>审核类型</th>
+                            <th align="center">审核时间</th>
+                            <th>审核人</th>
+                            <th>审核意见</th>
+                        </tr>
+                    </thead>
+                    <tbody>
+                        <tr *ngFor="let it of authList; let i = index">
+                            <td>{{it.auth_type | frameDict:'MajorApplyAuthType'}}</td>
+                            <td align="center">{{it.auth_time}}</td>
+                            <td>{{it.optr_name}}</td>
+                            <td>{{it.auth_remark}}</td>
+                        </tr>
+                    </tbody>
+                </table>
+            </div>
+        </div>
+        -->
+           
+            <div class="row mb-2" [hidden]="isHiddenMajorFlag">
+                    <label class="col-lg-2 col-form-label text-lg-right">已选专业</label>
+                    <div class="col-lg-8">
+                        <table class="table table-bordered">
+                            <thead>
+                                <tr>
+                                    <th align="center">专业代码</th>
+                                    <th>专业名称</th>
+                                    <th style="width: 80px;" *ngIf="curApplyForm === 1">衔接学校</th>
+                                    <th style="width: 60px;" align="center">操作</th>
+                                </tr>
+                            </thead>
+                            <tbody>
+                                <tr *ngFor="let key of getKeys(selectMajorMap)">
+                                        <td align="center">{{selectMajorMap[key].major_code}}</td>
+                                        <td>{{selectMajorMap[key].major_name}}</td>
+                                        <td *ngIf="curApplyForm === 1" style="text-align:center">
+                                            <a href="#"  (click)="showJoinSchoolDialog(joinSchoolModal,key);" title="衔接学校">
+                                                <em class="fa-lg fas fa-train mr-1"></em>
+                                            </a>
+                                        </td>
+                                        <td style="text-align:center">
+                                            <a href="#"  (click)="deleteMajor(key)" title="删除">
+                                                <em class="fa-lg fas fa-trash mr-1" style="color:#F56D6D"></em>
+                                            </a>
+                                        </td>
+                                    </tr>
+                            </tbody>
+
+                        </table>
+                    </div>
+            </div>
+        
+           
+           
+            <!--
+            <div class="row mb-1">
+                <label class="col-lg-2 col-form-label text-lg-right">说明</label>
+                <div class="col-lg-8">
+                    <textarea class="form-control" formControlName="apply_remark" [formControl]="formModel.controls['apply_remark']" maxlength="256"
+                        [(ngModel)]="item.apply_remark" rows="3"></textarea>
+                </div>
+                <span class="text-danger" *ngIf="formModel.get('apply_remark').hasError('required') && (formModel.get('apply_remark').dirty || formModel.get('apply_remark').touched)">请填写申报说明</span>
+            </div>
+            -->
+    </form>
+</ng-template>
+
+<ng-template #editTemplateModal>
+    <div class="modal-content">
+        <div class="modal-header info-success-qm">
+            <div class="pull-left">
+                <em class="fa-lg fas fa-edit "></em> 申报页面
+            </div>
+            <button type="button" class="close" (click)="hideModal()">×</button>
+        </div>
+
+        <!-- 1@3 -->
+        <div class="modal-body">
+            <div [ngTemplateOutlet]="editFormTemplate"></div>
+        </div>
+
+        <div class="modal-footer">
+            <button class="btn btn-info" (click)="save()" *ngIf="!item.id">
+                <i class="fa fa-info-circle"> </i> 保存
+            </button>
+            <!--
+            <button class="btn btn-info" (click)="save()" *ngIf="item.id && item.status==1">
+                <i class="fa fa-info-circle"> </i> 修改
+            </button>
+           -->
+            <button class="btn btn-default" (click)="hideModal()">
+                <i class="icon-close"> </i> 关闭
+            </button>
+        </div>
+    </div>
+</ng-template>
+
+<!--*********************************申请备案时间列表*********************************************-->
+<!-- 开考类型对应申报时间列表界面 -->
+<ng-template #applyTimeListModal>
+    <div class="modal-content">
+      
+          <div class="modal-header info-success-qm">
+            <div class="pull-left">
+              <em class="fa-lg fas fa-edit "></em> 专业申报
+            </div>
+            <button type="button" class="close" (click)="hideModal()">×</button>
+          </div>
+      
+          <div class="modal-body">
+            <div [ngTemplateOutlet]="applyTimeTemplate"></div>
+          </div>
+      
+          <div class="modal-footer">
+            <button class="btn btn-default" (click)="hideModal()">
+              <i class="icon-close"> </i> 关闭
+            </button>
+          </div>
+    </div>
+</ng-template>
+      
+      
+<ng-template #applyTimeTemplate>
+    <div class="row">
+        <div class="col-lg-12">
+            <table class="table table-sm table-striped table-hover table-bordered bg-white">
+              <thead>
+                <tr>
+                  <th>序号</th>
+                  <th align="center">申报形式</th>
+                  <th align="center">申报时间范围</th>
+                  <th align="center">年度</th>
+                  <th align="center">操作</th>
+                </tr>
+              </thead>
+              <tbody>
+                <tr *ngFor="let item of applyTimeList; let i = index">
+                  <td>{{i+1}}</td>
+                  <td align="center">{{item.dict_text}}</td>
+                  <td align="center">{{item.apply_start_time}} 到 {{item.apply_end_time}}</td>
+                  <td align="center">{{item.year_code}}</td>
+                  <td align="center">
+                    <a href="#" (click)="enterApply(item.apply_form,item.year_code)" title="进入专业申报">进入专业申报</a>
+                  </td>
+                </tr>
+              </tbody>
+            </table>
+        </div>
+    </div>
+</ng-template>
+
+<!--****************************衔接学校维护-专本衔接才有***********************-->
+<ng-template #joinSchoolModal>
+    <div class="modal-content">
+      
+          <div class="modal-header info-success-qm">
+            <div class="pull-left">
+              <em class="fa-lg fas fa-edit "></em> 衔接学校维护
+            </div>
+            <button type="button" class="close" (click)="hiderJoinModal()">×</button>
+          </div>
+      
+          <div class="modal-body">
+            <div [ngTemplateOutlet]="joinSchoolTemplate"></div>
+          </div>
+      
+          <div class="modal-footer">
+            <button class="btn btn-info" (click)="hiderJoinModal()">
+                <i class="fa fa-info-circle"> </i> 确定
+            </button>&nbsp;&nbsp;
+            <button class="btn btn-default" (click)="hiderJoinModal()">
+              <i class="icon-close"> </i> 关闭
+            </button>
+          </div>
+    </div>
+</ng-template>
+      
+      
+<ng-template #joinSchoolTemplate>
+    <div class="row mb-2">
+            <label class="col-lg-2 col-form-label text-lg-right">衔接学校</label>
+            <div class="col-lg-8 form-inline">
+                <flex-select [allowClear]="true"
+                    [(items)]="joinSchoolList"
+                    respDataPath= "array"
+                    optionValueField="id"
+                    optionTextField="org_name"
+                    [(ngModel)]="joinQuery.orgId"
+                    [ngModelOptions]="{standalone: true}"
+                    placeholder="请选择"
+                    width = "100"
+                    noResultsFound = "无数据"
+                    >
+                </flex-select>&nbsp;&nbsp;
+                <button class="btn btn-primary mr-1 btn-sm" data-toggle="tooltip" data-placement="left" (click)="addMultiJoinSchool()" title="添加">
+                        <i class="fa fa-plus"></i> 添加衔接学校</button>
+            </div>
+    </div>
+    <div class="row mb-2">
+        <div class="col-lg-12">
+            <table class="table table-sm table-striped table-hover table-bordered bg-white">
+              <thead>
+                <tr>
+                  <th>序号</th>
+                  <th>衔接学校代码</th>
+                  <th>衔接学校名称</th>
+                  <th>操作</th>
+                </tr>
+              </thead>
+              <tbody>
+                <tr *ngFor="let key of getKeys(currJoinSchoolMap); let i = index">
+                  <td>{{i+1}}</td>
+                  <td>{{currJoinSchoolMap[key].org_code}}</td>
+                  <td>{{currJoinSchoolMap[key].org_name}}</td>
+                  <td>
+                    <a href="#" (click)="deleteJoinSchool(currJoinSchoolMap[key].id)" title="删除">
+                        <em class="fa-lg fas fa-trash mr-1" style="color:#F56D6D"></em>
+                    </a>
+                  </td>
+                </tr>
+              </tbody>
+            </table>
+        </div>
+    </div>
+</ng-template>

+ 106 - 0
src/app/routes/hm-soft/pl/pl-major-apply-pro/majorapplypro.component.scss

@@ -0,0 +1,106 @@
+.modal-xlg {
+    max-width: 1100px;
+}
+
+.jf-org {
+    border-width: 0;
+    background-color: #ecf0f5;
+}
+
+.jf-org .jf-org-tab {
+    background-color: #fff;
+    border-color: #fff;
+    height: 40px;
+    line-height: 40px;
+}
+
+.panel-control {
+    padding-left: 0;
+    height: 100%;
+    position: relative;
+    padding: 0 0px;
+}
+
+.panel-control:before {
+    content: '';
+    display: inline-block;
+    height: 100%;
+    vertical-align: middle;
+    left: -1em;
+    position: relative;
+}
+
+.nav {
+    padding-left: 0;
+    list-style: none;
+}
+
+.nav-tabs {
+    margin: 0;
+    display: inline-block;
+    height: 40px;
+    vertical-align: bottom;
+    border: 0;
+}
+
+.nav-tabs:before {
+    display: table;
+    content: " ";
+}
+
+
+.panel-heading {
+    position: relative;
+    height: 40px;
+    padding: 0;
+    color: #2b425b;
+    border-bottom: 1px solid transparent;
+    border-top-left-radius: 3px;
+    border-top-right-radius: 3px;
+    background-color: #fff;
+}
+
+
+.nav-tabs > li:hover {
+    background-color: #edf2f6;
+    color: #35a4f2;
+    
+}
+
+
+.li-class-active{
+    display: inline-block;
+    text-align: center;
+    width: 150px;
+    color: #35a4f2;
+    background-color: #edf2f6;
+    cursor:pointer;
+    line-height: 40px;
+    border-top-left-radius: 0;
+    border-top-right-radius: 0;
+    padding: 0 15px;
+    border-radius: 0;
+    margin-right: 0;
+    border-right: 1px solid #ddd;
+    opacity: .6;
+}
+
+.li-class{
+    display: inline-block;
+    text-align: center;
+    width: 150px;
+    color: #000;
+    background-color: #fff;
+    cursor:pointer;
+    line-height: 40px;
+    border-top-left-radius: 0;
+    border-top-right-radius: 0;
+    padding: 0 15px;
+    border-radius: 0;
+    margin-right: 0;
+    border-right: 1px solid #ddd;
+    opacity: .6;
+}
+
+
+

+ 504 - 0
src/app/routes/hm-soft/pl/pl-major-apply-pro/majorapplypro.component.ts

@@ -0,0 +1,504 @@
+import { Component, OnInit, TemplateRef, ViewChild, ViewContainerRef } from "@angular/core";
+import { FormBuilder, Validators } from '@angular/forms';
+import { CustomValidators } from 'ng2-validation';
+import { BsModalService } from "ngx-bootstrap/modal";
+import { FlexTableComponent } from "../../../../shared/common/FlexTable.component";
+import { FrameUploaderComponent} from '../../../../core/uploader/uploader.component';
+import { AppComponent } from "../../../../app.component";
+import { FrameRequest } from "../../../../shared/frame/frame-request";
+import { FramePagerComponent } from "../../../../core/pager/pager.component";
+import { FrameVariable } from "../../../../shared/frame/frame-variable";
+import { FrameFunction } from "../../../../shared/frame/frame_function";
+
+declare var $: any;
+
+@Component({
+  selector: "app-pl-majorapplypro",
+  templateUrl: "./majorapplypro.component.html",
+  styleUrls: ["./majorapplypro.component.scss"]
+})
+export class MajorApplyProComponent extends FlexTableComponent
+  implements OnInit {
+
+  @ViewChild('framePager')
+  framePager:FramePagerComponent;
+  
+  @ViewChild('editTemplateModal')
+  editTemplateModal:TemplateRef<any>;
+
+  @ViewChild('uploader')
+  uploader: FrameUploaderComponent;
+
+  joinSchoolWin: any;
+
+/**
+ * 机构类型.
+ */
+ OrgTypeEnum = {
+    PROVINCE_EXAM:0,
+    SCHOOL_EXAM:1,
+    CITY_EXAM:2,
+    ASSIST_EXAM:3,
+    EXAM_AREA:4,
+    STUDY_CENTER:5
+  };          
+  
+  applyTimeList = [];
+  masterSchoolList = [];//主考学校
+  joinSchoolList = []; //所有衔接学校
+  currJoinSchoolMap = {};//专业对应的衔接学校
+  currSelectMajorId="";//当前选择的专业--衔接学校添加到该专业下
+  majorList = [];//专业列表-列表查询
+  filterMajorList = [];//
+  curOrg = {id:"",org_code:"",org_name:"",contact_number:"",org_type:"",org_code_bz:""};//当前登录人的机构
+  selectMajorMap = {};//申报界面选择的专业map
+  //schoolIds = [];//提交选择的衔接学校、主考学校列表
+  majorIds = [];//提交选择的专业数组
+  joinSchoolIds = []; //衔接学校ID数组
+  //applyMasterShoolId : any;//申报选择主考学校
+  eduLevel : any;
+  isHiddenMajorFlag = true;//默认不显示已添加专业列表
+  isHiddenSchoolFlag = true;//默认不显示已添加衔接学校列表
+  isHiddenJoinSchoolFlag = true; //衔接学校是否显示
+  curApplyForm : any;
+  curYearCode : any;//申报界面使用的年度码
+  curYear : any;//申报界面使用的年度码
+
+  yearCodeList = [];
+
+  authList = [];//已审核记录
+  appledMajorList = [];//之前申请的专业列表
+  appledJoinSchoolMap = {};//之前申请的专本衔接,majorId--List<专本衔接学校>
+
+  isActive=0;
+
+  public query = {
+    year: "",
+    school_id:"",  //主考学校
+    join_school_id: "",  //申报学校
+    major_id: "",
+    status:"" 
+  };
+
+  public joinQuery = {
+    orgId:""  //专本衔接学校维护界面 选择的衔接学校ID
+  }
+
+  QUERY_URL = "pl/plMajorApplyPro/page.htm";
+  DELETE_URL = "pl/plMajorApplyPro/delete.htm";
+  GET_URL = "pl/plMajorApplyPro/get.htm";
+  ADD_URL = "pl/plMajorApplyPro/add.htm";
+  EDIT_URL = "pl/plMajorApplyPro/edit.htm";
+
+  YEARCODE_URL = "pl/plYearCode/listYear.htm";
+
+  UPLOAD_URL = "pl/plMajorApplyPro/upload.htm";
+  DOWNLOAD_URL = "pl/plMajorApplyPro/download.htm";
+  GET_APPLY_INFO = "pl/plMajorApplyPro/applyinfo.htm";
+
+  constructor(public bsModalService: BsModalService, fb: FormBuilder) {
+    super();
+    // CustomValidators.rangeLength([1, 6])
+    this.formModel = fb.group({
+      id: [null],
+       'year': [null, Validators.compose([Validators.required])],
+       //'file_path': [null],
+       'major_id': [null],
+      // 'apply_form': [null, Validators.compose([Validators.required])],
+      // 'apply_no': [null, Validators.compose([Validators.required])],
+      'school_id': [null, Validators.compose([Validators.required])],
+      'join_school_id': [null, Validators.compose([Validators.required])],
+      
+       'apply_remark' : [null]
+    });
+  }
+
+  ngOnInit() {
+    this.query.status = "1";
+    //基础数据(主考学校列表、专业列表、当前登录机构对象)
+    FrameRequest.requestMap("pl/plMajorApply/basedata.htm", {org_type:[1]}, (map)=>{
+      this.curOrg = map.curOrg;
+     // this.masterSchoolList = map.schoolList;
+     // this.majorList = map.majorList;
+    //  this.joinSchoolList = map.joinSchoolList;
+      this.curYearCode = map.year_code;
+      this.curYear = map.year;
+    });
+    FrameRequest.requestArray(this.YEARCODE_URL, {}, (array)=>{
+      this.yearCodeList = array;
+    });
+
+    FrameRequest.requestArray("cf/cfOrganization/list.htm", {org_type:5,status:1}, (array)=>{
+      this.joinSchoolList = array;
+    });
+
+    FrameRequest.requestArray("pl/plMajor/queryMajorByStatus.htm", {status:1,major_level:1}, (arrary) => {
+      this.majorList = arrary;
+    });
+
+    this.preShowModalWin();
+
+    FrameRequest.requestArray("cf/cfOrganization/list.htm?org_type=1&status=1", {}, (array)=>{
+      this.masterSchoolList = array;
+    });
+  }
+
+  search(param) {
+    if (this.query.year == null) {
+      this.query.year="";
+    }
+    if (this.query.join_school_id == null) {
+      this.query.join_school_id="";
+    }
+    if (this.query.school_id == null) {
+      this.query.school_id="";
+    }
+    if (this.query.major_id == null) {
+      this.query.major_id="";
+    }
+    
+    param.year=this.query.year;
+    param.join_school_id=this.query.join_school_id;
+    param.school_id=this.query.school_id;
+    param.major_id=this.query.major_id;
+    param.status=this.query.status;
+  }
+
+  resetQuery(){
+    this.query.year="";
+    this.query.school_id="";
+    this.query.join_school_id="";
+    this.query.major_id="";
+  }
+  
+
+  //删除代理
+  proxyDelete(item?) {
+    AppComponent.confirm("确定删除吗?",()=>{
+      FrameRequest.request(this.DELETE_URL, {id:item.id,detail_id:item.detail_id}, (ret)=>{
+        if (ret.errorCode == 0) {
+          this.hideModal();
+          this.framePager.reload();
+          AppComponent.GobalComponent.successMsg("删除成功");
+          
+        }
+      });
+    });
+
+    
+    
+   
+  }
+
+  async preShowModalWin(){
+    FrameRequest.requestArray("pl/majorApplyTime/applytimelist.htm", {}, (arr)=>{
+      this.applyTimeList = arr;
+    });
+    return true
+  }
+
+  //进入申报界面
+  enterApply(apply_form, year_code) {
+    this.hideModal();
+    this.item = {};
+    this.appledMajorList = [];
+    this.selectMajorMap = {};
+    //this.shouModalWin(this.editTemplateModal,'modal-lg');
+    this.goEdit(this.editTemplateModal,'only','modal-lg',this.item);
+    this.curApplyForm = apply_form;
+    this.curYearCode = year_code;
+    this.selectMajorMap = {};//清空专业选择
+    this.appledJoinSchoolMap = {};
+    //init
+    this.item.year_code = year_code;
+   // FrameRequest.requestArray("pl/plMajorApplyDir/dirmajorlist.htm", {year: String(year_code).substring(0,4),applyForm: apply_form}, (arr)=>{
+   //   this.majorList = arr;
+   // });
+  }
+
+  async toApply() {
+    
+    this.item = {};
+    this.item.year = this.curYear;
+    this.appledMajorList = [];
+    this.selectMajorMap = {};//清空专业选择
+    //this.appledJoinSchoolMap = {};
+    this.goEdit(this.editTemplateModal,'only','modal-lg',this.item);
+
+  }
+
+  
+  //申报时间列表界面
+  addMultiMajor() {
+    if (this.item.major_id) {
+      let major = this.getMajor(this.item.major_id);
+      this.selectMajorMap[this.item.major_id] = {
+        major_code:major.major_code,
+        major_name:major.major_name,
+        major_score:major.major_score
+      };
+      this.isHiddenMajorFlag = false;
+    }
+  }
+  
+  getMajor(majorId) {
+    for (let major of this.majorList) {
+      if (major.id == majorId) {
+        return major;
+      }
+    }
+    return null;
+  }
+
+  //列表删除专业
+  deleteMajor(key) {
+    delete this.selectMajorMap[key];
+    if (this.getKeys(this.selectMajorMap).length == 0) {//删除完后隐藏
+      this.isHiddenSchoolFlag = true;
+    }
+  }
+
+  getKeys(item) {
+    return Object.keys(item);
+  }
+
+  //上传申报资料
+  uploadFile() {
+    let obj = this.item;
+    
+      //上传文书
+      let param = {yearCode: this.item.year_code};
+      this.uploader.choooseFileAndUpload(param, ((ret) => {
+        if (ret.errorCode == 0) {
+          obj.file_path = ret.map.file_path;
+          obj.file_name = ret.map.file_name;
+          AppComponent.GobalComponent.successMsg("上传成功!");
+        }else if (ret.errorCode == -1) {
+         
+          AppComponent.GobalComponent.errorMsg(ret.errorMsg);
+        }
+      }));
+  }
+
+  //下载申报资料
+  downloadFile(id) {
+    FrameRequest.download(this.DOWNLOAD_URL,  { id: id });
+  }
+  
+  //代理打开 详情审批界面
+  proxyGoEdit(item) {
+    //先清空以前的数据
+    this.authList = [];
+    this.appledMajorList = [];
+    this.selectMajorMap = {};
+    this.curApplyForm = item.apply_form;
+    this.curYear = item.year;
+    //获取申请详情
+    FrameRequest.requestMap(this.GET_APPLY_INFO, {id: item.id}, async (map) => {
+      this.authList = map.authList;
+      this.appledMajorList = map.applyMajorList;
+
+      if (!item.id) {//新建
+        this.appledJoinSchoolMap={};
+      } else {//修改
+        let arr = map.joinSchoolMap;//java的map返回到前端后是数组
+        let mIds = Object.keys(arr);
+        for (let mId of mIds) {
+          let joinShools = arr[mId];
+          this.appledJoinSchoolMap[mId] = {};
+          for (let join of joinShools) {
+            this.appledJoinSchoolMap[mId][join.id] = {
+              id: join.id,
+              org_code: join.org_code,
+              org_name: join.org_name
+            }
+          }
+        }
+      }
+
+      for(let major of this.appledMajorList) {
+        this.selectMajorMap[major.id] = {
+          major_code:major.major_code,
+          major_name:major.major_name,
+          major_score:major.major_score,
+          major_level:major.major_level
+        };
+      }
+      this.isHiddenMajorFlag=false;
+    //  FrameRequest.requestArray("pl/plMajorApplyDir/dirmajorlist.htm", {year: String(item.year_code).substring(0,4),applyForm: item.apply_form}, (arr)=>{
+    //    this.majorList = arr;
+    //  });
+
+
+      //打开编辑
+      this.goEdit(this.editTemplateModal,'only','modal-lg',item);
+    });
+  }
+
+  //进入修改界面,带出最后一个专业显示,避免提交报专业不存在
+  async aftGoEditEvent(entity?){
+    if (this.appledMajorList.length > 0) {
+      this.item.major_id = this.appledMajorList[this.appledMajorList.length - 1].id;
+    }
+  }
+
+  //覆盖父类
+  async save() {
+    
+    if (!FrameFunction.validForm(this.formModel)) {
+      return;
+    }
+
+   
+
+    this.majorIds = this.getKeys(this.selectMajorMap);
+   //this.majorIds = this.item.major_id;
+
+    if (this.majorIds.length == 0) {
+      AppComponent.alert({title:"信息提示",text:"请添加专业!"});
+      return;
+    }
+
+    if(!this.item.apply_remark){
+      this.item.apply_remark = "";
+    }
+    
+    let submitUrl = "";
+    this.item.major_id_arr = this.majorIds;
+    this.item.RequestLoading = true;
+    //this.item.org_id = this.curOrg.id;
+   // this.item.school_id = this.curOrg.id;
+    //this.item.status = 0;//新建状态
+    delete this.item.masterSchool;
+    if (!this.item.id) {
+      submitUrl = this.ADD_URL;
+      delete this.item.id;
+      this.item.is_auth_back = 0;//默认没有退回
+     // this.item.apply_form = this.curApplyForm;
+     // this.item.status=1;
+    } else {
+      submitUrl = this.EDIT_URL;
+    }
+
+    if(!this.item.apply_no){
+      this.item.apply_no = "";
+    }
+
+    FrameRequest.request(submitUrl, this.item, (ret)=>{
+      if (ret.errorCode == 0) {
+        this.hideModal();
+        this.framePager.reload();
+        AppComponent.GobalComponent.successMsg("提交成功");
+        //清空
+        //this.schoolIds = [];
+        this.majorIds = [];
+        this.joinSchoolIds = [];
+      }
+    });
+  }
+
+  //获取申报审核基础数据
+  getApplyBaseInfo(applyId) {
+    FrameRequest.requestMap(this.GET_APPLY_INFO, {id: applyId}, async (map) => {
+      this.authList = map.authList;
+      this.appledMajorList = map.applyMajorList;
+      for(let major of this.appledMajorList) {
+        this.selectMajorMap[major.id] = {
+          major_code:major.major_code,
+          major_name:major.major_name,
+          major_score:major.major_score,
+          major_level:major.major_level
+        };
+      }
+      this.isHiddenMajorFlag=false;
+    });
+  }
+
+  //提交申请备案
+  submitApply() {
+    let arr = this.framePager.getCheckedArray();
+    if (arr.length > 0) {
+      for (let i=0; i<arr.length; i++) {
+        if (arr[i].status != 0) {
+          AppComponent.alert({title:"信息提示",text:"只能提交新建状态申请!"});
+          return false;
+        }
+      }
+    }
+    AppComponent.confirm("确定提交",()=>{
+      let checkedArray = [];
+      checkedArray = this.framePager.getCheckedArray((item)=>item.id);
+      FrameRequest.request("pl/plMajorApply/batchsubmit.htm", {ids:checkedArray.join()}, (ret)=>{
+        if (ret.errorCode == 0) {
+          this.framePager.reload();
+          AppComponent.GobalComponent.successMsg("提交成功!");
+        }
+      });
+    });
+  }
+
+  //维护指定专业的专本衔接学校
+  showJoinSchoolDialog(templateModal, majorId) {
+    this.joinSchoolWin = this.bsModalService.show(templateModal, { class: "modal-lg" });
+    //appledJoinSchoolMap--查询当前专业对应的衔接学校列表
+    this.currSelectMajorId = majorId;
+    let arr = this.appledJoinSchoolMap[majorId];
+    if (arr) {//不是数组对象
+      /*for (let jo of arr) {
+        this.currJoinSchoolMap[jo.id] = {
+          id: jo.id,
+          org_code: jo.org_code,
+          org_name: jo.org_name
+        }
+      }*/
+      this.currJoinSchoolMap = arr;
+    } else {
+      this.currJoinSchoolMap={};//新选的专业时清空.
+    }
+  }
+
+  //添加衔接学校
+  addMultiJoinSchool() {
+    let org = this.getJoinSchool(this.joinQuery.orgId);
+    if (!this.appledJoinSchoolMap[this.currSelectMajorId]) {
+      this.appledJoinSchoolMap[this.currSelectMajorId] = {};
+    }
+    this.appledJoinSchoolMap[this.currSelectMajorId][org.id] = {
+      id: org.id,
+      org_code: org.org_code,
+      org_name: org.org_name
+    };
+    this.currJoinSchoolMap[org.id] = {
+      id: org.id,
+      org_code: org.org_code,
+      org_name: org.org_name
+    };
+  }
+
+  //列表删除衔接学校
+  deleteJoinSchool(orgId) {
+    delete this.appledJoinSchoolMap[orgId];
+    delete this.currJoinSchoolMap[orgId];
+  }
+
+  getJoinSchool(schoolId) {
+    for (let school of this.joinSchoolList) {
+      if (school.id == schoolId) {
+        return school;
+      }
+    }
+    return null;
+  }
+
+  hiderJoinModal() {
+    this.joinSchoolWin.hide();
+    this.joinQuery.orgId = "";//关闭衔接学校维护窗口后清空!
+  }
+
+  //下载申报资料
+  downloadApplyFile(applyId) {
+    FrameRequest.download(this.DOWNLOAD_URL,  { id: applyId });
+  }
+
+  
+}

+ 22 - 0
src/app/routes/hm-soft/pl/pl-major-apply-pro/majorapplypro.module.ts

@@ -0,0 +1,22 @@
+import { NgModule} from '@angular/core';
+import { Routes, RouterModule } from '@angular/router';
+import { SharedModule } from '../../../../shared/shared.module';
+import { HmSoftModule } from '../../hmsoft.module';
+import { MajorApplyProComponent } from './majorapplypro.component';
+ 
+const routes: Routes = [
+    { path: '', component: MajorApplyProComponent },
+];
+ 
+@NgModule({
+    imports: [
+      SharedModule,
+      HmSoftModule,
+      RouterModule.forChild(routes)
+    ],
+    declarations: [
+        MajorApplyProComponent
+    ],
+  
+  })
+export class MajorApplyProModule { }

+ 1 - 1
src/app/routes/hm-soft/pl/pl-major-apply/majorapply.component.html

@@ -283,7 +283,7 @@
                 <label class="col-lg-2 col-form-label text-lg-right">申报形式</label>
                 <div class="col-lg-8">
                     <select class="custom-select" formControlName="apply_form" [formControl]="formModel.controls['apply_form']"  style="width: 290px;"
-                    [(ngModel)]="item.apply_form" frameDict [dictName]="'MajorApplyForm'" [(dictValue)]="item.apply_form">
+                    [(ngModel)]="item.apply_form" frameDict [dictName]="'MajorApplyProForm'" [(dictValue)]="item.apply_form">
                     </select>
                     <span class="text-danger" *ngIf="formModel.get('apply_form').hasError('required') && (formModel.get('apply_form').dirty || formModel.get('apply_form').touched)">请选择申报形式</span>&nbsp;&nbsp;
 

+ 549 - 0
src/app/routes/hm-soft/pl/pl-major-course-pre/pl-major-course-pre.component.html

@@ -0,0 +1,549 @@
+<div class="panel panel-default">
+  <!--标题-->
+  <div class="panel-title">
+    <nav aria-label="breadcrumb">
+      <ol class="breadcrumb">
+        <li class="breadcrumb-item">计划管理</li>
+        <li class="breadcrumb-item active" aria-current="page">专业课程维护</li>
+      </ol>
+    </nav>
+  </div>
+  <div class="panel-body ml-sm " [hidden]="editShowType=='only' || editShowType=='other' || editShowType=='nature'">
+    <!--查询条件-->
+    <div class="row mb-3 ml-1" [hidden]="editShowType=='only' || editShowType=='other' || editShowType=='nature'">
+      <div class="col-lg-12">
+        <form (ngSubmit)="framePager.goSearch()" class="form-inline">
+          <!-- 支持排序 -->
+          <div class="input-group mr-1 input-group-sm">
+            <label>关键字:</label>
+            <input name="query" [(ngModel)]="query.query" class="input-sm form-control" type="text" maxlength="64"
+              placeholder="请输入查询关键字">
+          </div>
+
+          <div class="input-group mr-1 input-group-sm">
+            <label class="ml-sm">专业状态:</label>
+
+            <select name="status" [(ngModel)]="query.status" frameDict [dictName]="'CourseStatus'" class="form-control">
+            </select>
+          </div>
+
+          <div class="input-group mr-1 input-group-sm">
+            <label class="ml-sm">专业层次:</label>
+
+            <select name="major_level" [(ngModel)]="query.major_level" frameDict [dictName]="'MajorLevel'"
+              [tipFlag]="true" class="form-control">
+            </select>
+          </div>
+          <!--
+          <div class="input-group mr-1 input-group-sm">
+            <label class="ml-sm">是否国考:</label>
+            <select name="nation_exam" [(ngModel)]="query.nation_exam" frameDict [dictName]="'NationExam'"
+              [tipFlag]="true" class="form-control">
+            </select>
+          </div>
+-->
+          <button class="btn btn-primary btn-rounded btn-outline btn-sm  mr-1" (click)="framePager.goSearch()">
+            <i class="fa fa-search"></i> 查询</button>
+        </form>
+      </div>
+    </div>
+
+    <!-- 工具栏
+    <div class="row mb-2" [hidden]="editShowType=='only'|| editShowType=='other' || editShowType=='nature'">
+      <div class="col-lg-12">
+        <div class="pull-left">
+          <button class="btn btn-primary mr-1 btn-sm" data-toggle="tooltip" data-placement="left"
+            (click)="goCourseDetail('only')" title="课程维护">
+            <i class="fa fa-plus"></i>课程维护</button>
+          <button class="btn btn-primary mr-1 btn-sm" data-toggle="tooltip" data-placement="left"
+            (click)="goCourseDetail('nature')" title="课程属性设置">
+            <i class="fa icon-wrench"></i>课程属性设置</button>
+        </div>
+
+      </div>
+    </div>
+ -->
+    <!--表格-->
+    <div class="row" [hidden]="editShowType=='only' || editShowType=='other' || editShowType=='nature'">
+      <div class="col-sm-12 ml-0">
+        <table class="table table-sm table-striped table-hover table-bordered bg-white">
+          <thead>
+            <tr>
+              <th>
+                <div class="checkbox c-checkbox">
+                  <label>
+                    <input type="checkbox" (change)="framePager.checkedMasterToggle($event)" />
+                    <span class="fa fa-check"></span>
+                  </label>
+                </div>
+              </th>
+              <th>序号</th>
+              <!--<th><a (click)="framePager.sort('year')">批次</a></th>-->
+              <th>专业代码</th>
+              <th>专业名称</th>
+              <th align="center">专业层次</th>
+              <th align="center">专业状态</th>
+              <!-- <th>是否国家统一计划</th> -->
+              <th>主考学校</th>
+              <th align="center">总学分</th>
+              <th align="center" style="width: 80px;">操作</th>
+            </tr>
+          </thead>
+          <tbody>
+            <tr *ngFor="let item of framePager.getRecords(); let i = index">
+              <td>
+                <div class="checkbox c-checkbox input-group-sm">
+                  <label>
+                    <input type="checkbox" [value]="item.id" [(checked)]="item.isChecked"
+                      [(ngModel)]="item.isChecked" />
+                    <span class="fa fa-check"></span>
+                  </label>
+                </div>
+              </td>
+              <td>{{framePager.pageStart+i}}</td>
+              <!--<td>{{item.year}}</td>-->
+              <td>{{item.major_code}}</td>
+              <td><a href="#" (click)="detail('other',item.id)">{{item.major_name}}</a></td>
+              <td align="center" [innerHTML]="item.major_level | frameDict:'MajorLevel' "></td>
+              <td align="center" [innerHTML]="item.status | frameDict:'CourseStatus' "></td>
+              <!-- <td [innerHTML]="item.is_nation_exam | frameDict:'NationExam' "></td> -->
+              <td>{{item.org_name}}</td>
+
+              <td align="right">{{item.graduate_total_credits}}</td>
+              <td align="center">
+                  <a href="#" *ngIf="item.id>0" (click)="goCourseDetailOne(item,'only')" title="课程维护"><em
+                      class="fa-lg fas fa-edit mr-1"></em></a>
+
+                  
+                </td>
+            </tr>
+          </tbody>
+        </table>
+        <frame-pager [url]="QUERY_URL" hideSearch="true" hasCheck="true" #framePager (preReqEvent)="search($event)">
+        </frame-pager>
+      </div>
+      <!-- 编辑页面 -->
+      <div class="col-lg-12" *ngIf="editShowType != null &&editShowType=='show'">
+        <ng-container *ngTemplateOutlet="editTemplateModal">
+        </ng-container>
+      </div>
+
+    </div>
+  </div>
+  <!-- only编辑页面-->
+  <div class="col-lg-12" *ngIf="editShowType != null &&editShowType =='only'">
+    <ng-container *ngTemplateOutlet="editTemplateModal">
+    </ng-container>
+  </div>
+
+  <!-- other编辑页面-->
+  <div class="col-lg-12" *ngIf="editShowType != null &&editShowType =='other'">
+    <ng-container *ngTemplateOutlet="detailMajorModal">
+    </ng-container>
+  </div>
+
+  <!-- nature编辑页面-->
+  <div class="col-lg-12" *ngIf="editShowType != null &&editShowType =='nature'">
+    <ng-container *ngTemplateOutlet="courseNatureModal">
+    </ng-container>
+  </div>
+</div>
+
+<!-- 课程维护界面 -->
+<ng-template #editTemplateModal>
+  <div class="modal-content">
+
+    <div class="modal-header info-success-qm">
+      <div class="pull-left">
+        <em class="fa-lg fas fa-edit "></em> 课程维护
+      </div>
+      <button type="button" class="close" (click)="hideModal()">×</button>
+    </div>
+
+    <div class="modal-body">
+      <div [ngTemplateOutlet]="editFormTemplate"></div>
+    </div>
+
+
+    <div class="modal-footer">
+      <!-- <button class="btn btn-default" (click)="updateMcDirect(major.id)">
+        <i class="icon-close"> </i> 保存
+      </button> -->
+      <button class="btn btn-default" (click)="hideModal()">
+        <i class="icon-close"> </i> 关闭
+      </button>
+    </div>
+
+  </div>
+</ng-template>
+
+<ng-template #editFormTemplate>
+
+  <div class="row mb-1">
+    <label class="col-lg-2 col-form-label text-lg-right">专业代码</label>
+    <div class="col-lg-2">
+      <input class=" form-control-plaintext" type="text" [value]="major.major_code" />
+    </div>
+    <label class="col-lg-2 col-form-label text-lg-right">专业名称</label>
+    <div class="col-lg-2">
+      <input class="form-control-plaintext" type="text" [value]="major.major_name" />
+    </div>
+    
+  </div>
+
+  <div class="row mb-1">
+      <label class="col-lg-2 col-form-label text-lg-right">专业层次</label>
+      <div class="col-lg-2">
+        <input class="form-control-plaintext" type="text" [value]="major.major_level | frameDict: 'MajorLevel'" />
+      </div>
+    
+    <label class="col-lg-2 col-form-label text-lg-right">总学分</label>
+    <div class="col-lg-2">
+      <input class="form-control-plaintext" type="text" *ngIf="major.graduate_total_credits" [value]="major.graduate_total_credits" />
+    </div>
+  </div>
+  
+
+  <div class="row mb-2">
+
+    <div class="col-lg-12">
+      <div class="pull-left" style="text-align: right;">
+        <button class="btn btn-primary mr-1 btn-sm" data-toggle="tooltip" data-placement="left"
+          (click)="goCourseAdd(courseTemplateModal,'modal-lg')" title="添加">
+          <i class="fa fa-plus"></i>添加课程</button>
+
+          <button class="btn mr-1 btn-sm bg-danger" (click)="removeAllCourse(major.id)" data-toggle="tooltip"
+            data-placement="left" title="删除课程">
+            <i class="fa fa-trash"></i>删除课程</button>
+
+          <!--
+        <button class="btn btn-primary mr-1 btn-sm" data-toggle="tooltip" data-placement="left"
+          (click)="removeCourse(major.id)" title="移除">
+          <i class="fa fa-plus"></i>移除课程</button>
+          -->
+      </div>
+    </div>
+  </div>
+
+  <div class="row">
+<!--
+      <div class="col-lg-3 ml-0" style="padding-bottom: 5px;">
+          <div class="input-group">
+            <input class="form-control" type="text" [(ngModel)]="keyword" placeholder="模糊查询" />
+            <div class="input-group-append">
+              <button class="btn btn-outline-secondary bg-white" (click)="courseSearch(major.id)"><em
+                  class="fa fas fa-search"></em></button>
+            </div>
+          </div>
+        </div>
+-->
+    <div class="col-lg-12 ml-0">
+      <table class="table table-sm table-striped table-hover table-bordered bg-white">
+        <thead>
+          <th>
+            <div class="checkbox c-checkbox">
+              <label>
+                <input type="checkbox" (change)="checkedMasterToggle($event)" />
+                <span class="fa fa-check"></span>
+              </label>
+            </div>
+
+          </th>
+          <th>序号</th>
+          <th align="center">课程代码</th>
+          <th>课程名称</th>
+          <th>课程性质</th>
+          <th style="width: 120px;" align="center">学分</th>
+          <!-- <th>课程类型</th> -->
+         
+          <th style="width: 300px;">选修方向</th>
+          <th align="center" style="width: 80px;">操作</th>
+        </thead>
+
+        <tr *ngFor="let item of courseList; let i = index">
+          <td>
+            <div class="checkbox c-checkbox input-group-sm">
+              <label>
+                <input type="checkbox" [value]="item.id" [(checked)]="item.isChecked" [(ngModel)]="item.isChecked" />
+                <span class="fa fa-check"></span>
+              </label>
+            </div>
+          </td>
+          <td>{{i+1}}</td>
+          <td align="center">{{item.course_code}}</td>
+          <td>{{item.course_name}}</td>
+          <td style="width: 300px;">
+            <select name="course_nature" [(ngModel)]="item.course_nature" frameDict [dictName]="'CourseNature'" (change)="updateMcDirect(item.major_id,item.course_id, item.direct_remark,item.course_nature)"
+              [(dictValue)]="item.course_nature" [tipFlag]="true" class="form-control">
+            </select>
+          </td>
+
+          <!--<td>{{item.course_score === 'null' ? 0 : item.course_score}}</td>-->
+          <td><input style="text-align: right" class="form-control" type="text" [(ngModel)]="item.course_score" maxlength="6"  (change)="updateMcCourseScore(item.major_id,item.course_id, item.course_score)" /></td>
+
+          <!-- <td>{{item.course_exam_type | frameDict:'CourseNature'}}</td> -->
+          <td><input class="form-control" type="text" [(ngModel)]="item.direct_remark"  (change)="updateMcDirect(item.major_id,item.course_id, item.direct_remark,item.course_nature)" /></td>
+          <td align="center">
+            
+              <a href="#" (click)="removeCourse(major.id,item)" title="移除课程"><em class="fa-lg fas fa-trash mr-1"
+                  style="color:#F56D6D"></em></a>
+            </td>
+        </tr>
+      </table>
+    </div>
+
+    
+  </div>
+
+</ng-template>
+
+
+<!-- 添加课程 -->
+<ng-template #courseTemplateModal>
+  <div class="modal-content">
+
+    <div class="modal-header info-success-qm">
+      <div class="pull-left">
+        <em class="fa-lg fas fa-edit "></em> 添加课程
+      </div>
+      <button type="button" class="close" (click)="hideModalWin()">×</button>
+    </div>
+
+    <div class="modal-body">
+      <div [ngTemplateOutlet]="courseTemplate"></div>
+    </div>
+
+    <div class="modal-footer">
+      <button class="btn btn-default" (click)="addCourse(major.id)">
+        <i class="icon-close"> </i> 添加
+      </button>
+      <button class="btn btn-default" (click)="hideModalWin()">
+        <i class="icon-close"> </i> 关闭
+      </button>
+    </div>
+
+  </div>
+</ng-template>
+
+<ng-template #courseTemplate>
+
+  <div class="row mb-3 ml-1">
+    <div class="col-lg-12">
+      <form (ngSubmit)="courseFramePager.goSearch()" class="form-inline">
+        <div class="input-group mr-1 input-group-sm">
+          <label>关键字:</label>
+          <input name="query" [(ngModel)]="query.query" class="input-sm form-control" type="text" maxlength="64">
+        </div>
+        <button class="btn btn-primary btn-rounded btn-outline btn-sm  mr-1" (click)="courseFramePager.goSearch()">
+          <i class="fa fa-search"></i> 查询</button>
+      </form>
+    </div>
+  </div>
+
+  <div class="row">
+    <div class="col-lg-12 ml-0">
+      <table class="table table-sm table-striped table-hover table-bordered bg-white">
+        <thead>
+          <th>
+            <div class="checkbox c-checkbox">
+              <label>
+                <input type="checkbox" (change)="courseFramePager.checkedMasterToggle($event)" />
+                <span class="fa fa-check"></span>
+              </label>
+            </div>
+          </th>
+          <th>课程代码</th>
+          <th>课程名称</th>
+          <th>学分</th>
+          <!-- <th>课程类型</th> -->
+        </thead>
+        <tr *ngFor="let item of courseFramePager.getRecords(); let i = index">
+          <td>
+            <div class="checkbox c-checkbox input-group-sm">
+              <label>
+                <input type="checkbox" [value]="item.id" [(checked)]="item.isChecked" [(ngModel)]="item.isChecked" />
+                <span class="fa fa-check"></span>
+              </label>
+            </div>
+          </td>
+          <td>{{item.course_code}}</td>
+          <td>{{item.course_name}}</td>
+          <td>{{item.course_score}}</td>
+          <!-- <td>{{item.course_exam_type | frameDict:'CourseNature'}}</td> -->
+        </tr>
+      </table>
+      <frame-pager [url]="COURSE_URL" hideSearch="true" hasCheck="true" #courseFramePager
+        (preReqEvent)="search($event)"></frame-pager>
+    </div>
+  </div>
+</ng-template>
+
+
+
+<!-- 专业详情界面 -->
+<ng-template #detailMajorModal>
+  <div class="modal-content">
+
+    <div class="modal-header info-success-qm">
+      <div class="pull-left">
+        <em class="fa-lg fas fa-edit "></em> 专业详情
+      </div>
+      <button type="button" class="close" (click)="hideModal()">×</button>
+    </div>
+
+    <div class="modal-footer">
+      <button class="btn btn-default" (click)="export(major.id)">
+        <i class="fa icon-cloud-download"> </i> 导出
+      </button>
+    </div>
+
+    <div class="modal-body">
+      <div [ngTemplateOutlet]="detailTemplate"></div>
+    </div>
+
+    <div class="modal-footer">
+      <button class="btn btn-default" (click)="hideModal()">
+        <i class="icon-close"> </i> 关闭
+      </button>
+    </div>
+
+  </div>
+</ng-template>
+
+<ng-template #detailTemplate>
+  <h3 class="text-center font-weight-bold">{{major.major_name}}</h3>
+  <p class="text-center">专业代码:{{major.major_code}}</p>
+  <div class="row">
+    <div class="col-lg-12 ml-0">
+      <table class="table table-sm table-striped table-hover table-bordered bg-white">
+        <thead>
+          <th>序号</th>
+          <th>课程代码</th>
+          <th>课程名称</th>
+          <th>学分</th>
+          <th>教材名称</th>
+          <th>主编</th>
+          <th>出版社</th>
+          <th>版次</th>
+        </thead>
+        <tr *ngFor="let item of ctList; let i = index">
+          <td>{{i+1}}</td>
+          <td>{{item.course_code}}</td>
+          <td>{{item.course_name}}</td>
+          <td>{{item.course_score === 'null' ? 0 : item.course_score}}</td>
+          <td>{{item.textbook_name}}</td>
+          <td>{{item.textbook_writer}}</td>
+          <td>{{item.textbook_publisher}}</td>
+          <td>{{item.textbook_revision}}</td>
+        </tr>
+      </table>
+    </div>
+  </div>
+
+  <div class="row">
+    <div class="col-lg-3 ml-0">
+      <div class="input-group">
+        <input class="form-control" type="text" [(ngModel)]="content" placeholder="模糊查询" />
+        <div class="input-group-append">
+          <button class="btn btn-outline-secondary bg-white" (click)="courseContentSearch(major.id)"><em
+              class="fa fas fa-search"></em></button>
+        </div>
+      </div>
+    </div>
+  </div>
+</ng-template>
+
+
+<ng-template #courseNatureModal>
+  <div class="modal-content">
+
+    <div class="modal-header info-success-qm">
+      <div class="pull-left">
+        <em class="fa-lg fas fa-edit "></em> 课程属性设置
+      </div>
+      <button type="button" class="close" (click)="hideModal()">×</button>
+    </div>
+
+    <div class="modal-body">
+      <div [ngTemplateOutlet]="courseNatureTemplate"></div>
+    </div>
+
+    <div class="modal-footer">
+      <button class="btn btn-default" (click)="updateMajorCourse(major.id)">
+        <i class="icon-close"> </i> 保存
+      </button>
+      <button class="btn btn-default" (click)="hideModal()">
+        <i class="icon-close"> </i> 关闭
+      </button>
+    </div>
+
+  </div>
+</ng-template>
+
+<ng-template #courseNatureTemplate>
+
+  <div class="row mb-1">
+    <label class="col-lg-2 col-form-label text-lg-right">专业代码</label>
+    <div class="col-lg-2">
+      <input class=" form-control-plaintext" type="text" [value]="major.major_code" />
+    </div>
+    <label class="col-lg-2 col-form-label text-lg-right">专业名称</label>
+    <div class="col-lg-2">
+      <input class="form-control-plaintext" type="text" [value]="major.major_name" />
+    </div>
+    
+  </div>
+
+  <div class="row mb-1">
+     
+      <label class="col-lg-2 col-form-label text-lg-right">专业层次</label>
+      <div class="col-lg-2">
+        <input class="form-control-plaintext" type="text" [value]="major.major_level | frameDict: 'MajorLevel'" />
+      </div>
+    </div>
+
+  <div class="row mt-3">
+<!--
+      <div class="col-lg-3 ml-0" style="padding-bottom: 5px;">
+          <div class="input-group">
+            <input class="form-control" type="text" [(ngModel)]="keyword" placeholder="模糊查询" />
+            <div class="input-group-append">
+              <button class="btn btn-outline-secondary bg-white" (click)="courseSearch(major.id)"><em
+                  class="fa fas fa-search"></em></button>
+            </div>
+          </div>
+        </div>
+-->
+    <div class="col-lg-12">
+      <table class="table table-sm table-striped table-hover table-bordered bg-white">
+        <thead>
+          <tr>
+            <th>序号</th>
+            <th align="center">课程代码</th>
+            <th>课程名称</th>
+           
+            <th>课程性质</th>
+          </tr>
+        </thead>
+        <tbody>
+          <tr *ngFor="let item of courseList; let i = index">
+            <td>{{i+1}}</td>
+            <td align="center">{{item.course_code}}</td>
+            <td>{{item.course_name}}</td>
+            <!--<td>{{item.course_score === 'null' ? 0 : item.course_score}}</td>-->
+
+            <td style="width: 350px;">
+              <select name="course_nature" [(ngModel)]="item.course_nature" frameDict [dictName]="'CourseNature'"
+                [(dictValue)]="item.course_nature" [tipFlag]="true" class="form-control">
+              </select>
+            </td>
+            
+           
+          
+          </tr>
+        </tbody>
+      </table>
+    </div>
+  </div>
+
+</ng-template>

+ 0 - 0
src/app/routes/hm-soft/pl/pl-major-course-pre/pl-major-course-pre.component.scss


+ 25 - 0
src/app/routes/hm-soft/pl/pl-major-course-pre/pl-major-course-pre.component.spec.ts

@@ -0,0 +1,25 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { PlMajorCoursePreComponent } from './pl-major-course-pre.component';
+
+describe('PlMajorCourseComponent', () => {
+  let component: PlMajorCoursePreComponent;
+  let fixture: ComponentFixture<PlMajorCoursePreComponent>;
+
+  beforeEach(async(() => {
+    TestBed.configureTestingModule({
+      declarations: [ PlMajorCoursePreComponent ]
+    })
+    .compileComponents();
+  }));
+
+  beforeEach(() => {
+    fixture = TestBed.createComponent(PlMajorCoursePreComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});

+ 305 - 0
src/app/routes/hm-soft/pl/pl-major-course-pre/pl-major-course-pre.component.ts

@@ -0,0 +1,305 @@
+import { Component, OnInit, TemplateRef, ViewChild } from '@angular/core';
+import { FlexTableComponent } from '../../../../shared/common/FlexTable.component';
+import { FormBuilder } from '@angular/forms';
+import { FrameRequest } from '../../../../shared/frame/frame-request';
+import { AppComponent } from '../../../../app.component';
+import { BsModalService } from 'ngx-bootstrap/modal';
+import { FramePagerComponent } from '../../../../core/pager/pager.component';
+import * as _ from 'lodash';
+@Component({
+  selector: 'app-pl-major-course-pre',
+  templateUrl: './pl-major-course-pre.component.html',
+  styleUrls: ['./pl-major-course-pre.component.scss']
+})
+export class PlMajorCoursePreComponent extends FlexTableComponent implements OnInit {
+
+  public query = {
+    query: "",
+    major_level: "",
+    nation_exam: "",
+    status: ""
+  };
+  keyword;
+  content;
+  major = [];
+  courseList = [];
+  ctList = [];
+  courseModalWin: any;
+  @ViewChild('courseFramePager')
+  public courseFramePager: FramePagerComponent;
+
+  directRemark: any; //选修方向
+
+  QUERY_URL = "pl/plMajorPre/page.htm";
+  MAJOR_COURSE_URL = "pl/plMajorCoursePre/list.htm";
+  COURSE_URL = "pl/plCoursePre/page.htm";
+  ADD_COURSE_URL = "pl/plMajorCoursePre/add.htm";
+  DELETE_URL = "pl/plMajorCoursePre/delete.htm";
+  DETAIL_URL = "pl/plMajorCoursePre/detail.htm";
+  COURSE_NATURE_URL = "pl/plMajorCoursePre/editType.htm";
+  UPDATE_DIRECT_REMARK_URL = "pl/plMajorCoursePre/updateMcDirect.htm";
+  UPDATE_COURSE_SCORE_URL = "pl/plMajorCoursePre/updateCourseScore.htm";
+  UPDATE_COURSE_ISCOMPOSE_URL = "pl/plMajorCoursePre/updateCourseIscompose.htm";
+
+  
+
+  constructor(public bsModalService: BsModalService) {
+    super();
+    const fb = new FormBuilder();
+    this.formModel = fb.group({});
+  }
+
+  ngOnInit() {
+    //this.query.status='1';
+  }
+
+  /**
+     * 专业课程界面
+     */
+  goCourseDetail(show_type: string) {
+    if (!this.preParamHandler()) return;
+    this.editShowType = show_type;
+  }
+
+  /**
+   * 课程维护详情-数据加载
+   */
+  preParamHandler() {
+    let checkedArray = this.framePager.getCheckedArray((item) => item.id);
+    if (checkedArray.length === 0 || checkedArray.length > 1) {
+      AppComponent.alert({ title: '提示', text: '请选择一条专业!' });
+      return false;
+    }
+    this.reloadMajorCourse(checkedArray[0]);
+    return true;
+  }
+
+  goCourseDetailOne(item,show_type: string) {
+   
+    this.reloadMajorCourse(item.id);
+    this.editShowType = show_type;
+   
+  }
+
+  /**
+   * 增加课程界面
+   */
+  goCourseAdd(template: TemplateRef<any>, modalcss?) {
+    let css = modalcss ? modalcss : "modal-lg";
+    this.courseModalWin = this.bsModalService.show(template, { class: css,backdrop: 'static' });
+    
+  }
+
+  /**
+   * @param major_id: 专业ID
+    * 增加专业课程
+    */
+  addCourse(major_id: number) {
+    let checkedArray = this.courseFramePager.getCheckedArray((item) => item.id);
+    if (checkedArray.length === 0) {
+      AppComponent.alert({ title: '提示', text: '请至少选择一门课程!' });
+      return;
+    }
+    FrameRequest.request(this.ADD_COURSE_URL, { major_id: major_id, courseIds: checkedArray.join() }, () => {
+      AppComponent.GobalComponent.successMsg("增加课程成功");
+      this.hideModalWin();
+      this.reloadMajorCourse(major_id);
+    });
+  }
+
+  /**
+    * @param major_id: 专业ID
+     * 重新加载专业课程数据
+     */
+  reloadMajorCourse(major_id: number) {
+    FrameRequest.requestMap(this.MAJOR_COURSE_URL, { major_id: major_id }, (map) => {
+      this.major = map['major'];
+      this.courseList = map['courseList'];
+    });
+  }
+
+  /**
+       * 删除专业下的课程
+       */
+  removeCourse(major_id: number,item) {
+   
+    AppComponent.confirm("确定移除课程吗!",()=>{
+      FrameRequest.request(this.DELETE_URL, { ids: item.id }, () => {
+        AppComponent.alert({ title: '提示', text: '移除课程成功!' });
+        this.reloadMajorCourse(major_id);
+      });
+    });
+  
+   
+  }
+
+  removeAllCourse(major_id: number) {
+   
+    let checkedArray = []
+    _.forEach(this.courseList, (item) => {
+      if (item['isChecked'] === true){
+        checkedArray.push(item.id);
+      }
+        
+    });
+
+    if (checkedArray.length ==0) {
+      AppComponent.alert({ "title": "提示", "text": "请选择课程" })
+      return;
+    }
+
+    AppComponent.confirm("确定移除所选中的课程吗!",()=>{
+      
+      FrameRequest.request(this.DELETE_URL, { ids: checkedArray }, () => {
+        AppComponent.alert({ title: '提示', text: '移除课程成功!' });
+        this.reloadMajorCourse(major_id);
+      });
+    });
+  
+   
+  }
+
+  detail(show_type: string, major_id: number) {
+    this.editShowType = show_type;
+    FrameRequest.requestMap(this.DETAIL_URL, { major_id: major_id }, (map) => {
+      this.major = map['major'];
+      this.ctList = map['ctList'];
+    });
+  }
+
+  //保存课程的性质
+  updateMajorCourse(major_id: number) {
+    let course_ids = [];
+    let course_natures = [];
+    course_ids = this.courseList.map(item => item.course_id);
+    course_natures = this.courseList.map(item => item.course_nature);
+    if (!this.judgeNature(course_natures)) {
+      AppComponent.alert({ "title": "提示", "text": "请选择课程性质" })
+      return;
+    }
+
+    FrameRequest.request(this.COURSE_NATURE_URL,
+      { major_id: major_id, course_ids: course_ids, course_natures: course_natures }, () => {
+        AppComponent.GobalComponent.successMsg("课程属性设置成功");
+        this.hideModal();
+        this.framePager.reload();
+        this.courseList = [];
+      });
+  }
+
+  //判断是否选择了课程的性质
+  judgeNature(course_natures: any) {
+    if (!course_natures) {
+      return false;
+    } else {
+      for (let i = 0; i < course_natures.length; i++) {
+        if (!course_natures[i]) return false;
+      }
+    }
+    return true;
+  }
+
+  //全选复选切换
+  public checkedMasterToggle(event) {
+    this.setCheckedAll(event.currentTarget.checked)
+  }
+
+  //设置全选 反选状态
+  public setCheckedAll(checkStatus) {
+    _.forEach(this.courseList, (item) => {
+      item['isChecked'] = checkStatus;
+    });
+  }
+
+  //获取checked数组
+  public getCheckedArray(func?) {
+    let checkedArray = []
+    _.forEach(this.courseList, (item) => {
+      if (item['isChecked'] === true)
+        if (func && _.isFunction(func)) {
+          checkedArray.push(func.call(this, item));
+        } else {
+          checkedArray.push(item);
+        }
+    });
+    return checkedArray;
+  }
+
+  /**
+      * 模态窗口隐藏
+      */
+  hideModalWin() {
+    if (this.courseModalWin) {
+      this.courseModalWin.hide();
+    }
+  }
+
+  courseSearch(major_id: any) {
+    FrameRequest.requestMap(this.MAJOR_COURSE_URL, {major_id: major_id, keyword: this.keyword}, (map) => {
+      this.courseList = map['courseList'];
+    });
+  }
+
+  courseContentSearch(major_id: any) {
+    FrameRequest.requestMap(this.DETAIL_URL, { major_id: major_id, content: this.content}, (map) => {
+      this.major = map['major'];
+      this.ctList = map['ctList'];
+    });
+  }
+
+
+  //更新专业选修方向
+  updateMcDirect(major_id: any, course_id: any,direct_remark: any,course_nature: any) {
+    if(!direct_remark){
+      direct_remark = "";
+    }
+    FrameRequest.request(this.UPDATE_DIRECT_REMARK_URL, {
+      major_id: major_id,
+      course_id: course_id,
+      direct_remark: direct_remark,
+      course_nature: course_nature
+    }, () => {
+      AppComponent.GobalComponent.successMsg("保存成功!");
+
+    });
+  }
+
+  //更新专业课程学分
+  updateMcCourseScore(major_id: any, course_id: any,course_score: any) {
+    AppComponent.confirm("修改该专业课程学分,其他专业下的这门课程学分也同时更新,确定更新学分吗", () => {
+        FrameRequest.request(this.UPDATE_COURSE_SCORE_URL, {
+          major_id: major_id,
+          course_id: course_id,
+          course_score: course_score
+        }, () => {
+          AppComponent.GobalComponent.successMsg("课程学分更新成功,请及时更新相关专业的毕业总学分!");
+        });
+    });
+    
+  }
+
+  //更新专业课程是否百分百合成
+  updateMcCourseIscompose(major_id: any, course_id: any,iscompose: any) {
+    AppComponent.confirm("确定更新是否百分百合成吗", () => {
+        FrameRequest.request(this.UPDATE_COURSE_ISCOMPOSE_URL, {
+          major_id: major_id,
+          course_id: course_id,
+          iscompose: iscompose
+        }, () => {
+          AppComponent.GobalComponent.successMsg("是否百分百合成更新成功!");
+        });
+    });
+    
+  }
+
+  export(major_id) {
+    
+    
+    AppComponent.GobalComponent.setLoading(true);
+    FrameRequest.download("pl/plMajorCoursePre/majorPlanExport.htm", { major_id: major_id }, () => {
+      AppComponent.GobalComponent.setLoading(false);
+      AppComponent.GobalComponent.successMsg("导出成功");
+    });
+  }
+
+}

+ 22 - 0
src/app/routes/hm-soft/pl/pl-major-course-pre/pl-major-course-pre.module.ts

@@ -0,0 +1,22 @@
+import { NgModule} from '@angular/core';
+import { Routes, RouterModule } from '@angular/router';
+import { SharedModule } from '../../../../shared/shared.module';
+import { HmSoftModule } from '../../hmsoft.module';
+import { PlMajorCoursePreComponent } from './pl-major-course-pre.component';
+ 
+const routes: Routes = [
+    { path: '', component: PlMajorCoursePreComponent },
+];
+ 
+@NgModule({
+    imports: [
+      SharedModule,
+      HmSoftModule,
+      RouterModule.forChild(routes)
+    ],
+    declarations: [
+        PlMajorCoursePreComponent
+    ],
+  
+  })
+export class PlMajorCoursePreModule { }

+ 28 - 0
src/app/routes/hm-soft/pl/pl-major-course/pl-major-course.component.html

@@ -396,6 +396,30 @@
 <ng-template #detailTemplate>
   <h3 class="text-center font-weight-bold">{{major.major_name}}</h3>
   <p class="text-center">专业代码:{{major.major_code}}</p>
+<form class="form-inline">
+  <div class="row mb-3 ml-1">
+      <div class="col-lg-12" style="width:100%;">
+          
+              <div class="input-group mr-1 input-group-sm">
+                  <label>考试批次:</label>
+                      <flex-select
+                      [url]= "'pl/plExamTime/list.htm'"
+                      respDataPath= "array"
+                      optionValueField="id"
+                      optionTextField="examyearmonth"
+                      [(ngModel)]="query.exam_time_id"
+                      placeholder="请选择"
+                      width = "80"
+                      noResultsFound = "无数据"
+                      [ngModelOptions]="{standalone: true}"
+                      (ngModelChange)="selectCourse($event)"
+                      >
+                  </flex-select>
+              </div>
+        </div>
+      </div>
+    </form>
+
   <div class="row">
     <div class="col-lg-12 ml-0">
       <table class="table table-sm table-striped table-hover table-bordered bg-white">
@@ -405,6 +429,7 @@
           <th>课程名称</th>
           <th>学分</th>
           <th>教材名称</th>
+          <th>教材大纲</th>
           <th>主编</th>
           <th>出版社</th>
           <th>版次</th>
@@ -415,6 +440,9 @@
           <td>{{item.course_name}}</td>
           <td>{{item.course_score === 'null' ? 0 : item.course_score}}</td>
           <td>{{item.textbook_name}}</td>
+          <td *ngIf="!item.file_path">{{item.textbook_outline}}</td>
+          <td *ngIf="item.file_path"><a href="#" (click)="downloadFile(item.textbook_id);">{{item.textbook_outline}}</a></td>
+
           <td>{{item.textbook_writer}}</td>
           <td>{{item.textbook_publisher}}</td>
           <td>{{item.textbook_revision}}</td>

+ 25 - 2
src/app/routes/hm-soft/pl/pl-major-course/pl-major-course.component.ts

@@ -17,7 +17,8 @@ export class PlMajorCourseComponent extends FlexTableComponent implements OnInit
     query: "",
     major_level: "",
     nation_exam: "",
-    status: ""
+    status: "",
+    exam_time_id:""
   };
   keyword;
   content;
@@ -30,6 +31,8 @@ export class PlMajorCourseComponent extends FlexTableComponent implements OnInit
 
   directRemark: any; //选修方向
 
+  curr_major_id : any;
+
   QUERY_URL = "pl/plMajor/page.htm";
   MAJOR_COURSE_URL = "pl/plMajorCourse/list.htm";
   COURSE_URL = "pl/plCourse/page.htm";
@@ -50,7 +53,12 @@ export class PlMajorCourseComponent extends FlexTableComponent implements OnInit
   }
 
   ngOnInit() {
-    //this.query.status='1';
+    FrameRequest.requestEntity("pl/plExamTime/getCurrentExamTimeId.htm", {}, (entity) => {
+      if(entity) {
+        this.query.exam_time_id = entity.id;
+      }
+      });
+
   }
 
   /**
@@ -133,6 +141,7 @@ export class PlMajorCourseComponent extends FlexTableComponent implements OnInit
   }
 
   detail(show_type: string, major_id: number) {
+    this.curr_major_id = major_id;
     this.editShowType = show_type;
     FrameRequest.requestMap(this.DETAIL_URL, { major_id: major_id }, (map) => {
       this.major = map['major'];
@@ -140,6 +149,16 @@ export class PlMajorCourseComponent extends FlexTableComponent implements OnInit
     });
   }
 
+  selectCourse(exam_time_id){
+    if(!exam_time_id){
+      exam_time_id = "";
+    }
+
+    FrameRequest.requestMap(this.DETAIL_URL, { major_id: this.curr_major_id,exam_time_id:exam_time_id }, (map) => {
+      this.ctList = map['ctList'];
+    });
+  }
+
   //保存课程的性质
   updateMajorCourse(major_id: number) {
     let course_ids = [];
@@ -261,6 +280,10 @@ export class PlMajorCourseComponent extends FlexTableComponent implements OnInit
     
   }
 
+  downloadFile(id) {
+    FrameRequest.download("pl/plTextbook/downloadFile.htm",  { id: id });
+  }
+
   
 
 }

+ 481 - 0
src/app/routes/hm-soft/pl/pl-major-pre/pl-major-pre.component.html

@@ -0,0 +1,481 @@
+<div class="panel panel-default">
+  <div>
+    <!--标题-->
+    <div class="panel-title">
+      <nav aria-label="breadcrumb">
+        <ol class="breadcrumb">
+          <li class="breadcrumb-item">计划管理</li>
+          <li class="breadcrumb-item active" aria-current="page">专业管理</li>
+        </ol>
+      </nav>
+    </div>
+  </div>
+  <div class="panel-body ml-sm " [hidden]="editShowType=='only' || editShowType=='other'">
+    <!--查询条件-->
+    <div class="row mb-3 ml-1" [hidden]="editShowType=='only' || editShowType=='other'">
+      <div class="col-lg-12">
+        <form (ngSubmit)="framePager.goSearch()" class="form-inline">
+          <table>
+            <tr>
+              <td>
+          <!-- 支持排序 -->
+          <div class="input-group mr-1 input-group-sm">
+            <label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;关键字:</label>
+            <input name="query" style="width:180px;" [(ngModel)]="query.query" class="input-sm form-control" type="text" value=""
+              maxlength="64" placeholder="请输入查询关键字">
+          </div>
+        </td>
+        <!--
+        <td>
+          <div class="input-group mr-1 input-group-sm">
+            <label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;批次:</label>
+            <select class="custom-select" style="width:180px;" [(ngModel)]="query.year" name="year">
+              <option value="">请选择</option>
+              <option *ngFor="let year of yearArray" value="{{year.year_code}}">
+                {{year.year_code}}
+              </option>
+            </select>
+          </div>
+        </td>
+        -->
+        <td>
+          <div class="input-group mr-1 input-group-sm">
+            <label class="ml-sm">专业状态:</label>
+
+            <select name="status" style="width:180px;" [(ngModel)]="query.status" frameDict [dictName]="'CourseStatus'" class="form-control">
+            </select>
+          </div>
+        </td>
+        </tr>
+        <tr>
+          <td>
+          <div class="input-group mr-1 input-group-sm">
+            <label class="ml-sm">专业层次:</label>
+
+            <select name="major_level" style="width:180px;" [(ngModel)]="query.major_level" frameDict [dictName]="'MajorLevel'"
+              class="form-control">
+            </select>
+          </div>
+        </td>
+        <td>
+          <div class="input-group mr-1 input-group-sm" [hidden]="permFlag">
+            <label class="ml-sm">主考学校:</label>
+
+            <flex-select [url]="SCHOOL_URL" respDataPath="array" optionValueField="id" optionTextField="org_name"
+              [(ngModel)]="query.org_id" placeholder="请选择" width="100" noResultsFound="无数据" [ngModelOptions]="{standalone: true}">
+            </flex-select>
+          </div>
+        </td>
+          <!-- <div class="input-group mr-1 input-group-sm">
+            <label class="ml-sm">是否国考:</label>
+            <select name="nation_exam" [(ngModel)]="query.nation_exam" frameDict [dictName]="'NationExam'" class="form-control">
+            </select>
+          </div> -->
+          <td>
+          <button class="btn btn-primary btn-rounded btn-outline btn-sm  mr-1">
+            <i class="fa fa-search"></i> 查询</button>
+            <button class="btn btn-primary btn-rounded btn-outline btn-sm  mr-1" (click)="reset()">
+                <i class="fa fa-undo"></i> 重置</button>
+               
+              </td>
+              </tr>
+              </table>
+        </form>
+      </div>
+    </div>
+
+    <!-- 工具栏 -->
+    <div class="row mb-2" [hidden]="editShowType=='only' || editShowType=='other'">
+      <div class="col-lg-12">
+        <div class="pull-left"  style="text-align: right;">
+          <button class="btn btn-primary mr-1 btn-sm" data-toggle="tooltip" data-placement="left"
+            (click)="goEdit(editTemplateModal,'only')" title="添加">
+            <i class="fa fa-plus"></i> 添加</button>
+          <button class="btn mr-1 btn-sm bg-danger" (click)="delete()" data-toggle="tooltip" data-placement="left"
+            title="删除" [hidden]="permFlag">
+            <i class="fa fa-trash"> 删除</i>
+          </button>
+          
+        </div>
+
+      </div>
+    </div>
+
+    <!--表格-->
+    <div class="row" [hidden]="editShowType=='only' || editShowType=='other'">
+      <div class="col-sm-12 ml-0">
+        <table class="table table-sm table-striped table-hover table-bordered bg-white">
+          <thead>
+            <tr>
+              <th>
+                <div class="checkbox c-checkbox">
+                  <label>
+                    <input type="checkbox" (change)="framePager.checkedMasterToggle($event)" />
+                    <span class="fa fa-check"></span>
+                  </label>
+                </div>
+              </th>
+              <th>序号</th>
+              <!--<th><a (click)="framePager.sort('year')">批次</a></th>-->
+              <th>专业代码</th>
+              <th>专业名称</th>
+              <th align="center">专业层次</th>
+              <!--<th>所属学科</th>-->
+              <!-- <th>是否国考</th> -->
+              <th align="center">总学分</th>
+              <th align="center">专业状态</th>
+              <!--<th>停办证时间</th>-->
+              <th>主考学校</th>
+              <th>备注</th>
+              <th style="width: 80px;" align="center">操作</th>
+            </tr>
+          </thead>
+          <tbody>
+            <tr *ngFor="let item of framePager.getRecords(); let i = index">
+              <td>
+                <div class="checkbox c-checkbox input-group-sm">
+                  <label>
+                    <input type="checkbox" [value]="item.id" [(checked)]="item.isChecked"
+                      [(ngModel)]="item.isChecked" />
+                    <span class="fa fa-check"></span>
+                  </label>
+                </div>
+              </td>
+              <td>{{framePager.pageStart+i}}</td>
+             <!-- <td>{{item.year}}</td>-->
+              <td>{{item.major_code}}</td>
+              <td><a href="#" (click)="detail('other',item.id)">{{item.major_name}}</a></td>
+              <td align="center" [innerHTML]="item.major_level | frameDict:'MajorLevel' "></td>
+              <!--<td>{{item.subject_name}}</td>-->
+              <!-- <td [innerHTML]="item.is_nation_exam | frameDict:'NationExam' "></td> -->
+              <td align="right">{{item.graduate_total_credits}}</td>
+              <td align="center">{{item.status | frameDict: 'CourseStatus'}}</td>
+              <!--<td>{{item.stop_certificate_time}}</td>-->
+              <td>{{item.org_name}}</td>
+              <td width="150"><div title="{{item.remark}}">{{item.remark | subStr: 30}}</div></td>
+              <td align="center">
+                <a href="#" *ngIf="item.id>0" (click)="goEdit(editTemplateModal,'only','modal-lg',item)" title="编辑"><em
+                    class="fa-lg fas fa-edit mr-1"></em></a>
+                <a href="#" *ngIf="item.id>0" (click)="delete(item)" title="删除" [hidden]="permFlag"><em
+                    class="fa-lg fas fa-trash mr-1" style="color:#F56D6D"></em></a>
+              </td>
+            </tr>
+          </tbody>
+        </table>
+        <frame-pager [url]="QUERY_URL" hideSearch="true" hasCheck="true" #framePager (preReqEvent)="search($event)">
+        </frame-pager>
+      </div>
+      <!-- 编辑页面 -->
+      <div class="col-lg-12" *ngIf="item && editShowType != null &&editShowType!='modal'">
+        <ng-container *ngTemplateOutlet="editTemplateModal">
+        </ng-container>
+      </div>
+
+    </div>
+  </div>
+  <!-- only编辑页面-->
+  <div class="col-lg-12" *ngIf="item && editShowType != null &&editShowType =='only'">
+    <ng-container *ngTemplateOutlet="editTemplateModal">
+    </ng-container>
+  </div>
+
+  <!-- other编辑页面-->
+  <div class="col-lg-12" *ngIf="editShowType != null &&editShowType =='other'">
+    <ng-container *ngTemplateOutlet="detailMajorModal">
+    </ng-container>
+  </div>
+
+</div>
+
+<!--编辑界面模板-->
+<ng-template #editFormTemplate>
+  <form [formGroup]="formModel" *ngIf="item" (ngSubmit)="save()" class="form-validate form-horizontal" novalidate>
+    <input type="hidden" formControlName="id" [formControl]="formModel.controls['id']" />
+<!--
+    <div class="row">
+      <label class="col-lg-2 col-form-label text-lg-right">所属批次</label>
+      <div class="col-lg-4">
+        <select class="custom-select" formControlName="year" [formControl]="formModel.controls['year']"
+          [(ngModel)]="item.year">
+          <option ng-selected="!item.year" value="">请选择</option>
+          <option *ngFor="let year of yearArray" value="{{year.year_code}}">
+            {{year.year_code}}
+          </option>
+        </select>
+        <span class="text-danger"
+          *ngIf="formModel.get('year').hasError('required') && (formModel.get('year').dirty || formModel.get('year').touched)">请选择年度码</span>
+      </div>
+
+      <label class="col-lg-2 col-form-label text-lg-right">国标代码</label>
+      <div class="col-lg-4">
+        <input class="form-control" cols="5" placeholder="请填写专业国际代码" formControlName="major_standard_code"
+          id="major_standard_code" [(ngModel)]="item.major_standard_code"
+          [formControl]="formModel.controls['major_standard_code']" />
+       </div>
+
+    </div>
+  -->
+    <div class="row mt-3">
+      <label class="col-lg-2 col-form-label text-lg-right" >专业代码</label>
+      <div class="col-lg-4">
+        <input class="form-control" cols="5" placeholder="请填写专业代码" formControlName="major_code" id="major_code" 
+          [(ngModel)]="item.major_code" [formControl]="formModel.controls['major_code']" [readonly]="!flag" />
+        <span class="text-danger"
+          *ngIf="formModel.get('major_code').hasError('required') && (formModel.get('major_code').dirty || formModel.get('major_code').touched)">请输入专业代码</span>
+        <span class="text-danger"
+          *ngIf="formModel.get('major_code').hasError('rangeLength') && (formModel.get('major_code').dirty ||formModel.get('major_code').touched)">最小为3位,最大为8位</span>
+        <span class="text-danger"
+          *ngIf="formModel.controls['major_code'].hasError('pattern') && (formModel.controls['major_code'].dirty ||formModel.controls['major_code'].touched)">专业代码只能为字符和数字</span>
+      </div>
+
+      <label class="col-lg-2 col-form-label text-lg-right">专业名称</label>
+      <div class="col-lg-4">
+        <input class="form-control" type="text" placeholder="请填写专业名称" formControlName="major_name"
+          [formControl]="formModel.controls['major_name']" [(ngModel)]="item.major_name" />
+        <span class="text-danger"
+          *ngIf="formModel.get('major_name').hasError('required') && (formModel.get('major_name').dirty || formModel.get('major_name').touched)">请输入专业名称</span>
+      </div>
+    </div>
+<!--
+    <div class="row mt-3" [hidden]="flag">
+      <label class="col-lg-2 col-form-label text-lg-right">新专业代码</label>
+      <div class="col-lg-4">
+        <input class="form-control" cols="5" [(ngModel)]="newMajor.new_major_code" readonly
+          formControlName="new_major_code" [formControl]="formModel.controls['new_major_code']" />
+      </div>
+
+      <label class="col-lg-2 col-form-label text-lg-right">新专业名称</label>
+      <div class="col-lg-4">
+        <input class="form-control" type="text" [(ngModel)]="newMajor.new_major_name" readonly
+          formControlName="new_major_name" [formControl]="formModel.controls['new_major_name']" />
+      </div>
+    </div>
+-->
+
+    <div class="row mt-3">
+      <label class="col-lg-2 col-form-label text-lg-right">专业层次</label>
+      <div class="col-lg-4">
+        <select class="custom-select" formControlName="major_level" [formControl]="formModel.controls['major_level']"
+          [(ngModel)]="item.major_level" frameDict [dictName]="'MajorLevel'" [(dictValue)]="item.major_level">
+        </select>
+        <span class="text-danger"
+          *ngIf="formModel.get('major_level').hasError('required') && (formModel.get('major_level').dirty || formModel.get('major_level').touched)">请选择专业层次</span>
+      </div>
+
+      <!-- <label class="col-lg-2 col-form-label text-lg-right">是否统考</label>
+      <div class="col-lg-4">
+        <select class="custom-select" formControlName="is_nation_exam" [formControl]="formModel.controls['is_nation_exam']"
+          [(ngModel)]="item.is_nation_exam" frameDict [dictName]="'NationExam'" [(dictValue)]="item.is_nation_exam">
+        </select>
+        <span class="text-danger" *ngIf="formModel.get('is_nation_exam').hasError('required') && (formModel.get('is_nation_exam').dirty || formModel.get('is_nation_exam').touched)">请选择专业是否统考</span>
+      </div> -->
+      <label class="col-lg-2 col-form-label text-lg-right">专业状态</label>
+      <div class="col-lg-4">
+        <select class="custom-select" formControlName="status" [formControl]="formModel.controls['status']"
+          [(ngModel)]="item.status" frameDict [dictName]="'CourseStatus'" [(dictValue)]="item.status">
+        </select>
+        <span class="text-danger"
+          *ngIf="formModel.get('status').hasError('required') && (formModel.get('status').dirty || formModel.get('status').touched)">请选择专业状态</span>
+      </div>
+    </div>
+<!--
+    <div class="row mt-3">
+      <label class="col-lg-2 col-form-label text-lg-right">一级学科</label>
+      <div class="col-lg-4">
+        <select class="custom-select" formControlName="subject_pid" [formControl]="formModel.controls['subject_pid']"
+          [(ngModel)]="item.subject_pid" (change)="childSubject(item.subject_pid)">
+          <option value="">请选择</option>
+          <option *ngFor="let subject of subjectArray" value="{{subject.id}}">
+            {{subject.subject_name}}
+          </option>
+        </select>
+      </div>
+
+      <label class="col-lg-2 col-form-label text-lg-right">二级学科</label>
+      <div class="col-lg-4">
+        <select class="custom-select" formControlName="subject_id" [formControl]="formModel.controls['subject_id']"
+          [(ngModel)]="item.subject_id" value="{{item.subject_id}}">
+          <option value="">请选择</option>
+          <option *ngFor="let child of childSubjectArray" value="{{child.id}}" [selected]="child.id == item.subject_id">
+            {{child.subject_name}}
+          </option>
+        </select>
+      </div>
+    </div>
+  -->
+
+    <div class="row mt-3">
+      <label class="col-lg-2 col-form-label text-lg-right">总学分</label>
+      <div class="col-lg-4">
+        <input class="form-control" type="number" placeholder="请填写总学分" formControlName="graduate_total_credits"
+          [formControl]="formModel.controls['graduate_total_credits']" [(ngModel)]="item.graduate_total_credits" />
+          <span class="text-danger"
+          *ngIf="formModel.get('graduate_total_credits').hasError('required') && (formModel.get('graduate_total_credits').dirty || formModel.get('graduate_total_credits').touched)">请填写总学分</span>
+        </div>
+      <label class="col-lg-2 col-form-label text-lg-right">停止办证时间</label>
+      <div class="col-lg-4">
+        <div class="input-group">
+          <input class="form-control" type="text" formControlName="stop_certificate_time"
+            [formControl]="formModel.controls['stop_certificate_time']" DateTimePicker [dpType]="'time'"
+            [dpValue]="item.stop_certificate_time" [(ngModel)]="item.stop_certificate_time" />
+          <div class="input-group-append">
+            <div class="input-group-text"><i class="icon-calendar"></i></div>
+          </div>
+        </div>
+      </div>
+    </div>
+
+    <div class="row mt-3">
+     
+      <label class="col-lg-2 col-form-label text-lg-right">主考学校</label>
+      <div class="col-lg-4">
+          <flex-select [allowClear]="true" [url]="SCHOOL_URL" respDataPath="array" optionValueField="id"
+          optionTextField="org_name" [(ngModel)]="item.org_id" placeholder="请选择"
+          formControlName="org_id" [formControl]="formModel.get('org_id')"
+          width="220" noResultsFound="无数据">
+          </flex-select>
+
+        <span class="text-danger"
+          *ngIf="formModel.get('org_id').hasError('required') && (formModel.get('org_id').dirty || formModel.get('org_id').touched)">请选择主考院校</span>
+      </div>
+      <!--
+      <label class="col-lg-2 col-form-label text-lg-right">是否新专业</label>
+      <div class="col-lg-4">
+        <select class="custom-select" formControlName="is_new_major" [formControl]="formModel.controls['is_new_major']"
+          [(ngModel)]="item.is_new_major" >
+          <option value="">请选择</option>
+          <option value="0">否</option>
+          <option value="1">是</option>
+        </select>
+      </div>
+      -->
+    </div>
+<!--
+    <div class="row mt-3">
+
+      <label class="col-lg-2 col-form-label text-lg-right">是否允许社会考生毕业</label>
+      <div class="col-lg-4">
+        <select class="custom-select" formControlName="is_allow_social" [formControl]="formModel.controls['is_allow_social']"
+          [(ngModel)]="item.is_allow_social" >
+          <option value="">请选择</option>
+          <option value="0">否</option>
+          <option value="1">是</option>
+        </select>
+      </div>
+    </div>
+-->
+
+    <!-- <div class="row mt-3"> -->
+
+    <!-- <label class="col-lg-2 col-form-label text-lg-right">开考类型</label>
+      <div class="col-lg-4">
+        <select class="custom-select" formControlName="start_exam_type" [formControl]="formModel.controls['start_exam_type']" [(ngModel)]="item.start_exam_type"
+          frameDict [dictName]="'ExamOpenType'" [(dictValue)]="item.start_exam_type">
+        </select>
+        <span class="text-danger" *ngIf="formModel.get('start_exam_type').hasError('required') && (formModel.get('start_exam_type').dirty || formModel.get('start_exam_type').touched)">请选择开考类型</span>
+      </div> -->
+    <!-- </div> -->
+
+
+
+    <div class="row mt-3">
+      <label class="col-lg-2 col-form-label text-lg-right">描述信息</label>
+      <div class="col-lg-10">
+        <textarea class="form-control" formControlName="remark" placeholder="请填写描述信息" [(ngModel)]="item.remark"
+          rows="8"></textarea>
+      </div>
+    </div>
+
+  </form>
+</ng-template>
+
+<ng-template #editTemplateModal>
+  <div class="modal-content">
+    <div class="modal-header info-success-qm">
+      <div class="pull-left">
+        <em class="fa-lg fas fa-edit "></em> <span *ngIf="item?.id">编辑</span> <span *ngIf="!item?.id">新增</span> 页面
+      </div>
+
+      <button type="button" class="close" (click)="hideModal()">×</button>
+    </div>
+
+    <div class="modal-body">
+      <div [ngTemplateOutlet]="editFormTemplate"></div>
+
+    </div>
+    <div class="modal-footer">
+      <button class="btn btn-info" (click)="save()">
+        <i class="fa fa-info-circle"> </i> 保存
+      </button>
+      <button class="btn btn-default" (click)="hideModal()">
+        <i class="icon-close"> </i> 取消
+      </button>
+    </div>
+  </div>
+</ng-template>
+
+
+<!-- 专业详情界面 -->
+<ng-template #detailMajorModal>
+  <div class="modal-content">
+
+    <div class="modal-header info-success-qm">
+      <div class="pull-left">
+        <em class="fa-lg fas fa-edit "></em> 专业详情
+      </div>
+      <button type="button" class="close" (click)="hideModal()">×</button>
+    </div>
+
+    <div class="modal-footer">
+      <button class="btn btn-default" (click)="export(major.id)">
+        <i class="fa icon-cloud-download"> </i> 导出
+      </button>
+    </div>
+
+    <div class="modal-body">
+      <div [ngTemplateOutlet]="detailTemplate"></div>
+    </div>
+
+    <div class="modal-footer">
+      <button class="btn btn-default" (click)="hideModal()">
+        <i class="icon-close"> </i> 关闭
+      </button>
+    </div>
+
+  </div>
+</ng-template>
+
+<ng-template #detailTemplate>
+  <h3 class="text-center font-weight-bold">{{major.major_name}}</h3>
+  <p class="text-center">专业代码:{{major.major_code}}</p>
+  <div class="row">
+    <div class="col-lg-12 ml-0">
+      <table class="table table-sm table-striped table-hover table-bordered bg-white">
+        <thead>
+          <th>序号</th>
+          <th align="center">课程代码</th>
+          <th>课程名称</th>
+          <th>课程属性</th>
+          <th align="center">学分</th>
+          <th>教材名称</th>
+          <th>主编</th>
+          <th>出版社</th>
+          <th>版次</th>
+          <th>启用批次</th>
+        </thead>
+        <tr *ngFor="let item of ctList; let i = index">
+          <td>{{i+1}}</td>
+          <td align="center">{{item.course_code}}</td>
+          <td>{{item.course_name}}</td>
+          <td [innerHTML]="item.course_nature | frameDict:'CourseNature' "></td>
+          <td align="right">{{item.course_score === 'null' ? 0 : item.course_score}}</td>
+          <td>{{item.textbook_name}}</td>
+          <td>{{item.textbook_writer}}</td>
+          <td>{{item.textbook_publisher}}</td>
+          <td>{{item.textbook_revision}}</td>
+          <td>{{item.exam_year_month}}</td>
+        </tr>
+      </table>
+    </div>
+  </div>
+</ng-template>

+ 0 - 0
src/app/routes/hm-soft/pl/pl-major-pre/pl-major-pre.component.scss


+ 25 - 0
src/app/routes/hm-soft/pl/pl-major-pre/pl-major-pre.component.spec.ts

@@ -0,0 +1,25 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { PlMajorComponent } from './pl-major.component';
+
+describe('PlMajorComponent', () => {
+  let component: PlMajorComponent;
+  let fixture: ComponentFixture<PlMajorComponent>;
+
+  beforeEach(async(() => {
+    TestBed.configureTestingModule({
+      declarations: [ PlMajorComponent ]
+    })
+    .compileComponents();
+  }));
+
+  beforeEach(() => {
+    fixture = TestBed.createComponent(PlMajorComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});

+ 203 - 0
src/app/routes/hm-soft/pl/pl-major-pre/pl-major-pre.component.ts

@@ -0,0 +1,203 @@
+import { Component, OnInit, TemplateRef } from '@angular/core';
+import { FlexTableComponent } from '../../../../shared/common/FlexTable.component';
+import { BsModalService } from 'ngx-bootstrap/modal';
+import {  Validators, FormBuilder } from '@angular/forms';
+import { CustomValidators } from 'ng2-validation';
+import { FrameFunction } from '../../../../shared/frame/frame_function';
+import { FrameRequest } from '../../../../shared/frame/frame-request';
+import { AppComponent } from '../../../../app.component';
+import { Router, ActivatedRoute } from '@angular/router';
+
+
+declare var $: any;
+@Component({
+  selector: 'app-pl-major-pre',
+  templateUrl: './pl-major-pre.component.html',
+  styleUrls: ['./pl-major-pre.component.scss']
+})
+export class PlMajorPreComponent extends FlexTableComponent implements OnInit {
+
+  public query = {
+    query: "",
+    major_level: "",
+    nation_exam: "",
+    year: "",
+    status: "",
+    org_id: ""
+  };
+  yearArray: any;
+  subjectArray: any;
+  childSubjectArray: any;
+  major: any;
+  ctList = [];
+  newMajor: any;
+  flag = true; //控制新专业显示
+  permFlag = false;
+
+  QUERY_URL = "pl/plMajorPre/page.htm";
+  DELETE_URL = "pl/plMajorPre/delete.htm";
+  GET_URL = "pl/plMajorPre/find.htm";
+  ADD_URL = "pl/plMajorPre/add.htm";
+  EDIT_URL = "pl/plMajorPre/edit.htm";
+  YEAR_URL = "pl/plExamTime/list.htm";
+  SUBJECT_URL = "pl/plSubject/find.htm";
+  DOWNLOAD_URL = "pl/plMajorPre/download.htm";
+  DETAIL_URL = "pl/plMajorCoursePre/detail.htm";
+  NEW_MAJOR_URL = "pl/plMajorOldNew/getNewMajor.htm";
+  GET_DEPT_URL = "frame/optr/getDeptType.htm"; //登录用户所属机构类型
+  SCHOOL_URL = "cf/cfOrganization/list.htm?org_type=1&status=1";
+
+
+  public constructor(
+    public bsModalService: BsModalService,
+    private activatedRoute: ActivatedRoute
+  ) {
+    super();
+    //编辑页面验证初始化
+    const fb = new FormBuilder();
+    this.formModel = fb.group({
+      id: [],
+      //year: ["", Validators.required],
+      major_code: ["", Validators.compose([Validators.required, CustomValidators.rangeLength([3, 8]), Validators.pattern("^[a-zA-Z0-9]+$")])],
+      major_name: ["", Validators.compose([Validators.required])],
+      // major_standard_code: ["", [Validators.required, CustomValidators.rangeLength([3, 8]), Validators.pattern("^[a-zA-Z0-9]+$")]],
+      major_standard_code: ["", null],
+      major_level: ["", Validators.required],
+      // is_nation_exam: ["", Validators.required],
+      subject_pid: ["", null],
+      subject_id: ["", null],
+      graduate_total_credits: ["", Validators.required],
+      remark: ["", null],
+      stop_certificate_time: ["", null],
+      status: ["", Validators.required],
+      new_major_code: ["" ,null],
+      new_major_name: ["" ,null],
+      is_new_major: ["" ,null],
+      org_id: ["", Validators.required],
+      is_allow_social: ["" ,null]
+      // start_exam_type: ["", Validators.required]
+    });
+    
+  }
+
+   ngOnInit() {
+     this.query.status='1';
+     FrameRequest.requestArray(this.YEAR_URL, {}, (array) => {
+       this.yearArray = array;
+      });
+      FrameRequest.requestArray(this.SUBJECT_URL, {}, (array) => {
+        this.subjectArray = array;
+      })
+      FrameRequest.requestEntity(this.GET_DEPT_URL, {}, (entity) => {
+        if(entity && entity === 1) {
+           this.permFlag = true;
+        } else {
+          this.permFlag = false;
+        }
+
+      });
+    //接收参数
+    setTimeout(() => { 
+      this.activatedRoute.queryParams.subscribe(queryParams => {
+        this.query.query = queryParams.major_code;
+        this.query.year = queryParams.year_code;
+      });
+    }, 100);
+  }
+
+  async preGoEditEvent(map) {
+    let pid=null;
+    if(map) {
+      let major = map['major'];
+      if(major) {
+        pid = major.subject_pid;
+      }
+    }
+    await this.childSubject(pid);
+    return true
+  }
+
+  // editShowType : modal模态弹出框 only只显示编辑界面 show 同时显示
+  async goEdit(template: TemplateRef<any>, editShowType = "modal", modalcss: string, item?) {
+    FrameFunction.UntouchedForm(this.formModel);
+    //新增
+    if (!item || item.id === undefined) {
+      if (!this.preGoEditEvent({})) return;
+      this.item = {};
+      this.newMajor = {} ;
+      this.formModel.reset();
+      this.flag = true;
+      this.showEdit(template, editShowType, modalcss);
+    } else {
+      this.flag = false;
+      FrameRequest.requestEntity(this.NEW_MAJOR_URL, {old_major_id: item.id}, (entity) => {
+        if(entity) {
+          this.newMajor = entity;
+        } else {
+          this.newMajor = {} ;
+          this.newMajor.new_major_code ="无对应新专业";
+          this.newMajor.new_major_name ="无对应新专业";
+        }
+      });
+      let org_id = item.org_id;
+      FrameRequest.requestMap(this.GET_URL, { id: item.id }, (map) => {
+        if (!this.preGoEditEvent(map)) return;
+        this.showEdit(template, editShowType, modalcss);
+        setTimeout(() => { this.item = map['major']; this.item.org_id=org_id;}, 100)
+      });
+    }
+  }
+  async childSubject(pid) {
+      if (pid) {
+        FrameRequest.requestArray(this.SUBJECT_URL, {pid: pid}, (resp) => {
+          this.childSubjectArray = resp;
+        })
+      }
+  }
+
+  downloadMajor() {
+    let checkArray = this.framePager.getCheckedArray();
+    let ids = [];
+    if(!checkArray || checkArray.length == 0 ) {
+      AppComponent.alert({title:'提示', text: '请选择要打印专业课程的专业'});
+      return;
+    }
+    if(checkArray && checkArray.length > 0) {
+      ids =  this.framePager.getCheckedArray((item) => item.id);
+    }
+    AppComponent.GobalComponent.setLoading(true);
+    FrameRequest.download(this.DOWNLOAD_URL, {ids: ids.join(), year: this.query.year}, () => {
+      AppComponent.GobalComponent.setLoading(false);
+    });
+  }
+
+  detail(show_type: string, major_id: number) {
+    FrameRequest.requestMap(this.DETAIL_URL, { major_id: major_id }, (map) => {
+      setTimeout(() => {
+        this.major = map['major'];
+        this.ctList = map['ctList'];
+        this.editShowType = show_type;
+      },100);
+    });
+   
+  }
+
+  getNewMajor(major_code: any) {
+    FrameRequest.requestEntity(this.NEW_MAJOR_URL, {old_major_code: major_code}, (entity) => {
+      this.newMajor = entity;
+    });
+  }
+
+  
+  export(major_id) {
+    
+    
+    AppComponent.GobalComponent.setLoading(true);
+    FrameRequest.download("pl/plMajorCoursePre/majorPlanExport.htm", { major_id: major_id }, () => {
+      AppComponent.GobalComponent.setLoading(false);
+      AppComponent.GobalComponent.successMsg("导出成功");
+    });
+  }
+
+
+}

+ 22 - 0
src/app/routes/hm-soft/pl/pl-major-pre/pl-major-pre.module.ts

@@ -0,0 +1,22 @@
+import { NgModule} from '@angular/core';
+import { Routes, RouterModule } from '@angular/router';
+import { SharedModule } from '../../../../shared/shared.module';
+import { HmSoftModule } from '../../hmsoft.module';
+import { PlMajorPreComponent } from './pl-major-pre.component';
+ 
+const routes: Routes = [
+    { path: '', component: PlMajorPreComponent },
+];
+ 
+@NgModule({
+    imports: [
+      SharedModule,
+      HmSoftModule,
+      RouterModule.forChild(routes)
+    ],
+    declarations: [
+        PlMajorPreComponent
+    ],
+  
+  })
+export class PlMajorPreModule { }

+ 93 - 5
src/app/routes/hm-soft/pl/pl-major-query/pl-major.component.query.html

@@ -76,9 +76,7 @@
               <i class="fa fa-search"></i> 查询</button>
               <button class="btn btn-primary btn-rounded btn-outline btn-sm  mr-1" (click)="reset()">
                   <i class="fa fa-undo"></i> 重置</button>
-                  <button id="btnExport" class="btn btn-primary mr-1 btn-sm" data-toggle="tooltip" data-placement="left"
-              (click)="downloadMajor()" title="导出">
-              <i class="fa icon-cloud-download"></i> 打印专业课程</button>
+                 
                 </td>
                 </tr>
                 </table>
@@ -86,7 +84,19 @@
         </div>
       </div>
   
-     
+     <!-- 工具栏 -->
+    <div class="row mb-2" [hidden]="editShowType=='only' || editShowType=='other'">
+        <div class="col-lg-12">
+          <div class="pull-left"  style="text-align: right;">
+           
+            <button id="btnExport" class="btn btn-primary mr-1 btn-sm" data-toggle="tooltip" data-placement="left"
+            (click)="syncTask(syncTaskModal, 'modal-md')" title="打印专业课程">
+        <i class="fa icon-cloud-download"></i> 打印专业课程</button>
+            
+          </div>
+  
+        </div>
+      </div>
   
       <!--表格-->
       <div class="row" [hidden]="editShowType=='only' || editShowType=='other'">
@@ -141,7 +151,7 @@
                 <td align="center">{{item.status | frameDict: 'CourseStatus'}}</td>
                 <!--<td>{{item.stop_certificate_time}}</td>-->
                 <td>{{item.org_name}}</td>
-                <td width="150"><div title="{{item.remark}}">{{item.remark | subStr: 30}}</div></td>
+                <td width="600"><div title="{{item.remark}}">{{item.remark}}</div></td>
                
               </tr>
             </tbody>
@@ -398,6 +408,30 @@
 <ng-template #detailTemplate>
     <h3 class="text-center font-weight-bold">{{major.major_name}}</h3>
     <p class="text-center">专业代码:{{major.major_code}}</p>
+    <form class="form-inline">
+        <div class="row mb-3 ml-1">
+            <div class="col-lg-12" style="width:100%;">
+                
+                    <div class="input-group mr-1 input-group-sm">
+                        <label>考试批次:</label>
+                            <flex-select
+                            [url]= "'pl/plExamTime/list.htm'"
+                            respDataPath= "array"
+                            optionValueField="id"
+                            optionTextField="examyearmonth"
+                            [(ngModel)]="query.exam_time_id"
+                            placeholder="请选择"
+                            width = "80"
+                            noResultsFound = "无数据"
+                            [ngModelOptions]="{standalone: true}"
+                            (ngModelChange)="selectCourse($event)"
+                            >
+                        </flex-select>
+                    </div>
+              </div>
+            </div>
+          </form>
+
     <div class="row">
       <div class="col-lg-12 ml-0">
         <table class="table table-sm table-striped table-hover table-bordered bg-white">
@@ -409,6 +443,7 @@
             <th>国区属性</th>
             <th align="center">学分</th>
             <th>教材名称</th>
+            <th>教材大纲</th>
             <th>主编</th>
             <th>出版社</th>
             <th>版次</th>
@@ -422,6 +457,9 @@
 
             <td align="right">{{item.course_score === 'null' ? 0 : item.course_score}}</td>
             <td>{{item.textbook_name}}</td>
+            <td *ngIf="!item.file_path">{{item.textbook_outline}}</td>
+            <td *ngIf="item.file_path"><a href="#" (click)="downloadFile(item.textbook_id);">{{item.textbook_outline}}</a></td>
+
             <td>{{item.textbook_writer}}</td>
             <td>{{item.textbook_publisher}}</td>
             <td>{{item.textbook_revision}}</td>
@@ -429,4 +467,54 @@
         </table>
       </div>
     </div>
+  </ng-template>
+
+                 
+<ng-template #syncTaskModal>
+    <div class="modal-content">
+      <div class="modal-header info-success-qm">
+        <div class="pull-left">
+          <em class="fa-lg fas fa-edit "></em> <span>打印专业课程</span>
+        </div>
+  
+        <button type="button" class="close" (click)="hideModalWin()">×</button>
+      </div>
+  
+      <div class="modal-body">
+        <div [ngTemplateOutlet]="syncTemplate"></div>
+  
+      </div>
+      <div class="modal-footer">
+        <button class="btn btn-info" (click)="downloadMajor()">
+          <i class="fa fa-info-circle"> </i> 打印
+        </button>
+        <button class="btn btn-default" (click)="hideModalWin()">
+          <i class="icon-close"> </i> 取消
+        </button>
+      </div>
+    </div>
+  </ng-template>
+  
+  <ng-template #syncTemplate>
+    <div class="row mt-3">
+      <label class="col-lg-3 col-form-label text-lg-right">考试批次</label>
+      <div class="col-lg-5">
+          <flex-select
+          [url]= "'pl/plExamTime/list.htm'"
+          respDataPath= "array"
+          optionValueField="id"
+          optionTextField="examyearmonth"
+          [(ngModel)]="query.exam_time_id"
+          placeholder="请选择"
+          width = "80"
+          noResultsFound = "无数据"
+          [ngModelOptions]="{standalone: true}"
+          >
+        </flex-select>
+        
+      </div>
+    </div>
+  
+    
+  
   </ng-template>

+ 48 - 3
src/app/routes/hm-soft/pl/pl-major-query/pl-major.component.query.ts

@@ -23,7 +23,8 @@ export class PlMajorComponentQuery extends FlexTableComponent implements OnInit
     nation_exam: "",
     year: "",
     status: "",
-    org_id: ""
+    org_id: "",
+    exam_time_id:""
   };
   yearArray: any;
   subjectArray: any;
@@ -34,6 +35,9 @@ export class PlMajorComponentQuery extends FlexTableComponent implements OnInit
   flag = true; //控制新专业显示
   permFlag = false;
 
+  curr_major_id: any;
+  modalWin: any;
+
   QUERY_URL = "pl/plMajor/page.htm";
   DELETE_URL = "pl/plMajor/delete.htm";
   GET_URL = "pl/plMajor/find.htm";
@@ -92,6 +96,13 @@ export class PlMajorComponentQuery extends FlexTableComponent implements OnInit
         }
 
       });
+
+      FrameRequest.requestEntity("pl/plExamTime/getCurrentExamTimeId.htm", {}, (entity) => {
+        if(entity) {
+          this.query.exam_time_id = entity.id;
+        }
+        });
+
     //接收参数
     setTimeout(() => { 
       this.activatedRoute.queryParams.subscribe(queryParams => {
@@ -163,12 +174,13 @@ export class PlMajorComponentQuery extends FlexTableComponent implements OnInit
       ids =  this.framePager.getCheckedArray((item) => item.id);
     }
     AppComponent.GobalComponent.setLoading(true);
-    FrameRequest.download(this.DOWNLOAD_URL, {ids: ids.join(), year: this.query.year}, () => {
+    FrameRequest.download(this.DOWNLOAD_URL, {ids: ids.join(), exam_time_id: this.query.exam_time_id}, () => {
       AppComponent.GobalComponent.setLoading(false);
     });
   }
 
   detail(show_type: string, major_id: number) {
+    this.curr_major_id = major_id;
     FrameRequest.requestMap(this.DETAIL_URL, { major_id: major_id }, (map) => {
       setTimeout(() => {
         this.major = map['major'];
@@ -179,6 +191,16 @@ export class PlMajorComponentQuery extends FlexTableComponent implements OnInit
    
   }
 
+  selectCourse(exam_time_id){
+    if(!exam_time_id){
+      exam_time_id = "";
+    }
+    
+    FrameRequest.requestMap(this.DETAIL_URL, { major_id: this.curr_major_id,exam_time_id:exam_time_id }, (map) => {
+      this.ctList = map['ctList'];
+    });
+  }
+
   getNewMajor(major_code: any) {
     FrameRequest.requestEntity(this.NEW_MAJOR_URL, {old_major_code: major_code}, (entity) => {
       this.newMajor = entity;
@@ -190,11 +212,34 @@ export class PlMajorComponentQuery extends FlexTableComponent implements OnInit
     
     
     AppComponent.GobalComponent.setLoading(true);
-    FrameRequest.download("pl/plMajorCourse/majorPlanExport.htm", { major_id: this.major.id }, () => {
+    FrameRequest.download("pl/plMajorCourse/majorPlanExport.htm", { major_id: this.major.id,exam_time_id:this.query.exam_time_id }, () => {
       AppComponent.GobalComponent.setLoading(false);
       AppComponent.GobalComponent.successMsg("导出成功");
     });
   }
 
+  
+  syncTask(template: TemplateRef<any>, modalcss?) {
+    let checkArray = this.framePager.getCheckedArray();
+    
+    if(!checkArray || checkArray.length == 0 ) {
+      AppComponent.alert({title:'提示', text: '请选择要打印专业课程的专业'});
+      return;
+    }
+
+    let css = modalcss ? modalcss : "modal-lg";
+    this.modalWin = this.bsModalService.show(template, { class: css });
+  }
+
+  hideModalWin() {
+    if (this.modalWin) {
+      this.modalWin.hide();
+    }
+  }
+
+  downloadFile(id) {
+    FrameRequest.download("pl/plTextbook/downloadFile.htm",  { id: id });
+  }
+
 
 }

+ 84 - 4
src/app/routes/hm-soft/pl/pl-major/pl-major.component.html

@@ -76,9 +76,7 @@
             <i class="fa fa-search"></i> 查询</button>
             <button class="btn btn-primary btn-rounded btn-outline btn-sm  mr-1" (click)="reset()">
                 <i class="fa fa-undo"></i> 重置</button>
-                <button id="btnExport" class="btn btn-primary mr-1 btn-sm" data-toggle="tooltip" data-placement="left"
-            (click)="downloadMajor()" title="导出">
-            <i class="fa icon-cloud-download"></i> 打印专业课程</button>
+               
               </td>
               </tr>
               </table>
@@ -97,6 +95,9 @@
             title="删除" [hidden]="permFlag">
             <i class="fa fa-trash"> 删除</i>
           </button>
+          <button id="btnExport" class="btn btn-primary mr-1 btn-sm" data-toggle="tooltip" data-placement="left"
+          (click)="syncTask(syncTaskModal, 'modal-md')" title="打印专业课程">
+      <i class="fa icon-cloud-download"></i> 打印专业课程</button>
           
         </div>
 
@@ -446,6 +447,30 @@
 <ng-template #detailTemplate>
   <h3 class="text-center font-weight-bold">{{major.major_name}}</h3>
   <p class="text-center">专业代码:{{major.major_code}}</p>
+  <form class="form-inline">
+      <div class="row mb-3 ml-1">
+          <div class="col-lg-12" style="width:100%;">
+              
+                  <div class="input-group mr-1 input-group-sm">
+                      <label>考试批次:</label>
+                          <flex-select
+                          [url]= "'pl/plExamTime/list.htm'"
+                          respDataPath= "array"
+                          optionValueField="id"
+                          optionTextField="examyearmonth"
+                          [(ngModel)]="query.exam_time_id"
+                          placeholder="请选择"
+                          width = "80"
+                          noResultsFound = "无数据"
+                          [ngModelOptions]="{standalone: true}"
+                          (ngModelChange)="selectCourse($event)"
+                          >
+                      </flex-select>
+                  </div>
+            </div>
+          </div>
+        </form>
+
   <div class="row">
     <div class="col-lg-12 ml-0">
       <table class="table table-sm table-striped table-hover table-bordered bg-white">
@@ -456,6 +481,7 @@
           <th>课程属性</th>
           <th align="center">学分</th>
           <th>教材名称</th>
+          <th>教材大纲</th>
           <th>主编</th>
           <th>出版社</th>
           <th>版次</th>
@@ -467,6 +493,9 @@
           <td [innerHTML]="item.course_nature | frameDict:'CourseNature' "></td>
           <td align="right">{{item.course_score === 'null' ? 0 : item.course_score}}</td>
           <td>{{item.textbook_name}}</td>
+          <td *ngIf="!item.file_path">{{item.textbook_outline}}</td>
+          <td *ngIf="item.file_path"><a href="#" (click)="downloadFile(item.textbook_id);">{{item.textbook_outline}}</a></td>
+
           <td>{{item.textbook_writer}}</td>
           <td>{{item.textbook_publisher}}</td>
           <td>{{item.textbook_revision}}</td>
@@ -474,4 +503,55 @@
       </table>
     </div>
   </div>
-</ng-template>
+</ng-template>
+
+
+                          
+<ng-template #syncTaskModal>
+    <div class="modal-content">
+      <div class="modal-header info-success-qm">
+        <div class="pull-left">
+          <em class="fa-lg fas fa-edit "></em> <span>打印专业课程</span>
+        </div>
+  
+        <button type="button" class="close" (click)="hideModalWin()">×</button>
+      </div>
+  
+      <div class="modal-body">
+        <div [ngTemplateOutlet]="syncTemplate"></div>
+  
+      </div>
+      <div class="modal-footer">
+        <button class="btn btn-info" (click)="downloadMajor()">
+          <i class="fa fa-info-circle"> </i> 打印
+        </button>
+        <button class="btn btn-default" (click)="hideModalWin()">
+          <i class="icon-close"> </i> 取消
+        </button>
+      </div>
+    </div>
+  </ng-template>
+  
+  <ng-template #syncTemplate>
+    <div class="row mt-3">
+      <label class="col-lg-3 col-form-label text-lg-right">考试批次</label>
+      <div class="col-lg-5">
+          <flex-select
+          [url]= "'pl/plExamTime/list.htm'"
+          respDataPath= "array"
+          optionValueField="id"
+          optionTextField="examyearmonth"
+          [(ngModel)]="query.exam_time_id"
+          placeholder="请选择"
+          width = "80"
+          noResultsFound = "无数据"
+          [ngModelOptions]="{standalone: true}"
+          >
+        </flex-select>
+        
+      </div>
+    </div>
+  
+    
+  
+  </ng-template>

+ 44 - 2
src/app/routes/hm-soft/pl/pl-major/pl-major.component.ts

@@ -23,7 +23,8 @@ export class PlMajorComponent extends FlexTableComponent implements OnInit {
     nation_exam: "",
     year: "",
     status: "",
-    org_id: ""
+    org_id: "",
+    exam_time_id:""
   };
   yearArray: any;
   subjectArray: any;
@@ -33,6 +34,8 @@ export class PlMajorComponent extends FlexTableComponent implements OnInit {
   newMajor: any;
   flag = true; //控制新专业显示
   permFlag = false;
+  curr_major_id: any;
+  modalWin: any;
 
   QUERY_URL = "pl/plMajor/page.htm";
   DELETE_URL = "pl/plMajor/delete.htm";
@@ -96,6 +99,13 @@ export class PlMajorComponent extends FlexTableComponent implements OnInit {
         }
 
       });
+
+      FrameRequest.requestEntity("pl/plExamTime/getCurrentExamTimeId.htm", {}, (entity) => {
+        if(entity) {
+          this.query.exam_time_id = entity.id;
+        }
+        });
+
     //接收参数
     setTimeout(() => { 
       this.activatedRoute.queryParams.subscribe(queryParams => {
@@ -166,12 +176,13 @@ export class PlMajorComponent extends FlexTableComponent implements OnInit {
       ids =  this.framePager.getCheckedArray((item) => item.id);
     }
     AppComponent.GobalComponent.setLoading(true);
-    FrameRequest.download(this.DOWNLOAD_URL, {ids: ids.join(), year: this.query.year}, () => {
+    FrameRequest.download(this.DOWNLOAD_URL, {ids: ids.join(), exam_time_id: this.query.exam_time_id}, () => {
       AppComponent.GobalComponent.setLoading(false);
     });
   }
 
   detail(show_type: string, major_id: number) {
+    this.curr_major_id = major_id;
     FrameRequest.requestMap(this.DETAIL_URL, { major_id: major_id }, (map) => {
       setTimeout(() => {
         this.major = map['major'];
@@ -182,11 +193,42 @@ export class PlMajorComponent extends FlexTableComponent implements OnInit {
    
   }
 
+  selectCourse(exam_time_id){
+    if(!exam_time_id){
+      exam_time_id = "";
+    }
+    
+    FrameRequest.requestMap(this.DETAIL_URL, { major_id: this.curr_major_id,exam_time_id:exam_time_id }, (map) => {
+      this.ctList = map['ctList'];
+    });
+  }
+
   getNewMajor(major_code: any) {
     FrameRequest.requestEntity(this.NEW_MAJOR_URL, {old_major_code: major_code}, (entity) => {
       this.newMajor = entity;
     });
   }
 
+  syncTask(template: TemplateRef<any>, modalcss?) {
+    let checkArray = this.framePager.getCheckedArray();
+    
+    if(!checkArray || checkArray.length == 0 ) {
+      AppComponent.alert({title:'提示', text: '请选择要打印专业课程的专业'});
+      return;
+    }
+
+    let css = modalcss ? modalcss : "modal-lg";
+    this.modalWin = this.bsModalService.show(template, { class: css });
+  }
+
+  hideModalWin() {
+    if (this.modalWin) {
+      this.modalWin.hide();
+    }
+  }
+
+  downloadFile(id) {
+    FrameRequest.download("pl/plTextbook/downloadFile.htm",  { id: id });
+  }
 
 }

+ 7 - 5
src/app/routes/hm-soft/pl/pl-std-record/junior-std-record-audith/junior-std-record-audith.component.html

@@ -39,7 +39,7 @@
                 <label>主考学校:</label>
                 <flex-select [allowClear]="true" [url]="SCHOOL_URL" respDataPath="array" optionValueField="id"
                   optionTextField="org_name" [(ngModel)]="query.school_id" placeholder="请选择"
-                  [ngModelOptions]="{standalone: true}" width="110" noResultsFound="无数据" (ngModelChange)="chooseMajor()">
+                  [ngModelOptions]="{standalone: true}" width="110" noResultsFound="无数据">
                 </flex-select>
 
               </div>
@@ -48,8 +48,10 @@
               <div class="input-group mr-1 input-group-sm">
 
                 <label>衔接学校:</label>
-                <flex-select [allowClear]="true" [(items)]="joinSchoolList" optionValueField="id"
-                optionTextField="org_name" [(ngModel)]="query.join_school_id" placeholder="请选择"
+               
+
+                <flex-select [allowClear]="true" [url]="SCHOOL_LIST_URL" respDataPath="array" optionValueField="id"
+                optionTextField="full_name" [(ngModel)]="query.join_school_id" placeholder="请选择"
                 [ngModelOptions]="{standalone: true}" width="110" noResultsFound="无数据">
               </flex-select>
 
@@ -61,8 +63,8 @@
                 <td>
               <div class="input-group mr-1 input-group-sm">
                 <label>专业:</label>
-                <flex-select [allowClear]="true" [(items)]="majorList" optionValueField="id"
-                  optionTextField="major_name" [(ngModel)]="query.mr_id" placeholder="请选择"
+                <flex-select [allowClear]="true" [(items)]="majorList" optionValueField="major_code"
+                  optionTextField="full_name" [(ngModel)]="query.major_code" placeholder="请选择"
                   [ngModelOptions]="{standalone: true}" width="110" noResultsFound="无数据">
                 </flex-select>
               </div>

+ 22 - 3
src/app/routes/hm-soft/pl/pl-std-record/junior-std-record-audith/junior-std-record-audith.component.ts

@@ -19,7 +19,8 @@ export class JuniorStdRecordAudithComponent extends FlexTableComponent implement
     "mr_id": "",
     "status": "",
     "ticket_no" : "",
-    "is_xj":""
+    "is_xj":"",
+    "major_code":""
   };
 
   QUERY_URL = "pl/plStdRecord/provincePage.htm?std_type=1";
@@ -34,6 +35,9 @@ export class JuniorStdRecordAudithComponent extends FlexTableComponent implement
   FIND_URL = "pl/plStdRecordFile/find.htm";
   LASTEST_YEAR_CODE_URL = "pl/plStdRecordTime/getBatch.htm";
 
+  SCHOOL_LIST_URL = "pl/plMajorApplyJoinSchool/list.htm"; //查找主考学校下所有的衔接学校
+
+
   majorList = [];
   joinSchoolList = [];
   apply_form = 1; //专本衔接考生
@@ -51,11 +55,15 @@ export class JuniorStdRecordAudithComponent extends FlexTableComponent implement
   }
 
   ngOnInit() {
+    FrameRequest.requestArray("pl/plMajor/queryMajorByStatus.htm", {status:1,major_level:1}, (arrary) => {
+      this.majorList = arrary;
+    });
+
     setTimeout(() => {
       FrameRequest.requestEntity(this.LASTEST_YEAR_CODE_URL, {std_type: this.apply_form}, (entity) => {
         if (entity) {
           this.query.year_code = entity.year_code;
-          this.chooseMajor();
+          //this.chooseMajor();
           this.framePager.reload();
         }
       });
@@ -109,6 +117,11 @@ export class JuniorStdRecordAudithComponent extends FlexTableComponent implement
       this.query.is_xj = "";
     }
     param.is_xj = this.query.is_xj;
+
+    if(!this.query.major_code) {
+      this.query.major_code = "";
+    }
+    param.major_code = this.query.major_code;
   }
   
   
@@ -365,6 +378,11 @@ export class JuniorStdRecordAudithComponent extends FlexTableComponent implement
       this.query.is_xj = "";
     }
 
+    if(!this.query.major_code) {
+      this.query.major_code = "";
+    }
+    
+
     FrameRequest.download("pl/plStdRecord/exportProvinceJion.htm", {
      mr_id:this.query.mr_id,
       year_code : this.query.year_code,
@@ -373,7 +391,8 @@ export class JuniorStdRecordAudithComponent extends FlexTableComponent implement
       school_id : this.query.school_id,
       join_school_id : this.query.join_school_id,
       is_xj:this.query.is_xj,
-      std_type: this.apply_form
+      std_type: this.apply_form,
+      major_code: this.query.major_code
     }, () => {
       AppComponent.GobalComponent.setLoading(false);
       AppComponent.GobalComponent.successMsg("考生备案导出成功");

+ 4 - 4
src/app/routes/hm-soft/pl/pl-std-record/pl-junior-std-record/pl-junior-std-record.component.html

@@ -52,8 +52,8 @@
                 <td>
               <div class="input-group mr-1 input-group-sm">
                 <label>专业:</label>
-                <flex-select [allowClear]="true" [(items)]="majorList" optionValueField="id"
-                  optionTextField="major_name" [(ngModel)]="query.mk_id" placeholder="请选择"
+                <flex-select [allowClear]="true" [(items)]="majorList" optionValueField="major_code"
+                  optionTextField="full_name" [(ngModel)]="query.major_code" placeholder="请选择"
                   [ngModelOptions]="{standalone: true}" width="130" noResultsFound="无数据">
                 </flex-select>
               </div>
@@ -294,12 +294,12 @@
       <label class="col-lg-2 col-form-label text-lg-right">专业</label>
       <div class="col-lg-4">
 
-        <flex-select [allowClear]="true" [(items)]="majorList" optionValueField="id" optionTextField="major_name"
+        <flex-select [allowClear]="true" [(items)]="majorList" optionValueField="id" optionTextField="full_name"
           [(ngModel)]="item.major_record_id" placeholder="请选择" width="250" noResultsFound="无数据"
           formControlName="major_record_id" [formControl]="formModel.get('major_record_id')">
         </flex-select>
         <span class="text-danger"
-          *ngIf="formModel.get('major_record_id').hasError('required') && (formModel.get('major_record_id').dirty || formModel.get('major_record_id').touched)">请选择考生报考专业</span>
+          *ngIf="formModel.get('major_record_id').hasError('required') && (formModel.get('major_record_id').dirty || formModel.get('major_record_id').touched)">请选择专业</span>
       </div>
     </div>
     <!--

+ 16 - 5
src/app/routes/hm-soft/pl/pl-std-record/pl-junior-std-record/pl-junior-std-record.component.ts

@@ -20,7 +20,8 @@ export class PlJuniorStdRecordComponent extends FlexTableComponent implements On
     "mk_id": "",
     "status": "",
     "join_school_id" : "",
-    "is_xj":""
+    "is_xj":"",
+    "major_code":""
   };
 
   QUERY_URL = "pl/plStdRecord/page.htm";
@@ -101,9 +102,14 @@ export class PlJuniorStdRecordComponent extends FlexTableComponent implements On
     if(this.query.year_code == null ) {
       this.query.year_code = "";
     }
-    FrameRequest.requestArray(this.MAJOR_LIST_URL, { year_code: this.query.year_code, apply_form: this.apply_form }, (array) => {
-      this.majorList = array;
+   // FrameRequest.requestArray(this.MAJOR_LIST_URL, { year_code: this.query.year_code, apply_form: this.apply_form }, (array) => {
+   //   this.majorList = array;
+   // });
+
+    FrameRequest.requestArray("pl/plMajor/queryMajorByStatus.htm", {status:1,major_level:1}, (arrary) => {
+      this.majorList = arrary;
     });
+
     // FrameRequest.requestEntity(this.IN_TIME_URL, {
     //   year_code: this.query.year_code,
     //   apply_form: this.apply_form
@@ -152,7 +158,11 @@ export class PlJuniorStdRecordComponent extends FlexTableComponent implements On
     }
     param.is_xj = this.query.is_xj;
 
-    
+    if(!this.query.major_code) {
+      this.query.major_code = "";
+    }
+    param.major_code = this.query.major_code;
+
   }
 
 
@@ -379,7 +389,8 @@ export class PlJuniorStdRecordComponent extends FlexTableComponent implements On
       status : this.query.status,
       mk_id : this.query.mk_id,
       join_school_id : this.query.join_school_id,
-      is_xj:this.query.is_xj
+      is_xj:this.query.is_xj,
+      major_code:this.query.major_code
     }, () => {
       AppComponent.GobalComponent.setLoading(false);
       AppComponent.GobalComponent.successMsg("考生备案导出成功");

+ 489 - 0
src/app/routes/hm-soft/pl/pl-textbook-pre/pl-textbook-pre.component.html

@@ -0,0 +1,489 @@
+<div class="panel panel-default">
+    <!--标题-->
+    <div class="panel-title">
+        <nav aria-label="breadcrumb">
+            <ol class="breadcrumb">
+                <!-- TODO -->
+                <li class="breadcrumb-item">计划管理</li>
+                <li class="breadcrumb-item active" aria-current="page">教材管理</li>
+            </ol>
+        </nav>
+    </div>
+    <div class="panel-body ml-sm" [hidden]="editShowType=='only'">
+        <div class="card card-default">
+            <div class="card-body">
+                <!--查询条件-->
+                <div class="row mb-3 ml-1" [hidden]="editShowType=='only'">
+                    <div class="col-lg-12">
+                        <form (ngSubmit)="framePager.goSearch()" class="form-inline">
+
+                            <div class="input-group mr-1 input-group-sm">
+                                <label>关键字:</label>
+                                <input name="keyword" [(ngModel)]="query.query" class="input-sm form-control"
+                                    type="text" value="" maxlength="64" placeholder="请输入查询关键字">
+
+                            </div>
+                            <div class="input-group mr-1 input-group-sm">
+                                <!-- frame框架中的字典启用、禁用为Active、InActive;
+                                    其他数据表中的数据,用0和1代表;是不是需要在定义一个字典,待讨论
+                               
+                                <label>教材状态:</label>
+                                <select name="status" [(ngModel)]="query.status" frameDict [dictName]="'Status'"
+                                    class="form-control">
+                                </select>
+  -->
+                            </div>
+
+                            <div class="input-group mr-1 input-group-sm">
+                                <label>启用批次:</label>
+                                <flex-select [allowClear]="true" [(items)]="yearCodeList" [(ngModel)]="query.exam_time_id"
+                                    optionValueField="id" optionTextField="examyearmonth" placeholder="请选择"
+                                    [ngModelOptions]="{standalone: true}" width="80" noResultsFound="无数据">
+                                </flex-select>
+
+                              </div>
+
+                            <button class="btn btn-primary btn-rounded btn-outline btn-sm  mr-1"
+                                (click)="framePager.goSearch()">
+                                <i class="fa fa-search"></i> 查询</button>
+                            <button class="btn btn-primary btn-rounded btn-outline btn-sm  mr-1" (click)="reset()">
+                                <i class="fa fa-undo"></i> 重置</button>
+                        </form>
+                    </div>
+                </div>
+
+                <!-- 工具栏 -->
+                <div class="row mb-2" [hidden]="editShowType=='only'">
+                    <div class="col-lg-12">
+                        <div class="pull-left" style="text-align: right;">
+                            <button class="btn btn-primary mr-1 btn-sm" data-toggle="tooltip" data-placement="left"
+                                (click)="goEdit(editTemplateModal,'modal','modal-lg',null)" title="添加">
+                                <i class="fa fa-plus"></i> 添加</button>
+                            <button class="btn mr-1 btn-sm bg-danger" (click)="delete()" data-toggle="tooltip"
+                                data-placement="left" title="删除">
+                                <i class="fa fa-trash"> 删除</i>
+                            </button>
+                            
+
+                           
+                            <!-- <button id="btnExport" class="btn btn-primary mr-1 btn-sm" data-toggle="tooltip"
+                                data-placement="left" title="导出">
+                                <i class="fa fa-file-excel"></i> 导出</button> -->
+                        </div>
+
+                    </div>
+                </div>
+
+                <!--表格-->
+                <div class="row">
+                    <div class="col-lg-12 ml-0" [hidden]="editShowType=='only'">
+                        <table class="table table-sm table-striped table-hover table-bordered bg-white">
+                            <thead>
+                                <tr>
+                                    <th>
+                                        <div class="checkbox c-checkbox">
+                                            <label>
+                                                <input type="checkbox"
+                                                    (change)="framePager.checkedMasterToggle($event)" />
+                                                <span class="fa fa-check"></span>
+                                            </label>
+                                        </div>
+                                    </th>
+                                    <th>序号</th>
+                                    <th align="center">教材代码</th>
+                                    <th>教材名称</th>
+                                    
+                                    <th>编著</th>
+                                    <!-- <th>定价</th> -->
+                                    <th>出版社</th>
+                                    <th align="center">关联课程代码</th>
+                                    <th>关联课程名称</th>
+                                    <th align="center">启用批次</th>
+                                   
+                                    <th style="width: 80px;" align="center">操作</th>
+                                </tr>
+                            </thead>
+                            <tbody>
+                                <tr *ngFor="let item of framePager.getRecords(); let i = index">
+                                    <td>
+                                        <div class="checkbox c-checkbox input-group-sm">
+                                            <label>
+                                                <input type="checkbox" [value]="item.id" [(checked)]="item.isChecked"
+                                                    [(ngModel)]="item.isChecked" />
+                                                <span class="fa fa-check"></span>
+                                            </label>
+                                        </div>
+                                    </td>
+                                    <td>{{framePager.pageStart+i}}</td>
+                                    
+                                    <td align="center">{{item.textbook_code}}</td>
+                                    <td>{{item.textbook_name}}</td>
+                                    <td>{{item.textbook_writer}}</td>
+                                    <!-- <td>{{item.price}}</td> -->
+                                    <td>{{item.textbook_publisher}}</td>
+                                    <td align="center">{{item.course_code}}</td>
+                                    <td>{{item.course_name}}</td>
+                                    <td align="center">{{item.exam_year_month}}</td>
+
+                                    <td align="center">
+
+                                        <a href="#" (click)="goEdit(editTemplateModal,'modal','modal-lg',item)"
+                                            title="编辑"><em class="fa-lg fas fa-edit mr-1"></em></a>
+                                        <a href="#" (click)="delete(item)" title="删除"><em
+                                                class="fa-lg fas fa-trash mr-1" style="color:#F56D6D"></em></a>
+                                    </td>
+                                </tr>
+                            </tbody>
+                        </table>
+                        <!-- TODO -->
+                        <frame-pager [url]="QUERY_URL" hideSearch="true" hasCheck="true" #framePager
+                            (preReqEvent)="search($event)"></frame-pager>
+                    </div>
+
+                    <!-- 编辑页面 -->
+                    <div class="col-lg-12" *ngIf="item && editShowType != null &&editShowType!='modal'">
+                        <ng-container *ngTemplateOutlet="editTemplateModal">
+                        </ng-container>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+    <!-- only编辑页面-->
+    <div class="col-lg-12" *ngIf="item && editShowType != null &&editShowType =='only'">
+        <ng-container *ngTemplateOutlet="editTemplateModal">
+        </ng-container>
+    </div>
+    <!--关联课程界面  -->
+    <div class="col-lg-12" *ngIf="courseShowType">
+        <ng-container *ngTemplateOutlet="courseTemplateModal">
+        </ng-container>
+    </div>
+</div>
+
+<div class="mt-5">
+    <frame-uploader #uploader [silenceUpload]="true" [autoUpload]="true" [uploadUrl]="UPLOAD_URL"></frame-uploader>
+</div>
+
+<ng-template #editFormTemplate>
+    <form [formGroup]="formModel" *ngIf="item" class="form-validate form-horizontal" novalidate="">
+        <input type="hidden" class="form-control" formControlName="id" [(ngModel)]="item.id"
+            [formControl]="formModel.controls['id']" />
+        <div class="row mb-1">
+
+            <label class="col-lg-2 col-form-label text-lg-right">教材名称</label>
+            <div class="col-lg-4">
+
+                <input class="form-control" type="text" formControlName="textbook_name"
+                    [formControl]="formModel.get('textbook_name')" [(ngModel)]="item.textbook_name" />
+
+                <span class="text-danger"
+                    *ngIf="formModel.get('textbook_name').hasError('required') && (formModel.get('textbook_name').dirty || formModel.get('textbook_name').touched)">请输入教材名称</span>
+            </div>
+
+            <label class="col-lg-2 col-form-label text-lg-right">教材代码</label>
+            <div class="col-lg-4">
+
+                <input class="form-control" type="text" formControlName="textbook_code" placeholder="请输入课程代码加1~9"
+                    [formControl]="formModel.get('textbook_code')" [(ngModel)]="item.textbook_code" maxlength="6"/>
+
+                <span class="text-danger"
+                    *ngIf="formModel.get('textbook_code').hasError('required') && (formModel.get('textbook_code').dirty || formModel.get('textbook_code').touched)">请输入教材代码</span>
+                <span class="text-danger"
+                    *ngIf="formModel.controls['textbook_code'].hasError('pattern') && (formModel.controls['textbook_code'].dirty ||formModel.controls['textbook_code'].touched)">教材代码只能为字符和数字</span>
+            </div>
+        </div>
+        <div class="row mb-1">
+
+            <label class="col-lg-2 col-form-label text-lg-right">编著</label>
+            <div class="col-lg-4">
+
+                <input class="form-control" type="text" formControlName="textbook_writer"
+                    [formControl]="formModel.get('textbook_writer')" [(ngModel)]="item.textbook_writer" />
+
+            </div>
+<!--
+            <label class="col-lg-2 col-form-label text-lg-right">定价</label>
+            <div class="col-lg-4">
+
+                <input class="form-control" type="number" formControlName="price" [formControl]="formModel.get('price')"
+                    [(ngModel)]="item.price" />
+
+            </div>
+        -->
+
+        <label class="col-lg-2 col-form-label text-lg-right">教材大纲</label>
+        <div class="col-lg-4">
+
+            <input class="form-control" type="text" formControlName="textbook_outline"
+                [formControl]="formModel.get('textbook_outline')" [(ngModel)]="item.textbook_outline" />
+
+        </div>
+        </div>
+        <div class="row mb-1">
+
+            <label class="col-lg-2 col-form-label text-lg-right">出版社</label>
+            <div class="col-lg-4">
+
+                <input class="form-control" type="text" formControlName="textbook_publisher"
+                    [formControl]="formModel.get('textbook_publisher')" [(ngModel)]="item.textbook_publisher" />
+
+            </div>
+
+            <label class="col-lg-2 col-form-label text-lg-right">版次</label>
+            <div class="col-lg-4">
+
+                <input class="form-control" type="text" formControlName="textbook_revision"
+                    [formControl]="formModel.get('textbook_revision')" [(ngModel)]="item.textbook_revision" />
+
+            </div>
+        </div>
+        <!--
+        <div class="row mb-1">
+
+            <label class="col-lg-2 col-form-label text-lg-right">教材状态</label>
+            <div class="col-lg-4">
+
+                <select class="custom-select" formControlName="status" [formControl]="formModel.controls['status']"
+                    [(ngModel)]="item.status" frameDict [dictName]="'Status'" [(dictValue)]="item.status"
+                    [tipFlag]="false">
+                </select>
+
+            </div>
+
+            
+           
+
+        </div>
+        -->
+    </form>
+</ng-template>
+
+<ng-template #editTemplateModal>
+    <div class="modal-content" style="width:1000px;">
+        <div class="modal-header info-success-qm">
+            <div class="pull-left">
+                <em class="fa-lg fas fa-edit "></em> 编辑页面
+            </div>
+            <button type="button" class="close" (click)="hideModal()">×</button>
+        </div>
+
+        <!-- 1@3 -->
+        <div class="modal-body" style="width:1000px;">
+			<div [ngTemplateOutlet]="editFormTemplate"></div>
+			<div [ngTemplateOutlet]="courseTemplate"></div>
+        </div>
+
+        <div class="modal-footer">
+			<button class="btn btn-info" (click)="saveCourseRealate(item?item.id:null)">
+                <i class="fa fa-info-circle"> </i> 添加关联
+            </button>
+            <button class="btn btn-info" (click)="save()">
+                <i class="fa fa-info-circle"> </i> 保存
+            </button>
+            <button class="btn btn-default" (click)="hideModal()">
+                <i class="icon-close"> </i> 取消
+            </button>
+        </div>
+    </div>
+</ng-template>
+
+<!-- 关联课程界面 -->
+<ng-template #courseTemplateModal>
+    <div class="modal-content">
+        <div class="modal-header info-success-qm">
+            <div class="pull-left">
+                <em class="fa-lg fas fa-edit "></em> 课程关联
+            </div>
+            <button type="button" class="close" (click)="hideModal()">×</button>
+        </div>
+
+        <!-- 1@3 -->
+        <div class="modal-body">
+            <div [ngTemplateOutlet]="courseTemplate"></div>
+        </div>
+
+        <div class="modal-footer">
+            <button class="btn btn-info" (click)="saveCourseRealate(item.id)">
+                <i class="fa fa-info-circle"> </i> 添加关联
+            </button>
+            <button class="btn btn-default" (click)="hideCouseWindow()">
+                <i class="icon-close"> </i> 关闭
+            </button>
+        </div>
+    </div>
+</ng-template>
+
+
+<ng-template #courseTemplate>
+    <div class="container">
+        <div class="row">
+            <div class="col-lg-12">
+                <h4>已关联课程</h4>
+            </div>
+        </div>
+        <div class="row">
+            <div class="col-lg-12">
+                <table class="table table-sm table-striped table-hover table-bordered bg-white">
+                    <thead>
+                        <tr>
+                            <th align="center">课程代码</th>
+                            <th>课程名称</th>
+                           <!-- <td>国标代码</td>-->
+                            <th align="center">学分</th>
+                            <th align="center">启用批次</th>
+                            <th align="center">操作</th>
+                        </tr>
+                    </thead>
+                    <tbody>
+                        <tr *ngFor="let course of yesCourses" >
+                            <td align="center">{{course.course_code}}</td>
+                            <td>{{course.course_name}}</td>
+                            <!--<td>{{course.course_standard_code}}</td>-->
+                            <td align="right">{{course.course_score}}</td>
+                            <td align="center">{{course.exam_year_month}}</td>
+                            <td align="center">
+                                <a href="#" (click)="deleteCourse(course)" title="删除"><em
+                                        class="fa-lg fas fa-trash mr-1" style="color:#F56D6D"></em></a>
+                            </td>
+                        </tr>
+                    </tbody>
+                </table>
+            </div>
+        </div>
+
+        <div class="row">
+            <div class="col-lg-12">
+                <h4>添加关联课程</h4>
+            </div>
+        </div>
+
+        <div class="panel-body ml-sm">
+            <div class="card card-default">
+                <div class="card-body">
+                    <!--查询条件-->
+                    <div class="row mb-3 ml-1">
+                        <div class="col-lg-12">
+                            <form (ngSubmit)="framePager2.goSearch()" class="form-inline">
+
+                                <div class="input-group mr-1 input-group-sm">
+                                    <label>关键字:</label>
+                                    <input name="keyword" [(ngModel)]="query.query" class="input-sm form-control"
+                                        type="text" value="" maxlength="64" placeholder="请输入查询关键字">
+
+                                </div>
+                                <button class="btn btn-primary btn-rounded btn-outline btn-sm  mr-1"
+                                    (click)="framePager2.goSearch()">
+                                    <i class="fa fa-search"></i> 查询</button>
+                            </form>
+                        </div>
+                    </div>
+
+                    <!--表格-->
+                    <div class="row">
+                        <div class="col-lg-12 ml-0">
+                            <table class="table table-sm table-striped table-hover table-bordered bg-white">
+                                <thead>
+                                    <tr>
+                                        <th>
+                                            <div class="checkbox c-checkbox">
+                                                <label>
+                                                    <input type="checkbox"
+                                                        (change)="framePager2.checkedMasterToggle($event)" />
+                                                    <span class="fa fa-check"></span>
+                                                </label>
+                                            </div>
+                                        </th>
+                                        <th align="center">课程代码</th>
+                                        <th>课程名称</th>
+                                       
+                                        <th align="center" style="width: 120px;">启用批次</th>
+                                        <!-- <td>操作</td> -->
+                                    </tr>
+                                </thead>
+                                <tbody>
+                                    <tr *ngFor="let item of framePager2.getRecords(); let i = index">
+                                        <td>
+                                            <div class="checkbox c-checkbox input-group-sm">
+                                                <label>
+                                                    <input type="checkbox" [value]="item.id"
+                                                        [(checked)]="item.isChecked" [(ngModel)]="item.isChecked" />
+                                                    <span class="fa fa-check"></span>
+                                                </label>
+                                            </div>
+                                        </td>
+                                        <td align="center">{{item.course_code}}</td>
+                                        <td>{{item.course_name}}</td>
+                                       
+                                        <td align="center">
+                                            <flex-select [allowClear]="true" [(items)]="yearCodeList" [(ngModel)]="item.exam_time_id"
+                                            optionValueField="id" optionTextField="examyearmonth" placeholder="请选择"
+                                            [ngModelOptions]="{standalone: true}" width="80" style="padding:0px;margin: 0px;" noResultsFound="无数据" (ngModelChange) ="setyearcode($event,item.id)">
+                                            </flex-select>
+
+                                        </td>
+                                        <!-- <td>
+                                            <button type="button" class="btn btn-primary btn-sm" (click)="saveCourseRealate(item.id)">
+                                                <i class="fa fa-info-circle"> </i> 关联
+                                            </button>
+                                        </td> -->
+                                    </tr>
+                                </tbody>
+                            </table>
+                            <frame-pager [url]="COURSE_PAGE_URL" hideSearch="true" pageLimit="6" hasCheck="true"
+                                #framePager2 (preReqEvent)="search($event)"></frame-pager>
+                        </div>
+
+                    </div>
+                </div>
+            </div>
+        </div>
+
+    </div>
+</ng-template>
+
+<!--*********************************教材同步*********************************************-->
+<ng-template #importModal>
+    <div class="modal-content" style="width: 500px;">
+        <div class="modal-header info-success-qm">
+            <div class="pull-left">
+              <em class="fa-lg fas fa-edit "></em>教材同步
+            </div>
+            <button type="button" class="close" (click)="hideCouseWindow()">×</button>
+        </div>
+      
+        <!-- 1@3 -->
+        <div class="modal-body">
+            <div [ngTemplateOutlet]="impPopupTemplate"></div>
+        </div>
+      
+        <div class="modal-footer">
+            <button class="btn btn-info" (click)="textbookSync()">
+              <i class="fa fa-info-circle"> </i> 教材同步
+            </button>
+        </div>
+    </div>
+</ng-template>    
+
+<!--*********************************教材同步*********************************************-->
+<ng-template #impPopupTemplate>
+    <form class="form-inline">
+        <div class="input-group mr-1 input-group-sm">
+            <label>选择教材来源批次:</label>
+            <flex-select [allowClear]="true" [(items)]="yearCodeList" [(ngModel)]="syn.old_exam_time_id"
+                optionValueField="id" optionTextField="examyearmonth" placeholder="请选择"
+                [ngModelOptions]="{standalone: true}" width="100" noResultsFound="无数据"  >
+            </flex-select>
+        </div><br>
+        <div class="input-group mr-1 input-group-sm">
+                <label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;选择待同步批次:</label>
+                <flex-select [allowClear]="true" [(items)]="yearCodeList" [(ngModel)]="syn.exam_time_id"
+                    optionValueField="id" optionTextField="examyearmonth" placeholder="请选择"
+                    [ngModelOptions]="{standalone: true}" width="100" noResultsFound="无数据">
+                </flex-select>
+            </div>
+
+        
+    </form>
+   
+</ng-template>

+ 0 - 0
src/app/routes/hm-soft/pl/pl-textbook-pre/pl-textbook-pre.component.scss


+ 317 - 0
src/app/routes/hm-soft/pl/pl-textbook-pre/pl-textbook-pre.component.ts

@@ -0,0 +1,317 @@
+import { Component, OnInit, TemplateRef, ViewChild } from "@angular/core";
+import { FormBuilder, Validators } from '@angular/forms';
+import { CustomValidators } from 'ng2-validation';
+import { BsModalService } from "ngx-bootstrap/modal";
+import { FlexTableComponent } from "../../../../shared/common/FlexTable.component";
+import { AppComponent } from "../../../../app.component";
+import { FrameRequest } from "../../../../shared/frame/frame-request";
+import { FramePagerComponent } from "../../../../core/pager/pager.component";
+import { FrameUploaderComponent } from "../../../../core/uploader/uploader.component";
+
+@Component({
+  selector: "app-pl-textbook-pre",
+  templateUrl: "./pl-textbook-pre.component.html",
+  styleUrls: ["./pl-textbook-pre.component.scss"]
+})
+export class PlTextbookPreComponent extends FlexTableComponent
+  implements OnInit {
+
+  public query = {
+    "query": "",
+    "status": "",
+    "exam_time_id":""
+  };
+
+  public syn = {
+    "old_exam_time_id": null,
+    "exam_time_id":null
+  };
+
+  courseShowType: boolean = false;
+  yesCourses = [];
+  noCourses = [];
+  yearCodeList = [];
+  course: any;
+  exam_time_id: any;
+  
+  @ViewChild('framePager2')
+  framePager2: FramePagerComponent;
+
+  //TODO
+  QUERY_URL = "pl/plTextbookPre/page.htm";
+  DELETE_URL = "pl/plTextbookPre/deleteBatch.htm";
+  GET_URL = "pl/plTextbookPre/find.htm";
+  ADD_URL = "pl/plTextbookPre/add.htm";
+  EDIT_URL = "pl/plTextbookPre/edit.htm";
+  COURSE_URL = "pl/plTextbookPre/get.htm";
+  ADD_COURSE_URL = "pl/plTextbookPre/addCourse.htm";
+  COURSE_PAGE_URL = "pl/plCoursePre/page.htm";
+  DELETE_COURSE_URL = "pl/plTextbookPre/deleteCourse.htm";
+  UPLOAD_URL = "pl/plTextbookPre/upload.htm";
+  DOWNLOAD_URL = "pl/plTextbookPre/download.htm";
+  ERROR_DOWNLOAD_URL = "pl/plTextbookPre/downloadError.htm";
+  YEAR_CODE_URL = "pl/plExamTime/list.htm";
+  UPDATE_BATCH_URL = "pl/plTextbookPre/updateBatch.htm";
+  TEXTBOOK_SYNC_URL = "pl/plTextbookPre/synTextBook.htm";
+
+  filePath: any;//错误文件路径
+  @ViewChild('uploader')
+  uploader: FrameUploaderComponent;
+
+  constructor(
+    public bsModalService: BsModalService,
+    fb: FormBuilder
+  ) {
+    super();
+    // CustomValidators.rangeLength([1, 6])
+    this.formModel = fb.group({
+      id: [null],
+      'textbook_name': [null, Validators.compose([Validators.required])],
+      'textbook_code': [null, Validators.compose([Validators.required, Validators.pattern("^[a-zA-Z0-9]+$")])],
+      'textbook_writer': [null],
+      'price': [null],
+      'textbook_publisher': [null],
+      'textbook_revision': [null],
+      'textbook_outline': [null],
+	  'status': [null]
+    });
+  }
+
+  ngOnInit() {
+    FrameRequest.requestArray(this.YEAR_CODE_URL, {} , (array) => {
+      this.yearCodeList = array;
+    });
+  }
+
+  async delete(item?){
+		if(!  this.preDeleteEvent()) return;
+		//批量操作
+		if(!item){
+		  let checkedArray = this.framePager.getCheckedArray();
+		  if(checkedArray.length === 0){
+			AppComponent.alert({title:"信息提示",text:"请选择数据!"})
+			return;
+		  }
+		}
+		AppComponent.confirm("确定要删除教材记录吗?将同步删除课程关联信息,此操作不可恢复!",()=>{
+		  let checkedArray = [];
+		  item ? checkedArray[0] = item.id: 
+				 checkedArray = this.framePager.getCheckedArray((item)=>item.id)
+		  
+		  // if(checkedArray.length === 0){
+		  //   AppComponent.alert({title:"信息提示",text:"请选择数据!"})
+		  //   return;
+		  // }
+		  FrameRequest.requestMap(this.DELETE_URL, {ids:checkedArray.join()}, () => {
+			AppComponent.GobalComponent.successMsg('数据删除成功');
+			this.aftDeleteEvent();
+			this.framePager.reload();
+		  });
+	});
+    
+
+
+  }
+
+  async preGoEditEvent(item){
+	  this.yesCourses = [];
+	  if (item) {
+		this.reload(item.id);
+	  }
+	  return true;
+  }
+  async preSaveEvent(){
+	if (this.yesCourses.length>0) {
+		let course_id=[];
+		let exam_time_id=[];
+		this.yesCourses.forEach(y => {
+			course_id.push(y.id);
+			exam_time_id.push(y.exam_time_id);
+		});
+		this.item.course_ids=course_id.join();
+		this.item.course_exam_times=exam_time_id.join();
+	}
+	return true;
+  }
+
+  // 教材关联课程
+  courseRelate(template: TemplateRef<any>, modalcss: string, item?) {
+    if (!item) {
+      let checkArray = this.framePager.getCheckedArray();
+      if (checkArray.length === 0 || checkArray.length > 1) {
+        AppComponent.alert({ title: '信息提示', text: '请选择一条数据!' });
+        return;
+      }
+      item = checkArray[0];
+      this.item = item;
+    }
+    FrameRequest.requestArray(this.COURSE_URL, { id: item.id }, (array) => {
+      this.yesCourses = array;
+    });
+    //以模态窗口显示
+    this.shouModalWin(template, modalcss);
+  }
+
+  hideCouseWindow() {
+    this.courseShowType = null;
+    this.yesCourses = [];
+    if (this.bsModalWin) this.bsModalWin.hide();
+    this.query.query = "";
+    this.framePager.reload();
+    this.resetPage();
+  }
+  //保存课程关联信息
+  saveCourseRealate(textbook_id: number, item?) {
+    
+    let checkedArray = this.framePager2.getCheckedArray();
+    if (!this.course) {
+      if (checkedArray.length === 0 || checkedArray.length > 1) {
+        AppComponent.alert({ title: "信息提示", text: "请选择一条数据!" })
+        return;
+      }
+    }
+
+    if(!this.exam_time_id) {
+      AppComponent.alert({ 'title': '提示', 'text': '请选择启用批次' });
+      return;
+    } 
+   
+   
+	if (textbook_id) {
+		item ? checkedArray[0] = item.id :
+		checkedArray = this.framePager2.getCheckedArray((item) => item.id);
+		FrameRequest.request(this.ADD_COURSE_URL, { course_id: checkedArray[0], textbook_id: textbook_id, exam_time_id: this.exam_time_id}, () => {
+			AppComponent.GobalComponent.successMsg('课程关联成功');
+			this.reload(textbook_id);
+			
+		  });
+	}else{
+		for (var i = 0;i < this.yesCourses.length; i++){
+      
+			if (this.yesCourses[i].id==checkedArray[0].id){
+				this.yesCourses.splice(i,1);
+			}
+		 }
+		 for (var i = 0;i < this.yearCodeList.length; i++){
+			if (this.yearCodeList[i].id==this.exam_time_id){
+				checkedArray[0]['exam_time_id']=this.yearCodeList[i].id;
+        checkedArray[0]['year_code']=this.yearCodeList[i].year_code;
+        checkedArray[0]['exam_year_month']=this.yearCodeList[i].examyearmonth;
+			}
+		 }
+		this.yesCourses.push(checkedArray[0]);
+	}
+	this.exam_time_id=null;
+
+  }
+
+  //删除关联课程
+  deleteCourse(course) {
+	if (!course.textbook_id) {
+		for (var i = 0;i < this.yesCourses.length; i++){
+			if (this.yesCourses[i].id==course.id){
+				this.yesCourses.splice(i,1);
+			}
+		 }
+	} else {
+		FrameRequest.request(this.DELETE_COURSE_URL, { id: course.id }, () => {
+			AppComponent.alert({ title: "信息提示", text: "删除成功!" });
+			this.reload(course.textbook_id);
+		  })
+	}
+
+
+  }
+  //重新加载
+  reload(textbook_id) {
+    FrameRequest.requestArray(this.COURSE_URL, { id: textbook_id }, (array) => {
+      this.yesCourses = array;
+    });
+  }
+
+  //模板下载
+  download() {
+    FrameRequest.download(this.DOWNLOAD_URL);
+  }
+
+  //错误数据下载
+  downloadErrFile() {
+    FrameRequest.download(this.ERROR_DOWNLOAD_URL, { filePath: this.filePath });
+  }
+
+  /**
+ * 批量导入
+ */
+upload(item?: any) {
+  this.uploader.choooseFileAndUpload({}, ((ajax) => {
+    if (ajax.errorCode === -1) {
+      this.filePath = ajax.url;
+      AppComponent.alert({ 'title': '提示', 'text': '有错误数据,请修正后,在重新上传' });
+    } else {
+      AppComponent.GobalComponent.successMsg('批量导入成功');
+      this.filePath = '';
+      this.hideModal();
+      this.framePager.reload();
+    }
+  }).bind(this));
+}
+
+updateBatch(exam_time_id:any,id:any) {
+  if(!exam_time_id) {
+    AppComponent.alert({ 'title': '提示', 'text': '请选择启用批次' });
+  }
+  FrameRequest.request(this.UPDATE_BATCH_URL, {
+    exam_time_id: exam_time_id,
+    id: id
+  },() => {
+    AppComponent.GobalComponent.successMsg('启用批次设置成功');
+  });
+}
+
+setyearcode(exam_time_id:any,id:any) {
+  if(exam_time_id) {
+    this.exam_time_id = exam_time_id;
+  }
+
+ 
+}
+
+      //教材同步
+      textbookSync() {
+     
+      if(!this.syn.old_exam_time_id) {
+        AppComponent.alert({ 'title': '提示', text: '请选择教材来源批次' });
+        return;
+      }
+
+      if(!this.syn.exam_time_id) {
+        AppComponent.alert({ 'title': '提示', text: '请选择待同步批次' });
+        return;
+      }
+  
+      AppComponent.confirm("确定同步教材同步吗?",()=>{
+  
+        AppComponent.GobalComponent.setLoading(true);
+        FrameRequest.request(this.TEXTBOOK_SYNC_URL, { exam_time_id: this.syn.exam_time_id,old_exam_time_id: this.syn.old_exam_time_id }, () => {
+          AppComponent.GobalComponent.setLoading(false);
+          AppComponent.GobalComponent.successMsg("同步成功");
+          this.hideImpWin();
+          this.framePager.reload();
+        });
+  
+      });
+  
+      
+    }    
+    
+   
+
+    
+  hideImpWin() {
+    if(this.bsModalWin) 
+      this.bsModalWin.hide();
+   
+  }
+    
+
+}

+ 22 - 0
src/app/routes/hm-soft/pl/pl-textbook-pre/pl-textbook-pre.module.ts

@@ -0,0 +1,22 @@
+import { NgModule} from '@angular/core';
+import { Routes, RouterModule } from '@angular/router';
+import { SharedModule } from '../../../../shared/shared.module';
+import { HmSoftModule } from '../../hmsoft.module';
+import { PlTextbookPreComponent } from './pl-textbook-pre.component';
+ 
+const routes: Routes = [
+    { path: '', component: PlTextbookPreComponent },
+];
+ 
+@NgModule({
+    imports: [
+      SharedModule,
+      HmSoftModule,
+      RouterModule.forChild(routes)
+    ],
+    declarations: [
+        PlTextbookPreComponent
+    ],
+  
+  })
+export class PlTextbookPreModule { }

+ 155 - 78
src/app/routes/hm-soft/pl/pl-textbook/pl-textbook.component.html

@@ -16,38 +16,66 @@
                 <div class="row mb-3 ml-1" [hidden]="editShowType=='only'">
                     <div class="col-lg-12">
                         <form (ngSubmit)="framePager.goSearch()" class="form-inline">
-
+                            <table>
+                                <tr>
+                                  <td>
                             <div class="input-group mr-1 input-group-sm">
-                                <label>关键字:</label>
-                                <input name="keyword" [(ngModel)]="query.query" class="input-sm form-control"
-                                    type="text" value="" maxlength="64" placeholder="请输入查询关键字">
+                                <label>考试批次:</label>
+                                <flex-select [allowClear]="true" [(items)]="yearCodeList" [(ngModel)]="query.exam_time_id" width="100"
+                                    optionValueField="id" optionTextField="examyearmonth" placeholder="请选择"
+                                    [ngModelOptions]="{standalone: true}"  noResultsFound="无数据">
+                                </flex-select>
 
-                            </div>
-                            <div class="input-group mr-1 input-group-sm">
+                              </div>
+                              </td>
+                              <td>
+                              <div class="input-group mr-1 input-group-sm">
                                 <!-- frame框架中的字典启用、禁用为Active、InActive;
                                     其他数据表中的数据,用0和1代表;是不是需要在定义一个字典,待讨论
-                               
-                                <label>教材状态:</label>
-                                <select name="status" [(ngModel)]="query.status" frameDict [dictName]="'Status'"
+                                -->
+                                <label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;状态:</label>
+                                <select name="status" [(ngModel)]="query.status" frameDict [dictName]="'PublishStatus'" 
                                     class="form-control">
                                 </select>
-  -->
+ 
                             </div>
+                        </td>
+
+                       
 
+                        </tr>
+                        <tr>
+                                <td>
+                                        <div class="input-group mr-1 input-group-sm">
+                                            <label>是否统考:</label>
+                                            <select name="is_unified" [(ngModel)]="query.is_unified" frameDict [dictName]="'YesOrNo'" class="form-control" style="width:180px;">
+                                            </select>
+                                            
+            
+                                        </div>
+                                        </td>
+                            
+                            <td>
                             <div class="input-group mr-1 input-group-sm">
-                                <label>启用批次:</label>
-                                <flex-select [allowClear]="true" [(items)]="yearCodeList" [(ngModel)]="query.exam_time_id"
-                                    optionValueField="id" optionTextField="examyearmonth" placeholder="请选择"
-                                    [ngModelOptions]="{standalone: true}" width="80" noResultsFound="无数据">
-                                </flex-select>
+                                <label>关键字:</label>
+                                <input name="keyword" [(ngModel)]="query.query" class="input-sm form-control" style="width:250px;"
+                                    type="text" value="" maxlength="64" placeholder="请输入查询关键字">
 
-                              </div>
+                            </div>
+                        </td>
+
+                        <td align="left">
 
                             <button class="btn btn-primary btn-rounded btn-outline btn-sm  mr-1"
                                 (click)="framePager.goSearch()">
                                 <i class="fa fa-search"></i> 查询</button>
-                            <button class="btn btn-primary btn-rounded btn-outline btn-sm  mr-1" (click)="reset()">
-                                <i class="fa fa-undo"></i> 重置</button>
+                                <button class="btn btn-primary btn-rounded btn-outline btn-sm  mr-1" (click)="downXls()">
+                                        <i class="fa icon-cloud-download"></i> 导出</button>
+                                <button class="btn btn-primary btn-rounded btn-outline btn-sm  mr-1" (click)="downXlsForUnified()">
+                                        <i class="fa icon-cloud-download"></i> 考试计划未完善的教材导出</button>
+                           </td>
+                            </tr>
+                        </table>
                         </form>
                     </div>
                 </div>
@@ -57,16 +85,13 @@
                     <div class="col-lg-12">
                         <div class="pull-left" style="text-align: right;">
                             <button class="btn btn-primary mr-1 btn-sm" data-toggle="tooltip" data-placement="left"
-                                (click)="goEdit(editTemplateModal,'modal','modal-lg',null)" title="添加">
+                                (click)="goEdit(editTemplateModal,'modal','modal-bg',null)" title="添加">
                                 <i class="fa fa-plus"></i> 添加</button>
                             <button class="btn mr-1 btn-sm bg-danger" (click)="delete()" data-toggle="tooltip"
                                 data-placement="left" title="删除">
                                 <i class="fa fa-trash"> 删除</i>
                             </button>
-                            <button id="btnCourse" class="btn btn-primary mr-1 btn-sm" data-toggle="tooltip"
-                                data-placement="left" title="课程关联"
-                                (click)="courseRelate(courseTemplateModal,'modal-lg',item)">
-                                <i class="fa fa-file-excel"></i> 课程关联</button>
+                          
 
                             <button id="btnExport" class="btn btn-primary mr-1 btn-sm" data-toggle="tooltip"
                                 data-placement="left" title="导出" (click)="download()">
@@ -74,8 +99,6 @@
                             <button id="btnExport" class="btn btn-primary mr-1 btn-sm" data-toggle="tooltip"
                                 data-placement="left" title="导入" (click)="upload()">
                                 <i class="fa fa-file-excel"></i>批量导入</button>
-                            <button class="btn btn-primary mr-1 btn-sm" data-toggle="tooltip" data-placement="left" (click)="shouModalWin(importModal,'modal-sm')"
-                                title="教材同步"><i class="fa icon-login"></i>教材同步</button>
                             
                             <button type="button" class="btn btn-warning btn-xs ml-2" (click)="downloadErrFile()"
                                 *ngIf="filePath">
@@ -104,17 +127,18 @@
                                             </label>
                                         </div>
                                     </th>
-                                    <th>序号</th>
+                                    <th align="center">序号</th>
+                                    <th align="center">考试批次</th>
+                                    <th align="center">课程代码</th>
+                                    <th align="center">课程名称</th>
                                     <th align="center">教材代码</th>
-                                    <th>教材名称</th>
+                                    <th align="center">教材名称</th>
+                                    <th align="center">教材大纲</th>
+                                    <th align="center">编著</th>
+                                    <th align="center">出版社</th>
+                                    <th align="center">版次</th>
                                     
-                                    <th>编著</th>
-                                    <!-- <th>定价</th> -->
-                                    <th>出版社</th>
-                                    <th align="center">关联课程代码</th>
-                                    <th>关联课程名称</th>
-                                    <th align="center">启用批次</th>
-                                   
+                                    <th align="center">状态</th>
                                     <th style="width: 80px;" align="center">操作</th>
                                 </tr>
                             </thead>
@@ -131,18 +155,26 @@
                                     </td>
                                     <td>{{framePager.pageStart+i}}</td>
                                     
+                                    
+                                   
+                                    
+                                    <td align="center">{{item.exam_year_month}}</td>
+                                    <td align="center">{{item.course_code}}</td>
+                                    <td>{{item.course_name}}</td>
                                     <td align="center">{{item.textbook_code}}</td>
                                     <td>{{item.textbook_name}}</td>
+                                    <td *ngIf="!item.file_path">{{item.textbook_outline}}</td>
+                                    <td *ngIf="item.file_path"><a href="#" (click)="downloadFile(item.id);">{{item.textbook_outline}}</a></td>
+
                                     <td>{{item.textbook_writer}}</td>
                                     <!-- <td>{{item.price}}</td> -->
                                     <td>{{item.textbook_publisher}}</td>
-                                    <td align="center">{{item.course_code}}</td>
-                                    <td>{{item.course_name}}</td>
-                                    <td align="center">{{item.exam_year_month}}</td>
+                                    <td>{{item.textbook_revision}}</td>
+                                    <td align="center" [innerHTML]="item.status | frameDict:'PublishStatus' "></td>
 
                                     <td align="center">
 
-                                        <a href="#" (click)="goEdit(editTemplateModal,'modal','modal-lg',item)"
+                                        <a href="#" (click)="goEdit(editTemplateModal,'modal','modal-bg',item)"
                                             title="编辑"><em class="fa-lg fas fa-edit mr-1"></em></a>
                                         <a href="#" (click)="delete(item)" title="删除"><em
                                                 class="fa-lg fas fa-trash mr-1" style="color:#F56D6D"></em></a>
@@ -179,12 +211,35 @@
 <div class="mt-5">
     <frame-uploader #uploader [silenceUpload]="true" [autoUpload]="true" [uploadUrl]="UPLOAD_URL"></frame-uploader>
 </div>
+<div class="mt-5">
+        <frame-uploader #uploaderFile [silenceUpload]="true" [autoUpload]="true" [uploadUrl]="UPLOADFILE_URL"></frame-uploader>
+    </div>
 
 <ng-template #editFormTemplate>
     <form [formGroup]="formModel" *ngIf="item" class="form-validate form-horizontal" novalidate="">
         <input type="hidden" class="form-control" formControlName="id" [(ngModel)]="item.id"
             [formControl]="formModel.controls['id']" />
         <div class="row mb-1">
+            <label class="col-lg-2 col-form-label text-lg-right">考试批次</label>
+            <div class="col-lg-4">
+
+                <flex-select [allowClear]="true" [(items)]="yearCodeList" [(ngModel)]="item.exam_time_id"
+                    optionValueField="id" optionTextField="examyearmonth" placeholder="请选择"
+                    formControlName="exam_time_id" width="280" noResultsFound="无数据"
+                    >
+                </flex-select>
+                <span class="text-danger"
+                *ngIf="formModel.get('exam_time_id').hasError('required') && (formModel.get('exam_time_id').dirty || formModel.get('exam_time_id').touched)">请选择考试批次</span>
+    
+            </div>
+
+            
+
+            
+        </div>
+
+        <div class="row mb-1">
+            
 
             <label class="col-lg-2 col-form-label text-lg-right">教材名称</label>
             <div class="col-lg-4">
@@ -199,7 +254,7 @@
             <label class="col-lg-2 col-form-label text-lg-right">教材代码</label>
             <div class="col-lg-4">
 
-                <input class="form-control" type="text" formControlName="textbook_code"
+                <input class="form-control" type="text" formControlName="textbook_code" placeholder="请输入课程代码加1~9"
                     [formControl]="formModel.get('textbook_code')" [(ngModel)]="item.textbook_code" maxlength="6"/>
 
                 <span class="text-danger"
@@ -207,7 +262,11 @@
                 <span class="text-danger"
                     *ngIf="formModel.controls['textbook_code'].hasError('pattern') && (formModel.controls['textbook_code'].dirty ||formModel.controls['textbook_code'].touched)">教材代码只能为字符和数字</span>
             </div>
+
+            
         </div>
+        
+
         <div class="row mb-1">
 
             <label class="col-lg-2 col-form-label text-lg-right">编著</label>
@@ -253,6 +312,51 @@
 
             </div>
         </div>
+
+        <div class="row mb-1">
+
+                <label class="col-lg-2 col-form-label text-lg-right">关联课程</label>
+                <div class="col-lg-4">
+                    <flex-select [allowClear]="true" [(items)]="courseList" [(ngModel)]="item.course_id"
+                        optionValueField="id" optionTextField="code_course_name" placeholder="请选择"
+                        formControlName="course_id" width="280" noResultsFound="无数据"
+                        
+                        >
+                    </flex-select>
+
+                   
+                    <span class="text-danger" *ngIf="formModel.get('course_id').hasError('required') && (formModel.get('course_id').dirty || formModel.get('course_id').touched)">请选择课程</span>&nbsp;&nbsp;
+
+                </div>
+
+                <label class="col-lg-2 col-form-label text-lg-right">状态</label>
+                <div class="col-lg-4">
+                    <select name="status" [(ngModel)]="item.status" class="form-control" [ngModelOptions]="{standalone: true}">
+                        <option value="0">未发布</option>
+                        <option value="1">已发布</option>
+                        
+                      </select>
+
+
+                </div>
+
+               
+               
+            </div>
+
+            <div class="row mb-1">
+                    <label class="col-lg-2 col-form-label text-lg-right">教材大纲附件</label>
+                    <div class="col-lg-8 form-inline">
+                        <button  class="btn btn-info" (click)="uploadFile()">
+                            <i class="fa fa-info-circle"> </i> 上传
+                        </button>&nbsp;&nbsp;&nbsp;&nbsp;
+                        <span *ngIf="item.file_name && !item.id">{{item.file_name}}</span>
+                        <span *ngIf="item.file_name && item.id"><a href="#" (click)="downloadFile(item.id);">{{item.file_name}}</a></span>
+                        <input type="hidden" class="form-control" [(ngModel)]="item.file_path"  formControlName="file_path" [formControl]="formModel.controls['file_path']"/>
+                    </div>
+                </div>
+
+       
         <!--
         <div class="row mb-1">
 
@@ -275,7 +379,7 @@
 </ng-template>
 
 <ng-template #editTemplateModal>
-    <div class="modal-content">
+    <div class="modal-content" style="width:1200px;">
         <div class="modal-header info-success-qm">
             <div class="pull-left">
                 <em class="fa-lg fas fa-edit "></em> 编辑页面
@@ -284,15 +388,12 @@
         </div>
 
         <!-- 1@3 -->
-        <div class="modal-body">
+        <div class="modal-body" style="width:1200px;">
 			<div [ngTemplateOutlet]="editFormTemplate"></div>
-			<div [ngTemplateOutlet]="courseTemplate"></div>
         </div>
 
         <div class="modal-footer">
-			<button class="btn btn-info" (click)="saveCourseRealate(item?item.id:null)">
-                <i class="fa fa-info-circle"> </i> 添加关联
-            </button>
+			
             <button class="btn btn-info" (click)="save()">
                 <i class="fa fa-info-circle"> </i> 保存
             </button>
@@ -346,7 +447,6 @@
                             <th>课程名称</th>
                            <!-- <td>国标代码</td>-->
                             <th align="center">学分</th>
-                            <th align="center">启用批次</th>
                             <th align="center">操作</th>
                         </tr>
                     </thead>
@@ -356,7 +456,6 @@
                             <td>{{course.course_name}}</td>
                             <!--<td>{{course.course_standard_code}}</td>-->
                             <td align="right">{{course.course_score}}</td>
-                            <td align="center">{{course.exam_year_month}}</td>
                             <td align="center">
                                 <a href="#" (click)="deleteCourse(course)" title="删除"><em
                                         class="fa-lg fas fa-trash mr-1" style="color:#F56D6D"></em></a>
@@ -400,48 +499,26 @@
                             <table class="table table-sm table-striped table-hover table-bordered bg-white">
                                 <thead>
                                     <tr>
-                                        <th>
-                                            <div class="checkbox c-checkbox">
-                                                <label>
-                                                    <input type="checkbox"
-                                                        (change)="framePager2.checkedMasterToggle($event)" />
-                                                    <span class="fa fa-check"></span>
-                                                </label>
-                                            </div>
-                                        </th>
+                                        
                                         <th align="center">课程代码</th>
                                         <th>课程名称</th>
-                                       
-                                        <th align="center" style="width: 120px;">启用批次</th>
+                                        <th align="center">学分</th>
+                                        <th style="width: 120px;" align="center">操作</th>
+
                                         <!-- <td>操作</td> -->
                                     </tr>
                                 </thead>
                                 <tbody>
                                     <tr *ngFor="let item of framePager2.getRecords(); let i = index">
-                                        <td>
-                                            <div class="checkbox c-checkbox input-group-sm">
-                                                <label>
-                                                    <input type="checkbox" [value]="item.id"
-                                                        [(checked)]="item.isChecked" [(ngModel)]="item.isChecked" />
-                                                    <span class="fa fa-check"></span>
-                                                </label>
-                                            </div>
-                                        </td>
+                                       
                                         <td align="center">{{item.course_code}}</td>
                                         <td>{{item.course_name}}</td>
+                                        <td align="right">{{item.course_score}}</td>
                                        
-                                        <td align="center">
-                                            <flex-select [allowClear]="true" [(items)]="yearCodeList" [(ngModel)]="item.exam_time_id"
-                                            optionValueField="id" optionTextField="examyearmonth" placeholder="请选择"
-                                            [ngModelOptions]="{standalone: true}" width="80" style="padding:0px;margin: 0px;" noResultsFound="无数据" (ngModelChange) ="setyearcode($event,item.id)">
-                                            </flex-select>
+                                         <td align="center">
+                                                <a href="#" (click)="saveCourseRealate(item)">关联</a>
 
-                                        </td>
-                                        <!-- <td>
-                                            <button type="button" class="btn btn-primary btn-sm" (click)="saveCourseRealate(item.id)">
-                                                <i class="fa fa-info-circle"> </i> 关联
-                                            </button>
-                                        </td> -->
+                                        </td> 
                                     </tr>
                                 </tbody>
                             </table>

+ 113 - 59
src/app/routes/hm-soft/pl/pl-textbook/pl-textbook.component.ts

@@ -19,7 +19,8 @@ export class PlTextbookComponent extends FlexTableComponent
   public query = {
     "query": "",
     "status": "",
-    "exam_time_id":""
+    "exam_time_id":"",
+    "is_unified":""
   };
 
   public syn = {
@@ -33,6 +34,8 @@ export class PlTextbookComponent extends FlexTableComponent
   yearCodeList = [];
   course: any;
   exam_time_id: any;
+
+  courseList = [];
   
   @ViewChild('framePager2')
   framePager2: FramePagerComponent;
@@ -48,15 +51,20 @@ export class PlTextbookComponent extends FlexTableComponent
   COURSE_PAGE_URL = "pl/plCourse/page.htm";
   DELETE_COURSE_URL = "pl/plTextbook/deleteCourse.htm";
   UPLOAD_URL = "pl/plTextbook/upload.htm";
+  UPLOADFILE_URL = "pl/plTextbook/uploadFile.htm";
   DOWNLOAD_URL = "pl/plTextbook/download.htm";
   ERROR_DOWNLOAD_URL = "pl/plTextbook/downloadError.htm";
   YEAR_CODE_URL = "pl/plExamTime/list.htm";
   UPDATE_BATCH_URL = "pl/plTextbook/updateBatch.htm";
   TEXTBOOK_SYNC_URL = "pl/plTextbook/synTextBook.htm";
 
+  COURSE_LIST_URL = "pl/plCourse/listCourseByExamTimeId.htm";
+
   filePath: any;//错误文件路径
   @ViewChild('uploader')
   uploader: FrameUploaderComponent;
+  @ViewChild('uploaderFile')
+  uploaderFile: FrameUploaderComponent;
 
   constructor(
     public bsModalService: BsModalService,
@@ -73,7 +81,10 @@ export class PlTextbookComponent extends FlexTableComponent
       'textbook_publisher': [null],
       'textbook_revision': [null],
       'textbook_outline': [null],
-	  'status': [null]
+      'exam_time_id': [null, Validators.required],
+      'course_id': [null, Validators.required],
+      'file_path': [null],
+      'status': [null]
     });
   }
 
@@ -81,10 +92,14 @@ export class PlTextbookComponent extends FlexTableComponent
     FrameRequest.requestArray(this.YEAR_CODE_URL, {} , (array) => {
       this.yearCodeList = array;
     });
+
+    FrameRequest.requestArray("pl/plCourse/listAll.htm",{}, async (array) => {
+      this.courseList = array;
+    });
   }
 
   async delete(item?){
-		debugger
+		
 		if(!  this.preDeleteEvent()) return;
 		//批量操作
 		if(!item){
@@ -94,15 +109,11 @@ export class PlTextbookComponent extends FlexTableComponent
 			return;
 		  }
 		}
-		AppComponent.confirm("确定要删除教材记录吗?将同步删除课程关联信息,此操作不可恢复!",()=>{
+		AppComponent.confirm("确定要删除教材吗?",()=>{
 		  let checkedArray = [];
 		  item ? checkedArray[0] = item.id: 
 				 checkedArray = this.framePager.getCheckedArray((item)=>item.id)
 		  
-		  // if(checkedArray.length === 0){
-		  //   AppComponent.alert({title:"信息提示",text:"请选择数据!"})
-		  //   return;
-		  // }
 		  FrameRequest.requestMap(this.DELETE_URL, {ids:checkedArray.join()}, () => {
 			AppComponent.GobalComponent.successMsg('数据删除成功');
 			this.aftDeleteEvent();
@@ -115,10 +126,19 @@ export class PlTextbookComponent extends FlexTableComponent
   }
 
   async preGoEditEvent(item){
-	  this.yesCourses = [];
-	  if (item) {
-		this.reload(item.id);
-	  }
+ 
+    if (!item) {
+        this.item = {};
+        this.item.status='0';
+        this.item.course_id="";
+
+        if(this.query.exam_time_id){
+          this.item.exam_time_id = this.query.exam_time_id;
+        }
+    }
+
+    
+
 	  return true;
   }
   async preSaveEvent(){
@@ -162,63 +182,24 @@ export class PlTextbookComponent extends FlexTableComponent
     this.resetPage();
   }
   //保存课程关联信息
-  saveCourseRealate(textbook_id: number, item?) {
+  saveCourseRealate(item) {
     
-    let checkedArray = this.framePager2.getCheckedArray();
-    if (!this.course) {
-      if (checkedArray.length === 0 || checkedArray.length > 1) {
-        AppComponent.alert({ title: "信息提示", text: "请选择一条数据!" })
-        return;
-      }
-    }
-
-    if(!this.exam_time_id) {
-      AppComponent.alert({ 'title': '提示', 'text': '请选择启用批次' });
+    if(this.yesCourses && this.yesCourses.length>0) {
+      AppComponent.alert({ 'title': '提示', 'text': '只允许关联一门课程' });
       return;
     } 
-   
-   
-	if (textbook_id) {
-		item ? checkedArray[0] = item.id :
-		checkedArray = this.framePager2.getCheckedArray((item) => item.id);
-		FrameRequest.request(this.ADD_COURSE_URL, { course_id: checkedArray[0], textbook_id: textbook_id, exam_time_id: this.exam_time_id}, () => {
-			AppComponent.GobalComponent.successMsg('课程关联成功');
-			this.reload(textbook_id);
-			
-		  });
-	}else{
-		for (var i = 0;i < this.yesCourses.length; i++){
-			if (this.yesCourses[i].id==checkedArray[0].id){
-				this.yesCourses.splice(i,1);
-			}
-		 }
-		 for (var i = 0;i < this.yearCodeList.length; i++){
-			if (this.yearCodeList[i].id==this.exam_time_id){
-				checkedArray[0]['exam_time_id']=this.yearCodeList[i].id;
-				checkedArray[0]['year_code']=this.yearCodeList[i].year_code;
-			}
-		 }
-		this.yesCourses.push(checkedArray[0]);
-	}
-	this.exam_time_id=null;
-
+    this.item.course_id = item.id;
+		this.yesCourses.push(item);
   }
 
   //删除关联课程
   deleteCourse(course) {
-	if (!course.textbook_id) {
-		for (var i = 0;i < this.yesCourses.length; i++){
+    this.item.course_id = "";
+    for (var i = 0;i < this.yesCourses.length; i++){
 			if (this.yesCourses[i].id==course.id){
 				this.yesCourses.splice(i,1);
 			}
-		 }
-	} else {
-		FrameRequest.request(this.DELETE_COURSE_URL, { id: course.id }, () => {
-			AppComponent.alert({ title: "信息提示", text: "删除成功!" });
-			this.reload(course.textbook_id);
-		  })
-	}
-
+     }
 
   }
   //重新加载
@@ -311,6 +292,79 @@ setyearcode(exam_time_id:any,id:any) {
       this.bsModalWin.hide();
    
   }
+
+  downloadFile(id) {
+    FrameRequest.download("pl/plTextbook/downloadFile.htm",  { id: id });
+  }
+
+
+
+  uploadFile() {
+    let obj = this.item;
+    
+    if(!this.item || !this.item.exam_time_id){
+      AppComponent.alert({ 'title': '提示', text: '请选择考试批次' });
+      return;
+    }
+
+      //上传文书
+      let param = {exam_time_id: this.item.exam_time_id};
+      this.uploaderFile.choooseFileAndUpload(param, ((ret) => {
+        if (ret.errorCode == 0) {
+          obj.file_path = ret.map.file_path;
+          obj.file_name = ret.map.file_name;
+          AppComponent.GobalComponent.successMsg("上传成功!");
+        }else if (ret.errorCode == -1) {
+         
+          AppComponent.GobalComponent.errorMsg(ret.errorMsg);
+        }
+      }));
+  }
+
+  downXls() {
+      if(!this.query.status){
+        this.query.status = "";
+      }
+      if(!this.query.exam_time_id){
+        this.query.exam_time_id = "";
+      }
+     
+      if(!this.query.is_unified){
+        this.query.is_unified = "";
+      }
+
+      let param = {
+        query: this.query.query,
+        status: this.query.status,
+        exam_time_id : this.query.exam_time_id,
+        is_unified:this.query.is_unified
+    };
+    AppComponent.GobalComponent.setLoading(true);
+    FrameRequest.download("pl/plTextbook/downxls.htm", param, ()=>{
+        AppComponent.GobalComponent.setLoading(false);
+        AppComponent.GobalComponent.successMsg("导出成功!");
+    });
+  }
+
+  
+  downXlsForUnified() {
+   
+    if(!this.query.exam_time_id){
+      AppComponent.alert({ 'title': '提示', text: '请选择考试批次' });
+      return;
+    }
+
+   
+
+    let param = {
+      exam_time_id : this.query.exam_time_id,
+  };
+  AppComponent.GobalComponent.setLoading(true);
+  FrameRequest.download("pl/plTextbook/downXlsForUnified.htm", param, ()=>{
+      AppComponent.GobalComponent.setLoading(false);
+      AppComponent.GobalComponent.successMsg("导出成功!");
+  });
+}
     
 
 }

+ 12 - 0
src/app/routes/hm-soft/pl/pl.module.ts

@@ -16,6 +16,8 @@ const routes: Routes = [
 	{ path: 'recordcancelquery', loadChildren: './pl-std-record/std-record-cancel-query/std-record-cancel-query.module#StdRecordCancelQueryModule'},
 
 	{ path: 'course', loadChildren: './pl-course/pl-course.module#PlCourseModule'},
+	{ path: 'coursePre', loadChildren: './pl-course-pre/pl-course-pre.module#PlCoursePreModule'},
+
 	{ path: 'majorapplyaudit', loadChildren: './pl-major-apply-audit/majorapplyaudit.module#MajorApplyAuditModule'},
 	{ path: 'noenrolplan', loadChildren: './no-enrol-publish-plan/no-enrol-publish-plan.module#NoEnrolPublishPlanModule'},
 	{ path: 'majoroldnewquery', loadChildren: './pl-major-old-new-query/pl-major-old-new.query.module#PlMajorOldNewComponentQueryModule'},
@@ -42,8 +44,12 @@ const routes: Routes = [
 	{ path: 'provinceplan', loadChildren: './pl-examplan/pl-province-plan/province-plan.module#ProvincePlanModule'},
 	{ path: 'majorapplyquery', loadChildren: './pl-major-apply-query/majorapplyquery.module#MajorApplyQueryModule'},
 	{ path: 'major', loadChildren: './pl-major/pl-major.module#PlMajorModule'},
+	{ path: 'majorPre', loadChildren: './pl-major-pre/pl-major-pre.module#PlMajorPreModule'},
+
 	{ path: 'examtime', loadChildren: './pl-exam-time/pl-exam-time.module#PlExamTimeModule'},
 	{ path: 'textbook', loadChildren: './pl-textbook/pl-textbook.module#PlTextbookModule'},
+	{ path: 'textbookPre', loadChildren: './pl-textbook-pre/pl-textbook-pre.module#PlTextbookPreModule'},
+
 	{ path: 'plstdrecordapply', loadChildren: './pl-std-record-apply/pl-std-record-apply.module#PlStdRecordApplyModule'},
 	{ path: 'plstdrecordapplynet', loadChildren: './pl-std-record-apply-net/pl-std-record-apply-net.module#PlStdRecordApplyNetModule'},
 
@@ -52,10 +58,16 @@ const routes: Routes = [
 
 	{ path: 'publishPlanDetail', loadChildren: './pl-examplan/pl-publish-plan-detail/publish-plan-detail.module#PublishPlanDetailModule'},
 	{ path: 'majorapply', loadChildren: './pl-major-apply/majorapply.module#MajorApplyModule'},
+	{ path: 'majorapplypro', loadChildren: './pl-major-apply-pro/majorapplypro.module#MajorApplyProModule'},
+	{ path: 'majorapplyproquery', loadChildren: './pl-major-apply-pro-query/majorapplyproquery.module#MajorApplyProQueryModule'},
+
+	
 	{ path: 'courseapply', loadChildren: './pl-course-apply/courseapply.module#CourseApplyModule'},
 	{ path: 'yearcode', loadChildren: './pl-yearcode/pl-yearcode.module#PlYearcodeModule'},
 	{ path: 'majorquery', loadChildren: './pl-major-query/pl-major.component.query.module#PlMajorComponentQueryModule'},
 	{ path: 'majorcourse', loadChildren: './pl-major-course/pl-major-course.module#PlMajorCourseModule'},
+	{ path: 'majorcoursePre', loadChildren: './pl-major-course-pre/pl-major-course-pre.module#PlMajorCoursePreModule'},
+
 	{ path: 'scorerate', loadChildren: './score-rate/score-rate.module#ScoreRateModule'},
 ]
 

+ 22 - 1
src/app/routes/hm-soft/std/std-break-discipline/std-break-discipline.add.component.html

@@ -206,6 +206,10 @@
   </div>
 </div>
 
+<div class="row">
+    <frame-uploader #uploader [silenceUpload]="true" [autoUpload]="true" [(uploadUrl)]="UPLOAD_FILE_URL"></frame-uploader>
+</div>
+
 
 <!--导入选择年度码模态窗口-->
 <ng-template #importModal>
@@ -416,6 +420,23 @@
   
         </div>
     </div>
+
+    <div class="row mb-1">
+      <label class="col-lg-2 col-form-label text-lg-right">违纪材料</label>
+      <div class="col-lg-10 col-form-label">
+          <button *ngIf="(item.audit_status && item.audit_status ==1)||!item.id" class="btn btn-info" (click)="uploadFile()">
+              <i class="fa fa-info-circle"> </i> 上传
+          </button>&nbsp;&nbsp;&nbsp;&nbsp;
+          <span *ngIf="item.file_name && !item.id">{{item.file_name}}</span>
+          <span *ngIf="item.file_name && item.id"><a href="#" (click)="downloadFile(item.id);">{{item.file_name}}</a></span>
+          <input type="hidden" class="form-control" [(ngModel)]="item.file_path"  formControlName="file_path" [formControl]="formModel.controls['file_path']"/>
+     
+
+       
+
+      </div>
+  </div>
+
   </form>
 </ng-template>
 
@@ -434,7 +455,7 @@
     </div>
 
     <div class="modal-footer">
-      <button class="btn btn-info" (click)="save()">
+      <button class="btn btn-info" (click)="save()" *ngIf="(item.audit_status && item.audit_status ==1)||!item.id">
         <i class="fa fa-info-circle"> </i> 提交审批
       </button>
       <button class="btn btn-default" (click)="this.hideModal()">

+ 37 - 3
src/app/routes/hm-soft/std/std-break-discipline/std-break-discipline.add.component.ts

@@ -37,6 +37,9 @@ export class StdBreakDisciplineAddComponent extends FlexTableComponent
 
   UPLOAD_URL = "std/stdBreakDiscipline/upload.htm";
 
+  UPLOAD_FILE_URL = "std/stdBreakDiscipline/uploadFile.htm";
+  DOWNLOAD_URL = "std/stdBreakDiscipline/downloadFile.htm";
+
   agentArray=[]
   examTimeIdArray=[]
   courseList=[]
@@ -61,7 +64,7 @@ export class StdBreakDisciplineAddComponent extends FlexTableComponent
       id: [null],
       exam_time_id: [null, Validators.compose([Validators.required])],
       std_name: [null, Validators.compose([Validators.required])],
-      cert_no: [null, Validators.compose([Validators.required,Validators.pattern(FrameValidator.pattern_en_number)])],
+      cert_no: [null, Validators.compose([Validators.required])],
       ticket_no: [null, Validators.compose([Validators.required,Validators.pattern(FrameValidator.pattern_en_number)])],
       agent_id: [null, Validators.compose([Validators.required])],
       course_code: [null, Validators.compose([Validators.required,Validators.pattern(FrameValidator.pattern_number)])],
@@ -70,13 +73,15 @@ export class StdBreakDisciplineAddComponent extends FlexTableComponent
       break_time: [null],
       stop_starttime: [null],
       stop_endtime: [null],
-      // audit_status: [null, Validators.compose([Validators.required])],
+      audit_status: [null],
       agent_remark: [null],
       prov_agent_remark: [null],
       city_agent_remark: [null],
 
       item_id:[null, Validators.compose([Validators.required])],
-      rule_id:[null, Validators.compose([Validators.required])]
+      rule_id:[null, Validators.compose([Validators.required])],
+      file_path: [null],
+      file_name: [null]
 
     });
 
@@ -283,4 +288,33 @@ export class StdBreakDisciplineAddComponent extends FlexTableComponent
    
   }
 
+   //上传申报资料
+   uploadFile() {
+
+    if (!this.item.exam_time_id) {
+      AppComponent.alert({ 'title': '提示', text: '请选择考试批次' });
+      return false;
+    }
+
+    let obj = this.item;
+    
+      //上传文书
+      let param = {exam_time_id: this.item.exam_time_id};
+      this.uploader.choooseFileAndUpload(param, ((ret) => {
+        if (ret.errorCode == 0) {
+          obj.file_path = ret.map.file_path;
+          obj.file_name = ret.map.file_name;
+          AppComponent.GobalComponent.successMsg("上传成功!");
+        }else if (ret.errorCode == -1) {
+         
+          AppComponent.GobalComponent.errorMsg(ret.errorMsg);
+        }
+      }));
+  }
+
+  //下载
+  downloadFile(id) {
+    FrameRequest.download(this.DOWNLOAD_URL,  { id: id });
+  }
+
 }

+ 8 - 0
src/app/routes/hm-soft/std/std-break-discipline/std-break-discipline.audit.component.html

@@ -371,6 +371,14 @@
           rows="5"></textarea>
       </div>
     </div>
+
+    <div class="row mb-1">
+        <label class="col-lg-2 col-form-label text-lg-right">违纪材料</label>
+        <div class="col-lg-10  col-form-label">
+            <span *ngIf="item.file_name && item.id"><a href="#" (click)="downloadFile(item.id);">{{item.file_name}}</a></span>
+        </div>
+      </div>
+
     <div class="row mb-1">
 
       <label class="col-lg-2 col-form-label text-lg-right required">区考试院</label>

+ 7 - 0
src/app/routes/hm-soft/std/std-break-discipline/std-break-discipline.audit.component.ts

@@ -32,6 +32,8 @@ export class StdBreakDisciplineAuditComponent extends FlexTableComponent
   ADD_URL = "std/stdBreakDiscipline/add.htm";
   EDIT_URL = "std/stdBreakDiscipline/edit.htm";
 
+  DOWNLOAD_URL = "std/stdBreakDiscipline/downloadFile.htm";
+
   agentArray=[]
   examTimeIdArray=[]
   courseList=[]
@@ -338,4 +340,9 @@ export class StdBreakDisciplineAuditComponent extends FlexTableComponent
      
   }
 
+    //下载
+    downloadFile(id) {
+      FrameRequest.download(this.DOWNLOAD_URL,  { id: id });
+    }
+
 }

+ 254 - 2
src/app/routes/hm-soft/std/std-break-discipline/std-break-discipline.provinceadd.component.html

@@ -156,7 +156,8 @@
                   <th>考区名称</th>
                   <th>违规事实</th>
                   <th>违规处理结果</th>
-
+                  <th style="width: 100px;" align="center">告知书</th>
+                  <th style="width: 80px;" align="center">决定书</th>
                   <th style="width: 80px;" align="center">操作</th>
                 </tr>
               </thead>
@@ -180,7 +181,12 @@
                   
                   <td>{{getItemName(item.item_id)}}</td>
                   <td>{{getRuleName(item.rule_id)}}</td>
-
+                  <td align="center">
+                    <a href="#" (click)="goQueryUploadFileForNotice(queryNoticeFileTemplateModal,item,'告知书')" title="上传告知书">告知书</a>
+                  </td>
+                  <td align="center">
+                    <a href="#" (click)="goQueryUploadFileForNotice(queryDecisionFileTemplateModal,item,'决定书')" title="上传决定书">决定书</a>
+                  </td>
                   <td align="center">
                     <!--
 	              <a href="#" *ngIf="item.optr_id>0" frameRole res="optr_manage" (click)="this.goEdit(editTemplateModal,'modal','modal-lg',item)" title="编辑"><em class="fa-lg fas fa-edit mr-1"></em></a>
@@ -388,6 +394,21 @@
         </div>
       </div>
       
+      <div class="row mb-1">
+          <label class="col-lg-2 col-form-label text-lg-right">违纪材料</label>
+          <div class="col-lg-10 col-form-label">
+              <button *ngIf="(item.audit_status && item.audit_status ==1)||!item.id" class="btn btn-info" (click)="uploadFile()">
+                  <i class="fa fa-info-circle"> </i> 上传
+              </button>&nbsp;&nbsp;&nbsp;&nbsp;
+              <span *ngIf="item.file_name && !item.id">{{item.file_name}}</span>
+              <span *ngIf="item.file_name && item.id"><a href="#" (click)="downloadFile(item.id);">{{item.file_name}}</a></span>
+              <input type="hidden" class="form-control" [(ngModel)]="item.file_path"  formControlName="file_path" [formControl]="formModel.controls['file_path']"/>
+         
+    
+           
+    
+          </div>
+      </div>
     
   </form>
 </ng-template>
@@ -416,3 +437,234 @@
     </div>
   </div>
 </ng-template>
+
+<!-- 查看告知书界面 -->
+<ng-template #queryNoticeFileTemplateModal>
+  <div class="modal-content">
+    <div class="modal-header info-success-qm">
+      <div class="pull-left">
+        <em class="fa-lg fas fa-edit "></em> 告知书
+      </div>
+     
+      <button type="button" class="close" (click)="bsModalWin.hide()">×</button>
+    </div>
+
+    <!-- 1@3 -->
+    <div class="modal-body">
+      <div [ngTemplateOutlet]="queryNoticeFileTemplate"></div>
+    </div>
+
+    <div class="modal-footer">
+        <button class="btn mr-1 btn-sm btn-primary" (click)="goUploadFile(uploadNoticeFileTemplateModal)"
+        data-toggle="tooltip" data-placement="left" title="上传告知书">
+        <i class="fa fa-upload">上传告知书</i>
+      </button>
+
+      <button class="btn btn-default" (click)="bsModalWin.hide()">
+        <i class="icon-close"> </i> 关闭
+      </button>
+    </div>
+  </div>
+</ng-template>
+
+<ng-template #queryNoticeFileTemplate>
+  <div class="container">
+
+    <div class="row" >
+      <div class="col-sm-12 ml-0">
+        <table class="table table-sm table-striped table-hover table-bordered bg-white">
+          <thead>
+            <tr>
+              <th>序号</th>
+              <th align="center">考试批次</th>
+              <th align="center">准考证号</th>
+              <th align="center">姓名</th>
+              <th align="center">身份证号</th>
+              <th  align="center">上传时间</th>
+              <th align="center">
+                  操作
+              </th>
+            </tr>
+          </thead>
+          <tbody>
+            <tr *ngFor="let item of fileNoticeList; let i = index" >
+              <td>{{i+1}} </td>
+              <td align="center">{{item.exam_year_month}}</td>
+              <td align="center">{{item.ticket_no}}</td>
+              <td align="center">{{item.std_name}}</td>
+              <td align="center">{{item.cert_no}}</td>
+
+              <td align="center">{{item.create_time}}</td>
+              <td align="center">
+                <a href="#" (click)="deleteFile(item,'告知书')" title="删除"><em
+                    class="fa-lg fas fa-trash mr-1" style="color:#F56D6D"></em></a>&nbsp;
+                    <a href="#" (click)="checkUploadFile(item,'告知书')" title="{{item.file_url}}">下载告知书</a>
+              </td>
+              
+            </tr>
+          </tbody>
+        </table>
+       
+      </div>
+      
+  
+    </div>
+
+  </div>
+</ng-template>
+
+<!-- 查看告决定书界面 -->
+<ng-template #queryDecisionFileTemplateModal>
+  <div class="modal-content">
+    <div class="modal-header info-success-qm">
+      <div class="pull-left">
+        <em class="fa-lg fas fa-edit "></em> 决定书
+      </div>
+     
+      <button type="button" class="close" (click)="bsModalWin.hide()">×</button>
+    </div>
+
+    <!-- 1@3 -->
+    <div class="modal-body">
+      <div [ngTemplateOutlet]="queryDecisionFileTemplate"></div>
+    </div>
+
+    <div class="modal-footer">
+        <button class="btn mr-1 btn-sm btn-primary" (click)="goUploadFile(uploadDecisionFileTemplateModal)"
+        data-toggle="tooltip" data-placement="left" title="上传决定书">
+        <i class="fa fa-upload">上传决定书</i>
+      </button>
+
+      <button class="btn btn-default" (click)="bsModalWin.hide()">
+        <i class="icon-close"> </i> 关闭
+      </button>
+    </div>
+  </div>
+</ng-template>
+
+<ng-template #queryDecisionFileTemplate>
+  <div class="container">
+
+    <div class="row" >
+      <div class="col-sm-12 ml-0">
+        <table class="table table-sm table-striped table-hover table-bordered bg-white">
+          <thead>
+            <tr>
+              <th>序号</th>
+              <th align="center">考试批次</th>
+              <th align="center">准考证号</th>
+              <th align="center">姓名</th>
+              <th align="center">身份证号</th>
+              <th  align="center">上传时间</th>
+              <th align="center">
+                  操作
+              </th>
+            </tr>
+          </thead>
+          <tbody>
+            <tr *ngFor="let item of fileNoticeList; let i = index" >
+              <td>{{i+1}} </td>
+              <td align="center">{{item.exam_year_month}}</td>
+              <td align="center">{{item.ticket_no}}</td>
+              <td align="center">{{item.std_name}}</td>
+              <td align="center">{{item.cert_no}}</td>
+
+              <td align="center">{{item.create_time}}</td>
+              <td align="center">
+                <a href="#" (click)="deleteFile(item,'决定书')" title="删除"><em
+                    class="fa-lg fas fa-trash mr-1" style="color:#F56D6D"></em></a>&nbsp;
+                    <a href="#" (click)="checkUploadFile(item,'决定书')" title="{{item.file_url}}">下载决定书</a>
+              </td>
+              
+            </tr>
+          </tbody>
+        </table>
+       
+      </div>
+      
+  
+    </div>
+
+  </div>
+</ng-template>
+
+<!-- 上传文件界面 -->
+<ng-template #uploadNoticeFileTemplateModal>
+  <div class="modal-content">
+    <div class="modal-header info-success-qm">
+      <div class="pull-left">
+        <em class="fa-lg fas fa-edit "></em> 上传说明
+      </div>
+      <button type="button" class="close" (click)="bsModalWin2.hide()">×</button>
+    </div>
+
+    <!-- 1@3 -->
+    <div class="modal-body">
+      <div [ngTemplateOutlet]="uploadNoticeFileTemplate"></div>
+    </div>
+
+    <div class="modal-footer">
+      <button class="btn btn-info" (click)="uploadFile('告知书')">
+        <i class="fa fa-info-circle"> </i> 上传告知书
+      </button>
+      <button class="btn btn-default" (click)="bsModalWin2.hide()">
+        <i class="icon-close"> </i> 取消
+      </button>
+    </div>
+  </div>
+</ng-template>
+
+
+
+
+<ng-template #uploadNoticeFileTemplate>
+  <div class="container">
+
+    <div class="row">
+      <div class="col-lg-12">
+        <h4>说明:</h4>
+      </div>
+    </div>
+    <div class="row">
+      <div class="col-lg-12">
+        <p>1、请上传有效的附件(如盖章等);</p>
+        <p>2、上传材料后,考生即可查看到。</p>
+      </div>
+    </div>
+
+  </div>
+</ng-template>
+
+
+<!-- 上传文件界面 -->
+<ng-template #uploadDecisionFileTemplateModal>
+  <div class="modal-content">
+    <div class="modal-header info-success-qm">
+      <div class="pull-left">
+        <em class="fa-lg fas fa-edit "></em> 上传说明
+      </div>
+      <button type="button" class="close" (click)="bsModalWin2.hide()">×</button>
+    </div>
+
+    <!-- 1@3 -->
+    <div class="modal-body">
+      <div [ngTemplateOutlet]="uploadNoticeFileTemplate"></div>
+    </div>
+
+    <div class="modal-footer">
+      <button class="btn btn-info" (click)="uploadFile('决定书')">
+        <i class="fa fa-info-circle"> </i> 上传决定书
+      </button>
+      <button class="btn btn-default" (click)="bsModalWin2.hide()">
+        <i class="icon-close"> </i> 取消
+      </button>
+    </div>
+  </div>
+</ng-template>
+
+
+
+<div class="mt-5">
+  <frame-uploader #uploaderFile [silenceUpload]="true" [autoUpload]="true" [uploadUrl]="UPLOAD_FILE_URL">
+  </frame-uploader>
+</div>

+ 83 - 2
src/app/routes/hm-soft/std/std-break-discipline/std-break-discipline.provinceadd.component.ts

@@ -16,6 +16,10 @@ import { FrameUploaderComponent } from '../../../../core/uploader/uploader.compo
 })
 export class StdBreakDisciplineProvinceAddComponent extends FlexTableComponent
   implements OnInit {
+
+  bsModalWin2 = null;
+  curr_item = null;
+
   public query = {
     std_name: "",
     cert_no: "",
@@ -37,6 +41,13 @@ export class StdBreakDisciplineProvinceAddComponent extends FlexTableComponent
 
   UPLOAD_URL = "std/stdBreakDiscipline/upload.htm";
 
+  UPLOAD_FILE_URL = "std/stdBlackList/upload.htm";
+
+  DOWNLOAD_URL = "std/stdBreakDiscipline/downloadFile.htm";
+
+
+  
+
   agentArray=[]
   item_agentArray=[]
 
@@ -48,12 +59,16 @@ export class StdBreakDisciplineProvinceAddComponent extends FlexTableComponent
 
   ruleArray = []
   itemArray = []
+  fileNoticeList = []
+  fileDecisionList = []
+
 
   filePath : String;
 
   @ViewChild('uploader')
   uploader: FrameUploaderComponent;
-  
+  @ViewChild('uploaderFile')
+  uploaderFile: FrameUploaderComponent;
   @ViewChild('course_code')
   course_code: FlexSelectComponent
 
@@ -79,7 +94,9 @@ export class StdBreakDisciplineProvinceAddComponent extends FlexTableComponent
       city_agent_remark: [null],
 
       item_id:[null],
-      rule_id:[null]
+      rule_id:[null],
+      file_path:[null],
+      file_name:[null]
 
     });
 
@@ -421,4 +438,68 @@ export class StdBreakDisciplineProvinceAddComponent extends FlexTableComponent
      
     }
 
+    goQueryUploadFileForNotice(editFormTemplateModal, item,file_type) {
+      this.curr_item = item;
+      FrameRequest.requestArray("std/stdBlackList/queryStdBreakDisciplineFile.htm", {ticket_no:item.ticket_no,exam_time_id:item.exam_time_id,file_type:file_type}, (arrary) => {
+        this.fileNoticeList = arrary;
+    });
+
+    let css = "modal-lg";
+    this.bsModalWin = this.bsModalService.show(editFormTemplateModal, { class: css });
+  }
+
+  checkUploadFile(item,file_type) {
+    
+    FrameRequest.download("std/stdBlackList/download.htm", {ticket_no:item.ticket_no,exam_time_id:item.exam_time_id,file_type:file_type});
+
+
+  }
+
+  goUploadFile(editFormTemplateModal, modalcss?) {
+    
+
+    let css = modalcss ? modalcss : "modal-lg";
+    this.bsModalWin2 = this.bsModalService.show(editFormTemplateModal, { class: css });
+  }
+
+  uploadFile(file_type) {
+    this.curr_item.file_type = file_type;
+    this.uploaderFile.choooseFileAndUpload(this.curr_item, ((ajax) => {
+      
+      if(ajax.success){
+        AppComponent.GobalComponent.successMsg('上传成功');
+        this.bsModalWin2.hide();
+        FrameRequest.requestArray("std/stdBlackList/queryStdBreakDisciplineFile.htm", {ticket_no:this.curr_item.ticket_no,exam_time_id:this.curr_item.exam_time_id,file_type:file_type}, (arrary) => {
+          this.fileNoticeList = arrary;
+          
+        });
+         
+      }else{
+        AppComponent.GobalComponent.errorMsg(ajax.errorMsg);
+        this.bsModalWin2.hide();
+      }
+     
+    }).bind(this));
+  }
+
+  deleteFile(item,file_type) {
+
+    
+    AppComponent.confirm("确定删除吗?", () => {
+     
+      FrameRequest.request("std/stdBlackList/deleteFile.htm", {ticket_no:item.ticket_no,exam_time_id:item.exam_time_id,file_type:file_type}, () => {
+        AppComponent.GobalComponent.successMsg("删除成功");
+        FrameRequest.requestArray("std/stdBlackList/queryStdBreakDisciplineFile.htm", {ticket_no:item.ticket_no,exam_time_id:item.exam_time_id,file_type:file_type}, (arrary) => {
+          this.fileNoticeList = arrary;
+        });
+  
+      });
+    });
+  }
+
+   //下载
+   downloadFile(id) {
+    FrameRequest.download(this.DOWNLOAD_URL,  { id: id });
+  }
+
 }

+ 5 - 0
src/app/routes/hm-soft/std/std_ticket/std_ticket.component.html

@@ -76,6 +76,11 @@
                   <i class="fa icon-cloud-download"></i>  批量生成准考证</button>
                   <button id="btnExport" class="btn btn-primary mr-1 btn-sm" data-toggle="tooltip" data-placement="left" title="重新批量生成准考证(已生成的准考证不再重新生成)" (click)="buildTicketAgain()">
                     <i class="fa icon-cloud-download"></i>  重新批量生成准考证</button>
+                  
+                    <button id="btnExport" class="btn btn-primary mr-1 btn-sm" data-toggle="tooltip" data-placement="left" title="机考准考证批量生成" (click)="buildTicketForComputerTest()">
+                      <i class="fa icon-cloud-download"></i>  批量生成机考准考证</button>
+                      <button id="btnExport" class="btn btn-primary mr-1 btn-sm" data-toggle="tooltip" data-placement="left" title="重新批量生成机考准考证(已生成的准考证不再重新生成)" (click)="buildTicketForComputerTestAgain()">
+                        <i class="fa icon-cloud-download"></i>  重新批量生成机考准考证</button>
             </div>
           </div>
         </div>

+ 39 - 0
src/app/routes/hm-soft/std/std_ticket/std_ticket.component.ts

@@ -170,4 +170,43 @@ export class StdTicketComponent extends FlexTableComponent implements OnInit {
       
       }
 
+      //生成机考准考证
+  buildTicketForComputerTest() {
+   
+    if(!this.query.exam_time_id){
+      AppComponent.alert({ 'title': '提示', 'text': '请选择考试批次' });
+      return;
+    }
+    
+      AppComponent.confirm("确定批量生成机考准考证吗?",()=>{
+        AppComponent.GobalComponent.setLoading(true);
+        FrameRequest.requestMap("std/stdTicket/buildTicketForComputerTest.htm",  {exam_time_id:this.query.exam_time_id,again:false}, ()=>{
+          AppComponent.GobalComponent.setLoading(false);
+          AppComponent.GobalComponent.successMsg("机考准考证批量生成提交成功!");
+        });
+    });
+     
+      
+      }
+  
+  
+      //重新生成准考证
+    buildTicketForComputerTestAgain() {
+     
+      if(!this.query.exam_time_id){
+        AppComponent.alert({ 'title': '提示', 'text': '请选择考试批次' });
+        return;
+      }
+
+      AppComponent.confirm("确定重新批量生成机考准考证吗(已生成的准考证将不再重新生成)?",()=>{
+        AppComponent.GobalComponent.setLoading(true);
+        FrameRequest.requestMap("std/stdTicket/buildTicketForComputerTest.htm",  {exam_time_id:this.query.exam_time_id,again:true}, ()=>{
+          AppComponent.GobalComponent.setLoading(false);
+          AppComponent.GobalComponent.successMsg("重新批量生成机考准考证提交成功!");
+        });
+    });
+       
+        
+        }
+
 }

+ 16 - 1
src/app/routes/hm-soft/sys/sys-app-news/sys-app-news.component.html

@@ -198,6 +198,21 @@
         </div>
       </div>
     </div>
+
+    <div class="row mb-1">
+
+      <label class="col-lg-2 col-form-label text-lg-right">置顶</label>
+      <div class="col-lg-8">
+        <div class="input-group">
+            <select name="topup" [(ngModel)]="item.topup" class="form-control" [ngModelOptions]="{standalone: true}">
+                <option value="0">否</option>
+                <option value="1">是</option>
+                
+              </select>
+
+        </div>
+      </div>
+    </div>
     
 
   </form>
@@ -214,7 +229,7 @@
 </ng-template>
 
 <ng-template #editTemplateModal>
-  <div class="modal-content" style="width:1000px;height: 650px;">
+  <div class="modal-content" style="width:1000px;height: 700px;">
     <div class="modal-header info-success-qm">
       <div class="pull-left">
         <em class="fa-lg fas fa-edit "></em> 编辑页面

+ 3 - 1
src/app/routes/hm-soft/sys/sys-app-news/sys-app-news.component.ts

@@ -40,7 +40,8 @@ export class SysAppNewsComponent extends FlexTableComponent implements OnInit {
     author_name: "",
     published_at: "",
     content:"",
-    more_url:""
+    more_url:"",
+    topup:""
   };
 
   QUERY_URL = "sys/sysAppNews/page.htm";
@@ -60,6 +61,7 @@ export class SysAppNewsComponent extends FlexTableComponent implements OnInit {
       author_name: [null, Validators.compose([Validators.required])],
       published_at: [null, Validators.compose([Validators.required])],
       more_url: [null],
+      topup: [null],
     });
   }
 

+ 4 - 3
src/app/routes/home/home/home.component.html

@@ -1,6 +1,6 @@
 
 <div class="home-container">
-    <input type="file" #fileInput (click)="shouModalWin(modifyModal,'modal-lg');" style="display: none">
+    <input type="text" #fileInput (click)="shouModalWin(modifyModal,'modal-lg');" style="display: none">
     
     <div class="g-doc m-artcle-list"  style="margin-top:0px;padding-top:0px;margin-bottom:10px;padding-bottom:0px;margin-left:0px;padding-left:0px;">
    
@@ -16,6 +16,7 @@
                 <a *ngIf="item.more_url" [href]="item.more_url" target="_blank" class="x" style="font-size:14px;">{{item.title}}</a>
                 <a *ngIf="!item.more_url" href="http://www.gxeea.cn/zxks/tzgg.htm" target="_blank" class="x" style="font-size:14px;">{{item.title}}</a>
                 <img src="assets/img/new.png" *ngIf="item.is_new == 1 " style="margin: 0;padding: 0;vertical-align: top;width:29px;height:12px;"/>
+                <img src="assets/img/top.png" *ngIf="item.is_new != 1 && item.topup==1" style="margin: 0;padding: 0;vertical-align: top;width:36px;height:16px;"/>
                  <span>{{formatDate(item.published_at,'yyyy-MM-dd')}}</span>
               </li>
        
@@ -87,7 +88,7 @@
               <div class="row mb-1">
                 <label class="col-lg-3 col-form-label text-lg-right required">新密码:</label>
                 <div class="col-lg-9">
-                  <input class="form-control" type="password" formControlName="new_password" [formControl]="formModel.get('new_password')" placeholder="密码中必须包含字母、数字、特殊字符至少8个字符!"
+                  <input class="form-control" type="password" formControlName="new_password" [formControl]="formModel.get('new_password')" placeholder="密码中必须包含字母、数字、特殊字符至少10个字符!"
                     [(ngModel)]="item.new_password"  style="width: 400px;"/>
 
                   <span class="text-danger" *ngIf="formModel.get('new_password').hasError('required') && (formModel.get('new_password').dirty || formModel.get('new_password').touched)">请输入新密码</span>
@@ -97,7 +98,7 @@
               <div class="row mb-1">
                   <label class="col-lg-3 col-form-label text-lg-right required">新密码确定:</label>
                   <div class="col-lg-9">
-                      <input class="form-control" type="password" formControlName="new_password_confirm" [formControl]="formModel.get('new_password_confirm')" placeholder="密码中必须包含字母、数字、特殊字符至少8个字符!"
+                      <input class="form-control" type="password" formControlName="new_password_confirm" [formControl]="formModel.get('new_password_confirm')" placeholder="密码中必须包含字母、数字、特殊字符至少10个字符!"
                       [(ngModel)]="item.new_password_confirm"  style="width: 400px;"/>
                    
                     <span class="text-danger" *ngIf="formModel.get('new_password_confirm').hasError('required') && (formModel.get('new_password_confirm').dirty || formModel.get('new_password_confirm').touched)">请输入新密码</span>

+ 3 - 3
src/app/routes/home/home/home.component.ts

@@ -40,7 +40,7 @@ export class HomeComponent extends FlexTableComponent implements OnInit {
 
     ngOnInit() {
 
-      FrameRequest.requestArray("sys/sysAppNews/pageForHome.htm", {start:0,limit:5}, (array) => {
+      FrameRequest.requestArray("sys/sysAppNews/pageForHome.htm", {start:0,limit:8}, (array) => {
         
         if (array) {
          
@@ -117,9 +117,9 @@ export class HomeComponent extends FlexTableComponent implements OnInit {
           AppComponent.alert({ 'title': '提示', 'text': '两次密码不一致,请重新输入!' });
           return;
         }
-        var regex = new RegExp('(?=.*[0-9])(?=.*[a-zA-Z])(?=.*[^a-zA-Z0-9]).{8,30}');
+        var regex = new RegExp('(?=.*[0-9])(?=.*[a-zA-Z])(?=.*[^a-zA-Z0-9]).{10,30}');
         if (!regex.test(this.item.new_password)) {
-          AppComponent.alert({ 'title': '提示', 'text': '密码中必须包含字母、数字、特殊字符至少8个字符!' });
+          AppComponent.alert({ 'title': '提示', 'text': '密码中必须包含字母、数字、特殊字符至少10个字符!' });
           return;
         }
          

BIN
src/assets/img/top.png