体检
This commit is contained in:
@@ -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()
|
||||||
|
|||||||
Reference in New Issue
Block a user