Browse Source

修改

main
kkerwin 2 years ago
parent
commit
2da1542039
  1. 3
      projects/admin/src/app/app.module.ts
  2. 2
      projects/admin/src/app/components/app-layout/app-layout.component.html
  3. 18
      projects/admin/src/app/pages/ingredients/ingredient-list/ingredient-list.component.html
  4. 44
      projects/admin/src/app/pages/ingredients/ingredient-list/ingredient-list.component.ts
  5. 6
      projects/admin/src/app/pages/login/login.component.less
  6. 37
      projects/admin/src/app/pages/standard/standard-form/standard-form.component.ts
  7. 2
      projects/admin/src/app/services/index.ts
  8. 19
      projects/admin/src/app/services/title.service.ts
  9. BIN
      projects/admin/src/assets/images/jl-logo.png
  10. 5
      projects/cdk/src/ingredient/ingredient-analysis/ingredient-analysis.component.html
  11. 6
      projects/cdk/src/ingredient/ingredient-analysis/ingredient-analysis.component.ts
  12. 60
      projects/cdk/src/ingredient/ingredient-form-basic/ingredient-form-basic.component.ts
  13. 10
      projects/cdk/src/ingredient/ingredient-preview/ingredient-preview.component.html
  14. 10
      projects/cdk/src/ingredient/ingredient-preview/ingredient-preview.component.ts
  15. 45
      projects/cdk/src/services/api.service.ts
  16. 7
      projects/client/src/app/app-routing.module.ts
  17. 3
      projects/client/src/app/app.module.ts
  18. 28
      projects/client/src/app/pages/dashboard/dashboard.component.html
  19. 18
      projects/client/src/app/pages/ingredients/ingredient-list/ingredient-list.component.html
  20. 44
      projects/client/src/app/pages/ingredients/ingredient-list/ingredient-list.component.ts
  21. 2
      projects/client/src/app/pages/login/login.component.html
  22. 19
      projects/client/src/app/services/title.service.ts

3
projects/admin/src/app/app.module.ts

@ -41,6 +41,8 @@ import { IconsProviderModule, PROJECT_NAME } from "@cdk/public-api";
import { SharedModule } from "@cdk/shared/shared.module";
import { IngredientModule } from "@cdk/ingredient/ingredient.module";
import { NgxPermissionsModule } from "ngx-permissions";
import { TitleStrategy } from "@angular/router";
import { TemplatePageTitleStrategy } from "./services";
registerLocaleData(zh);
@ -88,6 +90,7 @@ registerLocaleData(zh);
{ provide: NZ_I18N, useValue: zh_CN },
{ provide: PROJECT_NAME, useValue: "admin" },
{ provide: HTTP_INTERCEPTORS, useClass: HTTPInterceptor, multi: true },
{ provide: TitleStrategy, useClass: TemplatePageTitleStrategy },
],
bootstrap: [AppComponent],
})

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

@ -47,7 +47,7 @@
<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','review']">食谱审核</li>
<!-- <li nz-menu-item nzMatchRouter [routerLink]="['/','ingredient','review']">食谱审核</li> -->
<li nz-menu-item nzMatchRouter [routerLink]="['/','ingredient','release']">食谱发布计划</li>
</ul>
</li>

18
projects/admin/src/app/pages/ingredients/ingredient-list/ingredient-list.component.html

@ -27,7 +27,7 @@
<app-org-select formControlName="vender"></app-org-select>
</nz-form-control>
</nz-form-item>
<nz-form-item class="w-40">
<!-- <nz-form-item class="w-40">
<nz-form-control>
<nz-select nzPlaceHolder="状态" formControlName="status" [nzAllowClear]="true">
<nz-option *ngFor="let item of globalEnum.menuStatus" [nzValue]="item.label"
@ -35,7 +35,7 @@
</nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</nz-form-item> -->
<nz-form-item>
<nz-form-control>
<input nz-input placeholder="请输入食谱名称" formControlName="name" />
@ -87,7 +87,19 @@
<ng-template #releaseStartTimeTpl>
<div nz-form>
<nz-form-item>
<nz-alert nzType="warning"
nzMessage="注意"
[nzDescription]="warnTpl">
<ng-template #warnTpl>
<div>
1、请在发布前确认配餐内容是否正确,发布即视为已完成食谱审核;
</div>
<div>
2、已发布的食谱无法修改,如需调整,需取消发布后进行编辑
</div>
</ng-template>
</nz-alert>
<nz-form-item class="mt-4">
<nz-form-label nzSpan="6" [nzRequired]="true">
发布日期
</nz-form-label>

44
projects/admin/src/app/pages/ingredients/ingredient-list/ingredient-list.component.ts

@ -95,35 +95,35 @@ export class IngredientListComponent {
onClick: this.export.bind(this),
},
{
title: "审核",
premissions: [],
onClick: this.shenhe.bind(this),
visible(v) {
// 0 提交审核 编辑 删除
// 1 审核中 删除
// 2 发布 编辑 删除
// 3 提交审核 编辑 删除
// 4 提交审核 编辑 删除
return [0, 3, 4].includes(v.status);
},
},
// {
// title: "审核",
// premissions: [],
// onClick: this.shenhe.bind(this),
// visible(v) {
// // 0 提交审核 编辑 删除
// // 1 审核中 删除
// // 2 发布 编辑 删除
// // 3 提交审核 编辑 删除
// // 4 提交审核 编辑 删除
// return [0, 3, 4].includes(v.status);
// },
// },
{
title: "发布",
premissions: [],
onClick: this.release.bind(this),
visible(v) {
return [2].includes(v.status);
},
},
{
title: "禁用",
premissions: [],
onClick: this.disableMenu.bind(this),
visible(v) {
return [2].includes(v.status);
return [0, 2].includes(v.status);
},
},
// {
// title: "禁用",
// premissions: [],
// onClick: this.disableMenu.bind(this),
// visible(v) {
// return [2].includes(v.status);
// },
// },
{
title: "编辑",
premissions: [],

6
projects/admin/src/app/pages/login/login.component.less

@ -39,9 +39,11 @@
display: block;
width: 560px;
height: 100%;
background-image: url('/assets/images/login.jpg');
background-size: cover;
background-image: url('/assets/images/jl-logo.png');
background-size: contain;
background-position: center;
background-repeat: no-repeat;
background-color: #1890ff;
}
}

37
projects/admin/src/app/pages/standard/standard-form/standard-form.component.ts

@ -47,7 +47,7 @@ export class StandardFormComponent {
// vendors: OptionItemInterface[] = [];
listOfOption: Array<{ value: number; text: string }> = [];
listOfOption: Array<{ value: number | string; text: string }> = [];
nzFilterOption = (): boolean => true;
@ -74,23 +74,26 @@ export class StandardFormComponent {
});
}
}
this.orgSearch$
.pipe(
filter((f) => !!f),
debounceTime(500),
distinctUntilChanged(),
switchMap((term: string) => this.api.getOrgList({ keyword: term }))
)
.subscribe((data) => {
const listOfOption: Array<{ value: number; text: string }> = [];
data.forEach((item) => {
listOfOption.push({
value: item.id,
text: item.name,
});
});
this.listOfOption = listOfOption;
this.api.getOrgList().subscribe((res) => {
this.listOfOption = res;
});
// this.orgSearch$
// .pipe(
// filter((f) => !!f),
// debounceTime(500),
// distinctUntilChanged(),
// switchMap((term: string) => this.api.getOrgList({ keyword: term }))
// )
// .subscribe((data) => {
// const listOfOption: Array<{ value: number; text: string }> = [];
// data.forEach((item) => {
// listOfOption.push({
// value: item.id,
// text: item.name,
// });
// });
// this.listOfOption = listOfOption;
// });
}
searchOrg = (k: string) => {

2
projects/admin/src/app/services/index.ts

@ -1 +1,3 @@
export * from "../../../../cdk/src/services/api.service";
export * from "./title.service";

19
projects/admin/src/app/services/title.service.ts

@ -0,0 +1,19 @@
import { Injectable } from "@angular/core";
import { Title } from "@angular/platform-browser";
import { RouterStateSnapshot, TitleStrategy } from "@angular/router";
@Injectable({ providedIn: "root" })
export class TemplatePageTitleStrategy extends TitleStrategy {
constructor(private readonly title: Title) {
super();
}
override updateTitle(routerState: RouterStateSnapshot) {
const title = this.buildTitle(routerState);
let fullTitle = "营养配餐系统后台";
if (title !== undefined) {
fullTitle += ` | ${title}`;
}
this.title.setTitle(fullTitle);
}
}

BIN
projects/admin/src/assets/images/jl-logo.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 350 KiB

After

Width:  |  Height:  |  Size: 192 KiB

5
projects/cdk/src/ingredient/ingredient-analysis/ingredient-analysis.component.html

@ -1,9 +1,11 @@
<nz-tabset>
<nz-tab nzTitle="营养分析">
<div nz-row [nzGutter]="12">
<div nz-col nzSpan="8" *ngIf="menu.days.length">
<nz-select class="w-full" [(ngModel)]="currentDay" (ngModelChange)="getAnalysis()">
<nz-option *ngFor="let item of menu.days" [nzLabel]="'' + (item) + ''" [nzValue]="item">
<nz-option *ngFor="let item of menu.days" [nzLabel]="weekdayMap[item]" [nzValue]="item">
</nz-option>
</nz-select>
@ -62,7 +64,6 @@
{{e.value}}
</td>
<td>
<ng-container [ngSwitch]="e.conclusion">
<ng-container *ngSwitchCase="'合适'">
<div class=" text-green-500">

6
projects/cdk/src/ingredient/ingredient-analysis/ingredient-analysis.component.ts

@ -2,6 +2,7 @@ import { Component, Input, OnInit } from "@angular/core";
import { ActivatedRoute } from "@angular/router";
import { ApiService } from "@cdk/services";
import { finalize } from "rxjs";
import { weekdayMap } from "../ingredient-form-basic/ingredient-form-basic.component";
@Component({
selector: "lib-ingredient-analysis",
@ -29,8 +30,11 @@ export class IngredientAnalysisComponent implements OnInit {
analysisLoading = false;
weekdayMap = weekdayMap;
ngOnInit(): void {
this.currentDay = this.current.day;
console.log("this.current", this.menu);
this.currentDay = this.current?.day ?? this.menu.day[0];
this.currentPeople = this.menu.crows[0];
this.id = this.route.snapshot.queryParamMap.get("newId") ?? this.menu.id;
this.getAnalysis();

60
projects/cdk/src/ingredient/ingredient-form-basic/ingredient-form-basic.component.ts

@ -79,36 +79,38 @@ export class IngredientFormBasicComponent implements OnChanges {
vendors: this.fb.control([], this.client ? [] : [FormValidators.required()]),
month: this.fb.control([], [FormValidators.required()]),
});
this.standardSearch$
.pipe(
filter((f) => !!f),
debounceTime(500),
distinctUntilChanged(),
takeUntil(this.destroy$),
switchMap((q) => this.api.getStandard(q))
)
.subscribe((data) => {
let listOfOption: Array<OptionItemInterface> = [];
if (data.body) {
const getById = data.body && !Array.isArray(data.body);
if (getById) {
data.body = [data.body];
}
data.body.forEach((item: any) => {
listOfOption.push({
label: item.name,
value: item.id,
...item,
// this.standardSearch$
// .pipe(
// filter((f) => !!f),
// debounceTime(500),
// distinctUntilChanged(),
// takeUntil(this.destroy$),
// switchMap((q) => this.api.getStandard(q))
// )
// .subscribe((data) => {
// let listOfOption: Array<OptionItemInterface> = [];
// if (data.body) {
// const getById = data.body && !Array.isArray(data.body);
// if (getById) {
// data.body = [data.body];
// }
// data.body.forEach((item: any) => {
// listOfOption.push({
// label: item.name,
// value: item.id,
// ...item,
// });
// });
// this.searchedStandard = this.searchedStandard.concat(listOfOption);
// if (getById && this.menu.nutrient) {
// this.onStandardChange(this.menu.nutrient);
// }
// }
// this.standardOfOption = listOfOption;
// });
this.api.getStandard().subscribe((res) => {
this.standardOfOption = res;
});
});
this.searchedStandard = this.searchedStandard.concat(listOfOption);
if (getById && this.menu.nutrient) {
this.onStandardChange(this.menu.nutrient);
}
}
this.standardOfOption = listOfOption;
});
this.setValues();
}

10
projects/cdk/src/ingredient/ingredient-preview/ingredient-preview.component.html

@ -14,7 +14,11 @@
<div class="p-4">
<nz-descriptions>
<nz-descriptions-item nzTitle="采用标准">{{basic.standardName ?? '-'}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="食谱周期">{{basic.day}}天</nz-descriptions-item>
<nz-descriptions-item nzTitle="食谱周期">
<nz-tag *ngFor="let item of basic.day" class="mb-1">
{{weekdayMap[item]}}
</nz-tag>
</nz-descriptions-item>
<nz-descriptions-item nzTitle="适用月份">
<div class="flex flex-wrap" *ngIf="basic.month as data">
<ng-container *ngIf="data.length === 12">
@ -56,12 +60,12 @@
</div>
</th>
{{days | json}}
<th *ngFor="let day of days">
<div>
<div class="table-day-row">
<div class="td"> {{weekdayMap[day]}} </div>
<div class="td"> 重量/克 </div>
<div class="td">重量/克</div>
</div>
<div class="table-menu-row flex ">
<div class="td dish-name text-left">

10
projects/cdk/src/ingredient/ingredient-preview/ingredient-preview.component.ts

@ -28,6 +28,8 @@ export class IngredientPreviewComponent {
totalObj: Record<string, string> | null = null;
weekdayMap = weekdayMap;
monthText = {
1: "一月",
2: "二月",
@ -43,8 +45,6 @@ export class IngredientPreviewComponent {
12: "十二月",
} as any;
weekdayMap = weekdayMap;
days: number[] = [];
ngOnInit(): void {
@ -121,7 +121,7 @@ export class IngredientPreviewComponent {
}
getStandardName(id: string) {
this.api.getStandard({ id }).subscribe((res) => {
this.api.getStandardById({ id }).subscribe((res) => {
this.basic["standardName"] = res.body.name;
});
}
@ -148,9 +148,7 @@ export class IngredientPreviewComponent {
...this.basic,
days: this.days,
},
current: {
day,
},
current: {},
},
});
}

45
projects/cdk/src/services/api.service.ts

@ -356,46 +356,29 @@ export class ApiService {
);
}
getO1rgList(query?: { vendors?: number[]; keyword?: string }, force?: boolean) {
if (this.orgList.length && !force) {
return of(this.orgList);
}
// const q = Utils.objectStringify(query);
return this.http.get<ResponseType<OrgDTO[]>>(`/api/vender/select?keyword= `).pipe(
standardList: (AnyObject & OptionItemInterface)[] = [];
getStandard(q?: { id?: string; name?: string }, force?: boolean) {
// if (this.standardList.length && !force) {
// return of(this.standardList);
// }
const query = q ? Utils.objectStringify(q) : "keyword=&name=";
return this.http.get<ResponseType<any>>(`/api/nutrition/select?${query}`).pipe(
map((r) => {
return r.body.map((i) => ({
return r.body.map((i: any) => ({
...i,
value: i.id.toString(),
text: i.name,
label: i.name,
}));
}),
tap((r) => {
this.orgList = r;
this.standardList = r;
})
);
}
standardList: (AnyObject & { value: string; text: string })[] = [];
getStandard(q: { id?: string; name?: string }, force?: boolean) {
// if (this.standardList.length && !force) {
// return of(this.standardList);
// }
const query = q ? Utils.objectStringify(q) : { name: "" };
return this.http
.get<ResponseType<any>>(`/api/nutrition/select?${query}`)
.pipe
// map((r) => {
// return r.body.map((i: any) => ({
// ...i,
// value: i.id.toString(),
// text: i.name,
// }));
// }),
// tap((r) => {
// this.orgList = r;
// })
();
getStandardById(q: { id?: string; name?: string }) {
const query = Utils.objectStringify(q);
return this.http.get<ResponseType<any>>(`/api/nutrition/select?${query}`);
}
saveStandard(v: AnyObject, isEdit?: boolean) {

7
projects/client/src/app/app-routing.module.ts

@ -36,6 +36,7 @@ const routes: Routes = [
},
{
path: "dashboard",
title: "使用流程",
component: DashboardComponent,
canActivate: [ngxPermissionsGuard],
data: {
@ -60,6 +61,7 @@ const routes: Routes = [
path: "data-vis",
component: DataVisComponent,
canActivate: [ngxPermissionsGuard],
data: {
permissions: {
only: ["19", "20"],
@ -71,6 +73,7 @@ const routes: Routes = [
path: "food",
component: FoodComponent,
canActivate: [ngxPermissionsGuard],
title: "食材管理",
data: {
permissions: {
only: ["23", "24"],
@ -82,6 +85,7 @@ const routes: Routes = [
path: "dish",
component: DishComponent,
canActivate: [ngxPermissionsGuard],
title: "菜品管理",
data: {
permissions: {
only: ["25", "26"],
@ -154,6 +158,7 @@ const routes: Routes = [
{
path: "system",
canActivate: [ngxPermissionsGuard],
data: {
permissions: {
only: ["33", "34", "35", "36", "37"],
@ -165,6 +170,7 @@ const routes: Routes = [
path: "org",
component: OrgInfoComponent,
canActivate: [ngxPermissionsGuard],
title: "单位信息设置",
data: {
permissions: {
only: ["33", "34"],
@ -176,6 +182,7 @@ const routes: Routes = [
path: "user",
component: ClientUserManageComponent,
canActivate: [ngxPermissionsGuard],
title: "用户管理",
data: {
permissions: {
only: ["35", "36", "37"],

3
projects/client/src/app/app.module.ts

@ -37,6 +37,8 @@ import {
import { HTTPInterceptor } from "./services/http.interceptor";
import { IngredientModule } from "@cdk/ingredient/ingredient.module";
import { NgxPermissionsModule } from "ngx-permissions";
import { TemplatePageTitleStrategy } from "./services/title.service";
import { TitleStrategy } from "@angular/router";
registerLocaleData(zh);
@ -79,6 +81,7 @@ registerLocaleData(zh);
{ provide: PROJECT_NAME, useValue: "client" },
{ provide: NZ_I18N, useValue: zh_CN },
{ provide: HTTP_INTERCEPTORS, useClass: HTTPInterceptor, multi: true },
{ provide: TitleStrategy, useClass: TemplatePageTitleStrategy },
],
bootstrap: [AppComponent],
})

28
projects/client/src/app/pages/dashboard/dashboard.component.html

@ -3,20 +3,12 @@
<nz-card class="mb-4">
<div class="flex items-center">
<div class="flow-title">
基础设计及菜品管理
菜品管理
</div>
<div nz-row [nzGutter]="12" class="flex-1">
<div nz-col nzSpan="8">
<div class="card flex items-center">
<div class="icon">1</div>
<div class="flex-1">
进入【配餐设置】,修改三餐摄入能量、营养比例
</div>
</div>
</div>
<div nz-col nzSpan="8">
<div class="card flex items-center">
<div class="icon">2</div>
<div class="flex-1">
进入[菜品管理],新增/编辑菜品并保存
</div>
@ -24,7 +16,7 @@
</div>
<div nz-col nzSpan="8">
<div class="card flex items-center">
<div class="icon">3</div>
<div class="icon">2</div>
<div class="flex-1">
菜品管理列表找到所需菜品,下载[营养标签]
</div>
@ -41,7 +33,7 @@
<div nz-row [nzGutter]="[12,12]">
<div nz-col nzSpan="8">
<div class="card flex min-h-[186px]">
<div class="icon">4</div>
<div class="icon">3</div>
<div class="flex-1">
进入[食谱管理-食谱库],创建食谱
</div>
@ -49,7 +41,7 @@
</div>
<div nz-col nzSpan="8">
<div class="card flex ">
<div class="icon">5</div>
<div class="icon">4</div>
<div class="flex-1">
<p>
配置食谱基础信息:
@ -76,7 +68,7 @@
</div>
<div nz-col nzSpan="8">
<div class="card flex min-h-[186px]">
<div class="icon">6</div>
<div class="icon">5</div>
<div class="flex-1">
<p>按实际情况设置菜品:</p>
<ul class="ul">
@ -92,7 +84,7 @@
</div>
<div nz-col nzSpan="8">
<div class="card flex">
<div class="icon">7</div>
<div class="icon">6</div>
<div class="flex-1">
<p>
完成食谱配置后进行食谱分析并确认食谱:
@ -110,7 +102,7 @@
</div>
<div nz-col nzSpan="8">
<div class="card flex min-h-[120px]">
<div class="icon">8</div>
<div class="icon">7</div>
<div class="flex-1">
保存食谱
</div>
@ -127,7 +119,7 @@
<div nz-row [nzGutter]="[12,12]">
<div nz-col nzSpan="8">
<div class="card flex items-center">
<div class="icon">9</div>
<div class="icon">8</div>
<div class="flex-1">
在食谱列表中找到食谱,发起审核
</div>
@ -135,7 +127,7 @@
</div>
<div nz-col nzSpan="8">
<div class="card flex items-center">
<div class="icon">10</div>
<div class="icon">9</div>
<div class="flex-1">
等待审核通过后返回食谱列表查看进行发布
</div>
@ -143,7 +135,7 @@
</div>
<div nz-col nzSpan="8">
<div class="card flex items-center">
<div class="icon">11</div>
<div class="icon">10</div>
<div class="flex-1">
填写发布时间等信息确认发布
</div>

18
projects/client/src/app/pages/ingredients/ingredient-list/ingredient-list.component.html

@ -23,7 +23,7 @@
</ng-template>
<ng-template #searchTpl>
<nz-form-item class="w-40">
<!-- <nz-form-item class="w-40">
<nz-form-control>
<nz-select nzPlaceHolder="状态" formControlName="status" [nzAllowClear]="true">
<nz-option *ngFor="let item of globalEnum.menuStatus" [nzValue]="item.label"
@ -31,7 +31,7 @@
</nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</nz-form-item> -->
<nz-form-item>
<nz-form-control>
<input nz-input placeholder="请输入食谱名称" formControlName="name" />
@ -83,7 +83,19 @@
<ng-template #releaseStartTimeTpl>
<div nz-form>
<nz-form-item>
<nz-alert nzType="warning"
nzMessage="注意"
[nzDescription]="warnTpl">
<ng-template #warnTpl>
<div>
1、请在发布前确认配餐内容是否正确,发布即视为已完成食谱审核;
</div>
<div>
2、已发布的食谱无法修改,如需调整,需取消发布后进行编辑
</div>
</ng-template>
</nz-alert>
<nz-form-item class="mt-4">
<nz-form-label nzSpan="6" [nzRequired]="true">
发布日期
</nz-form-label>

44
projects/client/src/app/pages/ingredients/ingredient-list/ingredient-list.component.ts

@ -95,35 +95,35 @@ export class IngredientListComponent {
onClick: this.export.bind(this),
},
{
title: "审核",
premissions: [],
onClick: this.shenhe.bind(this),
visible(v) {
// 0 提交审核 编辑 删除
// 1 审核中 删除
// 2 发布 编辑 删除
// 3 提交审核 编辑 删除
// 4 提交审核 编辑 删除
return [0, 3, 4].includes(v.status);
},
},
// {
// title: "审核",
// premissions: [],
// onClick: this.shenhe.bind(this),
// visible(v) {
// // 0 提交审核 编辑 删除
// // 1 审核中 删除
// // 2 发布 编辑 删除
// // 3 提交审核 编辑 删除
// // 4 提交审核 编辑 删除
// return [0, 3, 4].includes(v.status);
// },
// },
{
title: "发布",
premissions: [],
onClick: this.release.bind(this),
visible(v) {
return [2].includes(v.status);
},
},
{
title: "禁用",
premissions: [],
onClick: this.disableMenu.bind(this),
visible(v) {
return [2].includes(v.status);
return [0, 2].includes(v.status);
},
},
// {
// title: "禁用",
// premissions: [],
// onClick: this.disableMenu.bind(this),
// visible(v) {
// return [2].includes(v.status);
// },
// },
{
title: "编辑",
premissions: [],

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

@ -8,7 +8,7 @@
</div> -->
<div class="card ">
<div class="img flex items-center justify-center">
<img src="assets/images/login.png" />
<img src="assets/images/jl-logo.png" />
</div>
<div class="form py-5 px-10 flex-1">
<div class="form-inner">

19
projects/client/src/app/services/title.service.ts

@ -0,0 +1,19 @@
import { Injectable } from "@angular/core";
import { Title } from "@angular/platform-browser";
import { RouterStateSnapshot, TitleStrategy } from "@angular/router";
@Injectable({ providedIn: "root" })
export class TemplatePageTitleStrategy extends TitleStrategy {
constructor(private readonly title: Title) {
super();
}
override updateTitle(routerState: RouterStateSnapshot) {
const title = this.buildTitle(routerState);
let fullTitle = "营养配餐系统";
if (title !== undefined) {
fullTitle += ` | ${title}`;
}
this.title.setTitle(fullTitle);
}
}
Loading…
Cancel
Save