diff --git a/projects/admin/src/app/components/dish-form/dish-form.component.ts b/projects/admin/src/app/components/dish-form/dish-form.component.ts index aa6b6f7..fcc38e3 100644 --- a/projects/admin/src/app/components/dish-form/dish-form.component.ts +++ b/projects/admin/src/app/components/dish-form/dish-form.component.ts @@ -199,7 +199,7 @@ export class DishFormComponent { this.foodItemSelected = this.foodItemSelected.filter((item) => v.includes(item.value)) // 添加新的选择项 - const newSelectedItems = this.searchedFood.filter( + const newSelectedItems = this.foodListOfOption.filter( (item) => v.includes(item.value) && !this.foodItemSelected.some((s) => s.value === item.value), ) this.foodItemSelected = [...this.foodItemSelected, ...newSelectedItems] diff --git a/projects/admin/src/app/pages/dish/dish.component.ts b/projects/admin/src/app/pages/dish/dish.component.ts index e18496c..f3fd21b 100644 --- a/projects/admin/src/app/pages/dish/dish.component.ts +++ b/projects/admin/src/app/pages/dish/dish.component.ts @@ -214,7 +214,7 @@ export class DishComponent { showFoodForm(data?: any) { this.drawerRef = this.drawer.create({ nzTitle: data ? '编辑菜品' : '新增菜品', - nzWidth: 700, + nzWidth: 1000, nzContent: DishFormComponent, nzContentParams: { data, diff --git a/projects/client/src/app/components/dish-form/dish-form.component.ts b/projects/client/src/app/components/dish-form/dish-form.component.ts index fccad60..4ed6ad0 100644 --- a/projects/client/src/app/components/dish-form/dish-form.component.ts +++ b/projects/client/src/app/components/dish-form/dish-form.component.ts @@ -193,7 +193,7 @@ export class DishFormComponent { this.foodItemSelected = this.foodItemSelected.filter((item) => v.includes(item.value)) // 添加新的选择项 - const newSelectedItems = this.searchedFood.filter( + const newSelectedItems = this.foodListOfOption.filter( (item) => v.includes(item.value) && !this.foodItemSelected.some((s) => s.value === item.value), ) this.foodItemSelected = [...this.foodItemSelected, ...newSelectedItems] diff --git a/projects/client/src/app/pages/dish/dish.component.ts b/projects/client/src/app/pages/dish/dish.component.ts index 9ae45bb..0989d9a 100644 --- a/projects/client/src/app/pages/dish/dish.component.ts +++ b/projects/client/src/app/pages/dish/dish.component.ts @@ -178,7 +178,7 @@ export class DishComponent { showFoodForm(data?: any) { this.drawerRef = this.drawer.create({ nzTitle: data ? '编辑菜品' : '新增菜品', - nzWidth: 700, + nzWidth: 1000, nzContent: DishFormComponent, nzContentParams: { data,