diff --git a/ruoyi-ui/src/views/fantang/foodDemand/index.vue b/ruoyi-ui/src/views/fantang/foodDemand/index.vue
index 728af870b..3c6b6619b 100644
--- a/ruoyi-ui/src/views/fantang/foodDemand/index.vue
+++ b/ruoyi-ui/src/views/fantang/foodDemand/index.vue
@@ -89,11 +89,11 @@
-
-
-
-
-
+
+
+
+
+
@@ -147,6 +147,7 @@ import {
listFoodDemand,
updateFoodDemand
} from "@/api/fantang/foodDemand";
+import {listFood} from "../../../api/fantang/food";
export default {
name: "FoodDemand",
@@ -198,6 +199,7 @@ export default {
}
};
},
+
created() {
this.getList();
this.getDicts("ft_book_type").then(response => {
@@ -207,7 +209,47 @@ export default {
this.updateFromOptions = response.data;
});
},
+
+ beforeCreate() {
+ listFood(this.queryParams).then(response => {
+ this.foodList = response.rows;
+ this.loading = false;
+ });
+ },
methods: {
+ // 格式化菜单回显文字
+ formatFoods(row) {
+ const _this = this;
+ let arr = row.foods.split(",").map(Number);
+ let ret = arr.map(item =>{
+ let obj = _this.foodList.find((value => {
+ return value.foodId === item;
+ }));
+ return obj.name;
+ });
+ return ret.toString();
+ },
+ formatVegetables(row){
+ if (row.vegetables === null || row.vegetables === 0)
+ return "否";
+ return "是";
+ },
+ formatMeat(row) {
+ if (row.meat === null || row.meat === 0)
+ return "否";
+ return "是";
+ },
+
+ formatRice(row) {
+ if (row.rice === null || row.rice === 0)
+ return "否";
+ return "是";
+ },
+ formatEgg(row) {
+ if (row.egg === null || row.egg === 0)
+ return "否";
+ return "是";
+ },
/** 查询病人报餐列表 */
getList() {
this.loading = true;