客户体征相关

Merge pull request  from 德仔/xzj
This commit is contained in:
德仔 2021-01-28 09:29:37 +08:00 committed by Gitee
commit 0479cfe4ae
8 changed files with 274 additions and 73 deletions
stdiet-custom/src/main
stdiet-ui/src
utils
views/custom
healthy
order
subhealthy/investigation

@ -5,6 +5,8 @@ import org.apache.commons.lang3.builder.ToStringStyle;
import com.stdiet.common.annotation.Excel;
import com.stdiet.common.core.domain.BaseEntity;
import java.util.List;
/**
* 客户健康对象 sys_customer_healthy
*
@ -410,6 +412,24 @@ public class SysCustomerHealthy extends BaseEntity
@Excel(name = "饮食习惯")
private Long makeFoodType;
/** 客户病史体征id使用隔开 */
//@Excel(name = "客户病史体征id使用隔开")
private String physicalSignsId;
/** 体征对象集合 **/
private List<SysPhysicalSigns> signList;
/** 其他病史体征 **/
private String otherPhysicalSigns;
/** 气血数据 */
@Excel(name = "气血数据")
private String bloodData;
/** 湿气数据 */
@Excel(name = "湿气数据")
private String moistureDate;
/** 删除标识 0未删除 1已删除。默认0 */
private Long delFlag;
@ -1301,6 +1321,46 @@ public class SysCustomerHealthy extends BaseEntity
this.tall = tall;
}
public String getPhysicalSignsId() {
return physicalSignsId;
}
public void setPhysicalSignsId(String physicalSignsId) {
this.physicalSignsId = physicalSignsId;
}
public List<SysPhysicalSigns> getSignList() {
return signList;
}
public void setSignList(List<SysPhysicalSigns> signList) {
this.signList = signList;
}
public String getOtherPhysicalSigns() {
return otherPhysicalSigns;
}
public void setOtherPhysicalSigns(String otherPhysicalSigns) {
this.otherPhysicalSigns = otherPhysicalSigns;
}
public String getBloodData() {
return bloodData;
}
public void setBloodData(String bloodData) {
this.bloodData = bloodData;
}
public String getMoistureDate() {
return moistureDate;
}
public void setMoistureDate(String moistureDate) {
this.moistureDate = moistureDate;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

@ -224,6 +224,11 @@ public class SysOrder extends BaseEntity {
* */
private List<SysOrderPause> orderPauseList;
/**
* 订单金额状态 0订单金额大于等于0 1订单金额小于0
*/
private Integer amountFlag;
@JsonFormat(pattern = "yyyy-MM-dd")
public Date getStartTime() {
return startTime;
@ -590,4 +595,12 @@ public class SysOrder extends BaseEntity {
public void setConditioningProject(String conditioningProject) {
this.conditioningProject = conditioningProject;
}
public Integer getAmountFlag() {
return amountFlag;
}
public void setAmountFlag(Integer amountFlag) {
this.amountFlag = amountFlag;
}
}

@ -107,16 +107,23 @@
<result property="crux" column="crux" />
<result property="dishesIngredient" column="dishes_ingredient" />
<result property="makeFoodType" column="make_food_type" />
<result property="physicalSignsId" column="physical_signs_id" />
<result property="otherPhysicalSigns" column="other_physical_signs" />
<result property="bloodData" column="blood_data" />
<result property="moistureDate" column="moisture_date" />
<result property="createTime" column="create_time" />
<result property="createBy" column="create_by" />
<result property="updateTime" column="update_time" />
<result property="updateBy" column="update_by" />
<result property="delFlag" column="del_flag" />
<!-- column是传的参数, select是调用的查询 -->
<association property="signList" column="physical_signs_id" select="getSignByIds"/>
</resultMap>
<sql id="selectSysCustomerHealthyVo">
select sch.id, customer_id, conditioning_project_id, sex, age, weight, tall, condiment, other_condiment, cooking_style, cooking_style_rate, wash_vegetables_style, other_wash_vegetables_style, breakfast_type, breakfast_food, lunch_type, dinner, vegetable_rate, common_meat, dinner_time, supper_num, supper_food, diet_hot_and_cold, diet_flavor, vegetables_num, vegetables_rate_type, fruits_num, fruits_time, fruits_rate, rice_num, rice_full, eating_speed, snacks, other_snacks, health_products_flag, health_products_brand, health_products_name, health_products_week_rate, health_products_day_rate, water_num, water_type, water_habit, drinks_num, drink_wine_flag, drink_wine_classify, other_wine_classify, drink_wine_amount, smoke_flag, smoke_rate, second_smoke, work_industry, work_type, defecation_num, other_defecation_num, defecation_time, defecation_shape, defecation_smell, defecation_speed, defecation_color, motion_num, motion_duration, motion_time, aerobic_motion_classify, anaerobic_motion_classify, anaerobic_aerobic_motion_classify, other_motion_classify, motion_field, other_motion_field, sleep_time, sleep_quality, sleep_drug_flag, sleep_drug, stayup_late_flag, stayup_late_week_num, family_illness_history, other_family_illness_history, operation_history, other_operation_history, near_operation_flag, recoverye_situation, long_eat_drug_flag, long_eat_drug_classify, other_long_eat_drug_classify, allergy_flag, allergy_situation, allergen, other_allergen, medical_report, medical_report_name,
position,experience,rebound,difficulty,crux,dishes_ingredient,make_food_type,sch.create_time, sch.create_by,sch. update_time, sch.update_by, sch.del_flag
position,experience,rebound,difficulty,crux,dishes_ingredient,make_food_type,physical_signs_id,other_physical_signs,blood_data,moisture_date,
sch.create_time, sch.create_by,sch. update_time, sch.update_by, sch.del_flag
</sql>
<select id="selectSysCustomerHealthyList" parameterType="SysCustomerHealthy" resultMap="SysCustomerHealthyResult">
@ -137,6 +144,7 @@
from sys_customer_healthy as sch
left join sys_customer sc on sc.id = sch.customer_id
LEFT JOIN (SELECT dict_label, dict_value FROM sys_dict_data WHERE dict_type = 'conditioning_project') AS cp ON cp.dict_value = sch.conditioning_project_id
where sch.del_flag = 0 and sc.del_flag = 0 and sch.id = #{id}
</select>
@ -239,6 +247,10 @@
<if test="crux != null">crux,</if>
<if test="dishesIngredient != null">dishes_ingredient,</if>
<if test="makeFoodType != null">make_food_type,</if>
<if test="physicalSignsId != null">physical_signs_id,</if>
<if test="otherPhysicalSigns != null">other_physical_signs,</if>
<if test="bloodData != null">blood_data,</if>
<if test="moistureDate != null">moisture_date,</if>
<if test="createTime != null">create_time,</if>
<if test="createBy != null">create_by,</if>
<if test="updateTime != null">update_time,</if>
@ -342,6 +354,10 @@
<if test="crux != null">#{crux},</if>
<if test="dishesIngredient != null">#{dishesIngredient},</if>
<if test="makeFoodType != null">#{makeFoodType},</if>
<if test="physicalSignsId != null">#{physicalSignsId},</if>
<if test="otherPhysicalSigns != null">#{otherPhysicalSigns},</if>
<if test="bloodData != null">#{bloodData},</if>
<if test="moistureDate != null">#{moistureDate},</if>
<if test="createTime != null">#{createTime},</if>
<if test="createBy != null">#{createBy},</if>
<if test="updateTime != null">#{updateTime},</if>
@ -448,6 +464,10 @@
<if test="crux != null">crux = #{crux},</if>
<if test="dishesIngredient != null">dishes_ingredient = #{dishesIngredient},</if>
<if test="makeFoodType != null">make_food_type = #{makeFoodType},</if>
<if test="physicalSignsId != null">physical_signs_id = #{physicalSignsId},</if>
<if test="otherPhysicalSigns != null">other_physical_signs = #{otherPhysicalSigns},</if>
<if test="bloodData != null">blood_data = #{bloodData},</if>
<if test="moistureDate != null">moisture_date = #{moistureDate},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
@ -468,6 +488,11 @@
</foreach>
</update>
<!-- 根据体征id获取体征 -->
<select id="getSignByIds" parameterType="String" resultType="SysPhysicalSigns">
select * from sys_physical_signs sps where FIND_IN_SET(id, #{physical_signs_id})
</select>
<!-- 根据手机号查询客户健康评估信息 -->
<select id="selectSysCustomerHealthyByPhone" parameterType="String" resultMap="SysCustomerHealthyResult">
<include refid="selectSysCustomerHealthyVo"/>,sc.name,sc.phone from sys_customer_healthy as sch

@ -60,8 +60,10 @@
SELECT SUM(amount) FROM sys_order
<where>
<if test="orderId != null and orderId != ''">and order_id = #{orderId}</if>
<if test="customer != null and customer != ''">and customer = #{customer}</if>
<if test="phone != null and phone != ''">and phone = #{phone}</if>
<if test="customer != null and customer != ''">
and (customer like concat('%',#{customer},'%') or phone like concat('%',#{customer},'%'))
</if>
<!-- <if test="phone != null and phone != ''">and phone = #{phone}</if>-->
<if test="status != null ">and status = #{status}</if>
<if test="payTypeId != null ">and pay_type_id = #{payTypeId}</if>
<if test="preSaleId != null ">and pre_sale_id = #{preSaleId}</if>
@ -78,7 +80,14 @@
<if test="endTime != null and endTime != ''">and date_format(order_time,'%y%m%d') &lt;= date_format(#{endTime},'%y%m%d')</if>
<if test="serveTimeId != null ">and serve_time_id = #{serveTimeId}</if>
<if test="reviewStatus != null ">and review_status = #{reviewStatus}</if>
<if test="serveTimeId != null ">and serve_time_id = #{serveTimeId}</if>
<if test="amountFlag != null">
<if test="amountFlag == 0">
and amount >= 0
</if>
<if test="amountFlag == 1">
and 0 > amount
</if>
</if>
</where>
</select>
@ -86,8 +95,10 @@
<include refid="selectSysOrderVo"/>
<where>
<if test="orderId != null and orderId != ''">and order_id = #{orderId}</if>
<if test="customer != null and customer != ''">and customer = #{customer}</if>
<if test="phone != null and phone != ''">and phone = #{phone}</if>
<if test="customer != null and customer != ''">
and (customer like concat('%',#{customer},'%') or phone like concat('%',#{customer},'%'))
</if>
<!--<if test="phone != null and phone != ''">and phone = #{phone}</if>-->
<if test="status != null ">and status = #{status}</if>
<if test="payTypeId != null ">and pay_type_id = #{payTypeId}</if>
<if test="preSaleId != null ">and pre_sale_id = #{preSaleId}</if>
@ -104,6 +115,14 @@
<if test="endTime != null and endTime != ''">and date_format(order_time,'%y%m%d') &lt;= date_format(#{endTime},'%y%m%d')</if>
<if test="serveTimeId != null ">and serve_time_id = #{serveTimeId}</if>
<if test="reviewStatus != null ">and review_status = #{reviewStatus}</if>
<if test="amountFlag != null">
<if test="amountFlag == 0">
and amount >= 0
</if>
<if test="amountFlag == 1">
and 0 > amount
</if>
</if>
</where>
order by order_time desc
</select>

@ -47,7 +47,7 @@ export const dinnerArray = [
]
export const dietHotAndColdArray = [
{"name":"偏冷食","value":"1"},{"name":"偏食","value":"2"},{"name":"正常","value":"3"}
{"name":"偏冷食","value":"1"},{"name":"偏食","value":"2"},{"name":"正常","value":"3"}
]
export const dietFlavorArray = [
@ -130,7 +130,7 @@ export const anaerobicAerobicMotionClassifyArray = [
]
export const motionFieldArray = [
{"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 sleepQualityArray = [
@ -180,7 +180,8 @@ export const arrayName = [
"condiment","cookingStyle","cookingStyleRate", "washVegetablesStyle","lunchType","dinner","dietFlavor",
"snacks","waterType","waterHabit","drinksNum","drinkWineClassify","drinkWineAmount","smokeRate",
"workType","defecationTime","aerobicMotionClassify","anaerobicMotionClassify","anaerobicAerobicMotionClassify",
"motionField","sleepQuality", "familyIllnessHistory", "operationHistory", "longEatDrugClassify", "allergen", "medicalReport"
"motionField","sleepQuality", "physicalSignsId","moistureDate","bloodData","familyIllnessHistory", "operationHistory", "longEatDrugClassify", "allergen",
"medicalReport","medicalReportName"
]
//需要将数字下标转成中文含义的属性名

@ -607,6 +607,7 @@
["辅助睡眠类药物名称","是否经常熬夜","熬夜频次"]
],
[
["病史体征","湿气数据","气血数据"],
["家族疾病史","手术史","近期是否做过手术"],
["手术恢复情况","是否长期服用药物","长期服用的药物"],
["是否出现过过敏症状","过敏症状","过敏源"]
@ -642,6 +643,7 @@
["sleepDrug","stayupLateFlag","stayupLateWeekNum"]
],
[
["physicalSigns","moistureDate","bloodData"],
["familyIllnessHistory","operationHistory","nearOperationFlag"],
["recoveryeSituation","longEatDrugFlag","longEatDrugClassify"],
["allergyFlag","allergySituation","allergen"]
@ -757,12 +759,22 @@
motionStr += item ? ((motionStr != "" ? "" : "") + item) : "";
});
}
detailHealthy.motion = motionStr + (detailHealthy.otherMotionClassify ? ( ""+ detailHealthy.otherMotionClassify) : "");
detailHealthy.motion = this.trimComma(motionStr + (detailHealthy.otherMotionClassify ? ( ""+ detailHealthy.otherMotionClassify) : ""));
detailHealthy.motionField += detailHealthy.otherMotionField ? (""+detailHealthy.otherMotionField) : "";
detailHealthy.sleepDrugFlag = detailHealthy.sleepDrugFlag == 1 ? "有" : "无";
detailHealthy.stayupLateFlag = detailHealthy.stayupLateFlag == 1 ? "有" : "无";
detailHealthy.stayupLateWeekNum += "次/周";
let physicalSigns = "";
if(detailHealthy.signList != null && detailHealthy.signList.length > 0){
detailHealthy.signList.forEach(function (sign, index) {
physicalSigns += "," + sign.name;
})
}
physicalSigns += "," + (detailHealthy.otherPhysicalSigns ? detailHealthy.otherPhysicalSigns : "");
detailHealthy.physicalSigns = this.trimComma(physicalSigns);
detailHealthy.familyIllnessHistory += detailHealthy.otherFamilyIllnessHistory ? ("" + detailHealthy.otherFamilyIllnessHistory) : "";
detailHealthy.operationHistory += detailHealthy.otherOperationHistory ? ("" + detailHealthy.otherOperationHistory) : "";
detailHealthy.nearOperationFlag = detailHealthy.nearOperationFlag == 1 ? "有" : "无";
@ -774,10 +786,11 @@
detailHealthy.allergen += detailHealthy.otherAllergen ? ("" +detailHealthy.otherAllergen) : "";
let medicalReportPathArray = detailHealthy.medicalReport ? detailHealthy.medicalReport.split(",") : [];
let medicalReportNameArray = detailHealthy.medicalReportName ? detailHealthy.medicalReportName.split(",") : [];
this.medicalReportPathArray = medicalReportPathArray;
detailHealthy.medicalReport_one = medicalReportPathArray.length > 0 ? "体检报告(1)" : "";
detailHealthy.medicalReport_two = medicalReportPathArray.length > 1 ? "体检报告(2)" : "";
detailHealthy.medicalReport_three = medicalReportPathArray.length > 2 ? "体检报告(3)" : "";
detailHealthy.medicalReport_one = medicalReportPathArray.length > 0 ? (medicalReportNameArray.length > 0 ? medicalReportNameArray[0] : "体检报告1") : "";
detailHealthy.medicalReport_two = medicalReportPathArray.length > 1 ? (medicalReportNameArray.length > 1 ? medicalReportNameArray[1] : "体检报告2") : "";
detailHealthy.medicalReport_three = medicalReportPathArray.length > 2 ? (medicalReportNameArray.length > 2 ? medicalReportNameArray[2] : "体检报告3") : "";
for(let i = 0; i < this.healthyTitleData.length; i++){
let stepArray = [];
@ -1017,6 +1030,15 @@
},
downloadFile(fileName){
this.downloadResource(fileName);
},
trimComma(str){
if(str.startsWith("") || str.startsWith(",")){
str = str.substring(1,str.length);
}
if(str.endsWith("") || str.endsWith(",")){
str = str.substring(0,str.length-1);
}
return str;
}
}
};

@ -2,7 +2,7 @@
<div class="app-container">
<el-row>
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="70px">
<el-col :span="6">
<!--<el-col :span="6">
<el-form-item label="手机号" prop="phone">
<el-input
v-model="queryParams.phone"
@ -12,12 +12,12 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
</el-col>
</el-col>-->
<el-col :span="6">
<el-form-item label="客户姓名" prop="customer">
<el-form-item label="客户信息" prop="customer">
<el-input
v-model="queryParams.customer"
placeholder="请输入客户姓名"
placeholder="请输入客户姓名或手机号"
clearable
size="small"
@keyup.enter.native="handleQuery"
@ -155,6 +155,15 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="订单金额" prop="amountFlag">
<el-select v-model="queryParams.amountFlag" placeholder="请选金额状态">
<el-option :key="0" label="全部订单" :value="null"/>
<el-option :key="1" label="正常订单" :value="0"/>
<el-option :key="2" label="退款订单" :value="1"/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="成交日期" prop="orderTime">
<el-date-picker
@ -702,8 +711,10 @@
operatorAssisId: null,
recommender: null,
reviewStatus: null,
serveTimeId: null
serveTimeId: null,
amountFlag: null
},
initPlanningAndOperationFlag: false, //
//
form: {},
//
@ -822,6 +833,7 @@
this.payTypeIdOptions = response.data;
});
this.getDicts("cus_account").then(response => {
response.data.splice(0,0,{dictValue: 0, dictLabel: '无', remark: null})
this.accountIdOptions = response.data;
});
this.getDicts("cus_serve_time").then(response => {
@ -920,6 +932,7 @@
startTime: dayjs().add(3, 'day').format("YYYY-MM-DD"),
pauseTime: null,
payTypeId: defaultPayType ? parseInt(defaultPayType.dictValue) : null,
accountId: defaultAccount ? parseInt(defaultAccount.dictValue) : null,
preSaleId: defaultPresale ? parseInt(defaultPresale.dictValue) : null,
createBy: null,
createTime: null,
@ -939,9 +952,7 @@
reviewStatus: this.review,
giveServeDay: defaultGiveServeTime ? parseInt(defaultGiveServeTime.dictValue) : null,
conditioningProjectId: defaultConditioningProjectIdOption ? parseInt(defaultConditioningProjectIdOption.dictValue) : null,
becomeFanTime: dayjs().format("YYYY-MM-DD"),
//使watch
accountId: defaultAccount ? parseInt(defaultAccount.dictValue) : null
becomeFanTime: dayjs().format("YYYY-MM-DD")
};
this.resetForm("form");
},
@ -971,7 +982,8 @@
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const orderId = row.orderId || this.ids
const orderId = row.orderId || this.ids;
this.form.accountId = "no";
getOrder(orderId).then(response => {
this.form = response.data;
this.form.giveServeDay = parseInt(this.form.giveServeDay+"");
@ -1054,22 +1066,31 @@
initPlanningAndOperation(){
if(this.form.accountId != null && this.form.accountId != undefined){
let planningAndOperationValue = this.orderDropdownCorrespondingOptions.find(opt => parseInt(opt.dictValue) === this.form.accountId);
let array = planningAndOperationValue.dictLabel.split("|");
let plannerIdOption = this.plannerIdOptions.find(opt => opt.dictValue == array[0]);
this.form.plannerId = plannerIdOption ? parseInt(plannerIdOption.dictValue) : 0;
let plannerAssisIdOption = this.plannerAssisIdOptions.find(opt => opt.dictValue == array[1]);
this.form.plannerAssisId = plannerAssisIdOption ? parseInt(plannerAssisIdOption.dictValue) : 0;
let operatorIdOption = this.operatorIdOptions.find(opt => opt.dictValue == array[2]);
this.form.operatorId = operatorIdOption ? parseInt(operatorIdOption.dictValue) : 0;
let operatorAssisIdOption = this.operatorAssisIdOptions.find(opt => opt.dictValue == array[3]);
this.form.operatorAssisId = operatorAssisIdOption ? parseInt(operatorAssisIdOption.dictValue) : 0;
if(planningAndOperationValue){
let array = planningAndOperationValue.dictLabel.split("|");
let plannerIdOption = this.plannerIdOptions.find(opt => opt.dictValue == array[0]);
this.form.plannerId = plannerIdOption ? parseInt(plannerIdOption.dictValue) : 0;
let plannerAssisIdOption = this.plannerAssisIdOptions.find(opt => opt.dictValue == array[1]);
this.form.plannerAssisId = plannerAssisIdOption ? parseInt(plannerAssisIdOption.dictValue) : 0;
let operatorIdOption = this.operatorIdOptions.find(opt => opt.dictValue == array[2]);
this.form.operatorId = operatorIdOption ? parseInt(operatorIdOption.dictValue) : 0;
let operatorAssisIdOption = this.operatorAssisIdOptions.find(opt => opt.dictValue == array[3]);
this.form.operatorAssisId = operatorAssisIdOption ? parseInt(operatorAssisIdOption.dictValue) : 0;
}else{
this.form.plannerId = 0;
this.form.plannerAssisId = 0;
this.form.operatorId = 0;
this.form.operatorAssisId = 0;
}
}
}
},
watch:{
//
"form.accountId": function(newVal, oldVal){
this.initPlanningAndOperation();
if(oldVal != "no" && newVal != "no"){
this.initPlanningAndOperation();
}
}
}
};

@ -409,7 +409,7 @@
<el-checkbox v-for="(item,index) in healthyData['aerobicMotionClassifyArray']" :label="item.value" :key="index">{{item.name}}</el-checkbox>
</el-checkbox-group>
</div>
<div><span>氧运动</span>
<div><span>氧运动</span>
<el-checkbox-group v-model="form.anaerobicMotionClassify">
<el-checkbox v-for="(item,index) in healthyData['anaerobicMotionClassifyArray']" :label="item.value" :key="index">{{item.name}}</el-checkbox>
</el-checkbox-group>
@ -461,7 +461,40 @@
</div>
<div v-show="stepArray[7]">
<p class="p_title_1">{{healthyData['titleArray'][7]}}</p>
<p class="p_title_2">1家族疾病史情况</p>
<p class="p_title_2">1本人病史情况</p>
<el-form-item label="(1) 病史体征(可多选)" prop="physicalSignsId" class="margin-left">
<el-select v-model="form.physicalSignsId" multiple placeholder="请选择">
<el-option
v-for="physicalSign in physicalSignsList"
:key="physicalSign.id"
:label="physicalSign.name"
:value="physicalSign.id"
>
</el-option>
</el-select>
<div><span>其他病史体征</span>
<el-input type="textarea"
placeholder="请输入病史体征"
v-model="form.otherPhysicalSigns"
maxlength="200"
show-word-limit
rows="2"
></el-input>
</div>
</el-form-item>
<p class="p_title_2">2湿气气血测试</p>
<el-form-item label="(1) 湿气测试(可多选)" prop="moistureDate" class="margin-left">
<el-checkbox-group v-model="form.moistureDate">
<el-checkbox v-for="moistureItem in moistureDataList" :label="moistureItem.dictValue" :key="moistureItem.dictValue">{{ moistureItem.dictLabel }}</el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item label="(2) 气血测试(可多选)" prop="bloodData" class="margin-left">
<el-checkbox-group v-model="form.bloodData">
<el-checkbox v-for="moistureItem in bloodDataList" :label="moistureItem.dictValue" :key="moistureItem.dictValue">{{ moistureItem.dictLabel }}</el-checkbox>
</el-checkbox-group>
</el-form-item>
<p class="p_title_2">3家族疾病史情况</p>
<el-form-item label="1家族疾病史直系亲属例如爸爸妈妈、爷爷奶奶、外公外婆有相关疾病可多选" prop="familyIllnessHistory" class="margin-left">
<el-checkbox-group v-model="form.familyIllnessHistory">
<el-checkbox v-for="(item, index) in healthyData['familyIllnessHistoryArray']" :key="index" :label="item.value" >{{item.name}}</el-checkbox>
@ -477,7 +510,7 @@
></el-input>
</div>
</el-form-item>
<p class="p_title_2">2手术情况</p>
<p class="p_title_2">4手术情况</p>
<el-form-item label="(1) 手术史,因病进行过手术治疗,手术的部分(可多选)" prop="familyIllnessHistory" class="margin-left">
<el-checkbox-group v-model="form.operationHistory">
<el-checkbox v-for="(item, index) in healthyData['operationHistoryArray']" :key="index" :label="item.value" >{{item.name}}</el-checkbox>
@ -508,7 +541,7 @@
></el-input>
</div>
</el-form-item>
<p class="p_title_2">3药物情况</p>
<p class="p_title_2">5药物情况</p>
<el-form-item label="(1) 是否长期服用药物连续服用6个月以上平均每日服用一次" prop="longEatDrugFlag" class="margin-left">
<el-radio-group v-model="form.longEatDrugFlag">
<el-radio :label="0" key="1"></el-radio>
@ -530,7 +563,7 @@
></el-input>
</div>
</el-form-item>
<p class="p_title_2">4过敏史</p>
<p class="p_title_2">6过敏史</p>
<el-form-item label="(1) 曾经是否出现过过敏" prop="allergyFlag" class="margin-left">
<el-radio-group v-model="form.allergyFlag">
<el-radio :label="0" key="1"></el-radio>
@ -585,8 +618,8 @@
:data="upload.data"
:auto-upload="false">
<el-button slot="trigger" size="small" type="primary">选取文件</el-button>
<el-button style="margin-left: 10px;" size="small" @click="upload.fileList = []">重置</el-button>
<div slot="tip" class="el-upload__tip">提示最多可上传三份且每份文件不超过5M</div>
<el-button style="margin-left: 10px;" size="small" ref="removeFile" @click="upload.fileList = []">移除文件</el-button>
<div slot="tip" class="el-upload__tip">提示最多可上传三份且每份文件不超过20M</div>
</el-upload>
</el-form-item>
</div>
@ -617,7 +650,7 @@
</section>
</template>
<script>
import { getDictData,addCustomerHealthy } from "@/api/custom/customerInvestigation";
import { getDictData,addCustomerHealthy,physicalSignsList } from "@/api/custom/customerInvestigation";
import * as healthyData from "@/utils/healthyData";
const logo = require("@/assets/logo/st_logo.png");
export default {
@ -634,6 +667,9 @@ export default {
logo,
submitFlag: false,
conditioningProjectIdOption:[],
physicalSignsList: [],
moistureDataList:[],
bloodDataList:[],
stepArray: [true,false,false,false,false,false,false,false,false],
stepActive: 0,
form: {
@ -716,6 +752,10 @@ export default {
stayupLateFlag: 0,
stayupLateWeekNum: 0,
physicalSignsId:[],
otherPhysicalSigns: null,
bloodData:[],
moistureDate:[],
familyIllnessHistory:[],
otherFamilyIllnessHistory:null,
operationHistory:[],
@ -730,7 +770,7 @@ export default {
allergen:[],
otherAllergen:null,
medicalReport:[],
medicalReportName:"",
medicalReportName:[],
position:0,
experience: null,
rebound: 0,
@ -753,7 +793,7 @@ export default {
//
limit: 3,
//
fileSize: 1024 * 1024 * 5,
fileSize: 1024 * 1024 * 20,
//
multiple: true
},
@ -805,29 +845,8 @@ export default {
],
position:[
{ required: true, trigger: "blur", message: "请选择地理位置" }
],
/*experience:[
{ required: true, trigger: "blur", message: "请描述您的减脂经历" }
],
difficulty:[
{ required: true, trigger: "blur", message: "请描述您减脂中遇到的困难" }
],
dishesIngredient:[
{ required: true, trigger: "blur", message: "请描述您忌口、过敏食物" }
]*/
/*fileList:[
{required: true, trigger: "blur", validator: checkReportFile}
]*/
},
//
arrayName:[
"condiment","cookingStyle","cookingStyleRate", "washVegetablesStyle","lunchType","dinner","dietFlavor",
"snacks","waterType","waterHabit","drinksNum","drinkWineClassify","drinkWineAmount","smokeRate",
"workType","defecationTime","aerobicMotionClassify","anaerobicMotionClassify","anaerobicAerobicMotionClassify",
"motionField","sleepQuality", "familyIllnessHistory", "operationHistory", "longEatDrugClassify", "allergen", "medicalReport"
]
]
}
};
},
methods: {
@ -844,7 +863,7 @@ export default {
this.submitFlag = true;
this.form.medicalReport = [];
if(this.upload.fileList.length > 0){
this.$refs.upload.submit();
this.$refs.upload.submit();removeFile
}else{
this.addCustomerHealthy();
}
@ -860,9 +879,9 @@ export default {
addCustomerHealthy(){
//
let cusMessage = Object.assign({}, this.form);
this.arrayName.forEach(function (item, index) {
this.healthyData['arrayName'].forEach(function (item, index) {
cusMessage[item] = cusMessage[item] != null ? cusMessage[item].join(",") : null;
})
});
addCustomerHealthy(cusMessage).then((response) => {
if (response.code === 200) {
this.$notify({
@ -875,8 +894,6 @@ export default {
this.upload.isUploading = false;
}
});
console.log(cusMessage.cookingStyleRate);
console.log(cusMessage.washVegetablesStyle);
},
nextStep(step){
this.$refs.form.validate((valid) => {
@ -937,8 +954,10 @@ export default {
},
//
handleFileSuccess(response, file, fileList) {
console.log(file.name);
if(response != null && response.code === 200){
this.form.medicalReport.push(response.fileName);
this.form.medicalReportName.push(file.name);
if(this.form.medicalReport.length === this.upload.fileList.length){
//
this.addCustomerHealthy();
@ -946,18 +965,39 @@ export default {
}else{
this.upload.isUploading = false;
this.submitFlag = false;
this.$message.error('文件上传失败');
this.$message.error('文件上传失败,请检查文件格式');
}
},
//
handleFileFail(err, file, fileList){
this.$message.error('文件上传失败');
this.$message.error('文件上传失败,请检查文件格式');
this.upload.isUploading = false;
this.submitFlag = false;
}
},
//湿
getMoistureDictData() {
getDictData("sys_blood_data").then((response) => {
this.moistureDataList = response.data;
});
},
//
getBloodDictData() {
getDictData("sys_moisture_data").then((response) => {
this.bloodDataList = response.data;
});
},
/** 查询体征列表 */
getPhysicalSignsList() {
physicalSignsList().then((response) => {
this.physicalSignsList = response.rows;
});
},
},
created() {
this.getDict("conditioning_project");
this.getPhysicalSignsList();
this.getMoistureDictData();
this.getBloodDictData();
},
beforeCreate() {
document.title = this.$route.meta.title;