1 files renamed
135 files deleted
16 files added
9 files modified
New file |
| | |
| | | { |
| | | "repoId": "3487b7a8-09dc-4dc4-9640-d5a366812785", |
| | | "lastSync": 0 |
| | | } |
| | |
| | | "component", |
| | | "scaffold" |
| | | ], |
| | | "scripts": { |
| | | "precommit": "npm run lint-staged", |
| | | "scripts": { |
| | | "ng": "ng", |
| | | "start": "ng serve -o", |
| | | "hmr": "ng serve -c=hmr", |
| | |
| | | import { Component, HostBinding, OnInit } from '@angular/core'; |
| | | import { Component, HostBinding, OnInit, Inject } from '@angular/core'; |
| | | import { Router, NavigationEnd } from '@angular/router'; |
| | | import { SettingsService, TitleService } from '@delon/theme'; |
| | | import { filter } from 'rxjs/operators'; |
| | | import { DA_SERVICE_TOKEN, TokenService } from '@delon/auth'; |
| | | |
| | | @Component({ |
| | | selector: 'app-root', |
| | |
| | | private settings: SettingsService, |
| | | private router: Router, |
| | | private titleSrv: TitleService, |
| | | @Inject(DA_SERVICE_TOKEN) private tokenService: TokenService, |
| | | ) {} |
| | | |
| | | ngOnInit() { |
| | | // 设置Token信息 |
| | | this.tokenService.set({ |
| | | token: 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsIm9pZCI6NSwibW9kZSI6IldlYiIsInNjb3BlcyI6WyJ0ZW1wIl0sImlzcyI6Imh0dHA6Ly9tb25pdG9yLjdkcmxiLmNvbSIsImlhdCI6MTUzMTMxNjU4MCwiZXhwIjoxNTM5MDkyNTgwfQ.tWE7AqGfLwwK-nO1FUveJ8xKqpxitqG1GdhKHp9JDyRPjNDYX7ocgkEw0W2G8hKL_tJIjjrQ1pc0zvCmLTJ-pg', |
| | | name: 'admin', |
| | | email: `admin@qq.com`, |
| | | id: 10000, |
| | | time: +new Date(), |
| | | }); |
| | | this.router.events |
| | | .pipe(filter(evt => evt instanceof NavigationEnd)) |
| | | .subscribe(() => this.titleSrv.setTitle()); |
| | |
| | | export function delonAuthConfig(): DelonAuthConfig { |
| | | return Object.assign(new DelonAuthConfig(), <DelonAuthConfig>{ |
| | | token_send_key : 'X-Authorization', |
| | | token_send_template : 'Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsIm9pZCI6NSwibW9kZSI6IldlYiIsInNjb3BlcyI6WyJ0ZW1wIl0sImlzcyI6Imh0dHA6Ly9tb25pdG9yLjdkcmxiLmNvbSIsImlhdCI6MTUzMDg2NDIyNSwiZXhwIjoxNTM4NjQwMjI1fQ.QMhnq_01fSjCeMHMJwRgDnEWMuMshCxHff5J3s2fVPq_VDZC3Iid1ug9KSfWcBn8Ry03xitHTmkgnF1O_rckxA', |
| | | token_send_template : 'Bearer ${token}', |
| | | token_send_place : 'header', |
| | | login_url: `/passport/login`, |
| | | allow_anonymous_key: `_allow_anonymous` |
| | |
| | | <div class="logo"> |
| | | <a [routerLink]="['/']"> |
| | | <img class="expanded" src="./assets/logo-full.svg" alt="{{settings.app.name}}" style="max-height:40px;" /> |
| | | <img class="collapsed" src="./assets/logo.svg" alt="{{settings.app.name}}" style="max-height:30px;" /> |
| | | <img class="expanded" src="./assets/tmp/img/logo_100x40.png" alt="{{settings.app.name}}" style="max-height:40px;" /> |
| | | <img class="collapsed" src="./assets/tmp/img/logo_30x30.png" alt="{{settings.app.name}}" style="max-height:30px;" /> |
| | | </a> |
| | | </div> |
| | | <div class="top-nav-wrap"> |
| | |
| | | </div> |
| | | </li> |
| | | <!-- Github Page --> |
| | | <li> |
| | | <!-- <li> |
| | | <a class="item" href="//github.com/cipchk/ng-alain" target="_blank"> |
| | | <i class="anticon anticon-github"></i> |
| | | </a> |
| | | </li> |
| | | </li> --> |
| | | <!-- Lock Page --> |
| | | <li class="hidden-xs"> |
| | | <!-- <li class="hidden-xs"> |
| | | <div class="item" [routerLink]="['/lock']"> |
| | | <i class="anticon anticon-lock"></i> |
| | | </div> |
| | | </li> |
| | | </li> --> |
| | | <!-- Search Button --> |
| | | <li class="header-search__btn" (click)="searchToggleChange()"> |
| | | <!-- <li class="header-search__btn" (click)="searchToggleChange()"> |
| | | <div class="item"> |
| | | <i class="anticon anticon-search"></i> |
| | | </div> |
| | | </li> |
| | | </li> --> |
| | | </ul> |
| | | <header-search class="header-search" [toggleChange]="searchToggleStatus"></header-search> |
| | | <!-- <header-search class="header-search" [toggleChange]="searchToggleStatus"></header-search> --> |
| | | <ul class="top-nav"> |
| | | <!-- Notify --> |
| | | <li> |
| | | <!-- <li> |
| | | <header-notify></header-notify> |
| | | </li> |
| | | </li> --> |
| | | <!-- Task --> |
| | | <li class="hidden-xs"> |
| | | <!-- <li class="hidden-xs"> |
| | | <header-task></header-task> |
| | | </li> |
| | | </li> --> |
| | | <!-- App Icons --> |
| | | <li class="hidden-xs"> |
| | | <!-- <li class="hidden-xs"> |
| | | <header-icon></header-icon> |
| | | </li> |
| | | </li> --> |
| | | <!-- Settings --> |
| | | <li class="hidden-xs"> |
| | | <nz-dropdown nzTrigger="click" nzPlacement="bottomRight"> |
New file |
| | |
| | | import { NgModule } from "@angular/core"; |
| | | import { HomePageComponent } from "./home-page/home-page.component"; |
| | | import { Routes, RouterModule } from "@angular/router"; |
| | | |
| | | const routes: Routes = [{ path: "", component: HomePageComponent }]; |
| | | |
| | | @NgModule({ |
| | | imports: [RouterModule.forChild(routes)], |
| | | exports: [RouterModule] |
| | | }) |
| | | export class HomePageRoutingModule {} |
New file |
| | |
| | | import { NgModule } from "@angular/core"; |
| | | import { Routes, RouterModule } from "@angular/router"; |
| | | import { SharedModule } from "@shared/shared.module"; |
| | | import { HomePageRoutingModule } from "./home-page-routing.module"; |
| | | import { HomePageComponent } from "./home-page/home-page.component"; |
| | | |
| | | @NgModule({ |
| | | imports: [SharedModule, HomePageRoutingModule], |
| | | declarations: [HomePageComponent] |
| | | }) |
| | | export class HomePageModule {} |
New file |
| | |
| | | <div class="content__title"> |
| | | <h1>首页概览</h1> |
| | | </div> |
| | | <div nz-row [nzGutter]="24" class="pt-lg"> |
| | | <div nz-col nzXs="24" nzSm="12" nzMd="12" nzLg="8"> |
| | | <g2-card [title]="'AQI数值'" total="126,560" contentHeight="44px" [action]="action1" [footer]="footer1"> |
| | | <ng-template #action1> |
| | | <nz-tooltip [nzTitle]="'刷新'"> |
| | | <i class="anticon anticon-sync"></i> |
| | | </nz-tooltip> |
| | | </ng-template> |
| | | <trend flag="up" style="display:block; margin-top:2px;">周同比 |
| | | <span class="pl-sm">12%</span> |
| | | </trend> |
| | | <trend flag="down">日环比 |
| | | <span class="pl-sm">11%</span> |
| | | </trend> |
| | | <ng-template #footer1> |
| | | <p class="text-truncate mb0">日均销售额 |
| | | <span class="ml-sm">¥12,423</span> |
| | | </p> |
| | | </ng-template> |
| | | </g2-card> |
| | | </div> |
| | | </div> |
New file |
| | |
| | | import { Component, OnInit } from "@angular/core"; |
| | | import { _HttpClient } from "@delon/theme"; |
| | | |
| | | @Component({ |
| | | selector: "app-home-page", |
| | | templateUrl: "./home-page.component.html", |
| | | styleUrls: ["./home-page.component.less"] |
| | | }) |
| | | export class HomePageComponent implements OnInit { |
| | | constructor( |
| | | private http:_HttpClient |
| | | ) {} |
| | | |
| | | ngOnInit() { |
| | | this.http.get('user-context').subscribe( |
| | | res => { |
| | | console.log(res); |
| | | } |
| | | ); |
| | | } |
| | | } |
| | |
| | | import { NgModule } from '@angular/core'; |
| | | import { Routes, RouterModule } from '@angular/router'; |
| | | import { environment } from '@env/environment'; |
| | | import { NgModule } from "@angular/core"; |
| | | import { Routes, RouterModule } from "@angular/router"; |
| | | import { environment } from "@env/environment"; |
| | | // layout |
| | | import { LayoutDefaultComponent } from '../layout/default/default.component'; |
| | | import { LayoutFullScreenComponent } from '../layout/fullscreen/fullscreen.component'; |
| | | import { LayoutPassportComponent } from '../layout/passport/passport.component'; |
| | | // dashboard pages |
| | | import { DashboardV1Component } from './dashboard/v1/v1.component'; |
| | | import { DashboardAnalysisComponent } from './dashboard/analysis/analysis.component'; |
| | | import { DashboardMonitorComponent } from './dashboard/monitor/monitor.component'; |
| | | import { DashboardWorkplaceComponent } from './dashboard/workplace/workplace.component'; |
| | | // passport pages |
| | | import { UserLoginComponent } from './passport/login/login.component'; |
| | | import { UserRegisterComponent } from './passport/register/register.component'; |
| | | import { UserRegisterResultComponent } from './passport/register-result/register-result.component'; |
| | | // single pages |
| | | import { CallbackComponent } from './callback/callback.component'; |
| | | import { UserLockComponent } from './passport/lock/lock.component'; |
| | | import { Exception403Component } from './exception/403.component'; |
| | | import { Exception404Component } from './exception/404.component'; |
| | | import { Exception500Component } from './exception/500.component'; |
| | | import { LayoutDefaultComponent } from "../layout/default/default.component"; |
| | | |
| | | const routes: Routes = [ |
| | | { |
| | | path: '', |
| | | path: "", |
| | | component: LayoutDefaultComponent, |
| | | children: [ |
| | | { path: '', redirectTo: 'dashboard/v1', pathMatch: 'full' }, |
| | | { path: 'dashboard', redirectTo: 'dashboard/v1', pathMatch: 'full' }, |
| | | { path: 'dashboard/v1', component: DashboardV1Component }, |
| | | { path: 'dashboard/analysis', component: DashboardAnalysisComponent }, |
| | | { path: 'dashboard/monitor', component: DashboardMonitorComponent }, |
| | | { path: 'dashboard/workplace', component: DashboardWorkplaceComponent }, |
| | | { path: "", redirectTo: "home-page", pathMatch: "full" }, |
| | | { |
| | | path: 'widgets', |
| | | loadChildren: './widgets/widgets.module#WidgetsModule', |
| | | }, |
| | | { path: 'style', loadChildren: './style/style.module#StyleModule' }, |
| | | { path: 'delon', loadChildren: './delon/delon.module#DelonModule' }, |
| | | { path: 'extras', loadChildren: './extras/extras.module#ExtrasModule' }, |
| | | { path: 'pro', loadChildren: './pro/pro.module#ProModule' }, |
| | | ], |
| | | }, |
| | | // 全屏布局 |
| | | { |
| | | path: 'data-v', |
| | | component: LayoutFullScreenComponent, |
| | | children: [ |
| | | { path: '', loadChildren: './data-v/data-v.module#DataVModule' }, |
| | | ], |
| | | }, |
| | | // passport |
| | | { |
| | | path: 'passport', |
| | | component: LayoutPassportComponent, |
| | | children: [ |
| | | { |
| | | path: 'login', |
| | | component: UserLoginComponent, |
| | | data: { title: '登录', titleI18n: 'pro-login' }, |
| | | }, |
| | | { |
| | | path: 'register', |
| | | component: UserRegisterComponent, |
| | | data: { title: '注册', titleI18n: 'pro-register' }, |
| | | }, |
| | | { |
| | | path: 'register-result', |
| | | component: UserRegisterResultComponent, |
| | | data: { title: '注册结果', titleI18n: 'pro-register-result' }, |
| | | }, |
| | | ], |
| | | }, |
| | | // 单页不包裹Layout |
| | | { path: 'callback/:type', component: CallbackComponent }, |
| | | { |
| | | path: 'lock', |
| | | component: UserLockComponent, |
| | | data: { title: '锁屏', titleI18n: 'lock' }, |
| | | }, |
| | | { path: '403', component: Exception403Component }, |
| | | { path: '404', component: Exception404Component }, |
| | | { path: '500', component: Exception500Component }, |
| | | { path: '**', redirectTo: 'dashboard' }, |
| | | path: "home-page", |
| | | loadChildren: "./home-page/home-page.module#HomePageModule" |
| | | } |
| | | ] |
| | | } |
| | | ]; |
| | | |
| | | @NgModule({ |
| | | imports: [RouterModule.forRoot(routes, { useHash: environment.useHash })], |
| | | exports: [RouterModule], |
| | | exports: [RouterModule] |
| | | }) |
| | | export class RouteRoutingModule {} |
| | |
| | | import { NgModule } from '@angular/core'; |
| | | import { NgModule } from "@angular/core"; |
| | | |
| | | import { SharedModule } from '@shared/shared.module'; |
| | | import { RouteRoutingModule } from './routes-routing.module'; |
| | | // dashboard pages |
| | | import { DashboardV1Component } from './dashboard/v1/v1.component'; |
| | | import { DashboardAnalysisComponent } from './dashboard/analysis/analysis.component'; |
| | | import { DashboardMonitorComponent } from './dashboard/monitor/monitor.component'; |
| | | import { DashboardWorkplaceComponent } from './dashboard/workplace/workplace.component'; |
| | | // passport pages |
| | | import { UserLoginComponent } from './passport/login/login.component'; |
| | | import { UserRegisterComponent } from './passport/register/register.component'; |
| | | import { UserRegisterResultComponent } from './passport/register-result/register-result.component'; |
| | | // single pages |
| | | import { UserLockComponent } from './passport/lock/lock.component'; |
| | | import { CallbackComponent } from './callback/callback.component'; |
| | | import { Exception403Component } from './exception/403.component'; |
| | | import { Exception404Component } from './exception/404.component'; |
| | | import { Exception500Component } from './exception/500.component'; |
| | | import { SharedModule } from "@shared/shared.module"; |
| | | import { RouteRoutingModule } from "./routes-routing.module"; |
| | | |
| | | const COMPONENTS = [ |
| | | DashboardV1Component, |
| | | DashboardAnalysisComponent, |
| | | DashboardMonitorComponent, |
| | | DashboardWorkplaceComponent, |
| | | // passport pages |
| | | UserLoginComponent, |
| | | UserRegisterComponent, |
| | | UserRegisterResultComponent, |
| | | // single pages |
| | | UserLockComponent, |
| | | CallbackComponent, |
| | | Exception403Component, |
| | | Exception404Component, |
| | | Exception500Component |
| | | ]; |
| | | const COMPONENTS = []; |
| | | const COMPONENTS_NOROUNT = []; |
| | | |
| | | @NgModule({ |
| | |
| | | { |
| | | "app": { |
| | | "name": "Alain", |
| | | "name": "七星瓢虫环境监测", |
| | | "description": "Ng-zorro admin panel front-end framework" |
| | | }, |
| | | "user": { |
| | | "name": "Admin", |
| | | "avatar": "./assets/tmp/img/avatar.jpg", |
| | | "email": "cipchk@qq.com" |
| | | "email": "admin@qq.com" |
| | | }, |
| | | "menu": [ |
| | | { |
| | |
| | | "pro-user": "账户", |
| | | "pro-login": "登录", |
| | | "pro-register": "注册", |
| | | "pro-register-result": "注册结果" |
| | | "pro-register-result": "注册结果", |
| | | "home-page":"首页概览", |
| | | "system_navigation":"系统导航" |
| | | } |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> |
| | | <svg version="1.1" id="图层_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" |
| | | viewBox="0 0 400 400" style="enable-background:new 0 0 400 400;" xml:space="preserve"> |
| | | <style type="text/css"> |
| | | .st0{fill:url(#SVGID_1_);} |
| | | .st1{fill:url(#SVGID_2_);} |
| | | .st2{fill:url(#SVGID_3_);} |
| | | </style> |
| | | <g> |
| | | <linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="215.0983" y1="173.3861" x2="271.3071" y2="173.3861"> |
| | | <stop offset="3.215440e-02" style="stop-color:#F0776F"/> |
| | | <stop offset="1" style="stop-color:#F0606F"/> |
| | | </linearGradient> |
| | | <path class="st0" d="M258.7,213.4c-0.3,0-0.6,0-1-0.1c-4.3-0.5-7.4-4.4-6.9-8.7l4.7-38.9c0.3-2.5-1.2-4.9-3.5-5.7l-31.7-11.3 |
| | | c-4.1-1.5-6.2-5.9-4.8-10c1.5-4.1,5.9-6.2,10-4.8l31.7,11.3c9.4,3.3,15.1,12.5,13.9,22.4l-4.7,38.9 |
| | | C266,210.4,262.6,213.4,258.7,213.4z"/> |
| | | <linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="127.4784" y1="201.0843" x2="263.3311" y2="201.0843"> |
| | | <stop offset="0" style="stop-color:#6EB4E0"/> |
| | | <stop offset="1" style="stop-color:#1588E0"/> |
| | | </linearGradient> |
| | | <path class="st1" d="M197.9,275.7c-3.5,0-7-0.9-10.3-2.7l-41-22.8c-5.9-3.3-9.9-9.2-10.7-15.9l-8.3-67.6 |
| | | c-1.2-9.9,4.7-19.3,14.1-22.6l50.7-17.3c4.1-1.4,8.6,0.8,10,4.9c1.4,4.1-0.8,8.6-4.9,10l-50.7,17.3c-2.4,0.8-3.9,3.2-3.6,5.8 |
| | | l8.3,67.6c0.2,1.7,1.2,3.2,2.7,4.1l41,22.8c1.6,0.9,3.6,0.9,5.2,0l44.4-24.3c1.5-0.8,2.6-2.4,2.8-4.1c0.5-4.3,4.4-7.4,8.7-6.9 |
| | | c4.3,0.5,7.4,4.4,6.9,8.7c-0.8,6.7-4.9,12.7-10.8,16l-44.4,24.3C204.9,274.8,201.4,275.7,197.9,275.7z"/> |
| | | <linearGradient id="SVGID_3_" gradientUnits="userSpaceOnUse" x1="163.5466" y1="194.4135" x2="233.869" y2="194.4135"> |
| | | <stop offset="3.215440e-02" style="stop-color:#F0776F"/> |
| | | <stop offset="1" style="stop-color:#F0606F"/> |
| | | </linearGradient> |
| | | <path class="st2" d="M233,214.7l-25.4-45.9l-0.1-0.1c-1.8-3.1-5.2-5.1-8.8-5.1c-3.6,0-7,2-8.8,5.1l-25.4,46 |
| | | c-1.9,3.5-0.7,7.8,2.8,9.7c3.5,1.9,7.8,0.7,9.7-2.8l4.9-8.9h33.6l4.9,8.9c1.3,2.4,3.7,3.7,6.3,3.7c1.2,0,2.4-0.3,3.4-0.9 |
| | | C233.6,222.5,234.9,218.1,233,214.7z M189.8,198.4l8.9-16.1l8.9,16.1H189.8z"/> |
| | | </g> |
| | | </svg> |
| | |
| | | |
| | | <head> |
| | | <meta charset="utf-8"> |
| | | <title>ngAlain</title> |
| | | <title>七星瓢虫环境监测</title> |
| | | <base href="/"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1"> |
| | | <meta http-equiv="x-ua-compatible" content="ie=edge"> |