Merge branch 'master' of http://192.168.0.75:3000/bonus/jyy-smart-canteen-h5
This commit is contained in:
		
						commit
						1b0778606e
					
				| 
						 | 
				
			
			@ -5,7 +5,7 @@ import request from '@/utils/request';
 | 
			
		|||
  */
 | 
			
		||||
 export function healthDetailApi(data) {
 | 
			
		||||
   return request({
 | 
			
		||||
     url: '/smart-canteen/health_person_info/detail-health-info',
 | 
			
		||||
     url: '/smart-canteen/health_person_info/detail-health-appinfo',
 | 
			
		||||
     method: 'post',
 | 
			
		||||
     data
 | 
			
		||||
   })
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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,7 +146,8 @@ 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' },
 | 
			
		||||
| 
						 | 
				
			
			@ -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 || [];
 | 
			
		||||
| 
						 | 
				
			
			@ -286,7 +311,7 @@ export default {
 | 
			
		|||
        }
 | 
			
		||||
      }).catch(errors => {
 | 
			
		||||
        console.error('Validation failed:', errors);
 | 
			
		||||
        uni.$u.toast('请检查并修正错误');
 | 
			
		||||
        uni.$u.toast('请填写完整信息');
 | 
			
		||||
      });
 | 
			
		||||
    },
 | 
			
		||||
    hideKeyboard() {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue