diff --git a/stdiet-admin/src/main/java/com/stdiet/web/controller/custom/SysIngredientController.java b/stdiet-admin/src/main/java/com/stdiet/web/controller/custom/SysIngredientController.java index f8100f17f..e28d40ab7 100644 --- a/stdiet-admin/src/main/java/com/stdiet/web/controller/custom/SysIngredientController.java +++ b/stdiet-admin/src/main/java/com/stdiet/web/controller/custom/SysIngredientController.java @@ -1,16 +1,11 @@ package com.stdiet.web.controller.custom; import java.util.List; + +import com.github.pagehelper.PageHelper; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.PutMapping; -import org.springframework.web.bind.annotation.DeleteMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; import com.stdiet.common.annotation.Log; import com.stdiet.common.core.controller.BaseController; import com.stdiet.common.core.domain.AjaxResult; @@ -38,7 +33,7 @@ public class SysIngredientController extends BaseController */ @PreAuthorize("@ss.hasPermi('custom:ingredient:list')") @PostMapping("/list") - public TableDataInfo list(@RequestBody SysIngredient sysIngredient) + public TableDataInfo list(@RequestParam Integer pageSize, @RequestParam Integer pageNum, @RequestBody SysIngredient sysIngredient) { startPage(); List list = sysIngredientService.selectSysIngredientList(sysIngredient); diff --git a/stdiet-admin/src/main/java/com/stdiet/web/controller/custom/SysRecipesController.java b/stdiet-admin/src/main/java/com/stdiet/web/controller/custom/SysRecipesController.java new file mode 100644 index 000000000..0ba05c017 --- /dev/null +++ b/stdiet-admin/src/main/java/com/stdiet/web/controller/custom/SysRecipesController.java @@ -0,0 +1,23 @@ +package com.stdiet.web.controller.custom; + +import com.stdiet.common.core.controller.BaseController; +import com.stdiet.common.core.domain.AjaxResult; +import com.stdiet.custom.service.ISysRecipesService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +@RequestMapping("/recipes") +public class SysRecipesController extends BaseController { + + @Autowired + private ISysRecipesService sysRecipesService; + + @GetMapping(value = "/{resipesId}") + public AjaxResult getInfo(@PathVariable("resipesId") Long resipesId) { + return AjaxResult.success(sysRecipesService.selectSysRecipesByRecipesId(resipesId)); + } +} diff --git a/stdiet-custom/src/main/java/com/stdiet/custom/domain/SysDishes.java b/stdiet-custom/src/main/java/com/stdiet/custom/domain/SysDishes.java index 8f64679c4..61bd86838 100644 --- a/stdiet-custom/src/main/java/com/stdiet/custom/domain/SysDishes.java +++ b/stdiet-custom/src/main/java/com/stdiet/custom/domain/SysDishes.java @@ -1,34 +1,42 @@ package com.stdiet.custom.domain; -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; +import com.fasterxml.jackson.annotation.JsonFormat; import com.stdiet.common.annotation.Excel; -import com.stdiet.common.core.domain.BaseEntity; +import lombok.Data; +import java.util.Date; import java.util.List; /** * 菜品对象 sys_dishes - * + * * @author wonder * @date 2020-12-28 */ -public class SysDishes extends BaseEntity -{ +@Data +public class SysDishes { private static final long serialVersionUID = 1L; - /** id */ + /** + * id + */ private Long id; - /** 菜品名称 */ + /** + * 菜品名称 + */ @Excel(name = "菜品名称") private String name; - /** 菜品类型 */ + /** + * 菜品类型 + */ @Excel(name = "菜品类型") private String type; - /** 做法 */ + /** + * 做法 + */ @Excel(name = "做法") private String methods; @@ -36,80 +44,36 @@ public class SysDishes extends BaseEntity private String reviewStatus; - public Integer getIsMain() { - return isMain; - } + /** + * 创建者 + */ + private String createBy; - public void setIsMain(Integer isMain) { - this.isMain = isMain; - } + /** + * 创建时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date createTime; - public void setReviewStatus(String reviewStatus) { - this.reviewStatus = reviewStatus; - } + /** + * 更新者 + */ + private String updateBy; + + /** + * 更新时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date updateTime; + + /** + * 备注 + */ + private String remark; - public String getReviewStatus() { - return reviewStatus; - } private List igdList; - public void setId(Long id) - { - this.id = id; - } + private List detail; - public Long getId() - { - return id; - } - public void setName(String name) - { - this.name = name; - } - - public String getName() - { - return name; - } - public void setType(String type) - { - this.type = type; - } - - public String getType() - { - return type; - } - public void setMethods(String methods) - { - this.methods = methods; - } - - public String getMethods() - { - return methods; - } - - public void setIgdList(List ingredientList) { - this.igdList = ingredientList; - } - - public List getIgdList() { - return igdList; - } - - @Override - public String toString() { - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("id", getId()) - .append("name", getName()) - .append("type", getType()) - .append("methods", getMethods()) - .append("createBy", getCreateBy()) - .append("createTime", getCreateTime()) - .append("updateBy", getUpdateBy()) - .append("updateTime", getUpdateTime()) - .toString(); - } } \ No newline at end of file diff --git a/stdiet-custom/src/main/java/com/stdiet/custom/domain/SysDishesIngredient.java b/stdiet-custom/src/main/java/com/stdiet/custom/domain/SysDishesIngredient.java index af03ca135..b4fb4200b 100644 --- a/stdiet-custom/src/main/java/com/stdiet/custom/domain/SysDishesIngredient.java +++ b/stdiet-custom/src/main/java/com/stdiet/custom/domain/SysDishesIngredient.java @@ -21,9 +21,7 @@ public class SysDishesIngredient extends SysIngredient { private Long cusUnit; - private BigDecimal cusWeight; - - private Integer cusWei; + private Integer cusWeight; private BigDecimal weight; diff --git a/stdiet-custom/src/main/java/com/stdiet/custom/domain/SysDishesIngredientInfo.java b/stdiet-custom/src/main/java/com/stdiet/custom/domain/SysDishesIngredientInfo.java new file mode 100644 index 000000000..4c6e0295f --- /dev/null +++ b/stdiet-custom/src/main/java/com/stdiet/custom/domain/SysDishesIngredientInfo.java @@ -0,0 +1,25 @@ +package com.stdiet.custom.domain; + +import lombok.Data; + +/** + * 食材对象 sys_ingredient + * + * @author wonder + * @date 2020-12-15 + */ +@Data +public class SysDishesIngredientInfo { + private static final long serialVersionUID = 1L; + + private Long id; + + private String cus_unit; + + private String cus_weight; + + private Integer weight; + + private String remark; + +} \ No newline at end of file diff --git a/stdiet-custom/src/main/java/com/stdiet/custom/domain/SysIngredient.java b/stdiet-custom/src/main/java/com/stdiet/custom/domain/SysIngredient.java index 4b45d85b0..c5cd66719 100644 --- a/stdiet-custom/src/main/java/com/stdiet/custom/domain/SysIngredient.java +++ b/stdiet-custom/src/main/java/com/stdiet/custom/domain/SysIngredient.java @@ -1,11 +1,11 @@ package com.stdiet.custom.domain; +import com.fasterxml.jackson.annotation.JsonFormat; import com.stdiet.common.annotation.Excel; -import com.stdiet.common.core.domain.BaseEntity; -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; +import lombok.Data; import java.math.BigDecimal; +import java.util.Date; /** * 食材对象 sys_ingredient @@ -13,12 +13,10 @@ import java.math.BigDecimal; * @author wonder * @date 2020-12-15 */ -public class SysIngredient extends BaseEntity { +@Data +public class SysIngredient { private static final long serialVersionUID = 1L; - private int pageNum; - private int pageSize; - /** * id */ @@ -77,131 +75,36 @@ public class SysIngredient extends BaseEntity { */ private String reviewStatus; - public void setReviewStatus(String reviewStatus) { - this.reviewStatus = reviewStatus; - } + /** + * 创建者 + */ + private String createBy; + + /** + * 创建时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date createTime; + + /** + * 更新者 + */ + private String updateBy; + + /** + * 更新时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date updateTime; + + /** + * 备注 + */ + private String remark; - public String getReviewStatus() { - return reviewStatus; - } private Long[] recIds; private Long[] notRecIds; - public Long[] getRecIds() { - return recIds; - } - - public Long[] getNotRecIds() { - return notRecIds; - } - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - public BigDecimal getProteinRatio() { - return proteinRatio; - } - - public void setProteinRatio(BigDecimal proteinRatio) { - this.proteinRatio = proteinRatio; - } - - public BigDecimal getFatRatio() { - return fatRatio; - } - - public void setFatRatio(BigDecimal fatRatio) { - this.fatRatio = fatRatio; - } - - public BigDecimal getCarbonRatio() { - return carbonRatio; - } - - public void setCarbonRatio(BigDecimal carbonRatio) { - this.carbonRatio = carbonRatio; - } - - public String getArea() { - return area; - } - - public void setArea(String area) { - this.area = area; - } - - public String getNotRec() { - return notRec; - } - - public void setNotRec(String notRec) { - this.notRec = notRec; - } - - public String getRec() { - return rec; - } - - public void setRec(String rec) { - this.rec = rec; - } - - public void setPageNum(int pageNum) { - this.pageNum = pageNum; - } - - public void setPageSize(int pageSize) { - this.pageSize = pageSize; - } - - public int getPageNum() { - return pageNum; - } - - public int getPageSize() { - return pageSize; - } - - @Override - public String toString() { - return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) - .append("id", getId()) - .append("name", getName()) - .append("type", getType()) - .append("proteinRatio", getProteinRatio()) - .append("fatRatio", getFatRatio()) - .append("carbonRatio", getCarbonRatio()) - .append("remark", getRemark()) - .append("area", getArea()) - .append("notRec", getNotRec()) - .append("recommend", getRec()) - .append("createBy", getCreateBy()) - .append("createTime", getCreateTime()) - .append("updateBy", getUpdateBy()) - .append("updateTime", getUpdateTime()) - .toString(); - } } \ No newline at end of file diff --git a/stdiet-custom/src/main/java/com/stdiet/custom/domain/SysRecipes.java b/stdiet-custom/src/main/java/com/stdiet/custom/domain/SysRecipes.java new file mode 100644 index 000000000..9b727297d --- /dev/null +++ b/stdiet-custom/src/main/java/com/stdiet/custom/domain/SysRecipes.java @@ -0,0 +1,47 @@ +package com.stdiet.custom.domain; + +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; + +import java.util.Date; +import java.util.List; + +@Data +public class SysRecipes { + private static final long serialVersionUID = 1L; + + private Long id; + + private Integer numDay; + + private List dishes; + + private Integer reviewStatus; + + /** + * 创建者 + */ + private String createBy; + + /** + * 创建时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date createTime; + + /** + * 更新者 + */ + private String updateBy; + + /** + * 更新时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date updateTime; + + /** + * 备注 + */ + private String remark; +} diff --git a/stdiet-custom/src/main/java/com/stdiet/custom/mapper/SysRecipesMapper.java b/stdiet-custom/src/main/java/com/stdiet/custom/mapper/SysRecipesMapper.java new file mode 100644 index 000000000..e0bfdcc0a --- /dev/null +++ b/stdiet-custom/src/main/java/com/stdiet/custom/mapper/SysRecipesMapper.java @@ -0,0 +1,10 @@ +package com.stdiet.custom.mapper; + +import com.stdiet.custom.domain.SysRecipes; + +import java.util.List; + +public interface SysRecipesMapper { + + public List selectSysRecipesByRecipesId(Long id); +} diff --git a/stdiet-custom/src/main/java/com/stdiet/custom/service/ISysRecipesService.java b/stdiet-custom/src/main/java/com/stdiet/custom/service/ISysRecipesService.java new file mode 100644 index 000000000..5bf1c4a39 --- /dev/null +++ b/stdiet-custom/src/main/java/com/stdiet/custom/service/ISysRecipesService.java @@ -0,0 +1,9 @@ +package com.stdiet.custom.service; + +import com.stdiet.custom.domain.SysRecipes; + +import java.util.List; + +public interface ISysRecipesService { + public List selectSysRecipesByRecipesId(Long id); +} diff --git a/stdiet-custom/src/main/java/com/stdiet/custom/service/impl/SysRecipesServiceImpl.java b/stdiet-custom/src/main/java/com/stdiet/custom/service/impl/SysRecipesServiceImpl.java new file mode 100644 index 000000000..a899e98c4 --- /dev/null +++ b/stdiet-custom/src/main/java/com/stdiet/custom/service/impl/SysRecipesServiceImpl.java @@ -0,0 +1,23 @@ +package com.stdiet.custom.service.impl; + +import com.stdiet.custom.domain.SysRecipes; +import com.stdiet.custom.mapper.SysRecipesMapper; +import com.stdiet.custom.service.ISysRecipesService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.List; + +@Service +@Transactional +public class SysRecipesServiceImpl implements ISysRecipesService { + + @Autowired + private SysRecipesMapper sysRecipesMapper; + + @Override + public List selectSysRecipesByRecipesId(Long id) { + return sysRecipesMapper.selectSysRecipesByRecipesId(id); + } +} diff --git a/stdiet-custom/src/main/java/com/stdiet/custom/typehandler/ArrayJsonHandler.java b/stdiet-custom/src/main/java/com/stdiet/custom/typehandler/ArrayJsonHandler.java new file mode 100644 index 000000000..9b274c1d0 --- /dev/null +++ b/stdiet-custom/src/main/java/com/stdiet/custom/typehandler/ArrayJsonHandler.java @@ -0,0 +1,56 @@ +package com.stdiet.custom.typehandler; + +import com.alibaba.fastjson.JSONArray; +import org.apache.ibatis.type.BaseTypeHandler; +import org.apache.ibatis.type.JdbcType; +import org.apache.ibatis.type.MappedJdbcTypes; +import org.apache.ibatis.type.MappedTypes; + +import java.sql.CallableStatement; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; + +/** + * Created by lixio on 2019/3/28 20:51 + * @description 用以mysql中json格式的字段,进行转换的自定义转换器,转换为实体类的JSONArray属性 + * MappedTypes注解中的类代表此转换器可以自动转换为的java对象 + * MappedJdbcTypes注解中设置的是对应的jdbctype + */ +@MappedTypes(JSONArray.class) +@MappedJdbcTypes(JdbcType.VARCHAR) +public class ArrayJsonHandler extends BaseTypeHandler { + //设置非空参数 + @Override + public void setNonNullParameter(PreparedStatement ps, int i, JSONArray parameter, JdbcType jdbcType) throws SQLException { + ps.setString(i, String.valueOf(parameter.toJSONString())); + } + //根据列名,获取可以为空的结果 + @Override + public JSONArray getNullableResult(ResultSet rs, String columnName) throws SQLException { + String sqlJson = rs.getString(columnName); + if (null != sqlJson){ + return JSONArray.parseArray(sqlJson); + } + return null; + } + //根据列索引,获取可以为空的结果 + @Override + public JSONArray getNullableResult(ResultSet rs, int columnIndex) throws SQLException { + String sqlJson = rs.getString(columnIndex); + if (null != sqlJson){ + return JSONArray.parseArray(sqlJson); + } + return null; + } + + @Override + public JSONArray getNullableResult(CallableStatement cs, int columnIndex) throws SQLException { + String sqlJson = cs.getString(columnIndex); + if (null != sqlJson){ + return JSONArray.parseArray(sqlJson); + } + return null; + } + +} \ No newline at end of file diff --git a/stdiet-custom/src/main/java/com/stdiet/custom/typehandler/ObjectJsonHandler.java b/stdiet-custom/src/main/java/com/stdiet/custom/typehandler/ObjectJsonHandler.java new file mode 100644 index 000000000..d02c8c2b5 --- /dev/null +++ b/stdiet-custom/src/main/java/com/stdiet/custom/typehandler/ObjectJsonHandler.java @@ -0,0 +1,57 @@ +package com.stdiet.custom.typehandler; + +import com.alibaba.fastjson.JSONObject; +import org.apache.ibatis.type.BaseTypeHandler; +import org.apache.ibatis.type.JdbcType; +import org.apache.ibatis.type.MappedJdbcTypes; +import org.apache.ibatis.type.MappedTypes; + +import java.sql.CallableStatement; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; + +/** + * Created by lixio on 2019/3/28 15:44 + * @description 用以mysql中json格式的字段,进行转换的自定义转换器,转换为实体类的JSONObject属性 + * MappedTypes注解中的类代表此转换器可以自动转换为的java对象 + * MappedJdbcTypes注解中设置的是对应的jdbctype + */ + +@MappedTypes(JSONObject.class) +@MappedJdbcTypes(JdbcType.VARCHAR) +public class ObjectJsonHandler extends BaseTypeHandler{ + + //设置非空参数 + @Override + public void setNonNullParameter(PreparedStatement ps, int i, JSONObject parameter, JdbcType jdbcType) throws SQLException { + ps.setString(i, String.valueOf(parameter.toJSONString())); + } + //根据列名,获取可以为空的结果 + @Override + public JSONObject getNullableResult(ResultSet rs, String columnName) throws SQLException { + String sqlJson = rs.getString(columnName); + if (null != sqlJson){ + return JSONObject.parseObject(sqlJson); + } + return null; + } + //根据列索引,获取可以为空的结果 + @Override + public JSONObject getNullableResult(ResultSet rs, int columnIndex) throws SQLException { + String sqlJson = rs.getString(columnIndex); + if (null != sqlJson){ + return JSONObject.parseObject(sqlJson); + } + return null; + } + + @Override + public JSONObject getNullableResult(CallableStatement cs, int columnIndex) throws SQLException { + String sqlJson = cs.getString(columnIndex); + if (null != sqlJson){ + return JSONObject.parseObject(sqlJson); + } + return null; + } +} \ No newline at end of file diff --git a/stdiet-custom/src/main/resources/mapper/custom/SysDishesMapper.xml b/stdiet-custom/src/main/resources/mapper/custom/SysDishesMapper.xml index 9fd7b6fa6..a79ab03a5 100644 --- a/stdiet-custom/src/main/resources/mapper/custom/SysDishesMapper.xml +++ b/stdiet-custom/src/main/resources/mapper/custom/SysDishesMapper.xml @@ -28,7 +28,6 @@ - @@ -49,7 +48,7 @@ SELECT * FROM( - SELECT ingredient_id AS id, ingredient_weight AS weight, cus_weight, cus_wei, cus_unit, remark + SELECT ingredient_id AS id, ingredient_weight AS weight, cus_weight, cus_unit, remark FROM sys_dishes_ingredient WHERE dishes_id = #{id} ) dishes @@ -149,9 +148,9 @@ - insert into sys_dishes_ingredient(dishes_id, ingredient_id, ingredient_weight, cus_unit, cus_wei, remark) values + insert into sys_dishes_ingredient(dishes_id, ingredient_id, ingredient_weight, cus_unit, cus_weight, remark) values - (#{item.dishesId}, #{item.ingredientId}, #{item.weight}, #{item.cusUnit}, #{item.cusWei}, #{item.remark}) + (#{item.dishesId}, #{item.ingredientId}, #{item.weight}, #{item.cusUnit}, #{item.cusWeight}, #{item.remark}) diff --git a/stdiet-custom/src/main/resources/mapper/custom/SysRecipesMapper.xml b/stdiet-custom/src/main/resources/mapper/custom/SysRecipesMapper.xml new file mode 100644 index 000000000..f8cfc64a0 --- /dev/null +++ b/stdiet-custom/src/main/resources/mapper/custom/SysRecipesMapper.xml @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/stdiet-ui/src/api/custom/ingredient.js b/stdiet-ui/src/api/custom/ingredient.js index 6643a081e..19633cba3 100644 --- a/stdiet-ui/src/api/custom/ingredient.js +++ b/stdiet-ui/src/api/custom/ingredient.js @@ -4,7 +4,7 @@ import request from '@/utils/request' export function listIngredient(query) { const {recIds, notRecIds} = query; return request({ - url: '/custom/ingredient/list', + url: `/custom/ingredient/list?pageSize=${query.pageSize}&pageNum=${query.pageNum}`, method: 'post', data: { ...query, diff --git a/stdiet-ui/src/api/custom/recipes.js b/stdiet-ui/src/api/custom/recipes.js new file mode 100644 index 000000000..0c598a8b3 --- /dev/null +++ b/stdiet-ui/src/api/custom/recipes.js @@ -0,0 +1,8 @@ +import request from "@/utils/request"; + +export function getRecipes(id) { + return request({ + url: "/recipes/" + id, + method: "get" + }); +} diff --git a/stdiet-ui/src/components/OrderEdit/index.vue b/stdiet-ui/src/components/OrderEdit/index.vue index c43cac79f..edc7cf47a 100644 --- a/stdiet-ui/src/components/OrderEdit/index.vue +++ b/stdiet-ui/src/components/OrderEdit/index.vue @@ -413,7 +413,7 @@ export default { }); this.getDicts("cus_account").then((response) => { this.accountIdOptions = response.data; - console.log(response.data); + // console.log(response.data); this.accountIdOptions.splice(0, 0, { dictLabel: "无", dictValue: "0", @@ -559,7 +559,7 @@ export default { accountId, ...obj, }; - console.log(this.form); + // console.log(this.form); this.resetForm("form"); }, handleOnClosed() { @@ -600,7 +600,7 @@ export default { watch: { // 监听收款账号的变化 "form.accountId": function (newVal, oldVal) { - console.log("updte"); + // console.log("updte"); this.initPlanningAndOperation(); }, }, diff --git a/stdiet-ui/src/components/PhysicalSignsDialog/index.vue b/stdiet-ui/src/components/PhysicalSignsDialog/index.vue index 20d16d686..a21c58626 100644 --- a/stdiet-ui/src/components/PhysicalSignsDialog/index.vue +++ b/stdiet-ui/src/components/PhysicalSignsDialog/index.vue @@ -130,7 +130,7 @@ export default { // 健康评估标题 healthyTitleData:[ [ - ["创建时间","客户姓名","手机号"],["调理项目","性别","年龄"],["身高(厘米)","体重(斤)","位置"] + ["创建时间","客户姓名","手机号"],["调理项目","性别","年龄"],["身高(厘米)","体重(斤)","地域"] ], [ ["减脂经历","减脂遇到的困难","减脂是否反弹"],["是否意识到生活习惯是减脂关键","",""] @@ -177,7 +177,7 @@ export default { [ ["breakfastType","breakfastFood","lunchType"],["dinner","vegetableRate","commonMeat"], ["dinnerTime","supperNum","supperFood"],["dietHotAndCold","dietFlavor","vegetablesNum"], - ["vegetablesRateType","fruitsNum","fruitsTime"],["fruitsRate","riceNum","riceNum"], + ["vegetablesRateType","fruitsNum","fruitsTime"],["fruitsRate","riceNum","riceFull"], ["eatingSpeed","makeFoodType","snacks"], ["healthProductsFlag","healthProductsBrand","healthProductsName"], ["healthProductsWeekRate","dishesIngredient",""] diff --git a/stdiet-ui/src/components/RecipesCom/index.vue b/stdiet-ui/src/components/RecipesCom/index.vue new file mode 100644 index 000000000..ca04ce089 --- /dev/null +++ b/stdiet-ui/src/components/RecipesCom/index.vue @@ -0,0 +1,87 @@ + + + diff --git a/stdiet-ui/src/components/ThemePicker/index.vue b/stdiet-ui/src/components/ThemePicker/index.vue index 3879c5ad0..74c8ef276 100644 --- a/stdiet-ui/src/components/ThemePicker/index.vue +++ b/stdiet-ui/src/components/ThemePicker/index.vue @@ -35,7 +35,7 @@ export default { if (typeof val !== 'string') return const themeCluster = this.getThemeCluster(val.replace('#', '')) const originalCluster = this.getThemeCluster(oldVal.replace('#', '')) - console.log(themeCluster, originalCluster) + // console.log(themeCluster, originalCluster) const $message = this.$message({ message: ' Compiling the theme', diff --git a/stdiet-ui/src/router/index.js b/stdiet-ui/src/router/index.js index 7ca90eddf..44c8612d2 100644 --- a/stdiet-ui/src/router/index.js +++ b/stdiet-ui/src/router/index.js @@ -1,10 +1,10 @@ -import Vue from 'vue' -import Router from 'vue-router' +import Vue from "vue"; +import Router from "vue-router"; -Vue.use(Router) +Vue.use(Router); /* Layout */ -import Layout from '@/layout' +import Layout from "@/layout"; /** * Note: 路由配置项 @@ -27,35 +27,35 @@ import Layout from '@/layout' // 公共路由 export const constantRoutes = [ { - path: '/redirect', + path: "/redirect", component: Layout, hidden: true, children: [ { - path: '/redirect/:path(.*)', - component: (resolve) => require(['@/views/redirect'], resolve) + path: "/redirect/:path(.*)", + component: resolve => require(["@/views/redirect"], resolve) } ] }, { - path: '/login', - component: (resolve) => require(['@/views/login'], resolve), + path: "/login", + component: resolve => require(["@/views/login"], resolve), hidden: true }, { - path: '/404', - component: (resolve) => require(['@/views/error/404'], resolve), + path: "/404", + component: resolve => require(["@/views/error/404"], resolve), hidden: true }, { - path: '/401', - component: (resolve) => require(['@/views/error/401'], resolve), + path: "/401", + component: resolve => require(["@/views/error/401"], resolve), hidden: true }, { - path: '', + path: "", component: Layout, - redirect: 'index', + redirect: "index", children: [ // { // path: 'index', @@ -64,101 +64,120 @@ export const constantRoutes = [ // meta: { title: '首页', icon: 'dashboard', noCache: true, affix: true } // } { - path: 'index', - component: (resolve) => require(['@/views/custom/order'], resolve), - name: '订单', - meta: { title: '订单管理', icon: 'build', noCache: true, affix: true } + path: "index", + component: resolve => require(["@/views/custom/order"], resolve), + name: "订单", + meta: { title: "订单管理", icon: "build", noCache: true, affix: true } } ] }, { - path: '/order', - component: Layout, - hidden: true, - children: [ - { - path: 'orderPause/:orderId', - component: (resolve) => require(['@/views/custom/order/orderPause'], resolve), - name: 'orderPause', - meta: { title: '订单暂停记录'} - } - ] - }, - { - path: '/user', - component: Layout, - hidden: true, - redirect: 'noredirect', - children: [ - { - path: 'profile', - component: (resolve) => require(['@/views/system/user/profile/index'], resolve), - name: 'Profile', - meta: { title: '个人中心', icon: 'user' } - } - ] - }, - { - path: '/dict', + path: "/order", component: Layout, hidden: true, children: [ { - path: 'type/data/:dictId(\\d+)', - component: (resolve) => require(['@/views/system/dict/data'], resolve), - name: 'Data', - meta: { title: '字典数据', icon: '' } + path: "orderPause/:orderId", + component: resolve => + require(["@/views/custom/order/orderPause"], resolve), + name: "orderPause", + meta: { title: "订单暂停记录" } } ] }, { - path: '/job', + path: "/user", + component: Layout, + hidden: true, + redirect: "noredirect", + children: [ + { + path: "profile", + component: resolve => + require(["@/views/system/user/profile/index"], resolve), + name: "Profile", + meta: { title: "个人中心", icon: "user" } + } + ] + }, + { + path: "/dict", component: Layout, hidden: true, children: [ { - path: 'log', - component: (resolve) => require(['@/views/monitor/job/log'], resolve), - name: 'JobLog', - meta: { title: '调度日志' } + path: "type/data/:dictId(\\d+)", + component: resolve => require(["@/views/system/dict/data"], resolve), + name: "Data", + meta: { title: "字典数据", icon: "" } } ] }, { - path: '/gen', + path: "/job", component: Layout, hidden: true, children: [ { - path: 'edit/:tableId(\\d+)', - component: (resolve) => require(['@/views/tool/gen/editTable'], resolve), - name: 'GenEdit', - meta: { title: '修改生成配置' } + path: "log", + component: resolve => require(["@/views/monitor/job/log"], resolve), + name: "JobLog", + meta: { title: "调度日志" } } ] }, { - path: '/f/contract/:id(\\d+)', + path: "/gen", + component: Layout, hidden: true, - component: (resolve) => require(['@/views/custom/signContract'], resolve), - meta: { title: '合同' } + children: [ + { + path: "edit/:tableId(\\d+)", + component: resolve => require(["@/views/tool/gen/editTable"], resolve), + name: "GenEdit", + meta: { title: "修改生成配置" } + } + ] }, -{ - path: '/question', - component: (resolve) => require(['@/views/custom/investigate/questionnaire'], resolve), + { + path: "/recipes", + component: Layout, hidden: true, - meta: { title: '营养体征调查问卷'} -}, -{ - path: '/subhealthyInvestigation/:id', - component: (resolve) => require(['@/views/custom/subhealthy/investigation'], resolve), - hidden: true, - meta: { title: '胜唐体控健康评估表'} -} -] + children: [ + { + path: "build/:cusId/:planId/:recipesId", + component: resolve => + require(["@/views/custom/recipesBuild"], resolve), + name: "RecipiesBuild", + props: true, + meta: { title: "食谱制作" } + } + ] + }, + { + path: "/f/contract/:id(\\d+)", + hidden: true, + component: resolve => require(["@/views/custom/signContract"], resolve), + meta: { title: "合同" } + }, + { + path: "/question", + component: resolve => + require(["@/views/custom/investigate/questionnaire"], resolve), + hidden: true, + meta: { title: "营养体征调查问卷" } + }, + { + path: "/subhealthyInvestigation/:id", + component: resolve => + require(["@/views/custom/subhealthy/investigation"], resolve), + hidden: true, + meta: { title: "胜唐体控健康评估表" } + } +]; export default new Router({ - mode: 'history', // 去掉url中的# + mode: "history", // 去掉url中的# scrollBehavior: () => ({ y: 0 }), routes: constantRoutes -}) +}); diff --git a/stdiet-ui/src/store/index.js b/stdiet-ui/src/store/index.js index 53b8437ac..9f563d508 100644 --- a/stdiet-ui/src/store/index.js +++ b/stdiet-ui/src/store/index.js @@ -1,13 +1,15 @@ -import Vue from 'vue' -import Vuex from 'vuex' -import app from './modules/app' -import user from './modules/user' -import tagsView from './modules/tagsView' -import permission from './modules/permission' -import settings from './modules/settings' -import getters from './getters' +import Vue from "vue"; +import Vuex from "vuex"; +import app from "./modules/app"; +import user from "./modules/user"; +import tagsView from "./modules/tagsView"; +import permission from "./modules/permission"; +import settings from "./modules/settings"; +import recipes from "./modules/recipes"; -Vue.use(Vuex) +import getters from "./getters"; + +Vue.use(Vuex); const store = new Vuex.Store({ modules: { @@ -15,9 +17,10 @@ const store = new Vuex.Store({ user, tagsView, permission, - settings + settings, + recipes }, getters -}) +}); -export default store +export default store; diff --git a/stdiet-ui/src/store/modules/recipes.js b/stdiet-ui/src/store/modules/recipes.js new file mode 100644 index 000000000..be63473b5 --- /dev/null +++ b/stdiet-ui/src/store/modules/recipes.js @@ -0,0 +1,71 @@ +import { getOrder } from "@/api/custom/order"; +import { getCustomerPhysicalSignsByCusId } from "@/api/custom/customer"; +import { dealHealthy } from "@/utils/healthyData"; +import { getRecipesPlan } from "@/api/custom/recipesPlan"; +import { getRecipes } from "@/api/custom/recipes"; + +const oriState = { + healthyData: {}, + healthyDataType: 0, + recipesData: [] +}; + +const mutations = { + setHealtyData(state, payload) { + state.healthyDataType = payload.healthyDataType; + state.healthyData = payload.healthyData; + }, + setRecipesData(state, payload) { + state.recipesData = payload.recipesData; + }, + clean(state) { + // console.log("clean"); + Object.keys(oriState).forEach(key => { + state[key] = oriState[key]; + }); + } +}; + +const actions = { + async init({ commit }, payload) { + const orderResult = await getOrder(payload.cusId); + if (!orderResult.data.cusId) { + throw new Error("未找到用户id"); + } + + // 健康数据 + const healthyDataResult = await getCustomerPhysicalSignsByCusId( + orderResult.data.cusId + ); + if (healthyDataResult.code === 200) { + commit("setHealtyData", { + healthyDataType: healthyDataResult.data.type, + healthyData: dealHealthy(healthyDataResult.data.customerHealthy) + }); + } else { + throw new Error(healthyDataResult.msg); + } + + // 食谱数据 + if (payload.recipesId) { + const recipesDataResult = await getRecipes(payload.recipesId); + if (recipesDataResult.code === 200) { + commit("setRecipesData", { + recipesData: recipesDataResult.data + }); + } else { + throw new Error(recipesDataResult.msg); + } + } + } +}; + +const getters = {}; + +export default { + namespaced: true, + state: Object.assign({}, oriState), + mutations, + actions, + getters +}; diff --git a/stdiet-ui/src/utils/healthyData.js b/stdiet-ui/src/utils/healthyData.js index 9084b028e..daca800c2 100644 --- a/stdiet-ui/src/utils/healthyData.js +++ b/stdiet-ui/src/utils/healthyData.js @@ -1,4 +1,4 @@ -export const titleArray = [ +export const titleArray = [ "一、基础信息", "二、减脂经历评估", "三、食品安全评估", @@ -8,188 +8,552 @@ export const titleArray = [ "七、睡眠质量评估", "八、既往病史/用药史评估", "九、体检报告" -] +]; export const condimentArray = [ - {"name":"鸡精", "value":"1"}, - {"name":"耗油", "value":"2"}, - {"name":"生抽", "value":"3"}, - {"name":"老抽", "value":"4"}, - {"name":"香油", "value":"5"}, - {"name":"浓汤宝", "value":"6"}, - {"name":"鸡粉", "value":"7"}, - {"name":"花椒", "value":"8"}, - {"name":"辣椒油", "value":"9"} -] + { name: "鸡精", value: "1" }, + { name: "耗油", value: "2" }, + { name: "生抽", value: "3" }, + { name: "老抽", value: "4" }, + { name: "香油", value: "5" }, + { name: "浓汤宝", value: "6" }, + { name: "鸡粉", value: "7" }, + { name: "花椒", value: "8" }, + { name: "辣椒油", value: "9" } +]; export const cookingStyleArray = [ - {"name":"煎","value":"1"},{"name":"烤","value":"2"},{"name":"炸","value":"3"},{"name":"卤","value":"4"}, - {"name":"腌","value":"5"},{"name":"腊","value":"6"},{"name":"煲","value":"7"},{"name":"炒","value":"8"}, - {"name":"蒸","value":"9"},{"name":"刺身","value":"10"},{"name":"水煮","value":"11"} -] - -export const cookingStyleRateArray = ["煎","炸","卤","腌","腊","煲"] + { name: "煎", value: "1" }, + { name: "烤", value: "2" }, + { name: "炸", value: "3" }, + { name: "卤", value: "4" }, + { name: "腌", value: "5" }, + { name: "腊", value: "6" }, + { name: "煲", value: "7" }, + { name: "炒", value: "8" }, + { name: "蒸", value: "9" }, + { name: "刺身", value: "10" }, + { name: "水煮", value: "11" } +]; export const washVegetablesStyleArray = [ - {"name":"先切后洗","value": "1"},{"name":"先洗后切","value": "2"},{"name":"切后浸泡","value": "3"} -] + { name: "先切后洗", value: "1" }, + { name: "先洗后切", value: "2" }, + { name: "切后浸泡", value: "3" } +]; export const breakfastTypeArray = [ - {"name":"不吃","value": "1"},{"name":"偶尔吃","value": "2"},{"name":"每天吃","value": "3"} -] + { name: "不吃", value: "1" }, + { name: "偶尔吃", value: "2" }, + { name: "每天吃", value: "3" } +]; -export const lunchTypeArray = [ - {"name":"外卖","value":"1"},{"name":"自带餐","value":"2"},{"name":"快餐","value":"3"},{"name":"餐厅","value":"4"} -] +export const lunchTypeArray = [ + { name: "外卖", value: "1" }, + { name: "自带餐", value: "2" }, + { name: "快餐", value: "3" }, + { name: "餐厅", value: "4" } +]; export const dinnerArray = [ - {"name":"餐馆吃","value":"1"},{"name":"在家吃","value":"2"},{"name":"丰盛","value":"3"},{"name":"清淡","value":"4"} -] + { name: "餐馆吃", value: "1" }, + { name: "在家吃", value: "2" }, + { name: "丰盛", value: "3" }, + { name: "清淡", value: "4" } +]; export const dietHotAndColdArray = [ - {"name":"偏冷食","value":"1"},{"name":"偏热食","value":"2"},{"name":"正常","value":"3"} -] + { name: "偏冷食", value: "1" }, + { name: "偏热食", value: "2" }, + { name: "正常", value: "3" } +]; export const dietFlavorArray = [ - {"name":"偏油","value":"1"},{"name":"偏咸","value":"2"},{"name":"偏辣","value":"3"}, - {"name":"偏甜","value":"4"},{"name":"偏酸","value":"5"},{"name":"清淡","value":"6"} -] + { name: "偏油", value: "1" }, + { name: "偏咸", value: "2" }, + { name: "偏辣", value: "3" }, + { name: "偏甜", value: "4" }, + { name: "偏酸", value: "5" }, + { name: "清淡", value: "6" } +]; export const vegetablesRateTypeArray = [ - {"name":"每天吃","value":"1"},{"name":"经常吃","value":"2"},{"name":"偶尔吃","value":"3"},{"name":"从不吃","value":"4"} -] + { name: "每天吃", value: "1" }, + { name: "经常吃", value: "2" }, + { name: "偶尔吃", value: "3" }, + { name: "从不吃", value: "4" } +]; export const fruitsTimeArray = [ - {"name":"餐前","value":"1"},{"name":"餐后","value":"2"},{"name":"餐间","value":"3"} -] - + { name: "餐前", value: "1" }, + { name: "餐后", value: "2" }, + { name: "餐间", value: "3" } +]; export const fruitsRateArray = [ - {"name":"每天吃","value":"1"},{"name":"经常吃","value":"2"},{"name":"偶尔吃","value":"3"},{"name":"从不吃","value":"4"} -] + { name: "每天吃", value: "1" }, + { name: "经常吃", value: "2" }, + { name: "偶尔吃", value: "3" }, + { name: "从不吃", value: "4" } +]; export const eatingSpeedArray = [ - {"name":"很快","value":"1"},{"name":"偏快","value":"2"},{"name":"正常","value":"3"},{"name":"偏慢","value":"4"} - ,{"name":"很慢","value":"5"} -] + { name: "很快", value: "1" }, + { name: "偏快", value: "2" }, + { name: "正常", value: "3" }, + { name: "偏慢", value: "4" }, + { name: "很慢", value: "5" } +]; export const snacksArray = [ - {"name":"面包","value":"1"},{"name":"蛋糕","value":"2"},{"name":"饼干","value":"3"},{"name":"冰淇淋","value":"4"} - ,{"name":"糖果","value":"5"},{"name":"巧克力","value":"6"},{"name":"方便面","value":"7"},{"name":"薯条","value":"8"},{"name":"肉干","value":"9"}, - {"name":"坚果","value":"10"},{"name":"饮料","value":"11"},{"name":"果脯","value":"12"},{"name":"牛奶","value":"13"} -] - + { name: "面包", value: "1" }, + { name: "蛋糕", value: "2" }, + { name: "饼干", value: "3" }, + { name: "冰淇淋", value: "4" }, + { name: "糖果", value: "5" }, + { name: "巧克力", value: "6" }, + { name: "方便面", value: "7" }, + { name: "薯条", value: "8" }, + { name: "肉干", value: "9" }, + { name: "坚果", value: "10" }, + { name: "饮料", value: "11" }, + { name: "果脯", value: "12" }, + { name: "牛奶", value: "13" } +]; export const waterTypeArray = [ - {"name":"冰水","value":"1"},{"name":"温水","value":"2"},{"name":"常温水","value":"3"} -] - + { name: "冰水", value: "1" }, + { name: "温水", value: "2" }, + { name: "常温水", value: "3" } +]; export const waterHabitArray = [ - {"name":"均匀地喝","value":"1"},{"name":"餐前多喝","value":"2"},{"name":"餐后多喝","value":"3"},{"name":"餐间多喝","value":"4"}, - {"name":"随时喝","value":"5"} -] - -export const drinksNumArray = ["老火汤","咖啡","浓茶","奶茶","冷饮","碳酸饮料","甜饮料","鲜榨果汁"] - + { name: "均匀地喝", value: "1" }, + { name: "餐前多喝", value: "2" }, + { name: "餐后多喝", value: "3" }, + { name: "餐间多喝", value: "4" }, + { name: "随时喝", value: "5" } +]; export const drinkWineFlagArray = [ - {"name":"经常饮酒","value": "1"},{"name":"不饮酒","value": "2"},{"name":"偶尔","value": "3"} -] - + { name: "经常饮酒", value: "1" }, + { name: "不饮酒", value: "2" }, + { name: "偶尔", value: "3" } +]; export const drinkWineClassifyArray = [ - {"name":"白酒","value": "1"},{"name":"红酒","value": "2"},{"name":"啤酒","value": "3"} -] - -export const drinkWineAmountArray = ["白酒","啤酒","红酒"] - -export const drinkWineAmountUnitArray = ["两","瓶","毫升"] - -export const smokeRateArray = ["每天抽烟","烟龄","已戒烟"] -export const smokeRateUnitArray = ["次","年","年"] + { name: "白酒", value: "1" }, + { name: "红酒", value: "2" }, + { name: "啤酒", value: "3" } +]; export const workTypeArray = [ - {"name":"工作时间长","value": "1"},{"name":"久坐","value": "2"},{"name":"久站","value": "3"}, - {"name":"走动多","value": "4"},{"name":"强度大","value": "5"},{"name":"用电脑多","value": "6"},{"name":"体力工作多","value": "7"} -] + { name: "工作时间长", value: "1" }, + { name: "久坐", value: "2" }, + { name: "久站", value: "3" }, + { name: "走动多", value: "4" }, + { name: "强度大", value: "5" }, + { name: "用电脑多", value: "6" }, + { name: "体力工作多", value: "7" } +]; export const defecationTimeArray = [ - {"name":"上午","value": "1"},{"name":"中午","value": "2"},{"name":"晚上","value": "3"} -] + { name: "上午", value: "1" }, + { name: "中午", value: "2" }, + { name: "晚上", value: "3" } +]; export const aerobicMotionClassifyArray = [ - {"name":"跳绳","value": "1"},{"name":"跑步","value": "2"},{"name":"游泳","value": "3"} -] + { name: "跳绳", value: "1" }, + { name: "跑步", value: "2" }, + { name: "游泳", value: "3" } +]; export const anaerobicMotionClassifyArray = [ - {"name":"撸铁","value": "1"},{"name":"俯卧撑","value": "2"} -] + { name: "撸铁", value: "1" }, + { name: "俯卧撑", value: "2" } +]; export const anaerobicAerobicMotionClassifyArray = [ - {"name":"拳击","value": "1"},{"name":"瑜伽","value": "2"} -] + { name: "拳击", value: "1" }, + { name: "瑜伽", value: "2" } +]; -export const motionFieldArray = [ - {"name":"居家","value": "1"},{"name":"健身房","value": "2"},{"name":"户外","value": "3"}, {"name":"瑜伽馆","value": "4"} -] +export const motionFieldArray = [ + { name: "居家", value: "1" }, + { name: "健身房", value: "2" }, + { name: "户外", value: "3" }, + { name: "瑜伽馆", value: "4" } +]; export const sleepQualityArray = [ - {"name":"好","value": "1"},{"name":"一般","value": "2"},{"name":"入睡难","value": "3"}, - {"name":"失眠","value": "4"},{"name":"易醒","value": "5"},{"name":"多梦","value": "6"} -] + { name: "好", value: "1" }, + { name: "一般", value: "2" }, + { name: "入睡难", value: "3" }, + { name: "失眠", value: "4" }, + { name: "易醒", value: "5" }, + { name: "多梦", value: "6" } +]; -export const familyIllnessHistoryArray = [ - {"name":"高血压病","value": "1"},{"name":"脑卒中","value": "2"},{"name":"冠心病","value": "3"}, - {"name":"外周血管病","value": "4"},{"name":"心力衰竭","value": "5"},{"name":"冠心病","value": "6"}, - {"name":"肥胖症","value": "7"},{"name":"慢性肾脏疾病","value": "8"},{"name":"骨质疏松","value": "9"}, - {"name":"痛风","value": "10"},{"name":"精神疾病","value": "11"},{"name":"恶性肿瘤","value": "12"}, - {"name":"慢性阻塞性肺病","value": "13"},{"name":"风湿性免疫性疾病","value": "14"}, -] +export const familyIllnessHistoryArray = [ + { name: "高血压病", value: "1" }, + { name: "脑卒中", value: "2" }, + { name: "冠心病", value: "3" }, + { name: "外周血管病", value: "4" }, + { name: "心力衰竭", value: "5" }, + { name: "冠心病", value: "6" }, + { name: "肥胖症", value: "7" }, + { name: "慢性肾脏疾病", value: "8" }, + { name: "骨质疏松", value: "9" }, + { name: "痛风", value: "10" }, + { name: "精神疾病", value: "11" }, + { name: "恶性肿瘤", value: "12" }, + { name: "慢性阻塞性肺病", value: "13" }, + { name: "风湿性免疫性疾病", value: "14" } +]; export const operationHistoryArray = [ - {"name":"头颅(含脑)","value": "1"},{"name":"眼","value": "2"},{"name":"耳鼻咽喉","value": "3"}, - {"name":"颌面部及口腔","value": "4"},{"name":"颈部或甲状腺","value": "5"},{"name":"胸部(含肺部)","value": "6"}, - {"name":"心脏(含心脏介入)","value": "7"},{"name":"外周血管","value": "8"},{"name":"胃肠","value": "9"}, - {"name":"肝胆","value": "10"},{"name":"肾脏","value": "11"},{"name":"脊柱","value": "12"}, - {"name":"四肢及关节","value": "13"},{"name":"前列腺","value": "14"},{"name":"妇科","value": "15"},{"name":"乳腺","value": "16"} - ,{"name":"膀胱","value": "17"} -] + { name: "头颅(含脑)", value: "1" }, + { name: "眼", value: "2" }, + { name: "耳鼻咽喉", value: "3" }, + { name: "颌面部及口腔", value: "4" }, + { name: "颈部或甲状腺", value: "5" }, + { name: "胸部(含肺部)", value: "6" }, + { name: "心脏(含心脏介入)", value: "7" }, + { name: "外周血管", value: "8" }, + { name: "胃肠", value: "9" }, + { name: "肝胆", value: "10" }, + { name: "肾脏", value: "11" }, + { name: "脊柱", value: "12" }, + { name: "四肢及关节", value: "13" }, + { name: "前列腺", value: "14" }, + { name: "妇科", value: "15" }, + { name: "乳腺", value: "16" }, + { name: "膀胱", value: "17" } +]; export const longEatDrugClassifyArray = [ - {"name":"降压药","value": "1"},{"name":"降糖药","value": "2"},{"name":"降尿酸药","value": "3"}, - {"name":"抗心律失常药","value": "4"},{"name":"缓解哮喘药物","value": "5"},{"name":"抗压郁药物","value": "6"}, - {"name":"雌激素类药物","value": "7"},{"name":"利尿剂","value": "8"},{"name":"中草药","value": "9"}, - {"name":"避孕药","value": "10"},{"name":"强的松类药物","value": "11"},{"name":"镇静剂或安眠药","value": "12"}, - {"name":"调值药(降脂药)","value": "13"},{"name":"解热镇痛药(如布洛芬等)","value": "14"} -] + { name: "降压药", value: "1" }, + { name: "降糖药", value: "2" }, + { name: "降尿酸药", value: "3" }, + { name: "抗心律失常药", value: "4" }, + { name: "缓解哮喘药物", value: "5" }, + { name: "抗压郁药物", value: "6" }, + { name: "雌激素类药物", value: "7" }, + { name: "利尿剂", value: "8" }, + { name: "中草药", value: "9" }, + { name: "避孕药", value: "10" }, + { name: "强的松类药物", value: "11" }, + { name: "镇静剂或安眠药", value: "12" }, + { name: "调值药(降脂药)", value: "13" }, + { name: "解热镇痛药(如布洛芬等)", value: "14" } +]; - export const allergenArray = [ - {"name":"青霉素","value": "1"},{"name":"磺胺类","value": "2"},{"name":"链霉素","value": "3"}, - {"name":"头孢类","value": "4"},{"name":"鸡蛋","value": "5"},{"name":"牛奶","value": "6"}, - {"name":"海鲜","value": "7"},{"name":"花粉或尘螨","value": "8"},{"name":"粉尘","value": "9"}, - {"name":"洗洁剂","value": "10"},{"name":"化妆品","value": "11"} -] +export const allergenArray = [ + { name: "青霉素", value: "1" }, + { name: "磺胺类", value: "2" }, + { name: "链霉素", value: "3" }, + { name: "头孢类", value: "4" }, + { name: "鸡蛋", value: "5" }, + { name: "牛奶", value: "6" }, + { name: "海鲜", value: "7" }, + { name: "花粉或尘螨", value: "8" }, + { name: "粉尘", value: "9" }, + { name: "洗洁剂", value: "10" }, + { name: "化妆品", value: "11" } +]; export const makeFoodTypeArray = [ - {"name":"居家做饭","value": "1"},{"name":"外卖食堂","value": "2"},{"name":"居家和外食","value": "3"},{"name":"国外饮食","value": "4"}, - {"name":"运动饮食","value": "5"} -] + { name: "居家做饭", value: "1" }, + { name: "外卖食堂", value: "2" }, + { name: "居家和外食", value: "3" }, + { name: "国外饮食", value: "4" }, + { name: "运动饮食", value: "5" } +]; + +export const yesNoDict = { 0: "是", 1: "否" }; +export const sexDict = { 0: "男", 1: "女" }; +export const positionDict = { 0: "南方", 1: "北方" }; +export const makeFoodTypeDict = { 0: "自己做", 1: "外面吃" }; +export const makeFoodTasteDict = { 0: "清淡", 1: "重口味" }; +export const walkDict = { 0: "久坐多", 1: "走动多" }; + +export const cookingStyleRateArray = ["煎", "炸", "卤", "腌", "腊", "煲"]; +export const cookingStyleRateUnitArray = cookingStyleRateArray.map(() => "次"); + +export const drinksNumArray = [ + "老火汤", + "咖啡", + "浓茶", + "奶茶", + "冷饮", + "碳酸饮料", + "甜饮料", + "鲜榨果汁" +]; +export const drinksNumUnitArray = drinksNumArray.map(() => "次"); + +export const drinkWineAmountArray = ["白酒", "啤酒", "红酒"]; +export const drinkWineAmountUnitArray = ["两", "瓶", "毫升"]; + +export const smokeRateArray = ["每天抽烟", "烟龄", "已戒烟"]; +export const smokeRateUnitArray = ["次", "年", "年"]; //需要将数组转成字符串的属性名称,包含对象数组、字符串数组 export const arrayName = [ - "condiment","cookingStyle","cookingStyleRate", "washVegetablesStyle","lunchType","dinner","dietFlavor", - "snacks","waterType","waterHabit","drinksNum","drinkWineClassify","drinkWineAmount","smokeRate", - "workType","defecationTime","aerobicMotionClassify","anaerobicMotionClassify","anaerobicAerobicMotionClassify", - "motionField","sleepQuality", "physicalSignsId","moistureDate","bloodData","familyIllnessHistory", "operationHistory", "longEatDrugClassify", "allergen", - "medicalReport","medicalReportName" -] + "condiment", + "cookingStyle", + "cookingStyleRate", + "washVegetablesStyle", + "lunchType", + "dinner", + "dietFlavor", + "snacks", + "waterType", + "waterHabit", + "drinksNum", + "drinkWineClassify", + "drinkWineAmount", + "smokeRate", + "workType", + "defecationTime", + "aerobicMotionClassify", + "anaerobicMotionClassify", + "anaerobicAerobicMotionClassify", + "motionField", + "sleepQuality", + "physicalSignsId", + "moistureDate", + "bloodData", + "familyIllnessHistory", + "operationHistory", + "longEatDrugClassify", + "allergen", + "medicalReport", + "medicalReportName" +]; //需要将数字下标转成中文含义的属性名 export const needAttrName = [ - "condiment","cookingStyle", "washVegetablesStyle","breakfastType","lunchType","dinner","dietFlavor","vegetablesRateType","dietHotAndCold", - "fruitsTime","fruitsRate","eatingSpeed", - "snacks","waterType","waterHabit","drinkWineFlag","drinkWineClassify", - "workType","defecationTime","aerobicMotionClassify","anaerobicMotionClassify","anaerobicAerobicMotionClassify", - "motionField","sleepQuality", "familyIllnessHistory", "operationHistory", "longEatDrugClassify", "allergen" -] + "condiment", + "cookingStyle", + "washVegetablesStyle", + "breakfastType", + "lunchType", + "dinner", + "dietFlavor", + "vegetablesRateType", + "dietHotAndCold", + "fruitsTime", + "fruitsRate", + "eatingSpeed", + "snacks", + "waterType", + "waterHabit", + "drinkWineFlag", + "drinkWineClassify", + "workType", + "defecationTime", + "aerobicMotionClassify", + "anaerobicMotionClassify", + "anaerobicAerobicMotionClassify", + "motionField", + "sleepQuality", + "familyIllnessHistory", + "operationHistory", + "longEatDrugClassify", + "allergen" +]; +export const needCombineName = [ + "cookingStyleRate", + "drinksNum", + "drinkWineAmount", + "smokeRate" +]; + +export const yesNoName = [ + "constipation", + "staylate", + "motion", + "night", + "weakness", + "rebound", + "crux", + "stayupLateFlag", + "nearOperationFlag", + "longEatDrugFlag", + "allergyFlag", + "smokeFlag", + "secondSmoke" +]; + +export const dictName = [ + "sex", + "position", + "makeFoodType", + "makeFoodTaste", + "walk" +]; + +export const newLineName = ["bloodData", "moistureDate"]; + +export const bloodDataArray = [ + { value: "1", name: "1.体质虚弱,免疫力差" }, + { value: "2", name: "2.畏寒肢冷,自汗,头晕耳鸣" }, + { value: "3", name: "3.心悸气短,神疲乏力,气短懒言" }, + { value: "4", name: "4.失眠多梦,健忘,精神恍惚" }, + { value: "5", name: "5.面色淡白或萎黄,皮肤干燥,毛发枯萎" }, + { value: "6", name: "6.女性月经量少,延期或闭经" }, + { value: "7", name: "7.唇甲色淡,舌淡脉虚" } +]; + +export const moistureDateArray = [ + { value: "1", name: "1.体质虚弱,免疫力差" }, + { value: "2", name: "2.畏寒肢冷,自汗,头晕耳鸣" }, + { value: "3", name: "3.心悸气短,神疲乏力,气短懒言" }, + { value: "4", name: "4.失眠多梦,健忘,精神恍惚" }, + { value: "5", name: "5.面色淡白或萎黄,皮肤干燥,毛发枯萎" }, + { value: "6", name: "6.女性月经量少,延期或闭经" }, + { value: "7", name: "7.唇甲色淡,舌淡脉虚" } +]; + +const moduleObj = { + condimentArray, + cookingStyleArray, + washVegetablesStyleArray, + breakfastTypeArray, + lunchTypeArray, + dinnerArray, + dietHotAndColdArray, + dietFlavorArray, + vegetablesRateTypeArray, + fruitsTimeArray, + fruitsRateArray, + eatingSpeedArray, + snacksArray, + waterTypeArray, + waterHabitArray, + drinkWineFlagArray, + drinkWineClassifyArray, + workTypeArray, + defecationTimeArray, + aerobicMotionClassifyArray, + anaerobicMotionClassifyArray, + anaerobicAerobicMotionClassifyArray, + motionFieldArray, + sleepQualityArray, + familyIllnessHistoryArray, + operationHistoryArray, + longEatDrugClassifyArray, + allergenArray, + makeFoodTypeArray, + // + cookingStyleRateArray, + cookingStyleRateUnitArray, + drinksNumArray, + drinksNumUnitArray, + drinkWineAmountArray, + drinkWineAmountUnitArray, + smokeRateArray, + smokeRateUnitArray, + // + yesNoDict, + sexDict, + positionDict, + makeFoodTypeDict, + makeFoodTasteDict, + walkDict, + // + bloodDataArray, + moistureDateArray +}; + +//健康信息处理,将数组转为字符串 +export function dealHealthy(customerHealthy) { + needAttrName.forEach(name => { + if (customerHealthy.hasOwnProperty(name)) { + customerHealthy[name] = (String(customerHealthy[name]) || "") + .split(",") + .map(val => { + const tarObj = moduleObj[`${name}Array`].find( + obj => obj.value === val + ); + if (tarObj) { + return tarObj.name; + } + return ""; + }) + .join(","); + } + }); + needCombineName.forEach(name => { + if (customerHealthy.hasOwnProperty(name)) { + customerHealthy[name] = (String(customerHealthy[name]) || "") + .split(",") + .map((val, idx) => { + return `${moduleObj[`${name}Array`][idx]}${val}${ + moduleObj[`${name}UnitArray`][idx] + }`; + }) + .join(","); + } + }); + newLineName.forEach(name => { + if (customerHealthy.hasOwnProperty(name)) { + customerHealthy[name] = (String(customerHealthy[name]) || "") + .split(",") + .map(val => { + const tarObj = moduleObj[`${name}Array`].find( + obj => obj.value === val + ); + if (tarObj) { + return tarObj.name; + } + return ""; + }) + .join("
"); + } + }); + yesNoName.forEach(name => { + if (customerHealthy.hasOwnProperty(name)) { + customerHealthy[name] = yesNoDict[customerHealthy[name]]; + } + }); + dictName.forEach(name => { + if (customerHealthy.hasOwnProperty(name)) { + customerHealthy[name] = moduleObj[`${name}Dict`][customerHealthy[name]]; + } + }); + + if (customerHealthy.hasOwnProperty("tall")) { + customerHealthy.tall += "cm"; + } + if (customerHealthy.hasOwnProperty("weight")) { + customerHealthy.weight += "斤"; + } + if (customerHealthy.hasOwnProperty("vegetableRate")) { + customerHealthy.vegetableRate += "成"; + } + if (customerHealthy.hasOwnProperty("stayupLateWeekNum")) { + customerHealthy.stayupLateWeekNum += "次/周"; + } + if (customerHealthy.hasOwnProperty("riceFull")) { + customerHealthy.riceFull += "成"; + } + if (customerHealthy.hasOwnProperty("connectTime")) { + customerHealthy.connectTime += "点"; + } + if (customerHealthy.hasOwnProperty("sleepTime")) { + customerHealthy.sleepTime += "点"; + } + if (customerHealthy.hasOwnProperty("getupTime")) { + customerHealthy.getupTime += "点"; + } + if (customerHealthy.hasOwnProperty("signList")) { + customerHealthy.signStr = customerHealthy.signList + .map(obj => obj.name) + .join(","); + } + + return customerHealthy; +} diff --git a/stdiet-ui/src/views/custom/commision/detail/index.vue b/stdiet-ui/src/views/custom/commision/detail/index.vue index 1bf3c7dd3..3f428e5c8 100644 --- a/stdiet-ui/src/views/custom/commision/detail/index.vue +++ b/stdiet-ui/src/views/custom/commision/detail/index.vue @@ -166,7 +166,7 @@ getList() { this.loading = true; const dateRange = [dayjs(this.month).startOf('month').format('YYYY-MM-DD'), dayjs(this.month).endOf('month').format('YYYY-MM-DD')]; - console.log(dateRange) + // console.log(dateRange) detailCommision(this.addDateRange(this.queryParams, dateRange)).then(response => { this.commisionList = response.rows; this.total = response.total; diff --git a/stdiet-ui/src/views/custom/commision/detail_day/index.vue b/stdiet-ui/src/views/custom/commision/detail_day/index.vue index eb9f16991..fb6d4a172 100644 --- a/stdiet-ui/src/views/custom/commision/detail_day/index.vue +++ b/stdiet-ui/src/views/custom/commision/detail_day/index.vue @@ -215,7 +215,7 @@ getList() { this.loading = true; const dateRange = [dayjs(this.month).startOf('month').format('YYYY-MM-DD'), dayjs(this.month).endOf('month').format('YYYY-MM-DD')]; - console.log(dateRange) + // console.log(dateRange) detailDayCommision(this.addDateRange(this.queryParams, dateRange)).then(response => { this.commisionList = response.rows; this.total = response.total; diff --git a/stdiet-ui/src/views/custom/customer/index.vue b/stdiet-ui/src/views/custom/customer/index.vue index 164cec493..8856647a8 100644 --- a/stdiet-ui/src/views/custom/customer/index.vue +++ b/stdiet-ui/src/views/custom/customer/index.vue @@ -482,13 +482,13 @@ export default { this.$refs["cusContractDrawerRef"].showDrawer(row); }, handleOnBodySignClick(row) { - console.log(row); + // console.log(row); }, handleOnHealthSignClick(row) { this.$refs["physicalSignsDialogRef"].showDialog(row); }, handleOnMenuClick(row) { - console.log(row); + // console.log(row); }, // 取消按钮 cancel() { diff --git a/stdiet-ui/src/views/custom/dishes/index.vue b/stdiet-ui/src/views/custom/dishes/index.vue index 9cf416028..ba013d2c2 100644 --- a/stdiet-ui/src/views/custom/dishes/index.vue +++ b/stdiet-ui/src/views/custom/dishes/index.vue @@ -169,12 +169,12 @@
- + - + - + @@ -198,7 +198,7 @@ - + - + --> - - + @@ -301,7 +301,7 @@ - + - + - + - + { this.cusUnitOptions = response.data; }); - this.getDicts("cus_cus_weight").then((response) => { + this.getDicts("cus_cus_weight").then((response) => { this.cusWeightOptions = response.data; }); this.getDicts("cus_review_status").then((response) => { @@ -485,7 +485,7 @@ export default { notRecTags, }; }); - console.log(this.dishesList); + // console.log(this.dishesList); this.total = response.total; this.loading = false; }); @@ -502,7 +502,7 @@ export default { return this.selectDictLabel(this.cusUnitOptions, row.type); }, cusWeightFormat(row, column) { - return this.selectDictLabel(this.cusWeightOptions, row.cusWei); + return this.selectDictLabel(this.cusWeightOptions, row.cusWeight); }, // 地域字典翻译 reviewStatusFormat(row, column) { @@ -597,7 +597,7 @@ export default { listAllIngredient({ type: this.ingType }).then((res) => { this.open = true; this.title = "修改菜品"; - this.oriDataList = res.rows; + this.oriDataList = res.rows.concat(this.form.igdList); this.ingDataList = this.oriDataList.reduce((arr, cur) => { if (!arr.some(({ key }) => key === cur.id)) { arr.push({ @@ -606,7 +606,7 @@ export default { }); } return arr; - }, this.selIngList.slice()); + }, []); }); }); }, @@ -614,10 +614,15 @@ export default { submitForm() { this.$refs["form"].validate((valid) => { if (valid) { - this.form.igdList = this.selTableData; - this.form.type = this.form.type.join(","); - if (this.form.id != null) { - updateDishes(this.form).then((response) => { + if (!this.selTableData.length) { + this.$message.error("食材不能为空"); + return; + } + const data = JSON.parse(JSON.stringify(this.form)); + data.igdList = this.selTableData; + data.type = data.type.join(","); + if (data.id != null) { + updateDishes(data).then((response) => { if (response.code === 200) { this.msgSuccess("修改成功"); this.open = false; @@ -625,7 +630,7 @@ export default { } }); } else { - addDishes(this.form).then((response) => { + addDishes(data).then((response) => { if (response.code === 200) { this.msgSuccess("新增成功"); this.open = false; @@ -670,7 +675,13 @@ export default { .catch(function () {}); }, handleChange(value, direction, movedKeys) { - // console.log({oriIgdList: this.oriDataList, selIgdList: this.form.igdList}); + console.log({ + oriIgdList: this.oriDataList, + selIgdList: this.form.igdList, + ingDataList: this.ingDataList, + value, + ingType: this.ingType, + }); const newTableData = []; this.selRec = []; this.selNotRec = []; @@ -686,7 +697,7 @@ export default { newTableData.push({ ...tmpTableObj, weight: 100, - cusWei: 1, + cusWeight: 1, cusUnit: 1, }); } @@ -714,7 +725,7 @@ export default { }, handleOnTypeChange(value) { listAllIngredient({ type: value }).then((res) => { - this.oriDataList = res.rows; + this.oriDataList = res.rows.concat(this.form.igdList); this.ingDataList = this.oriDataList.reduce((arr, cur) => { if (!arr.some(({ key }) => key === cur.id)) { arr.push({ @@ -723,11 +734,11 @@ export default { }); } return arr; - }, this.selIngList.slice()); + }, []); }); }, handleInputChange(val) { - console.log({ val, table: this.selTableData }); + // console.log({ val, table: this.selTableData }); }, getSummaries(param) { const { columns, data } = param; @@ -755,80 +766,85 @@ export default { }, }; - - diff --git a/stdiet-ui/src/views/custom/healthy/index.vue b/stdiet-ui/src/views/custom/healthy/index.vue index 1a46802cc..cbdb064bc 100644 --- a/stdiet-ui/src/views/custom/healthy/index.vue +++ b/stdiet-ui/src/views/custom/healthy/index.vue @@ -703,7 +703,7 @@ detailHealthy.condiment += detailHealthy.otherCondiment ? (","+detailHealthy.otherCondiment) : ""; //烹饪 let cookingStyleRate = ""; - console.log(detailHealthy.cookingStyleRate); + // console.log(detailHealthy.cookingStyleRate); if(detailHealthy.cookingStyleRate != null){ detailHealthy.cookingStyleRate.split(",").forEach(function(item, index){ cookingStyleRate += (cookingStyleRate != "" ? "," : "") + (healthyData["cookingStyleRateArray"][index])+item +"次"; diff --git a/stdiet-ui/src/views/custom/investigate/questionnaire.vue b/stdiet-ui/src/views/custom/investigate/questionnaire.vue index a485b0128..768d51a97 100644 --- a/stdiet-ui/src/views/custom/investigate/questionnaire.vue +++ b/stdiet-ui/src/views/custom/investigate/questionnaire.vue @@ -365,7 +365,7 @@ export default { }, methods: { onSubmit() { - console.log("submit!"); + // console.log("submit!"); }, /** 查询体征列表 */ getPhysicalSignsList() { @@ -402,7 +402,7 @@ export default { cusMessage.connectTime = cusMessage.connectTime.substring(0, 2); addCustomer(cusMessage).then((response) => { if (response.code === 200) { - console.log("成功"); + // console.log("成功"); this.$notify({ title: "提交成功", message: "", @@ -439,7 +439,7 @@ export default { }, beforeCreate() { document.title = this.$route.meta.title; - console.log(this.$route.meta.title); + // console.log(this.$route.meta.title); }, }; diff --git a/stdiet-ui/src/views/custom/order/index.vue b/stdiet-ui/src/views/custom/order/index.vue index 178013205..d847baf0c 100644 --- a/stdiet-ui/src/views/custom/order/index.vue +++ b/stdiet-ui/src/views/custom/order/index.vue @@ -705,10 +705,10 @@ export default { .catch(function () {}); }, handleStatusClick(data) { - console.log(data); + // console.log(data); }, orderPauseManage(order) { - console.log(order.orderId); + // console.log(order.orderId); this.pauseTitle = order.customer; this.orderPauseId = order.orderId; this.openPause = true; diff --git a/stdiet-ui/src/views/custom/order/orderPause.vue b/stdiet-ui/src/views/custom/order/orderPause.vue index 496856f20..61f289ef7 100644 --- a/stdiet-ui/src/views/custom/order/orderPause.vue +++ b/stdiet-ui/src/views/custom/order/orderPause.vue @@ -316,7 +316,7 @@ /** 搜索按钮操作 */ handleQuery() { this.queryParams.pageNum = 1; - console.log(this.queryParams.pauseStartDate); + // console.log(this.queryParams.pauseStartDate); //this.getList(); }, /** 重置按钮操作 */ @@ -356,7 +356,7 @@ if (valid) { this.form.pauseStartDate = dayjs(this.dateScope[0]).format("YYYY-MM-DD"); this.form.pauseEndDate = dayjs(this.dateScope[1]).format("YYYY-MM-DD"); - console.log(this.form.pauseStartDate + "-" + this.form.pauseEndDate); + // console.log(this.form.pauseStartDate + "-" + this.form.pauseEndDate); if (this.form.id != null) { updatePause(this.form).then(response => { if (response.code === 200) { diff --git a/stdiet-ui/src/views/custom/recipesBuild/BodySignView.vue b/stdiet-ui/src/views/custom/recipesBuild/BodySignView.vue new file mode 100644 index 000000000..039b409e2 --- /dev/null +++ b/stdiet-ui/src/views/custom/recipesBuild/BodySignView.vue @@ -0,0 +1,87 @@ + + + diff --git a/stdiet-ui/src/views/custom/recipesBuild/HealthyView.vue b/stdiet-ui/src/views/custom/recipesBuild/HealthyView.vue new file mode 100644 index 000000000..8157b4e57 --- /dev/null +++ b/stdiet-ui/src/views/custom/recipesBuild/HealthyView.vue @@ -0,0 +1,193 @@ + + + diff --git a/stdiet-ui/src/views/custom/recipesBuild/RecipesView.vue b/stdiet-ui/src/views/custom/recipesBuild/RecipesView.vue new file mode 100644 index 000000000..1f8586852 --- /dev/null +++ b/stdiet-ui/src/views/custom/recipesBuild/RecipesView.vue @@ -0,0 +1,17 @@ + + + diff --git a/stdiet-ui/src/views/custom/recipesBuild/TextInfo.vue b/stdiet-ui/src/views/custom/recipesBuild/TextInfo.vue new file mode 100644 index 000000000..275b46f6c --- /dev/null +++ b/stdiet-ui/src/views/custom/recipesBuild/TextInfo.vue @@ -0,0 +1,52 @@ + + + diff --git a/stdiet-ui/src/views/custom/recipesBuild/index.vue b/stdiet-ui/src/views/custom/recipesBuild/index.vue new file mode 100644 index 000000000..3ebf30274 --- /dev/null +++ b/stdiet-ui/src/views/custom/recipesBuild/index.vue @@ -0,0 +1,80 @@ + + + diff --git a/stdiet-ui/src/views/custom/recipesPlan/index.vue b/stdiet-ui/src/views/custom/recipesPlan/index.vue index 39505df61..2e4fb8651 100644 --- a/stdiet-ui/src/views/custom/recipesPlan/index.vue +++ b/stdiet-ui/src/views/custom/recipesPlan/index.vue @@ -1,6 +1,11 @@ diff --git a/stdiet-ui/src/views/custom/subhealthy/investigation/index.vue b/stdiet-ui/src/views/custom/subhealthy/investigation/index.vue index 559c00980..3e1455941 100644 --- a/stdiet-ui/src/views/custom/subhealthy/investigation/index.vue +++ b/stdiet-ui/src/views/custom/subhealthy/investigation/index.vue @@ -266,7 +266,7 @@ export default { }); }, fail(){ - console.log("定时--------"); + // console.log("定时--------"); this.submitFlag = false; }, nextStep(step){ diff --git a/stdiet-ui/src/views/custom/wxUserLog/index.vue b/stdiet-ui/src/views/custom/wxUserLog/index.vue index a3c4eedbe..584d657b4 100644 --- a/stdiet-ui/src/views/custom/wxUserLog/index.vue +++ b/stdiet-ui/src/views/custom/wxUserLog/index.vue @@ -452,7 +452,7 @@ submitForm() { this.$refs["form"].validate(valid => { if (valid) { - console.log(this.form) + // console.log(this.form) if (this.form.id != null) { updateWxUserLog(this.form).then(response => { if (response.code === 200) {