Browse Source

update comp-manage

warrior 8 months ago
parent
commit
8bac6eda0c
35 changed files with 245 additions and 773 deletions
  1. 13 7
      projects/textbook/src/app/app.routes.ts
  2. 1 1
      projects/textbook/src/app/comp-manage/comp-manage.component.html
  3. 7 1
      projects/textbook/src/app/comp-manage/comp-manage.component.scss
  4. 6 6
      projects/textbook/src/app/comp-manage/comp-manage.component.spec.ts
  5. 175 0
      projects/textbook/src/app/comp-manage/comp-manage.component.ts
  6. 1 1
      projects/textbook/src/app/comp-nav/comp-nav.component.html
  7. 6 6
      projects/textbook/src/modules/login/login/login.component.ts
  8. 12 19
      projects/textbook/src/modules/nav-admin/modules.routes.ts
  9. 0 35
      projects/textbook/src/modules/nav-admin/page-home/page-home.component.html
  10. 0 15
      projects/textbook/src/modules/nav-admin/page-home/page-home.component.scss
  11. 0 24
      projects/textbook/src/modules/nav-admin/page-home/page-home.component.spec.ts
  12. 0 87
      projects/textbook/src/modules/nav-admin/page-home/page-home.component.ts
  13. 0 6
      projects/textbook/src/modules/nav-author/modules.routes.ts
  14. 0 24
      projects/textbook/src/modules/nav-author/page-home/page-home.component.spec.ts
  15. 0 50
      projects/textbook/src/modules/nav-author/page-home/page-home.component.ts
  16. 6 8
      projects/textbook/src/modules/nav-province-contact/modules.routes.ts
  17. 0 35
      projects/textbook/src/modules/nav-province-contact/page-home/page-home.component.html
  18. 0 15
      projects/textbook/src/modules/nav-province-contact/page-home/page-home.component.scss
  19. 0 50
      projects/textbook/src/modules/nav-province-contact/page-home/page-home.component.ts
  20. 6 8
      projects/textbook/src/modules/nav-province-school-contact/modules.routes.ts
  21. 0 35
      projects/textbook/src/modules/nav-province-school-contact/page-home/page-home.component.html
  22. 0 15
      projects/textbook/src/modules/nav-province-school-contact/page-home/page-home.component.scss
  23. 0 24
      projects/textbook/src/modules/nav-province-school-contact/page-home/page-home.component.spec.ts
  24. 0 50
      projects/textbook/src/modules/nav-province-school-contact/page-home/page-home.component.ts
  25. 6 8
      projects/textbook/src/modules/nav-province-submit/modules.routes.ts
  26. 0 35
      projects/textbook/src/modules/nav-province-submit/page-home/page-home.component.html
  27. 0 15
      projects/textbook/src/modules/nav-province-submit/page-home/page-home.component.scss
  28. 0 24
      projects/textbook/src/modules/nav-province-submit/page-home/page-home.component.spec.ts
  29. 0 38
      projects/textbook/src/modules/nav-province-submit/page-home/page-home.component.ts
  30. 2 9
      projects/textbook/src/modules/nav-review/modules.routes.ts
  31. 0 35
      projects/textbook/src/modules/nav-review/page-home/page-home.component.html
  32. 0 18
      projects/textbook/src/modules/nav-review/page-home/page-home.component.scss
  33. 0 24
      projects/textbook/src/modules/nav-review/page-home/page-home.component.spec.ts
  34. 0 44
      projects/textbook/src/modules/nav-review/page-home/page-home.component.ts
  35. 4 1
      projects/textbook/src/services/auth.service.ts

+ 13 - 7
projects/textbook/src/app/app.routes.ts

@@ -2,7 +2,7 @@ import { Routes,mapToCanActivate } from '@angular/router';
 import { AuthGuard } from '../services/auth.guard';
 import { CompUserComponent } from './comp-user/comp-user.component';
 import { ProfileComponent } from '../modules/user/profile/profile.component'
-
+import { CompManageComponent } from './comp-manage/comp-manage.component'
 export const routes: Routes = [
   { path: '',loadComponent:()=>import('../modules/textbook/page-home/page-home.component').then(m=>m.PageHomeComponent) }, // 默认跳转到 ''
   {
@@ -16,32 +16,38 @@ export const routes: Routes = [
   },
   {
     path: 'nav-admin', //国家级管理员管理平台
-    //canActivate: mapToCanActivate([AuthGuard]),
+    component: CompManageComponent,
+    canActivate: mapToCanActivate([AuthGuard]),
     loadChildren: () =>import('../modules/nav-admin/modules.routes').then((mod) => mod.NavAdminRoutingModule),
   },
   {
     path: 'nav-province-submit',//省级教育行政部门
-    //canActivate: mapToCanActivate([AuthGuard]),
+    component: CompManageComponent,
+    canActivate: mapToCanActivate([AuthGuard]),
     loadChildren: () =>import('../modules/nav-province-submit/modules.routes').then((mod) => mod.NavProRoutingModule),
   },
   {
     path: 'nav-province-contact',//中央部门所属高校联系人、部省合建高校联系人、出版单位联系人、省属高校流程管理员
-    //canActivate: mapToCanActivate([AuthGuard]),
+    component: CompManageComponent,
+    canActivate: mapToCanActivate([AuthGuard]),
     loadChildren: () =>import('../modules/nav-province-contact/modules.routes').then((mod) => mod.NavProContactRoutingModule),
   },
   {
     path: 'nav-province-school-contact', //省属高校联系人
-    //canActivate: mapToCanActivate([AuthGuard]),
+    component: CompManageComponent,
+    canActivate: mapToCanActivate([AuthGuard]),
     loadChildren: () =>import('../modules/nav-province-school-contact/modules.routes').then((mod) => mod.NavProSchoolRoutingModule),
   },
   {
     path: 'nav-review', //教材评审组成员
-    //canActivate: mapToCanActivate([AuthGuard]),
+    component: CompManageComponent,
+    canActivate: mapToCanActivate([AuthGuard]),
     loadChildren: () =>import('../modules/nav-review/modules.routes').then((mod) => mod.NavReviewRoutingModule),
   },
   {
     path: 'nav-author', //作者 / 教师 / 主编
-    //canActivate: mapToCanActivate([AuthGuard]),
+    component: CompManageComponent,
+    canActivate: mapToCanActivate([AuthGuard]),
     loadChildren: () =>import('../modules/nav-author/modules.routes').then((mod) => mod.NavAuthorRoutingModule),
   },
 ];

+ 1 - 1
projects/textbook/src/modules/nav-author/page-home/page-home.component.html → projects/textbook/src/app/comp-manage/comp-manage.component.html

@@ -16,7 +16,7 @@
       nzMode="inline"
       style="width: 100%; background: #f9eaea"
     >
-      @for (item of options; track item.id;let index = $index) { @if(item.child)
+      @for (item of optionsMap[textbook.profile?.type]; track item.id;let index = $index) { @if(item.child)
       {
       <li nz-submenu [nzTitle]="item.name" nzIcon="api" [nzOpen]="true">
         <ul>

+ 7 - 1
projects/textbook/src/modules/nav-author/page-home/page-home.component.scss → projects/textbook/src/app/comp-manage/comp-manage.component.scss

@@ -32,8 +32,8 @@
     background-color: white;
     border-radius: 10px;
   }
-
 }
+
 ::ng-deep .ant-menu-sub.ant-menu-inline{
   background: #f9eaea;
 }
@@ -43,6 +43,9 @@
 ::ng-deep .ant-menu-light .ant-menu-submenu-title:hover{
   color: #c6233f !important;
 }
+::ng-deep .ant-menu-submenu:hover > .ant-menu-submenu-title > .ant-menu-submenu-arrow{
+  color: #c6233f !important;
+}
 ::ng-deep .ant-menu-inline .ant-menu-item::after{
   border-right: 3px solid #c6233f;
 }
@@ -53,4 +56,7 @@
 ::ng-deep .ant-menu-submenu-selected{
   background-color: #f4cbcd;
   color: #c6233f !important;
+}
+::ng-deep  .ant-menu-light .ant-menu-submenu-active{
+  color:black;
 }

+ 6 - 6
projects/textbook/src/modules/nav-province-contact/page-home/page-home.component.spec.ts → projects/textbook/src/app/comp-manage/comp-manage.component.spec.ts

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

+ 175 - 0
projects/textbook/src/app/comp-manage/comp-manage.component.ts

@@ -0,0 +1,175 @@
+import { Component, OnInit} from '@angular/core';
+import { CompNavComponent } from '../comp-nav/comp-nav.component';
+import { RouterOutlet, Router } from '@angular/router';
+import { CommonCompModule } from '../../services/common.modules';
+import { MatIconModule } from '@angular/material/icon';
+import { textbookServer } from '../../services/textbook';
+@Component({
+  selector: 'app-comp-manage',
+  standalone: true,
+  imports: [CompNavComponent, RouterOutlet, CommonCompModule,MatIconModule],
+  templateUrl: './comp-manage.component.html',
+  styleUrls: ['./comp-manage.component.scss'],
+})
+export class CompManageComponent implements OnInit {
+  optionsMap: any = {
+    "navAdmin":[
+      {
+        name:'教材管理',
+        id:'1',
+        child:[
+          {
+            name:'报送合集',
+            path:"/nav-admin/manage/collection",
+            id:'1-1',
+          },
+          {
+            name:'全部材料',
+            id:'1-2',
+          },
+        ]
+      },
+      {
+        name:'用户管理',
+        id:'2',
+        child:[
+          {
+            name:'用户审核',
+            id:'2-1',
+          },
+          {
+            name:'注册账户',
+            path:"/nav-admin/manage/user",
+            id:'2-2',
+          },
+          {
+            name:'用户组管理',
+            path:"/nav-admin/manage/role",
+            id:'2-3',
+          },
+        ]
+      },
+      {
+        name:'品牌化',
+        id:'3',
+        child:[
+          {
+            name:'登录框',
+            id:'3-1',
+          },
+          {
+            name:'消息设置',
+            id:'3-2',
+          },
+        ]
+      },
+      {
+        name:'字段管理',
+        id:'4',
+      },
+    ],
+    "navProvinceSubmit":[
+      {
+        name:'省内合集',
+        id:'1',
+      },
+    ],
+    "navProvinceContact":[
+      {
+        name:'报送流程',
+        id:'1',
+      },
+      {
+        name:'用户管理',
+        id:'2',
+        child:[
+          {
+            name:'用户列表',
+            id:'2-1',
+          },
+          {
+            name:'用户组管理',
+            id:'2-2',
+          },
+          {
+            name:'邀请注册',
+            id:'2-3',
+          },
+        ]
+      }
+    ],
+    "navProvinceSchoolContact":[
+      {
+        name:'校内空间',
+        id:'1',
+      },
+      {
+        name:'用户管理',
+        id:'2',
+        child:[
+          {
+            name:'邀请注册',
+            id:'2-1',
+          },
+          {
+            name:'用户列表',
+            id:'2-2',
+          },
+        ]
+      },
+      {
+        name:'个人信息',
+        id:'3',
+      },
+    ],
+    "navReview":[
+      {
+        name:'报送流程',
+        id:'1',
+        path: '/nav-review/home/apply',
+      },
+      {
+        name:'个人信息',
+        id:'2',
+        path: '/nav-review/profile',
+      },
+    ],
+    "navAuthor":[
+      {
+        name: '个人空间',
+        id: '1',
+        path: '/nav-author/manage/space',
+      },
+      {
+        name: '回收站',
+        id: '2',
+        path: '/nav-author/manage/textbook',
+        params: {
+          isDeleted: true,
+        },
+      },
+    ],
+  } 
+  active: string = localStorage.getItem('active') || '1';
+  isCollapsed:boolean = false;
+
+  constructor(public router: Router,public textbook:textbookServer) {
+   }
+
+  ngOnInit() {
+  }
+  toggleCollapsed(): void {
+    this.isCollapsed = !this.isCollapsed;
+  }
+  toUrl(child: any) {
+    let cateid = child.id;
+    this.active = cateid;
+    localStorage.setItem('active', cateid);
+    console.log(child);
+    if (child.params) {
+      this.router.navigate([child.path, child?.params]);
+    } else {
+      this.router.navigate([child.path]);
+    }
+  }
+}

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

@@ -31,7 +31,7 @@
           style="margin-bottom: 6px"
           >我的</a
         >
-        <a nz-button nzType="link" (click)="clickMe()">退出登录</a>
+        <a nz-button nzType="link" (click)="authServr.logout()">退出登录</a>
       </div>
     </ng-template>
   </div>

+ 6 - 6
projects/textbook/src/modules/login/login/login.component.ts

@@ -33,32 +33,32 @@ export class LoginComponent {
     {
       name: '国家级管理员',
       type: 1,
-      route: '/nav-admin/home',
+      route: '/nav-admin',
     },
     {
       name: '省级教育行政部门',
       type: 2,
-      route: '/nav-province-submit/home',
+      route: '/nav-province-submit',
     },
     {
       name: '流程管理员登录',
       type: 3,
-      route: '/nav-province-contact/home',
+      route: '/nav-province-contact',
     },
     {
       name: '省属高校联系人',
       type: 4,
-      route: '/nav-province-school-contact/home',
+      route: '/nav-province-school-contact',
     },
     {
       name: '教材评审组成员',
       type: 5,
-      route: '/nav-review/home',
+      route: '/nav-review',
     },
     {
       name: '作者/教师/主编',
       type: 6,
-      route:'/nav-author/manage/textbook'
+      route:'/nav-author/manage/space'
     },
   ];
   currentProfile: any = this.selector[0];

+ 12 - 19
projects/textbook/src/modules/nav-admin/modules.routes.ts

@@ -1,39 +1,32 @@
-import { NgModule } from "@angular/core";
-import { RouterModule, Routes } from "@angular/router";
-import { PageCollectionComponent } from "./page-collection/page-collection.component";
-import { PageHomeComponent } from './page-home/page-home.component';
-import { PageRoleComponent } from "./page-role/page-role.component";
-import { PageUserComponent } from "./page-user/page-user.component";
+import { NgModule } from '@angular/core';
+import { RouterModule, Routes } from '@angular/router';
+import { PageCollectionComponent } from './page-collection/page-collection.component';
+import { PageRoleComponent } from './page-role/page-role.component';
+import { PageUserComponent } from './page-user/page-user.component';
 const routes: Routes = [
   {
-    path: 'home',
-    component: PageHomeComponent,
-    children:[
-      // {
-      //   path: "",
-      //   redirectTo: "pay",
-      //   pathMatch: "full",
-      // },
-    ]
+    path: '',
+    redirectTo:'manage/collection',
+    pathMatch: "full",
   },
   {
     path: 'manage',
-    component: PageHomeComponent,
     children:[
       {
-        path: 'user',//列表
+        path: 'user', //列表
         component: PageUserComponent,
       },
       {
-        path: 'role',//列表
+        path: 'role', //列表
         component: PageRoleComponent,
       },
       {
-        path: 'collection',//列表
+        path: 'collection', //列表
         component: PageCollectionComponent,
       },
     ]
   }
+  
 ];
 @NgModule({
   imports: [RouterModule.forChild(routes)],

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

@@ -1,35 +0,0 @@
-<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(child)"
-          >
-            {{ child.name }}
-          </li>
-          }
-        </ul>
-      </li>
-      } @else {
-      <li
-        nz-menu-item
-        (click)="toUrl(item)"
-        [nzSelected]="active == item.id"
-      >
-        <span nz-icon nzType="home" nzTheme="outline"></span>
-        <span>{{ item.name }}</span>
-      </li>
-      } }
-    </ul>
-  </div>
-  <div class="preview">
-    <router-outlet></router-outlet>
-  </div>
-</div>

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

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

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

@@ -1,24 +0,0 @@
-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();
-  });
-});

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

@@ -1,87 +0,0 @@
-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:'报送合集',
-          path:"/nav-admin/manage/collection",
-          id:'1-1',
-        },
-        {
-          name:'全部材料',
-          id:'1-2',
-        },
-      ]
-    },
-    {
-      name:'用户管理',
-      id:'2',
-      child:[
-        {
-          name:'用户审核',
-          id:'2-1',
-        },
-        {
-          name:'注册账户',
-          path:"/nav-admin/manage/user",
-          id:'2-2',
-        },
-        {
-          name:'用户组管理',
-          path:"/nav-admin/manage/role",
-          id:'2-3',
-        },
-      ]
-    },
-    {
-      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(child: any) {
-    let cateid = child.id;
-    this.active = cateid;
-    localStorage.setItem('active', cateid);
-    console.log(child);
-    if (child.params) {
-      this.router.navigate([child.path, child?.params]);
-    } else {
-      this.router.navigate([child.path]);
-    }
-  }
-}

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

@@ -1,6 +1,5 @@
 import { NgModule } from '@angular/core';
 import { RouterModule, Routes } from '@angular/router';
-import { PageHomeComponent } from './page-home/page-home.component';
 import { PageTextbookComponent } from './components/page-textbook/page-textbook.component';
 import { ApplyComponent } from './apply/apply.component';
 // import { ProfileComponent } from '../user/profile/profile.component';
@@ -14,7 +13,6 @@ const routes: Routes = [
   },
   {
     path: 'manage',
-    component: PageHomeComponent,
     children: [
       {
         path: 'space',//创建教材
@@ -38,10 +36,6 @@ const routes: Routes = [
       },
     ],
   },
-  // {
-  //   path: 'profile',
-  //   component: ProfileComponent,
-  // },
 ];
 @NgModule({
   imports: [RouterModule.forChild(routes)],

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

@@ -1,24 +0,0 @@
-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();
-  });
-});

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

@@ -1,50 +0,0 @@
-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';
-import { MatIconModule } from '@angular/material/icon';
-
-@Component({
-  selector: 'app-page-home',
-  standalone: true,
-  imports: [CompNavComponent, RouterOutlet, CommonCompModule,MatIconModule],
-  templateUrl: './page-home.component.html',
-  styleUrls: ['./page-home.component.scss'],
-})
-export class PageHomeComponent implements OnInit {
-  options: Array<any> = [
-    {
-      name: '个人空间',
-      id: '1',
-      path: '/nav-author/manage/space',
-    },
-    {
-      name: '回收站',
-      id: '2',
-      path: '/nav-author/manage/textbook',
-      params: {
-        isDeleted: true,
-      },
-    },
-  ];
-  active: string = localStorage.getItem('active') || this.options[0].id;
-  isCollapsed:boolean = false;
-
-  constructor(public router: Router) {}
-
-  ngOnInit() {}
-  toggleCollapsed(): void {
-    this.isCollapsed = !this.isCollapsed;
-  }
-  toUrl(child: any) {
-    let cateid = child.id;
-    this.active = cateid;
-    localStorage.setItem('active', cateid);
-    console.log(child);
-    if (child.params) {
-      this.router.navigate([child.path, child?.params]);
-    } else {
-      this.router.navigate([child.path]);
-    }
-  }
-}

+ 6 - 8
projects/textbook/src/modules/nav-province-contact/modules.routes.ts

@@ -1,16 +1,14 @@
 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,
+    path: '',
+    redirectTo:'manage',
+    pathMatch: "full",
+  },
+  {
+    path: 'manage',
     children:[
-      // {
-      //   path: "",
-      //   redirectTo: "pay",
-      //   pathMatch: "full",
-      // },
     ]
   }
 ];

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

@@ -1,35 +0,0 @@
-<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>

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

@@ -1,15 +0,0 @@
-.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;
-  }
-}

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

@@ -1,50 +0,0 @@
-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 : {}])
-  }
-}

+ 6 - 8
projects/textbook/src/modules/nav-province-school-contact/modules.routes.ts

@@ -1,16 +1,14 @@
 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,
+    path: '',
+    redirectTo:'manage',
+    pathMatch: "full",
+  },
+  {
+    path: 'manage',
     children:[
-      // {
-      //   path: "",
-      //   redirectTo: "pay",
-      //   pathMatch: "full",
-      // },
     ]
   }
 ];

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

@@ -1,35 +0,0 @@
-<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>

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

@@ -1,15 +0,0 @@
-.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;
-  }
-}

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

@@ -1,24 +0,0 @@
-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();
-  });
-});

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

@@ -1,50 +0,0 @@
-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 : {}])
-  }
-}

+ 6 - 8
projects/textbook/src/modules/nav-province-submit/modules.routes.ts

@@ -1,16 +1,14 @@
 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,
+    path: '',
+    redirectTo:'manage',
+    pathMatch: "full",
+  },
+  {
+    path: 'manage',
     children:[
-      // {
-      //   path: "",
-      //   redirectTo: "pay",
-      //   pathMatch: "full",
-      // },
     ]
   }
 ];

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

@@ -1,35 +0,0 @@
-<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>

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

@@ -1,15 +0,0 @@
-.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;
-  }
-}

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

@@ -1,24 +0,0 @@
-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();
-  });
-});

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

@@ -1,38 +0,0 @@
-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 : {}])
-  }
-}

+ 2 - 9
projects/textbook/src/modules/nav-review/modules.routes.ts

@@ -1,27 +1,20 @@
 import { NgModule } from '@angular/core';
 import { RouterModule, Routes } from '@angular/router';
-import { PageHomeComponent } from './page-home/page-home.component';
 import { ApproveComponent } from './approve/approve.component';
-import { ProfileComponent } from '../user/profile/profile.component';
 const routes: Routes = [
   {
     path: '',
-    redirectTo:'home/apply',
+    redirectTo:'manage/apply',
     pathMatch: "full",
   },
   {
-    path: 'home',
-    component: PageHomeComponent,
+    path: 'manage',
     children: [
       {
         path: 'apply', //创建教材
         component: ApproveComponent,
       },
     ],
-  },
-  {
-    path: 'profile',
-    component: ProfileComponent,
   }
 ];
 @NgModule({

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

@@ -1,35 +0,0 @@
-<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(child)"
-          >
-            {{ child.name }}
-          </li>
-          }
-        </ul>
-      </li>
-      } @else {
-      <li
-        nz-menu-item
-        (click)="toUrl(item)"
-        [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>

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

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

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

@@ -1,24 +0,0 @@
-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();
-  });
-});

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

@@ -1,44 +0,0 @@
-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',
-      path: '/nav-review/home/apply',
-    },
-    {
-      name:'个人信息',
-      id:'2',
-      path: '/nav-review/profile',
-    },
-  ]
-  active:string = localStorage.getItem('active') || this.options[0].id
-  constructor(
-    public router: Router,
-  ) { }
-
-  ngOnInit() {}
-  toUrl(child: any){
-    let cateid = child.id;
-    this.active = cateid;
-    localStorage.setItem('active', cateid);
-    console.log(child);
-    if (child.params) {
-      this.router.navigate([child.path, child?.params]);
-    } else {
-      this.router.navigate([child.path]);
-    }
-  }
-}

+ 4 - 1
projects/textbook/src/services/auth.service.ts

@@ -1,6 +1,7 @@
 import { Injectable } from "@angular/core";
 import Parse from "parse";
 import { Router } from "@angular/router";
+import { textbookServer } from './textbook'
 @Injectable({
   providedIn: "root",
 })
@@ -11,7 +12,7 @@ export class AuthServr {
   resetcountdown: number = 60; //重置密码验证码倒计时
 
   redirectUrl: string = '';
-  constructor(public router: Router) {}
+  constructor(public router: Router,private textbook:textbookServer) {}
   login(username:any, password:any, company:string) {
     return new Promise(async (resolve, reject) => {
       let a = /^1[3456789]\d{9}$/;
@@ -32,6 +33,8 @@ export class AuthServr {
         .then(async (data:any) => {
           // await this.developerSer.authDevCompany(); //更新开发者信息
           console.log(data);
+          localStorage.setItem('profile',JSON.stringify({type:'navAuthor'}))
+          this.textbook.profile = {type:'navAuthor'}
           resolve(data);
         })
         .catch((err:any) => {