commit
64cfe472bc
@ -3,8 +3,12 @@ package com.stdiet.web.controller;
|
|||||||
import com.stdiet.common.utils.AliyunVideoUtils;
|
import com.stdiet.common.utils.AliyunVideoUtils;
|
||||||
import com.stdiet.common.utils.StringUtils;
|
import com.stdiet.common.utils.StringUtils;
|
||||||
import com.stdiet.common.utils.poi.ExcelUtil;
|
import com.stdiet.common.utils.poi.ExcelUtil;
|
||||||
|
import com.stdiet.custom.domain.SysCustomerHealthy;
|
||||||
|
import com.stdiet.custom.domain.SysCustomerHealthyExtended;
|
||||||
import com.stdiet.custom.domain.SysNutritionQuestion;
|
import com.stdiet.custom.domain.SysNutritionQuestion;
|
||||||
import com.stdiet.custom.domain.SysNutritionalVideo;
|
import com.stdiet.custom.domain.SysNutritionalVideo;
|
||||||
|
import com.stdiet.custom.mapper.SysCustomerHealthyExtendedMapper;
|
||||||
|
import com.stdiet.custom.mapper.SysCustomerHealthyMapper;
|
||||||
import com.stdiet.custom.mapper.SysWxUserInfoMapper;
|
import com.stdiet.custom.mapper.SysWxUserInfoMapper;
|
||||||
import com.stdiet.custom.mapper.SysWxUserLogMapper;
|
import com.stdiet.custom.mapper.SysWxUserLogMapper;
|
||||||
import com.stdiet.custom.service.ISysNutritionQuestionService;
|
import com.stdiet.custom.service.ISysNutritionQuestionService;
|
||||||
@ -36,6 +40,11 @@ public class MyApplicationRunner implements ApplicationRunner {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private ISysNutritionalVideoService sysNutritionalVideoService;
|
private ISysNutritionalVideoService sysNutritionalVideoService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private SysCustomerHealthyMapper sysCustomerHealthyMapper;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private SysCustomerHealthyExtendedMapper sysCustomerHealthyExtendedMapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run(ApplicationArguments args) throws Exception {
|
public void run(ApplicationArguments args) throws Exception {
|
||||||
@ -44,6 +53,26 @@ public class MyApplicationRunner implements ApplicationRunner {
|
|||||||
System.out.println("--------------项目启动调用方法结束-------------");
|
System.out.println("--------------项目启动调用方法结束-------------");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 给所有的健康信息加上扩展信息
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public void addExtendedHealthy(){
|
||||||
|
List<SysCustomerHealthy> sysCustomerHealthies = sysCustomerHealthyMapper.selectSysCustomerHealthyList(new SysCustomerHealthy());
|
||||||
|
System.out.println("总条数:"+sysCustomerHealthies.size());
|
||||||
|
int success = 0;
|
||||||
|
if(sysCustomerHealthies != null && sysCustomerHealthies.size() > 0){
|
||||||
|
for (SysCustomerHealthy sysCustomerHealthy : sysCustomerHealthies) {
|
||||||
|
SysCustomerHealthyExtended extended = new SysCustomerHealthyExtended();
|
||||||
|
extended.setHealthyId(sysCustomerHealthy.getId());
|
||||||
|
if(sysCustomerHealthyExtendedMapper.insertSysCustomerHealthyExtended(extended) > 0){
|
||||||
|
success++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
System.out.println("成功条数:"+success);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 给现有视频更新截图图片
|
* 给现有视频更新截图图片
|
||||||
*/
|
*/
|
||||||
|
@ -446,4 +446,6 @@ public class SysCustomerHealthy extends BaseEntity
|
|||||||
private Long delFlag;
|
private Long delFlag;
|
||||||
|
|
||||||
private JSONArray avoidFood;
|
private JSONArray avoidFood;
|
||||||
|
|
||||||
|
private SysCustomerHealthyExtended healthyExtend;
|
||||||
}
|
}
|
@ -0,0 +1,62 @@
|
|||||||
|
package com.stdiet.custom.domain;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.stdiet.common.annotation.Excel;
|
||||||
|
import com.stdiet.common.core.domain.BaseEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 客户健康信息补充对象 sys_customer_healthy_extended
|
||||||
|
*
|
||||||
|
* @author wonder
|
||||||
|
* @date 2021-06-21
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class SysCustomerHealthyExtended extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** $column.columnComment */
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/** healthy表id */
|
||||||
|
@Excel(name = "healthy表id")
|
||||||
|
private Long healthyId;
|
||||||
|
|
||||||
|
/** 腰围,厘米 */
|
||||||
|
@Excel(name = "腰围,厘米")
|
||||||
|
private BigDecimal waist;
|
||||||
|
|
||||||
|
/** 臀围,厘米 */
|
||||||
|
@Excel(name = "臀围,厘米")
|
||||||
|
private BigDecimal hipline;
|
||||||
|
|
||||||
|
/** 常吃水果信息:水果名称、水果数量 */
|
||||||
|
@Excel(name = "常吃水果信息:水果名称、水果数量")
|
||||||
|
private String eatFruitsMessage;
|
||||||
|
|
||||||
|
/** 长时间服用药物信息:药物类型、药物名称、用药量、用药时间 */
|
||||||
|
@Excel(name = "长时间服用药物信息:药物类型、药物名称、用药量、用药时间")
|
||||||
|
private String longEatDrugMessage;
|
||||||
|
|
||||||
|
/** 血糖相关信息 */
|
||||||
|
@Excel(name = "血糖相关信息")
|
||||||
|
private String bloodSugarMessage;
|
||||||
|
|
||||||
|
/** 郁抑状态评估 */
|
||||||
|
@Excel(name = "郁抑状态评估")
|
||||||
|
private String depressedStateMessage;
|
||||||
|
|
||||||
|
/** 血压相关信息 */
|
||||||
|
@Excel(name = "血压相关信息")
|
||||||
|
private String bloodPressureMessage;
|
||||||
|
|
||||||
|
/** 焦虑状态评估 */
|
||||||
|
@Excel(name = "焦虑状态评估")
|
||||||
|
private String anxietyStateMessage;
|
||||||
|
|
||||||
|
/** 删除标识 0未删除 1已删除 */
|
||||||
|
private Long delFlag;
|
||||||
|
}
|
@ -0,0 +1,61 @@
|
|||||||
|
package com.stdiet.custom.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.stdiet.custom.domain.SysCustomerHealthyExtended;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 客户健康信息补充Mapper接口
|
||||||
|
*
|
||||||
|
* @author wonder
|
||||||
|
* @date 2021-06-21
|
||||||
|
*/
|
||||||
|
public interface SysCustomerHealthyExtendedMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询客户健康信息补充
|
||||||
|
*
|
||||||
|
* @param id 客户健康信息补充ID
|
||||||
|
* @return 客户健康信息补充
|
||||||
|
*/
|
||||||
|
public SysCustomerHealthyExtended selectSysCustomerHealthyExtendedById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询客户健康信息补充列表
|
||||||
|
*
|
||||||
|
* @param sysCustomerHealthyExtended 客户健康信息补充
|
||||||
|
* @return 客户健康信息补充集合
|
||||||
|
*/
|
||||||
|
public List<SysCustomerHealthyExtended> selectSysCustomerHealthyExtendedList(SysCustomerHealthyExtended sysCustomerHealthyExtended);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增客户健康信息补充
|
||||||
|
*
|
||||||
|
* @param sysCustomerHealthyExtended 客户健康信息补充
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertSysCustomerHealthyExtended(SysCustomerHealthyExtended sysCustomerHealthyExtended);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改客户健康信息补充
|
||||||
|
*
|
||||||
|
* @param sysCustomerHealthyExtended 客户健康信息补充
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateSysCustomerHealthyExtended(SysCustomerHealthyExtended sysCustomerHealthyExtended);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除客户健康信息补充
|
||||||
|
*
|
||||||
|
* @param id 客户健康信息补充ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSysCustomerHealthyExtendedById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除客户健康信息补充
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSysCustomerHealthyExtendedByIds(Long[] ids);
|
||||||
|
}
|
@ -11,9 +11,11 @@ import com.stdiet.common.utils.bean.ObjectUtils;
|
|||||||
import com.stdiet.common.utils.reflect.ReflectUtils;
|
import com.stdiet.common.utils.reflect.ReflectUtils;
|
||||||
import com.stdiet.common.utils.sign.AesUtils;
|
import com.stdiet.common.utils.sign.AesUtils;
|
||||||
import com.stdiet.custom.domain.SysCustomer;
|
import com.stdiet.custom.domain.SysCustomer;
|
||||||
|
import com.stdiet.custom.domain.SysCustomerHealthyExtended;
|
||||||
import com.stdiet.custom.domain.SysCustomerPhysicalSigns;
|
import com.stdiet.custom.domain.SysCustomerPhysicalSigns;
|
||||||
import com.stdiet.custom.dto.request.HealthyDetailRequest;
|
import com.stdiet.custom.dto.request.HealthyDetailRequest;
|
||||||
import com.stdiet.custom.dto.response.NutritionalCalories;
|
import com.stdiet.custom.dto.response.NutritionalCalories;
|
||||||
|
import com.stdiet.custom.mapper.SysCustomerHealthyExtendedMapper;
|
||||||
import com.stdiet.custom.mapper.SysCustomerMapper;
|
import com.stdiet.custom.mapper.SysCustomerMapper;
|
||||||
import com.stdiet.custom.service.ISysCustomerService;
|
import com.stdiet.custom.service.ISysCustomerService;
|
||||||
import com.stdiet.custom.utils.NutritionalUtils;
|
import com.stdiet.custom.utils.NutritionalUtils;
|
||||||
@ -39,6 +41,9 @@ public class SysCustomerHealthyServiceImpl implements ISysCustomerHealthyService
|
|||||||
@Autowired
|
@Autowired
|
||||||
private SysCustomerMapper sysCustomerMapper;
|
private SysCustomerMapper sysCustomerMapper;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private SysCustomerHealthyExtendedMapper sysCustomerHealthyExtendedMapper;
|
||||||
|
|
||||||
public static final String reportDownFileNameFormat = "%s超重%s斤%s";
|
public static final String reportDownFileNameFormat = "%s超重%s斤%s";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -91,6 +96,11 @@ public class SysCustomerHealthyServiceImpl implements ISysCustomerHealthyService
|
|||||||
//设置客户ID
|
//设置客户ID
|
||||||
sysCustomerHealthy.setCustomerId(Long.parseLong(customerId));
|
sysCustomerHealthy.setCustomerId(Long.parseLong(customerId));
|
||||||
int rows = sysCustomerHealthyMapper.insertSysCustomerHealthy(sysCustomerHealthy);
|
int rows = sysCustomerHealthyMapper.insertSysCustomerHealthy(sysCustomerHealthy);
|
||||||
|
if(rows > 0 && sysCustomerHealthy.getId() != null){
|
||||||
|
//添加扩展信息
|
||||||
|
sysCustomerHealthy.getHealthyExtend().setHealthyId(sysCustomerHealthy.getId());
|
||||||
|
rows = sysCustomerHealthyExtendedMapper.insertSysCustomerHealthyExtended(sysCustomerHealthy.getHealthyExtend());
|
||||||
|
}
|
||||||
return rows > 0 ? AjaxResult.success() : AjaxResult.error();
|
return rows > 0 ? AjaxResult.success() : AjaxResult.error();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -101,7 +111,11 @@ public class SysCustomerHealthyServiceImpl implements ISysCustomerHealthyService
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int updateSysCustomerHealthy(SysCustomerHealthy sysCustomerHealthy){
|
public int updateSysCustomerHealthy(SysCustomerHealthy sysCustomerHealthy){
|
||||||
return sysCustomerHealthyMapper.updateSysCustomerHealthy(sysCustomerHealthy);
|
int rows = sysCustomerHealthyMapper.updateSysCustomerHealthy(sysCustomerHealthy);
|
||||||
|
if(rows > 0){
|
||||||
|
rows = sysCustomerHealthyExtendedMapper.updateSysCustomerHealthyExtended(sysCustomerHealthy.getHealthyExtend());
|
||||||
|
}
|
||||||
|
return rows;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -0,0 +1,91 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.stdiet.custom.mapper.SysCustomerHealthyExtendedMapper">
|
||||||
|
|
||||||
|
<resultMap type="SysCustomerHealthyExtended" id="SysCustomerHealthyExtendedResult">
|
||||||
|
<result property="id" column="id" />
|
||||||
|
<result property="healthyId" column="healthy_id" />
|
||||||
|
<result property="waist" column="waist" />
|
||||||
|
<result property="hipline" column="hipline" />
|
||||||
|
<result property="eatFruitsMessage" column="eat_fruits_message" />
|
||||||
|
<result property="longEatDrugMessage" column="long_eat_drug_message" />
|
||||||
|
<result property="bloodSugarMessage" column="blood_sugar_message" />
|
||||||
|
<result property="depressedStateMessage" column="depressed_state_message" />
|
||||||
|
<result property="bloodPressureMessage" column="blood_pressure_message" />
|
||||||
|
<result property="anxietyStateMessage" column="anxiety_state_message" />
|
||||||
|
<result property="delFlag" column="del_flag" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectSysCustomerHealthyExtendedVo">
|
||||||
|
select id, healthy_id, waist, hipline, eat_fruits_message, long_eat_drug_message, blood_sugar_message, depressed_state_message, blood_pressure_message, anxiety_state_message, del_flag from sys_customer_healthy_extended
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectSysCustomerHealthyExtendedList" parameterType="SysCustomerHealthyExtended" resultMap="SysCustomerHealthyExtendedResult">
|
||||||
|
<include refid="selectSysCustomerHealthyExtendedVo"/> where del_flag = 0
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectSysCustomerHealthyExtendedById" parameterType="Long" resultMap="SysCustomerHealthyExtendedResult">
|
||||||
|
<include refid="selectSysCustomerHealthyExtendedVo"/>
|
||||||
|
where id = #{id} and del_flag = 0
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertSysCustomerHealthyExtended" parameterType="SysCustomerHealthyExtended" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
insert into sys_customer_healthy_extended
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="healthyId != null">healthy_id,</if>
|
||||||
|
<if test="waist != null">waist,</if>
|
||||||
|
<if test="hipline != null">hipline,</if>
|
||||||
|
<if test="eatFruitsMessage != null">eat_fruits_message,</if>
|
||||||
|
<if test="longEatDrugMessage != null">long_eat_drug_message,</if>
|
||||||
|
<if test="bloodSugarMessage != null">blood_sugar_message,</if>
|
||||||
|
<if test="depressedStateMessage != null">depressed_state_message,</if>
|
||||||
|
<if test="bloodPressureMessage != null">blood_pressure_message,</if>
|
||||||
|
<if test="anxietyStateMessage != null">anxiety_state_message,</if>
|
||||||
|
<if test="delFlag != null">del_flag,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="healthyId != null">#{healthyId},</if>
|
||||||
|
<if test="waist != null">#{waist},</if>
|
||||||
|
<if test="hipline != null">#{hipline},</if>
|
||||||
|
<if test="eatFruitsMessage != null">#{eatFruitsMessage},</if>
|
||||||
|
<if test="longEatDrugMessage != null">#{longEatDrugMessage},</if>
|
||||||
|
<if test="bloodSugarMessage != null">#{bloodSugarMessage},</if>
|
||||||
|
<if test="depressedStateMessage != null">#{depressedStateMessage},</if>
|
||||||
|
<if test="bloodPressureMessage != null">#{bloodPressureMessage},</if>
|
||||||
|
<if test="anxietyStateMessage != null">#{anxietyStateMessage},</if>
|
||||||
|
<if test="delFlag != null">#{delFlag},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateSysCustomerHealthyExtended" parameterType="SysCustomerHealthyExtended">
|
||||||
|
update sys_customer_healthy_extended
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="healthyId != null">healthy_id = #{healthyId},</if>
|
||||||
|
<if test="waist != null">waist = #{waist},</if>
|
||||||
|
<if test="hipline != null">hipline = #{hipline},</if>
|
||||||
|
<if test="eatFruitsMessage != null">eat_fruits_message = #{eatFruitsMessage},</if>
|
||||||
|
<if test="longEatDrugMessage != null">long_eat_drug_message = #{longEatDrugMessage},</if>
|
||||||
|
<if test="bloodSugarMessage != null">blood_sugar_message = #{bloodSugarMessage},</if>
|
||||||
|
<if test="depressedStateMessage != null">depressed_state_message = #{depressedStateMessage},</if>
|
||||||
|
<if test="bloodPressureMessage != null">blood_pressure_message = #{bloodPressureMessage},</if>
|
||||||
|
<if test="anxietyStateMessage != null">anxiety_state_message = #{anxietyStateMessage},</if>
|
||||||
|
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<update id="deleteSysCustomerHealthyExtendedById" parameterType="Long">
|
||||||
|
update sys_customer_healthy_extended set del_flag = 1 where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<update id="deleteSysCustomerHealthyExtendedByIds" parameterType="String">
|
||||||
|
update sys_customer_healthy_extended set del_flag = 1 where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</update>
|
||||||
|
|
||||||
|
|
||||||
|
</mapper>
|
@ -121,7 +121,7 @@
|
|||||||
<result property="avoidFood" column="avoid_food" typeHandler="com.stdiet.custom.typehandler.ArrayJsonHandler" />
|
<result property="avoidFood" column="avoid_food" typeHandler="com.stdiet.custom.typehandler.ArrayJsonHandler" />
|
||||||
<!-- column是传的参数, select是调用的查询 -->
|
<!-- column是传的参数, select是调用的查询 -->
|
||||||
<association property="signList" column="physical_signs_id" select="getSignByIds"/>
|
<association property="signList" column="physical_signs_id" select="getSignByIds"/>
|
||||||
|
<association property="healthyExtend" column="id" select="getHealthyExtendedByHealthyId"></association>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectSysCustomerHealthyVo">
|
<sql id="selectSysCustomerHealthyVo">
|
||||||
@ -160,7 +160,7 @@
|
|||||||
where sch.del_flag = 0 and sc.del_flag = 0 and sch.customer_id = #{customerId} order by sch.id desc limit 1
|
where sch.del_flag = 0 and sc.del_flag = 0 and sch.customer_id = #{customerId} order by sch.id desc limit 1
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<insert id="insertSysCustomerHealthy" parameterType="SysCustomerHealthy">
|
<insert id="insertSysCustomerHealthy" parameterType="SysCustomerHealthy" useGeneratedKeys="true" keyProperty="id">
|
||||||
insert into sys_customer_healthy
|
insert into sys_customer_healthy
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
<if test="id != null">id,</if>
|
<if test="id != null">id,</if>
|
||||||
@ -542,4 +542,22 @@
|
|||||||
order by dict_sort asc
|
order by dict_sort asc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<resultMap type="SysCustomerHealthyExtended" id="HealthyExtendedResult">
|
||||||
|
<result property="id" column="id" />
|
||||||
|
<result property="healthyId" column="healthy_id" />
|
||||||
|
<result property="waist" column="waist" />
|
||||||
|
<result property="hipline" column="hipline" />
|
||||||
|
<result property="eatFruitsMessage" column="eat_fruits_message" />
|
||||||
|
<result property="longEatDrugMessage" column="long_eat_drug_message" />
|
||||||
|
<result property="bloodSugarMessage" column="blood_sugar_message" />
|
||||||
|
<result property="depressedStateMessage" column="depressed_state_message" />
|
||||||
|
<result property="bloodPressureMessage" column="blood_pressure_message" />
|
||||||
|
<result property="anxietyStateMessage" column="anxiety_state_message" />
|
||||||
|
<result property="delFlag" column="del_flag" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<select id="getHealthyExtendedByHealthyId" parameterType="Long" resultMap="HealthyExtendedResult">
|
||||||
|
select id, healthy_id, waist, hipline, eat_fruits_message, long_eat_drug_message, blood_sugar_message, depressed_state_message, blood_pressure_message, anxiety_state_message from sys_customer_healthy_extended where del_flag = 0 and healthy_id = #{id} limit 1
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
@ -23,6 +23,12 @@
|
|||||||
<el-form-item label="体重(斤)" prop="weight" >
|
<el-form-item label="体重(斤)" prop="weight" >
|
||||||
<el-input v-model="form.weight" placeholder="请输入体重(可保留一位小数)" autocomplete="off" ></el-input>
|
<el-input v-model="form.weight" placeholder="请输入体重(可保留一位小数)" autocomplete="off" ></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="腰围(厘米)" prop="waist" >
|
||||||
|
<el-input v-model="form.healthyExtend.waist" placeholder="请输入腰围(可保留一位小数)" autocomplete="off" ></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="臀围(厘米)" prop="hipline" >
|
||||||
|
<el-input v-model="form.healthyExtend.hipline" placeholder="请输入臀围(可保留一位小数)" autocomplete="off" ></el-input>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="调理项目" prop="conditioningProjectId">
|
<el-form-item label="调理项目" prop="conditioningProjectId">
|
||||||
<el-select v-model="form.conditioningProjectId" filterable clearable placeholder="请选择">
|
<el-select v-model="form.conditioningProjectId" filterable clearable placeholder="请选择">
|
||||||
<el-option
|
<el-option
|
||||||
|
@ -65,6 +65,21 @@
|
|||||||
<el-radio v-for="(item,index) in healthyData['fruitsRateArray']" :label="item.value" :key="index">{{item.name}}</el-radio>
|
<el-radio v-for="(item,index) in healthyData['fruitsRateArray']" :label="item.value" :key="index">{{item.name}}</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="(5) 常吃什么水果以及对应份量" prop="eatFruitsNameArray" class="margin-left">
|
||||||
|
<el-select v-model="form.healthyExtend.eatFruitsNameArray" multiple filterable allow-create default-first-option placeholder="请选择水果种类(可手动输入再选择)" style="width:90%">
|
||||||
|
<el-option
|
||||||
|
v-for="item in healthyData['eatFruitsArray']"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.value">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
<div style="margin-top:10px" v-for="item in form.healthyExtend.eatFruitsMessage" :key="item.name">
|
||||||
|
<el-input v-model="item.name" :disabled="true" placeholder="水果名称" style="width:37%"></el-input><el-input style="width:50%;margin-left:3%;" v-model="item.num" placeholder="份量描述"></el-input>
|
||||||
|
</div>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
<p class="p_title_2">5、饮食习惯</p>
|
<p class="p_title_2">5、饮食习惯</p>
|
||||||
<el-form-item label="(1) 一餐吃几碗饭,几成饱" prop="riceNum" class="margin-left">
|
<el-form-item label="(1) 一餐吃几碗饭,几成饱" prop="riceNum" class="margin-left">
|
||||||
<div>
|
<div>
|
||||||
@ -145,7 +160,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -88,14 +88,20 @@
|
|||||||
<el-radio :label="1" key="2">是</el-radio>
|
<el-radio :label="1" key="2">是</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="(2) 长期服用药物有(可多选)" prop="longEatDrugClassify" class="margin-left">
|
<el-form-item label="(2) 长期服用药物以及对应药物信息(可多选)" prop="longEatDrugClassify" class="margin-left">
|
||||||
<el-checkbox-group v-model="form.longEatDrugClassify">
|
<el-checkbox-group v-model="form.longEatDrugClassify">
|
||||||
<el-checkbox v-for="(item, index) in healthyData['longEatDrugClassifyArray']" :key="index" :label="item.value">{{item.name}}</el-checkbox>
|
<el-checkbox v-for="(item, index) in healthyData['longEatDrugClassifyArray']" :key="index" :label="item.value">{{item.name}}</el-checkbox>
|
||||||
</el-checkbox-group>
|
</el-checkbox-group>
|
||||||
<div><span>其他长期服用的药物</span>
|
<div style="margin-top:2px" v-for="item in form.healthyExtend.longEatDrugMessage" :key="item.type">
|
||||||
|
<div><span>{{getDrugTypeName(item.type)}}</span><el-button type="text" size="normal" style="margin-left:5px" @click="addNewDrugInput(item.type)">新增</el-button></div>
|
||||||
|
<div v-for="(it,index) in item.drug" :key="index" :style="index == 0 ? '' : 'margin-top:10px'">
|
||||||
|
<el-input placeholder="药物名称" v-model="it.name" style="width:33%"></el-input><el-input style="width:30%;margin-left:3%;" v-model="it.num" placeholder="用量"></el-input><el-input style="width:30%;margin-left:3%;" placeholder="服用时间" v-model="it.time"></el-input>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="margin-top:10px"><span>其他长期服用的药物(药物名称、用量、服用时间)</span>
|
||||||
<el-input
|
<el-input
|
||||||
type="textarea"
|
type="textarea"
|
||||||
placeholder="请输入其他药物"
|
placeholder="请输入其他药物名称、用量、服用时间"
|
||||||
v-model="form.otherLongEatDrugClassify"
|
v-model="form.otherLongEatDrugClassify"
|
||||||
maxlength="200"
|
maxlength="200"
|
||||||
show-word-limit
|
show-word-limit
|
||||||
@ -191,6 +197,21 @@ export default {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
getDrugTypeName(type){
|
||||||
|
if(healthyData['longEatDrugClassifyArray'] && healthyData['longEatDrugClassifyArray'].length > 0){
|
||||||
|
for(let i = 0 ; i < healthyData['longEatDrugClassifyArray'].length; i++){
|
||||||
|
if(healthyData['longEatDrugClassifyArray'][i].value == type){
|
||||||
|
//console.log(healthyData['longEatDrugClassifyArray'][i].name);
|
||||||
|
return healthyData['longEatDrugClassifyArray'][i].name;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
},
|
||||||
|
addNewDrugInput(type){
|
||||||
|
this.$emit('addNewDrugInput', type);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
form: {
|
form: {
|
||||||
@ -208,6 +229,9 @@ export default {
|
|||||||
this.getMoistureDictData();
|
this.getMoistureDictData();
|
||||||
this.getBloodDictData();
|
this.getBloodDictData();
|
||||||
},
|
},
|
||||||
|
computed:{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<p class="p_title_1">{{healthyData['titleArray'][8]}}</p>
|
<p class="p_title_1">{{titleNumFlag ? '十、体检报告' : healthyData['titleArray'][8]}}</p>
|
||||||
<p class="p_title_2">1、体检报告</p>
|
<p class="p_title_2">1、体检报告</p>
|
||||||
<el-form-item label="(1) 请上传相应的体检报告" prop="fileList" class="margin-left">
|
<el-form-item label="(1) 请上传相应的体检报告" prop="fileList" class="margin-left">
|
||||||
<el-upload style="margin-left: 20px;"
|
<el-upload style="margin-left: 20px;"
|
||||||
@ -119,7 +119,11 @@ export default {
|
|||||||
form: {
|
form: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: null
|
default: null
|
||||||
}
|
},
|
||||||
|
titleNumFlag:{
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
|
||||||
|
267
stdiet-ui/src/components/HealthyForm/FormExtended.vue
Normal file
267
stdiet-ui/src/components/HealthyForm/FormExtended.vue
Normal file
@ -0,0 +1,267 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<p class="p_title_1">九、{{projectName[form.conditioningProjectId+'']}}信息评估</p>
|
||||||
|
<!--高血糖-->
|
||||||
|
<div v-show="form.conditioningProjectId == 6 || form.conditioningProjectId == 5">
|
||||||
|
<div v-show="form.conditioningProjectId == 6">
|
||||||
|
<p class="p_title_2">1、餐前餐后血糖</p>
|
||||||
|
<div style="margin-top:10px">
|
||||||
|
<div class="margin-left"><span>餐前:</span><el-input placeholder="输入血糖数值" v-model="form.healthyExtend.bloodSugarMessage.beforeMealBloodSugar" maxlength="100" style="width:50%"></el-input><span class="margin-left">mmol/L</span></div>
|
||||||
|
<div class="margin-left" style="margin-top:8px;"><span>餐后两小时:</span><el-input style="width:50%;" v-model="form.healthyExtend.bloodSugarMessage.afterMealBloodSugar" maxlength="100" placeholder="输入血糖数值"></el-input><span class="margin-left">mmol/L</span></div>
|
||||||
|
</div>
|
||||||
|
<p class="p_title_2">2、血糖水平以及测量时间</p>
|
||||||
|
<el-form-item :label="'(1) 是否有规律测血糖'" class="margin-left">
|
||||||
|
<el-radio-group v-model="form.healthyExtend.bloodSugarMessage.measureBloodSugarFlag">
|
||||||
|
<el-radio :label="1" >是</el-radio>
|
||||||
|
<el-radio :label="0" >否</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
<div style="margin-top:8px;"><span>测量时间 </span><el-input v-model="form.healthyExtend.bloodSugarMessage.measureBloodSugarTime" placeholder="请描述血糖测量时间" /></div>
|
||||||
|
<div><span>近期血糖水平</span>
|
||||||
|
<el-input type="textarea"
|
||||||
|
v-model="form.healthyExtend.bloodSugarMessage.nearBloodSugar"
|
||||||
|
placeholder="请描述下近期血糖水平"
|
||||||
|
maxlength="200"
|
||||||
|
show-word-limit
|
||||||
|
rows="3"
|
||||||
|
></el-input>
|
||||||
|
</div>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item :label="'(2) 是否有低血糖反应'" class="margin-left">
|
||||||
|
<el-radio-group v-model="form.healthyExtend.bloodSugarMessage.lowBloodSugarFlag">
|
||||||
|
<el-radio :label="1" >是</el-radio>
|
||||||
|
<el-radio :label="0" >否</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
<div style="margin-top:8px;"><span>低血糖反应出现时间 </span><el-input v-model="form.healthyExtend.bloodSugarMessage.lowBloodSugarTime" maxlength="100" placeholder="请描述低血糖出现时间" /></div>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item :label="'(3) 是否有出现并发症'" class="margin-left">
|
||||||
|
<el-radio-group v-model="form.healthyExtend.bloodSugarMessage.complicationFlag">
|
||||||
|
<el-radio :label="1" >是</el-radio>
|
||||||
|
<el-radio :label="0" >否</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
<div style="margin-top:8px;"><span>并发症情况 </span>
|
||||||
|
<el-input type="textarea"
|
||||||
|
v-model="form.healthyExtend.bloodSugarMessage.complication"
|
||||||
|
placeholder="请描述下并发症情况"
|
||||||
|
maxlength="200"
|
||||||
|
show-word-limit
|
||||||
|
rows="3"
|
||||||
|
></el-input>
|
||||||
|
</div>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item :label="'(4) 目前是否存在下方症状'" class="margin-left">
|
||||||
|
<el-radio-group v-model="form.healthyExtend.bloodSugarMessage.inferiorSymptomFlag">
|
||||||
|
<el-radio :label="1" >是</el-radio>
|
||||||
|
<el-radio :label="0" >否</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
<div style="margin-top:8px;"><span>若存在请选择对应症状</span>
|
||||||
|
<el-checkbox-group v-model="form.healthyExtend.bloodSugarMessage.inferiorSymptom">
|
||||||
|
<el-checkbox v-for="(item,index) in healthyData['syndromeNameArray']" :label="item.value" :key="index">{{ item.name }}</el-checkbox>
|
||||||
|
</el-checkbox-group>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</el-form-item>
|
||||||
|
<p class="p_title_2">2、体重变化情况</p>
|
||||||
|
<el-form-item :label="'(1) 近三个月体重是否有变化'" class="margin-left">
|
||||||
|
<el-radio-group v-model="form.healthyExtend.bloodSugarMessage.weightChangeFlag">
|
||||||
|
<el-radio :label="1" >是</el-radio>
|
||||||
|
<el-radio :label="0" >否</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div v-show="form.conditioningProjectId == 5">
|
||||||
|
<p class="p_title_2">1、餐前餐后血压</p>
|
||||||
|
<div style="margin-top:10px">
|
||||||
|
<div class="margin-left"><span>餐前:</span><el-input placeholder="输入血压数值" maxlength="100" v-model="form.healthyExtend.bloodPressureMessage.beforeMealBloodPressure" style="width:50%"></el-input><span class="margin-left">mmHg</span></div>
|
||||||
|
<div class="margin-left" style="margin-top:8px;"><span>餐后两小时:</span><el-input style="width:50%;" maxlength="100" v-model="form.healthyExtend.bloodPressureMessage.afterMealBloodPressure" placeholder="输入血压数值"></el-input><span class="margin-left">mmHg</span></div>
|
||||||
|
</div>
|
||||||
|
<p class="p_title_2">2、血压水平以及测量时间</p>
|
||||||
|
<el-form-item :label="'(1) 是否有规律测血压'" class="margin-left">
|
||||||
|
<el-radio-group v-model="form.healthyExtend.bloodPressureMessage.measureBloodPressureFlag">
|
||||||
|
<el-radio :label="1" >是</el-radio>
|
||||||
|
<el-radio :label="0" >否</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
<div style="margin-top:8px;"><span>测量时间 </span><el-input maxlength="100" v-model="form.healthyExtend.bloodPressureMessage.measureBloodPressureTime" placeholder="请描述血压测量时间" /></div>
|
||||||
|
<div><span>近期血压水平</span>
|
||||||
|
<el-input type="textarea"
|
||||||
|
v-model="form.healthyExtend.bloodPressureMessage.nearBloodPressure"
|
||||||
|
placeholder="请描述下近期血压水平"
|
||||||
|
maxlength="200"
|
||||||
|
show-word-limit
|
||||||
|
rows="3"
|
||||||
|
></el-input>
|
||||||
|
</div>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item :label="'(2) 是否有低血压反应'" class="margin-left">
|
||||||
|
<el-radio-group v-model="form.healthyExtend.bloodPressureMessage.lowBloodPressureFlag">
|
||||||
|
<el-radio :label="1" >是</el-radio>
|
||||||
|
<el-radio :label="0" >否</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
<div style="margin-top:8px;"><span>低血压反应出现时间 </span><el-input maxlength="100" v-model="form.healthyExtend.bloodPressureMessage.lowBloodPressureTime" placeholder="请描述低血压出现时间" /></div>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item :label="'(3) 是否有出现并发症'" class="margin-left">
|
||||||
|
<el-radio-group v-model="form.healthyExtend.bloodPressureMessage.complicationFlag">
|
||||||
|
<el-radio :label="1" >是</el-radio>
|
||||||
|
<el-radio :label="0" >否</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
<div style="margin-top:8px;"><span>并发症情况 </span>
|
||||||
|
<el-input type="textarea"
|
||||||
|
v-model="form.healthyExtend.bloodPressureMessage.complication"
|
||||||
|
placeholder="请描述下并发症情况"
|
||||||
|
maxlength="200"
|
||||||
|
show-word-limit
|
||||||
|
rows="3"
|
||||||
|
></el-input>
|
||||||
|
</div>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item :label="'(4) 目前是否存在下方症状'" class="margin-left">
|
||||||
|
<el-radio-group v-model="form.healthyExtend.bloodPressureMessage.inferiorSymptomFlag">
|
||||||
|
<el-radio :label="1" >是</el-radio>
|
||||||
|
<el-radio :label="0" >否</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
<div style="margin-top:8px;"><span>若存在请选择对应症状</span>
|
||||||
|
<el-checkbox-group v-model="form.healthyExtend.bloodPressureMessage.inferiorSymptom">
|
||||||
|
<el-checkbox v-for="(item,index) in healthyData['syndromeNameArray']" :label="item.name" :key="index">{{ item.name }}</el-checkbox>
|
||||||
|
</el-checkbox-group>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</el-form-item>
|
||||||
|
<p class="p_title_2">2、体重变化情况</p>
|
||||||
|
<el-form-item :label="'(1) 近三个月体重是否有变化'" class="margin-left">
|
||||||
|
<el-radio-group v-model="form.healthyExtend.bloodPressureMessage.weightChangeFlag">
|
||||||
|
<el-radio :label="1" >是</el-radio>
|
||||||
|
<el-radio :label="0" >否</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<p class="p_title_2">3、焦虑状态评估</p>
|
||||||
|
<el-form-item label="(1) 你认为你是一个容易焦虑或紧张的人吗?" class="margin-left">
|
||||||
|
<el-radio-group v-model="form.healthyExtend.anxietyStateMessage.easyAnxiousFlag">
|
||||||
|
<el-radio :label="1" >是</el-radio>
|
||||||
|
<el-radio :label="0" >否</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="(2) 最近一段时间,你是否比平时更感到焦虑或忐忑不安?" class="margin-left">
|
||||||
|
<el-radio-group v-model="form.healthyExtend.anxietyStateMessage.upsetRecently">
|
||||||
|
<el-radio :label="1" >是</el-radio>
|
||||||
|
<el-radio :label="0" >否</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="(3) 是否有一些特殊场合或情景更容易使得你紧张、焦虑?" class="margin-left">
|
||||||
|
<el-radio-group v-model="form.healthyExtend.anxietyStateMessage.nervousOnSpecialOccasionsFlag">
|
||||||
|
<el-radio :label="1" >是</el-radio>
|
||||||
|
<el-radio :label="0" >否</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="(4) 你曾经有过惊恐发作吗.即突然发生的强烈不适感或心慌、眩晕、感到憋气或呼吸困难等症状?" class="margin-left">
|
||||||
|
<el-radio-group v-model="form.healthyExtend.anxietyStateMessage.terrifiedFlag">
|
||||||
|
<el-radio :label="1" >是</el-radio>
|
||||||
|
<el-radio :label="0" >否</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
<p class="p_title_2">4、郁抑状态评估</p>
|
||||||
|
<el-form-item label="(1) 过去几周(或几个月)是否感觉到无精打采、伤感、或对生活的乐趣减少?" class="margin-left">
|
||||||
|
<el-radio-group v-model="form.healthyExtend.depressedStateMessage.listlessRecentlyFlag">
|
||||||
|
<el-radio :label="1" >是</el-radio>
|
||||||
|
<el-radio :label="0" >否</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="(2) 除了不开心之外,是否比平时更加悲观或想哭?" class="margin-left">
|
||||||
|
<el-radio-group v-model="form.healthyExtend.depressedStateMessage.cryRecentlyFlag">
|
||||||
|
<el-radio :label="1" >是</el-radio>
|
||||||
|
<el-radio :label="0" >否</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="(3) 经常有早醒吗?(事实上不需那么早醒来)" class="margin-left">
|
||||||
|
<el-radio-group v-model="form.healthyExtend.depressedStateMessage.wakeUpEarlyRecentlyFlag">
|
||||||
|
<el-radio :label="1" >是</el-radio>
|
||||||
|
<el-radio :label="0" >否</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="(4) 近来是否经常想到活着没有意思" class="margin-left">
|
||||||
|
<el-radio-group v-model="form.healthyExtend.depressedStateMessage.noFunLiving">
|
||||||
|
<el-radio :label="1" >是</el-radio>
|
||||||
|
<el-radio :label="0" >否</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import * as healthyData from "@/utils/healthyData";
|
||||||
|
export default {
|
||||||
|
name: "FormExtended",
|
||||||
|
components: {
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
healthyData:healthyData,
|
||||||
|
projectName:{'0':'减脂','5':'高血压','6':'高血糖'}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
form: {
|
||||||
|
type: Object,
|
||||||
|
default: null
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
|
||||||
|
},
|
||||||
|
computed:{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
.el-form-item {
|
||||||
|
margin-bottom: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.p_title_1{
|
||||||
|
font-size: 18px;
|
||||||
|
font-weight: bold;
|
||||||
|
margin-top: 30px;
|
||||||
|
}
|
||||||
|
.p_title_2{
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: bold;
|
||||||
|
margin-top: 30px;
|
||||||
|
}
|
||||||
|
.p_title_3{
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: bold;
|
||||||
|
margin-top: 30px;
|
||||||
|
}
|
||||||
|
.margin-left{
|
||||||
|
margin-left: 14px;
|
||||||
|
}
|
||||||
|
.el-input__inner{
|
||||||
|
width: 30%;
|
||||||
|
}
|
||||||
|
.margin-top-10{
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
.width-50-left-8-right-5{
|
||||||
|
width:50%;
|
||||||
|
margin-left: 8px;
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
|
.width-70-left-8-right-5{
|
||||||
|
width:70%;
|
||||||
|
margin-left: 8px;
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|
@ -104,7 +104,7 @@
|
|||||||
<!-- 其他信息 -->
|
<!-- 其他信息 -->
|
||||||
<div style="height: 370px; overflow: auto">
|
<div style="height: 370px; overflow: auto">
|
||||||
<div
|
<div
|
||||||
v-for="(item, index) in dataList.slice(1, 10)"
|
v-for="(item, index) in dataList.slice(1, 9)"
|
||||||
style="margin-bottom: 50px"
|
style="margin-bottom: 50px"
|
||||||
:key="index"
|
:key="index"
|
||||||
>
|
>
|
||||||
@ -173,6 +173,23 @@
|
|||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div
|
||||||
|
v-for="(item, index) in dataList.slice(9, 13)"
|
||||||
|
style="margin-bottom: 50px"
|
||||||
|
:key="'sign'+index"
|
||||||
|
>
|
||||||
|
<div v-if="healthyData.conditioningProjectId == 5 || healthyData.conditioningProjectId == 6">
|
||||||
|
<div v-if="index == 2 || index == 3 || (healthyData.conditioningProjectId == 5 && index == 1) || (healthyData.conditioningProjectId == 6 && index == 0)">
|
||||||
|
<p class="p_title_1" style="margin-top: 5px">
|
||||||
|
{{ extendedTitleArray[index] }}
|
||||||
|
</p>
|
||||||
|
<table-detail-message
|
||||||
|
:data="item"
|
||||||
|
></table-detail-message>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- 客户体征 -->
|
<!-- 客户体征 -->
|
||||||
@ -303,8 +320,8 @@ export default {
|
|||||||
[
|
[
|
||||||
["创建时间", "客户姓名", "手机号"],
|
["创建时间", "客户姓名", "手机号"],
|
||||||
["调理项目", "性别", "年龄"],
|
["调理项目", "性别", "年龄"],
|
||||||
["身高(厘米)", "体重(斤)", "地域"],
|
["身高(厘米)", "体重(斤)", "腰围(厘米)"],
|
||||||
["BMI", "", ""],
|
["臀围(厘米)", "地域", "BMI"],
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
["减脂经历", "减脂遇到的困难", "减脂是否反弹"],
|
["减脂经历", "减脂遇到的困难", "减脂是否反弹"],
|
||||||
@ -320,10 +337,10 @@ export default {
|
|||||||
["晚餐时间", "每周吃夜宵次数", "夜宵通常吃的食物"],
|
["晚餐时间", "每周吃夜宵次数", "夜宵通常吃的食物"],
|
||||||
["食物的冷热偏好", "食物的口味偏好", "平均每周吃生蔬菜几次"],
|
["食物的冷热偏好", "食物的口味偏好", "平均每周吃生蔬菜几次"],
|
||||||
["每周吃生蔬菜的频次类型", "平均每天吃水果次数", "吃水果的时间段"],
|
["每周吃生蔬菜的频次类型", "平均每天吃水果次数", "吃水果的时间段"],
|
||||||
["平时吃水果的频次", "一餐吃几碗饭", "吃几成饱"],
|
["平时吃水果的频次", "经常吃的水果以及份量","一餐吃几碗饭"],
|
||||||
["吃饭速度", "饮食特点", "常吃的零食"],
|
["吃几成饱","吃饭速度", "饮食特点"],
|
||||||
["有无服用营养保健品", "营养保健品品牌名", "营养保健品产品名"],
|
["常吃的零食","有无服用营养保健品", "营养保健品品牌名"],
|
||||||
["服用营养保健品频次", "忌口过敏食物", ""],
|
["营养保健品产品名","服用营养保健品频次", "忌口过敏食物"],
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
["每天的饮水量", "喜欢喝什么水", "喝水习惯"],
|
["每天的饮水量", "喜欢喝什么水", "喝水习惯"],
|
||||||
@ -348,14 +365,33 @@ export default {
|
|||||||
["是否出现过过敏症状", "过敏症状", "过敏源"],
|
["是否出现过过敏症状", "过敏症状", "过敏源"],
|
||||||
],
|
],
|
||||||
[["体检报告(1)", "体检报告(2)", "体检报告(3)"]],
|
[["体检报告(1)", "体检报告(2)", "体检报告(3)"]],
|
||||||
|
[
|
||||||
|
["餐前餐后血糖", "是否有规律测血糖", "测量血糖时间"],
|
||||||
|
["近期血糖水平", "是否有低血糖反应", "是否有出现并发症"],
|
||||||
|
["并发症情况", "存在症状", "近三个月体重是否有变化"],
|
||||||
|
|
||||||
|
],
|
||||||
|
[
|
||||||
|
["餐前餐后血压", "是否有规律测血压", "测量血压时间"],
|
||||||
|
["近期血压水平", "是否有低血压反应", "是否有出现并发症"],
|
||||||
|
["并发症情况", "存在症状", "近三个月体重是否有变化"]
|
||||||
|
],
|
||||||
|
[
|
||||||
|
["你认为你是一个容易焦虑或紧张的人吗","最近一段时间,你是否比平时更感到焦虑或忐忑不安","是否有一些特殊场合或情景更容易使得你紧张、焦虑"],
|
||||||
|
["你曾经有过惊恐发作吗.即突然发生的强烈不适感或心慌、眩晕、感到憋气或呼吸困难等症状","",""]
|
||||||
|
],
|
||||||
|
[
|
||||||
|
["过去几周(或几个月)是否感觉到无精打采、伤感、或对生活的乐趣减少","除了不开心之外,是否比平时更加悲观或想哭","经常有早醒吗(事实上不需那么早醒来)"],
|
||||||
|
["近来是否经常想到活着没有意思","",""]
|
||||||
|
]
|
||||||
],
|
],
|
||||||
// 健康评估属性
|
// 健康评估属性
|
||||||
healthyValueData: [
|
healthyValueData: [
|
||||||
[
|
[
|
||||||
["createTime", "name", "phone"],
|
["createTime", "name", "phone"],
|
||||||
["conditioningProject", "sex", "age"],
|
["conditioningProject", "sex", "age"],
|
||||||
["tall", "weight", "position"],
|
["tall", "weight", "healthyExtend,waist"],
|
||||||
["bmi", "", ""],
|
["healthyExtend,hipline", "position", "bmi"],
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
["experience", "difficulty", "rebound"],
|
["experience", "difficulty", "rebound"],
|
||||||
@ -371,10 +407,10 @@ export default {
|
|||||||
["dinnerTime", "supperNum", "supperFood"],
|
["dinnerTime", "supperNum", "supperFood"],
|
||||||
["dietHotAndCold", "dietFlavor", "vegetablesNum"],
|
["dietHotAndCold", "dietFlavor", "vegetablesNum"],
|
||||||
["vegetablesRateType", "fruitsNum", "fruitsTime"],
|
["vegetablesRateType", "fruitsNum", "fruitsTime"],
|
||||||
["fruitsRate", "riceNum", "riceFull"],
|
["fruitsRate", "healthyExtend,eatFruitsMessage", "riceNum"],
|
||||||
["eatingSpeed", "makeFoodType", "snacks"],
|
[ "riceFull","eatingSpeed", "makeFoodType"],
|
||||||
["healthProductsFlag", "healthProductsBrand", "healthProductsName"],
|
["snacks","healthProductsFlag", "healthProductsBrand"],
|
||||||
["healthProductsWeekRate", "dishesIngredient", ""],
|
["healthProductsName","healthProductsWeekRate", "dishesIngredient"],
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
["waterNum", "waterType", "waterHabit"],
|
["waterNum", "waterType", "waterHabit"],
|
||||||
@ -399,7 +435,27 @@ export default {
|
|||||||
["allergyFlag", "allergySituation", "allergen"],
|
["allergyFlag", "allergySituation", "allergen"],
|
||||||
],
|
],
|
||||||
[["medicalReport_one", "medicalReport_two", "medicalReport_three"]],
|
[["medicalReport_one", "medicalReport_two", "medicalReport_three"]],
|
||||||
|
[
|
||||||
|
["mealBloodSugar", "measureBloodSugarFlag", "measureBloodSugarTime"],
|
||||||
|
["nearBloodSugar", "lowBloodSugarFlag", "complicationFlag"],
|
||||||
|
["complication", "inferiorSymptom", "weightChangeFlag"]
|
||||||
|
],
|
||||||
|
[
|
||||||
|
["mealBloodPressure", "measureBloodPressureFlag", "measureBloodPressureTime"],
|
||||||
|
["nearBloodPressure", "lowBloodPressureFlag", "pressureComplicationFlag"],
|
||||||
|
["pressureComplication", "pressureInferiorSymptom", "pressureWeightChangeFlag"],
|
||||||
|
],
|
||||||
|
[
|
||||||
|
["easyAnxiousFlag","upsetRecently","nervousOnSpecialOccasionsFlag"],
|
||||||
|
["terrifiedFlag","",""]
|
||||||
|
],
|
||||||
|
[
|
||||||
|
["listlessRecentlyFlag","cryRecentlyFlag","wakeUpEarlyRecentlyFlag"],
|
||||||
|
["noFunLiving","",""]
|
||||||
|
]
|
||||||
|
|
||||||
],
|
],
|
||||||
|
extendedTitleArray:['十、高血糖信息评估',"十、高血压信息评估","十一、焦虑信息评估","十二、抑郁信息评估"],
|
||||||
copyValue: "",
|
copyValue: "",
|
||||||
detailHealthy: null,
|
detailHealthy: null,
|
||||||
dialogWidth: "950px",
|
dialogWidth: "950px",
|
||||||
@ -441,6 +497,12 @@ export default {
|
|||||||
getCustomerPhysicalSignsByCusId(this.data.id).then((res) => {
|
getCustomerPhysicalSignsByCusId(this.data.id).then((res) => {
|
||||||
this.showFlag = false;
|
this.showFlag = false;
|
||||||
if (res.data.customerHealthy) {
|
if (res.data.customerHealthy) {
|
||||||
|
if(res.data.type == 0){
|
||||||
|
//处理healthyExtend扩展数据
|
||||||
|
healthyData["needJSONFieldName"].forEach(function (item, index) {
|
||||||
|
res.data.customerHealthy.healthyExtend[item] = res.data.customerHealthy.healthyExtend[item] != null ? JSON.parse(res.data.customerHealthy.healthyExtend[item]) : null;
|
||||||
|
});
|
||||||
|
}
|
||||||
//判断是体征还是健康评估
|
//判断是体征还是健康评估
|
||||||
this.dataType = res.data.type;
|
this.dataType = res.data.type;
|
||||||
this.healthyData = JSON.parse(
|
this.healthyData = JSON.parse(
|
||||||
@ -500,6 +562,7 @@ export default {
|
|||||||
//对健康评估信息进行处理
|
//对健康评估信息进行处理
|
||||||
getDataListByHealthyMessage(healthy) {
|
getDataListByHealthyMessage(healthy) {
|
||||||
let detailHealthy = this.dealHealthy(healthy);
|
let detailHealthy = this.dealHealthy(healthy);
|
||||||
|
console.log(detailHealthy.longEatDrugClassify);
|
||||||
//性别
|
//性别
|
||||||
detailHealthy.sex =
|
detailHealthy.sex =
|
||||||
detailHealthy.sex == 0 ? "男" : detailHealthy.sex == 1 ? "女" : "未知";
|
detailHealthy.sex == 0 ? "男" : detailHealthy.sex == 1 ? "女" : "未知";
|
||||||
@ -670,6 +733,19 @@ export default {
|
|||||||
? detailHealthy.otherLongEatDrugClassify
|
? detailHealthy.otherLongEatDrugClassify
|
||||||
: "")
|
: "")
|
||||||
);
|
);
|
||||||
|
if (detailHealthy.healthyExtend.longEatDrugMessage != null) {
|
||||||
|
let m = "";
|
||||||
|
detailHealthy.healthyExtend.longEatDrugMessage.forEach((item,i) => {
|
||||||
|
let mm = "";
|
||||||
|
if(item.drug != null && item.drug.length > 0){
|
||||||
|
item.drug.forEach((it, j) => {
|
||||||
|
mm += (mm == "" ? "" : ",") + it.name + "/" + it.num + "/" + it.time;
|
||||||
|
})
|
||||||
|
}
|
||||||
|
m += (m == "" ? "" : ",") + mm;
|
||||||
|
});
|
||||||
|
detailHealthy.longEatDrugClassify += " 药物详情:" + m;
|
||||||
|
}
|
||||||
detailHealthy.allergyFlag = detailHealthy.allergyFlag == 1 ? "有" : "无";
|
detailHealthy.allergyFlag = detailHealthy.allergyFlag == 1 ? "有" : "无";
|
||||||
detailHealthy.allergen = this.trimComma(
|
detailHealthy.allergen = this.trimComma(
|
||||||
detailHealthy.allergen +
|
detailHealthy.allergen +
|
||||||
@ -729,17 +805,60 @@ export default {
|
|||||||
(detailHealthy.tall / 100) /
|
(detailHealthy.tall / 100) /
|
||||||
(detailHealthy.tall / 100)
|
(detailHealthy.tall / 100)
|
||||||
).toFixed(1);
|
).toFixed(1);
|
||||||
|
//常吃水果以及份量
|
||||||
|
let eatFruitsMessage = "";
|
||||||
|
console.log(detailHealthy.healthyExtend.eatFruitsMessage);
|
||||||
|
if(detailHealthy.healthyExtend.eatFruitsMessage != null && detailHealthy.healthyExtend.eatFruitsMessage.length > 0){
|
||||||
|
detailHealthy.healthyExtend.eatFruitsMessage.forEach((item,index) => {
|
||||||
|
eatFruitsMessage += (eatFruitsMessage == "" ? "" : ", ") + item.name + "/" + item.num;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
detailHealthy.healthyExtend.eatFruitsMessage = eatFruitsMessage;
|
||||||
|
console.log(detailHealthy.healthyExtend.bloodSugarMessage.inferiorSymptom.join(","));
|
||||||
|
detailHealthy.mealBloodSugar = "餐前血糖:"+(detailHealthy.healthyExtend.bloodSugarMessage.beforeMealBloodSugar == null ? "" : (detailHealthy.healthyExtend.bloodSugarMessage.beforeMealBloodSugar+"mmol/L"))+", "
|
||||||
|
+"餐后两小时血糖:"+(detailHealthy.healthyExtend.bloodSugarMessage.afterMealBloodSugar == null ? "" : (detailHealthy.healthyExtend.bloodSugarMessage.afterMealBloodSugar+"mmol/L"));
|
||||||
|
detailHealthy.measureBloodSugarFlag = detailHealthy.healthyExtend.bloodSugarMessage.measureBloodSugarFlag == 1 ? "是" : "否";
|
||||||
|
detailHealthy.measureBloodSugarTime = detailHealthy.healthyExtend.bloodSugarMessage.measureBloodSugarTime;
|
||||||
|
detailHealthy.nearBloodSugar = detailHealthy.healthyExtend.bloodSugarMessage.nearBloodSugar;
|
||||||
|
detailHealthy.lowBloodSugarFlag = (detailHealthy.healthyExtend.bloodSugarMessage.lowBloodSugarFlag == 1 ? "是" : "否") + ", 出现时间:"+detailHealthy.healthyExtend.bloodSugarMessage.lowBloodSugarTime;
|
||||||
|
detailHealthy.complicationFlag = detailHealthy.healthyExtend.bloodSugarMessage.complicationFlag == 1 ? "是" : "否";
|
||||||
|
detailHealthy.complication = detailHealthy.healthyExtend.bloodSugarMessage.complication;
|
||||||
|
detailHealthy.inferiorSymptom = (detailHealthy.healthyExtend.bloodSugarMessage.inferiorSymptomFlag == 1 ? "是" : "否") + ", 具体症状:"+detailHealthy.healthyExtend.bloodSugarMessage.inferiorSymptom.join(",");
|
||||||
|
detailHealthy.weightChangeFlag = detailHealthy.healthyExtend.bloodSugarMessage.weightChangeFlag == 1 ? "是" : "否";
|
||||||
|
|
||||||
|
detailHealthy.mealBloodPressure = "餐前血压:"+(detailHealthy.healthyExtend.bloodPressureMessage.beforeMealBloodPressure == null ? "" : (detailHealthy.healthyExtend.bloodPressureMessage.beforeMealBloodPressure+"mmHg"))+", "
|
||||||
|
+"餐后两小时血压:"+(detailHealthy.healthyExtend.bloodPressureMessage.afterMealBloodPressure == null ? "" : (detailHealthy.healthyExtend.bloodPressureMessage.afterMealBloodPressure+"mmHg"));
|
||||||
|
detailHealthy.measureBloodPressureFlag = detailHealthy.healthyExtend.bloodPressureMessage.measureBloodPressureFlag == 1 ? "是" : "否";
|
||||||
|
detailHealthy.measureBloodPressureTime = detailHealthy.healthyExtend.bloodPressureMessage.measureBloodPressureTime;
|
||||||
|
detailHealthy.nearBloodPressure = detailHealthy.healthyExtend.bloodPressureMessage.nearBloodPressure;
|
||||||
|
detailHealthy.lowBloodPressureFlag = (detailHealthy.healthyExtend.bloodPressureMessage.lowBloodPressureFlag == 1 ? "是" : "否") + ", 出现时间:"+detailHealthy.healthyExtend.bloodPressureMessage.lowBloodPressureTime;
|
||||||
|
detailHealthy.pressureComplicationFlag = detailHealthy.healthyExtend.bloodPressureMessage.complicationFlag == 1 ? "是" : "否";
|
||||||
|
detailHealthy.pressureComplication = detailHealthy.healthyExtend.bloodPressureMessage.complication;
|
||||||
|
detailHealthy.pressureInferiorSymptom = (detailHealthy.healthyExtend.bloodPressureMessage.inferiorSymptomFlag == 1 ? "是" : "否") + ", 具体症状:"+detailHealthy.healthyExtend.bloodPressureMessage.inferiorSymptom.join(",");
|
||||||
|
detailHealthy.pressureWeightChangeFlag = detailHealthy.healthyExtend.bloodPressureMessage.weightChangeFlag == 1 ? "是" : "否";
|
||||||
|
|
||||||
|
detailHealthy.easyAnxiousFlag = detailHealthy.healthyExtend.anxietyStateMessage.easyAnxiousFlag == 1 ? "是" : "否";
|
||||||
|
detailHealthy.upsetRecently = detailHealthy.healthyExtend.anxietyStateMessage.upsetRecently == 1 ? "是" : "否";
|
||||||
|
detailHealthy.nervousOnSpecialOccasionsFlag = detailHealthy.healthyExtend.anxietyStateMessage.nervousOnSpecialOccasionsFlag == 1 ? "是" : "否";
|
||||||
|
detailHealthy.terrifiedFlag = detailHealthy.healthyExtend.anxietyStateMessage.terrifiedFlag == 1 ? "是" : "否";
|
||||||
|
detailHealthy.listlessRecentlyFlag = detailHealthy.healthyExtend.depressedStateMessage.listlessRecentlyFlag == 1 ? "是" : "否";
|
||||||
|
detailHealthy.cryRecentlyFlag = detailHealthy.healthyExtend.depressedStateMessage.cryRecentlyFlag == 1 ? "是" : "否";
|
||||||
|
detailHealthy.wakeUpEarlyRecentlyFlag = detailHealthy.healthyExtend.depressedStateMessage.wakeUpEarlyRecentlyFlag == 1 ? "是" : "否";
|
||||||
|
detailHealthy.noFunLiving = detailHealthy.healthyExtend.depressedStateMessage.noFunLiving == 1 ? "是" : "否";
|
||||||
|
|
||||||
this.detailHealthy = detailHealthy;
|
this.detailHealthy = detailHealthy;
|
||||||
|
console.log("---");
|
||||||
for (let i = 0; i < this.healthyTitleData.length; i++) {
|
for (let i = 0; i < this.healthyTitleData.length; i++) {
|
||||||
let stepArray = [];
|
let stepArray = [];
|
||||||
|
console.log(i);
|
||||||
for (let j = 0; j < this.healthyTitleData[i].length; j++) {
|
for (let j = 0; j < this.healthyTitleData[i].length; j++) {
|
||||||
stepArray[j] = {
|
stepArray[j] = {
|
||||||
attr_name_one: this.healthyTitleData[i][j][0],
|
attr_name_one: this.healthyTitleData[i][j][0],
|
||||||
value_one: detailHealthy[this.healthyValueData[i][j][0]],
|
value_one: this.healthyValueData[i][j][0].indexOf(",") == -1 ? detailHealthy[this.healthyValueData[i][j][0]] : detailHealthy[this.healthyValueData[i][j][0].split(",")[0]][this.healthyValueData[i][j][0].split(",")[1]],
|
||||||
attr_name_two: this.healthyTitleData[i][j][1],
|
attr_name_two: this.healthyTitleData[i][j][1],
|
||||||
value_two: detailHealthy[this.healthyValueData[i][j][1]],
|
value_two: this.healthyValueData[i][j][1].indexOf(",") == -1 ? detailHealthy[this.healthyValueData[i][j][1]] : detailHealthy[this.healthyValueData[i][j][1].split(",")[0]][this.healthyValueData[i][j][1].split(",")[1]],
|
||||||
attr_name_three: this.healthyTitleData[i][j][2],
|
attr_name_three: this.healthyTitleData[i][j][2],
|
||||||
value_three: detailHealthy[this.healthyValueData[i][j][2]],
|
value_three: this.healthyValueData[i][j][2].indexOf(",") == -1 ? detailHealthy[this.healthyValueData[i][j][2]] : detailHealthy[this.healthyValueData[i][j][2].split(",")[0]][this.healthyValueData[i][j][2].split(",")[1]],
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
this.dataList[i] = stepArray;
|
this.dataList[i] = stepArray;
|
||||||
|
@ -48,6 +48,7 @@
|
|||||||
v-show="stepArray[7]"
|
v-show="stepArray[7]"
|
||||||
:flag="1"
|
:flag="1"
|
||||||
:form.sync="form"
|
:form.sync="form"
|
||||||
|
@addNewDrugInput="addNewDrugInput"
|
||||||
></healthy-form8>
|
></healthy-form8>
|
||||||
<edit-file
|
<edit-file
|
||||||
v-show="stepArray[8]"
|
v-show="stepArray[8]"
|
||||||
@ -195,6 +196,12 @@ export default {
|
|||||||
cusMessage[item] =
|
cusMessage[item] =
|
||||||
cusMessage[item] != null ? cusMessage[item].join(",") : null;
|
cusMessage[item] != null ? cusMessage[item].join(",") : null;
|
||||||
});
|
});
|
||||||
|
let cusMessageExtended = Object.assign({}, this.form.healthyExtend);
|
||||||
|
//处理healthyExtend扩展数据
|
||||||
|
this.healthyData["needJSONFieldName"].forEach(function (item, index) {
|
||||||
|
cusMessageExtended[item] = cusMessageExtended[item] != null ? JSON.stringify(cusMessageExtended[item]) : null;
|
||||||
|
});
|
||||||
|
cusMessage.healthyExtend = cusMessageExtended;
|
||||||
updateHealthy(cusMessage)
|
updateHealthy(cusMessage)
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
if (response.code === 200) {
|
if (response.code === 200) {
|
||||||
@ -217,7 +224,46 @@ export default {
|
|||||||
}
|
}
|
||||||
this.submitShow = allShow;
|
this.submitShow = allShow;
|
||||||
},
|
},
|
||||||
|
addNewDrugInput(type){
|
||||||
|
let index = null;
|
||||||
|
this.form.healthyExtend.longEatDrugMessage.forEach((v, i) => {
|
||||||
|
if(v.type == type){
|
||||||
|
index = i;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.form.healthyExtend.longEatDrugMessage[index].drug.push({'name':'','num':'','time':''});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
watch:{
|
||||||
|
'form.healthyExtend.eatFruitsNameArray'(newArray, oldArray){
|
||||||
|
oldArray = (oldArray == undefined || oldArray == null) ? [] : oldArray;
|
||||||
|
newArray = (newArray == undefined || newArray == null) ? [] : newArray;
|
||||||
|
if(newArray.length > oldArray.length){
|
||||||
|
this.form.healthyExtend.eatFruitsMessage.push({'name': newArray[newArray.length-1], "num": ''});
|
||||||
|
}else{
|
||||||
|
let array = newArray.concat(oldArray).filter(function(v, i, arr) {
|
||||||
|
return arr.indexOf(v) === arr.lastIndexOf(v);
|
||||||
|
});
|
||||||
|
this.form.healthyExtend.eatFruitsMessage = this.form.healthyExtend.eatFruitsMessage.filter(function(v, i, arr) {
|
||||||
|
return array.indexOf(v.name) == -1;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
'form.longEatDrugClassify'(newArray, oldArray){
|
||||||
|
oldArray = (oldArray == undefined || oldArray == null) ? [] : oldArray;
|
||||||
|
newArray = (newArray == undefined || newArray == null) ? [] : newArray;
|
||||||
|
if(newArray.length > oldArray.length){
|
||||||
|
this.form.healthyExtend.longEatDrugMessage.push({'type': newArray[newArray.length-1], 'drug': [{'name':'','num':'','time':''}]});
|
||||||
|
}else{
|
||||||
|
let array = newArray.concat(oldArray).filter(function(v, i, arr) {
|
||||||
|
return arr.indexOf(v) === arr.lastIndexOf(v);
|
||||||
|
});
|
||||||
|
this.form.healthyExtend.longEatDrugMessage = this.form.healthyExtend.longEatDrugMessage.filter(function(v, i, arr) {
|
||||||
|
return array.indexOf(v.name) == -1;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -19,7 +19,9 @@ export const condimentArray = [
|
|||||||
{ name: "浓汤宝", value: "6" },
|
{ name: "浓汤宝", value: "6" },
|
||||||
{ name: "鸡粉", value: "7" },
|
{ name: "鸡粉", value: "7" },
|
||||||
{ name: "花椒", value: "8" },
|
{ name: "花椒", value: "8" },
|
||||||
{ name: "辣椒油", value: "9" }
|
{ name: "辣椒油", value: "9" },
|
||||||
|
{ name: "黄酒", value: "10" },
|
||||||
|
{ name: "料酒", value: "11" }
|
||||||
];
|
];
|
||||||
|
|
||||||
export const cookingStyleArray = [
|
export const cookingStyleArray = [
|
||||||
@ -97,6 +99,25 @@ export const fruitsRateArray = [
|
|||||||
{ name: "从不吃", value: "4" }
|
{ name: "从不吃", value: "4" }
|
||||||
];
|
];
|
||||||
|
|
||||||
|
export const eatFruitsArray = [
|
||||||
|
{ name: "梨", value: "梨" },
|
||||||
|
{ name: "苹果", value: "苹果" },
|
||||||
|
{ name: "香蕉", value: "香蕉" },
|
||||||
|
{ name: "榴莲", value: "榴莲" },
|
||||||
|
{ name: "橙子", value: "橙子" },
|
||||||
|
{ name: "西瓜", value: "西瓜" },
|
||||||
|
{ name: "桃子", value: "桃子" },
|
||||||
|
{ name: "葡萄", value: "葡萄" },
|
||||||
|
{ name: "李子", value: "李子" },
|
||||||
|
{ name: "哈密瓜", value: "哈密瓜"},
|
||||||
|
{ name: "香瓜", value: "香瓜" },
|
||||||
|
{ name: "荔枝", value: "荔枝" },
|
||||||
|
{ name: "杨梅", value: "杨梅" },
|
||||||
|
{ name: "菠萝", value: "菠萝" },
|
||||||
|
{ name: "草莓", value: "草莓" },
|
||||||
|
{ name: "龙眼", value: "龙眼" },
|
||||||
|
];
|
||||||
|
|
||||||
export const eatingSpeedArray = [
|
export const eatingSpeedArray = [
|
||||||
{ name: "很快", value: "1" },
|
{ name: "很快", value: "1" },
|
||||||
{ name: "偏快", value: "2" },
|
{ name: "偏快", value: "2" },
|
||||||
@ -298,6 +319,19 @@ export const drinkWineAmountUnitArray = ["两", "瓶", "毫升"];
|
|||||||
export const smokeRateArray = ["每天抽烟", "烟龄", "已戒烟"];
|
export const smokeRateArray = ["每天抽烟", "烟龄", "已戒烟"];
|
||||||
export const smokeRateUnitArray = ["次", "年", "年"];
|
export const smokeRateUnitArray = ["次", "年", "年"];
|
||||||
|
|
||||||
|
|
||||||
|
//并发症
|
||||||
|
export const syndromeNameArray = [
|
||||||
|
{ name: "腰痛", value: "1" },
|
||||||
|
{ name: "四肢酸痛", value: "2" },
|
||||||
|
{ name: "手足蚁感", value: "3" },
|
||||||
|
{ name: "麻木", value: "4" },
|
||||||
|
{ name: "皮肤瘙痒", value: "5" },
|
||||||
|
{ name: "性欲减退", value: "6" },
|
||||||
|
{ name: "海男性勃起功能障碍", value: "7" },
|
||||||
|
{ name: "视力下降", value: "8" }
|
||||||
|
];
|
||||||
|
|
||||||
//需要将数组转成字符串的属性名称,包含对象数组、字符串数组
|
//需要将数组转成字符串的属性名称,包含对象数组、字符串数组
|
||||||
export const arrayName = [
|
export const arrayName = [
|
||||||
"condiment",
|
"condiment",
|
||||||
@ -471,6 +505,16 @@ const moduleObj = {
|
|||||||
moistureDateArray
|
moistureDateArray
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//healthyExtend扩展信息中需要将对象转为json字符串或字符串转json的字段
|
||||||
|
export const needJSONFieldName = [
|
||||||
|
"eatFruitsMessage",
|
||||||
|
"longEatDrugMessage",
|
||||||
|
"bloodSugarMessage",
|
||||||
|
"bloodPressureMessage",
|
||||||
|
"anxietyStateMessage",
|
||||||
|
"depressedStateMessage"
|
||||||
|
];
|
||||||
|
|
||||||
//健康信息处理,将数组转为字符串
|
//健康信息处理,将数组转为字符串
|
||||||
export function dealHealthy(customerHealthy) {
|
export function dealHealthy(customerHealthy) {
|
||||||
customerHealthy.bmi = (
|
customerHealthy.bmi = (
|
||||||
|
@ -27,10 +27,12 @@
|
|||||||
<healthy-form5 v-show="stepArray[4]" :form.sync="form"></healthy-form5>
|
<healthy-form5 v-show="stepArray[4]" :form.sync="form"></healthy-form5>
|
||||||
<healthy-form6 v-show="stepArray[5]" :form.sync="form"></healthy-form6>
|
<healthy-form6 v-show="stepArray[5]" :form.sync="form"></healthy-form6>
|
||||||
<healthy-form7 v-show="stepArray[6]" :form.sync="form"></healthy-form7>
|
<healthy-form7 v-show="stepArray[6]" :form.sync="form"></healthy-form7>
|
||||||
<healthy-form8 v-show="stepArray[7]" :form.sync="form"></healthy-form8>
|
<healthy-form8 v-show="stepArray[7]" :form.sync="form" @addNewDrugInput="addNewDrugInput"></healthy-form8>
|
||||||
|
<healthy-extended v-show="stepArray[8]" :form.sync="form"></healthy-extended>
|
||||||
<healthy-form9
|
<healthy-form9
|
||||||
v-show="stepArray[8]"
|
v-show="stepArray[9]"
|
||||||
ref="fileForm"
|
ref="fileForm"
|
||||||
|
:titleNumFlag="extendedProjectIdArray.indexOf(this.form.conditioningProjectId) != -1"
|
||||||
@addOrEditHealthy="addCustomerHealthy()"
|
@addOrEditHealthy="addCustomerHealthy()"
|
||||||
:form.sync="form"
|
:form.sync="form"
|
||||||
></healthy-form9>
|
></healthy-form9>
|
||||||
@ -77,6 +79,7 @@ import Form6 from "@/components/HealthyForm/Form6";
|
|||||||
import Form7 from "@/components/HealthyForm/Form7";
|
import Form7 from "@/components/HealthyForm/Form7";
|
||||||
import Form8 from "@/components/HealthyForm/Form8";
|
import Form8 from "@/components/HealthyForm/Form8";
|
||||||
import Form9 from "@/components/HealthyForm/Form9";
|
import Form9 from "@/components/HealthyForm/Form9";
|
||||||
|
import FormExtended from "@/components/HealthyForm/FormExtended";
|
||||||
export default {
|
export default {
|
||||||
name: "index",
|
name: "index",
|
||||||
data() {
|
data() {
|
||||||
@ -86,8 +89,9 @@ export default {
|
|||||||
healthyData: healthyData,
|
healthyData: healthyData,
|
||||||
logo,
|
logo,
|
||||||
submitFlag: false,
|
submitFlag: false,
|
||||||
stepArray: [true, false, false, false, false, false, false, false, false],
|
stepArray: [true, false, false, false, false, false, false, false, false, false],
|
||||||
stepActive: 0,
|
stepActive: 0,
|
||||||
|
extendedProjectIdArray:[5,6],
|
||||||
form: {
|
form: {
|
||||||
customerEncId: null,
|
customerEncId: null,
|
||||||
name: null,
|
name: null,
|
||||||
@ -195,6 +199,63 @@ export default {
|
|||||||
crux: 1,
|
crux: 1,
|
||||||
dishesIngredient: null,
|
dishesIngredient: null,
|
||||||
makeFoodType: 3,
|
makeFoodType: 3,
|
||||||
|
|
||||||
|
healthyExtend:{
|
||||||
|
//腰围
|
||||||
|
waist: null,
|
||||||
|
//臀围
|
||||||
|
hipline: null,
|
||||||
|
//常吃水果名称,['']
|
||||||
|
eatFruitsNameArray:[],
|
||||||
|
//常吃水果json数组.[{'name':'苹果', "num": '200克'}, {'name':'西瓜','num': '两个'}]
|
||||||
|
eatFruitsMessage:[],
|
||||||
|
//长期服用药物JSON数组, [{'type': 1, 'drug':[{'name':'降压药1','num':'每天三粒','time':'早中晚'}]}]
|
||||||
|
longEatDrugMessage:[],
|
||||||
|
//高血糖评估
|
||||||
|
bloodSugarMessage: {
|
||||||
|
"beforeMealBloodSugar": null,
|
||||||
|
"afterMealBloodSugar": null,
|
||||||
|
"measureBloodSugarFlag": 0,
|
||||||
|
"measureBloodSugarTime": null,
|
||||||
|
"nearBloodSugar": null,
|
||||||
|
"lowBloodSugarFlag": 0,
|
||||||
|
"lowBloodSugarTime": null,
|
||||||
|
"complicationFlag": 0,
|
||||||
|
"complication": null,
|
||||||
|
"inferiorSymptomFlag": 0,
|
||||||
|
"inferiorSymptom": [],
|
||||||
|
"weightChangeFlag": 0
|
||||||
|
},
|
||||||
|
//高血压评估
|
||||||
|
bloodPressureMessage:{
|
||||||
|
"beforeMealBloodPressure": null,
|
||||||
|
"afterMealBloodPressure": null,
|
||||||
|
"measureBloodPressureFlag": 0,
|
||||||
|
"measureBloodPressureTime": null,
|
||||||
|
"nearBloodPressure": null,
|
||||||
|
"lowBloodPressureFlag": 0,
|
||||||
|
"lowBloodPressureTime": null,
|
||||||
|
"complicationFlag": 0,
|
||||||
|
"complication": null,
|
||||||
|
"inferiorSymptomFlag": 0,
|
||||||
|
"inferiorSymptom": [],
|
||||||
|
"weightChangeFlag": 0
|
||||||
|
},
|
||||||
|
//焦虑情绪评估
|
||||||
|
anxietyStateMessage:{
|
||||||
|
"easyAnxiousFlag": 0,
|
||||||
|
"upsetRecently": 0,
|
||||||
|
"nervousOnSpecialOccasionsFlag": 0,
|
||||||
|
"terrifiedFlag":0
|
||||||
|
},
|
||||||
|
//郁抑情绪评估
|
||||||
|
depressedStateMessage:{
|
||||||
|
"listlessRecentlyFlag": 0,
|
||||||
|
"cryRecentlyFlag":0,
|
||||||
|
"wakeUpEarlyRecentlyFlag":0,
|
||||||
|
"noFunLiving":0
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
timer: null,
|
timer: null,
|
||||||
rules: {
|
rules: {
|
||||||
@ -245,6 +306,7 @@ export default {
|
|||||||
"healthy-form7": Form7,
|
"healthy-form7": Form7,
|
||||||
"healthy-form8": Form8,
|
"healthy-form8": Form8,
|
||||||
"healthy-form9": Form9,
|
"healthy-form9": Form9,
|
||||||
|
'healthy-extended':FormExtended
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
//根据用户ID获取用户基本信息(手机号、姓名)
|
//根据用户ID获取用户基本信息(手机号、姓名)
|
||||||
@ -291,9 +353,14 @@ export default {
|
|||||||
//数据处理
|
//数据处理
|
||||||
let cusMessage = Object.assign({}, this.form);
|
let cusMessage = Object.assign({}, this.form);
|
||||||
this.healthyData["arrayName"].forEach(function (item, index) {
|
this.healthyData["arrayName"].forEach(function (item, index) {
|
||||||
cusMessage[item] =
|
cusMessage[item] = cusMessage[item] != null ? cusMessage[item].join(",") : null;
|
||||||
cusMessage[item] != null ? cusMessage[item].join(",") : null;
|
|
||||||
});
|
});
|
||||||
|
let cusMessageExtended = Object.assign({}, this.form.healthyExtend);
|
||||||
|
//处理healthyExtend扩展数据
|
||||||
|
this.healthyData["needJSONFieldName"].forEach(function (item, index) {
|
||||||
|
cusMessageExtended[item] = cusMessageExtended[item] != null ? JSON.stringify(cusMessageExtended[item]) : null;
|
||||||
|
});
|
||||||
|
cusMessage.healthyExtend = cusMessageExtended;
|
||||||
addCustomerHealthy(cusMessage)
|
addCustomerHealthy(cusMessage)
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
if (response.code === 200) {
|
if (response.code === 200) {
|
||||||
@ -313,12 +380,33 @@ export default {
|
|||||||
this.submitFlag = false;
|
this.submitFlag = false;
|
||||||
},
|
},
|
||||||
nextStep(step) {
|
nextStep(step) {
|
||||||
|
var reg = new RegExp(/^(\d+)(\.\d{1})?$/) ;
|
||||||
if (!this.customerExistFlag) {
|
if (!this.customerExistFlag) {
|
||||||
this.$message.error("客户不存在");
|
this.$message.error("客户不存在");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.$refs.form.validate((valid) => {
|
this.$refs.form.validate((valid) => {
|
||||||
if (valid || step < 0) {
|
if (valid || step < 0) {
|
||||||
|
if(this.stepActive == 0){
|
||||||
|
if((this.form.healthyExtend.waist != null && this.form.healthyExtend.waist.trim() != "")){
|
||||||
|
if(!reg.test(this.form.healthyExtend.waist)){
|
||||||
|
this.$message.error("腰围格式错误,整数或一位小数");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if((this.form.healthyExtend.hipline != null && this.form.healthyExtend.hipline.trim() != "")){
|
||||||
|
if(!reg.test(this.form.healthyExtend.hipline)){
|
||||||
|
this.$message.error("臀围格式错误,整数或一位小数");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if((this.stepActive == 7 && step > 0) || (this.stepActive == 9 && step < 0)){
|
||||||
|
//高血糖、高血压
|
||||||
|
if(this.extendedProjectIdArray.indexOf(this.form.conditioningProjectId) == -1){
|
||||||
|
step = step * 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
this.stepArray[this.stepActive] = false;
|
this.stepArray[this.stepActive] = false;
|
||||||
this.stepActive = this.stepActive + step;
|
this.stepActive = this.stepActive + step;
|
||||||
this.stepArray[this.stepActive] = true;
|
this.stepArray[this.stepActive] = true;
|
||||||
@ -334,6 +422,15 @@ export default {
|
|||||||
goTop() {
|
goTop() {
|
||||||
window.scroll(0, 0);
|
window.scroll(0, 0);
|
||||||
},
|
},
|
||||||
|
addNewDrugInput(type){
|
||||||
|
let index = null;
|
||||||
|
this.form.healthyExtend.longEatDrugMessage.forEach((v, i) => {
|
||||||
|
if(v.type == type){
|
||||||
|
index = i;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.form.healthyExtend.longEatDrugMessage[index].drug.push({'name':'','num':'','time':''});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.form.customerEncId = this.$route.params.id;
|
this.form.customerEncId = this.$route.params.id;
|
||||||
@ -342,6 +439,36 @@ export default {
|
|||||||
beforeCreate() {
|
beforeCreate() {
|
||||||
document.title = this.$route.meta.title;
|
document.title = this.$route.meta.title;
|
||||||
},
|
},
|
||||||
|
watch:{
|
||||||
|
'form.healthyExtend.eatFruitsNameArray'(newArray, oldArray){
|
||||||
|
oldArray = (oldArray == undefined || oldArray == null) ? [] : oldArray;
|
||||||
|
newArray = (newArray == undefined || newArray == null) ? [] : newArray;
|
||||||
|
if(newArray.length > oldArray.length){
|
||||||
|
this.form.healthyExtend.eatFruitsMessage.push({'name': newArray[newArray.length-1], "num": ''});
|
||||||
|
}else{
|
||||||
|
let array = newArray.concat(oldArray).filter(function(v, i, arr) {
|
||||||
|
return arr.indexOf(v) === arr.lastIndexOf(v);
|
||||||
|
});
|
||||||
|
this.form.healthyExtend.eatFruitsMessage = this.form.healthyExtend.eatFruitsMessage.filter(function(v, i, arr) {
|
||||||
|
return array.indexOf(v.name) == -1;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
'form.longEatDrugClassify'(newArray, oldArray){
|
||||||
|
oldArray = (oldArray == undefined || oldArray == null) ? [] : oldArray;
|
||||||
|
newArray = (newArray == undefined || newArray == null) ? [] : newArray;
|
||||||
|
if(newArray.length > oldArray.length){
|
||||||
|
this.form.healthyExtend.longEatDrugMessage.push({'type': newArray[newArray.length-1], 'drug': [{'name':'','num':'','time':''}]});
|
||||||
|
}else{
|
||||||
|
let array = newArray.concat(oldArray).filter(function(v, i, arr) {
|
||||||
|
return arr.indexOf(v) === arr.lastIndexOf(v);
|
||||||
|
});
|
||||||
|
this.form.healthyExtend.longEatDrugMessage = this.form.healthyExtend.longEatDrugMessage.filter(function(v, i, arr) {
|
||||||
|
return array.indexOf(v.name) == -1;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user