Browse Source

注释接口打开

newMaster
liuzhipeng 3 months ago
parent
commit
52d92f1419
  1. 46
      acupuncture-前台/src/views/screening/h5.vue
  2. 4
      acupuncture-前台/src/views/screening/index.vue
  3. 2
      acupuncture-前台/src/views/screening/qrCode.vue

46
acupuncture-前台/src/views/screening/h5.vue

@ -39,14 +39,15 @@
></el-input>
</el-form-item>
<el-form-item label="性别" prop="SCWJ-SEX">
<el-radio v-model="form['SCWJ-SEX']" label="0"></el-radio>
<el-radio v-model="form['SCWJ-SEX']" label="1"></el-radio>
<el-radio v-model="form['SCWJ-SEX']" label=""></el-radio>
<el-radio v-model="form['SCWJ-SEX']" label=""></el-radio>
</el-form-item>
<el-form-item label="出生日期" prop="SCWJ-BIRTH">
<el-date-picker
v-model="form['SCWJ-BIRTH']"
type="date"
placeholder="选择日期"
@change="calculateAge"
>
</el-date-picker>
</el-form-item>
@ -54,7 +55,7 @@
<el-input
v-model="form['SCWJ-AGE']"
type="number"
placeholder="请输入姓名"
placeholder="请输入年龄"
></el-input>
</el-form-item>
<el-form-item label="联系方式" prop="SCWJ-PHONE">
@ -382,9 +383,24 @@ export default {
},
created() {
this.hospitalId = this.$route.query.hospitalId;
// this.getqueryHospitalNoToken(); // id
this.getQueryHospitalNoToken(); // id
},
methods: {
//
calculateAge() {
const birthDate = new Date(this.form["SCWJ-BIRTH"]);
const today = new Date();
let age = today.getFullYear() - birthDate.getFullYear();
const monthDiff = today.getMonth() - birthDate.getMonth();
if (
monthDiff < 0 ||
(monthDiff === 0 && today.getDate() < birthDate.getDate())
) {
age--;
}
this.form["SCWJ-AGE"] = age;
},
// ,
async changeFile(e) {
this.loading = false;
@ -420,8 +436,8 @@ export default {
// BIM
calculateBMI() {
if (this.form["SCWJ-WEIGHT"] && this.form["SCWJ-HEIGHT"]) {
const weight = parseFloat(this.form.weight);
const height = parseFloat(this.form.height);
const weight = parseFloat(this.form["SCWJ-WEIGHT"]);
const height = parseFloat(this.form["SCWJ-HEIGHT"]);
const bmi = weight / (height / 100) ** 2;
this.form["SCWJ-BMI"] = bmi.toFixed(2);
this.getBMITips(bmi);
@ -517,15 +533,15 @@ export default {
this.id = res.data.id;
// ------ ------
//
await this.saveAnswer(form["SCWJ-NAME"], "SCWJ-NAME");
await this.saveAnswer(form["SCWJ-SEX"], "SCWJ-SEX");
await this.saveAnswer(form["SCWJ-BIRTH"], "SCWJ-BIRTH");
await this.saveAnswer(form["SCWJ-AGE"], "SCWJ-AGE");
await this.saveAnswer(form["SCWJ-PHONE"], "SCWJ-PHONE");
await this.saveAnswer(form["SCWJ-HEIGHT"], "SCWJ-HEIGHT");
await this.saveAnswer(form["SCWJ-WEIGHT"], "SCWJ-WEIGHT");
await this.saveAnswer(form["SCWJ-BMI"], "SCWJ-BMI");
await this.saveAnswer(form["SCWJ-JL"], "SCWJ-JL");
await this.saveAnswer(this.form["SCWJ-NAME"], "SCWJ-NAME");
await this.saveAnswer(this.form["SCWJ-SEX"], "SCWJ-SEX");
await this.saveAnswer(this.form["SCWJ-BIRTH"], "SCWJ-BIRTH");
await this.saveAnswer(this.form["SCWJ-AGE"], "SCWJ-AGE");
await this.saveAnswer(this.form["SCWJ-PHONE"], "SCWJ-PHONE");
await this.saveAnswer(this.form["SCWJ-HEIGHT"], "SCWJ-HEIGHT");
await this.saveAnswer(this.form["SCWJ-WEIGHT"], "SCWJ-WEIGHT");
await this.saveAnswer(this.form["SCWJ-BMI"], "SCWJ-BMI");
await this.saveAnswer(this.form["SCWJ-JL"], "SCWJ-JL");
//
await this.saveAnswer(score, "SCWJ-RESULT");
// ------ ------

4
acupuncture-前台/src/views/screening/index.vue

@ -180,7 +180,7 @@
<el-table-column
label="组织"
align="center"
prop="name"
prop="tenantName"
min-width="150"
show-overflow-tooltip
fixed="right"
@ -231,7 +231,7 @@ export default {
},
created() {
// this.getLastWeekDays(); //
// this.getList(); //
this.getList(); //
this.getTenantsList(); //
},
methods: {

2
acupuncture-前台/src/views/screening/qrCode.vue

@ -212,7 +212,7 @@ export default {
};
},
created() {
// this.getList(); //
this.getList(); //
this.getTenantsList(); //
},
methods: {

Loading…
Cancel
Save