优化儿童体检表
This commit is contained in:
parent
7c5ac8e992
commit
381e15ef9c
@ -1,10 +1,21 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px">
|
||||
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryForm"
|
||||
:inline="true"
|
||||
label-width="68px"
|
||||
clearable
|
||||
size="small"
|
||||
>
|
||||
<el-form-item label="班级信息" prop="classInfo">
|
||||
<el-select v-model="queryParams.classInfo" placeholder="请选择班级信息" clearable size="small">
|
||||
<el-option label="请选择字典生成" value />
|
||||
<el-select v-model="queryParams.classInfo" placeholder="请选择班级信息">
|
||||
<el-option
|
||||
v-for="dict in classInfoOptions"
|
||||
:key="dict.bjbh"
|
||||
:label="dict.bjmc"
|
||||
:value="dict.bjbh"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="检查日期" prop="checkTime">
|
||||
@ -171,13 +182,25 @@
|
||||
<!-- 添加或修改儿童常规体检记录对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="班级信息">
|
||||
<el-select v-model="form.classInfo" placeholder="请选择班级信息">
|
||||
<el-option label="请选择字典生成" value />
|
||||
<el-form-item label="班级信息" prop="classInfo">
|
||||
<el-select v-model="form.classInfo" placeholder="请选择班级信息" @change="classInfoChange">
|
||||
<el-option
|
||||
v-for="dict in classInfoOptions"
|
||||
:key="dict.bjbh"
|
||||
:label="dict.bjmc"
|
||||
:value="dict.bjbh"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="学校名称" prop="schoolName">
|
||||
<el-input v-model="form.schoolName" placeholder="请输入学校名称" />
|
||||
<el-form-item label="幼儿id" prop="childId">
|
||||
<el-select v-model="form.childId" placeholder="请选择班级信息" >
|
||||
<el-option
|
||||
v-for="dict in (childInfoOptions.filter(c=>c.classid == this.form.classInfo))"
|
||||
:key="dict.id"
|
||||
:label="dict.name"
|
||||
:value="dict.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="检查日期" prop="checkTime">
|
||||
<el-date-picker
|
||||
@ -255,9 +278,6 @@
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建人" prop="createuser">
|
||||
<el-input v-model="form.createuser" placeholder="请输入创建人" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
@ -276,6 +296,8 @@ import {
|
||||
updateHealthcheck,
|
||||
exportHealthcheck
|
||||
} from "@/api/benyi/healthcheck";
|
||||
import { listClass } from "@/api/system/class";
|
||||
import { listChild } from "@/api/benyi/child";
|
||||
|
||||
export default {
|
||||
name: "Healthcheck",
|
||||
@ -297,6 +319,10 @@ export default {
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
//班级类型 字典
|
||||
classInfoOptions: [],
|
||||
// 班级下幼儿列表
|
||||
childInfoOptions: [],
|
||||
// 视力评价字典
|
||||
visionAssessmentOptions: [],
|
||||
// 是否龋齿字典
|
||||
@ -307,6 +333,7 @@ export default {
|
||||
heightAssessmentOptions: [],
|
||||
// 总评价字典
|
||||
totalAssessmentOptions: [],
|
||||
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
@ -330,12 +357,15 @@ export default {
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
|
||||
// 表单校验
|
||||
rules: {}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.getclassinfo();
|
||||
|
||||
this.getDicts("sys_vision_assessment").then(response => {
|
||||
this.visionAssessmentOptions = response.data;
|
||||
});
|
||||
@ -353,6 +383,14 @@ export default {
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
// 班级选择框变化后触发
|
||||
classInfoChange() {
|
||||
this.queryParams.childId = null;
|
||||
listChild(null).then(response => {
|
||||
this.childInfoOptions = response.rows;
|
||||
});
|
||||
|
||||
},
|
||||
/** 查询儿童常规体检记录列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
@ -362,6 +400,12 @@ export default {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 查询所有班级信息
|
||||
getclassinfo() {
|
||||
listClass(null).then(response => {
|
||||
this.classInfoOptions = response.rows;
|
||||
});
|
||||
},
|
||||
// 视力评价字典翻译
|
||||
visionAssessmentFormat(row, column) {
|
||||
return this.selectDictLabel(
|
||||
|
@ -3,6 +3,7 @@ package com.ruoyi.project.benyi.domain;
|
||||
import java.util.Date;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.project.system.domain.ByClass;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.framework.aspectj.lang.annotation.Excel;
|
||||
@ -121,6 +122,8 @@ public class ByChildHealthCheck extends BaseEntity {
|
||||
|
||||
private ByChild byChild;
|
||||
|
||||
private ByClass byClass;
|
||||
|
||||
private Long createuser;
|
||||
|
||||
public void setId(Long id) {
|
||||
@ -272,6 +275,7 @@ public class ByChildHealthCheck extends BaseEntity {
|
||||
.append("createtime", getCreatetime())
|
||||
.append("createuser", getCreateuser())
|
||||
.append("byChild", getByChild())
|
||||
.append("byClass", getByChild())
|
||||
.toString();
|
||||
}
|
||||
|
||||
@ -290,4 +294,12 @@ public class ByChildHealthCheck extends BaseEntity {
|
||||
public void setByChild(ByChild byChild) {
|
||||
this.byChild = byChild;
|
||||
}
|
||||
|
||||
public ByClass getByClass() {
|
||||
return byClass;
|
||||
}
|
||||
|
||||
public void setByClass(ByClass byClass) {
|
||||
this.byClass = byClass;
|
||||
}
|
||||
}
|
||||
|
@ -23,6 +23,26 @@
|
||||
<result property="createtime" column="createtime"/>
|
||||
<result property="createuser" column="createuser"/>
|
||||
<association property="byChild" column="id" javaType="ByChild" resultMap="ByChildResult" />
|
||||
<association property="byClass" column="bjbh" javaType="ByClass" resultMap="ByClassResult" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="ByClass" id="ByClassResult">
|
||||
<result property="bjbh" column="bjbh"/>
|
||||
<result property="deptId" column="dept_id"/>
|
||||
<result property="bjtype" column="bjtype"/>
|
||||
<result property="bhxh" column="bhxh"/>
|
||||
<result property="xn" column="xn"/>
|
||||
<result property="bjmc" column="bjmc"/>
|
||||
<result property="bjrych" column="bjrych"/>
|
||||
<result property="jbny" column="jbny"/>
|
||||
<result property="zbjs" column="zbjs"/>
|
||||
<result property="zbjsxm" column="zbjsxm"/>
|
||||
<result property="pbjs" column="pbjs"/>
|
||||
<result property="pbjsxm" column="pbjsxm"/>
|
||||
<result property="zljs" column="zljs"/>
|
||||
<result property="zljsxm" column="zljsxm"/>
|
||||
<result property="isdel" column="isdel"/>
|
||||
<result property="createtime" column="createtime"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="ByChild" id="ByChildResult">
|
||||
@ -71,9 +91,10 @@
|
||||
|
||||
<sql id="selectByChildHealthCheckVo">
|
||||
select h.id, h.child_id, h.class_info, h.school_name, h.check_time, h.doctor_name, h.eyes_vision_left, h.eyes_vision_right, h.vision_assessment, h.decayed_tooth, h.weight, h.weight_assessment, h.height, h.height_assessment, h.total_assessment, h.createtime, h.createuser,
|
||||
c.id, c.schoolid, c.classid, c.name
|
||||
from by_child_health_check h
|
||||
left join by_child c on h.child_id = c.id
|
||||
c.id, c.schoolid, c.classid, c.name, b.bjbh, b.bjmc
|
||||
from by_child_health_check h
|
||||
left join by_child c on h.child_id = c.id
|
||||
left join by_class b on h.class_info = b.bjbh
|
||||
</sql>
|
||||
|
||||
<select id="selectByChildHealthCheckList" parameterType="ByChildHealthCheck" resultMap="ByChildHealthCheckResult">
|
||||
@ -109,7 +130,7 @@
|
||||
|
||||
<select id="selectByChildHealthCheckById" parameterType="Long" resultMap="ByChildHealthCheckResult">
|
||||
<include refid="selectByChildHealthCheckVo"/>
|
||||
where id = #{id}
|
||||
where h.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertByChildHealthCheck" parameterType="ByChildHealthCheck" useGeneratedKeys="true" keyProperty="id">
|
||||
|
Loading…
x
Reference in New Issue
Block a user