Browse Source

[完善] 首页样式完善

master
陈鹏飞 4 years ago
parent
commit
623f065cce
  1. 46
      package-lock.json
  2. 2
      src/app/app.component.ts
  3. 2
      src/app/http-interceptors/cache-token.service.ts
  4. 45
      src/app/navigation/navigation.component.html
  5. 2
      src/app/navigation/navigation.component.scss
  6. 3
      src/index.html

46
package-lock.json generated

@ -15968,8 +15968,7 @@
"ansi-regex": {
"version": "2.1.1",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"aproba": {
"version": "1.2.0",
@ -16012,8 +16011,7 @@
"code-point-at": {
"version": "1.1.0",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"concat-map": {
"version": "0.0.1",
@ -16024,8 +16022,7 @@
"console-control-strings": {
"version": "1.1.0",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"core-util-is": {
"version": "1.0.2",
@ -16142,8 +16139,7 @@
"inherits": {
"version": "2.0.4",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"ini": {
"version": "1.3.5",
@ -16155,7 +16151,6 @@
"version": "1.0.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"number-is-nan": "^1.0.0"
}
@ -16185,7 +16180,6 @@
"version": "2.9.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"safe-buffer": "^5.1.2",
"yallist": "^3.0.0"
@ -16204,7 +16198,6 @@
"version": "0.5.1",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"minimist": "0.0.8"
}
@ -16307,7 +16300,6 @@
"version": "1.4.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"wrappy": "1"
}
@ -16393,8 +16385,7 @@
"safe-buffer": {
"version": "5.1.2",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"safer-buffer": {
"version": "2.1.2",
@ -16430,7 +16421,6 @@
"version": "1.0.2",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
@ -16450,7 +16440,6 @@
"version": "3.0.1",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"ansi-regex": "^2.0.0"
}
@ -16494,14 +16483,12 @@
"wrappy": {
"version": "1.0.2",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"yallist": {
"version": "3.1.1",
"bundled": true,
"dev": true,
"optional": true
"dev": true
}
}
},
@ -16939,8 +16926,7 @@
"console-control-strings": {
"version": "1.1.0",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"core-util-is": {
"version": "1.0.2",
@ -17057,8 +17043,7 @@
"inherits": {
"version": "2.0.4",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"ini": {
"version": "1.3.5",
@ -17100,7 +17085,6 @@
"version": "2.9.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"safe-buffer": "^5.1.2",
"yallist": "^3.0.0"
@ -17119,7 +17103,6 @@
"version": "0.5.1",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"minimist": "0.0.8"
}
@ -17222,7 +17205,6 @@
"version": "1.4.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"wrappy": "1"
}
@ -17308,8 +17290,7 @@
"safe-buffer": {
"version": "5.1.2",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"safer-buffer": {
"version": "2.1.2",
@ -17345,7 +17326,6 @@
"version": "1.0.2",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
@ -17409,14 +17389,12 @@
"wrappy": {
"version": "1.0.2",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"yallist": {
"version": "3.1.1",
"bundled": true,
"dev": true,
"optional": true
"dev": true
}
}
},

2
src/app/app.component.ts

@ -1,6 +1,5 @@
import { Component } from '@angular/core';
import { HttpClient } from '@angular/common/http'
import { Data } from './interface'
import { Router,ActivatedRoute } from '@angular/router'
import { IsLoginService } from './is-login.service' //引入服务
import {CacheTokenService} from './http-interceptors/cache-token.service' //引入服务
@ -14,7 +13,6 @@ import {CacheTokenService} from './http-interceptors/cache-token.service' //引
})
export class AppComponent {
constructor(private http:HttpClient,private router:Router,public token:CacheTokenService,public isLogin:IsLoginService) { }
ngOnInit(): void {

2
src/app/http-interceptors/cache-token.service.ts

@ -29,7 +29,7 @@ export class CacheTokenService {
} else { this.delete() }
},18*60*1000)
}
//删除定时器
delete = ():void=> {
window.clearInterval(this.timer)

45
src/app/navigation/navigation.component.html

@ -1,30 +1,31 @@
<mat-sidenav-container class="example-container" autosize [class.myapp-dark-theme]="darktheme">
<mat-sidenav #drawer class="example-sidenav" mode="side" opened="true" color="primary" style="overflow-x: hidden;">
<div class="biglogobox">
<img src="../../assets/images/logo.png" alt="logo">
</div>
<div class="navbox">
<ul class="teacher">
<li [routerLink]="['/home/createexam']" routerLinkActive="router-link-active" >创建考试</li>
<li [routerLink]="['/home/looktest']" routerLinkActive="router-link-active" >阅卷</li>
<li [routerLink]="['/home/statisticAnalysis']" routerLinkActive="router-link-active" >统计分析</li>
</ul>
<ul class="student">
<li [routerLink]="['/home/joinExam']" routerLinkActive="router-link-active" >参加考试</li>
<li [routerLink]="['/home/testRecords']" routerLinkActive="router-link-active" >考试记录</li>
</ul>
</div>
<mat-sidenav #drawer class="example-sidenav" mode="side" opened="true" color="primary" style="overflow-x: hidden;">
<div class="biglogobox">
<img src="../../assets/images/logo.png" alt="logo">
</div>
<div class="navbox">
<ul class="teacher">
<li [routerLink]="['/home/createexam']" routerLinkActive="router-link-active" >创建考试</li>
<li [routerLink]="['/home/looktest']" routerLinkActive="router-link-active" >阅卷</li>
<li [routerLink]="['/home/statisticAnalysis']" routerLinkActive="router-link-active" >统计分析</li>
</ul>
<ul class="student">
<li [routerLink]="['/home/joinExam']" routerLinkActive="router-link-active" >参加考试</li>
<li [routerLink]="['/home/testRecords']" routerLinkActive="router-link-active" >考试记录</li>
</ul>
</div>
</mat-sidenav>
</mat-sidenav>
<div class="example-sidenav-content">
<app-tabbar (toggleDarkTheme)="switchTheme($event)" (defaulttheme)="defaulttheme()" (redtheme)="redtheme()"></app-tabbar>
<router-outlet></router-outlet>
<!-- <app-all-file #child></app-all-file> -->
<div class="example-sidenav-content">
<div style="height: 64px; min-height: 64px;">
<app-tabbar (toggleDarkTheme)="switchTheme($event)" (defaulttheme)="defaulttheme()" (redtheme)="redtheme()"></app-tabbar>
</div>
<div style="flex: 1; overflow: hidden;">
<router-outlet></router-outlet>
</div>
</div>
</mat-sidenav-container>

2
src/app/navigation/navigation.component.scss

@ -175,6 +175,8 @@ mat-sidenav{
.example-sidenav-content{
height: 100%;
overflow: hidden;
display: flex;
flex-direction: column;
}
//一级目录前图标

3
src/index.html

@ -2,12 +2,11 @@
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<title>灭火救援指挥培训系统</title>
<title>消防救援单位信息考核系统</title>
<base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico">
<link href='/assets/icon/material-icons.css' rel="stylesheet">
<!-- <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> -->
</head>
<body>
<app-root></app-root>

Loading…
Cancel
Save