ソースを参照

修复部分问题

warrior 1 ヶ月 前
コミット
7587825e87

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

@@ -31,7 +31,7 @@
     [nzLoading]="loading"
     nzSize="middle"
     [nzFrontPagination]="false"
-    [nzScroll]="{ x: (maxWidth || '1200') + 'px', y: '580px' }"
+    [nzScroll]="{ x: maxWidth + 'px', y: maxHeight + 'px' }"
     nzTableLayout="fixed"
     [nzPageSizeOptions]="[10, 20, 30, 40, 50]"
     nzShowSizeChanger

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

@@ -44,7 +44,8 @@ export class TextbookComponent implements OnInit {
   @Input('limit') limit: number = 10;
   pageIndex: number = 1;
 
-  @Input('maxWidth') maxWidth: any; //最大宽度
+  @Input('maxWidth') maxWidth: number = 1200; //最大宽度
+  @Input('maxHeight') maxHeight: number = 580; //最大宽度
   @Input('depart') depart: any; //指定申报单位
   @Input('recommend') recommend: any; //是否推荐
   @Input('uid') uid: string = ''; //个人空间

+ 48 - 14
projects/textbook/src/modules/common/textbook-details/textbook-details.component.html

@@ -71,17 +71,15 @@
             <div class="row">
               <div class="label">教材所属学科专业类</div>
               <div class="value">
-                {{ textBook?.discipline?.code }} {{
-                  textBook?.discipline?.name
-                }}
+                {{ textBook?.discipline?.code }}
+                {{ textBook?.discipline?.name }}
               </div>
             </div>
             <div class="row">
               <div class="label">教材应用对象及所属学科专业类</div>
               <div class="value">
-                {{ textBook?.majorPoniter?.code }} {{
-                  textBook?.majorPoniter?.name
-                }}
+                {{ textBook?.majorPoniter?.code }}
+                {{ textBook?.majorPoniter?.name }}
               </div>
             </div>
             <div class="row">
@@ -120,7 +118,10 @@
                   <div class="label">第一主编(作者)单位</div>
                   <div class="value">{{ volume?.unit }}</div>
                 </div>
-
+                <div class="row">
+                  <div class="label">第一主编(作者)单位类型</div>
+                  <div class="value">{{ volume?.unitType }}</div>
+                </div>
                 <div class="row">
                   <div class="label">教材主要语种类型</div>
                   <div class="value">{{ volume?.lang }}</div>
@@ -297,11 +298,26 @@
                       <td nzEllipsis>
                         {{ data.title }}
                       </td>
-                      <td nzEllipsis>
+                      <td nzEllipsis nz-popover
+                      [nzPopoverContent]="contentTemplateMobile">
                         {{ data.mobile }}
+                        <ng-template #contentTemplateMobile>
+                          <div style="max-width: 400px">
+                            {{ data.mobile }}
+                          </div>
+                        </ng-template>
                       </td>
-                      <td nzEllipsis>
+                      <td
+                        nzEllipsis
+                        nz-popover
+                        [nzPopoverContent]="contentTemplateEmail"
+                      >
                         {{ data.email }}
+                        <ng-template #contentTemplateEmail>
+                          <div style="max-width: 400px">
+                            {{ data.email }}
+                          </div>
+                        </ng-template>
                       </td>
                       <td nzEllipsis>
                         {{ data.work }}
@@ -462,7 +478,7 @@
             <div class="row">
               <div class="label">教材作者诚信承诺</div>
               <div class="value">
-                <span style="color: #3e49b3;">{{ textBook?.accept }}</span>
+                <span style="color: #3e49b3">{{ textBook?.accept }}</span>
               </div>
             </div>
             <!-- <div class="text-tips">教材作者诚信承诺</div>
@@ -566,11 +582,29 @@
                       <td nzEllipsis>
                         {{ data.title }}
                       </td>
-                      <td nzEllipsis>
+                      <td
+                        nzEllipsis
+                        nz-popover
+                        [nzPopoverContent]="contentTemplateMobile"
+                      >
                         {{ data.mobile }}
+                        <ng-template #contentTemplateMobile>
+                          <div style="max-width: 400px">
+                            {{ data.mobile }}
+                          </div>
+                        </ng-template>
                       </td>
-                      <td nzEllipsis>
+                      <td
+                        nzEllipsis
+                        nz-popover
+                        [nzPopoverContent]="contentTemplateEmail"
+                      >
                         {{ data.email }}
+                        <ng-template #contentTemplateEmail>
+                          <div style="max-width: 400px">
+                            {{ data.email }}
+                          </div>
+                        </ng-template>
                       </td>
                       <td nzEllipsis>
                         {{ data.work }}
@@ -619,7 +653,7 @@
               <div class="label">版权页截图</div>
               <div class="value">
                 @if (textBook?.copyrightImgUrl) {
-                  <a (click)="openFile(textBook?.copyrightImgUrl)">截图文件</a>
+                <a (click)="openFile(textBook?.copyrightImgUrl)">截图文件</a>
                 }
               </div>
             </div>
@@ -627,7 +661,7 @@
               <div class="label">中国版本图书馆 CIP 查询截图</div>
               <div class="value">
                 @if (textBook?.CIPImgUrl) {
-                  <a (click)="openFile(textBook?.CIPImgUrl)">查询截图</a>
+                <a (click)="openFile(textBook?.CIPImgUrl)">查询截图</a>
                 }
               </div>
             </div>

+ 2 - 0
projects/textbook/src/modules/common/textbook-details/textbook-details.component.ts

@@ -12,6 +12,7 @@ import { NzTabsModule } from 'ng-zorro-antd/tabs';
 import { NzTableModule } from 'ng-zorro-antd/table';
 import { textbookServer } from '../../../services/textbook';
 import * as compute from '../../../services/compute';
+import { NzPopoverModule } from 'ng-zorro-antd/popover';
 
 @Component({
   selector: 'app-textbook-details',
@@ -24,6 +25,7 @@ import * as compute from '../../../services/compute';
     CommonModule,
     NzTabsModule,
     NzTableModule,
+    NzPopoverModule,
   ],
   standalone: true,
   templateUrl: './textbook-details.component.html',

+ 1 - 0
projects/textbook/src/modules/login/account-info/account-info.component.ts

@@ -146,6 +146,7 @@ export class AccountInfoComponent implements OnInit {
     let query = new Parse.Query('Department');
     query.equalTo('parent', parent?.id);
     query.select('name', 'branch');
+    query.notEqualTo('isDeleted', true);
     query.limit(100);
     val && query.contains('name', val);
     let r = await query.find();

+ 8 - 5
projects/textbook/src/modules/nav-admin/user-edit/user-edit.component.ts

@@ -148,7 +148,9 @@ export class UserEditComponent implements OnInit {
           node: await this.tbookSer.formatNode(this.user.get('department')?.id),
         };
       }
-      await this.getUnitTypes();
+      if (this.unitTypes.length == 0) {
+        await this.getUnitTypes();
+      }
       let arr = ['教师', '评审专家', '高校联系人'];
       if (this.tbookSer.profile.identity == '国家级管理员') {
         this.edit = true;
@@ -261,9 +263,9 @@ export class UserEditComponent implements OnInit {
     }
     this.depTitle = this.userDataJson.department?.name;
     this.radio = this.userDataJson.department?.id;
-    if (this.unitTypes.length == 0) {
-      await this.getUnitTypes();
-    }
+    // if (this.unitTypes.length == 0) {
+    //   await this.getUnitTypes();
+    // }
     this.parentMap = await this.tbookSer.formatNode(
       this.user?.get('department')?.id
     );
@@ -346,6 +348,7 @@ export class UserEditComponent implements OnInit {
   //选择部门
   async onCheckedDepart(e: any, checked?: boolean) {
     console.log(e, checked);
+    this.radio = e.key;
     this.userDataJson.department = null;
     this.depTitle = '';
     this.parentMap = await this.tbookSer.formatNode(e.id);
@@ -380,7 +383,7 @@ export class UserEditComponent implements OnInit {
     };
     this.depTitle = e.title;
     console.log(this.depTitle);
-    this.radio = e.key;
+    // this.radio = e.key;
     if (this.tbookSer.profile.identity == '国家级管理员') {
       this.userType = this.unitTypes.some((item) => e.parent == item.id)
         ? !e.type

+ 1 - 0
projects/textbook/src/modules/nav-province-contact/submitted/export-list/export-list.component.html

@@ -10,6 +10,7 @@
     [recommend]="true"
     [filterObj]="filterObj"
     [eduProcess]="eduProcess"
+    [maxHeight]="420"
   ></app-textbook>
   }
 </div>