Browse Source

新增教材专业类型

cehn 6 months ago
parent
commit
13a0889737

+ 14 - 5
projects/textbook/src/app/textbook/textbook.component.html

@@ -63,7 +63,7 @@
         >
           主要语种类型
         </th>
-        <th
+        <!-- <th
           nzEllipsis
           nzWidth="180px"
           [nzShowFilter]="true"
@@ -71,6 +71,15 @@
           (nzFilterChange)="listOfColumns.majorPoniter.onChange($event)"
         >
           所属学科专业类
+        </th> -->
+        <th
+          nzEllipsis
+          nzWidth="180px"
+          [nzShowFilter]="true"
+          [nzFilters]="listOfColumns.discipline.listOfFilter"
+          (nzFilterChange)="listOfColumns.discipline.onChange($event)"
+        >
+          教材所属学科专业类
         </th>
         <th
           nzEllipsis
@@ -214,16 +223,16 @@
         </td>
         <td nzEllipsis nz-popover [nzPopoverContent]="contentTemplatemajor">
           {{
-            (data?.get("majorPoniter")?.code || "") +
+            (data?.get("discipline")?.code || "") +
               "/" +
-              (data?.get("majorPoniter")?.name || "")
+              (data?.get("discipline")?.name || "")
           }}
           <ng-template #contentTemplatemajor>
             <div style="max-width: 400px">
               {{
-                (data?.get("majorPoniter")?.code || "") +
+                (data?.get("discipline")?.code || "") +
                   "/" +
-                  (data?.get("majorPoniter")?.name || "")
+                  (data?.get("discipline")?.name || "")
               }}
             </div>
           </ng-template>

+ 22 - 2
projects/textbook/src/app/textbook/textbook.component.ts

@@ -15,6 +15,7 @@ import { NzPopoverModule } from 'ng-zorro-antd/popover';
 interface filter {
   lang: any;
   majorPoniter: any;
+  discipline:any,
   editionUnit: any;
   approval: any;
   carrierShape: any;
@@ -103,6 +104,14 @@ export class TextbookComponent implements OnInit {
         this.onFilter();
       },
     },
+    discipline: {
+      listOfFilter: [],
+      onChange: (data: any) => {
+        console.log(data);
+        this.filters.discipline.value = data;
+        this.onFilter();
+      },
+    },
     editionUnit: {
       listOfFilter: [],
       onChange: (data: any) => {
@@ -194,6 +203,7 @@ export class TextbookComponent implements OnInit {
   filters: filter | any = {
     lang: { type: 'EduTextbookVolume', value: [] },
     majorPoniter: { type: 'EduTextbook', value: [] },
+    discipline: { type: 'EduTextbook', value: [] },
     editionUnit: { type: 'EduTextbookVolume', value: [] },
     approval: { type: 'EduTextbook', value: [] },
     carrierShape: { type: 'EduTextbookVolume', value: [] },
@@ -251,7 +261,12 @@ export class TextbookComponent implements OnInit {
         this.manage = true;
       }
       if (this.filterObj.showMore) {
-        this.listOfColumns.majorPoniter.listOfFilter = major.majors.options.map(
+        // this.listOfColumns.majorPoniter.listOfFilter = major.majors.options.map(
+        //   (item) => {
+        //     return { text: item.name, value: item };
+        //   }
+        // );
+        this.listOfColumns.discipline.listOfFilter = major.majors.options.map(
           (item) => {
             return { text: item.name, value: item };
           }
@@ -963,7 +978,7 @@ export class TextbookComponent implements OnInit {
                   <th colspan="3" style="font-size: 12px;font-family: '黑体';text-align: left;">${r?.get(
                     'name'
                   )}</th>
-                  <th></th><th></th><th></th>
+                  <th></th><th></th><th></th><th></th>
               </tr>
               <tr>
                   <th></th><th></th><th></th><th></th><th></th>
@@ -990,6 +1005,7 @@ export class TextbookComponent implements OnInit {
               <th>序号</th>
               <th>申报编号</th>
               <th>申报教材名称</th>
+              <th>教材所属专业类</th>
               <th>第一主编/作者</th>
               <th>第一主编(作者)单位</th>
               <th>申报类型</th>
@@ -1016,6 +1032,10 @@ export class TextbookComponent implements OnInit {
         _body += ` &nbsp;${data[row].get('title') || '-'}`;
         _body += '</td>';
 
+        _body += '<td>';
+        _body += ` &nbsp;${(data[row].get("discipline")?.code || "") + '/' + (data[row]?.get("discipline")?.name || "")}`;
+        _body += '</td>';
+
         _body += '<td>';
         _body += `${this.fromatFiled(data[row]?.get('childrens'), 'author')}`;
         _body += '</td>';