jsk bug修正

This commit is contained in:
skjia 2025-07-18 15:55:30 +08:00
parent 6744dda6b8
commit 1ccebfe824
1 changed files with 39 additions and 14 deletions

View File

@ -65,8 +65,19 @@
<u-icon slot="right" name="arrow-right"></u-icon>
</u-form-item>
<u-form-item label="医嘱" borderBottom labelWidth="200rpx">
<!-- <u-form-item label="医嘱" borderBottom labelWidth="200rpx">
<text class="u-content-color">{{doctorAdvices}}</text>
</u-form-item> -->
<u-form-item label="医嘱" prop="doctorAdvice" borderBottom labelWidth="200rpx" @click="showSelector('doctorAdvice')">
<u--input
v-model="doctorAdviceName"
disabled
border="none"
disabledColor="#ffffff"
placeholder="请选择"
></u--input>
<u-icon slot="right" name="arrow-right"></u-icon>
</u-form-item>
<u-form-item label="孕否" prop="pregnantStatus" borderBottom labelWidth="200rpx" @click="showSelector('pregnantStatus')">
@ -135,8 +146,9 @@ export default {
weightControl: { options: [{ name: '减重', value: '1' }, { name: '增重', value: '2' }], 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: '是否怀孕' }
},
pregnantStatus: { options: [{ name: '保密', value: '0' },{ name: '是', value: '2' }, { name: '否', value: '1' }], title: '是否怀孕' },
doctorAdvice: { options: [{ name: '禁食', value: '1' }, { name: '流食', value: '2' }, { name: '半流食', value: '3' }, { name: '治疗饮食', value: '4' }], title: '请选择医嘱' },
},
chronicDiseaseOptions: [
{ label: '糖尿病', value: 'diabetes' },
{ label: '肾结石', value: 'kidney_stone' },
@ -148,15 +160,16 @@ export default {
weight: { type: 'number', required: true, message: '请输入体重', trigger: ['blur', 'change'] },
// labourIntensity: { type: 'string',required: true, message: '', trigger: ['change'] }
},
doctorAdvices:'暂无医嘱',
// doctorAdvices:'',
weightControlName: '',
labourIntensityName: '',
ifHospitalizedName: '',
pregnantStatusName: '',
doctorAdviceName:'',
chronicList:[],
form: {
nickName:null,
userId:null,
userId:uni.getStorageSync('userId'),
orgFullName:null,
userType:null,
mobile:null,
@ -186,6 +199,7 @@ export default {
'form.labourIntensity': 'updateDisplayLaborIntensityName',
'form.ifHospitalized': 'updateDisplayHousingName',
'form.pregnantStatus': 'updatePregnantStatusName',
'form.doctorAdvice': 'updateDoctorAdviceName',
},
onLoad() {
@ -206,18 +220,24 @@ export default {
"userId": uni.getStorageSync('userId')
}
const res = await healthDetailApi(param)
console.log("无信息",res);
if(res.data==null||res.data==undefined||res.data==''){
return;
}
this.form = res.data;
this.form.userId=uni.getStorageSync('userId');
console.log("this.form",this.form)
if(this.form.chronicIds){
this.form.chronicDiseases = this.form.chronicIds.split(",")
if(this.form.doctorAdvice=='1'){
this.doctorAdvices='禁食';
}else if(this.form.doctorAdvice=='2'){
this.doctorAdvices='流食';
}else if(this.form.doctorAdvice=='3'){
this.doctorAdvices='半流食';
}else if(this.form.doctorAdvice=='4'){
this.doctorAdvices='治疗饮食';
}
// if(this.form.doctorAdvice=='1'){
// this.doctorAdvices='';
// }else if(this.form.doctorAdvice=='2'){
// this.doctorAdvices='';
// }else if(this.form.doctorAdvice=='3'){
// this.doctorAdvices='';
// }else if(this.form.doctorAdvice=='4'){
// this.doctorAdvices='';
// }
}
console.log(res, '详情')
},
@ -257,9 +277,14 @@ export default {
},
updateDisplayHousingName() {
this.ifHospitalizedName = this.getDisplayName('ifHospitalized', this.form.ifHospitalized);
console.log("this.ifHospitalizedName",this.ifHospitalizedName);
},
updatePregnantStatusName() {
this.pregnantStatusName = this.getDisplayName('pregnantStatus', this.form.pregnantStatus);
},
updateDoctorAdviceName() {
this.doctorAdviceName = this.getDisplayName('doctorAdvice', this.form.doctorAdvice);
console.log("this.doctorAdviceName",this.doctorAdviceName);
},
getDisplayName(selector, value) {
const options = this.selectors[selector]?.options || [];