1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- 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:'注册账户',
- 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]);
- }
- }
- }
|