Browse Source

nav 各导航

warrior 8 months ago
parent
commit
46d4a9cbb6
42 changed files with 1035 additions and 40 deletions
  1. 30 8
      projects/textbook/src/app/app.routes.ts
  2. 4 0
      projects/textbook/src/app/comp-nav/comp-nav.component.html
  3. 8 0
      projects/textbook/src/app/comp-nav/comp-nav.component.scss
  4. 24 0
      projects/textbook/src/app/comp-nav/comp-nav.component.spec.ts
  5. 20 0
      projects/textbook/src/app/comp-nav/comp-nav.component.ts
  6. 6 4
      projects/textbook/src/app/comp-user/comp-user.component.html
  7. 19 2
      projects/textbook/src/app/comp-user/comp-user.component.scss
  8. 5 5
      projects/textbook/src/modules/login/login/login.component.html
  9. 4 3
      projects/textbook/src/modules/login/login/login.component.scss
  10. 36 18
      projects/textbook/src/modules/login/login/login.component.ts
  11. 21 0
      projects/textbook/src/modules/nav-admin/modules.routes.ts
  12. 35 0
      projects/textbook/src/modules/nav-admin/page-home/page-home.component.html
  13. 15 0
      projects/textbook/src/modules/nav-admin/page-home/page-home.component.scss
  14. 24 0
      projects/textbook/src/modules/nav-admin/page-home/page-home.component.spec.ts
  15. 74 0
      projects/textbook/src/modules/nav-admin/page-home/page-home.component.ts
  16. 21 0
      projects/textbook/src/modules/nav-author/modules.routes.ts
  17. 35 0
      projects/textbook/src/modules/nav-author/page-home/page-home.component.html
  18. 15 0
      projects/textbook/src/modules/nav-author/page-home/page-home.component.scss
  19. 24 0
      projects/textbook/src/modules/nav-author/page-home/page-home.component.spec.ts
  20. 40 0
      projects/textbook/src/modules/nav-author/page-home/page-home.component.ts
  21. 21 0
      projects/textbook/src/modules/nav-province-contact/modules.routes.ts
  22. 35 0
      projects/textbook/src/modules/nav-province-contact/page-home/page-home.component.html
  23. 15 0
      projects/textbook/src/modules/nav-province-contact/page-home/page-home.component.scss
  24. 24 0
      projects/textbook/src/modules/nav-province-contact/page-home/page-home.component.spec.ts
  25. 50 0
      projects/textbook/src/modules/nav-province-contact/page-home/page-home.component.ts
  26. 21 0
      projects/textbook/src/modules/nav-province-school-contact/modules.routes.ts
  27. 35 0
      projects/textbook/src/modules/nav-province-school-contact/page-home/page-home.component.html
  28. 15 0
      projects/textbook/src/modules/nav-province-school-contact/page-home/page-home.component.scss
  29. 24 0
      projects/textbook/src/modules/nav-province-school-contact/page-home/page-home.component.spec.ts
  30. 50 0
      projects/textbook/src/modules/nav-province-school-contact/page-home/page-home.component.ts
  31. 21 0
      projects/textbook/src/modules/nav-province-submit/modules.routes.ts
  32. 35 0
      projects/textbook/src/modules/nav-province-submit/page-home/page-home.component.html
  33. 15 0
      projects/textbook/src/modules/nav-province-submit/page-home/page-home.component.scss
  34. 24 0
      projects/textbook/src/modules/nav-province-submit/page-home/page-home.component.spec.ts
  35. 38 0
      projects/textbook/src/modules/nav-province-submit/page-home/page-home.component.ts
  36. 21 0
      projects/textbook/src/modules/nav-review/modules.routes.ts
  37. 35 0
      projects/textbook/src/modules/nav-review/page-home/page-home.component.html
  38. 15 0
      projects/textbook/src/modules/nav-review/page-home/page-home.component.scss
  39. 24 0
      projects/textbook/src/modules/nav-review/page-home/page-home.component.spec.ts
  40. 36 0
      projects/textbook/src/modules/nav-review/page-home/page-home.component.ts
  41. 20 0
      projects/textbook/src/services/common.modules.ts
  42. 1 0
      projects/textbook/src/services/textbook.ts

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

@@ -3,18 +3,40 @@ import { Routes } from '@angular/router';
 import { CompUserComponent } from './comp-user/comp-user.component';
 
 export const routes: Routes = [
-  { path: '',loadComponent:()=>import('../modules/textbook/page-home/page-home.component').then(m=>m.PageHomeComponent) }, // 默认跳转到 '/home'
+  { path: '',loadComponent:()=>import('../modules/textbook/page-home/page-home.component').then(m=>m.PageHomeComponent) }, // 默认跳转到 ''
   {
     path: 'user', // 用户登录/注册
     component: CompUserComponent,
     loadChildren:()=> import('../modules/login/modules.routes').then((mod) => mod.LoginRoutingModule),
   },
-  // {
-    // path: 'admin',
+  {
+    path: 'nav-admin', //国家级管理员管理平台
     // canActivate: [AuthGuard],
-    // loadChildren: () =>
-    //   import('projects/nova-open/src/modules/developer/developer.module').then(
-    //     (mod) => mod.DeveloperModule
-    //   ),
-  // },
+    loadChildren: () =>import('../modules/nav-admin/modules.routes').then((mod) => mod.NavAdminRoutingModule),
+  },
+  {
+    path: 'nav-province-submit',//省级教育行政部门
+    // canActivate: [AuthGuard],
+    loadChildren: () =>import('../modules/nav-province-submit/modules.routes').then((mod) => mod.NavProRoutingModule),
+  },
+  {
+    path: 'nav-province-contact',//中央部门所属高校联系人、部省合建高校联系人、出版单位联系人、省属高校流程管理员
+    // canActivate: [AuthGuard],
+    loadChildren: () =>import('../modules/nav-province-contact/modules.routes').then((mod) => mod.NavProContactRoutingModule),
+  },
+  {
+    path: 'nav-province-school-contact', //省属高校联系人
+    // canActivate: [AuthGuard],
+    loadChildren: () =>import('../modules/nav-province-school-contact/modules.routes').then((mod) => mod.NavProSchoolRoutingModule),
+  },
+  {
+    path: 'nav-review', //教材评审组成员
+    // canActivate: [AuthGuard],
+    loadChildren: () =>import('../modules/nav-review/modules.routes').then((mod) => mod.NavReviewRoutingModule),
+  },
+  {
+    path: 'nav-author', //作者 / 教师 / 主编
+    // canActivate: [AuthGuard],
+    loadChildren: () =>import('../modules/nav-author/modules.routes').then((mod) => mod.NavAuthorRoutingModule),
+  },
 ];

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

@@ -0,0 +1,4 @@
+<div class="bar">
+  <nz-avatar nzIcon="user" style="background-color:#87d068;"></nz-avatar>
+  <span>{{tbookSer.profile?.name}}</span>
+</div>

+ 8 - 0
projects/textbook/src/app/comp-nav/comp-nav.component.scss

@@ -0,0 +1,8 @@
+.bar{
+  width: 100%;
+  padding: 10px;
+  border-bottom: 1px solid #d3d3d3;
+  span{
+    margin-left: 10px;
+  }
+}

+ 24 - 0
projects/textbook/src/app/comp-nav/comp-nav.component.spec.ts

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

+ 20 - 0
projects/textbook/src/app/comp-nav/comp-nav.component.ts

@@ -0,0 +1,20 @@
+import { Component, OnInit } from '@angular/core';
+import { NzAvatarModule } from 'ng-zorro-antd/avatar';
+import { textbookServer } from "../../services/textbook";
+
+@Component({
+  selector: 'app-comp-nav',
+  standalone: true,
+  imports: [NzAvatarModule],
+  templateUrl: './comp-nav.component.html',
+  styleUrls: ['./comp-nav.component.scss'],
+})
+export class CompNavComponent implements OnInit {
+
+  constructor(
+    public tbookSer: textbookServer
+  ) {}
+
+  ngOnInit() {}
+
+}

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

@@ -1,6 +1,8 @@
-<div class="login-page">
-  <h2>本科国家级规划教材遴选报送系统</h2>
-
-  <router-outlet></router-outlet>
+<div class="page">
+  <div class="login-content">
+    <h2>本科国家级规划教材遴选报送系统</h2>
+    <router-outlet></router-outlet>
+  </div>
 </div>
 
+

+ 19 - 2
projects/textbook/src/app/comp-user/comp-user.component.scss

@@ -1,7 +1,24 @@
-.login-page{
+.page{
+  position: fixed;
+  top: 0px;
+  left: 0px;
+  background: #fff;
+  width: 100%;
+  height: 100%;
+  z-index: 100;
+  overflow: auto;
+  background: url('../../../public//img/banner-lab.png') no-repeat;
+  background-size: 100% 100%;
+}
+
+.login-content{
+  position: absolute;
+  transform:translateY(-50%);
+  top: 50%;
+  right: 100px;
   padding: 10px;
   text-align: center;
-  width: 600px;
+  max-width: 500px;
   margin: 0 auto;
   background: #f5f5f5;
 }

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

@@ -4,7 +4,7 @@
     <div
       class="option"
       [class.last]="$index == selector.length - 1"
-      [class.active]="item.type == current.type"
+      [class.active]="item.type == currentProfile.type"
       (click)="onChange(item)"
     >
       {{ item.name }}
@@ -12,14 +12,14 @@
     }
   </div>
   <div class="form">
-    <div class="title">{{ current.name }}</div>
+    <div class="title">{{ currentProfile.name }}</div>
     <form
       nz-form
       [formGroup]="validateForm"
       class="login-form"
       (ngSubmit)="submitForm()"
     >
-      <nz-form-item style="margin-bottom: 6px;">
+      <nz-form-item style="margin-bottom: 16px;">
         <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="user">用户名</nz-form-label>
         <nz-form-control>
           <nz-input-group>
@@ -32,7 +32,7 @@
           </nz-input-group>
         </nz-form-control>
       </nz-form-item>
-      <nz-form-item style="margin-bottom: 6px;">
+      <nz-form-item style="margin-bottom: 16px;">
         <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="password">密码</nz-form-label>
         <nz-form-control>
           <nz-input-group>
@@ -45,7 +45,7 @@
           </nz-input-group>
         </nz-form-control>
       </nz-form-item>
-      <nz-form-item style="margin-bottom: 6px;">
+      <nz-form-item style="margin-bottom: 16px;">
         <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="code">验证码</nz-form-label>
         <nz-form-control>
           <nz-input-group>

+ 4 - 3
projects/textbook/src/modules/login/login/login.component.scss

@@ -1,12 +1,12 @@
 .region {
-  width: 500px;
+  width: 450px;
   margin: 20px auto 50px;
   display: flex;
   justify-content: center;
   background-color: white;
   .selector {
     font-size: 14px;
-    width: 200px;
+    width: 150px;
     display: flex;
     flex-direction: column;
     .option {
@@ -15,7 +15,7 @@
       text-align: left;
     }
     .active {
-      background-color: #e61603;
+      background-color: #215ae5;
       color: white;
     }
     .last{
@@ -43,6 +43,7 @@
     }
     .login-form-margin{
       margin-bottom: 8px;
+      margin-top: 80px;
     }
     .login-form-button {
       width: 90%;

+ 36 - 18
projects/textbook/src/modules/login/login/login.component.ts

@@ -7,14 +7,12 @@ import {
   NonNullableFormBuilder,
   Validators,
 } from '@angular/forms';
-import { CommonCompModule } from '../common.modules'
+import { CommonCompModule } from '../common.modules';
+import { textbookServer } from '../../../services/textbook';
 @Component({
   selector: 'app-login',
   standalone: true,
-  imports: [
-    ReactiveFormsModule,
-    CommonCompModule
-  ],
+  imports: [ReactiveFormsModule, CommonCompModule],
   templateUrl: './login.component.html',
   styleUrl: './login.component.scss',
 })
@@ -34,29 +32,46 @@ export class LoginComponent {
     {
       name: '国家级管理员',
       type: 1,
+      route:'/nav-admin/home'
     },
     {
       name: '省级教育行政部门',
       type: 2,
+      route:'/nav-province-submit/home'
     },
     {
       name: '流程管理员登录',
       type: 3,
+      route:'/nav-province-contact/home'
     },
     {
-      name: '作者/主编',
+      name: '省属高校联系人',
       type: 4,
+      route:'/nav-province-school-contact/home'
+    },
+    {
+      name: '教材评审组成员',
+      type: 5,
+      route:'/nav-review/home'
+    },
+    {
+      name: '作者/教师/主编',
+      type: 6,
+      route:'/nav-author/home'
     },
   ];
-  current: any = {
-    name: '国家级管理员',
-    type: 1,
-  };
-  constructor(private fb: NonNullableFormBuilder, public router: Router) {}
+  currentProfile: any = this.selector[0]
+  constructor(
+    public tbookSer: textbookServer,
+    private fb: NonNullableFormBuilder,
+    public router: Router
+  ) {}
   submitForm(): void {
     if (this.validateForm.valid) {
-      console.log('submit', this.validateForm.value);
-      this.router.navigate(["/admin"])
+      console.log('submit', this.currentProfile);
+      localStorage.setItem('profile', JSON.stringify(this.currentProfile))
+      this.tbookSer.profile = this.currentProfile
+      this.router.navigate([this.currentProfile.route]);
     } else {
       Object.values(this.validateForm.controls).forEach((control) => {
         if (control.invalid) {
@@ -68,12 +83,15 @@ export class LoginComponent {
   }
 
   onChange(e: string) {
-    this.current = e;
+    this.currentProfile = e;
   }
 
-  goUrl(path:string){
-    this.router.navigate([path,{
-      // type: this.current.type,
-    }])
+  goUrl(path: string) {
+    this.router.navigate([
+      path,
+      {
+        // type: this.currentProfile.type,
+      },
+    ]);
   }
 }

+ 21 - 0
projects/textbook/src/modules/nav-admin/modules.routes.ts

@@ -0,0 +1,21 @@
+import { NgModule } from "@angular/core";
+import { RouterModule, Routes } from "@angular/router";
+import { PageHomeComponent } from './page-home/page-home.component';
+const routes: Routes = [
+  {
+    path: 'home',
+    component: PageHomeComponent,
+    children:[
+      // {
+      //   path: "",
+      //   redirectTo: "pay",
+      //   pathMatch: "full",
+      // },
+    ]
+  }
+];
+@NgModule({
+  imports: [RouterModule.forChild(routes)],
+  exports: [RouterModule],
+})
+export class NavAdminRoutingModule {}

+ 35 - 0
projects/textbook/src/modules/nav-admin/page-home/page-home.component.html

@@ -0,0 +1,35 @@
+<app-comp-nav></app-comp-nav>
+<div class="page">
+  <div class="content-left">
+    <ul nz-menu nzMode="inline" style="width: 240px">
+      @for (item of options; track item.id;let index = $index) { @if(item.child)
+      {
+      <li nz-submenu [nzTitle]="item.name" nzIcon="api" [nzOpen]="true">
+        <ul>
+          @for (child of item.child; track child.id;let idx = $index) {
+          <li
+            nz-menu-item
+            [nzSelected]="active == child.id"
+            (click)="toUrl('/nav-admin', child.id, { category: child.id })"
+          >
+            {{ child.name }}
+          </li>
+          }
+        </ul>
+      </li>
+      } @else {
+      <li
+        nz-menu-item
+        (click)="toUrl('/nav-admin', 'list')"
+        [nzSelected]="active == item.id"
+      >
+        <span nz-icon nzType="home" nzTheme="outline"></span>
+        <span>{{ item.name }}</span>
+      </li>
+      } }
+    </ul>
+  </div>
+  <div class="proview">
+    <router-outlet></router-outlet>
+  </div>
+</div>

+ 15 - 0
projects/textbook/src/modules/nav-admin/page-home/page-home.component.scss

@@ -0,0 +1,15 @@
+.page{
+  display: flex;
+  height: calc(100% - 60px);
+  // overflow-y: scroll;
+  overflow-y: hidden;
+  .content-left{
+    background-color:#fff;
+  }
+  .content-rifht{
+    height: 100%;
+    overflow-y: scroll;
+    padding: 20px 0 40px 0;
+    flex: 1;
+  }
+}

+ 24 - 0
projects/textbook/src/modules/nav-admin/page-home/page-home.component.spec.ts

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

+ 74 - 0
projects/textbook/src/modules/nav-admin/page-home/page-home.component.ts

@@ -0,0 +1,74 @@
+import { Component, OnInit } from '@angular/core';
+import { CompNavComponent } from '../../../app/comp-nav/comp-nav.component'
+import { RouterOutlet, Router } from '@angular/router';
+import { CommonCompModule } from '../../../services/common.modules'
+
+@Component({
+  selector: 'app-page-home',
+  standalone: true,
+  imports: [CompNavComponent,RouterOutlet,CommonCompModule],
+  templateUrl: './page-home.component.html',
+  styleUrls: ['./page-home.component.scss'],
+})
+export class PageHomeComponent  implements OnInit {
+
+  options:Array<any> = [
+    {
+      name:'教材管理',
+      id:'1',
+      child:[
+        {
+          name:'报送合集',
+          id:'1-1',
+        },
+        {
+          name:'全部材料',
+          id:'1-2',
+        },
+      ]
+    },
+    {
+      name:'用户管理',
+      id:'2',
+      child:[
+        {
+          name:'用户列表',
+          id:'2-1',
+        },
+        {
+          name:'用户组管理',
+          id:'2-2',
+        },
+      ]
+    },
+    {
+      name:'品牌化',
+      id:'3',
+      child:[
+        {
+          name:'登录框',
+          id:'3-1',
+        },
+        {
+          name:'消息设置',
+          id:'3-2',
+        },
+      ]
+    },
+    {
+      name:'字段管理',
+      id:'4',
+    },
+  ]
+  active:string = localStorage.getItem('active') || this.options[0].id
+  constructor(
+    public router: Router,
+  ) { }
+
+  ngOnInit() {}
+  toUrl(url:string, cateid:string, params?:any){
+    this.active = cateid
+    localStorage.setItem('active', cateid)
+    // this.router.navigate([url, params ? params : {}])
+  }
+}

+ 21 - 0
projects/textbook/src/modules/nav-author/modules.routes.ts

@@ -0,0 +1,21 @@
+import { NgModule } from "@angular/core";
+import { RouterModule, Routes } from "@angular/router";
+import { PageHomeComponent } from './page-home/page-home.component';
+const routes: Routes = [
+  {
+    path: 'home',
+    component: PageHomeComponent,
+    children:[
+      // {
+      //   path: "",
+      //   redirectTo: "pay",
+      //   pathMatch: "full",
+      // },
+    ]
+  }
+];
+@NgModule({
+  imports: [RouterModule.forChild(routes)],
+  exports: [RouterModule],
+})
+export class NavAuthorRoutingModule {}

+ 35 - 0
projects/textbook/src/modules/nav-author/page-home/page-home.component.html

@@ -0,0 +1,35 @@
+<app-comp-nav></app-comp-nav>
+<div class="page">
+  <div class="content-left">
+    <ul nz-menu nzMode="inline" style="width: 240px">
+      @for (item of options; track item.id;let index = $index) { @if(item.child)
+      {
+      <li nz-submenu [nzTitle]="item.name" nzIcon="api" [nzOpen]="true">
+        <ul>
+          @for (child of item.child; track child.id;let idx = $index) {
+          <li
+            nz-menu-item
+            [nzSelected]="active == child.id"
+            (click)="toUrl('/nav-admin', child.id, { category: child.id })"
+          >
+            {{ child.name }}
+          </li>
+          }
+        </ul>
+      </li>
+      } @else {
+      <li
+        nz-menu-item
+        (click)="toUrl('/nav-admin', 'list')"
+        [nzSelected]="active == item.id"
+      >
+        <span nz-icon nzType="home" nzTheme="outline"></span>
+        <span>{{ item.name }}</span>
+      </li>
+      } }
+    </ul>
+  </div>
+  <div class="proview">
+    <router-outlet></router-outlet>
+  </div>
+</div>

+ 15 - 0
projects/textbook/src/modules/nav-author/page-home/page-home.component.scss

@@ -0,0 +1,15 @@
+.page{
+  display: flex;
+  height: calc(100% - 60px);
+  // overflow-y: scroll;
+  overflow-y: hidden;
+  .content-left{
+    background-color:#fff;
+  }
+  .content-rifht{
+    height: 100%;
+    overflow-y: scroll;
+    padding: 20px 0 40px 0;
+    flex: 1;
+  }
+}

+ 24 - 0
projects/textbook/src/modules/nav-author/page-home/page-home.component.spec.ts

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

+ 40 - 0
projects/textbook/src/modules/nav-author/page-home/page-home.component.ts

@@ -0,0 +1,40 @@
+import { Component, OnInit } from '@angular/core';
+import { CompNavComponent } from '../../../app/comp-nav/comp-nav.component'
+import { RouterOutlet, Router } from '@angular/router';
+import { CommonCompModule } from '../../../services/common.modules'
+
+@Component({
+  selector: 'app-page-home',
+  standalone: true,
+  imports: [CompNavComponent,RouterOutlet,CommonCompModule],
+  templateUrl: './page-home.component.html',
+  styleUrls: ['./page-home.component.scss'],
+})
+export class PageHomeComponent  implements OnInit {
+
+  options:Array<any> = [
+    {
+      name:'个人空间',
+      id:'1',
+    },
+    {
+      name:'回收站',
+      id:'2',
+    },
+    {
+      name:'个人信息',
+      id:'3',
+    },
+  ]
+  active:string = localStorage.getItem('active') || this.options[0].id
+  constructor(
+    public router: Router,
+  ) { }
+
+  ngOnInit() {}
+  toUrl(url:string, cateid:string, params?:any){
+    this.active = cateid
+    localStorage.setItem('active', cateid)
+    // this.router.navigate([url, params ? params : {}])
+  }
+}

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

@@ -0,0 +1,21 @@
+import { NgModule } from "@angular/core";
+import { RouterModule, Routes } from "@angular/router";
+import { PageHomeComponent } from './page-home/page-home.component';
+const routes: Routes = [
+  {
+    path: 'home',
+    component: PageHomeComponent,
+    children:[
+      // {
+      //   path: "",
+      //   redirectTo: "pay",
+      //   pathMatch: "full",
+      // },
+    ]
+  }
+];
+@NgModule({
+  imports: [RouterModule.forChild(routes)],
+  exports: [RouterModule],
+})
+export class NavProContactRoutingModule {}

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

@@ -0,0 +1,35 @@
+<app-comp-nav></app-comp-nav>
+<div class="page">
+  <div class="content-left">
+    <ul nz-menu nzMode="inline" style="width: 240px">
+      @for (item of options; track item.id;let index = $index) { @if(item.child)
+      {
+      <li nz-submenu [nzTitle]="item.name" nzIcon="api" [nzOpen]="true">
+        <ul>
+          @for (child of item.child; track child.id;let idx = $index) {
+          <li
+            nz-menu-item
+            [nzSelected]="active == child.id"
+            (click)="toUrl('/nav-admin', child.id, { category: child.id })"
+          >
+            {{ child.name }}
+          </li>
+          }
+        </ul>
+      </li>
+      } @else {
+      <li
+        nz-menu-item
+        (click)="toUrl('/nav-admin', 'list')"
+        [nzSelected]="active == item.id"
+      >
+        <span nz-icon nzType="home" nzTheme="outline"></span>
+        <span>{{ item.name }}</span>
+      </li>
+      } }
+    </ul>
+  </div>
+  <div class="proview">
+    <router-outlet></router-outlet>
+  </div>
+</div>

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

@@ -0,0 +1,15 @@
+.page{
+  display: flex;
+  height: calc(100% - 60px);
+  // overflow-y: scroll;
+  overflow-y: hidden;
+  .content-left{
+    background-color:#fff;
+  }
+  .content-rifht{
+    height: 100%;
+    overflow-y: scroll;
+    padding: 20px 0 40px 0;
+    flex: 1;
+  }
+}

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

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

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

@@ -0,0 +1,50 @@
+import { Component, OnInit } from '@angular/core';
+import { CompNavComponent } from '../../../app/comp-nav/comp-nav.component'
+import { RouterOutlet, Router } from '@angular/router';
+import { CommonCompModule } from '../../../services/common.modules'
+
+@Component({
+  selector: 'app-page-home',
+  standalone: true,
+  imports: [CompNavComponent,RouterOutlet,CommonCompModule],
+  templateUrl: './page-home.component.html',
+  styleUrls: ['./page-home.component.scss'],
+})
+export class PageHomeComponent  implements OnInit {
+
+  options:Array<any> = [
+    {
+      name:'报送流程',
+      id:'1',
+    },
+    {
+      name:'用户管理',
+      id:'2',
+      child:[
+        {
+          name:'用户列表',
+          id:'2-1',
+        },
+        {
+          name:'用户组管理',
+          id:'2-2',
+        },
+        {
+          name:'邀请注册',
+          id:'2-3',
+        },
+      ]
+    }
+  ]
+  active:string = localStorage.getItem('active') || this.options[0].id
+  constructor(
+    public router: Router,
+  ) { }
+
+  ngOnInit() {}
+  toUrl(url:string, cateid:string, params?:any){
+    this.active = cateid
+    localStorage.setItem('active', cateid)
+    // this.router.navigate([url, params ? params : {}])
+  }
+}

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

@@ -0,0 +1,21 @@
+import { NgModule } from "@angular/core";
+import { RouterModule, Routes } from "@angular/router";
+import { PageHomeComponent } from './page-home/page-home.component';
+const routes: Routes = [
+  {
+    path: 'home',
+    component: PageHomeComponent,
+    children:[
+      // {
+      //   path: "",
+      //   redirectTo: "pay",
+      //   pathMatch: "full",
+      // },
+    ]
+  }
+];
+@NgModule({
+  imports: [RouterModule.forChild(routes)],
+  exports: [RouterModule],
+})
+export class NavProSchoolRoutingModule {}

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

@@ -0,0 +1,35 @@
+<app-comp-nav></app-comp-nav>
+<div class="page">
+  <div class="content-left">
+    <ul nz-menu nzMode="inline" style="width: 240px">
+      @for (item of options; track item.id;let index = $index) { @if(item.child)
+      {
+      <li nz-submenu [nzTitle]="item.name" nzIcon="api" [nzOpen]="true">
+        <ul>
+          @for (child of item.child; track child.id;let idx = $index) {
+          <li
+            nz-menu-item
+            [nzSelected]="active == child.id"
+            (click)="toUrl('/nav-admin', child.id, { category: child.id })"
+          >
+            {{ child.name }}
+          </li>
+          }
+        </ul>
+      </li>
+      } @else {
+      <li
+        nz-menu-item
+        (click)="toUrl('/nav-admin', 'list')"
+        [nzSelected]="active == item.id"
+      >
+        <span nz-icon nzType="home" nzTheme="outline"></span>
+        <span>{{ item.name }}</span>
+      </li>
+      } }
+    </ul>
+  </div>
+  <div class="proview">
+    <router-outlet></router-outlet>
+  </div>
+</div>

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

@@ -0,0 +1,15 @@
+.page{
+  display: flex;
+  height: calc(100% - 60px);
+  // overflow-y: scroll;
+  overflow-y: hidden;
+  .content-left{
+    background-color:#fff;
+  }
+  .content-rifht{
+    height: 100%;
+    overflow-y: scroll;
+    padding: 20px 0 40px 0;
+    flex: 1;
+  }
+}

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

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

+ 50 - 0
projects/textbook/src/modules/nav-province-school-contact/page-home/page-home.component.ts

@@ -0,0 +1,50 @@
+import { Component, OnInit } from '@angular/core';
+import { CompNavComponent } from '../../../app/comp-nav/comp-nav.component'
+import { RouterOutlet, Router } from '@angular/router';
+import { CommonCompModule } from '../../../services/common.modules'
+
+@Component({
+  selector: 'app-page-home',
+  standalone: true,
+  imports: [CompNavComponent,RouterOutlet,CommonCompModule],
+  templateUrl: './page-home.component.html',
+  styleUrls: ['./page-home.component.scss'],
+})
+export class PageHomeComponent  implements OnInit {
+
+  options:Array<any> = [
+    {
+      name:'校内空间',
+      id:'1',
+    },
+    {
+      name:'用户管理',
+      id:'2',
+      child:[
+        {
+          name:'邀请注册',
+          id:'2-1',
+        },
+        {
+          name:'用户列表',
+          id:'2-2',
+        },
+      ]
+    },
+    {
+      name:'个人信息',
+      id:'3',
+    },
+  ]
+  active:string = localStorage.getItem('active') || this.options[0].id
+  constructor(
+    public router: Router,
+  ) { }
+
+  ngOnInit() {}
+  toUrl(url:string, cateid:string, params?:any){
+    this.active = cateid
+    localStorage.setItem('active', cateid)
+    // this.router.navigate([url, params ? params : {}])
+  }
+}

+ 21 - 0
projects/textbook/src/modules/nav-province-submit/modules.routes.ts

@@ -0,0 +1,21 @@
+import { NgModule } from "@angular/core";
+import { RouterModule, Routes } from "@angular/router";
+import { PageHomeComponent } from './page-home/page-home.component';
+const routes: Routes = [
+  {
+    path: 'home',
+    component: PageHomeComponent,
+    children:[
+      // {
+      //   path: "",
+      //   redirectTo: "pay",
+      //   pathMatch: "full",
+      // },
+    ]
+  }
+];
+@NgModule({
+  imports: [RouterModule.forChild(routes)],
+  exports: [RouterModule],
+})
+export class NavProRoutingModule {}

+ 35 - 0
projects/textbook/src/modules/nav-province-submit/page-home/page-home.component.html

@@ -0,0 +1,35 @@
+<app-comp-nav></app-comp-nav>
+<div class="page">
+  <div class="content-left">
+    <ul nz-menu nzMode="inline" style="width: 240px">
+      @for (item of options; track item.id;let index = $index) { @if(item.child)
+      {
+      <li nz-submenu [nzTitle]="item.name" nzIcon="api" [nzOpen]="true">
+        <ul>
+          @for (child of item.child; track child.id;let idx = $index) {
+          <li
+            nz-menu-item
+            [nzSelected]="active == child.id"
+            (click)="toUrl('/nav-admin', child.id, { category: child.id })"
+          >
+            {{ child.name }}
+          </li>
+          }
+        </ul>
+      </li>
+      } @else {
+      <li
+        nz-menu-item
+        (click)="toUrl('/nav-admin', 'list')"
+        [nzSelected]="active == item.id"
+      >
+        <span nz-icon nzType="home" nzTheme="outline"></span>
+        <span>{{ item.name }}</span>
+      </li>
+      } }
+    </ul>
+  </div>
+  <div class="proview">
+    <router-outlet></router-outlet>
+  </div>
+</div>

+ 15 - 0
projects/textbook/src/modules/nav-province-submit/page-home/page-home.component.scss

@@ -0,0 +1,15 @@
+.page{
+  display: flex;
+  height: calc(100% - 60px);
+  // overflow-y: scroll;
+  overflow-y: hidden;
+  .content-left{
+    background-color:#fff;
+  }
+  .content-rifht{
+    height: 100%;
+    overflow-y: scroll;
+    padding: 20px 0 40px 0;
+    flex: 1;
+  }
+}

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

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

+ 38 - 0
projects/textbook/src/modules/nav-province-submit/page-home/page-home.component.ts

@@ -0,0 +1,38 @@
+import { Component, OnInit } from '@angular/core';
+import { CompNavComponent } from '../../../app/comp-nav/comp-nav.component'
+import { RouterOutlet, Router } from '@angular/router';
+import { CommonCompModule } from '../../../services/common.modules'
+
+@Component({
+  selector: 'app-page-home',
+  standalone: true,
+  imports: [CompNavComponent,RouterOutlet,CommonCompModule],
+  templateUrl: './page-home.component.html',
+  styleUrls: ['./page-home.component.scss'],
+})
+export class PageHomeComponent  implements OnInit {
+
+  options:Array<any> = [
+    {
+      name:'省内合集',
+      id:'1',
+      // child:[
+      //   {
+      //     name:'确认报送',
+      //     id:'1-1',
+      //   },
+      // ]
+    },
+  ]
+  active:string = localStorage.getItem('active') || this.options[0].id
+  constructor(
+    public router: Router,
+  ) { }
+
+  ngOnInit() {}
+  toUrl(url:string, cateid:string, params?:any){
+    this.active = cateid
+    localStorage.setItem('active', cateid)
+    // this.router.navigate([url, params ? params : {}])
+  }
+}

+ 21 - 0
projects/textbook/src/modules/nav-review/modules.routes.ts

@@ -0,0 +1,21 @@
+import { NgModule } from "@angular/core";
+import { RouterModule, Routes } from "@angular/router";
+import { PageHomeComponent } from './page-home/page-home.component';
+const routes: Routes = [
+  {
+    path: 'home',
+    component: PageHomeComponent,
+    children:[
+      // {
+      //   path: "",
+      //   redirectTo: "pay",
+      //   pathMatch: "full",
+      // },
+    ]
+  }
+];
+@NgModule({
+  imports: [RouterModule.forChild(routes)],
+  exports: [RouterModule],
+})
+export class NavReviewRoutingModule {}

+ 35 - 0
projects/textbook/src/modules/nav-review/page-home/page-home.component.html

@@ -0,0 +1,35 @@
+<app-comp-nav></app-comp-nav>
+<div class="page">
+  <div class="content-left">
+    <ul nz-menu nzMode="inline" style="width: 240px">
+      @for (item of options; track item.id;let index = $index) { @if(item.child)
+      {
+      <li nz-submenu [nzTitle]="item.name" nzIcon="api" [nzOpen]="true">
+        <ul>
+          @for (child of item.child; track child.id;let idx = $index) {
+          <li
+            nz-menu-item
+            [nzSelected]="active == child.id"
+            (click)="toUrl('/nav-admin', child.id, { category: child.id })"
+          >
+            {{ child.name }}
+          </li>
+          }
+        </ul>
+      </li>
+      } @else {
+      <li
+        nz-menu-item
+        (click)="toUrl('/nav-admin', 'list')"
+        [nzSelected]="active == item.id"
+      >
+        <span nz-icon nzType="home" nzTheme="outline"></span>
+        <span>{{ item.name }}</span>
+      </li>
+      } }
+    </ul>
+  </div>
+  <div class="proview">
+    <router-outlet></router-outlet>
+  </div>
+</div>

+ 15 - 0
projects/textbook/src/modules/nav-review/page-home/page-home.component.scss

@@ -0,0 +1,15 @@
+.page{
+  display: flex;
+  height: calc(100% - 60px);
+  // overflow-y: scroll;
+  overflow-y: hidden;
+  .content-left{
+    background-color:#fff;
+  }
+  .content-rifht{
+    height: 100%;
+    overflow-y: scroll;
+    padding: 20px 0 40px 0;
+    flex: 1;
+  }
+}

+ 24 - 0
projects/textbook/src/modules/nav-review/page-home/page-home.component.spec.ts

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

+ 36 - 0
projects/textbook/src/modules/nav-review/page-home/page-home.component.ts

@@ -0,0 +1,36 @@
+import { Component, OnInit } from '@angular/core';
+import { CompNavComponent } from '../../../app/comp-nav/comp-nav.component'
+import { RouterOutlet, Router } from '@angular/router';
+import { CommonCompModule } from '../../../services/common.modules'
+
+@Component({
+  selector: 'app-page-home',
+  standalone: true,
+  imports: [CompNavComponent,RouterOutlet,CommonCompModule],
+  templateUrl: './page-home.component.html',
+  styleUrls: ['./page-home.component.scss'],
+})
+export class PageHomeComponent  implements OnInit {
+
+  options:Array<any> = [
+    {
+      name:'报送流程',
+      id:'1',
+    },
+    {
+      name:'个人信息',
+      id:'2',
+    },
+  ]
+  active:string = localStorage.getItem('active') || this.options[0].id
+  constructor(
+    public router: Router,
+  ) { }
+
+  ngOnInit() {}
+  toUrl(url:string, cateid:string, params?:any){
+    this.active = cateid
+    localStorage.setItem('active', cateid)
+    // this.router.navigate([url, params ? params : {}])
+  }
+}

+ 20 - 0
projects/textbook/src/services/common.modules.ts

@@ -0,0 +1,20 @@
+import { NgModule } from '@angular/core';
+import { FormsModule } from '@angular/forms';
+import { NzFormModule } from 'ng-zorro-antd/form';
+import { NzIconModule } from 'ng-zorro-antd/icon';
+import { NzTableModule } from "ng-zorro-antd/table";
+import { NzTagModule } from "ng-zorro-antd/tag";
+import { NzDropDownModule } from "ng-zorro-antd/dropdown";
+import { NzMenuModule } from 'ng-zorro-antd/menu';
+@NgModule({
+  exports: [
+    FormsModule,
+    NzFormModule,
+    NzIconModule,
+    NzTableModule,
+    NzTagModule,
+    NzDropDownModule,
+    NzMenuModule
+  ]
+})
+export class CommonCompModule { }

+ 1 - 0
projects/textbook/src/services/textbook.ts

@@ -8,6 +8,7 @@ import { HttpClient } from "@angular/common/http";
 export class textbookServer {
   company: string = localStorage.getItem("company")!;
   theme: boolean = false; //深色主题模式
+  profile:any = JSON.parse(localStorage.getItem('profile')!)
   constructor(private http: HttpClient) {
   }
   authMobile(mobile: string): boolean {