From 87897b8e48eb0978a574c80caf57b4e201521ae0 Mon Sep 17 00:00:00 2001 From: kely Date: Tue, 28 Nov 2023 15:40:01 +0800 Subject: [PATCH] =?UTF-8?q?bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ingredient-form/ingredient-form.component.ts | 2 +- .../ingredient-release/ingredient-release.component.ts | 4 +++- .../standard-list/standard-list.component.html | 5 ++++- .../standard/standard-list/standard-list.component.ts | 4 +++- .../ingredient-form-basic.component.html | 5 ----- .../ingredient-form-basic.component.ts | 10 +++++++++- .../table-list/table-list/table-list.component.html | 1 - .../src/table-list/table-list/table-list.component.ts | 1 + .../ingredient-release/ingredient-release.component.ts | 4 +++- 9 files changed, 24 insertions(+), 12 deletions(-) diff --git a/projects/admin/src/app/pages/ingredients/ingredient-form/ingredient-form.component.ts b/projects/admin/src/app/pages/ingredients/ingredient-form/ingredient-form.component.ts index 46eee0f..7120e07 100644 --- a/projects/admin/src/app/pages/ingredients/ingredient-form/ingredient-form.component.ts +++ b/projects/admin/src/app/pages/ingredients/ingredient-form/ingredient-form.component.ts @@ -110,7 +110,7 @@ export class IngredientFormComponent implements OnInit { analysis() { this.drawer.create({ - nzWidth: 20, + nzWidth: 720, nzWrapClassName: "analysis-drawer", nzContent: IngredientAnalysisComponent, nzContentParams: { diff --git a/projects/admin/src/app/pages/ingredients/ingredient-release/ingredient-release.component.ts b/projects/admin/src/app/pages/ingredients/ingredient-release/ingredient-release.component.ts index 3e6b95a..9516b80 100644 --- a/projects/admin/src/app/pages/ingredients/ingredient-release/ingredient-release.component.ts +++ b/projects/admin/src/app/pages/ingredients/ingredient-release/ingredient-release.component.ts @@ -22,7 +22,9 @@ export class IngredientReleaseComponent { private msg: NzMessageService ) {} - public tableList = new TableListOption(this.fetchData.bind(this)); + public tableList = new TableListOption(this.fetchData.bind(this), { + frontPagination: false, + }); public queryForm = new FormGroup({ name: new FormControl(""), diff --git a/projects/admin/src/app/pages/standard/standard-list/standard-list.component.html b/projects/admin/src/app/pages/standard/standard-list/standard-list.component.html index be3435e..6676700 100644 --- a/projects/admin/src/app/pages/standard/standard-list/standard-list.component.html +++ b/projects/admin/src/app/pages/standard/standard-list/standard-list.component.html @@ -10,7 +10,10 @@
- diff --git a/projects/admin/src/app/pages/standard/standard-list/standard-list.component.ts b/projects/admin/src/app/pages/standard/standard-list/standard-list.component.ts index 30c6508..ca84f29 100644 --- a/projects/admin/src/app/pages/standard/standard-list/standard-list.component.ts +++ b/projects/admin/src/app/pages/standard/standard-list/standard-list.component.ts @@ -22,7 +22,9 @@ export class StandardListComponent { private router: Router ) {} - public tableList = new TableListOption(this.fetchData.bind(this)); + public tableList = new TableListOption(this.fetchData.bind(this), { + frontPagination: false, + }); public queryForm = new FormGroup({ keyword: new FormControl(""), diff --git a/projects/cdk/src/ingredient/ingredient-form-basic/ingredient-form-basic.component.html b/projects/cdk/src/ingredient/ingredient-form-basic/ingredient-form-basic.component.html index 6d739b5..a9346ad 100644 --- a/projects/cdk/src/ingredient/ingredient-form-basic/ingredient-form-basic.component.html +++ b/projects/cdk/src/ingredient/ingredient-form-basic/ingredient-form-basic.component.html @@ -14,13 +14,8 @@ { this.standardOfOption = res; + if (this.menu) { + this.onStandardChange(String(this.menu.nutrient)); + this.setValues(); + } }); - this.setValues(); } ngOnChanges(changes: SimpleChanges): void {} setValues() { let weekday = []; + // console.log("this.menu", this.menu); if (this.menu) { this.standardSearch$.next({ id: this.menu.nutrient }); this.meals = this.meals.map((i) => (this.menu.meals.includes(i.value) ? { ...i, checked: true } : i)); weekday = this.weekday.map((i) => (this.menu.day.includes(i.value) ? { ...i, checked: true } : i)); this.formGroup.patchValue({ ...this.menu, + nutrient: String(this.menu.nutrient), vendors: [String(this.menu.vender)], }); } else { @@ -147,6 +152,9 @@ export class IngredientFormBasicComponent implements OnChanges { onStandardChange(v: any) { const currentStandard = this.standardOfOption.find((f) => f.value === v); + this.formGroup.patchValue({ + vendors: [], + }); if (currentStandard) { this.currentPeoples = Object.entries(currentStandard["ingredient"] ?? {}).map(([k, v]) => { return { diff --git a/projects/cdk/src/table-list/table-list/table-list.component.html b/projects/cdk/src/table-list/table-list/table-list.component.html index 4b6608f..2f5d738 100644 --- a/projects/cdk/src/table-list/table-list/table-list.component.html +++ b/projects/cdk/src/table-list/table-list/table-list.component.html @@ -36,7 +36,6 @@
-