This commit is contained in:
Paidax
2025-06-04 10:51:35 +08:00
parent 7decda0510
commit 482e6da554
2 changed files with 29 additions and 8 deletions
@@ -217,4 +217,16 @@ public class MHealthCheckupListController {
dao.execute(sql); dao.execute(sql);
return sql.getResult(); return sql.getResult();
} }
@At
@RequiresAuthentication
public Object getUserChoose(String projectId){
HealthCheckupUserSelection fetch = dao.fetch(HealthCheckupUserSelection.class, Cnd.where("projectId", "=", projectId).and("selectUserId", "=", ShiroUtil.getUserId()));
if (Lang.isNotEmpty(fetch)) {
return Result.success().addData(fetch.getId());
} else {
return Result.error();
}
}
} }
@@ -535,6 +535,13 @@ layout("/mobile/platform.html"){
// this.formData.campusName = o.campusName // this.formData.campusName = o.campusName
}, },
async getUserInfo() { async getUserInfo() {
const data = await $.post("/mobile/healthCheckup/getUserChoose", {
projectId: this.id
})
if (data.code === 0) {
this.selectId = data.data
await this.getSelectInfo()
} else {
const resp = await $.post("/mobile/healthCheckup/getUserInfo") const resp = await $.post("/mobile/healthCheckup/getUserInfo")
if (resp.code === 0) { if (resp.code === 0) {
this.$set(this.formData, "username", resp.data.username) this.$set(this.formData, "username", resp.data.username)
@@ -543,6 +550,7 @@ layout("/mobile/platform.html"){
this.$set(this.formData, "idcard", resp.data.idcard) this.$set(this.formData, "idcard", resp.data.idcard)
this.$set(this.formData, "age", resp.data.age) this.$set(this.formData, "age", resp.data.age)
} }
}
}, },
validateIdCard(idCard) { validateIdCard(idCard) {
if (!idCard) { if (!idCard) {
@@ -590,9 +598,10 @@ layout("/mobile/platform.html"){
this.id = GetQueryString("projectId") this.id = GetQueryString("projectId")
this.selectId = GetQueryString("selectId") this.selectId = GetQueryString("selectId")
await this.getCampus() await this.getCampus()
if (GetQueryString("selectId")) { if (this.selectId) {
await this.getSelectInfo() await this.getSelectInfo()
} else { } else {
// 去查询有没有选过
this.getUserInfo() this.getUserInfo()
} }
await this.findSubject() await this.findSubject()