jsk APP健康问题修改

This commit is contained in:
skjia 2025-06-13 13:25:10 +08:00
parent ed880866e1
commit ce50e386bc
5 changed files with 214 additions and 62 deletions

View File

@ -5,7 +5,7 @@ import request from '@/utils/request';
*/
export function healthDetailApi(data) {
return request({
url: '/smart-canteen/health/info/detail-health-info',
url: '/smart-canteen/health_person_info/detail-health-info',
method: 'post',
data
})
@ -16,7 +16,7 @@ import request from '@/utils/request';
*/
export function editHealthInfoApi(data) {
return request({
url: '/smart-canteen/health/info/edit-health-info',
url: '/smart-canteen/health_person_info/edit-health-info',
method: 'post',
data
})
@ -28,7 +28,7 @@ import request from '@/utils/request';
*/
export function dictHealthChronicApi(data) {
return request({
url: '/smart-canteen/health/chronic/dict-health-chronic',
url: '/smart-canteen/health_chronic/dict-health-chronic',
method: 'post',
data
})
@ -41,7 +41,7 @@ export function dictHealthChronicApi(data) {
*/
export function getHealthSciencePageApi(data) {
return request({
url: '/smart-canteen/health_popular_science/list',
url: '/smart-canteen/health_popular_article/list',
method: 'get',
params:data
})

View File

@ -6,7 +6,7 @@ import request from '@/utils/request';
*/
export function listMedicalReportApi(data) {
return request({
url: '/smart-canteen/health/medicalreport/list-medicalreport',
url: '/smart-canteen/health_person_medical_report/getReportList',
method: 'post',
data
})
@ -17,7 +17,7 @@ export function listMedicalReportApi(data) {
*/
export function getMedicalReportInfoApi(data) {
return request({
url: '/smart-canteen/health/medicalreport/get-medicalreport-info',
url: '/smart-canteen/health_person_medical_report/getReportById',
method: 'post',
data
})
@ -30,8 +30,8 @@ export function getMedicalReportInfoApi(data) {
*/
export function listTemplateApi(data) {
return request({
url: '/smart-canteen/health/medicalreport/list-template',
method: 'post',
url: '/smart-canteen/health_medical_report_template/getModelList',
method: 'get',
data
})
}
@ -40,7 +40,7 @@ export function listTemplateApi(data) {
*/
export function getTemplateInfoApi(data) {
return request({
url: '/smart-canteen/health/medicalreport/get-template-info',
url: '/smart-canteen/health_medical_report_template/getModelById',
method: 'post',
data
})
@ -50,7 +50,7 @@ export function getTemplateInfoApi(data) {
*/
export function editMedicalReportApi(data) {
return request({
url: '/smart-canteen/health/medicalreport/edit-medicalreport',
url: '/smart-canteen/health_person_medical_report/addReport',
method: 'post',
data
})

View File

@ -129,21 +129,11 @@ export default {
data() {
return {
fontValue:uni.getStorageSync('fontSize') || 8,
form: {
height: null,
weight: null,
weightControl: '',
bmi: '',
labourIntensity: '',
ifHospitalized: '',
allergen: '',
chronicDiseases: []
},
selectorVisible: false,
currentSelector: null,
selectors: {
weightControl: { options: [{ name: '减重', value: '1' }, { name: '增重', value: '2' }], title: '请选择体重控制' },
labourIntensity: { options: [{ name: '轻劳力', value: '1' }, { name: '中等强度劳动', value: '2' }, { name: '重强度劳动', value: '3' }, { name: '孕妇(早期)', value: '4' }, { name: '孕妇(中期)', value: '5' }, { name: '孕妇(晚期)', value: '6' }, { name: '乳母', value: '7' }], title: '请选择劳动强度' },
labourIntensity: { options: [{ name: '轻劳力', value: '1' }, { name: '中等强度劳动', value: '2' }, { name: '重强度劳动', value: '3' }], title: '请选择劳动强度' },
ifHospitalized: { options: [{ name: '是', value: '1' }, { name: '否', value: '2' }], title: '是否住院' },
pregnantStatus: { options: [{ name: '保密', value: '0' },{ name: '是', value: '2' }, { name: '否', value: '1' }], title: '是否怀孕' }
},
@ -162,7 +152,30 @@ export default {
labourIntensityName: '',
ifHospitalizedName: '',
pregnantStatusName: '',
chronicList:[]
chronicList:[],
form: {
nickName:null,
userId:null,
orgFullName:null,
userType:null,
mobile: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,
},//
}
},
watch: {

View File

@ -21,8 +21,28 @@
:closeOnClickOverlay="true" :formatter="formatter" @cancel="dateShow = false" @confirm="birthDayConfirm">
</u-datetime-picker>
<scroll-view style="width: 100%;height: 70vh;" scroll-y="true" v-if="!sumbitStaus">
<view style="height: auto;padding-bottom: 20rpx;">
<view v-for="(item,index) in reportList":key="index">
<table style="width: 100%;" v-for="(itmes,index) in reportList">
<tr>
<td colspan="3" align="left"><span>{{itmes.medicalProjectName}}</span></td>
</tr>
<tr>
<td><span>项目名称</span></td>
<td><span>检查结果</span></td>
<td><span>单位</span></td>
</tr>
<tr v-for="(itme,indexd) in itmes.healthMedicalReportDetails">
<td>{{itme.medicalProjectDetailName}}</td>
<td><u-input
v-model="itme.result"
placeholder="请输入结果"
maxlength="3"
show-word-limit
/></td>
<td>{{itme.medicalProjectDetailUnit}}</td>
</tr>
</table>
<!-- <view style="height: auto;padding-bottom: 20rpx;">
<view v-for="(item,index) in this.reportList":key="index">
<view class="list-title">
<text>{{item.medicalProjectName}}</text>
</view>
@ -36,10 +56,10 @@
</view>
</view>
</view>
</view>
</view> -->
</scroll-view>
<!-- 提交按钮 -->
<view class="submit-btn" v-if="!sumbitStaus">
<view class="submit-btn" v-if="!sumbitStausV">
<u-button
shape="squrd"
@click="saveReport"
@ -73,7 +93,9 @@ export default {
paramsData:{},
medicalTemplateId:"",
reportList:[],
sumbitStaus:false
sumbitStaus:false,
sumbitStausV:true,
reportModelId:"",
}
},
onLoad(opt) {
@ -88,6 +110,7 @@ export default {
this.medicalDate = this.paramsData.medicalDate
}else{
//
this.sumbitStausV=false;
this.listTemplate()
}
@ -97,9 +120,9 @@ export default {
async listTemplate() {
let param = { }
const res = await listTemplateApi(param)
this.medicalTemplateId = res[0].medicalTemplateId
this.getTemplateInfo()
console.log(res, '模板--------')
this.medicalTemplateId = res.data[0].medicalTemplateId
this.getTemplateInfo()
},
//
async getTemplateInfo() {
@ -107,8 +130,8 @@ export default {
"medicalTemplateId": this.medicalTemplateId,
}
const res = await getTemplateInfoApi(param)
this.reportList = res
console.log(res, '模板--------')
this.reportList = res.data
},
//
async getMedicalReportInfo() {
@ -116,41 +139,58 @@ export default {
"medicalId": this.paramsData.medicalId,
}
const res = await getMedicalReportInfoApi(param)
this.reportList = res
this.reportList = res.data
console.log(res, '详情--------')
},
saveReport() {
if(!this.sumbitStaus){
this.sumbitStaus=true
let param = {}
if(this.paramsData.medicalId&&this.paramsData.medicalId!=""){
param = {
"medicalId": this.paramsData.medicalId,
"userId": uni.getStorageSync('userId'),
"medicalDate": this.medicalDate,
"medicalTemplateId": this.medicalTemplateId,
"medicalMechanism": this.medicalMechanism,
"reportProjectVOS":this.reportList
}
}else{
param = {
"userId": uni.getStorageSync('userId'),
"medicalDate": this.medicalDate,
"medicalTemplateId": this.medicalTemplateId,
"medicalMechanism": this.medicalMechanism,
"reportProjectVOS":this.reportList
}
}
editMedicalReportApi(param).then((res)=>{
if(res.code==200){
this.sumbitStaus=false
uni.navigateBack()
}else{
this.sumbitStaus=false
}
}).catch(()=>{
this.sumbitStaus=false
})
console.log("确认获取数据",this.reportList)
if(this.medicalDate==null||this.medicalDate==""||this.medicalDate==undefined||this.medicalMechanism==null||this.medicalMechanism==""||this.medicalMechanism==undefined){
this.$modal.msgSuccess("请检查机构或时间是否填入");
return;
}
let params={
"medicalTemplateId":this.medicalTemplateId,
"medicalDate":this.medicalDate,
"medicalMechanism":this.medicalMechanism,
"userId":uni.getStorageSync('userId'),
"reportDatas":this.reportList
}
console.log("params",params)
editMedicalReportApi(params).then(response => {
this.sumbitStaus=false
uni.navigateBack()
});
// let param = {}
// if(this.paramsData.medicalId&&this.paramsData.medicalId!=""){
// param = {
// "medicalId": this.paramsData.medicalId,
// "userId": uni.getStorageSync('userId'),
// "medicalDate": this.medicalDate,
// "medicalTemplateId": this.medicalTemplateId,
// "medicalMechanism": this.medicalMechanism,
// "reportProjectVOS":this.reportList
// }
// }else{
// param = {
// "userId": uni.getStorageSync('userId'),
// "medicalDate": this.medicalDate,
// "medicalTemplateId": this.medicalTemplateId,
// "medicalMechanism": this.medicalMechanism,
// "reportProjectVOS":this.reportList
// }
// }
// editMedicalReportApi(param).then((res)=>{
// if(res.code==200){
// this.sumbitStaus=false
// uni.navigateBack()
// }else{
// this.sumbitStaus=false
// }
// }).catch(()=>{
// this.sumbitStaus=false
// })
}
},
@ -265,6 +305,105 @@ export default {
display: flex;align-items: center;
justify-content: space-between;
}
.addReportStyle{
width: 880px;
height: 100%;
margin-right: 0;
margin-left: auto;
}
.el-dialog {
margin: 0 !important; /* 重置默认的margin */
position: fixed !important; /* 固定定位 */
top: 20px; /* 距离顶部距离 */
right: 20px; /* 靠右距离 */
}
.remind-question{
width: 100%;
height: 50px;
font-size: 22px;
display: flex;
align-items: center;
justify-content: center;
}
.remind-title{
width: 100%;
height: 40px;
font-size: 16px;
font-weight: bold;
color: #000;
display: flex;
align-items: center;
justify-content: center;
}
table td, table th{
border: 1px solid #dfe6ec;
}
.table-title {
height: 45px;
background-color: #f8f8f9;
}
.table-label{
height: 45px;
width: 110px;
min-width: 100px;
background-color: #f8f8f9;
}
.table-content{
min-width: 250px;
}
//css
::v-deep.disabled {
.el-upload--picture-card {
display: none;
}
}
.box-content {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
}
.box {
width: 100%;
height: 100%;
min-width: 1000px;
text-align: center;
color: rgba(80, 81, 82, .9098039215686274);
}
.box .title {
margin-top: 40px;
font-size: 24px;
font-weight: 700;
color: #101d34;
}
.header-box {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
font-weight: 600;
margin-top: 40px;
-ms-flex-pack: distribute;
justify-content: space-around;
font-size: 16px;
font-weight: 400;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
color: #8195a5;
border-bottom: 1px solid #e5ebef;
padding-bottom: 20px;
margin-bottom: 40px;
}
.tabledata span{
font-size: 16px;
font-weight: 700;
color: #000;
}
</style>

View File

@ -79,7 +79,7 @@ export default {
}
const res = await listMedicalReportApi(param)
console.log(res, '列表')
this.messageList = res
this.messageList = res .data
},
handleMessageClick(item) {
console.log('?? ~ handleMessageClick ~ ', item)