jsk 健康
This commit is contained in:
parent
96cd6b48ba
commit
2e21a3d0c8
|
|
@ -114,8 +114,40 @@ export function getHealthInfoPageApi(data) {
|
||||||
params:data
|
params:data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 查询 健康档案-详情
|
||||||
|
export function getHealthInfoDetailApi(data) {
|
||||||
|
return request({
|
||||||
|
url: '/smart-canteen/health/info/detail-health-info',
|
||||||
|
method: 'post',
|
||||||
|
headers: {
|
||||||
|
"merchant-id":"378915229716713472",
|
||||||
|
},
|
||||||
|
data:data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 健康档案-编辑
|
||||||
|
export function editHealthInfoApi(data) {
|
||||||
|
return request({
|
||||||
|
url: '/smart-canteen/health/info/edit-health-info',
|
||||||
|
method: 'post',
|
||||||
|
headers: {
|
||||||
|
"merchant-id":"378915229716713472",
|
||||||
|
},
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 健康档案-删除
|
||||||
|
export function delHealthInfoApi(data) {
|
||||||
|
return request({
|
||||||
|
url: '/smart-canteen/health/info/del-health-info',
|
||||||
|
method: 'post',
|
||||||
|
headers: {
|
||||||
|
"merchant-id":"378915229716713472",
|
||||||
|
},
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="90px">
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="90px">
|
||||||
<el-form-item label="关 键 字">
|
<el-form-item label="关 键 字">
|
||||||
<el-input v-model="queryParams.articleTitle" placeholder="请输入用户姓名、编号或手机号" maxlength="20" clearable style="width: 220px"/>
|
<el-input v-model="queryParams.articleTitle" placeholder="请输入用户姓名、手机号" maxlength="20" clearable style="width: 220px"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="所属组织" prop="deptIdList">
|
<el-form-item label="所属组织" prop="deptIdList">
|
||||||
<el-cascader v-model="queryParams.deptIdList"
|
<el-cascader v-model="queryParams.deptIdList"
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="90px">
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="90px">
|
||||||
<el-form-item label="关 键 字">
|
<el-form-item label="关 键 字">
|
||||||
<el-input v-model="queryParams.articleTitle" placeholder="请输入用户姓名、编号或手机号" maxlength="20" clearable style="width: 220px"/>
|
<el-input v-model="queryParams.articleTitle" placeholder="请输入用户姓名、手机号" maxlength="20" clearable style="width: 220px"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="所属位置" prop="placeIdList">
|
<el-form-item label="所属位置" prop="placeIdList">
|
||||||
<el-cascader v-model="queryParams.placeIdList"
|
<el-cascader v-model="queryParams.placeIdList"
|
||||||
|
|
@ -108,33 +108,33 @@
|
||||||
<el-dialog :title="title" :visible.sync="open" width="980px" append-to-body>
|
<el-dialog :title="title" :visible.sync="open" width="980px" append-to-body>
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="90px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="90px">
|
||||||
<el-row justify="center">
|
<el-row justify="center">
|
||||||
<table align="center" width="100%" cellspacing="0">
|
<table align="center" width="80%" cellspacing="0">
|
||||||
<tr >
|
<tr >
|
||||||
<td colspan="4" class="table-title">个人信息</td>
|
<td colspan="4" class="table-title">个人信息</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr >
|
<tr >
|
||||||
<td class="table-label"><i class="text-red">*</i> <span >用户姓名</span></td>
|
<td class="table-label"><i class="text-red">*</i> <span >用户姓名</span></td>
|
||||||
<td class="table-content"><span >测试操作员</span></td>
|
<td class="table-content"><span >{{form.nickName}}</span></td>
|
||||||
<td class="table-label"><i class="text-red">*</i> <span >用户编号</span></td>
|
<td class="table-label"><i class="text-red">*</i> <span >用户编号</span></td>
|
||||||
<td class="table-content"><span >232072</span></td>
|
<td class="table-content"><span >{{form.userId}}</span></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr >
|
<tr >
|
||||||
<td class="table-label"><i class="text-red">*</i> <span >所属组织</span></td>
|
<td class="table-label"><i class="text-red">*</i> <span >所属组织</span></td>
|
||||||
<td class="table-content"><span >测试有限责任公司(默认)/后场临时部门</span></td>
|
<td class="table-content"><span >{{form.orgFullName}}</span></td>
|
||||||
<td class="table-label"><span >用户类别</span></td>
|
<td class="table-label"><span >用户类别</span></td>
|
||||||
<td class="table-content"><span >临时人员</span></td>
|
<td class="table-content"><span >{{form.userType}}</span></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr >
|
<tr >
|
||||||
<td class="table-label"><span >用户手机号</span></td>
|
<td class="table-label"><span >用户手机号</span></td>
|
||||||
<td class="table-content"><span >136****0965</span></td>
|
<td class="table-content"><span >{{form.mobile}}</span></td>
|
||||||
<td class="table-label"><span >性别</span></td>
|
<td class="table-label"><span >性别</span></td>
|
||||||
<td class="table-content"><span >男</span></td>
|
<td class="table-content"><span >{{form.sex==1?'男':'女'}}</span></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr >
|
<tr >
|
||||||
<td class="table-label"><span >位置信息</span></td>
|
<td class="table-label"><span >位置信息</span></td>
|
||||||
<td class="table-content"><span ></span></td>
|
<td class="table-content"><span ></span></td>
|
||||||
<td class="table-label"><span >出生日期</span></td>
|
<td class="table-label"><span >出生日期</span></td>
|
||||||
<td class="table-content"><span ></span></td>
|
<td class="table-content"><span >{{form.birthday}}</span></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr >
|
<tr >
|
||||||
<td colspan="4" class="table-title">健康信息</td>
|
<td colspan="4" class="table-title">健康信息</td>
|
||||||
|
|
@ -192,12 +192,12 @@
|
||||||
</td>
|
</td>
|
||||||
<td class="table-label"><span >慢性病</span></td>
|
<td class="table-label"><span >慢性病</span></td>
|
||||||
<td class="table-content">
|
<td class="table-content">
|
||||||
<el-select v-model="form.chronicList" placeholder="请选择慢性病" multiple style="width: 220px" clearable collapse-tags>
|
<el-select v-model="form.chronicList" placeholder="请选择慢性病" style="width: 100%" multiple clearable collapse-tags>
|
||||||
<el-option v-for="item in chronicOptions"
|
<el-option v-for="item in this.chronicOptions"
|
||||||
:key="item.chronicId"
|
:key="item.chronicId"
|
||||||
:label="item.chronicName"
|
:label="item.chronicName"
|
||||||
:value="item.chronicId"
|
:value="item.chronicId"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
@ -213,18 +213,39 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
</td>
|
</td>
|
||||||
<td class="table-label"><span >怀孕日期</span></td>
|
<td class="table-label"><span >怀孕日期</span></td>
|
||||||
<td class="table-content"></td>
|
<td class="table-content">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="form.pregnancyDate"
|
||||||
|
type="date"
|
||||||
|
align="right"
|
||||||
|
unlink-panels
|
||||||
|
value-format="yyyy-MM-dd" style="width: 100%"
|
||||||
|
>
|
||||||
|
</el-date-picker>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr >
|
<tr >
|
||||||
<td class="table-label"><span >是否住院</span></td>
|
<td class="table-label"><span >是否住院</span></td>
|
||||||
<td class="table-content">
|
<td class="table-content">
|
||||||
<el-select v-model="form.ifHospitalized" placeholder="请选择是否住院" multiple style="width: 220px" clearable collapse-tags>
|
<el-select v-model="form.ifHospitalized" placeholder="请选择是否住院" style="width: 100%">
|
||||||
<el-option id="1">是</el-option>
|
<el-option v-for="item in this.ifHospitalizedOptions"
|
||||||
<el-option id="2">否</el-option>
|
:key="item.ifHospitalized"
|
||||||
|
:label="item.ifHospitalizedName"
|
||||||
|
:value="item.ifHospitalized"
|
||||||
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</td>
|
</td>
|
||||||
<td class="table-label"><span >住院日期</span></td>
|
<td class="table-label"><span >住院日期</span></td>
|
||||||
<td class="table-content"></td>
|
<td class="table-content">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="form.inpatientDate"
|
||||||
|
type="date"
|
||||||
|
align="right"
|
||||||
|
unlink-panels
|
||||||
|
value-format="yyyy-MM-dd" style="width: 100%"
|
||||||
|
>
|
||||||
|
</el-date-picker>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr >
|
<tr >
|
||||||
<td class="table-label"><span >劳动强度</span></td>
|
<td class="table-label"><span >劳动强度</span></td>
|
||||||
|
|
@ -250,7 +271,7 @@
|
||||||
<tr >
|
<tr >
|
||||||
<td class="table-label"><span >饮食医嘱</span></td>
|
<td class="table-label"><span >饮食医嘱</span></td>
|
||||||
<td class="table-content">
|
<td class="table-content">
|
||||||
<el-select v-model="form.doctorAdvice" placeholder="请选择饮食医嘱" multiple style="width: 220px" clearable collapse-tags>
|
<el-select v-model="form.doctorAdvice" placeholder="请选择饮食医嘱" style="width: 100%" >
|
||||||
<el-option v-for="item in doctorAdviceOptions"
|
<el-option v-for="item in doctorAdviceOptions"
|
||||||
:key="item.doctorAdvice"
|
:key="item.doctorAdvice"
|
||||||
:label="item.doctorAdviceName"
|
:label="item.doctorAdviceName"
|
||||||
|
|
@ -260,15 +281,18 @@
|
||||||
</td>
|
</td>
|
||||||
<td class="table-label"><span >体重控制目标</span></td>
|
<td class="table-label"><span >体重控制目标</span></td>
|
||||||
<td class="table-content">
|
<td class="table-content">
|
||||||
<el-select v-model="form.weightControl" placeholder="请选择" multiple style="width: 220px" clearable collapse-tags>
|
<el-select v-model="form.weightControl" placeholder="请选择" style="width: 100%" >
|
||||||
<el-option id="1">减肥</el-option>
|
<el-option v-for="item in weightControlOptions"
|
||||||
<el-option id="2">增重</el-option>
|
:key="item.weightControl"
|
||||||
|
:label="item.weightControlName"
|
||||||
|
:value="item.weightControl"
|
||||||
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr >
|
<tr >
|
||||||
<td class="table-label"><span >BMI(kg/m²)</span></td>
|
<td class="table-label"><span >BMI(kg/m²)</span></td>
|
||||||
<td class="table-content"></td>
|
<td class="table-content">{{form.bmi}}</td>
|
||||||
<td colspan="2"></td>
|
<td colspan="2"></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
@ -288,7 +312,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { deptTreeSelect } from '@/api/system/user'
|
import { deptTreeSelect } from '@/api/system/user'
|
||||||
import { dictHealthChronicApi,getHealthSciencePageApi,addHealthScienceApi,editHealthScienceApi,delHealthScienceApi,getHealthInfoPageApi } from "@/api/healthCenter/index";
|
import { dictHealthChronicApi,getHealthSciencePageApi,addHealthScienceApi,editHealthScienceApi,delHealthScienceApi,getHealthInfoPageApi,getHealthInfoDetailApi,editHealthInfoApi,delHealthInfoApi } from "@/api/healthCenter/index";
|
||||||
import { imgUpLoadTwo } from '@/api/system/upload'
|
import { imgUpLoadTwo } from '@/api/system/upload'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|
@ -314,33 +338,6 @@ export default {
|
||||||
// 是否显示弹出层
|
// 是否显示弹出层
|
||||||
open: false,
|
open: false,
|
||||||
dateRange:[new Date(),new Date()],
|
dateRange:[new Date(),new Date()],
|
||||||
pickerOptions: {
|
|
||||||
shortcuts: [{
|
|
||||||
text: '最近一周',
|
|
||||||
onClick(picker) {
|
|
||||||
const start = new Date();
|
|
||||||
const end = new Date();
|
|
||||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 6);
|
|
||||||
picker.$emit('pick', [start, end]);
|
|
||||||
}
|
|
||||||
},{
|
|
||||||
text: '最近一个月',
|
|
||||||
onClick(picker) {
|
|
||||||
const start = new Date();
|
|
||||||
const end = new Date();
|
|
||||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
|
|
||||||
picker.$emit('pick', [start, end]);
|
|
||||||
}
|
|
||||||
},{
|
|
||||||
text: '最近三个月',
|
|
||||||
onClick(picker) {
|
|
||||||
const start = new Date();
|
|
||||||
const end = new Date();
|
|
||||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 91);
|
|
||||||
picker.$emit('pick', [start, end]);
|
|
||||||
}
|
|
||||||
}]
|
|
||||||
},
|
|
||||||
chronicOptions:[],
|
chronicOptions:[],
|
||||||
doctorAdviceOptions:[{"doctorAdvice":1,"doctorAdviceName":"禁食"},
|
doctorAdviceOptions:[{"doctorAdvice":1,"doctorAdviceName":"禁食"},
|
||||||
{"doctorAdvice":2,"doctorAdviceName":"流食"},
|
{"doctorAdvice":2,"doctorAdviceName":"流食"},
|
||||||
|
|
@ -355,6 +352,14 @@ export default {
|
||||||
{"bloodType":5,"bloodTypeName":"Rh阳型"},
|
{"bloodType":5,"bloodTypeName":"Rh阳型"},
|
||||||
{"bloodType":6,"bloodTypeName":"Rh阴型"}
|
{"bloodType":6,"bloodTypeName":"Rh阴型"}
|
||||||
],//血型选项
|
],//血型选项
|
||||||
|
weightControlOptions:[
|
||||||
|
{"weightControl":1,"weightControlName":"减重"},
|
||||||
|
{"weightControl":2,"weightControlName":"增重"}
|
||||||
|
],//体重控制目标
|
||||||
|
ifHospitalizedOptions:[
|
||||||
|
{"ifHospitalized":1,"ifHospitalizedName":"是"},
|
||||||
|
{"ifHospitalized":2,"ifHospitalizedName":"否"}
|
||||||
|
],//是否住院
|
||||||
pregnantOptions:[
|
pregnantOptions:[
|
||||||
{"pregnantStatus":0,"pregnantStatusName":"保密"},
|
{"pregnantStatus":0,"pregnantStatusName":"保密"},
|
||||||
{"pregnantStatus":1,"pregnantStatusName":"未怀孕"},
|
{"pregnantStatus":1,"pregnantStatusName":"未怀孕"},
|
||||||
|
|
@ -379,12 +384,27 @@ export default {
|
||||||
articleType:null //类型
|
articleType:null //类型
|
||||||
},
|
},
|
||||||
form: {
|
form: {
|
||||||
articleTitle:null,
|
nickName:null,
|
||||||
summary:null,
|
userId:null,
|
||||||
chronicIdList:[],
|
orgFullName:null,
|
||||||
coverPhoto:null,
|
userType:null,
|
||||||
articleType:1,
|
mobile:null,
|
||||||
articleContent:null,
|
sex:1,
|
||||||
|
birthday:null,
|
||||||
|
doctorNum:null,
|
||||||
|
hospitalNum:null,
|
||||||
|
height:null,
|
||||||
|
weight:null,
|
||||||
|
bloodType:null,
|
||||||
|
chronicList:[],
|
||||||
|
pregnantStatus:null,
|
||||||
|
pregnancyDate:null,
|
||||||
|
ifHospitalized:null,
|
||||||
|
inpatientDate:null,
|
||||||
|
labourIntensity:null,
|
||||||
|
allergen:null,
|
||||||
|
doctorAdvice:null,
|
||||||
|
weightControl:null,
|
||||||
},//详情
|
},//详情
|
||||||
rules: {
|
rules: {
|
||||||
articleTitle: [
|
articleTitle: [
|
||||||
|
|
@ -505,46 +525,47 @@ export default {
|
||||||
},
|
},
|
||||||
handleUpdate(row) {
|
handleUpdate(row) {
|
||||||
this.form = Object.assign({}, row);
|
this.form = Object.assign({}, row);
|
||||||
if(this.form.coverPhoto){
|
getHealthInfoDetailApi(this.form).then(response => {
|
||||||
this.fileList=[{url:this.form.coverPhoto}]
|
this.form=response.data;
|
||||||
this.checkUrlList=[this.form.coverPhoto]
|
console.log("this.form",this.form);
|
||||||
}else{
|
this.form.chronicList=this.form.chronicIds!=null?this.form.chronicIds.split(","):[];
|
||||||
this.fileList=[]
|
if(this.form.coverPhoto){
|
||||||
this.checkUrlList=[]
|
this.fileList=[{url:this.form.coverPhoto}];
|
||||||
}
|
this.checkUrlList=[this.form.coverPhoto];
|
||||||
this.open = true;
|
}else{
|
||||||
this.title = "修改健康档案";
|
this.fileList=[];
|
||||||
|
this.checkUrlList=[];
|
||||||
|
}
|
||||||
|
this.open = true;
|
||||||
|
this.title = "修改健康档案";
|
||||||
|
});
|
||||||
|
|
||||||
},
|
},
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
submitForm: function() {
|
submitForm: function() {
|
||||||
this.$refs["form"].validate(valid => {
|
this.$refs["form"].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if(this.form.chronicIdList.length>0){
|
console.log("this.form",this.form)
|
||||||
this.form.chronicIds = this.form.chronicIdList.join(",")
|
if(this.form.chronicList.length>0){
|
||||||
|
this.form.chronicIds = this.form.chronicList.join(",")
|
||||||
}else{
|
}else{
|
||||||
this.form.chronicIds = ""
|
this.form.chronicIds = ""
|
||||||
}
|
}
|
||||||
this.form.coverPhoto = this.checkUrlList[0]
|
if (this.form.userId != undefined) {
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
if (this.form.articleId != undefined) {
|
editHealthInfoApi(this.form).then(response => {
|
||||||
editHealthScienceApi(this.form).then(response => {
|
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
} else {
|
|
||||||
addHealthScienceApi(this.form).then(response => {
|
|
||||||
this.$modal.msgSuccess("新增成功");
|
|
||||||
this.open = false;
|
|
||||||
this.getList();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
this.$modal.confirm('是否确认删除数据项?').then(function() {
|
this.$modal.confirm('是否确认删除数据项?').then(function() {
|
||||||
return delHealthScienceApi(row.articleId);
|
console.log("row",row)
|
||||||
|
return delHealthInfoApi(row);
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.getList();
|
this.getList();
|
||||||
this.$modal.msgSuccess("删除成功");
|
this.$modal.msgSuccess("删除成功");
|
||||||
|
|
@ -620,6 +641,7 @@ export default {
|
||||||
}
|
}
|
||||||
table td, table th{
|
table td, table th{
|
||||||
border-left: 1px solid #dfe6ec;
|
border-left: 1px solid #dfe6ec;
|
||||||
|
border-right: 1px solid #dfe6ec;
|
||||||
border-top: 1px solid #dfe6ec;
|
border-top: 1px solid #dfe6ec;
|
||||||
}
|
}
|
||||||
.table-title {
|
.table-title {
|
||||||
|
|
|
||||||
|
|
@ -382,6 +382,7 @@ export default {
|
||||||
},
|
},
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
this.$modal.confirm('是否确认删除数据项?').then(function() {
|
this.$modal.confirm('是否确认删除数据项?').then(function() {
|
||||||
|
console.log("row",row)
|
||||||
return delHealthScienceApi(row.articleId);
|
return delHealthScienceApi(row.articleId);
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.getList();
|
this.getList();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue