客户健康信息修改

This commit is contained in:
xiezhijun
2021-02-02 20:29:53 +08:00
parent 851802861f
commit b89225bc6a
21 changed files with 1959 additions and 857 deletions

View File

@ -85,7 +85,7 @@ public class SysCustomerHealthyController extends BaseController
@PostMapping
public AjaxResult add(@RequestBody SysCustomerHealthy sysCustomerHealthy)
{
return AjaxResult.success();
return sysCustomerHealthyService.insertSysCustomerHealthy(sysCustomerHealthy);
}
/**
@ -96,7 +96,7 @@ public class SysCustomerHealthyController extends BaseController
@PutMapping
public AjaxResult edit(@RequestBody SysCustomerHealthy sysCustomerHealthy)
{
return AjaxResult.success();
return toAjax(sysCustomerHealthyService.updateSysCustomerHealthy(sysCustomerHealthy));
}
/**

View File

@ -30,14 +30,6 @@ public interface ISysCustomerHealthyService
*/
public List<SysCustomerHealthy> selectSysCustomerHealthyList(SysCustomerHealthy sysCustomerHealthy);
/**
* 新增或修改客户健康(已弃用)
*
* @param sysCustomerHealthy 客户健康
* @return 结果
*/
public AjaxResult insertOrUpdateSysCustomerHealthy(SysCustomerHealthy sysCustomerHealthy);
/**
* 新增客户健康
*
@ -46,6 +38,13 @@ public interface ISysCustomerHealthyService
*/
public AjaxResult insertSysCustomerHealthy(SysCustomerHealthy sysCustomerHealthy);
/**
* 编辑客户健康
* @param sysCustomerHealthy
* @return
*/
public int updateSysCustomerHealthy(SysCustomerHealthy sysCustomerHealthy);
/**
* 批量删除客户健康
*

View File

@ -54,72 +54,6 @@ public class SysCustomerHealthyServiceImpl implements ISysCustomerHealthyService
return sysCustomerHealthyMapper.selectSysCustomerHealthyList(sysCustomerHealthy);
}
/**
* 新增客户健康(已弃用)
*
* @param sysCustomerHealthy 客户健康
* @return 结果
*/
@Override
public AjaxResult insertOrUpdateSysCustomerHealthy(SysCustomerHealthy sysCustomerHealthy)
{
//当前登录用户
//LoginUser loginUser = SecurityUtils.getLoginUser();
Long cutomerId = 0L;
//新增
if(sysCustomerHealthy.getId() == null){
//根据手机号查询客户健康信息,判断是否已存在
SysCustomerHealthy customerHealthy = selectSysCustomerHealthyByPhone(sysCustomerHealthy.getPhone());
if(customerHealthy != null){
return AjaxResult.error("该手机号已存在");
}
//根据手机号查询客户基础信息,判断是否已存在
SysCustomer phoneCustomer = sysCustomerService.getCustomerByPhone(sysCustomerHealthy.getPhone());
if(phoneCustomer != null){
if(!sysCustomerHealthy.getName().equals(phoneCustomer.getName())){
return AjaxResult.error("该手机号与姓名不符");
}
cutomerId = phoneCustomer.getId();
}else{
SysCustomer newSysCustomer = new SysCustomer();
newSysCustomer.setName(sysCustomerHealthy.getName());
newSysCustomer.setPhone(sysCustomerHealthy.getPhone());
if(sysCustomerService.insertSysCustomer(newSysCustomer) > 0){
cutomerId = newSysCustomer.getId();
}
}
}
//更新
else{
SysCustomer oldCustomer = sysCustomerService.selectSysCustomerById(sysCustomerHealthy.getCustomerId());
//如果修改了手机号,则需要判断手机号是否已经存在
if(oldCustomer != null && !oldCustomer.getPhone().equals(sysCustomerHealthy.getPhone())) {
//验证该手机号是否已存在客户健康信息
SysCustomerHealthy customerHealthy = selectSysCustomerHealthyByPhone(sysCustomerHealthy.getPhone());
if (customerHealthy != null) {
return AjaxResult.error("该手机号已存在");
}
//根据手机号查询客户基础信息,判断是否已存在
SysCustomer phoneCustomer = sysCustomerService.getCustomerByPhone(sysCustomerHealthy.getPhone());
if(phoneCustomer != null) {
return AjaxResult.error("该手机号已存在");
}
}
SysCustomer newSysCustomer = new SysCustomer();
newSysCustomer.setId(sysCustomerHealthy.getCustomerId());
newSysCustomer.setName(sysCustomerHealthy.getName());
newSysCustomer.setPhone(sysCustomerHealthy.getPhone());
if(sysCustomerService.updateSysCustomer(newSysCustomer) > 0){
cutomerId = newSysCustomer.getId();
}
}
int rows = 0;
if(cutomerId != null && cutomerId > 0){
sysCustomerHealthy.setCustomerId(cutomerId);
rows = sysCustomerHealthy.getId() == null ? sysCustomerHealthyMapper.insertSysCustomerHealthy(sysCustomerHealthy) : sysCustomerHealthyMapper.updateSysCustomerHealthy(sysCustomerHealthy);
}
return rows > 0 ? AjaxResult.success() : AjaxResult.error();
}
/**
* 新增客户健康
@ -130,7 +64,7 @@ public class SysCustomerHealthyServiceImpl implements ISysCustomerHealthyService
public AjaxResult insertSysCustomerHealthy(SysCustomerHealthy sysCustomerHealthy){
//客户ID解密
String customerId = StringUtils.isNotEmpty(sysCustomerHealthy.getCustomerEncId()) ? AesUtils.decrypt(sysCustomerHealthy.getCustomerEncId(), null) : "";
if(StringUtils.isEmpty(customerId)){
if(sysCustomerHealthy.getCustomerId() == null && StringUtils.isEmpty(customerId)){
return AjaxResult.error("客户不存在");
}
//判断客户是否存在
@ -149,6 +83,16 @@ public class SysCustomerHealthyServiceImpl implements ISysCustomerHealthyService
return rows > 0 ? AjaxResult.success() : AjaxResult.error();
}
/**
* 编辑客户健康
* @param sysCustomerHealthy
* @return
*/
@Override
public int updateSysCustomerHealthy(SysCustomerHealthy sysCustomerHealthy){
return sysCustomerHealthyMapper.updateSysCustomerHealthy(sysCustomerHealthy);
}
/**
* 批量删除客户健康
*

View File

@ -153,7 +153,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.customer_id = #{customerId}
where sch.del_flag = 0 and sc.del_flag = 0 and sch.customer_id = #{customerId} order by sch.id desc limit 1
</select>
<insert id="insertSysCustomerHealthy" parameterType="SysCustomerHealthy">

View File

@ -69,7 +69,9 @@
<!-- 根据客户ID查询用户体征 -->
<select id="selectSysCustomerPhysicalSignsByCusId" parameterType="Long" resultMap="SysCustomerSignResult">
<include refid="selectSysCustomerPhysicalSigns"/> where scps.del_flag = 0 and sc.del_flag = 0 and scps.customer_id = #{id}
<include refid="selectSysCustomerPhysicalSigns"/>
where scps.del_flag = 0 and sc.del_flag = 0 and scps.customer_id = #{id}
order by scps.id desc limit 1
</select>
<insert id="insertSysCustomerPhysicalSigns" parameterType="SysCustomerPhysicalSigns" useGeneratedKeys="true" keyProperty="id">

View File

@ -327,9 +327,9 @@
<if test="userId != null">
and (su_sale.user_id = #{userId} or su_nutritionist.user_id = #{userId})
</if>
<if test="beginTime != null and beginTime != ''">
<!--<if test="beginTime != null and beginTime != ''">
AND o.order_time &gt;= #{beginTime}
</if>
</if>-->
<if test="endTime != null and endTime != ''">
AND DATE_FORMAT(o.order_time,'%Y-%m-%d') &lt;= #{endTime}
</if>

View File

@ -0,0 +1,185 @@
<template>
<div>
<p class="p_title_1">{{healthyData['titleArray'][8]}}</p>
<p class="p_title_2">1体检报告</p>
<el-form-item label="(1) 请上传相应的体检报告" prop="fileList" class="margin-left">
<div>
<div v-for="(item, index) in form.medicalReport">
<span style="margin-right: 10px;">{{getReportName(index)}}</span>
<el-button style="margin-left: 10px;" type="danger" size="small" @click="removeOldFile(index)">移除文件</el-button>
</div>
<div>
<el-upload style="margin-top: 15px;"
class="upload-demo"
ref="upload"
:action="upload.url"
:limit="upload.limit"
:file-list="upload.fileList"
:multiple="upload.multiple"
:before-remove="beforeRemove"
:on-change="handleFileChange"
:on-exceed="handleFileexceed"
:on-success="handleFileSuccess"
:on-error="handleFileFail">
<el-button slot="trigger" size="small" type="primary">新增文件</el-button>
<el-button style="margin-left: 10px;" size="small" @click="removeFileList()">移除文件</el-button>
<div slot="tip" class="el-upload__tip">1已存在{{form.medicalReport.length}}还可以上传{{upload.limit}}且每份文件不超过20M
<br>2仅支持bmpgif, jpg, jpeg, png, doc, docx, xls, xlsx, ppt, pptx, html, htm, txt, rar, zip, gz, bz2, pdf格式文件
</div>
</el-upload>
</div>
</div>
</el-form-item>
</div>
</template>
<script>
import * as healthyData from "@/utils/healthyData";
import AutoHideMessage from "@/components/AutoHideMessage";
export default {
name: "EditHealthyFile",
components: {
},
data() {
return {
healthyData:healthyData,
upload: {
// 上传的地址
url: process.env.VUE_APP_BASE_API + "/common/customerUploadFile",
//文件列表
fileList:[],
//同时上传文件上限
limit: 3 - this.form.medicalReport.length,
//每个文件大小
fileSize: 1024 * 1024 * 20,
//是否支持同时选择多张
multiple: true,
//新增的文件路径
medicalReport:[],
//新增的文件名称
medicalReportName:[]
},
};
},
methods: {
removeOldFile(index){
this.form.medicalReport = this.form.medicalReport.splice(index,index);
this.form.medicalReportName = this.form.medicalReportName.splice(index,index);
this.upload.limit = 3 - this.form.medicalReport.length;
},
getReportName(index){
if(this.form.medicalReportName && this.form.medicalReportName.length > index){
return this.form.medicalReportName[index];
}
return "体检报告("+ (index+1) + "";
},
//更新form对象中的文件路径、名称
addUploadNewFile(){
this.form.medicalReport = this.form.medicalReport.concat(this.upload.medicalReport);
this.form.medicalReportName = this.form.medicalReportName.concat(this.upload.medicalReportName);
},
removeFileList(){
this.upload.fileList = [];
this.upload.medicalReport = [];
this.upload.medicalReportName = [];
},
//监控上传文件列表
handleFileChange(file, fileList) {
let sizeFlag = file.size > this.upload.fileSize;
if (sizeFlag) {
this.$message({
message: "当前文件过大",
type: "warning",
});
fileList.pop();
}
this.upload.fileList = fileList;
},
beforeRemove(file, fileList) {
return false;
},
// 文件数量超过限度
handleFileexceed(file, fileList){
//console.log(this.upload.fileList.length);
this.$message({
message: "最多可上传"+ this.upload.limit +"份文件",
type: "warning",
});
},
// 文件上传成功处理
handleFileSuccess(response, file, fileList) {
if(response != null && response.code === 200){
this.upload.medicalReport.push(response.fileName);
this.upload.medicalReportName.push(file.name);
}else{
this.upload.fileList = fileList.pop();
this.$message.error('文件上传失败,请检查文件格式');
}
},
// 文件上传失败处理
handleFileFail(err, file, fileList){
this.$message.error('文件上传失败,请检查文件格式');
this.upload.fileList = fileList.pop();
}
},
props: {
form: {
type: Object,
default: null
}
},
created() {
},
};
</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>

View File

@ -0,0 +1,131 @@
<template>
<div>
<p class="p_title_1" style="margin-top: 10px;">{{healthyData['titleArray'][0]}}</p>
<p style="font-size: 15px; margin-bottom: 12px;margin-top: 10px;">请您确认下方姓名手机号是否正确</p>
<el-form-item label="真实姓名" prop="name">
<el-input v-model="form.name" :readonly="true" placeholder="请输入真实姓名" maxlength="20"/>
</el-form-item>
<el-form-item label="手机号" prop="phone" >
<el-input :readonly="true" v-model="form.phone" placeholder="请输入手机号" />
</el-form-item>
<el-form-item label="性别" prop="sex">
<el-radio-group v-model="form.sex" size="small" >
<el-radio :label="parseInt('0')" border></el-radio>
<el-radio :label="parseInt('1')" border></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="年龄" prop="age" >
<el-input type="number" v-model="form.age" placeholder="请输入年龄" autocomplete="off" ></el-input>
</el-form-item>
<el-form-item label="身高(厘米)" prop="tall" >
<el-input type="number" v-model="form.tall" placeholder="请输入身高" autocomplete="off" ></el-input>
</el-form-item>
<el-form-item label="体重(斤)" prop="weight" >
<el-input type="number" v-model="form.weight" placeholder="请输入体重" autocomplete="off" ></el-input>
</el-form-item>
<el-form-item label="调理项目" prop="conditioningProjectId">
<el-select v-model="form.conditioningProjectId" filterable clearable placeholder="请选择">
<el-option
v-for="dict in conditioningProjectIdOption"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="parseInt(dict.dictValue)"
/>
</el-select>
</el-form-item>
<el-form-item label="南方人还是北方人" prop="position">
<el-radio-group v-model="form.position" style="margin-left: 10px;">
<el-radio :label="0" key="1">南方</el-radio>
<el-radio :label="1" key="2">北方</el-radio>
</el-radio-group>
</el-form-item>
</div>
</template>
<script>
import * as healthyData from "@/utils/healthyData";
import { getDictData } from "@/api/custom/customerInvestigation";
export default {
name: "Form1",
components: {
},
data() {
return {
healthyData:healthyData,
conditioningProjectIdOption:[]
};
},
methods: {
getDict(type){
if(this.flag == 0){
getDictData(type).then(response => {
this.conditioningProjectIdOption = response.data;
});
}else{
this.getDicts(type).then(response => {
this.conditioningProjectIdOption = response.data;
});
}
},
},
props: {
form: {
type: Object,
default: null
},
//是否已登录1已登录 0未登录需要调不同的方法获取数据避免403错误
flag:{
type: Number,
default: 0
}
},
created() {
this.getDict("conditioning_project");
},
};
</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>

View File

@ -0,0 +1,110 @@
<template>
<div>
<p class="p_title_1">{{healthyData['titleArray'][1]}}</p>
<p class="p_title_2">1减脂经历</p>
<el-form-item label="(1) 用过哪些减脂方法(重点)" prop="experience" class="margin-left">
<el-input
type="textarea"
placeholder="请描述减脂方法"
v-model="form.experience"
maxlength="200"
show-word-limit
rows="3"
></el-input>
</el-form-item>
<el-form-item label="(2) 减脂中遇到的困难(重点)" prop="difficulty" class="margin-left">
<el-input
type="textarea"
placeholder="请描述减脂中遇到的困难"
v-model="form.difficulty"
maxlength="200"
show-word-limit
rows="3"
></el-input>
</el-form-item>
<el-form-item label="(3) 减脂过程中是否反弹" prop="rebound" class="margin-left">
<el-radio-group v-model="form.rebound" style="margin-left: 10px;">
<el-radio :label="0" key="1"></el-radio>
<el-radio :label="1" key="2"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="(4) 是否意识到生活习惯是减脂关键" prop="crux" class="margin-left">
<el-radio-group v-model="form.crux" style="margin-left: 10px;">
<el-radio :label="0" key="1"></el-radio>
<el-radio :label="1" key="2"></el-radio>
</el-radio-group>
</el-form-item>
</div>
</template>
<script>
import * as healthyData from "@/utils/healthyData";
export default {
name: "Form2",
components: {
},
data() {
return {
healthyData:healthyData
};
},
methods: {
},
props: {
form: {
type: Object,
default: null
}
},
created() {
},
};
</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>

View File

@ -0,0 +1,111 @@
<template>
<div>
<p class="p_title_1">{{healthyData['titleArray'][2]}}</p>
<p class="p_title_2">1家庭调味品</p>
<el-form-item :label="'(1) 调味品种类'" prop="condiment" class="margin-left">
<el-checkbox-group v-model="form.condiment">
<el-checkbox v-for="(item, index) in healthyData['condimentArray']" :label="item.value" :key="index">{{item.name}}</el-checkbox>
</el-checkbox-group>
<div><span>其他调味品 </span><el-input style="margin-top: 10px;width:70%" v-model="form.otherCondiment" placeholder="请输入其他调味品名称" /></div>
</el-form-item>
<p class="p_title_2">2喜好的烹调方式和周频次</p>
<el-form-item :label="'(1) 喜好的烹调方式'" prop="cookingStyle" class="margin-left">
<el-checkbox-group v-model="form.cookingStyle">
<el-checkbox v-for="(item,index) in healthyData['cookingStyleArray']" :label="item.value" :key="index">{{item.name}}</el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item :label="'(2) 烹调方式的频次(每周)'" prop="cookingStyleRate" class="margin-left">
<div>
<span>{{healthyData['cookingStyleRateArray'][0]}}&nbsp;</span><el-input-number style="width:35%" v-model="form.cookingStyleRate[0]" :step="1" :min="0"></el-input-number><span>&nbsp;</span>
<span style="margin-left: 20px;">{{healthyData['cookingStyleRateArray'][1]}}&nbsp;</span><el-input-number style="width:35%" v-model="form.cookingStyleRate[1]" :step="1" :min="0" ></el-input-number><span>&nbsp;</span>
</div>
<div style="margin-top: 5px;">
<span>{{healthyData['cookingStyleRateArray'][2]}}&nbsp;</span><el-input-number style="width:35%" v-model="form.cookingStyleRate[2]" :step="1" :min="0" ></el-input-number><span>&nbsp;</span>
<span style="margin-left: 20px;">{{healthyData['cookingStyleRateArray'][3]}}&nbsp;</span><el-input-number style="width:35%" v-model="form.cookingStyleRate[3]" :step="1" :min="0" ></el-input-number><span>&nbsp;</span>
</div>
<div style="margin-top: 5px;">
<span>{{healthyData['cookingStyleRateArray'][4]}}&nbsp;</span><el-input-number style="width:35%" v-model="form.cookingStyleRate[4]" :step="1" :min="0" ></el-input-number><span>&nbsp;</span>
<span style="margin-left: 20px;">{{healthyData['cookingStyleRateArray'][5]}}&nbsp;</span><el-input-number style="width:35%;" v-model="form.cookingStyleRate[5]" :step="1" :min="0" ></el-input-number><span>&nbsp;</span>
</div>
</el-form-item>
<p class="p_title_2">3洗菜方式</p>
<el-form-item :label="'(1) 洗菜方式'" prop="washVegetablesStyle" class="margin-left">
<el-checkbox-group v-model="form.washVegetablesStyle">
<el-checkbox v-for="(item,index) in healthyData['washVegetablesStyleArray']" :label="item.value" :key="index">{{item.name}}</el-checkbox>
</el-checkbox-group>
<div><span>其他洗菜方式 </span><el-input style="margin-top: 10px;width:70%" v-model="form.otherWashVegetablesStyle" placeholder="请输入其他洗菜方式" /></div>
</el-form-item>
</div>
</template>
<script>
import * as healthyData from "@/utils/healthyData";
export default {
name: "Form3",
components: {
},
data() {
return {
healthyData:healthyData
};
},
methods: {
},
props: {
form: {
type: Object,
default: null
}
},
created() {
},
};
</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>

View File

@ -0,0 +1,197 @@
<template>
<div>
<p class="p_title_1">{{healthyData['titleArray'][3]}}</p>
<p class="p_title_2">1您三餐的习惯</p>
<el-form-item :label="'(1) 早餐习惯'" prop="breakfast" class="margin-left">
<el-radio-group v-model="form.breakfastType">
<el-radio v-for="(item,index) in healthyData['breakfastTypeArray']" :label="item.value" :key="index">{{item.name}}</el-radio>
</el-radio-group>
<div style="margin-top:8px;"><span>早餐通常吃&nbsp;</span><el-input v-model="form.breakfastFood" style="width:70%" placeholder="请输入早餐名称" /></div>
</el-form-item>
<el-form-item :label="'(2) 午餐习惯'" prop="lunchType" class="margin-left">
<el-checkbox-group v-model="form.lunchType">
<el-checkbox v-for="(item,index) in healthyData['lunchTypeArray']" :label="item.value" :key="index">{{item.name}}</el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item :label="'(3) 晚餐习惯'" prop="dinner" class="margin-left">
<el-checkbox-group v-model="form.dinner">
<el-checkbox v-for="(item,index) in healthyData['dinnerArray']" :label="item.value" :key="index">{{item.name}}</el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item :label="'(4) 正餐荤素中素菜占比几成'" prop="eatSituation" class="margin-left">
<el-input-number v-model="form.vegetableRate" :step="1" :min="0" :max="10"></el-input-number>
</el-form-item>
<el-form-item :label="'(4) 最常吃的肉类'" prop="eatSituation" class="margin-left">
<el-input v-model="form.commonMeat" placeholder="请输入肉类名称"></el-input>
</el-form-item>
<p class="p_title_2">2您晚餐时间点和夜宵习惯</p>
<el-form-item :label="'(1) 晚餐时间点'" prop="dinnerTime" class="margin-left">
<el-time-select v-model="form.dinnerTime" :picker-options="{ start: '17:00', step: '00:30', end: '24:00' }" placeholder="请选择时间" :editable="false"/>
</el-form-item>
<el-form-item :label="'(2) 您每周吃几次夜宵'" prop="supperNum" class="margin-left">
<el-input-number v-model="form.supperNum" :step="1" :min="0"></el-input-number>
</el-form-item>
<el-form-item :label="'(3) 您夜宵通常吃的食物'" prop="supperFood" class="margin-left">
<el-input style="width:100%" v-model="form.supperFood" placeholder="请输入食物名称"></el-input>
</el-form-item>
<p class="p_title_2">3您的饮食偏好</p>
<el-form-item :label="'(1) 冷热偏好'" prop="dietHotAndCold" class="margin-left">
<el-radio-group v-model="form.dietHotAndCold">
<el-radio v-for="(item,index) in healthyData['dietHotAndColdArray']" :label="item.value" :key="index">{{item.name}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item :label="'(2) 口味偏好'" prop="dietFlavor" class="margin-left">
<el-checkbox-group v-model="form.dietFlavor">
<el-checkbox v-for="(item,index) in healthyData['dietFlavorArray']" :label="item.value" :key="index">{{item.name}}</el-checkbox>
</el-checkbox-group>
</el-form-item>
<p class="p_title_2">4生食果蔬状况</p>
<el-form-item :label="'(1) 平均每周吃生/拌菜几次'" prop="vegetablesNum" class="margin-left">
<el-input-number v-model="form.vegetablesNum" :step="1" :min="0"></el-input-number>
</el-form-item>
<el-form-item :label="'(2) 每周吃生/拌菜的频次'" prop="vegetablesRateType" class="margin-left">
<el-radio-group v-model="form.vegetablesRateType">
<el-radio v-for="(item,index) in healthyData['vegetablesRateTypeArray']" :label="item.value" :key="index">{{item.name}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item :label="'(3) 平均每天吃水果几次以及时间'" prop="fruitsNum" class="margin-left">
<el-input-number v-model="form.fruitsNum" :step="1" :min="0"></el-input-number>
<el-radio-group v-model="form.fruitsTime" style="margin-top: 15px;">
<el-radio v-for="(item,index) in healthyData['fruitsTimeArray']" :label="item.value" :key="index">{{item.name}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="(4) 平时吃水果的频次" prop="fruitsRate" class="margin-left">
<el-radio-group v-model="form.fruitsRate">
<el-radio v-for="(item,index) in healthyData['fruitsRateArray']" :label="item.value" :key="index">{{item.name}}</el-radio>
</el-radio-group>
</el-form-item>
<p class="p_title_2">5饮食习惯</p>
<el-form-item label="(1) 一餐吃几碗饭,几成饱" prop="riceNum" class="margin-left">
<div>
<el-input-number style="width:35%" v-model="form.riceNum" :step="1" :min="0"></el-input-number><span>&nbsp;碗饭</span>
<el-input-number style="width:35%;margin-left: 20px;" v-model="form.riceFull" :step="1" :min="0" ></el-input-number><span>&nbsp;成饱</span>
</div>
</el-form-item>
<el-form-item label="(2) 吃饭速度" prop="eatingSpeed" class="margin-left">
<el-radio-group v-model="form.eatingSpeed">
<el-radio v-for="(item,index) in healthyData['eatingSpeedArray']" :label="item.value" :key="index">{{item.name}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="(3) 饮食特点" prop="makeFoodType" class="margin-left">
<el-select v-model="form.makeFoodType" placeholder="请选择">
<el-option
v-for="item in healthyData['makeFoodTypeArray']"
:key="item.value"
:label="item.name"
:value="parseInt(item.value)"
/>
</el-select>
</el-form-item>
<p class="p_title_2">6您常吃的零食</p>
<el-form-item label="(1) 常吃的零食" prop="snacks" class="margin-left">
<el-checkbox-group v-model="form.snacks">
<el-checkbox v-for="(item,index) in healthyData['snacksArray']" :label="item.value" :key="index">{{item.name}}</el-checkbox>
</el-checkbox-group>
<div><span>其他零食 </span><el-input style="margin-top: 10px;width:70%" v-model="form.otherSnacks" placeholder="请输入其他零食名称" /></div>
</el-form-item>
<p class="p_title_2">7服用营养保健品状况</p>
<el-form-item label="(1) 有无服用营养保健" prop="healthProductsFlag" class="margin-left">
<el-radio-group v-model="form.healthProductsFlag">
<el-radio :label="0" key="1"></el-radio>
<el-radio :label="1" key="2"></el-radio>
</el-radio-group>
<div><span>营养保健品牌名 </span><el-input style="margin-top: 10px;" v-model="form.healthProductsBrand" placeholder="请输入营养保健品牌名" /></div>
<div><span>营养保健产品名 </span><el-input style="margin-top: 10px;" v-model="form.healthProductsName" placeholder="请输入营养保健产品名" /></div>
</el-form-item>
<el-form-item label="(2) 服用营养保健频率" prop="healthProductsRate" class="margin-left">
<div>
<el-input-number style="width:35%" v-model="form.healthProductsWeekRate" :step="1" ::min="0"></el-input-number><span>&nbsp;/</span>
<el-input-number style="width:35%;margin-left: 20px;" v-model="form.healthProductsDayRate" :step="1" ::min="0" ></el-input-number><span>&nbsp;/</span>
</div>
</el-form-item>
<p class="p_title_2">8忌口或过敏食物</p>
<el-form-item label="(1) 忌口或过敏、不爱吃的食物(重点)" prop="dishesIngredient" class="margin-left">
<el-input
type="textarea"
placeholder="请描述忌口或过敏、不爱吃的食物"
v-model="form.dishesIngredient"
maxlength="200"
show-word-limit
rows="3"
></el-input>
</el-form-item>
</div>
</template>
<script>
import * as healthyData from "@/utils/healthyData";
export default {
name: "Form4",
components: {
},
data() {
return {
healthyData:healthyData
};
},
methods: {
},
props: {
form: {
type: Object,
default: null
}
},
created() {
},
};
</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>

View File

@ -0,0 +1,206 @@
<template>
<div>
<p class="p_title_1">{{healthyData['titleArray'][4]}}</p>
<p class="p_title_2">1您每天的饮水习惯</p>
<el-form-item label="(1) 每天饮水量(毫升)" prop="waterNum" class="margin-left">
<el-input-number v-model="form.waterNum" :step="50" :min="0"></el-input-number>
</el-form-item>
<el-form-item label="(2) 喜欢喝什么水" prop="waterType" class="margin-left">
<el-checkbox-group v-model="form.waterType">
<el-checkbox v-for="(item,index) in healthyData['waterTypeArray']" :label="item.value" :key="index">{{item.name}}</el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item label="(3) 喝水习惯" prop="waterHabit" class="margin-left">
<el-checkbox-group v-model="form.waterHabit">
<el-checkbox v-for="(item,index) in healthyData['waterHabitArray']" :label="item.value" :key="index">{{item.name}}</el-checkbox>
</el-checkbox-group>
</el-form-item>
<p class="p_title_2">2您常喝的饮品和每周频次</p>
<el-form-item label="(1) 每周常喝的饮品次数" prop="drinksNum" class="margin-left">
<div>
<span>{{healthyData['drinksNumArray'][0]}}&nbsp;</span><el-input-number type="number" style="width:35%;margin-left: 13px;" v-model="form.drinksNum[0]" :step="1" :min="0"></el-input-number><span>&nbsp;</span>
</div>
<div class="margin-top-10">
<span>{{healthyData['drinksNumArray'][1]}}&nbsp;</span><el-input-number style="width:35%;margin-left: 25px;" v-model="form.drinksNum[1]" :step="1" :min="0"></el-input-number><span>&nbsp;</span>
</div>
<div class="margin-top-10">
<span>{{healthyData['drinksNumArray'][2]}}&nbsp;</span><el-input-number type="number" style="width:35%;margin-left: 25px;" v-model="form.drinksNum[2]" :step="1" :min="0"></el-input-number><span>&nbsp;</span>
</div>
<div class="margin-top-10">
<span>{{healthyData['drinksNumArray'][3]}}&nbsp;</span><el-input-number type="number" style="width:35%;margin-left: 25px;" v-model="form.drinksNum[3]" :step="1" :min="0"></el-input-number><span>&nbsp;</span>
</div>
<div class="margin-top-10">
<span>{{healthyData['drinksNumArray'][4]}}&nbsp;</span><el-input-number type="number" style="width:35%;margin-left: 25px;" v-model="form.drinksNum[4]" :step="1" :min="0"></el-input-number><span>&nbsp;</span>
</div>
<div class="margin-top-10">
<span>{{healthyData['drinksNumArray'][5]}}&nbsp;</span><el-input-number type="number" style="width:35%;" v-model="form.drinksNum[5]" :step="1" :min="0"></el-input-number><span>&nbsp;</span>
</div>
<div class="margin-top-10">
<span>{{healthyData['drinksNumArray'][6]}}&nbsp;</span><el-input-number type="number" style="width:35%;margin-left: 13px;" v-model="form.drinksNum[6]" :step="1" :min="0"></el-input-number><span>&nbsp;</span>
</div>
<div class="margin-top-10">
<span>{{healthyData['drinksNumArray'][7]}}&nbsp;</span><el-input-number type="number" style="width:35%;" v-model="form.drinksNum[7]" :step="1" :min="0"></el-input-number><span>&nbsp;</span>
</div>
</el-form-item>
<p class="p_title_2">3您的饮酒习惯</p>
<el-form-item label="(1) 是否喝酒" prop="drinkWineFlag" class="margin-left">
<el-radio-group v-model="form.drinkWineFlag">
<el-radio v-for="(item,index) in healthyData['drinkWineFlagArray']" :label="item.value" :key="index">{{item.name}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="(2) 通常喝什么酒" prop="drinkWineClassify" class="margin-left">
<el-checkbox-group v-model="form.drinkWineClassify">
<el-checkbox v-for="(item,index) in healthyData['drinkWineClassifyArray']" :label="item.value" :key="index">{{item.name}}</el-checkbox>
</el-checkbox-group>
<div><span>其他酒 </span><el-input style="margin-top: 10px;width:70%" v-model="form.otherWineClassify" placeholder="请输入其他酒名称" /></div>
</el-form-item>
<el-form-item label="(3) 通常喝多少" prop="drinkWineAmount" class="margin-left">
<div>
<span>{{healthyData['drinkWineAmountArray'][0]}}</span><el-input-number class="width-50-left-8-right-5" type="number" v-model="form.drinkWineAmount[0]" :step="1" :min="0"></el-input-number><span>&nbsp;</span>
</div>
<div class="margin-top-10">
<span>{{healthyData['drinkWineAmountArray'][1]}}</span><el-input-number class="width-50-left-8-right-5" type="number" v-model="form.drinkWineAmount[1]" :step="1" :min="0"></el-input-number><span>&nbsp;</span>
</div>
<div class="margin-top-10">
<span>{{healthyData['drinkWineAmountArray'][2]}}</span><el-input-number class="width-50-left-8-right-5" type="number" v-model="form.drinkWineAmount[2]" :step="100" :min="0"></el-input-number><span>&nbsp;毫升</span>
</div>
<!--<div class="margin-top-10">
<span>其他</span><el-input-number class="width-50-left-8-right-5" type="number" v-model="form.drinkWineAmount[3]" :step="100" :min="0"></el-input-number><span>&nbsp;毫升</span>
</div>-->
</el-form-item>
<p class="p_title_2">4您的吸烟习惯</p>
<el-form-item label="(1) 是否吸烟" prop="smokeFlag" class="margin-left">
<el-radio-group v-model="form.smokeFlag">
<el-radio :label="0" key="1"></el-radio>
<el-radio :label="1" key="2"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="(2) 吸烟频次以及烟龄" prop="smokeRate" class="margin-left">
<div>
<span>{{healthyData['smokeRateArray'][0]}}</span><el-input-number type="number" class="width-50-left-8-right-5" v-model="form.smokeRate[0]" :step="1" :min="0"></el-input-number><span></span>
</div>
<div class="margin-top-10">
<span>{{healthyData['smokeRateArray'][1]}}</span><el-input-number type="number" class="width-50-left-8-right-5" v-model="form.smokeRate[1]" :step="1" :min="0"></el-input-number><span></span>
</div>
<div class="margin-top-10">
<span>{{healthyData['smokeRateArray'][2]}}</span><el-input-number type="number" class="width-50-left-8-right-5" v-model="form.smokeRate[2]" :step="1" :min="0"></el-input-number><span></span>
</div>
</el-form-item>
<el-form-item label="(3) 是否常吸二手烟" prop="secondSmoke" class="margin-left">
<el-radio-group v-model="form.secondSmoke">
<el-radio :label="0" key="1"></el-radio>
<el-radio :label="1" key="2"></el-radio>
</el-radio-group>
</el-form-item>
<p class="p_title_2">4您的工作状态</p>
<el-form-item label="(1) 工作行业" prop="workIndustry" style="padding-top: 10px;">
<el-input v-model="form.workIndustry" placeholder="请输入工作行业" />
</el-form-item>
<el-form-item label="(2) 工作性质" prop="workType" style="padding-top: 10px;">
<el-checkbox-group v-model="form.workType">
<el-checkbox v-for="(item,index) in healthyData['workTypeArray']" :label="item.value" :key="index">{{item.name}}</el-checkbox>
</el-checkbox-group>
</el-form-item>
<p class="p_title_2">4您的排便状况</p>
<el-form-item label="(1) 排便次数" prop="defecationNum" style="padding-top: 10px;">
<!--<el-radio-group v-model="form.defecationNum">
<el-radio :label="1" key="1">1/</el-radio>
<el-radio :label="2" key="2">2/</el-radio>
<el-radio :label="3" key="3">3/</el-radio>
</el-radio-group>-->
<div class="margin-top-10"><span>排便次数 </span><el-input-number style="width:35%;margin-right: 10px;" type="number" v-model="form.defecationNum" :step="1" :min="0"></el-input-number><span>/</span></div>
</el-form-item>
<el-form-item label="(2) 排便时间" prop="defecationTime" style="padding-top: 10px;">
<el-checkbox-group v-model="form.defecationTime">
<el-checkbox v-for="(item,index) in healthyData['defecationTimeArray']" :label="item.value" :key="index">{{item.name}}</el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item label="(2) 排便情况" prop="defecationSituation" style="padding-top: 10px;">
<div>
<span>形状</span><el-input class="width-70-left-8-right-5" v-model="form.defecationShape" placeholder="请输入形状" />
</div>
<div class="margin-top-10">
<span>气味</span><el-input class="width-70-left-8-right-5" v-model="form.defecationSmell" placeholder="请输入气味" />
</div>
<div class="margin-top-10">
<span>速度</span><el-input class="width-70-left-8-right-5" v-model="form.defecationSpeed" placeholder="请输入速度" />
</div>
<div class="margin-top-10">
<span>颜色</span><el-input class="width-70-left-8-right-5" v-model="form.defecationColor" placeholder="请输入颜色" />
</div>
</el-form-item>
</div>
</template>
<script>
import * as healthyData from "@/utils/healthyData";
export default {
name: "Form5",
components: {
},
data() {
return {
healthyData:healthyData
};
},
methods: {
},
props: {
form: {
type: Object,
default: null
}
},
created() {
},
};
</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>

View File

@ -0,0 +1,121 @@
<template>
<div>
<p class="p_title_1">{{healthyData['titleArray'][5]}}</p>
<p class="p_title_2">1运动频率</p>
<el-form-item label="(1) 每周运动情况" prop="motionSituation" class="margin-left">
<div>
<span>每周运动次数</span><el-input-number type="number" class="width-50-left-8-right-5" v-model="form.motionNum" :step="1" :min="0"></el-input-number><span></span>
</div>
<div class="margin-top-10">
<span>每次运动时长</span><el-input-number type="number" class="width-50-left-8-right-5" v-model="form.motionDuration" :step="1" :min="0"></el-input-number><span>分钟</span>
</div>
<div class="margin-top-10">
<span>每天运动时间</span><el-time-select class="width-50-left-8-right-5" v-model="form.motionTime" :picker-options="{ start: '00:00', step: '01:00', end: '24:00' }" placeholder="请选择时间" :editable="false"/><span></span>
</div>
</el-form-item>
<p class="p_title_2">2运动方式项目</p>
<!--<el-form-item label="(1) 运动方式" prop="motionMode" class="margin-left">
<el-radio-group v-model="form.motionMode">
<el-radio label="有氧" key="1">有氧</el-radio>
<el-radio label="无氧" key="2">无氧</el-radio>
<el-radio label="有氧无氧相结合" key="3">有氧无氧相结合</el-radio>
</el-radio-group>
</el-form-item>-->
<el-form-item label="(1) 运动方式、项目" prop="motionProject" class="margin-left">
<div><span>有氧运动</span>
<el-checkbox-group v-model="form.aerobicMotionClassify">
<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>
<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>
</div>
<div><span>有氧无氧结合运动</span>
<el-checkbox-group v-model="form.anaerobicAerobicMotionClassify">
<el-checkbox v-for="(item,index) in healthyData['anaerobicAerobicMotionClassifyArray']" :label="item.value" :key="index">{{item.name}}</el-checkbox>
</el-checkbox-group>
</div>
<div><span>其他项目 </span><el-input style="margin-top: 10px;width:70%" v-model="form.otherMotionClassify" placeholder="请输入其他运动项目名称" /></div>
</el-form-item>
<el-form-item label="(2) 运动场地" prop="motionField" class="margin-left">
<el-checkbox-group v-model="form.motionField">
<el-checkbox v-for="(item,index) in healthyData['motionFieldArray']" :label="item.value" :key="index">{{item.name}}</el-checkbox>
</el-checkbox-group>
<div><span>其他场地 </span><el-input style="margin-top: 10px;width:70%" v-model="form.otherMotionField" placeholder="请输入其他运动场地名称" /></div>
</el-form-item>
</div>
</template>
<script>
import * as healthyData from "@/utils/healthyData";
export default {
name: "Form6",
components: {
},
data() {
return {
healthyData:healthyData
};
},
methods: {
},
props: {
form: {
type: Object,
default: null
}
},
created() {
},
};
</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>

View File

@ -0,0 +1,104 @@
<template>
<div>
<p class="p_title_1">{{healthyData['titleArray'][6]}}</p>
<p class="p_title_2">1您的睡眠状况</p>
<el-form-item label="(1) 一般晚上几点睡" prop="sleepTime" class="margin-left">
<el-time-select v-model="form.sleepTime" :picker-options="{ start: '00:00', step: '01:00', end: '24:00' }" placeholder="请选择时间" :editable="false"/>
</el-form-item>
<el-form-item label="(2) 睡眠质量" prop="sleepQuality" class="margin-left">
<el-checkbox-group v-model="form.sleepQuality">
<el-checkbox v-for="(item,index) in healthyData['sleepQualityArray']" :label="item.value" :key="index">{{item.name}}</el-checkbox>
</el-checkbox-group>
</el-form-item>
<p class="p_title_2">2辅助入睡药物情况</p>
<el-form-item label="(1) 是否有辅助入睡药物" prop="sleepDrugFlag" class="margin-left">
<el-radio-group v-model="form.sleepDrugFlag">
<el-radio :label="0" key="1"></el-radio>
<el-radio :label="1" key="2"></el-radio>
</el-radio-group>
<div><span>辅助药物名称 </span><el-input style="margin-top: 5px;" v-model="form.sleepDrug" placeholder="请输入辅助入睡药物名称" /></div>
</el-form-item>
<p class="p_title_2">3熬夜情况</p>
<el-form-item label="(1) 是否经常熬夜超11:00" prop="stayupLateFlag" class="margin-left">
<el-radio-group v-model="form.stayupLateFlag">
<el-radio :label="0" key="1"></el-radio>
<el-radio :label="1" key="2"></el-radio>
</el-radio-group>
<div class="margin-top-10">
<span>熬夜频率 </span><el-input-number type="number" class="width-50-left-8-right-5" v-model="form.stayupLateWeekNum" :step="1" :min="0"></el-input-number><span>/</span>
</div>
</el-form-item>
</div>
</template>
<script>
import * as healthyData from "@/utils/healthyData";
export default {
name: "Form7",
components: {
},
data() {
return {
healthyData:healthyData
};
},
methods: {
},
props: {
form: {
type: Object,
default: null
}
},
created() {
},
};
</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>

View File

@ -0,0 +1,258 @@
<template>
<div>
<p class="p_title_1">{{healthyData['titleArray'][7]}}</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>
</el-checkbox-group>
<div><span>其他家族病史</span>
<el-input
type="textarea"
placeholder="请输入其他家族病史"
v-model="form.otherFamilyIllnessHistory"
maxlength="200"
show-word-limit
rows="3"
></el-input>
</div>
</el-form-item>
<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>
</el-checkbox-group>
<div><span>其他手术史</span>
<el-input
type="textarea"
placeholder="请输入其他手术史"
v-model="form.otherOperationHistory"
maxlength="200"
show-word-limit
rows="3"
></el-input></div>
</el-form-item>
<el-form-item label="(2) 近期是否做过手术" prop="nearOperation" class="margin-left">
<el-radio-group v-model="form.nearOperationFlag">
<el-radio :label="0" key="1"></el-radio>
<el-radio :label="1" key="2"></el-radio>
</el-radio-group>
<div><span>手术恢复情况</span>
<el-input
type="textarea"
placeholder="请输入恢复情况"
v-model="form.recoveryeSituation"
maxlength="200"
show-word-limit
rows="3"
></el-input>
</div>
</el-form-item>
<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>
<el-radio :label="1" key="2"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="(2) 长期服用药物有(可多选)" prop="longEatDrugClassify" class="margin-left">
<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-group>
<div><span>其他长期服用的药物</span>
<el-input
type="textarea"
placeholder="请输入其他药物"
v-model="form.otherLongEatDrugClassify"
maxlength="200"
show-word-limit
rows="3"
></el-input>
</div>
</el-form-item>
<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>
<el-radio :label="1" key="2"></el-radio>
</el-radio-group>
<div><span>过敏症状</span>
<el-input
type="textarea"
placeholder="请输入过敏症状"
v-model="form.allergySituation"
maxlength="200"
show-word-limit
rows="3"
></el-input>
</div>
</el-form-item>
<el-form-item label="(2) 引起过敏源(可多选)" prop="allergen" class="margin-left">
<el-checkbox-group v-model="form.allergen">
<el-checkbox v-for="(item, index) in healthyData['allergenArray']" :key="index" :label="item.value">{{item.name}}</el-checkbox>
</el-checkbox-group>
<div><span>其他过敏源</span>
<el-input
type="textarea"
placeholder="请输入过敏源"
v-model="form.otherAllergen"
maxlength="200"
show-word-limit
rows="3"
></el-input>
</div>
</el-form-item>
</div>
</template>
<script>
import * as healthyData from "@/utils/healthyData";
import { getDictData,physicalSignsList } from "@/api/custom/customerInvestigation";
import { listPhysicalSigns } from "@/api/custom/physicalSigns";
export default {
name: "Form8",
components: {
},
data() {
return {
healthyData:healthyData,
physicalSignsList: [],
moistureDataList:[],
bloodDataList:[],
};
},
methods: {
//获取湿气
getMoistureDictData() {
if(this.flag == 0){
getDictData("sys_blood_data").then((response) => {
this.moistureDataList = response.data;
});
}else{
this.getDicts("sys_blood_data").then(response => {
this.moistureDataList = response.data;
});
}
},
//获取气血
getBloodDictData() {
if(this.flag == 0){
getDictData("sys_moisture_data").then((response) => {
this.bloodDataList = response.data;
});
}else{
this.getDicts("sys_moisture_data").then(response => {
this.bloodDataList = response.data;
});
}
},
/** 查询体征列表 */
getPhysicalSignsList() {
if(this.flag == 0){
physicalSignsList().then((response) => {
this.physicalSignsList = response.rows;
});
}else{
listPhysicalSigns().then(response => {
this.physicalSignsList = response.rows;
});
}
},
},
props: {
form: {
type: Object,
default: null
},
//是否已登录1已登录 0未登录需要调不同的方法获取数据避免403错误
flag:{
type: Number,
default: 0
}
},
created() {
this.getPhysicalSignsList();
this.getMoistureDictData();
this.getBloodDictData();
},
};
</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>

View File

@ -0,0 +1,174 @@
<template>
<div>
<p class="p_title_1">{{healthyData['titleArray'][8]}}</p>
<p class="p_title_2">1体检报告</p>
<el-form-item label="(1) 请上传相应的体检报告" prop="fileList" class="margin-left">
<el-upload style="margin-left: 20px;"
class="upload-demo"
ref="upload"
:action="upload.url"
:limit="upload.limit"
:disabled="upload.isUploading"
:file-list="upload.fileList"
:multiple="upload.multiple"
:on-change="handleFileChange"
:on-exceed="handleFileexceed"
:on-progress="handleFileUploadProgress"
:on-success="handleFileSuccess"
:on-error="handleFileFail"
: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="removeFileList()">移除文件</el-button>
<div slot="tip" class="el-upload__tip">1最多可上传三份且每份文件不超过20M
<br>2仅支持bmpgif, jpg, jpeg, png, doc, docx, xls, xlsx, ppt, pptx, html, htm, txt, rar, zip, gz, bz2, pdf格式文件
</div>
</el-upload>
</el-form-item>
</div>
</template>
<script>
import * as healthyData from "@/utils/healthyData";
export default {
name: "Form9",
components: {
},
data() {
return {
healthyData:healthyData,
upload: {
// 是否禁用上传
isUploading: false,
// 上传的地址
url: process.env.VUE_APP_BASE_API + "/common/customerUploadFile",
// 设置上传的请求头部
headers: {},
// 其他需要携带的数据
data:{},
//文件列表
fileList:[],
//同时上传文件上限
limit: 3,
//每个文件大小
fileSize: 1024 * 1024 * 20,
//是否支持同时选择多张
multiple: true
},
};
},
methods: {
uploadFile(){
if(this.upload.fileList.length > 0 && this.form.medicalReport.length != this.upload.fileList.length){
this.$refs.upload.submit();
}else{
this.$emit('addOrEditHealthy');
}
},
removeFileList(){
this.upload.fileList = [];
this.form.medicalReport = [];
this.form.medicalReportName = [];
},
//监控上传文件列表
handleFileChange(file, fileList) {
let sizeFlag = file.size > this.upload.fileSize;
if (sizeFlag) {
this.$message({
message: "当前文件过大",
type: "warning",
});
fileList.pop();
}
this.upload.fileList = fileList;
},
// 文件数量超过限度
handleFileexceed(file, fileList){
//console.log(this.upload.fileList.length);
this.$message({
message: "最多可上传"+ this.upload.limit +"份文件",
type: "warning",
});
},
// 文件上传中处理
handleFileUploadProgress(event, file, fileList) {
//this.upload.isUploading = true;
},
// 文件上传成功处理
handleFileSuccess(response, file, fileList) {
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.$emit('addOrEditHealthy');
}
}else{
this.upload.fileList = fileList.pop();
this.$message.error('文件上传失败,请检查文件格式');
}
},
// 文件上传失败处理
handleFileFail(err, file, fileList){
this.$message.error('文件上传失败,请检查文件格式');
this.upload.fileList = fileList.pop();
}
},
props: {
form: {
type: Object,
default: null
}
},
created() {
},
};
</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>

View File

@ -0,0 +1,80 @@
<template>
<div>
<p class="p_title_1" style="margin-top: 10px;">{{healthyData['titleArray'][0]}}</p>
<p style="font-size: 15px; margin-bottom: 12px;margin-top: 10px;">请您确认下方姓名手机号是否正确</p>
<el-form-item label="真实姓名" prop="name">
<el-input v-model="form.name" :readonly="true" placeholder="请输入真实姓名" maxlength="20"/>
</el-form-item>
<el-form-item label="手机号" prop="phone" >
<el-input type="number" :readonly="true" v-model="form.phone" placeholder="请输入手机号" />
</el-form-item>
<el-form-item label="性别" prop="sex">
<el-radio-group v-model="form.sex" size="small" >
<el-radio :label="parseInt('0')" border></el-radio>
<el-radio :label="parseInt('1')" border></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="年龄" prop="age" >
<el-input type="number" v-model="form.age" placeholder="请输入年龄" autocomplete="off" ></el-input>
</el-form-item>
<el-form-item label="身高(厘米)" prop="tall" >
<el-input type="number" v-model="form.tall" placeholder="请输入身高" autocomplete="off" ></el-input>
</el-form-item>
<el-form-item label="体重(斤)" prop="weight" >
<el-input type="number" v-model="form.weight" placeholder="请输入体重" autocomplete="off" ></el-input>
</el-form-item>
<el-form-item label="调理项目" prop="conditioningProjectId">
<el-select v-model="form.conditioningProjectId" filterable clearable placeholder="请选择">
<el-option
v-for="dict in conditioningProjectIdOption"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="parseInt(dict.dictValue)"
/>
</el-select>
</el-form-item>
<el-form-item label="南方人还是北方人" prop="position">
<el-radio-group v-model="form.position" style="margin-left: 10px;">
<el-radio :label="0" key="1">南方</el-radio>
<el-radio :label="1" key="2">北方</el-radio>
</el-radio-group>
</el-form-item>
</div>
</template>
<script>
import * as healthyData from "@/utils/healthyData";
import { getDictData } from "@/api/custom/customerInvestigation";
export default {
name: "HealthyForm",
components: {
},
data() {
return {
healthyData:healthyData,
conditioningProjectIdOption:[]
};
},
methods: {
getDict(type){
getDictData(type).then(response => {
this.conditioningProjectIdOption = response.data;
});
},
},
props: {
form: {
type: Object,
default: null
}
},
created() {
this.getDict("conditioning_project");
},
};
</script>
<style>
</style>

View File

@ -1,7 +1,9 @@
<template>
<el-dialog :visible.sync="visible" :title="title" append-to-body @closed="onClosed">
<div v-if="showFlag">
<div style="float:right;margin-top:-10px;margin-bottom: 10px;" v-show="dataList.length > 0">
<!--<el-button v-hasPermi="['custom:healthy:edit']" @click="" plain>修改信息</el-button>-->
<!-- 只有新版健康评估信息才可修改旧的体征数据不支持修改 -->
<el-button v-hasPermi="['custom:healthy:edit']" type="primary" v-show="dataType == 0" @click="handleEditHealthyClick()" plain>修改信息</el-button>
<el-button type="danger" v-hasPermi="['custom:healthy:remove']" @click="handleDelete()" plain>删除信息</el-button>
</div>
<!-- 客户健康评估 -->
@ -54,6 +56,10 @@
<el-button icon="el-icon-share" size="small" title="点击复制链接" class="copyBtn" type="primary" :data-clipboard-text="copyValue" @click="handleCopy()">健康评估表链接</el-button>
</p>
</div>
</div>
<!-- 编辑 -->
<physicalSigns-edit ref="physicalSignsEditDialog" @refreshHealthyData="getCustomerHealthyByCusId()"></physicalSigns-edit>
</el-dialog>
</template>
<script>
@ -62,20 +68,24 @@ import TableDetailMessage from "@/components/TableDetailMessage";
import AutoHideMessage from "@/components/AutoHideMessage";
import * as healthyData from "@/utils/healthyData";
import Clipboard from 'clipboard';
import PhysicalSignsEdit from "@/components/PhysicalSignsEdit";
export default {
name: "PhysicalSignsDialog",
components: {
"auto-hide-message": AutoHideMessage,
"table-detail-message": TableDetailMessage
"table-detail-message": TableDetailMessage,
"physicalSigns-edit":PhysicalSignsEdit
},
data() {
return {
visible: false,
showFlag: false,
title: "",
data: null,
dataList: [],
dataType: 0,
healthyData: null,
// 体征标题
signTitleData: [
["创建时间", "姓名", "年龄"],
@ -196,19 +206,25 @@ export default {
},
showDialog(data) {
this.data = data;
this.title = `${data.name}`;
getCustomerPhysicalSignsByCusId(data.id).then((res) => {
this.title = `${data.name}客户健康评估信息`;
this.getCustomerHealthyByCusId();
},
getCustomerHealthyByCusId(){
getCustomerPhysicalSignsByCusId(this.data.id).then((res) => {
this.showFlag = false;
if (res.data.customerHealthy) {
//判断是体征还是健康评估
this.dataType = res.data.type;
if(this.dataType == 0){
this.getDataListByHealthyMessage(res.data.customerHealthy);
this.healthyData = Object.assign({}, res.data.customerHealthy);
this.getDataListByHealthyMessage(res.data.customerHealthy);
}else{
this.getDataListBySignMessage(res.data.customerHealthy)
}
}
this.title += (this.dataType == 0 ? "客户健康评估信息" : "客户体征信息");
this.enc_id = res.data.enc_id;
this.showFlag = true;
this.visible = true;
});
},
@ -410,7 +426,7 @@ export default {
handleDelete() {
const ids = this.data.id;
this.$confirm(
'是否确认删除客户姓名为"' + this.data.name + '"的体征信息?',
'是否确认删除客户姓名为"' + this.data.name + '"的健康评估信息?',
"警告",
{
confirmButtonText: "确定",
@ -424,6 +440,10 @@ export default {
this.msgSuccess("删除成功");
}).catch(function () {});
},
handleEditHealthyClick() {
//console.log(JSON.stringify(this.healthyData));
this.$refs["physicalSignsEditDialog"].showDialog(this.data, this.healthyData);
}
}
};
</script>

View File

@ -0,0 +1,185 @@
<template>
<el-dialog v-if="visible" :visible.sync="visible" :title="title" width="500px" append-to-body @closed="onClosed">
<div style="margin-top: -10px">
<el-form ref="form" label-position="top" label-width="100px">
<el-form-item :label="'请勾选需要修改的模块'" prop="showModuleArray">
<el-checkbox-group v-model="showModuleArray" @change="changeShowModule()">
<el-checkbox v-for="(item, index) in healthyData['titleArray']" :label="index" :key="index">{{item}}</el-checkbox>
</el-checkbox-group>
</el-form-item>
</el-form>
</div>
<div style="height:400px;overflow: auto">
<el-form ref="form" label-position="top" :model="form" :rules="rules" label-width="100px" style="padding: 16px">
<healthy-form1 v-show="stepArray[0]" :flag="1" :form.sync="form"></healthy-form1>
<healthy-form2 v-show="stepArray[1]" :form.sync="form"></healthy-form2>
<healthy-form3 v-show="stepArray[2]" :form.sync="form"></healthy-form3>
<healthy-form4 v-show="stepArray[3]" :form.sync="form"></healthy-form4>
<healthy-form5 v-show="stepArray[4]" :form.sync="form"></healthy-form5>
<healthy-form6 v-show="stepArray[5]" :form.sync="form"></healthy-form6>
<healthy-form7 v-show="stepArray[6]" :form.sync="form"></healthy-form7>
<healthy-form8 v-show="stepArray[7]" :flag="1" :form.sync="form"></healthy-form8>
<edit-file v-show="stepArray[8]" ref="editFile" :form.sync="form"></edit-file>
<el-form-item style="text-align: center; margin: 30px auto" >
<el-button type="primary" @click="submit()" style="width: 40%" >提交</el-button>
<el-button @click="onClosed()" style="width: 40%" >取消</el-button>
</el-form-item>
</el-form>
</div>
</el-dialog>
</template>
<script>
import { getCustomerPhysicalSignsByCusId,delCustomerHealthy } from "@/api/custom/customer";
import { updateHealthy } from "@/api/custom/healthy";
import * as healthyData from "@/utils/healthyData";
import Form1 from "@/components/HealthyForm/Form1";
import Form2 from "@/components/HealthyForm/Form2";
import Form3 from "@/components/HealthyForm/Form3";
import Form4 from "@/components/HealthyForm/Form4";
import Form5 from "@/components/HealthyForm/Form5";
import Form6 from "@/components/HealthyForm/Form6";
import Form7 from "@/components/HealthyForm/Form7";
import Form8 from "@/components/HealthyForm/Form8";
import Form9 from "@/components/HealthyForm/Form9";
import EditHealthyFile from "@/components/HealthyForm/EditHealthyFile";
export default {
name: "PhysicalSignsEdit",
components: {
'healthy-form1': Form1,
'healthy-form2': Form2,
'healthy-form3': Form3,
'healthy-form4': Form4,
'healthy-form5': Form5,
'healthy-form6': Form6,
'healthy-form7': Form7,
'healthy-form8': Form8,
'healthy-form9': Form9,
'edit-file':EditHealthyFile
},
data() {
return {
healthyData:healthyData,
showModuleArray:[0],
stepArray: [true,false,false,false,false,false,false,false,false],
visible: false,
title: "",
data: undefined,
form: {},
rules: {
sex: [{ required: true, trigger: "blur", message: "请选择性别" }],
age: [
{ required: true, trigger: "blur", message: "请填写年龄" },
{
required: true,
trigger: "blur",
pattern: /^[1-9]\d*$/,
message: "年龄格式不正确",
},
],
tall: [
{ required: true, trigger: "blur", message: "请填写身高" },
{
required: true,
trigger: "blur",
pattern: /^[1-9]\d*$/,
message: "身高格式不正确",
},
],
weight: [
{ required: true, trigger: "blur", message: "请填写体重" },
{
required: true,
trigger: "blur",
pattern: /^[1-9]\d*$/,
message: "体重格式不正确",
},
],
conditioningProjectId:[
{ required: true, trigger: "blur", message: "请选择调理项目" }
],
position:[
{ required: true, trigger: "blur", message: "请选择地理位置" }
]
}
};
},
methods: {
showDialog(data, customerHealthyData) {
this.data = data;
this.title = "修改"+`${data.name}`+"健康评估信息";
let healthy = Object.assign({}, customerHealthyData);
if(data && customerHealthyData){
this.healthyData['arrayName'].forEach(function (item, index) {
healthy[item] = healthy[item] ? healthy[item].split(",") : [];
});
this.form = healthy;
this.visible = true;
}else{
this.$message.error('健康评估信息获取失败');
}
/*getCustomerPhysicalSignsByCusId(data.id).then((res) => {
if (res.data.customerHealthy && res.data.type == 0) {
let healthyObj = res.data.customerHealthy;
this.healthyData['arrayName'].forEach(function (item, index) {
healthyObj[item] = healthyObj[item] ? healthyObj[item].split(",") : [];
});
this.form = healthyObj;
this.visible = true;
}else{
this.$message.error('健康评估信息获取失败');
}
});*/
},
onClosed() {
this.visible = false;
this.data = null;
//this.form = null;
},
submit(){
this.$refs.form.validate((valid) => {
if (valid) {
this.editCustomerHealthy();
} else {
this.$message({message: "数据未填写完整", type: "warning"});
}
});
},
editCustomerHealthy(){
this.$refs.editFile.addUploadNewFile();
//数据处理
let cusMessage = Object.assign({}, this.form);
this.healthyData['arrayName'].forEach(function (item, index) {
cusMessage[item] = cusMessage[item] != null ? cusMessage[item].join(",") : null;
});
updateHealthy(cusMessage).then((response) => {
if (response.code === 200) {
this.msgSuccess("修改成功");
this.onClosed();
this.$emit('refreshHealthyData');
}
}).catch(function() {
console.log("error");
});
},
changeShowModule(){
console.log("---------------");
for(var i = 0; i < this.stepArray.length; i++){
let flag = this.showModuleArray.find((opt) => opt === i);
console.log(flag != null && flag != undefined);
this.$set(this.stepArray, i, (flag != null && flag != undefined));
}
}
}
};
</script>
<style>
.margin-top-20{
margin-top:20px;
}
.p_title_1{
font-size: 18px;
font-weight: bold;
margin-top: 20px;
}
</style>

View File

@ -21,7 +21,7 @@
/>
</el-select>
</el-form-item>
<el-form-item label="月份" prop="month">
<el-form-item label="截止月份" prop="month">
<el-date-picker
v-model="month"
@change="monthRangeChange"

View File

@ -9,645 +9,20 @@
</el-steps>
</div>
<el-form ref="form" label-position="top" :model="form" :rules="rules" label-width="100px" style="padding: 16px">
<div v-show="stepArray[0]">
<p class="p_title_1" style="margin-top: 10px;">{{healthyData['titleArray'][0]}}</p>
<p style="font-size: 15px; margin-bottom: 12px;margin-top: 10px;">请您确认下方姓名手机号是否正确</p>
<el-form-item label="真实姓名" prop="name">
<el-input v-model="form.name" :readonly="true" placeholder="请输入真实姓名" maxlength="20"/>
<healthy-form1 v-show="stepArray[0]" :form.sync="form"></healthy-form1>
<healthy-form2 v-show="stepArray[1]" :form.sync="form"></healthy-form2>
<healthy-form3 v-show="stepArray[2]" :form.sync="form"></healthy-form3>
<healthy-form4 v-show="stepArray[3]" :form.sync="form"></healthy-form4>
<healthy-form5 v-show="stepArray[4]" :form.sync="form"></healthy-form5>
<healthy-form6 v-show="stepArray[5]" :form.sync="form"></healthy-form6>
<healthy-form7 v-show="stepArray[6]" :form.sync="form"></healthy-form7>
<healthy-form8 v-show="stepArray[7]" :form.sync="form"></healthy-form8>
<healthy-form9 v-show="stepArray[8]" ref="fileForm" @addOrEditHealthy="addCustomerHealthy()" :form.sync="form"></healthy-form9>
<el-form-item style="text-align: center; margin: 30px auto" >
<el-button @click="nextStep(-1)" style="margin-right: 10px;width: 40%" v-show="stepActive != 0">上一步</el-button>
<el-button type="primary" @click="nextStep(1)" style="width: 40%" v-show="stepActive != stepArray.length-1">下一步</el-button>
<el-button type="primary" @click="submit()" style="width: 40%" v-show="stepActive == stepArray.length-1">提交数据</el-button>
</el-form-item>
<el-form-item label="手机号" prop="phone" >
<el-input type="number" :readonly="true" v-model="form.phone" placeholder="请输入手机号" />
</el-form-item>
<el-form-item label="性别" prop="sex">
<el-radio-group v-model="form.sex" size="small" >
<el-radio :label="parseInt('0')" border></el-radio>
<el-radio :label="parseInt('1')" border></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="年龄" prop="age" >
<el-input type="number" v-model="form.age" placeholder="请输入年龄" autocomplete="off" ></el-input>
</el-form-item>
<el-form-item label="身高(厘米)" prop="tall" >
<el-input type="number" v-model="form.tall" placeholder="请输入身高" autocomplete="off" ></el-input>
</el-form-item>
<el-form-item label="体重(斤)" prop="weight" >
<el-input type="number" v-model="form.weight" placeholder="请输入体重" autocomplete="off" ></el-input>
</el-form-item>
<el-form-item label="调理项目" prop="conditioningProjectId">
<el-select v-model="form.conditioningProjectId" filterable clearable placeholder="请选择">
<el-option
v-for="dict in conditioningProjectIdOption"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="parseInt(dict.dictValue)"
/>
</el-select>
</el-form-item>
<el-form-item label="南方人还是北方人" prop="position">
<el-radio-group v-model="form.position" style="margin-left: 10px;">
<el-radio :label="0" key="1">南方</el-radio>
<el-radio :label="1" key="2">北方</el-radio>
</el-radio-group>
</el-form-item>
</div>
<div v-show="stepArray[1]">
<p class="p_title_1">{{healthyData['titleArray'][1]}}</p>
<p class="p_title_2">1减脂经历</p>
<el-form-item label="(1) 用过哪些减脂方法(重点)" prop="experience" class="margin-left">
<el-input
type="textarea"
placeholder="请描述减脂方法"
v-model="form.experience"
maxlength="200"
show-word-limit
rows="3"
></el-input>
</el-form-item>
<el-form-item label="(2) 减脂中遇到的困难(重点)" prop="difficulty" class="margin-left">
<el-input
type="textarea"
placeholder="请描述减脂中遇到的困难"
v-model="form.difficulty"
maxlength="200"
show-word-limit
rows="3"
></el-input>
</el-form-item>
<el-form-item label="(3) 减脂过程中是否反弹" prop="rebound" class="margin-left">
<el-radio-group v-model="form.rebound" style="margin-left: 10px;">
<el-radio :label="0" key="1"></el-radio>
<el-radio :label="1" key="2"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="(4) 是否意识到生活习惯是减脂关键" prop="crux" class="margin-left">
<el-radio-group v-model="form.crux" style="margin-left: 10px;">
<el-radio :label="0" key="1"></el-radio>
<el-radio :label="1" key="2"></el-radio>
</el-radio-group>
</el-form-item>
</div>
<div v-show="stepArray[2]">
<p class="p_title_1">{{healthyData['titleArray'][2]}}</p>
<p class="p_title_2">1家庭调味品</p>
<el-form-item :label="'(1) 调味品种类'" prop="condiment" class="margin-left">
<el-checkbox-group v-model="form.condiment">
<el-checkbox v-for="(item, index) in healthyData['condimentArray']" :label="item.value" :key="index">{{item.name}}</el-checkbox>
</el-checkbox-group>
<div><span>其他调味品 </span><el-input style="margin-top: 10px;width:70%" v-model="form.otherCondiment" placeholder="请输入其他调味品名称" /></div>
</el-form-item>
<p class="p_title_2">2喜好的烹调方式和周频次</p>
<el-form-item :label="'(1) 喜好的烹调方式'" prop="cookingStyle" class="margin-left">
<el-checkbox-group v-model="form.cookingStyle">
<el-checkbox v-for="(item,index) in healthyData['cookingStyleArray']" :label="item.value" :key="index">{{item.name}}</el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item :label="'(2) 烹调方式的频次(每周)'" prop="cookingStyleRate" class="margin-left">
<div>
<span>{{healthyData['cookingStyleRateArray'][0]}}&nbsp;</span><el-input-number style="width:35%" v-model="form.cookingStyleRate[0]" :step="1" :min="0"></el-input-number><span>&nbsp;</span>
<span style="margin-left: 20px;">{{healthyData['cookingStyleRateArray'][1]}}&nbsp;</span><el-input-number style="width:35%" v-model="form.cookingStyleRate[1]" :step="1" :min="0" ></el-input-number><span>&nbsp;</span>
</div>
<div style="margin-top: 5px;">
<span>{{healthyData['cookingStyleRateArray'][2]}}&nbsp;</span><el-input-number style="width:35%" v-model="form.cookingStyleRate[2]" :step="1" :min="0" ></el-input-number><span>&nbsp;</span>
<span style="margin-left: 20px;">{{healthyData['cookingStyleRateArray'][3]}}&nbsp;</span><el-input-number style="width:35%" v-model="form.cookingStyleRate[3]" :step="1" :min="0" ></el-input-number><span>&nbsp;</span>
</div>
<div style="margin-top: 5px;">
<span>{{healthyData['cookingStyleRateArray'][4]}}&nbsp;</span><el-input-number style="width:35%" v-model="form.cookingStyleRate[4]" :step="1" :min="0" ></el-input-number><span>&nbsp;</span>
<span style="margin-left: 20px;">{{healthyData['cookingStyleRateArray'][5]}}&nbsp;</span><el-input-number style="width:35%;" v-model="form.cookingStyleRate[5]" :step="1" :min="0" ></el-input-number><span>&nbsp;</span>
</div>
</el-form-item>
<p class="p_title_2">3洗菜方式</p>
<el-form-item :label="'(1) 洗菜方式'" prop="washVegetablesStyle" class="margin-left">
<el-checkbox-group v-model="form.washVegetablesStyle">
<el-checkbox v-for="(item,index) in healthyData['washVegetablesStyleArray']" :label="item.value" :key="index">{{item.name}}</el-checkbox>
</el-checkbox-group>
<div><span>其他洗菜方式 </span><el-input style="margin-top: 10px;width:70%" v-model="form.otherWashVegetablesStyle" placeholder="请输入其他洗菜方式" /></div>
</el-form-item>
</div>
<div v-show="stepArray[3]">
<p class="p_title_1">{{healthyData['titleArray'][3]}}</p>
<p class="p_title_2">1您三餐的习惯</p>
<el-form-item :label="'(1) 早餐习惯'" prop="breakfast" class="margin-left">
<el-radio-group v-model="form.breakfastType">
<el-radio v-for="(item,index) in healthyData['breakfastTypeArray']" :label="item.value" :key="index">{{item.name}}</el-radio>
</el-radio-group>
<div style="margin-top:8px;"><span>早餐通常吃&nbsp;</span><el-input v-model="form.breakfastFood" style="width:70%" placeholder="请输入早餐名称" /></div>
</el-form-item>
<el-form-item :label="'(2) 午餐习惯'" prop="lunchType" class="margin-left">
<el-checkbox-group v-model="form.lunchType">
<el-checkbox v-for="(item,index) in healthyData['lunchTypeArray']" :label="item.value" :key="index">{{item.name}}</el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item :label="'(3) 晚餐习惯'" prop="dinner" class="margin-left">
<el-checkbox-group v-model="form.dinner">
<el-checkbox v-for="(item,index) in healthyData['dinnerArray']" :label="item.value" :key="index">{{item.name}}</el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item :label="'(4) 正餐荤素中素菜占比几成'" prop="eatSituation" class="margin-left">
<el-input-number v-model="form.vegetableRate" :step="1" :min="0" :max="10"></el-input-number>
</el-form-item>
<el-form-item :label="'(4) 最常吃的肉类'" prop="eatSituation" class="margin-left">
<el-input v-model="form.commonMeat" placeholder="请输入肉类名称"></el-input>
</el-form-item>
<p class="p_title_2">2您晚餐时间点和夜宵习惯</p>
<el-form-item :label="'(1) 晚餐时间点'" prop="dinnerTime" class="margin-left">
<el-time-select v-model="form.dinnerTime" :picker-options="{ start: '17:00', step: '00:30', end: '24:00' }" placeholder="请选择时间" :editable="false"/>
</el-form-item>
<el-form-item :label="'(2) 您每周吃几次夜宵'" prop="supperNum" class="margin-left">
<el-input-number v-model="form.supperNum" :step="1" :min="0"></el-input-number>
</el-form-item>
<el-form-item :label="'(3) 您夜宵通常吃的食物'" prop="supperFood" class="margin-left">
<el-input style="width:100%" v-model="form.supperFood" placeholder="请输入食物名称"></el-input>
</el-form-item>
<p class="p_title_2">3您的饮食偏好</p>
<el-form-item :label="'(1) 冷热偏好'" prop="dietHotAndCold" class="margin-left">
<el-radio-group v-model="form.dietHotAndCold">
<el-radio v-for="(item,index) in healthyData['dietHotAndColdArray']" :label="item.value" :key="index">{{item.name}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item :label="'(2) 口味偏好'" prop="dietFlavor" class="margin-left">
<el-checkbox-group v-model="form.dietFlavor">
<el-checkbox v-for="(item,index) in healthyData['dietFlavorArray']" :label="item.value" :key="index">{{item.name}}</el-checkbox>
</el-checkbox-group>
</el-form-item>
<p class="p_title_2">4生食果蔬状况</p>
<el-form-item :label="'(1) 平均每周吃生/拌菜几次'" prop="vegetablesNum" class="margin-left">
<el-input-number v-model="form.vegetablesNum" :step="1" :min="0"></el-input-number>
</el-form-item>
<el-form-item :label="'(2) 每周吃生/拌菜的频次'" prop="vegetablesRateType" class="margin-left">
<el-radio-group v-model="form.vegetablesRateType">
<el-radio v-for="(item,index) in healthyData['vegetablesRateTypeArray']" :label="item.value" :key="index">{{item.name}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item :label="'(3) 平均每天吃水果几次以及时间'" prop="fruitsNum" class="margin-left">
<el-input-number v-model="form.fruitsNum" :step="1" :min="0"></el-input-number>
<el-radio-group v-model="form.fruitsTime" style="margin-top: 15px;">
<el-radio v-for="(item,index) in healthyData['fruitsTimeArray']" :label="item.value" :key="index">{{item.name}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="(4) 平时吃水果的频次" prop="fruitsRate" class="margin-left">
<el-radio-group v-model="form.fruitsRate">
<el-radio v-for="(item,index) in healthyData['fruitsRateArray']" :label="item.value" :key="index">{{item.name}}</el-radio>
</el-radio-group>
</el-form-item>
<p class="p_title_2">5饮食习惯</p>
<el-form-item label="(1) 一餐吃几碗饭,几成饱" prop="riceNum" class="margin-left">
<div>
<el-input-number style="width:35%" v-model="form.riceNum" :step="1" :min="0"></el-input-number><span>&nbsp;碗饭</span>
<el-input-number style="width:35%;margin-left: 20px;" v-model="form.riceFull" :step="1" :min="0" ></el-input-number><span>&nbsp;成饱</span>
</div>
</el-form-item>
<el-form-item label="(2) 吃饭速度" prop="eatingSpeed" class="margin-left">
<el-radio-group v-model="form.eatingSpeed">
<el-radio v-for="(item,index) in healthyData['eatingSpeedArray']" :label="item.value" :key="index">{{item.name}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="(3) 饮食特点" prop="makeFoodType" class="margin-left">
<el-select v-model="form.makeFoodType" placeholder="请选择">
<el-option
v-for="item in healthyData['makeFoodTypeArray']"
:key="item.value"
:label="item.name"
:value="parseInt(item.value)"
/>
</el-select>
</el-form-item>
<p class="p_title_2">6您常吃的零食</p>
<el-form-item label="(1) 常吃的零食" prop="snacks" class="margin-left">
<el-checkbox-group v-model="form.snacks">
<el-checkbox v-for="(item,index) in healthyData['snacksArray']" :label="item.value" :key="index">{{item.name}}</el-checkbox>
</el-checkbox-group>
<div><span>其他零食 </span><el-input style="margin-top: 10px;width:70%" v-model="form.otherSnacks" placeholder="请输入其他零食名称" /></div>
</el-form-item>
<p class="p_title_2">7服用营养保健品状况</p>
<el-form-item label="(1) 有无服用营养保健" prop="healthProductsFlag" class="margin-left">
<el-radio-group v-model="form.healthProductsFlag">
<el-radio :label="0" key="1"></el-radio>
<el-radio :label="1" key="2"></el-radio>
</el-radio-group>
<div><span>营养保健品牌名 </span><el-input style="margin-top: 10px;" v-model="form.healthProductsBrand" placeholder="请输入营养保健品牌名" /></div>
<div><span>营养保健产品名 </span><el-input style="margin-top: 10px;" v-model="form.healthProductsName" placeholder="请输入营养保健产品名" /></div>
</el-form-item>
<el-form-item label="(2) 服用营养保健频率" prop="healthProductsRate" class="margin-left">
<div>
<el-input-number style="width:35%" v-model="form.healthProductsWeekRate" :step="1" ::min="0"></el-input-number><span>&nbsp;/</span>
<el-input-number style="width:35%;margin-left: 20px;" v-model="form.healthProductsDayRate" :step="1" ::min="0" ></el-input-number><span>&nbsp;/</span>
</div>
</el-form-item>
<p class="p_title_2">8忌口或过敏食物</p>
<el-form-item label="(1) 忌口或过敏、不爱吃的食物(重点)" prop="dishesIngredient" class="margin-left">
<el-input
type="textarea"
placeholder="请描述忌口或过敏、不爱吃的食物"
v-model="form.dishesIngredient"
maxlength="200"
show-word-limit
rows="3"
></el-input>
</el-form-item>
</div>
<div v-show="stepArray[4]">
<p class="p_title_1">{{healthyData['titleArray'][4]}}</p>
<p class="p_title_2">1您每天的饮水习惯</p>
<el-form-item label="(1) 每天饮水量(毫升)" prop="waterNum" class="margin-left">
<el-input-number v-model="form.waterNum" :step="50" :min="0"></el-input-number>
</el-form-item>
<el-form-item label="(2) 喜欢喝什么水" prop="waterType" class="margin-left">
<el-checkbox-group v-model="form.waterType">
<el-checkbox v-for="(item,index) in healthyData['waterTypeArray']" :label="item.value" :key="index">{{item.name}}</el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item label="(3) 喝水习惯" prop="waterHabit" class="margin-left">
<el-checkbox-group v-model="form.waterHabit">
<el-checkbox v-for="(item,index) in healthyData['waterHabitArray']" :label="item.value" :key="index">{{item.name}}</el-checkbox>
</el-checkbox-group>
</el-form-item>
<p class="p_title_2">2您常喝的饮品和每周频次</p>
<el-form-item label="(1) 每周常喝的饮品次数" prop="drinksNum" class="margin-left">
<div>
<span>{{healthyData['drinksNumArray'][0]}}&nbsp;</span><el-input-number type="number" style="width:35%;margin-left: 13px;" v-model="form.drinksNum[0]" :step="1" :min="0"></el-input-number><span>&nbsp;</span>
</div>
<div class="margin-top-10">
<span>{{healthyData['drinksNumArray'][1]}}&nbsp;</span><el-input-number style="width:35%;margin-left: 25px;" v-model="form.drinksNum[1]" :step="1" :min="0"></el-input-number><span>&nbsp;</span>
</div>
<div class="margin-top-10">
<span>{{healthyData['drinksNumArray'][2]}}&nbsp;</span><el-input-number type="number" style="width:35%;margin-left: 25px;" v-model="form.drinksNum[2]" :step="1" :min="0"></el-input-number><span>&nbsp;</span>
</div>
<div class="margin-top-10">
<span>{{healthyData['drinksNumArray'][3]}}&nbsp;</span><el-input-number type="number" style="width:35%;margin-left: 25px;" v-model="form.drinksNum[3]" :step="1" :min="0"></el-input-number><span>&nbsp;</span>
</div>
<div class="margin-top-10">
<span>{{healthyData['drinksNumArray'][4]}}&nbsp;</span><el-input-number type="number" style="width:35%;margin-left: 25px;" v-model="form.drinksNum[4]" :step="1" :min="0"></el-input-number><span>&nbsp;</span>
</div>
<div class="margin-top-10">
<span>{{healthyData['drinksNumArray'][5]}}&nbsp;</span><el-input-number type="number" style="width:35%;" v-model="form.drinksNum[5]" :step="1" :min="0"></el-input-number><span>&nbsp;</span>
</div>
<div class="margin-top-10">
<span>{{healthyData['drinksNumArray'][6]}}&nbsp;</span><el-input-number type="number" style="width:35%;margin-left: 13px;" v-model="form.drinksNum[6]" :step="1" :min="0"></el-input-number><span>&nbsp;</span>
</div>
<div class="margin-top-10">
<span>{{healthyData['drinksNumArray'][7]}}&nbsp;</span><el-input-number type="number" style="width:35%;" v-model="form.drinksNum[7]" :step="1" :min="0"></el-input-number><span>&nbsp;</span>
</div>
</el-form-item>
<p class="p_title_2">3您的饮酒习惯</p>
<el-form-item label="(1) 是否喝酒" prop="drinkWineFlag" class="margin-left">
<el-radio-group v-model="form.drinkWineFlag">
<el-radio v-for="(item,index) in healthyData['drinkWineFlagArray']" :label="item.value" :key="index">{{item.name}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="(2) 通常喝什么酒" prop="drinkWineClassify" class="margin-left">
<el-checkbox-group v-model="form.drinkWineClassify">
<el-checkbox v-for="(item,index) in healthyData['drinkWineClassifyArray']" :label="item.value" :key="index">{{item.name}}</el-checkbox>
</el-checkbox-group>
<div><span>其他酒 </span><el-input style="margin-top: 10px;width:70%" v-model="form.otherWineClassify" placeholder="请输入其他酒名称" /></div>
</el-form-item>
<el-form-item label="(3) 通常喝多少" prop="drinkWineAmount" class="margin-left">
<div>
<span>{{healthyData['drinkWineAmountArray'][0]}}</span><el-input-number class="width-50-left-8-right-5" type="number" v-model="form.drinkWineAmount[0]" :step="1" :min="0"></el-input-number><span>&nbsp;</span>
</div>
<div class="margin-top-10">
<span>{{healthyData['drinkWineAmountArray'][1]}}</span><el-input-number class="width-50-left-8-right-5" type="number" v-model="form.drinkWineAmount[1]" :step="1" :min="0"></el-input-number><span>&nbsp;</span>
</div>
<div class="margin-top-10">
<span>{{healthyData['drinkWineAmountArray'][2]}}</span><el-input-number class="width-50-left-8-right-5" type="number" v-model="form.drinkWineAmount[2]" :step="100" :min="0"></el-input-number><span>&nbsp;毫升</span>
</div>
<!--<div class="margin-top-10">
<span>其他</span><el-input-number class="width-50-left-8-right-5" type="number" v-model="form.drinkWineAmount[3]" :step="100" :min="0"></el-input-number><span>&nbsp;毫升</span>
</div>-->
</el-form-item>
<p class="p_title_2">4您的吸烟习惯</p>
<el-form-item label="(1) 是否吸烟" prop="smokeFlag" class="margin-left">
<el-radio-group v-model="form.smokeFlag">
<el-radio :label="0" key="1"></el-radio>
<el-radio :label="1" key="2"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="(2) 吸烟频次以及烟龄" prop="smokeRate" class="margin-left">
<div>
<span>{{healthyData['smokeRateArray'][0]}}</span><el-input-number type="number" class="width-50-left-8-right-5" v-model="form.smokeRate[0]" :step="1" :min="0"></el-input-number><span></span>
</div>
<div class="margin-top-10">
<span>{{healthyData['smokeRateArray'][1]}}</span><el-input-number type="number" class="width-50-left-8-right-5" v-model="form.smokeRate[1]" :step="1" :min="0"></el-input-number><span></span>
</div>
<div class="margin-top-10">
<span>{{healthyData['smokeRateArray'][2]}}</span><el-input-number type="number" class="width-50-left-8-right-5" v-model="form.smokeRate[2]" :step="1" :min="0"></el-input-number><span></span>
</div>
</el-form-item>
<el-form-item label="(3) 是否常吸二手烟" prop="secondSmoke" class="margin-left">
<el-radio-group v-model="form.secondSmoke">
<el-radio :label="0" key="1"></el-radio>
<el-radio :label="1" key="2"></el-radio>
</el-radio-group>
</el-form-item>
<p class="p_title_2">4您的工作状态</p>
<el-form-item label="(1) 工作行业" prop="workIndustry" style="padding-top: 10px;">
<el-input v-model="form.workIndustry" placeholder="请输入工作行业" />
</el-form-item>
<el-form-item label="(2) 工作性质" prop="workType" style="padding-top: 10px;">
<el-checkbox-group v-model="form.workType">
<el-checkbox v-for="(item,index) in healthyData['workTypeArray']" :label="item.value" :key="index">{{item.name}}</el-checkbox>
</el-checkbox-group>
</el-form-item>
<p class="p_title_2">4您的排便状况</p>
<el-form-item label="(1) 排便次数" prop="defecationNum" style="padding-top: 10px;">
<!--<el-radio-group v-model="form.defecationNum">
<el-radio :label="1" key="1">1/</el-radio>
<el-radio :label="2" key="2">2/</el-radio>
<el-radio :label="3" key="3">3/</el-radio>
</el-radio-group>-->
<div class="margin-top-10"><span>排便次数 </span><el-input-number style="width:35%;margin-right: 10px;" type="number" v-model="form.defecationNum" :step="1" :min="0"></el-input-number><span>/</span></div>
</el-form-item>
<el-form-item label="(2) 排便时间" prop="defecationTime" style="padding-top: 10px;">
<el-checkbox-group v-model="form.defecationTime">
<el-checkbox v-for="(item,index) in healthyData['defecationTimeArray']" :label="item.value" :key="index">{{item.name}}</el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item label="(2) 排便情况" prop="defecationSituation" style="padding-top: 10px;">
<div>
<span>形状</span><el-input class="width-70-left-8-right-5" v-model="form.defecationShape" placeholder="请输入形状" />
</div>
<div class="margin-top-10">
<span>气味</span><el-input class="width-70-left-8-right-5" v-model="form.defecationSmell" placeholder="请输入气味" />
</div>
<div class="margin-top-10">
<span>速度</span><el-input class="width-70-left-8-right-5" v-model="form.defecationSpeed" placeholder="请输入速度" />
</div>
<div class="margin-top-10">
<span>颜色</span><el-input class="width-70-left-8-right-5" v-model="form.defecationColor" placeholder="请输入颜色" />
</div>
</el-form-item>
</div>
<div v-show="stepArray[5]">
<p class="p_title_1">{{healthyData['titleArray'][5]}}</p>
<p class="p_title_2">1运动频率</p>
<el-form-item label="(1) 每周运动情况" prop="motionSituation" class="margin-left">
<div>
<span>每周运动次数</span><el-input-number type="number" class="width-50-left-8-right-5" v-model="form.motionNum" :step="1" :min="0"></el-input-number><span></span>
</div>
<div class="margin-top-10">
<span>每次运动时长</span><el-input-number type="number" class="width-50-left-8-right-5" v-model="form.motionDuration" :step="1" :min="0"></el-input-number><span>分钟</span>
</div>
<div class="margin-top-10">
<span>每天运动时间</span><el-time-select class="width-50-left-8-right-5" v-model="form.motionTime" :picker-options="{ start: '00:00', step: '01:00', end: '24:00' }" placeholder="请选择时间" :editable="false"/><span></span>
</div>
</el-form-item>
<p class="p_title_2">2运动方式项目</p>
<!--<el-form-item label="(1) 运动方式" prop="motionMode" class="margin-left">
<el-radio-group v-model="form.motionMode">
<el-radio label="有氧" key="1">有氧</el-radio>
<el-radio label="无氧" key="2">无氧</el-radio>
<el-radio label="有氧无氧相结合" key="3">有氧无氧相结合</el-radio>
</el-radio-group>
</el-form-item>-->
<el-form-item label="(1) 运动方式、项目" prop="motionProject" class="margin-left">
<div><span>有氧运动</span>
<el-checkbox-group v-model="form.aerobicMotionClassify">
<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>
<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>
</div>
<div><span>有氧无氧结合运动</span>
<el-checkbox-group v-model="form.anaerobicAerobicMotionClassify">
<el-checkbox v-for="(item,index) in healthyData['anaerobicAerobicMotionClassifyArray']" :label="item.value" :key="index">{{item.name}}</el-checkbox>
</el-checkbox-group>
</div>
<div><span>其他项目 </span><el-input style="margin-top: 10px;width:70%" v-model="form.otherMotionClassify" placeholder="请输入其他运动项目名称" /></div>
</el-form-item>
<el-form-item label="(2) 运动场地" prop="motionField" class="margin-left">
<el-checkbox-group v-model="form.motionField">
<el-checkbox v-for="(item,index) in healthyData['motionFieldArray']" :label="item.value" :key="index">{{item.name}}</el-checkbox>
</el-checkbox-group>
<div><span>其他场地 </span><el-input style="margin-top: 10px;width:70%" v-model="form.otherMotionField" placeholder="请输入其他运动场地名称" /></div>
</el-form-item>
</div>
<div v-show="stepArray[6]">
<p class="p_title_1">{{healthyData['titleArray'][6]}}</p>
<p class="p_title_2">1您的睡眠状况</p>
<el-form-item label="(1) 一般晚上几点睡" prop="sleepTime" class="margin-left">
<el-time-select v-model="form.sleepTime" :picker-options="{ start: '00:00', step: '01:00', end: '24:00' }" placeholder="请选择时间" :editable="false"/>
</el-form-item>
<el-form-item label="(2) 睡眠质量" prop="sleepQuality" class="margin-left">
<el-checkbox-group v-model="form.sleepQuality">
<el-checkbox v-for="(item,index) in healthyData['sleepQualityArray']" :label="item.value" :key="index">{{item.name}}</el-checkbox>
</el-checkbox-group>
</el-form-item>
<p class="p_title_2">2辅助入睡药物情况</p>
<el-form-item label="(1) 是否有辅助入睡药物" prop="sleepDrugFlag" class="margin-left">
<el-radio-group v-model="form.sleepDrugFlag">
<el-radio :label="0" key="1"></el-radio>
<el-radio :label="1" key="2"></el-radio>
</el-radio-group>
<div><span>辅助药物名称 </span><el-input style="margin-top: 5px;" v-model="form.sleepDrug" placeholder="请输入辅助入睡药物名称" /></div>
</el-form-item>
<p class="p_title_2">3熬夜情况</p>
<el-form-item label="(1) 是否经常熬夜超11:00" prop="stayupLateFlag" class="margin-left">
<el-radio-group v-model="form.stayupLateFlag">
<el-radio :label="0" key="1"></el-radio>
<el-radio :label="1" key="2"></el-radio>
</el-radio-group>
<div class="margin-top-10">
<span>熬夜频率 </span><el-input-number type="number" class="width-50-left-8-right-5" v-model="form.stayupLateWeekNum" :step="1" :min="0"></el-input-number><span>/</span>
</div>
</el-form-item>
</div>
<div v-show="stepArray[7]">
<p class="p_title_1">{{healthyData['titleArray'][7]}}</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>
</el-checkbox-group>
<div><span>其他家族病史</span>
<el-input
type="textarea"
placeholder="请输入其他家族病史"
v-model="form.otherFamilyIllnessHistory"
maxlength="200"
show-word-limit
rows="3"
></el-input>
</div>
</el-form-item>
<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>
</el-checkbox-group>
<div><span>其他手术史</span>
<el-input
type="textarea"
placeholder="请输入其他手术史"
v-model="form.otherOperationHistory"
maxlength="200"
show-word-limit
rows="3"
></el-input></div>
</el-form-item>
<el-form-item label="(2) 近期是否做过手术" prop="nearOperation" class="margin-left">
<el-radio-group v-model="form.nearOperationFlag">
<el-radio :label="0" key="1"></el-radio>
<el-radio :label="1" key="2"></el-radio>
</el-radio-group>
<div><span>手术恢复情况</span>
<el-input
type="textarea"
placeholder="请输入恢复情况"
v-model="form.recoveryeSituation"
maxlength="200"
show-word-limit
rows="3"
></el-input>
</div>
</el-form-item>
<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>
<el-radio :label="1" key="2"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="(2) 长期服用药物有(可多选)" prop="longEatDrugClassify" class="margin-left">
<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-group>
<div><span>其他长期服用的药物</span>
<el-input
type="textarea"
placeholder="请输入其他药物"
v-model="form.otherLongEatDrugClassify"
maxlength="200"
show-word-limit
rows="3"
></el-input>
</div>
</el-form-item>
<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>
<el-radio :label="1" key="2"></el-radio>
</el-radio-group>
<div><span>过敏症状</span>
<el-input
type="textarea"
placeholder="请输入过敏症状"
v-model="form.allergySituation"
maxlength="200"
show-word-limit
rows="3"
></el-input>
</div>
</el-form-item>
<el-form-item label="(2) 引起过敏源(可多选)" prop="allergen" class="margin-left">
<el-checkbox-group v-model="form.allergen">
<el-checkbox v-for="(item, index) in healthyData['allergenArray']" :key="index" :label="item.value">{{item.name}}</el-checkbox>
</el-checkbox-group>
<div><span>其他过敏源</span>
<el-input
type="textarea"
placeholder="请输入过敏源"
v-model="form.otherAllergen"
maxlength="200"
show-word-limit
rows="3"
></el-input>
</div>
</el-form-item>
</div>
<div v-show="stepArray[8]">
<p class="p_title_1">{{healthyData['titleArray'][8]}}</p>
<p class="p_title_2">1体检报告</p>
<el-form-item label="(1) 请上传相应的体检报告" prop="fileList" class="margin-left">
<el-upload style="margin-left: 20px;"
class="upload-demo"
ref="upload"
:action="upload.url"
:limit="upload.limit"
:disabled="upload.isUploading"
:file-list="upload.fileList"
:multiple="upload.multiple"
:on-change="handleFileChange"
:on-exceed="handleFileexceed"
:on-progress="handleFileUploadProgress"
:on-success="handleFileSuccess"
:on-error="handleFileFail"
: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">1最多可上传三份且每份文件不超过20M
<br>2仅支持bmpgif, jpg, jpeg, png, doc, docx, xls, xlsx, ppt, pptx, html, htm, txt, rar, zip, gz, bz2, pdf格式文件
</div>
</el-upload>
</el-form-item>
</div>
<el-form-item style="text-align: center; margin: 30px auto" >
<el-button
@click="nextStep(-1)"
style="margin-right: 10px;width: 40%"
v-show="stepActive != 0"
>上一步</el-button
>
<el-button
type="primary"
@click="nextStep(1)"
style="width: 40%"
v-show="stepActive != stepArray.length-1"
>下一步</el-button
>
<el-button
type="primary"
@click="submit()"
style="width: 40%"
v-show="stepActive == stepArray.length-1"
>提交数据</el-button
>
</el-form-item>
</el-form>
</section>
</template>
@ -655,25 +30,24 @@
import { getDictData,addCustomerHealthy,physicalSignsList,getCustomerBaseMessage } from "@/api/custom/customerInvestigation";
import * as healthyData from "@/utils/healthyData";
const logo = require("@/assets/logo/st_logo.png");
import Form1 from "@/components/HealthyForm/Form1";
import Form2 from "@/components/HealthyForm/Form2";
import Form3 from "@/components/HealthyForm/Form3";
import Form4 from "@/components/HealthyForm/Form4";
import Form5 from "@/components/HealthyForm/Form5";
import Form6 from "@/components/HealthyForm/Form6";
import Form7 from "@/components/HealthyForm/Form7";
import Form8 from "@/components/HealthyForm/Form8";
import Form9 from "@/components/HealthyForm/Form9";
export default {
name: "index",
data() {
const checkReportFile = (rule, value, callback) => {
if (this.upload.fileList == null || this.upload.fileList.length === 0) {
return callback(new Error('请选择需要上传的体检报告'))
}
callback();
};
return {
//客户是否存在标识
customerExistFlag:false,
healthyData:healthyData,
logo,
submitFlag: false,
conditioningProjectIdOption:[],
physicalSignsList: [],
moistureDataList:[],
bloodDataList:[],
stepArray: [true,false,false,false,false,false,false,false,false],
stepActive: 0,
form: {
@ -778,36 +152,14 @@ export default {
medicalReportName:[],
position:0,
experience: null,
rebound: 0,
rebound: 1,
difficulty:null,
crux:0,
crux:1,
dishesIngredient:null,
makeFoodType:3
},
upload: {
// 是否禁用上传
isUploading: false,
// 上传的地址
url: process.env.VUE_APP_BASE_API + "/common/customerUploadFile",
// 设置上传的请求头部
headers: {},
// 其他需要携带的数据
data:{},
//文件列表
fileList:[],
//同时上传文件上限
limit: 3,
//每个文件大小
fileSize: 1024 * 1024 * 20,
//是否支持同时选择多张
multiple: true
},
timer: null,
rules: {
/*name: [
{ required: true, trigger: "blur", message: "请填写姓名" },
{ min: 1, max: 20, trigger: "blur", message: "姓名过长" },
],*/
sex: [{ required: true, trigger: "blur", message: "请选择性别" }],
age: [
{ required: true, trigger: "blur", message: "请填写年龄" },
@ -836,16 +188,6 @@ export default {
message: "体重格式不正确",
},
],
/*phone: [
{ required: true, trigger: "blur", message: "请填写手机号" },
{ required: true, trigger: "blur", message: "请填写正确的手机号" },
{
required: true,
trigger: "blur",
pattern: /^[0-9]{5,11}$/,
message: "手机号格式不正确",
},
],*/
conditioningProjectId:[
{ required: true, trigger: "blur", message: "请选择调理项目" }
],
@ -855,6 +197,17 @@ export default {
}
};
},
components: {
'healthy-form1': Form1,
'healthy-form2': Form2,
'healthy-form3': Form3,
'healthy-form4': Form4,
'healthy-form5': Form5,
'healthy-form6': Form6,
'healthy-form7': Form7,
'healthy-form8': Form8,
'healthy-form9': Form9,
},
methods: {
//根据用户ID获取用户基本信息手机号、姓名
getCustomerBase(id){
@ -864,7 +217,6 @@ export default {
getCustomerBaseMessage(id).then((response) => {
if (response.code === 200) {
if(response.data){
console.log(response.data);
this.customerExistFlag = true;
this.form.name = response.data.name;
this.form.phone = response.data.phone;
@ -885,20 +237,15 @@ export default {
this.$refs.form.validate((valid) => {
if (valid) {
this.submitFlag = true;
this.form.medicalReport = [];
if(this.upload.fileList.length > 0){
this.$refs.upload.submit();
}else{
this.addCustomerHealthy();
}
this.timer = setTimeout(this.fail,1000*60);
this.$refs.fileForm.uploadFile();
} else {
this.$message({
message: "数据未填写完整",
type: "warning",
});
}
});
message: "数据未填写完整",
type: "warning",
});
}
});
},
addCustomerHealthy(){
//数据处理
@ -906,7 +253,6 @@ export default {
this.healthyData['arrayName'].forEach(function (item, index) {
cusMessage[item] = cusMessage[item] != null ? cusMessage[item].join(",") : null;
});
//this.timer = setTimeout(this.fail,1000*60);
addCustomerHealthy(cusMessage).then((response) => {
if (response.code === 200) {
this.$notify({
@ -920,8 +266,8 @@ export default {
});
},
fail(){
console.log("定时--------");
this.submitFlag = false;
this.upload.isUploading = false;
},
nextStep(step){
if(!this.customerExistFlag){
@ -945,82 +291,11 @@ export default {
goTop (){
window.scroll(0, 0);
},
getDict(type){
getDictData(type).then(response => {
this.conditioningProjectIdOption = response.data;
});
},
//监控上传文件列表
handleFileChange(file, fileList) {
let sizeFlag = file.size > this.upload.fileSize;
if (sizeFlag) {
this.$message({
message: "当前文件过大",
type: "warning",
});
fileList.pop();
}
this.upload.fileList = fileList;
},
// 文件数量超过限度
handleFileexceed(file, fileList){
//console.log(this.upload.fileList.length);
this.$message({
message: "最多可上传"+ this.upload.limit +"份文件",
type: "warning",
});
},
// 文件上传中处理
handleFileUploadProgress(event, file, fileList) {
this.upload.isUploading = true;
},
// 文件上传成功处理
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();
}
}else{
this.fail();
this.$message.error('文件上传失败,请检查文件格式');
}
},
// 文件上传失败处理
handleFileFail(err, file, fileList){
this.$message.error('文件上传失败,请检查文件格式');
this.fail();
},
//获取湿气
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.form.customerEncId = this.$route.params.id;
this.getCustomerBase(this.form.customerEncId);
this.getDict("conditioning_project");
this.getPhysicalSignsList();
this.getMoistureDictData();
this.getBloodDictData();
},
beforeCreate() {
document.title = this.$route.meta.title;