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

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

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

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

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

Loading…
Cancel
Save