From 2ea3d01d6e57b6e1d7fa567055ed9782a2052622 Mon Sep 17 00:00:00 2001 From: huangdeliang Date: Tue, 23 Mar 2021 20:10:29 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=BF=8C=E5=8F=A3=E7=BC=96?= =?UTF-8?q?=E5=86=99=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../custom/domain/SysCustomerHealthy.java | 4 + .../domain/SysCustomerPhysicalSigns.java | 488 +++++------------- .../custom/SysCustomerHealthyMapper.xml | 7 +- .../custom/SysCustomerPhysicalSignsMapper.xml | 10 +- .../SimpleIngredientListView2/index.vue | 147 ++++++ .../components/BodySignView/ACFCom2/index.vue | 103 ++++ .../BodySignView/RemarkCom2/index.vue | 99 ++++ .../src/components/BodySignView/index.vue | 72 +-- .../ACFCom/SimpleIngredientListView/index.vue | 147 ++++++ .../components/HealthyView/ACFCom/index.vue | 107 ++++ .../HealthyView/RemarkCom/index.vue | 99 ++++ .../src/components/HealthyView/index.vue | 50 +- stdiet-ui/src/components/TextInfo/index.vue | 2 + stdiet-ui/src/store/modules/recipes.js | 7 +- .../RecipesView/RecipesCom/index.vue | 10 +- 15 files changed, 874 insertions(+), 478 deletions(-) create mode 100644 stdiet-ui/src/components/BodySignView/ACFCom2/SimpleIngredientListView2/index.vue create mode 100644 stdiet-ui/src/components/BodySignView/ACFCom2/index.vue create mode 100644 stdiet-ui/src/components/BodySignView/RemarkCom2/index.vue create mode 100644 stdiet-ui/src/components/HealthyView/ACFCom/SimpleIngredientListView/index.vue create mode 100644 stdiet-ui/src/components/HealthyView/ACFCom/index.vue create mode 100644 stdiet-ui/src/components/HealthyView/RemarkCom/index.vue diff --git a/stdiet-custom/src/main/java/com/stdiet/custom/domain/SysCustomerHealthy.java b/stdiet-custom/src/main/java/com/stdiet/custom/domain/SysCustomerHealthy.java index 1b2bb182e..0b4c09318 100644 --- a/stdiet-custom/src/main/java/com/stdiet/custom/domain/SysCustomerHealthy.java +++ b/stdiet-custom/src/main/java/com/stdiet/custom/domain/SysCustomerHealthy.java @@ -1,5 +1,7 @@ package com.stdiet.custom.domain; +import com.alibaba.fastjson.JSONArray; +import com.fasterxml.jackson.databind.jsonFormatVisitors.JsonArrayFormatVisitor; import lombok.Data; import com.stdiet.common.annotation.Excel; import com.stdiet.common.core.domain.BaseEntity; @@ -442,4 +444,6 @@ public class SysCustomerHealthy extends BaseEntity /** 删除标识 0未删除 1已删除。默认0 */ private Long delFlag; + + private JSONArray avoidFood; } \ No newline at end of file diff --git a/stdiet-custom/src/main/java/com/stdiet/custom/domain/SysCustomerPhysicalSigns.java b/stdiet-custom/src/main/java/com/stdiet/custom/domain/SysCustomerPhysicalSigns.java index 17ec598c0..ffe435bc5 100644 --- a/stdiet-custom/src/main/java/com/stdiet/custom/domain/SysCustomerPhysicalSigns.java +++ b/stdiet-custom/src/main/java/com/stdiet/custom/domain/SysCustomerPhysicalSigns.java @@ -1,10 +1,10 @@ package com.stdiet.custom.domain; -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; +import com.alibaba.fastjson.JSONArray; import com.stdiet.common.annotation.Excel; -import com.stdiet.common.core.domain.BaseEntity; +import lombok.Data; +import java.util.Date; import java.util.List; /** @@ -13,478 +13,224 @@ import java.util.List; * @author xzj * @date 2020-12-31 */ -public class SysCustomerPhysicalSigns extends BaseEntity -{ - private static final long serialVersionUID = 1L; +@Data +public class SysCustomerPhysicalSigns { - /** 体征ID */ + /** + * 体征ID + */ private Long id; - /** 客户id */ + /** + * 客户id + */ //@Excel(name = "客户id") private Long customerId; - /** 客户姓名,非持久化字段 */ + /** + * 客户姓名,非持久化字段 + */ @Excel(name = "客户姓名") private String name; - /** 客户手机号,非持久化字段 */ + /** + * 客户手机号,非持久化字段 + */ @Excel(name = "客户手机号") private String phone; - /** 客户性别 0男 1女 */ + /** + * 客户性别 0男 1女 + */ @Excel(name = "客户性别 0男 1女") private Integer sex; - /** 客户年龄(岁) */ + /** + * 客户年龄(岁) + */ @Excel(name = "客户年龄", readConverterExp = "岁=") private Integer age; - /** 客户身高(厘米) */ + /** + * 客户身高(厘米) + */ @Excel(name = "客户身高", readConverterExp = "厘=米") private Integer tall; - /** 客户体重(斤) */ + /** + * 客户体重(斤) + */ @Excel(name = "客户体重", readConverterExp = "斤=") private Integer weight; - /** 客户病史体征id */ + /** + * 客户病史体征id + */ @Excel(name = "客户病史体征id") private String physicalSignsId; - /** 客户忌口不爱吃食材id */ + /** + * 客户忌口不爱吃食材id + */ @Excel(name = "客户忌口不爱吃食材id") private String dishesIngredientId; - /** 客户照片 */ + /** + * 客户照片 + */ @Excel(name = "客户照片") private String photo; - /** 是否便秘 0是 1否 */ + /** + * 是否便秘 0是 1否 + */ @Excel(name = "是否便秘 0是 1否") private Integer constipation; - /** 是否熬夜、失眠 0是 1否 */ + /** + * 是否熬夜、失眠 0是 1否 + */ @Excel(name = "是否熬夜、失眠 0是 1否") private Integer staylate; - /** 是否经常运动 0是 1否 */ + /** + * 是否经常运动 0是 1否 + */ @Excel(name = "是否经常运动 0是 1否") private Integer motion; - /** 饮食方式 0自己做 1外面吃 */ + /** + * 饮食方式 0自己做 1外面吃 + */ @Excel(name = "饮食方式 0自己做 1外面吃") private Integer makeFoodType; - /** 饮食特点 0清淡 1重口味 */ + /** + * 饮食特点 0清淡 1重口味 + */ @Excel(name = "饮食特点 0清淡 1重口味") private Integer makeFoodTaste; - /** 平时是否久坐 0久坐多 1走动多 */ + /** + * 平时是否久坐 0久坐多 1走动多 + */ @Excel(name = "平时是否久坐 0久坐多 1走动多") private Integer walk; - /** 减脂过程遇到的困难 */ + /** + * 减脂过程遇到的困难 + */ @Excel(name = "减脂过程遇到的困难") private String difficulty; - /** 是否浑身乏力 0是 1否 */ + /** + * 是否浑身乏力 0是 1否 + */ @Excel(name = "是否浑身乏力 0是 1否") private Integer weakness; - /** 是否减脂反弹 0是 1否 */ + /** + * 是否减脂反弹 0是 1否 + */ @Excel(name = "是否减脂反弹 0是 1否") private Integer rebound; - /** 能否认识到生活习惯的改善才是减脂的关键 0是 1否 */ + /** + * 能否认识到生活习惯的改善才是减脂的关键 0是 1否 + */ @Excel(name = "能否认识到生活习惯的改善才是减脂的关键 0是 1否") private Integer crux; - /** 南方人还是北方人 0南方 1北方 */ + /** + * 南方人还是北方人 0南方 1北方 + */ @Excel(name = "南方人还是北方人 0南方 1北方") private Integer position; - /** 睡觉时间(24小时制) */ + /** + * 睡觉时间(24小时制) + */ @Excel(name = "睡觉时间", readConverterExp = "2=4小时制") private Integer sleepTime; - /** 起床时间(24小时制) */ + /** + * 起床时间(24小时制) + */ @Excel(name = "起床时间", readConverterExp = "2=4小时制") private Integer getupTime; - /** 联系沟通时间(24小时制) */ + /** + * 联系沟通时间(24小时制) + */ @Excel(name = "联系沟通时间", readConverterExp = "2=4小时制") private Integer connectTime; - /** 饮食备注 */ + /** + * 饮食备注 + */ @Excel(name = "饮食备注") private String remarks; - /** 湿气数据 */ + /** + * 营养师备注 + */ + private String remark; + + /** + * 湿气数据 + */ @Excel(name = "湿气数据") private String bloodData; - /** 气血数据 */ + /** + * 气血数据 + */ @Excel(name = "气血数据") private String moistureDate; - /** 工作职业 */ + /** + * 工作职业 + */ @Excel(name = "工作职业") private String vocation; - /** 是否上夜班 */ + /** + * 是否上夜班 + */ @Excel(name = "是否上夜班") private Integer night; - /** 减脂经历 */ + /** + * 减脂经历 + */ @Excel(name = "减脂经历") private String experience; - /** 备注 */ + /** + * 备注 + */ @Excel(name = "备注") private String comments; - /** 删除标识(0 未删除 1已删除) */ + /** + * 删除标识(0 未删除 1已删除) + */ private Integer delFlag; - /** 体征对象集合 **/ + /** + * 体征对象集合 + **/ private List signList; - public void setId(Long id) - { - this.id = id; - } + private JSONArray avoidFood; - public Long getId() - { - return id; - } - public void setCustomerId(Long customerId) - { - this.customerId = customerId; - } + private Date createTime; - public Long getCustomerId() - { - return customerId; - } - public void setSex(Integer sex) - { - this.sex = sex; - } + private Date updateTime; - public Integer getSex() - { - return sex; - } - public void setAge(Integer age) - { - this.age = age; - } + private String createBy; - public Integer getAge() - { - return age; - } - public void setTall(Integer tall) - { - this.tall = tall; - } + private String updateBy; - public Integer getTall() - { - return tall; - } - public void setWeight(Integer weight) - { - this.weight = weight; - } - public Integer getWeight() - { - return weight; - } - public void setPhysicalSignsId(String physicalSignsId) - { - this.physicalSignsId = physicalSignsId; - } - - public String getPhysicalSignsId() - { - return physicalSignsId; - } - public void setDishesIngredientId(String dishesIngredientId) - { - this.dishesIngredientId = dishesIngredientId; - } - - public String getDishesIngredientId() - { - return dishesIngredientId; - } - public void setPhoto(String photo) - { - this.photo = photo; - } - - public String getPhoto() - { - return photo; - } - public void setConstipation(Integer constipation) - { - this.constipation = constipation; - } - - public Integer getConstipation() - { - return constipation; - } - public void setStaylate(Integer staylate) - { - this.staylate = staylate; - } - - public Integer getStaylate() - { - return staylate; - } - public void setMotion(Integer motion) - { - this.motion = motion; - } - - public Integer getMotion() - { - return motion; - } - public void setMakeFoodType(Integer makeFoodType) - { - this.makeFoodType = makeFoodType; - } - - public Integer getMakeFoodType() - { - return makeFoodType; - } - public void setMakeFoodTaste(Integer makeFoodTaste) - { - this.makeFoodTaste = makeFoodTaste; - } - - public Integer getMakeFoodTaste() - { - return makeFoodTaste; - } - public void setWalk(Integer walk) - { - this.walk = walk; - } - - public Integer getWalk() - { - return walk; - } - public void setDifficulty(String difficulty) - { - this.difficulty = difficulty; - } - - public String getDifficulty() - { - return difficulty; - } - public void setWeakness(Integer weakness) - { - this.weakness = weakness; - } - - public Integer getWeakness() - { - return weakness; - } - public void setRebound(Integer rebound) - { - this.rebound = rebound; - } - - public Integer getRebound() - { - return rebound; - } - public void setCrux(Integer crux) - { - this.crux = crux; - } - - public Integer getCrux() - { - return crux; - } - public void setPosition(Integer position) - { - this.position = position; - } - - public Integer getPosition() - { - return position; - } - public void setSleepTime(Integer sleepTime) - { - this.sleepTime = sleepTime; - } - - public Integer getSleepTime() - { - return sleepTime; - } - public void setGetupTime(Integer getupTime) - { - this.getupTime = getupTime; - } - - public Integer getGetupTime() - { - return getupTime; - } - public void setConnectTime(Integer connectTime) - { - this.connectTime = connectTime; - } - - public Integer getConnectTime() - { - return connectTime; - } - public void setRemarks(String remarks) - { - this.remarks = remarks; - } - - public String getRemarks() - { - return remarks; - } - public void setBloodData(String bloodData) - { - this.bloodData = bloodData; - } - - public String getBloodData() - { - return bloodData; - } - public void setMoistureDate(String moistureDate) - { - this.moistureDate = moistureDate; - } - - public String getMoistureDate() - { - return moistureDate; - } - - public String getVocation() { - return vocation; - } - - public void setVocation(String vocation) { - this.vocation = vocation; - } - - public Integer getNight() { - return night; - } - - public void setNight(Integer night) { - this.night = night; - } - - public String getExperience() { - return experience; - } - - public void setExperience(String experience) { - this.experience = experience; - } - - public List getSignList() { - return signList; - } - - public void setSignList(List signList) { - this.signList = signList; - } - - public String getComments() { - return comments; - } - - public void setComments(String comments) { - this.comments = comments; - } - - public Integer getDelFlag() { - return delFlag; - } - - public void setDelFlag(Integer delFlag) { - this.delFlag = delFlag; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getPhone() { - return phone; - } - - public void setPhone(String phone) { - this.phone = phone; - } - - @Override - public String toString() { - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("id", getId()) - .append("customerId", getCustomerId()) - .append("sex", getSex()) - .append("age", getAge()) - .append("tall", getTall()) - .append("weight", getWeight()) - .append("physicalSignsId", getPhysicalSignsId()) - .append("dishesIngredientId", getDishesIngredientId()) - .append("photo", getPhoto()) - .append("constipation", getConstipation()) - .append("staylate", getStaylate()) - .append("motion", getMotion()) - .append("makeFoodType", getMakeFoodType()) - .append("makeFoodTaste", getMakeFoodTaste()) - .append("walk", getWalk()) - .append("difficulty", getDifficulty()) - .append("weakness", getWeakness()) - .append("rebound", getRebound()) - .append("crux", getCrux()) - .append("position", getPosition()) - .append("sleepTime", getSleepTime()) - .append("getupTime", getGetupTime()) - .append("connectTime", getConnectTime()) - .append("remarks", getRemarks()) - .append("bloodData", getBloodData()) - .append("moistureDate", getMoistureDate()) - .append("vocation", getVocation()) - .append(" night", getNight()) - .append("experience", getExperience()) - .append("createTime", getCreateTime()) - .append("createBy", getCreateBy()) - .append("updateTime", getUpdateTime()) - .append("updateBy", getUpdateBy()) - .toString(); - } } \ No newline at end of file diff --git a/stdiet-custom/src/main/resources/mapper/custom/SysCustomerHealthyMapper.xml b/stdiet-custom/src/main/resources/mapper/custom/SysCustomerHealthyMapper.xml index 437aedd3f..1a92618b6 100644 --- a/stdiet-custom/src/main/resources/mapper/custom/SysCustomerHealthyMapper.xml +++ b/stdiet-custom/src/main/resources/mapper/custom/SysCustomerHealthyMapper.xml @@ -118,12 +118,14 @@ + + - select sch.id, customer_id, conditioning_project_id, sex, age, weight, tall, condiment, other_condiment, cooking_style, cooking_style_rate, wash_vegetables_style, other_wash_vegetables_style, breakfast_type, breakfast_food, lunch_type, dinner, vegetable_rate, common_meat, dinner_time, supper_num, supper_food, diet_hot_and_cold, diet_flavor, vegetables_num, vegetables_rate_type, fruits_num, fruits_time, fruits_rate, rice_num, rice_full, eating_speed, snacks, other_snacks, health_products_flag, health_products_brand, health_products_name, health_products_week_rate, health_products_day_rate, water_num, water_type, water_habit, drinks_num, drink_wine_flag, drink_wine_classify, other_wine_classify, drink_wine_amount, smoke_flag, smoke_rate, second_smoke, work_industry, work_type, defecation_num, other_defecation_num, defecation_time, defecation_shape, defecation_smell, defecation_speed, defecation_color, motion_num, motion_duration, motion_time, aerobic_motion_classify, anaerobic_motion_classify, anaerobic_aerobic_motion_classify, other_motion_classify, motion_field, other_motion_field, sleep_time, sleep_quality, sleep_drug_flag, sleep_drug, stayup_late_flag, stayup_late_week_num, family_illness_history, other_family_illness_history, operation_history, other_operation_history, near_operation_flag, recoverye_situation, long_eat_drug_flag, long_eat_drug_classify, other_long_eat_drug_classify, allergy_flag, allergy_situation, allergen, other_allergen, medical_report, medical_report_name, + select sch.id, customer_id, avoid_food, conditioning_project_id, sex, age, weight, tall, condiment, other_condiment, cooking_style, cooking_style_rate, wash_vegetables_style, other_wash_vegetables_style, breakfast_type, breakfast_food, lunch_type, dinner, vegetable_rate, common_meat, dinner_time, supper_num, supper_food, diet_hot_and_cold, diet_flavor, vegetables_num, vegetables_rate_type, fruits_num, fruits_time, fruits_rate, rice_num, rice_full, eating_speed, snacks, other_snacks, health_products_flag, health_products_brand, health_products_name, health_products_week_rate, health_products_day_rate, water_num, water_type, water_habit, drinks_num, drink_wine_flag, drink_wine_classify, other_wine_classify, drink_wine_amount, smoke_flag, smoke_rate, second_smoke, work_industry, work_type, defecation_num, other_defecation_num, defecation_time, defecation_shape, defecation_smell, defecation_speed, defecation_color, motion_num, motion_duration, motion_time, aerobic_motion_classify, anaerobic_motion_classify, anaerobic_aerobic_motion_classify, other_motion_classify, motion_field, other_motion_field, sleep_time, sleep_quality, sleep_drug_flag, sleep_drug, stayup_late_flag, stayup_late_week_num, family_illness_history, other_family_illness_history, operation_history, other_operation_history, near_operation_flag, recoverye_situation, long_eat_drug_flag, long_eat_drug_classify, other_long_eat_drug_classify, allergy_flag, allergy_situation, allergen, other_allergen, medical_report, medical_report_name, position,experience,rebound,difficulty,crux,dishes_ingredient,make_food_type,physical_signs_id,other_physical_signs,blood_data,moisture_date,sch.remark,sch.guidance, sch.create_time, sch.create_by,sch. update_time, sch.update_by, sch.del_flag @@ -268,6 +270,7 @@ update_time, update_by, del_flag, + avoid_food, #{id}, @@ -377,6 +380,7 @@ #{updateTime}, #{updateBy}, #{delFlag}, + #{avoid_food, jdbcType=OTHER, typeHandler=com.stdiet.custom.typehandler.ArrayJsonHandler}, @@ -489,6 +493,7 @@ update_time = #{updateTime}, update_by = #{updateBy}, del_flag = #{delFlag}, + avoid_food = #{avoidFood, jdbcType=OTHER, typeHandler=com.stdiet.custom.typehandler.ArrayJsonHandler}, where id = #{id} diff --git a/stdiet-custom/src/main/resources/mapper/custom/SysCustomerPhysicalSignsMapper.xml b/stdiet-custom/src/main/resources/mapper/custom/SysCustomerPhysicalSignsMapper.xml index 1caea24d6..316e4092d 100644 --- a/stdiet-custom/src/main/resources/mapper/custom/SysCustomerPhysicalSignsMapper.xml +++ b/stdiet-custom/src/main/resources/mapper/custom/SysCustomerPhysicalSignsMapper.xml @@ -33,6 +33,7 @@ + @@ -43,6 +44,7 @@ + @@ -50,7 +52,7 @@ select scps.id,scps.customer_id,scps.sex, scps.age, scps.tall, scps.weight, scps.physical_signs_id, scps.dishes_ingredient_id, scps.photo, scps.constipation, scps.stayLate, scps.motion, scps.make_food_type, scps.make_food_taste, scps.walk, scps.difficulty, scps.weakness, scps.rebound, scps.crux, scps.position, - scps.sleep_time, scps.getup_time, scps.connect_time, scps.remarks, scps.blood_data, scps.moisture_date, scps.vocation, + scps.sleep_time, scps.getup_time, scps.connect_time, scps.remarks, scps.remark, scps.avoid_food, scps.blood_data, scps.moisture_date, scps.vocation, scps.night, scps.experience, scps.comments, scps.create_time, sc.name, sc.phone from sys_customer_physical_signs scps left join sys_customer sc on scps.customer_id = sc.id @@ -100,6 +102,7 @@ getup_time, connect_time, remarks, + remark, blood_data, moisture_date, vocation, @@ -110,6 +113,7 @@ create_by, update_time, update_by, + avoid_food, #{customerId}, @@ -135,6 +139,7 @@ #{getupTime}, #{connectTime}, #{remarks}, + #{remark}, #{bloodData}, #{moistureDate}, #{vocation}, @@ -145,6 +150,7 @@ #{createBy}, #{updateTime}, #{updateBy}, + #{avoid_food, jdbcType=OTHER, typeHandler=com.stdiet.custom.typehandler.ArrayJsonHandler}, @@ -174,6 +180,7 @@ getup_time = #{getupTime}, connect_time = #{connectTime}, remarks = #{remarks}, + remark = #{remark}, blood_data = #{bloodData}, moisture_date = #{moistureDate}, vocation = #{vocation}, @@ -184,6 +191,7 @@ create_by = #{createBy}, update_time = #{updateTime}, update_by = #{updateBy}, + avoid_food = #{avoidFood, jdbcType=OTHER, typeHandler=com.stdiet.custom.typehandler.ArrayJsonHandler}, where id = #{id} diff --git a/stdiet-ui/src/components/BodySignView/ACFCom2/SimpleIngredientListView2/index.vue b/stdiet-ui/src/components/BodySignView/ACFCom2/SimpleIngredientListView2/index.vue new file mode 100644 index 000000000..0860877d8 --- /dev/null +++ b/stdiet-ui/src/components/BodySignView/ACFCom2/SimpleIngredientListView2/index.vue @@ -0,0 +1,147 @@ + + + diff --git a/stdiet-ui/src/components/BodySignView/ACFCom2/index.vue b/stdiet-ui/src/components/BodySignView/ACFCom2/index.vue new file mode 100644 index 000000000..02200991d --- /dev/null +++ b/stdiet-ui/src/components/BodySignView/ACFCom2/index.vue @@ -0,0 +1,103 @@ + + + diff --git a/stdiet-ui/src/components/BodySignView/RemarkCom2/index.vue b/stdiet-ui/src/components/BodySignView/RemarkCom2/index.vue new file mode 100644 index 000000000..74f52cab3 --- /dev/null +++ b/stdiet-ui/src/components/BodySignView/RemarkCom2/index.vue @@ -0,0 +1,99 @@ + + + diff --git a/stdiet-ui/src/components/BodySignView/index.vue b/stdiet-ui/src/components/BodySignView/index.vue index b3a228bc6..a556d7ed8 100644 --- a/stdiet-ui/src/components/BodySignView/index.vue +++ b/stdiet-ui/src/components/BodySignView/index.vue @@ -1,46 +1,23 @@ diff --git a/stdiet-ui/src/components/HealthyView/ACFCom/index.vue b/stdiet-ui/src/components/HealthyView/ACFCom/index.vue new file mode 100644 index 000000000..3bb94d9cb --- /dev/null +++ b/stdiet-ui/src/components/HealthyView/ACFCom/index.vue @@ -0,0 +1,107 @@ + + + diff --git a/stdiet-ui/src/components/HealthyView/RemarkCom/index.vue b/stdiet-ui/src/components/HealthyView/RemarkCom/index.vue new file mode 100644 index 000000000..b01ec78d0 --- /dev/null +++ b/stdiet-ui/src/components/HealthyView/RemarkCom/index.vue @@ -0,0 +1,99 @@ + + + diff --git a/stdiet-ui/src/components/HealthyView/index.vue b/stdiet-ui/src/components/HealthyView/index.vue index 842cf30f8..37632082f 100644 --- a/stdiet-ui/src/components/HealthyView/index.vue +++ b/stdiet-ui/src/components/HealthyView/index.vue @@ -2,14 +2,6 @@

{{ this.data.name }}

- 修改备注
+ +
- - - - - -
diff --git a/stdiet-ui/src/components/TextInfo/index.vue b/stdiet-ui/src/components/TextInfo/index.vue index 5707918c5..12081355b 100644 --- a/stdiet-ui/src/components/TextInfo/index.vue +++ b/stdiet-ui/src/components/TextInfo/index.vue @@ -29,8 +29,10 @@ export default { } else if (this.value.includes("\n")) { return this.value.split("\n"); } + this.newLine = false; return this.value; } + this.newLine = false; return this.value; }, }, diff --git a/stdiet-ui/src/store/modules/recipes.js b/stdiet-ui/src/store/modules/recipes.js index 94e4ed2d9..a4187059b 100644 --- a/stdiet-ui/src/store/modules/recipes.js +++ b/stdiet-ui/src/store/modules/recipes.js @@ -39,6 +39,7 @@ const oriState = { // leftShow: false, notRecIgds: [], + avoidFoodIds: [], igdTypeOptions: [] }; @@ -75,6 +76,9 @@ const mutations = { } } }, + updateAvoidFoodIds(state, payload) { + state.avoidFoodIds = payload.avoidFoodIds; + }, updateFontSize(state, payload) { state.fontSize = payload.fontSize; localStorage.setItem("fontSize", payload.fontSize); @@ -215,7 +219,8 @@ const actions = { commit("updateStateData", { healthDataLoading: false, healthyDataType, - healthyData + healthyData, + avoidFoodIds: (healthyData.avoidFood || []).map(obj => obj.id) }); }, async getRecipesInfo({ commit, state }, payload) { diff --git a/stdiet-ui/src/views/custom/recipesBuild/RecipesView/RecipesCom/index.vue b/stdiet-ui/src/views/custom/recipesBuild/RecipesView/RecipesCom/index.vue index 361e47bb1..09e4b4fd6 100644 --- a/stdiet-ui/src/views/custom/recipesBuild/RecipesView/RecipesCom/index.vue +++ b/stdiet-ui/src/views/custom/recipesBuild/RecipesView/RecipesCom/index.vue @@ -311,6 +311,9 @@ export default { return {}; }, computed: { + notIds() { + return this.avoidFoodIds.concat(this.notRecIgds); + }, mData() { if (!this.data.dishes) { return []; @@ -337,8 +340,8 @@ export default { } lastNameHit = arr[arr.length - 1].name === cur.name && - arr[arr.length - 1].type === cur.type - // arr[arr.length - 1].dishesId === cur.dishesId; + arr[arr.length - 1].type === cur.type; + // arr[arr.length - 1].dishesId === cur.dishesId; if (lastNameHit) { let namePos = arr.length - 1; for (let i = namePos; i >= 0; i--) { @@ -407,6 +410,7 @@ export default { "canCopyMenuTypes", "recipesId", "notRecIgds", + "avoidFoodIds", ]), }, methods: { @@ -416,7 +420,7 @@ export default { return "recipes_first_col"; } else { return `recipes_cell recipes_cell_${this.fontSize} ${ - columnIndex === 2 && this.notRecIgds.includes(row.igdId) + columnIndex === 2 && this.notIds.includes(row.igdId) ? "warning_heightlight" : "" }`;