Browse Source

copyright

main
kely 2 years ago
parent
commit
7ae57d3ddb
  1. 129
      projects/admin/src/app/components/app-layout/app-layout.component.html
  2. 58
      projects/admin/src/app/pages/login/login.component.html
  3. 10
      projects/cdk/src/shared/components/copyright/copyright.component.html
  4. 0
      projects/cdk/src/shared/components/copyright/copyright.component.less
  5. 10
      projects/cdk/src/shared/components/copyright/copyright.component.ts
  6. 1
      projects/cdk/src/shared/components/index.ts
  7. 3
      projects/cdk/src/shared/shared.module.ts
  8. 156
      projects/client/src/app/components/app-layout/app-layout.component.html
  9. 60
      projects/client/src/app/pages/login/login.component.html
  10. 12
      projects/client/src/app/pages/login/login.component.less

129
projects/admin/src/app/components/app-layout/app-layout.component.html

@ -1,4 +1,4 @@
<ng-container *ngIf="fullPage else layoutTpl">
<ng-container *ngIf="fullPage; else layoutTpl">
<router-outlet></router-outlet>
</ng-container>
@ -12,12 +12,19 @@
nz-button
nzType="text"
nz-dropdown
[nzDropdownMenu]="menu">
{{account.name}}
[nzDropdownMenu]="menu"
>
{{ account.name }}
</button>
<nz-dropdown-menu #menu="nzDropdownMenu">
<ul nz-menu nzSelectable>
<li nz-menu-item (click)="logout()">
<ul
nz-menu
nzSelectable
>
<li
nz-menu-item
(click)="logout()"
>
退出登录
</li>
</ul>
@ -26,48 +33,120 @@
</div>
</nz-header>
<nz-layout class="app-layout-main">
<nz-sider nzWidth="220px" nzTheme="dark" class="sider-menu">
<nz-sider
nzWidth="220px"
nzTheme="dark"
class="sider-menu"
>
<div class="logo flex items-center py-4">
<img class="block h-[40px] " src="../assets/images/jl-logo.png" />
<span class="text-base text-white font-bold">
{{appName}}后台
</span>
<img
class="block h-[40px]"
src="../assets/images/jl-logo.png"
/>
<span class="text-base text-white font-bold"> {{ appName }}后台 </span>
</div>
<ul nz-menu nzMode="inline" nzTheme="dark">
<li nz-menu-item class="k-icon" [routerLink]="['/','food']" nzMatchRouter>
<span nz-icon nzType="k-icon:carrot" nzTheme="outline"></span>
<ul
nz-menu
nzMode="inline"
nzTheme="dark"
>
<li
nz-menu-item
class="k-icon"
[routerLink]="['/', 'food']"
nzMatchRouter
>
<span
nz-icon
nzType="k-icon:carrot"
nzTheme="outline"
></span>
<span>食材管理</span>
</li>
<li nz-menu-item class="k-icon" [routerLink]="['/','dish']" nzMatchRouter>
<span nz-icon nzType="k-icon:food" nzTheme="outline"></span>
<li
nz-menu-item
class="k-icon"
[routerLink]="['/', 'dish']"
nzMatchRouter
>
<span
nz-icon
nzType="k-icon:food"
nzTheme="outline"
></span>
<span>菜品管理</span>
</li>
<li nz-submenu nzTitle="食谱管理" nzIcon="book" [nzOpen]="currentUrl.includes('/ingredient/')">
<li
nz-submenu
nzTitle="食谱管理"
nzIcon="book"
[nzOpen]="currentUrl.includes('/ingredient/')"
>
<ul>
<li nz-menu-item nzMatchRouter [routerLink]="['/','ingredient','item']">食谱库</li>
<li
nz-menu-item
nzMatchRouter
[routerLink]="['/', 'ingredient', 'item']"
>
食谱库
</li>
<!-- <li nz-menu-item nzMatchRouter [routerLink]="['/','ingredient','review']">食谱审核</li> -->
<li nz-menu-item nzMatchRouter [routerLink]="['/','ingredient','release']">食谱发布计划</li>
<li
nz-menu-item
nzMatchRouter
[routerLink]="['/', 'ingredient', 'release']"
>
食谱发布计划
</li>
</ul>
</li>
<li nz-menu-item nz-icon="profile" nzMatchRouter [routerLink]="['/','standard']">
<span nz-icon nzType="profile" nzTheme="outline"></span>
<li
nz-menu-item
nz-icon="profile"
nzMatchRouter
[routerLink]="['/', 'standard']"
>
<span
nz-icon
nzType="profile"
nzTheme="outline"
></span>
<span>人群营养标准管理</span>
</li>
<li nz-menu-item nzMatchRouter [routerLink]="['/','organization']">
<span nz-icon nzType="usergroup-add" nzTheme="outline"></span>
<li
nz-menu-item
nzMatchRouter
[routerLink]="['/', 'organization']"
>
<span
nz-icon
nzType="usergroup-add"
nzTheme="outline"
></span>
<span>单位管理</span>
</li>
<li nz-submenu nzTitle="系统设置" nzIcon="setting" [nzOpen]="currentUrl.includes('/system/')">
<li
nz-submenu
nzTitle="系统设置"
nzIcon="setting"
[nzOpen]="currentUrl.includes('/system/')"
>
<ul>
<li nz-menu-item nzMatchRouter [routerLink]="['/','system','user']">用户管理</li>
<li
nz-menu-item
nzMatchRouter
[routerLink]="['/', 'system', 'user']"
>
用户管理
</li>
</ul>
</li>
</ul>
</nz-sider>
<nz-layout class="inner-layout overflow-hidden">
<router-outlet></router-outlet>
<lib-copyright></lib-copyright>
</nz-layout>
</nz-layout>
</nz-layout>

58
projects/admin/src/app/pages/login/login.component.html

@ -1,4 +1,4 @@
<section class="h-full flex items-center justify-center">
<section class="h-full flex items-center justify-center flex-col">
<div class="login">
<!-- <div>
<h1 class="text-center my-[25px]">
@ -9,42 +9,70 @@
<div class="card shadow-2xl">
<div class="img"></div>
<div class="form py-5 px-10 flex-1">
<div class="text-left ">
<h2 class="mt-4 text-3xl font-bold">{{appName}}后台</h2>
<div class="text-left">
<h2 class="mt-4 text-3xl font-bold">{{ appName }}后台</h2>
<h3 class="mt-10 text-xl">登录</h3>
<form nz-form [formGroup]="loginForm" class="mt-10">
<form
nz-form
[formGroup]="loginForm"
class="mt-10"
>
<nz-form-item>
<nz-form-control [nzErrorTip]="formErrorTipsTpl">
<nz-input-group [nzPrefix]="prefixTemplateUser" nzSize="large">
<input nz-input nzSize="large" placeholder="账户" formControlName="uid" />
<nz-input-group
[nzPrefix]="prefixTemplateUser"
nzSize="large"
>
<input
nz-input
nzSize="large"
placeholder="账户"
formControlName="uid"
/>
</nz-input-group>
<ng-template #prefixTemplateUser>
<span nz-icon nzType="user"></span>
<span
nz-icon
nzType="user"
></span>
<nz-divider nzType="vertical"></nz-divider>
</ng-template>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-control [nzErrorTip]="formErrorTipsTpl">
<nz-input-group [nzPrefix]="prefixTemplatePassword" nzSize="large">
<input nz-input type="password" placeholder="密码" formControlName="pwd" />
<nz-input-group
[nzPrefix]="prefixTemplatePassword"
nzSize="large"
>
<input
nz-input
type="password"
placeholder="密码"
formControlName="pwd"
/>
</nz-input-group>
<ng-template #prefixTemplatePassword>
<span nz-icon nzType="lock"></span>
<span
nz-icon
nzType="lock"
></span>
<nz-divider nzType="vertical"></nz-divider>
</ng-template>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-control>
<button nz-button
<button
nz-button
nzType="primary"
nzBlock
class="btn"
nzSize="large"
(click)="onLogin()"
[nzLoading]="loading">
[nzLoading]="loading"
>
登录
</button>
</nz-form-control>
@ -54,9 +82,13 @@
</div>
</div>
</div>
<lib-copyright class="mt-10"></lib-copyright>
</section>
<ng-template #formErrorTipsTpl let-control>
<ng-template
#formErrorTipsTpl
let-control
>
<div class="text-left">
<form-error-tips [control]="control"></form-error-tips>
</div>

10
projects/cdk/src/shared/components/copyright/copyright.component.html

@ -0,0 +1,10 @@
<div class="flex items-center justify-center pb-2">
<a
href="https://beian.miit.gov.cn/"
target="_blank"
class="text-black text-opacity-70"
>
蜀ICP备2023038072号
</a>
<span class="text-black text-opacity-70 ml-4"> ©{{ year }} 成都积络科技有限公司</span>
</div>

0
projects/cdk/src/shared/components/copyright/copyright.component.less

10
projects/cdk/src/shared/components/copyright/copyright.component.ts

@ -0,0 +1,10 @@
import { Component } from "@angular/core";
@Component({
selector: "lib-copyright",
templateUrl: "./copyright.component.html",
styleUrls: ["./copyright.component.less"],
})
export class CopyrightComponent {
year = new Date().getFullYear();
}

1
projects/cdk/src/shared/components/index.ts

@ -5,3 +5,4 @@ export * from "./dish-select/dish-select.component";
export * from "./print/print.component";
export * from "./forbidden/forbidden.component";
export * from "./notfound/notfound.component";
export * from "./copyright/copyright.component";

3
projects/cdk/src/shared/shared.module.ts

@ -28,6 +28,7 @@ import {
PrintComponent,
ForbiddenComponent,
NotfoundComponent,
CopyrightComponent,
} from "./components";
const ngModules = [CommonModule, HttpClientModule, FormsModule, RouterModule, ReactiveFormsModule];
@ -55,6 +56,7 @@ const cdks = [
PrintComponent,
ForbiddenComponent,
NotfoundComponent,
CopyrightComponent,
],
imports: [...ngZorroModules, ...ngModules, ...cdks, AppPageComponent],
exports: [
@ -71,6 +73,7 @@ const cdks = [
PrintComponent,
ForbiddenComponent,
NotfoundComponent,
CopyrightComponent,
],
})
export class SharedModule {}

156
projects/client/src/app/components/app-layout/app-layout.component.html

@ -1,4 +1,4 @@
<ng-container *ngIf="fullPage else layoutTpl">
<ng-container *ngIf="fullPage; else layoutTpl">
<router-outlet></router-outlet>
</ng-container>
@ -7,9 +7,12 @@
<nz-header class="app-header">
<div class="flex items-center justify-between h-full">
<div class="logo flex items-center h-full">
<img class="block h-[40px] mr-1" src="../assets/images/jl-logo.png" />
<img
class="block h-[40px] mr-1"
src="../assets/images/jl-logo.png"
/>
<span class="text-lg text-white font-bold">
{{appName}}
{{ appName }}
</span>
</div>
<div class="profile">
@ -18,12 +21,19 @@
nzType="text"
nz-dropdown
[nzDropdownMenu]="menu"
class="text-white hover:text-white focus:text-white">
{{account.name}}
class="text-white hover:text-white focus:text-white"
>
{{ account.name }}
</button>
<nz-dropdown-menu #menu="nzDropdownMenu">
<ul nz-menu nzSelectable>
<li nz-menu-item (click)="logout()">
<ul
nz-menu
nzSelectable
>
<li
nz-menu-item
(click)="logout()"
>
退出登录
</li>
</ul>
@ -32,17 +42,41 @@
</div>
</nz-header>
<nz-layout class="app-layout-main">
<nz-sider nzWidth="200px" class="sider-menu" nzTheme="light">
<ul nz-menu nzMode="inline">
<li nz-menu-item class="k-icon" [routerLink]="['/','dashboard']" nzMatchRouter
*ngxPermissionsOnly="['18']">
<span nz-icon nzType="question-circle" nzTheme="outline"></span>
<nz-sider
nzWidth="200px"
class="sider-menu"
nzTheme="light"
>
<ul
nz-menu
nzMode="inline"
>
<li
nz-menu-item
class="k-icon"
[routerLink]="['/', 'dashboard']"
nzMatchRouter
*ngxPermissionsOnly="['18']"
>
<span
nz-icon
nzType="question-circle"
nzTheme="outline"
></span>
<span>使用流程</span>
</li>
<li nz-menu-item class="k-icon" (click)="openDataVis()" nzMatchRouter
*ngxPermissionsOnly="['19','20']">
<span nz-icon nzType="fund" nzTheme="outline"></span>
<li
nz-menu-item
class="k-icon"
(click)="openDataVis()"
nzMatchRouter
*ngxPermissionsOnly="['19', '20']"
>
<span
nz-icon
nzType="fund"
nzTheme="outline"
></span>
<span>大屏显示</span>
</li>
<!-- <li nz-menu-item [routerLink]="['/','meal-setting']" nzMatchRouter
@ -50,43 +84,95 @@
<span nz-icon nzType="setting" nzTheme="outline"></span>
<span>配餐设置</span>
</li> -->
<li nz-menu-item class="k-icon" [routerLink]="['/','food']" nzMatchRouter
*ngxPermissionsOnly="['23','24']">
<span nz-icon nzType="k-icon:carrot" nzTheme="outline"></span>
<li
nz-menu-item
class="k-icon"
[routerLink]="['/', 'food']"
nzMatchRouter
*ngxPermissionsOnly="['23', '24']"
>
<span
nz-icon
nzType="k-icon:carrot"
nzTheme="outline"
></span>
<span>食材管理</span>
</li>
<li nz-menu-item class="k-icon" [routerLink]="['/','dish']" nzMatchRouter
*ngxPermissionsOnly="['25','26']">
<span nz-icon nzType="k-icon:food" nzTheme="outline"></span>
<li
nz-menu-item
class="k-icon"
[routerLink]="['/', 'dish']"
nzMatchRouter
*ngxPermissionsOnly="['25', '26']"
>
<span
nz-icon
nzType="k-icon:food"
nzTheme="outline"
></span>
<span>菜品管理</span>
</li>
<li nz-submenu nzTitle="食谱管理" nzIcon="book" [nzOpen]="currentUrl.includes('/ingredient/')"
*ngxPermissionsOnly="['27','28','29','30','31']">
<li
nz-submenu
nzTitle="食谱管理"
nzIcon="book"
[nzOpen]="currentUrl.includes('/ingredient/')"
*ngxPermissionsOnly="['27', '28', '29', '30', '31']"
>
<ul>
<li nz-menu-item nzMatchRouter *ngxPermissionsOnly="['27','28','29']"
[routerLink]="['/','ingredient','item']">食谱库</li>
<li nz-menu-item nzMatchRouter *ngxPermissionsOnly="['30','31']"
[routerLink]="['/','ingredient','release']">食谱发布计划</li>
<li
nz-menu-item
nzMatchRouter
*ngxPermissionsOnly="['27', '28', '29']"
[routerLink]="['/', 'ingredient', 'item']"
>
食谱库
</li>
<li
nz-menu-item
nzMatchRouter
*ngxPermissionsOnly="['30', '31']"
[routerLink]="['/', 'ingredient', 'release']"
>
食谱发布计划
</li>
</ul>
</li>
<li nz-submenu nzTitle="基础信息设置" nzIcon="user" [nzOpen]="currentUrl.includes('/system/')"
*ngxPermissionsOnly="['33','34','35','36','37']">
<li
nz-submenu
nzTitle="基础信息设置"
nzIcon="user"
[nzOpen]="currentUrl.includes('/system/')"
*ngxPermissionsOnly="['33', '34', '35', '36', '37']"
>
<ul>
<li nz-menu-item nzMatchRouter [routerLink]="['/','system','org']"
*ngxPermissionsOnly="['33','34',]">单位信息设置</li>
<li
nz-menu-item
nzMatchRouter
[routerLink]="['/', 'system', 'org']"
*ngxPermissionsOnly="['33', '34']"
>
单位信息设置
</li>
</ul>
<ul>
<li nz-menu-item nzMatchRouter [routerLink]="['/','system','user']"
*ngxPermissionsOnly="['35','36','37']">用户管理</li>
<li
nz-menu-item
nzMatchRouter
[routerLink]="['/', 'system', 'user']"
*ngxPermissionsOnly="['35', '36', '37']"
>
用户管理
</li>
</ul>
</li>
</ul>
</nz-sider>
<nz-layout class="inner-layout overflow-hidden">
<router-outlet></router-outlet>
<lib-copyright></lib-copyright>
</nz-layout>
</nz-layout>
</nz-layout>

60
projects/client/src/app/pages/login/login.component.html

@ -1,4 +1,4 @@
<section class="h-full ">
<section class="h-full relative">
<div class="login">
<!-- <div>
<h1 class="text-center my-[25px]">
@ -6,47 +6,75 @@
</h1>
</div> -->
<div class="card ">
<div class="card">
<div class="img flex items-center justify-center">
<img src="assets/images/jl-logo.png" />
</div>
<div class="form py-5 px-10 flex-1">
<div class="form-inner">
<h2 class="mt-4 text-3xl font-bold">{{appName}}</h2>
<h2 class="mt-4 text-3xl font-bold">{{ appName }}</h2>
<h3 class="mt-10 text-xl">登录</h3>
<form nz-form [formGroup]="loginForm" class="mt-10">
<form
nz-form
[formGroup]="loginForm"
class="mt-10"
>
<nz-form-item>
<nz-form-control [nzErrorTip]="formErrorTipsTpl">
<nz-input-group [nzPrefix]="prefixTemplateUser" nzSize="large">
<input nz-input nzSize="large" placeholder="账户" formControlName="uid" />
<nz-input-group
[nzPrefix]="prefixTemplateUser"
nzSize="large"
>
<input
nz-input
nzSize="large"
placeholder="账户"
formControlName="uid"
/>
</nz-input-group>
<ng-template #prefixTemplateUser>
<span nz-icon nzType="user"></span>
<span
nz-icon
nzType="user"
></span>
<nz-divider nzType="vertical"></nz-divider>
</ng-template>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-control [nzErrorTip]="formErrorTipsTpl">
<nz-input-group [nzPrefix]="prefixTemplatePassword" nzSize="large">
<input nz-input type="password" placeholder="密码" formControlName="pwd" />
<nz-input-group
[nzPrefix]="prefixTemplatePassword"
nzSize="large"
>
<input
nz-input
type="password"
placeholder="密码"
formControlName="pwd"
/>
</nz-input-group>
<ng-template #prefixTemplatePassword>
<span nz-icon nzType="lock"></span>
<span
nz-icon
nzType="lock"
></span>
<nz-divider nzType="vertical"></nz-divider>
</ng-template>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-control>
<button nz-button
<button
nz-button
nzType="primary"
nzBlock
class="btn"
nzSize="large"
(click)="onLogin()"
[nzLoading]="loading">
[nzLoading]="loading"
>
登录
</button>
</nz-form-control>
@ -56,9 +84,15 @@
</div>
</div>
</div>
<div class="copyright">
<lib-copyright></lib-copyright>
</div>
</section>
<ng-template #formErrorTipsTpl let-control>
<ng-template
#formErrorTipsTpl
let-control
>
<div class="text-left">
<form-error-tips [control]="control"></form-error-tips>
</div>

12
projects/client/src/app/pages/login/login.component.less

@ -40,7 +40,7 @@
overflow: hidden;
.img {
flex: 1;
flex-basis: 40%;
height: 100%;
background-repeat: no-repeat;
background-position: center right;
@ -48,7 +48,7 @@
background-image: url('/assets/images/login-bg.svg');
img {
width: 40vw;
width: 90%;
margin-left: -6vw;
}
}
@ -79,3 +79,11 @@
margin-top: 16px;
}
}
.copyright {
position: absolute;
bottom: 6px;
left: 50%;
z-index: 100;
transform: translateX(-50%);
}
Loading…
Cancel
Save