Browse Source

组织管理&注册单位选择

warrior 9 months ago
parent
commit
1d3cef90b5
31 changed files with 858 additions and 190 deletions
  1. 9 8
      projects/textbook/src/app/app.routes.ts
  2. 4 4
      projects/textbook/src/app/comp-manage/comp-manage.component.html
  3. 1 0
      projects/textbook/src/app/comp-manage/comp-manage.component.scss
  4. 65 70
      projects/textbook/src/app/comp-manage/comp-manage.component.ts
  5. 1 1
      projects/textbook/src/app/comp-table/comp-table-list/comp-table-list.component.scss
  6. 6 2
      projects/textbook/src/index.html
  7. 5 5
      projects/textbook/src/modules/login/account-info/account-info.component.html
  8. 2 2
      projects/textbook/src/modules/login/account-info/account-info.component.scss
  9. 41 37
      projects/textbook/src/modules/login/account-info/account-info.component.ts
  10. 112 8
      projects/textbook/src/modules/nav-admin/page-role/page-role.component.html
  11. 21 0
      projects/textbook/src/modules/nav-admin/page-role/page-role.component.scss
  12. 148 20
      projects/textbook/src/modules/nav-admin/page-role/page-role.component.ts
  13. 8 8
      projects/textbook/src/modules/nav-admin/user-edit/user-edit.component.html
  14. 11 0
      projects/textbook/src/modules/nav-province-contact/modules.routes.ts
  15. 35 0
      projects/textbook/src/modules/nav-province-contact/page-collection/page-collection.component.html
  16. 10 0
      projects/textbook/src/modules/nav-province-contact/page-collection/page-collection.component.scss
  17. 22 0
      projects/textbook/src/modules/nav-province-contact/page-collection/page-collection.component.spec.ts
  18. 61 0
      projects/textbook/src/modules/nav-province-contact/page-collection/page-collection.component.ts
  19. 55 0
      projects/textbook/src/modules/nav-province-contact/page-process/page-process.component.html
  20. 30 0
      projects/textbook/src/modules/nav-province-contact/page-process/page-process.component.scss
  21. 24 0
      projects/textbook/src/modules/nav-province-contact/page-process/page-process.component.spec.ts
  22. 67 0
      projects/textbook/src/modules/nav-province-contact/page-process/page-process.component.ts
  23. 14 0
      projects/textbook/src/modules/nav-province-contact/page-textbook/page-textbook.component.html
  24. 0 0
      projects/textbook/src/modules/nav-province-contact/page-textbook/page-textbook.component.scss
  25. 22 0
      projects/textbook/src/modules/nav-province-contact/page-textbook/page-textbook.component.spec.ts
  26. 51 0
      projects/textbook/src/modules/nav-province-contact/page-textbook/page-textbook.component.ts
  27. 11 4
      projects/textbook/src/modules/textbook/page-home/header/header.component.html
  28. 1 1
      projects/textbook/src/modules/textbook/page-home/header/header.component.scss
  29. 2 0
      projects/textbook/src/modules/textbook/page-home/header/header.component.ts
  30. 14 13
      projects/textbook/src/modules/textbook/page-home/page-home.component.html
  31. 5 7
      projects/textbook/src/services/auth.service.ts

+ 9 - 8
projects/textbook/src/app/app.routes.ts

@@ -20,20 +20,21 @@ export const routes: Routes = [
     canActivate: mapToCanActivate([AuthGuard]),
     loadChildren: () =>import('../modules/nav-admin/modules.routes').then((mod) => mod.NavAdminRoutingModule),
   },
+
   {
-    path: 'nav-province-submit',//省级教育行政部门
-    component: CompManageComponent,
-    canActivate: mapToCanActivate([AuthGuard]),
-    loadChildren: () =>import('../modules/nav-province-submit/modules.routes').then((mod) => mod.NavProRoutingModule),
-  },
-  {
-    path: 'nav-province-contact',//中央部门所属高校联系人、部省合建高校联系人、出版单位联系人、省属高校流程管理员
+    path: 'nav-province-contact',//报送联系人:中央部门所属高校联系人、部省合建高校联系人、出版单位联系人、省属高校流程管理员
     component: CompManageComponent,
     canActivate: mapToCanActivate([AuthGuard]),
     loadChildren: () =>import('../modules/nav-province-contact/modules.routes').then((mod) => mod.NavProContactRoutingModule),
   },
+  // {
+  //   path: 'nav-province-submit',//省级教育行政部门
+  //   component: CompManageComponent,
+  //   canActivate: mapToCanActivate([AuthGuard]),
+  //   loadChildren: () =>import('../modules/nav-province-submit/modules.routes').then((mod) => mod.NavProRoutingModule),
+  // },
   {
-    path: 'nav-province-school-contact', //省属高校联系人
+    path: 'nav-province-school-contact', //高校联系人
     component: CompManageComponent,
     canActivate: mapToCanActivate([AuthGuard]),
     loadChildren: () =>import('../modules/nav-province-school-contact/modules.routes').then((mod) => mod.NavProSchoolRoutingModule),

+ 4 - 4
projects/textbook/src/app/comp-manage/comp-manage.component.html

@@ -1,12 +1,12 @@
 <div class="page">
   <div class="content-left" [style.width]="isCollapsed ? '' : '248px'">
     <div class="btn-menu">
-      <button mat-icon-button (click)="toggleCollapsed()" aria-label="LogOut" style="margin-right: 4px;">
+      <button mat-icon-button (click)="toggleCollapsed()" aria-label="LogOut" style="margin-right: 12px;">
         <mat-icon
         svgIcon="menu"
         ></mat-icon>
       </button>
-      {{ isCollapsed ? "" : "教材遴选系统" }}
+      {{ isCollapsed ? "" : "“十四五”高等教育国家规划教材申报系统" }}
     </div>
 
     <ul
@@ -17,7 +17,7 @@
     >
       @for (item of optionsMap[textbook.profile?.identity]; track item.id;let index = $index) { @if(item.child)
       {
-      <li nz-submenu [nzTitle]="item.name" nzIcon="api" [nzOpen]="true">
+      <li nz-submenu [nzTitle]="item.name" nzIcon="project" [nzOpen]="true">
         <ul>
           @for (child of item.child; track child.id;let idx = $index) {
           <li
@@ -32,7 +32,7 @@
       </li>
       } @else {
       <li nz-menu-item (click)="toUrl(item)" [nzSelected]="active == item.id">
-        <span nz-icon nzType="home" nzTheme="outline"></span>
+        <span nz-icon nzType="project" nzTheme="outline"></span>
         <span>{{ item.name }}</span>
       </li>
       } }

+ 1 - 0
projects/textbook/src/app/comp-manage/comp-manage.component.scss

@@ -16,6 +16,7 @@
       padding: 10px;
       display: flex;
       align-items: center;
+      justify-content: center;
     }
     .left-fonter{
       width: 248px;

+ 65 - 70
projects/textbook/src/app/comp-manage/comp-manage.component.ts

@@ -25,22 +25,22 @@ export class CompManageComponent implements OnInit {
   `
   optionsMap: any = {
     "国家级管理员":[
-      // {
-      //   name:'教材管理',
-      //   id:'1',
-      //   child:[
-      //     {
-      //       name:'报送合集',
-      //       path:"/nav-admin/manage/collection",
-      //       id:'1-1',
-      //     },
-      //     {
-      //       name:'全部教材',
-      //       path:'/nav-admin/manage/allcollection',
-      //       id:'1-2',
-      //     },
-      //   ]
-      // },
+      {
+        name:'教材管理',
+        id:'1',
+        child:[
+          {
+            name:'报送合集',
+            path:"/nav-admin/manage/collection",
+            id:'1-1',
+          },
+          {
+            name:'全部教材',
+            path:'/nav-admin/manage/allcollection',
+            id:'1-2',
+          },
+        ]
+      },
       {
         name:'用户管理',
         id:'2',
@@ -50,11 +50,11 @@ export class CompManageComponent implements OnInit {
             path:"/nav-admin/manage/user",
             id:'2-1',
           },
-          // {
-          //   name:'组织管理',
-          //   path:"/nav-admin/manage/role",
-          //   id:'2-3',
-          // },
+          {
+            name:'组织管理',
+            path:"/nav-admin/manage/role",
+            id:'2-3',
+          },
         ]
       },
       // {
@@ -78,58 +78,53 @@ export class CompManageComponent implements OnInit {
     ],
     "报送联系人":[
       {
-        name:'省内合集',
+        name:'教材管理',
+        id:'1',
+        child:[
+          {
+            name:'报送合集',
+            path:'/nav-province-contact/manage/collection',
+            id:'1-1',
+          },
+          {
+            name:'全部教材',
+            path:"/nav-province-contact/manage/textbook",
+            id:'1-2',
+          },
+        ]
+      },
+    ],
+    "高校联系人":[
+      {
+        name:'教材管理',
         id:'1',
+        child:[
+          {
+            name:'报送合集',
+            path:'/nav-province-school-contact/manage/collection',
+            id:'1-1',
+          },
+        ]
       },
+      {
+        name:'用户管理',
+        id:'2',
+        child:[
+          {
+            name:'用户列表',
+            id:'2-1',
+          },
+          {
+            name:'用户组管理',
+            id:'2-2',
+          },
+          {
+            name:'邀请注册',
+            id:'2-3',
+          },
+        ]
+      }
     ],
-    // "合集管理员":[
-    //   {
-    //     name:'报送流程',
-    //     id:'1',
-    //   },
-    //   {
-    //     name:'用户管理',
-    //     id:'2',
-    //     child:[
-    //       {
-    //         name:'用户列表',
-    //         id:'2-1',
-    //       },
-    //       {
-    //         name:'用户组管理',
-    //         id:'2-2',
-    //       },
-    //       {
-    //         name:'邀请注册',
-    //         id:'2-3',
-    //       },
-    //     ]
-    //   }
-    // ],
-    // "省属高校联系人":[
-    //   {
-    //     name:'校内空间',
-    //     id:'1',
-    //   },
-    //   {
-    //     name:'用户管理',
-    //     id:'2',
-    //     child:[
-    //       {
-    //         name:'邀请注册',
-    //         id:'2-1',
-    //       },
-    //       {
-    //         name:'用户列表',
-    //         id:'2-2',
-    //       },
-    //     ]
-    //   },
-    //   {
-    //     name:'个人信息',
-    //     id:'3',
-    //   },
-    // ],
     "评审专家":[
       {
         name:'报送流程',

+ 1 - 1
projects/textbook/src/app/comp-table/comp-table-list/comp-table-list.component.scss

@@ -38,7 +38,7 @@ nz-table{
     justify-content: center;
     align-items: center;
     height: 100%;
-    background: #215ae5;
+    background: #C6233F;
     width: 100px;
     font-size: 12px;
     border-top-left-radius: 4px;

+ 6 - 2
projects/textbook/src/index.html

@@ -24,11 +24,15 @@
     border-radius: 10px;
     -webkit-box-shadow: inset 0 0 5px #b62749;
     background: #b62749;
+    /* -webkit-box-shadow: inset 0 0 5px #e6e6e6;
+    background: #e6e6e6; */
   }
   *::-webkit-scrollbar-track {
-    -webkit-box-shadow: inset 0 0 5px #f4cbcd;
     border-radius: 10px;
-    background: #f5f5f5;
+    /* -webkit-box-shadow: inset 0 0 5px #f4cbcd;
+    background: #f5f5f5; */
+    -webkit-box-shadow: inset 0 0 5px #ffffff00;
+    background: #ffffff00;
   }
 </style>
 <body class="mat-typography">

+ 5 - 5
projects/textbook/src/modules/login/account-info/account-info.component.html

@@ -29,7 +29,7 @@
     </div>
     完善账号信息
     <div class="tips">
-      欢迎使用教材遴选系统 ,为了激活账号使用权限,请先完善您的资料信息。
+      欢迎使用“十四五”高等教育国家规划教材申报系统 ,为了激活账号使用权限,请先完善您的资料信息。
     </div>
   </div>
   <div class="form">
@@ -139,9 +139,9 @@
             formControlName="companyType"
             (ngModelChange)="provinceChange('', true)"
           >
-            @for(item of unitTypes; track item;let index = $index){
-            <nz-option nzCustomContent [nzValue]="item" [nzLabel]="item">{{
-              item
+            @for(item of unitTypes; track item.name;let index = $index){
+            <nz-option nzCustomContent [nzValue]="item.name" [nzLabel]="item.name">{{
+              item.name
             }}</nz-option>
             }
           </nz-select>
@@ -205,7 +205,7 @@
         </nz-input-group>
       </nz-form-item> -->
       <nz-form-item>
-        <nz-form-label class="label" [nzNoColon]="true"
+        <nz-form-label class="label" [nzNoColon]="true" nzRequired
           >单位联系人认证文件</nz-form-label
         >
         <nz-input-group>

+ 2 - 2
projects/textbook/src/modules/login/account-info/account-info.component.scss

@@ -36,9 +36,9 @@
     background: #b62749;
   }
   .account-form::-webkit-scrollbar-track { //滚动条里面轨道
-    -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.1);
+    -webkit-box-shadow: inset 0 0 5px #ffffff00;
     border-radius: 10px;
-    background: #f5f5f5;
+    background: #ffffff00;
   }
 
   nz-form-item {

+ 41 - 37
projects/textbook/src/modules/login/account-info/account-info.component.ts

@@ -42,7 +42,7 @@ export class AccountInfoComponent implements OnInit {
     email: FormControl<string>; //电子邮箱
     telephone: FormControl<string>; //办公电话
     province: FormControl<string>; //省份
-    identity:FormControl<string>; //人员类型
+    identity: FormControl<string>; //人员类型
     companyType: FormControl<string>; //单位类型
     // idcard: FormControl<string>; //身份证号
     departmentName: FormControl<string>; //所在部门
@@ -59,15 +59,13 @@ export class AccountInfoComponent implements OnInit {
     departmentName: [''],
     postName: [''],
   });
-  identityFile: string = '' //单位联系人认证文件
-  companyName: string = '' //单位名称
+  identityFile: string = ''; //单位联系人认证文件
+  companyName: string = ''; //单位名称
 
-  provinces: Array<string> = provinces.options;  //省份
-  unitTypes: Array<string> = [];
+  provinces: Array<string> = provinces.options; //省份
+  unitTypes: Array<any> = [];
   companys: Array<string> = [];
-  userType: Array<string> = [
-    '报送联系人','评审专家','高校联系人','个人'
-  ];
+  userType: Array<string> = ['报送联系人', '评审专家', '高校联系人', '个人'];
 
   constructor(
     public tbookSer: textbookServer,
@@ -81,9 +79,9 @@ export class AccountInfoComponent implements OnInit {
 
   async ngOnInit() {
     let user = Parse.User.current();
-    if(!user?.id) history.back()
+    if (!user?.id) history.back();
     this.user = user;
-    await this.getUnitTypes()
+    await this.getUnitTypes();
     if (user?.get('accountState') == '已认证') {
       this.message.success('账号已认证,无需重复认证');
       this.authServr.profileVerify(this.modal);
@@ -93,9 +91,9 @@ export class AccountInfoComponent implements OnInit {
       this.router.navigate(['/user/register'], { replaceUrl: true });
       return;
     }
-    let queryProfile = new Parse.Query('Profile')
-    queryProfile.equalTo('user',user?.id)
-    let profile = await queryProfile.first()
+    let queryProfile = new Parse.Query('Profile');
+    queryProfile.equalTo('user', user?.id);
+    let profile = await queryProfile.first();
     this.validateForm = this.fb.group({
       name: [user?.get('name') || '', [Validators.required]],
       phone: [user?.get('phone') || ''],
@@ -107,32 +105,34 @@ export class AccountInfoComponent implements OnInit {
       departmentName: [user?.get('departmentName') || ''],
       postName: [profile?.get('postName') || ''],
     });
-    this.identityFile = profile?.get('identityFile') || ''
-    this.companyName = user?.get('companyName') || ''
-    this.provinceChange()
-    console.log(this.companyName, this.identityFile);
-    console.log(this.validateForm.value);
+    // this.identityFile = profile?.get('identityFile') || ''
+    this.companyName = user?.get('companyName') || '';
+    this.provinceChange();
+    // console.log(this.companyName, this.identityFile);
+    // console.log(this.validateForm.value);
   }
-  async getUnitTypes(){
+  async getUnitTypes() {
     let query = new Parse.Query('Department');
     query.equalTo('branch', undefined);
     query.equalTo('parent', undefined);
-    query.notEqualTo('isDeleted',true);
+    query.notEqualTo('isDeleted', true);
     query.select('name');
-    let r = await query.find()
-    r.forEach(item=>{
-      this.unitTypes.push(item.get('name'))
-    })
+    let r = await query.find();
+    r.forEach((item) => {
+      this.unitTypes.push({ id: item.id, name: item.get('name') });
+    });
   }
   //根据所选单位类型获取对应单位
-  async provinceChange(val?: string, isChange?:boolean) {
-    console.log(val);
-    if(isChange) this.companyName = ''
+  async provinceChange(val?: string, isChange?: boolean) {
+    // console.log(val);
+    if (isChange) this.companyName = '';
     this.companys = [];
+    let parent = this.unitTypes.find(item=>item.name == this.validateForm.value.companyType)
     let query = new Parse.Query('Department');
-    query.equalTo('branch', this.validateForm.value.companyType);
-    query.select('name','branch');
-    query.limit(1000);
+    // query.equalTo('branch', this.validateForm.value.companyType);
+    query.equalTo('parent', parent.id);
+    query.select('name', 'branch');
+    query.limit(100);
     val && query.contains('name', val);
     let r = await query.find();
     if (r.length > 0) {
@@ -141,10 +141,11 @@ export class AccountInfoComponent implements OnInit {
   }
   submitForm(): void {
     console.log(this.validateForm.value);
+    console.log(this.companyName, this.identityFile);
     if (this.validateForm.valid) {
-      if(!this.companyName){
+      if (!this.companyName) {
         this.message.error('单位名称未选择或与单位类型不匹配,请重新选择');
-        return
+        return;
       }
       let a =
         /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
@@ -152,6 +153,10 @@ export class AccountInfoComponent implements OnInit {
         this.message.error('邮箱格式不正确');
         return;
       }
+      if (!this.identityFile) {
+        this.message.error('请上传单位联系人认证文件');
+        return;
+      }
       let params = this.validateForm.value;
       this.profileSave(params);
     } else {
@@ -200,14 +205,13 @@ export class AccountInfoComponent implements OnInit {
     this.modal.success({
       nzTitle: '提交成功',
       nzContent: '',
-      nzOnOk: () =>
-        this.router.navigate(['/user/login'], { replaceUrl: true }),
+      nzOnOk: () => this.router.navigate(['/user/login'], { replaceUrl: true }),
     });
   }
-  upload(e:any){
+  upload(e: any) {
     console.log(e);
-    let file = e[0]
-    this.identityFile = file
+    let file = e[0];
+    this.identityFile = file;
   }
   //验证手机号或邮箱是否注册
   async authUser(): Promise<boolean> {

+ 112 - 8
projects/textbook/src/modules/nav-admin/page-role/page-role.component.html

@@ -13,7 +13,7 @@
         *nzSpaceItem
         nz-button
         nzType="primary"
-        (click)="onAdd()"
+        (click)="addMember()"
       >
         添加账号
       </button>
@@ -48,12 +48,22 @@
         <nz-dropdown-menu #menutep="nzDropdownMenu">
           <ul nz-menu>
             <li nz-menu-item>
-              <button nz-button nzType="link" style="color: #231c1f">
+              <button
+                nz-button
+                nzType="link"
+                (click)="showModalDepart('add')"
+                style="color: #231c1f"
+              >
                 <span nz-icon nzType="plus" nzTheme="outline"></span>添加部门
               </button>
             </li>
             <li nz-menu-item>
-              <button nz-button nzType="link" style="color: #231c1f">
+              <button
+                nz-button
+                nzType="link"
+                style="color: #231c1f"
+                (click)="showModalOrganize()"
+              >
                 <span nz-icon nzType="merge" nzTheme="outline"></span>
                 新建组织
               </button>
@@ -71,8 +81,8 @@
       >
     </div>
     <div class="tool-right">
-      <a nz-button nzType="link" (click)="onAdd()">
-        <span nz-icon nzType="plus" nzTheme="outline"></span>添加账号
+      <a nz-button nzType="link" (click)="addMember()">
+        <span nz-icon nzType="plus" nzTheme="outline"></span>添加成员
       </a>
     </div>
   </div>
@@ -98,9 +108,9 @@
       <!-- 节点右键菜单 -->
       <nz-dropdown-menu #menu="nzDropdownMenu">
         <ul nz-menu>
-          <li nz-menu-item (click)="goEditOKRTree()">添加下级部门</li>
-          <li nz-menu-item (click)="goEditOKRTree()">编辑部门</li>
-          <li nz-menu-item (click)="goEditOKRTree()">删除部门</li>
+          <li nz-menu-item (click)="showModalDepart('add')">添加下级部门</li>
+          <li nz-menu-item (click)="showModalDepart('edit')">编辑部门</li>
+          <li nz-menu-item (click)="onDelDepart()">删除部门</li>
         </ul>
       </nz-dropdown-menu>
     </div>
@@ -179,3 +189,97 @@
     </div>
   </div>
 </div>
+<nz-modal
+  [(nzVisible)]="isVisible"
+  nzTitle="{{ editType == 'edit' ? '编辑' : '新建' }}部门"
+  (nzOnCancel)="handleCancel()"
+  nzWidth="800px"
+  nzCentered
+>
+  <ng-container *nzModalContent>
+    <div nz-row class="depart-modal">
+      <div nz-col nzSpan="12">
+        <div class="row">
+          <div class="label">部门名称</div>
+          <div class="value">
+            <input
+              nz-input
+              placeholder="请输入部门名称"
+              [(ngModel)]="editObject.name"
+              type="text"
+            />
+          </div>
+        </div>
+        <div class="row">
+          <div class="label">code</div>
+          <div class="value">
+            <input
+              nz-input
+              placeholder="请输入code"
+              [(ngModel)]="editObject.code"
+              type="text"
+            />
+          </div>
+        </div>
+        <div class="row">
+          <div class="label">部门描述</div>
+          <div class="value">
+            <textarea
+              [nzAutosize]="{ minRows: 4, maxRows: 4 }"
+              placeholder="请输入部门描述"
+              nz-input
+              [(ngModel)]="editObject.desc"
+            ></textarea>
+          </div>
+        </div>
+      </div>
+      <div nz-col nzSpan="12">
+        <div class="row">
+          <div class="label">上级部门</div>
+          <div class="value">
+            <input
+              nz-input
+              placeholder="请选择上级"
+              [ngModel]="editObject.parent?.title"
+              type="text"
+            />
+          </div>
+        </div>
+        <div class="select">
+          <div class="bar">
+            <a style="color: #86909c" (click)="onPre()">教材遴选</a>
+            @for (data of parentMap; track data.title) {
+            <span style="margin: 0 10px">/</span>
+            <a (click)="onPre(data, $index)">{{ data.title }}</a>
+            }
+          </div>
+          <div class="tree">
+            @for (data of parentList; track $index) {
+            <div class="li" (click)="onCheckedDepart(data)">
+              <label
+                nz-radio
+                ngModel
+                [nzValue]="data.key"
+                (click)="onCheckedDepart(data, true)"
+                >{{ data.title }}</label
+              >
+              <span nz-icon nzType="right" nzTheme="outline"></span>
+            </div>
+            }
+          </div>
+        </div>
+      </div>
+    </div>
+  </ng-container>
+  <div *nzModalFooter>
+    <button nz-button nzType="default" (click)="handleCancel()">取消</button>
+    <button
+      nz-button
+      nzType="primary"
+      style="background: #3e49b3; border: 1px #3e49b3"
+      (click)="handleOk()"
+    >
+      确定
+    </button>
+  </div>
+</nz-modal>

+ 21 - 0
projects/textbook/src/modules/nav-admin/page-role/page-role.component.scss

@@ -66,6 +66,27 @@
     }
   }
 }
+.depart-modal{
+  .row{
+    width: 90%;
+    margin-bottom: 20px;
+  }
+  .tree{
+    height: 180px;
+    overflow-y: scroll;
+    .li{
+      display: flex;
+      justify-content: space-between;
+      padding: 8px 4px;
+      span{
+        flex-shrink: 0;
+      }
+    }
+    .li:hover{
+      background-color: #f9f9f9;
+    }
+  }
+}
 ::ng-deep .ant-page-header-heading-title{
   white-space: normal;
 }

+ 148 - 20
projects/textbook/src/modules/nav-admin/page-role/page-role.component.ts

@@ -10,14 +10,20 @@ import { NzSpaceModule } from 'ng-zorro-antd/space';
 import { NzPageHeaderModule } from 'ng-zorro-antd/page-header';
 import { NzBreadCrumbModule } from 'ng-zorro-antd/breadcrumb';
 import { CommonCompModule } from '../../../services/common.modules';
+import { NzModalModule } from 'ng-zorro-antd/modal';
 import {
   NzFormatEmitEvent,
   NzTreeModule,
   NzTreeNode,
 } from 'ng-zorro-antd/tree';
-import { NzContextMenuService, NzDropdownMenuComponent } from 'ng-zorro-antd/dropdown';
+import {
+  NzContextMenuService,
+  NzDropdownMenuComponent,
+} from 'ng-zorro-antd/dropdown';
 import { NzCheckboxModule } from 'ng-zorro-antd/checkbox';
 import { NzEmptyModule } from 'ng-zorro-antd/empty';
+import { NzRadioModule } from 'ng-zorro-antd/radio';
+import { NzMessageService } from 'ng-zorro-antd/message';
 interface nodes {
   title: string;
   key: string;
@@ -25,6 +31,14 @@ interface nodes {
   isParent?: boolean;
   children?: Array<any>;
 }
+interface depart {
+  name: string;
+  id?: string;
+  code?: string;
+  desc?: string;
+  parent?: object | any;
+  branch: string;
+}
 @Component({
   selector: 'app-page-role',
   templateUrl: './page-role.component.html',
@@ -40,6 +54,8 @@ interface nodes {
     NzTreeModule,
     NzCheckboxModule,
     NzEmptyModule,
+    NzModalModule,
+    NzRadioModule,
   ],
   standalone: true,
 })
@@ -63,10 +79,25 @@ export class PageRoleComponent implements OnInit {
   indeterminate = false;
   loading = false;
 
+  isVisible: boolean = false;
+  activatedNode: NzTreeNode | any; //当前选择节点
+  editType: string = 'add'; //弹窗类型
+  activeDepart?: Parse.Object; //当前编辑部门
+  editObject: depart = {
+    name: '',
+    code: '',
+    desc: '',
+    parent: {},
+    branch: '',
+  };
+  parentMap: Array<any> = [];
+  parentList: Array<any> = [];
+
   constructor(
     private route: ActivatedRoute,
     private activeRoute: ActivatedRoute,
     private nzContextMenuService: NzContextMenuService,
+    private message: NzMessageService,
   ) {
     this.user = Parse.User.current();
     this.className = this.Department.className;
@@ -115,8 +146,10 @@ export class PageRoleComponent implements OnInit {
     });
     return nodes;
   }
-  onAdd() {}
-  activatedNode?: NzTreeNode;
+  //添加成员
+  addMember() {
+    this.message.warning('权限灰度中')
+  }
   //展开/合并
   async nzEvent(event: NzFormatEmitEvent): Promise<void> {
     console.log(event);
@@ -139,31 +172,54 @@ export class PageRoleComponent implements OnInit {
     }
   }
   async getProfile() {
-    this.profiles = []
+    this.profiles = [];
     this.loading = true;
-    let query = new Parse.Query('Profile');
+    let queryParams = {
+      where : {
+        "$or": [{
+          "user": {
+            "$inQuery": {
+              "where": {
+                "$or": [{
+                    "companyName": { "$eq": this.currentDepart.title}
+                  },
+                ]
+              },
+              "className": "_User"
+            }
+          }
+        }]
+      }
+    }
+    let query = Parse.Query.fromJSON('Profile',queryParams);
     query.include('user');
-    query.notEqualTo('identity', '国家级管理员')
+    query.notEqualTo('identity', '国家级管理员');
     let r = await query.find();
-    let profiles: any[] = []
-    r.forEach(item=>{
-      let _item = item.toJSON()
-      _item['checked'] = false
+    let profiles: any[] = [];
+    r.forEach((item) => {
+      let _item = item.toJSON();
+      _item['checked'] = false;
       profiles.push(_item);
-    })
-    this.profiles = profiles
+    });
+    this.profiles = profiles;
     this.loading = false;
   }
   //搜索触发
   onSearch(event: NzFormatEmitEvent) {
     console.log(event);
   }
-  contextMenu($event: MouseEvent, menu: NzDropdownMenuComponent, node?:any): void {
+  contextMenu(
+    $event: MouseEvent,
+    menu: NzDropdownMenuComponent,
+    node?: any
+  ): void {
     console.log(node);
+    this.activatedNode = node;
     this.nzContextMenuService.create($event, menu);
   }
-  goEditOKRTree(){
-
+  //删除部门
+  onDelDepart() {
+    this.message.warning('权限灰度中')
   }
 
   onAllChecked(checked: boolean): void {
@@ -172,15 +228,87 @@ export class PageRoleComponent implements OnInit {
       item.checked = checked;
       return item;
     });
-    this.checkedAll = checked
+    this.checkedAll = checked;
   }
   onItemChecked(id: string, e: boolean) {
-    let checkedAll = true
+    let checkedAll = true;
     this.profiles = this.profiles.map((item) => {
-      if(id == item.objectId) item.checked = e;
-      if(!item.checked) checkedAll = false
+      if (id == item.objectId) item.checked = e;
+      if (!item.checked) checkedAll = false;
       return item;
     });
-    this.checkedAll = checkedAll
+    this.checkedAll = checkedAll;
+  }
+  //新建打开弹窗
+  async showModalDepart(type: string) {
+    this.parentList = this.nodes;
+    if (type == 'edit') {
+      let query = new Parse.Query('Department');
+      let r = await query.get(this.activatedNode?.key);
+      this.activeDepart = r;
+      this.parentMap = this.formatNode(this.activatedNode);
+      if(this.activatedNode?.parentNode?.origin.key){
+        this.parentList = await this.getDepart(this.activatedNode.parentNode.origin.key);
+      }
+    }
+    this.editType = type;
+    this.isVisible = true;
+  }
+  //格式化链
+  formatNode(node: NzTreeNode): Array<any> {
+    let arr = [];
+    if (node.parentNode?.origin.title) {
+      arr.push({
+        title: node.parentNode?.origin.title,
+        key: node.parentNode?.origin.key,
+      });
+      arr.unshift(...this.formatNode(node.parentNode));
+    }
+    return arr;
+  }
+  async onPre(data?:any,index?:number){
+    if(!data){
+      this.parentList = await this.getDepart();
+      this.parentMap = []
+      return
+    }
+    if(index == this.parentMap.length-1) return
+    this.parentMap.splice(index || 0+1)
+    this.parentList = await this.getDepart(data?.key);
+  }
+  //选择所属类别下级列表
+  async onCheckedDepart(e: any, checked?: boolean) {
+    console.log(e);
+    if (checked) {
+      this.editObject = {
+        name: e.title,
+        code: '',
+        desc: '',
+        parent: e,
+        branch: '',
+      };
+      return;
+    }
+    this.parentMap.push({
+      title: e.title,
+      key: e.key,
+    });
+    this.parentList = await this.getDepart(e?.key);
+  }
+  handleOk(): void {
+    this.message.warning('权限灰度中')
+    this.isVisible = false;
+  }
+
+  handleCancel(): void {
+    console.log('Button cancel clicked!');
+    this.isVisible = false;
+    this.activatedNode = undefined;
+    this.parentMap = [];
+  }
+
+  /* 组织 */
+  showModalOrganize(){
+    this.message.warning('权限灰度中')
   }
 }

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

@@ -24,7 +24,7 @@
               <nz-tag [nzBordered]="false" [nzColor]="'green'">已认证</nz-tag>
               } @case ('已禁用') {
               <nz-tag [nzBordered]="false" [nzColor]="'red'">已禁用</nz-tag>
-              } } @if (user.get('isDeleted')) {
+              } } @if (user?.get('isDeleted')) {
               <nz-tag nzColor="error">已删除</nz-tag>
               }
             </div>
@@ -46,7 +46,7 @@
           <nz-dropdown-menu #menu="nzDropdownMenu">
             <ul nz-menu>
               <li nz-menu-item>
-                @if (user.get('accountState') == '待认证') {
+                @if (user?.get('accountState') == '待认证') {
                 <button
                   nz-button
                   nzType="link"
@@ -63,7 +63,7 @@
                 }
               </li>
               <li nz-menu-item>
-                @if (user.get('accountState') != '已禁用') {
+                @if (user?.get('accountState') != '已禁用') {
                 <button
                   nz-button
                   nzType="link"
@@ -78,7 +78,7 @@
                 <button
                   (click)="updateUser('删除')"
                   nz-button
-                  [disabled]="user.get('isDeleted')"
+                  [disabled]="user?.get('isDeleted')"
                   nzType="link"
                   style="color: #231c1f"
                 >
@@ -157,11 +157,11 @@
           </div>
         </div> -->
       </div>
-      <div class="title">手机号</div>
+      <div class="title">个人信息</div>
       <div class="fill-template">
         <div nz-row>
           <div nz-col nzSpan="8">
-            <div class="lable">创建时间</div>
+            <div class="lable">手机号</div>
             <div class="value">
               {{ user?.get("phone") || "未填写" }}
             </div>
@@ -219,11 +219,11 @@
           [nzBordered]="false"
           style="color: black"
           [nzColor]="'#efefef'"
-          >{{ profile.get("companyType") }}</nz-tag
+          >{{ profile?.get("companyType") }}</nz-tag
         >
         /
         <nz-tag [nzBordered]="false" [nzColor]="'geekblue'">{{
-          user.get("companyName")
+          user?.get("companyName")
         }}</nz-tag>
       </div>
       <div class="title">原始JSON数据</div>

+ 11 - 0
projects/textbook/src/modules/nav-province-contact/modules.routes.ts

@@ -1,5 +1,8 @@
 import { NgModule } from "@angular/core";
 import { RouterModule, Routes } from "@angular/router";
+import { PageCollectionComponent } from "./page-collection/page-collection.component";
+import { PageProcessComponent } from "./page-process/page-process.component";
+import { PageTextbookComponent } from "./page-textbook/page-textbook.component";
 const routes: Routes = [
   {
     path: '',
@@ -9,6 +12,14 @@ const routes: Routes = [
   {
     path: 'manage',
     children:[
+      {
+        path: 'collection', //流程列表
+        component: PageProcessComponent,
+      },
+      {
+        path: 'textbook', //全部材料
+        component: PageTextbookComponent,
+      },
     ]
   }
 ];

+ 35 - 0
projects/textbook/src/modules/nav-province-contact/page-collection/page-collection.component.html

@@ -0,0 +1,35 @@
+<!-- 表格头部 -->
+@if (list?.schema?.title) {
+<nz-page-header>
+  <!--title-->
+  <nz-page-header-title
+    >{{ list?.schema?.title }}
+    <br />
+    <div class="subtitle">在每个报送合集内管理该地区的推荐报送教材流程</div>
+  </nz-page-header-title>
+
+  <!--extra-->
+  <nz-page-header-extra>
+    <nz-space>
+      <button
+        style="background: #3e49b3; border: 1px #3e49b3"
+        *nzSpaceItem
+        nz-button
+        nzType="primary"
+        (click)="create()"
+      >
+        创建合集
+      </button>
+    </nz-space>
+  </nz-page-header-extra>
+</nz-page-header>
+}
+
+<comp-table-list
+  #list
+  [schema]="EduCollection"
+  *ngIf="className && fieldsArray"
+  [className]="className"
+  [fieldsArray]="fieldsArray"
+  [queryParams]="queryParams"
+></comp-table-list>

+ 10 - 0
projects/textbook/src/modules/nav-province-contact/page-collection/page-collection.component.scss

@@ -0,0 +1,10 @@
+.subtitle{
+        margin-right: 12px;
+        color: #00000073;
+        font-size: 14px;
+        font-weight: normal;
+        line-height: 1.5715;
+        overflow: hidden;
+        white-space: nowrap;
+        text-overflow: ellipsis;
+}

+ 22 - 0
projects/textbook/src/modules/nav-province-contact/page-collection/page-collection.component.spec.ts

@@ -0,0 +1,22 @@
+import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
+
+import { PageCollectionComponent } from './page-collection.component';
+
+describe('PageCollectionComponent', () => {
+  let component: PageCollectionComponent;
+  let fixture: ComponentFixture<PageCollectionComponent>;
+
+  beforeEach(waitForAsync(() => {
+    TestBed.configureTestingModule({
+      imports: [PageCollectionComponent],
+    }).compileComponents();
+
+    fixture = TestBed.createComponent(PageCollectionComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  }));
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});

+ 61 - 0
projects/textbook/src/modules/nav-province-contact/page-collection/page-collection.component.ts

@@ -0,0 +1,61 @@
+import { Component, OnInit, ViewChild } from '@angular/core';
+import { ActivatedRoute,Router, RouterOutlet } from '@angular/router';
+import { CompTableListComponent } from '../../../app/comp-table/comp-table-list/comp-table-list.component';
+import EduCollection from '../../../schemas/EduCollection';
+// import { TranslateService } from '@ngx-translate/core';
+import * as Parse from "parse";
+import { CommonModule } from '@angular/common';
+import { NzTagModule } from 'ng-zorro-antd/tag';
+import { NzButtonModule } from 'ng-zorro-antd/button';
+import { NzIconModule } from 'ng-zorro-antd/icon';
+import { NzPageHeaderModule } from 'ng-zorro-antd/page-header';
+import { NzBreadCrumbModule } from 'ng-zorro-antd/breadcrumb';
+import { NzSpaceModule } from 'ng-zorro-antd/space';
+import { NzDropDownModule } from 'ng-zorro-antd/dropdown';
+@Component({
+  selector: 'app-page-collection',
+  templateUrl: './page-collection.component.html',
+  styleUrls: ['./page-collection.component.scss'],
+  imports: [
+    CommonModule,RouterOutlet,CompTableListComponent,
+    NzPageHeaderModule,NzBreadCrumbModule,NzTagModule,NzButtonModule,NzIconModule,NzSpaceModule,
+    NzDropDownModule,
+  ],
+  standalone: true,
+})
+export class PageCollectionComponent  implements OnInit {
+  @ViewChild(CompTableListComponent) list:CompTableListComponent|undefined
+
+  EduCollection = EduCollection
+  className:string|undefined
+  queryParams:any|undefined
+  fieldsArray:Array<any>|undefined
+
+  constructor(
+    private router: Router,
+    private activeRoute: ActivatedRoute,
+    // private translate:TranslateService,
+  ) {
+    this.className = this.EduCollection.className
+    this.fieldsArray = this.EduCollection.fieldsArray
+    this.queryParams = {where:{
+      // Collection:this.Collection?.toPointer(),
+      isDeleted:{$ne:true},
+    }}
+  }
+
+  ngOnInit(): void {
+    this.activeRoute.paramMap.subscribe(async (params) => {
+      let isDeleted = params.get('isDeleted')
+      if(isDeleted){
+        this.queryParams.where['isDeleted'] = {$eq:true}
+      }else{
+        this.queryParams.where['isDeleted'] = {$ne:true}
+      }
+      this.list?.ngOnInit()
+    });
+  }
+  create(){
+    this.router.navigate(['/nav-admin/manage/collection/create'])
+  }
+}

+ 55 - 0
projects/textbook/src/modules/nav-province-contact/page-process/page-process.component.html

@@ -0,0 +1,55 @@
+<nz-page-header>
+  <!-- <nz-breadcrumb nz-page-header-breadcrumb>
+    <nz-breadcrumb-item>国家级管理</nz-breadcrumb-item>
+    <nz-breadcrumb-item><a>报送合集</a></nz-breadcrumb-item>
+  </nz-breadcrumb> -->
+  <nz-page-header-title>
+    <div style="display:flex;align-items: center;">{{ user?.get("companyName") }} <nz-tag nzColor="processing">遴选中</nz-tag></div>
+    <div class="subtitle">
+      在合集中,你可以创建多个教材推荐报送流程,指定用户为流程管理员,邀请作者、联系人、评审员注册系统,创建并提交教材,由流程管理员提交至合集管理员完成报送
+    </div>
+  </nz-page-header-title>
+  <nz-page-header-extra>
+    <nz-space>
+      <button
+        style="background: #3e49b3; border: 1px #3e49b3"
+        *nzSpaceItem
+        nz-button
+        nzType="primary"
+        (click)="onCreateProcess()"
+      >
+      导出函报文件
+      </button>
+      <button
+        style="background: #3e49b3; border: 1px #3e49b3"
+        *nzSpaceItem
+        nz-button
+        nzType="primary"
+        (click)="onCreateProcess()"
+      >
+        确认报送
+      </button>
+    </nz-space>
+  </nz-page-header-extra>
+</nz-page-header>
+<div class="edit-content">
+  <nz-tabset [(nzSelectedIndex)]="active">
+    <nz-tab nzTitle="报送流程">
+      @if (active == 0) {
+      <!-- <app-process [eduCollectionId]="eduCollection?.id"></app-process> -->
+      }
+    </nz-tab>
+    <nz-tab nzTitle="推荐材料">
+      @if (active == 1) {
+      <comp-table-list
+        #list
+        [schema]="EduTextbook"
+        *ngIf="className && fieldsArray"
+        [className]="className"
+        [fieldsArray]="fieldsArray"
+        [queryParams]="queryParams"
+      ></comp-table-list>
+      }
+    </nz-tab>
+  </nz-tabset>
+</div>

+ 30 - 0
projects/textbook/src/modules/nav-province-contact/page-process/page-process.component.scss

@@ -0,0 +1,30 @@
+.subtitle{
+  margin-right: 12px;
+  color: #00000073;
+  font-size: 14px;
+  font-weight: normal;
+  line-height: 1.5715;
+  // overflow: hidden;
+  // white-space: nowrap;
+  // text-overflow: ellipsis;
+}
+.edit-content{
+  margin: 0 0 20px;
+  padding: 0 24px;
+  height: calc(100vh - 250px);
+}
+::ng-deep .ant-page-header-heading-title{
+  white-space: normal;
+}
+::ng-deep .ant-tabs-tab.ant-tabs-tab-active .ant-tabs-tab-btn{
+  color: #c6233f;
+}
+::ng-deep .ant-tabs-ink-bar{
+  background: #c6233f;
+}
+::ng-deep .ant-tabs-tab:hover{
+  color: #e97488;
+}
+::ng-deep .ant-tabs-tab-btn:active{
+  color: #e97488;
+}

+ 24 - 0
projects/textbook/src/modules/nav-province-contact/page-process/page-process.component.spec.ts

@@ -0,0 +1,24 @@
+import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
+import { IonicModule } from '@ionic/angular';
+
+import { PageProcessComponent } from './page-process.component';
+
+describe('PageProcessComponent', () => {
+  let component: PageProcessComponent;
+  let fixture: ComponentFixture<PageProcessComponent>;
+
+  beforeEach(waitForAsync(() => {
+    TestBed.configureTestingModule({
+      declarations: [ PageProcessComponent ],
+      imports: [IonicModule.forRoot()]
+    }).compileComponents();
+
+    fixture = TestBed.createComponent(PageProcessComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  }));
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});

+ 67 - 0
projects/textbook/src/modules/nav-province-contact/page-process/page-process.component.ts

@@ -0,0 +1,67 @@
+import { Component, Input, OnInit } from '@angular/core';
+import { CommonModule } from '@angular/common';
+import { NzSpaceModule } from 'ng-zorro-antd/space';
+import { CommonCompModule } from '../../../services/common.modules';
+import { NzTabsModule } from 'ng-zorro-antd/tabs';
+// import { ProcessComponent } from '../components/process/process.component';
+// import { CreateCollectionComponent } from '../create-collection/create-collection.component';
+import { ActivatedRoute, Router } from '@angular/router';
+import Parse from 'parse';
+import { EduTextbook } from '../../../schemas/EduTextbook';
+import { CompTableListComponent } from '../../../app/comp-table/comp-table-list/comp-table-list.component';
+@Component({
+  selector: 'app-page-process',
+  templateUrl: './page-process.component.html',
+  styleUrls: ['./page-process.component.scss'],
+  imports: [
+    CommonModule,
+    NzSpaceModule,
+    CommonCompModule,
+    NzTabsModule,
+    // ProcessComponent,
+    // CreateCollectionComponent,
+    CompTableListComponent
+  ],
+  standalone: true,
+})
+export class PageProcessComponent implements OnInit {
+  active: number = 0;
+  eduCollection: Parse.Object | undefined;
+
+  EduTextbook = EduTextbook;
+  user: Parse.User | undefined;
+  className: string | undefined;
+  queryParams: any | undefined;
+  fieldsArray: Array<any> | undefined;
+
+  constructor(private activeRoute: ActivatedRoute, private router: Router) {
+    this.user = Parse.User.current();
+    this.className = this.EduTextbook.className;
+    this.fieldsArray = this.EduTextbook.fieldsArray;
+    this.queryParams = {
+      where: {
+        isDeleted: { $ne: true },
+        render: true,
+        status: '200',
+      },
+    };
+  }
+
+  ngOnInit() {
+    this.activeRoute.paramMap.subscribe(async (params) => {
+      let id = params.get('id');
+      if (id) {
+        let query = new Parse.Query('EduCollection');
+        query.equalTo('objectId', id);
+        this.eduCollection = await query.first();
+      }
+    });
+  }
+
+  onCreateProcess() {
+    // this.router.navigate([
+    //   '/nav-admin/manage/process/create',
+    //   { cid: this.eduCollection?.id },
+    // ]);
+  }
+}

+ 14 - 0
projects/textbook/src/modules/nav-province-contact/page-textbook/page-textbook.component.html

@@ -0,0 +1,14 @@
+<nz-page-header>
+  <nz-breadcrumb nz-page-header-breadcrumb>
+    <nz-breadcrumb-item>报送联系人</nz-breadcrumb-item>
+    <nz-breadcrumb-item><a>全部教材</a></nz-breadcrumb-item>
+  </nz-breadcrumb>
+</nz-page-header>
+<comp-table-list
+  #list
+  [schema]="EduTextbook"
+  *ngIf="className && fieldsArray"
+  [className]="className"
+  [fieldsArray]="fieldsArray"
+  [queryParams]="queryParams"
+></comp-table-list>

+ 0 - 0
projects/textbook/src/modules/nav-province-contact/page-textbook/page-textbook.component.scss


+ 22 - 0
projects/textbook/src/modules/nav-province-contact/page-textbook/page-textbook.component.spec.ts

@@ -0,0 +1,22 @@
+import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
+
+import { PageTextbookComponent } from './page-textbook.component';
+
+describe('PageTextbookComponent', () => {
+  let component: PageTextbookComponent;
+  let fixture: ComponentFixture<PageTextbookComponent>;
+
+  beforeEach(waitForAsync(() => {
+    TestBed.configureTestingModule({
+      imports: [PageTextbookComponent],
+    }).compileComponents();
+
+    fixture = TestBed.createComponent(PageTextbookComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  }));
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});

+ 51 - 0
projects/textbook/src/modules/nav-province-contact/page-textbook/page-textbook.component.ts

@@ -0,0 +1,51 @@
+import { Component, OnInit, ViewChild, Input } from '@angular/core';
+import { ActivatedRoute, RouterOutlet, Router } from '@angular/router';
+import { CompTableListComponent } from '../../../app/comp-table/comp-table-list/comp-table-list.component';
+import { EduTextbook } from '../../../schemas/EduTextbook';
+import { NzPageHeaderModule } from 'ng-zorro-antd/page-header';
+import { NzBreadCrumbModule } from 'ng-zorro-antd/breadcrumb';
+import * as Parse from 'parse';
+import { CommonModule } from '@angular/common';
+@Component({
+  selector: 'app-page-textbook',
+  templateUrl: './page-textbook.component.html',
+  styleUrls: ['./page-textbook.component.scss'],
+  imports: [CommonModule, RouterOutlet, CompTableListComponent,NzPageHeaderModule,NzBreadCrumbModule],
+  standalone: true,
+})
+export class PageTextbookComponent implements OnInit {
+  @ViewChild(CompTableListComponent) list: CompTableListComponent | undefined;
+  @Input('discard') discard: boolean = false;
+  @Input('render') render: boolean = false;
+
+  EduTextbook = EduTextbook;
+  user: Parse.User | undefined;
+  className: string | undefined;
+  queryParams: any | undefined;
+  fieldsArray: Array<any> | undefined;
+
+  constructor(
+    private router: Router,
+    private activeRoute: ActivatedRoute
+  ) // private translate:TranslateService,
+  {
+    this.user = Parse.User.current();
+    this.className = this.EduTextbook.className;
+    this.fieldsArray = this.EduTextbook.fieldsArray;
+    this.queryParams = {
+      where: {
+        isDeleted: { $ne: true },
+        render: true,
+        discard:{$ne: true},
+      },
+    };
+  }
+
+  ngOnInit(): void {
+    // this.queryParams.where = {
+    //   isDeleted: { $ne: true },
+    //   discard: this.discard ? { $eq: true } : { $ne: true },
+    //   render: this.render ? { $eq: true } : { $ne: true },
+    // };
+  }
+}

+ 11 - 4
projects/textbook/src/modules/textbook/page-home/header/header.component.html

@@ -7,7 +7,7 @@
     <div class="logo-box">
         <div class="logo-content" routerLink="/startup/home">
             <img class="logo-img" src="/img/book.png" alt="feima-contest-logo">
-            <div class="logo-font">国家级规划教材遴选系统 - 本科</div>
+            <div class="logo-font">“十四五”高等教育国家规划教材申报系统</div>
           </div>
     </div>
 
@@ -31,7 +31,8 @@
     <!-- <ng-template #rightAvatar> -->
     <!--未登录-->
     <!--管理及登录入口-->
-    <div *ngIf="!user?.id" class="login-manage-box"> 
+    @if(!user?.id){
+    <div class="login-manage-box"> 
         <!--管理入口按钮-->
         <div class="manage-box">
             <button class="manage-button" routerLink="/user/login">管理入口</button>
@@ -39,10 +40,16 @@
         <!--登录按钮-->
         <div class="login-box">
             <!-- <button class="login-button" (click)="loginModal.authServ.isModalShow = true">登录</button> -->
-            <!-- <button class="login-button" routerLink="/user/login">登录</button> -->
-            <button class="login-button" routerLink="/user/register">注册申请</button>
+            <button class="login-button" routerLink="/user/register">账号申请</button>
         </div>
     </div>
+    }@else{
+    <div class="login-manage-box"> 
+        <div class="manage-box">
+            <button class="manage-button" (click)="authServr.profileVerify()">进入后台</button>
+        </div>
+    </div>
+    }
     <!-- 已登录 -->
     <!-- 展开列表 -->
     <!-- <a nz-button nzType="default" style="margin-left: 5%; color:none; display: flex; flex-direction: row; align-items: center; cursor: pointer;" 

+ 1 - 1
projects/textbook/src/modules/textbook/page-home/header/header.component.scss

@@ -67,7 +67,7 @@
         display: flex;
         flex-direction: row;
         width: 30%;
-
+        justify-content: space-evenly;
     //管理入口按钮
     .manage-box{
         margin-left: 30%;

+ 2 - 0
projects/textbook/src/modules/textbook/page-home/header/header.component.ts

@@ -11,6 +11,7 @@ import { NzMessageService } from "ng-zorro-antd/message";
 import { Router, RouterModule } from '@angular/router';
 import { NzButtonModule } from 'ng-zorro-antd/button';
 import { CommonModule } from '@angular/common';
+import { AuthServr } from '../../../../services/auth.service';
 @Component({
   selector: 'app-header',
   templateUrl: './header.component.html',
@@ -75,6 +76,7 @@ export class HeaderComponent {
     private http : HttpClient,
     private message: NzMessageService,
     public router:Router,
+    public authServr: AuthServr,
     ){
     // this.accServ.getBilling();
     this.isCapacitor = this.platform.is("capacitor")

+ 14 - 13
projects/textbook/src/modules/textbook/page-home/page-home.component.html

@@ -8,7 +8,7 @@
     <!-- Created by ai.fmode.cn imagine -->
     <img class="landscape" src="/img/banner.png" alt="feima-contest-background">
 
-    <div class="landscape-text">
+    <!-- <div class="landscape-text">
         <div class="landscape-title">《“十四五”普通高等教育本科国家级规划教材建设实施方案》</div>
         <div class="landscape-desc">到2025年,教育部“十四五”本科规划教材重点立项建设1000种左右,遴选5000种左右,加快自主知识体系与教材体系建设,着力打造中国特色、世界水平的高质量教材体系,为高等教育强国建设提供坚实支撑。
             <br>(一)深入推进新时代党的创新理论进教材
@@ -18,11 +18,11 @@
             <br>“十四五”规划教材建设实行国家、省、校三级联动,有效衔接,全面建成国家、省、校三级本科规划教材体系。教育部采取重点立项与统一推荐遴选相结合方式,对“十四五”期间完成的新编或修订教材,开展“十四五”国家级规划教材认定工作。教材编写工作强化科教协同、产学合作,鼓励和支持打破部门、校际、学科专业和校内校外壁垒。
     
         </div>
-    </div>
+    </div> -->
 </div>
 
 <!--角色入口-->
-<div class="track-box" id="submit">
+<!-- <div class="track-box" id="submit">
 
     <div class="track-card">
         <div class="button-card">
@@ -64,7 +64,7 @@
         
         <div class="track-one-explain">省级教育行政部门报送人</div>
     </div>
-</div>
+</div> -->
 
 <!--模块标题:遴选计划-->
 <div class="module-title" id="review">
@@ -200,7 +200,7 @@
 </div>
 
 <!--模块标题:技术支持单位-->
-<div class="module-title">
+<!-- <div class="module-title">
     <img class="left-arrow" src="/icon/left-arrow.png" alt="left-arrow">
     <img class="left-arrow" src="/icon/left-arrow.png" alt="left-arrow">
     <img class="left-arrow" src="/icon/left-arrow.png" alt="left-arrow">
@@ -208,12 +208,12 @@
     <img class="right-arrow" src="/icon/right-arrow.png" alt="right-arrow">
     <img class="right-arrow" src="/icon/right-arrow.png" alt="right-arrow">
     <img class="right-arrow" src="/icon/right-arrow.png" alt="right-arrow">
-</div>
+</div> -->
 
 <!--技术支持单位展示盒子-->
-<div class="support-company-box">
+<!-- <div class="support-company-box">
     <img class="company-icon" src="/img/logo-authing.svg" alt="contest-plan">
-</div>
+</div> -->
 
 <!--模块标题:联系我们-->
 <div class="module-title" id="contact">
@@ -229,14 +229,15 @@
 <!--联系详情页-->
 <div class="contact-box">
     <div class="contact-content">
-        <div class="contact-item">咨询: 教育部高等教育司教学条件处 刘某 010-66096925 gaojs_jxtj&#64;moe.edu.cn</div>
-        <div class="contact-item">咨询: 中国高等教育学会秘书处 赵某 010-59893293 gjxhjc&#64;hie.edu.cn</div>
-        <div class="contact-item">工作时间: 周一至周五 9:00-18:00</div>
+        <div class="contact-item">系统服务联系人:李爽联系电话:010-58581524</div>
+        <div class="contact-item">政策咨询联系人:姚又琳</div>
+        <div class="contact-item">联系电话:010-66097856</div>
+        <div class="contact-item">电子邮箱:<a href="mailto:gaojs_jxtj@moe.edu.cn">gaojs_jxtj&#64;moe.edu.cn</a></div>
     </div>
 
-    <div class="erweima-box">
+    <!-- <div class="erweima-box">
         <img class="contact-erweima" src="https://files.authing.co/authing-website/wechat-code.jpg" alt="wx-erweima">
-    </div>
+    </div> -->
 </div>
 
 </div>

+ 5 - 7
projects/textbook/src/services/auth.service.ts

@@ -16,13 +16,11 @@ export class AuthServr {
   resetcountdown: number = 60; //重置密码验证码倒计时
   redirectUrl: string = '';
   roterPath: any = {
-    国家级管理员: '/nav-admin',
-    报送联系人: '/nav-province-submit',
-    // "流程管理员登录": '/nav-province-contact',
-    // "省属高校联系人": '/nav-province-school-contact',
-    教材评审组成员: '/nav-review',
-    // '作者/教师/主编': '/nav-author/manage/space',
-    个人: '/nav-author/manage/space',
+    '国家级管理员': '/nav-admin',
+    '报送联系人': '/nav-province-contact',
+    '高校联系人': '/nav-province-school-contact',
+    '评审专家': '/nav-review',
+    '个人': '/nav-author/manage/space',
   };
   constructor(
     public router: Router,