幼儿评估

This commit is contained in:
paidaxing444 2020-11-05 17:19:00 +08:00
parent d90fa8a860
commit ff6935c349
10 changed files with 356 additions and 8 deletions

View File

@ -424,6 +424,21 @@ export const constantRoutes = [{
}
}]
},
{
path: '/benyi/assessmentchild',
component: Layout,
hidden: true,
children: [{
path: 'student/:id(\\d+)',
component: () =>
import ('@/views/benyi/assessment/student'),
name: 'assessmentchild',
meta: {
title: '幼儿评估详情',
icon: ''
}
}]
},
{
path: '/job',
component: Layout,

View File

@ -0,0 +1,201 @@
<template>
<div class="app-container">
<el-form
:model="queryParams"
ref="queryForm"
:inline="true"
label-width="68px"
>
<el-form-item label="幼儿姓名" prop="name">
<el-input
v-model="queryParams.name"
placeholder="请输入幼儿姓名"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button
>
</el-form-item>
</el-form>
<el-table
v-loading="loading"
:data="childList"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" align="center" />
<!-- <el-table-column label="编号" align="center" prop="id" /> -->
<!-- <el-table-column label="幼儿园名称" align="center" prop="schoolid" /> -->
<el-table-column
label="班级名称"
align="center"
prop="classid"
:formatter="classFormat"
/>
<el-table-column label="幼儿姓名" align="center" prop="name" />
<el-table-column label="幼儿出生日期" align="center" prop="csrq" />
<el-table-column
label="性别"
align="center"
prop="xb"
:formatter="xbFormat"
/>
<el-table-column
label="状态"
align="center"
prop="status"
:formatter="statusFormat"
/>
<el-table-column
label="操作"
align="center"
class-name="small-padding fixed-width"
>
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleAssessment(scope.row)"
>评估</el-button
>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</template>
<script>
import {
listChild,
getChild,
delChild,
addChild,
updateChild,
updateChild_tb,
importTemplate,
} from "@/api/benyi/child";
import { listClass } from "@/api/system/class";
export default {
name: "assessmentChild",
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
total: 0,
//
childList: [],
//
statusOptions: [],
//
sexOptions: [],
//
classOptions: [],
//
queryParams: {
pageNum: 1,
pageSize: 10,
classid: undefined,
name: undefined,
},
//
form: {},
};
},
created() {
this.getList();
this.getClassList();
this.getDicts("sys_user_sex").then((response) => {
this.sexOptions = response.data;
});
this.getDicts("sys_normal_disable").then((response) => {
this.statusOptions = response.data;
});
},
methods: {
//
xbFormat(row, column) {
return this.selectDictLabel(this.sexOptions, row.xb);
},
//
statusFormat(row, column) {
return this.selectDictLabel(this.statusOptions, row.status);
},
//
classFormat(row, column) {
// return this.selectDictLabel(this.classOptions, row.classid);
var actions = [];
var datas = this.classOptions;
Object.keys(datas).map((key) => {
if (datas[key].bjbh == "" + row.classid) {
actions.push(datas[key].bjmc);
return false;
}
});
return actions.join("");
},
getClassList() {
listClass(null).then((response) => {
this.classOptions = response.rows;
});
},
/** 查询幼儿信息列表 */
getList() {
this.loading = true;
listChild(this.queryParams).then((response) => {
this.childList = response.rows;
this.total = response.total;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map((item) => item.id);
this.single = selection.length != 1;
this.multiple = !selection.length;
},
handleAssessment(row) {
const id = row.id;
this.$router.push({ path: "/benyi/assessmentchild/student/" + id });
},
},
};
</script>

View File

@ -0,0 +1,92 @@
<template>
<div class="app-container">
<el-table
v-loading="loading"
:data="assessmentcontentList"
row-key="id"
default-expand-all
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
>
<el-table-column prop="name" label="评估内容"></el-table-column>
<el-table-column label="是否达标" align="center">
<template slot-scope="scope">
<el-checkbox v-if="scope.row.iselement == 'Y'" v-model="checked"
></el-checkbox
>
</template>
</el-table-column>
</el-table>
</div>
</template>
<script>
import {
listAssessmentcontent,
getAssessmentcontent,
delAssessmentcontent,
addAssessmentcontent,
updateAssessmentcontent,
exportAssessmentcontent,
} from "@/api/benyi/assessmentcontent";
export default {
name: "Assessmentstudent",
data() {
return {
checked: true,
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
assessmentcontentList: [],
//
queryParams: {
parentid: undefined,
name: undefined,
iselement: undefined,
scope: undefined,
sort: undefined,
},
};
},
created() {
this.getList();
},
methods: {
/** 查询评估内容列表 */
getList() {
this.loading = true;
listAssessmentcontent(this.queryParams).then((response) => {
this.assessmentcontentList = this.handleTree(response.rows, "id");
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
},
};
</script>
<style lang="scss" scoped>
//
div {
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
</style>

View File

@ -52,7 +52,7 @@ public class ByAssessmentcontentController extends BaseController {
/**
* 查询评估内容列表
*/
@PreAuthorize("@ss.hasPermi('benyi:assessmentstudy:list')")
@PreAuthorize("@ss.hasPermi('benyi:assessmentcontent:list')")
@GetMapping("/treeselectstudy")
public AjaxResult treeselectstudy(ByAssessmentcontent byAssessmentcontent) {
List<ByAssessmentcontent> list = byAssessmentcontentService.selectByAssessmentcontentstudyList(byAssessmentcontent);

View File

@ -36,7 +36,7 @@ public class ByAssessmentintroduceController extends BaseController {
/**
* 查询评估体系介绍列表
*/
@PreAuthorize("@ss.hasPermi('benyi:assessmentintroduce:list')")
@PreAuthorize("@ss.hasPermi('benyi:assessmentintroduce:list')" + "||@ss.hasPermi('benyi:assessmentcontent:list')")
@GetMapping("/list")
public TableDataInfo list(ByAssessmentintroduce byAssessmentintroduce) {
startPage();
@ -59,7 +59,7 @@ public class ByAssessmentintroduceController extends BaseController {
/**
* 获取评估体系介绍详细信息
*/
@PreAuthorize("@ss.hasPermi('benyi:assessmentintroduce:query')")
@PreAuthorize("@ss.hasPermi('benyi:assessmentintroduce:query')" + "||@ss.hasPermi('benyi:assessmentcontent:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) {
return AjaxResult.success(byAssessmentintroduceService.selectByAssessmentintroduceById(id));

View File

@ -25,6 +25,12 @@ public class ByAssessmentchild extends BaseEntity {
@Excel(name = "幼儿编号")
private Long childid;
/**
* 班级编号
*/
@Excel(name = "班级编号")
private String classid;
/**
* 测评内容编号
*/
@ -65,6 +71,14 @@ public class ByAssessmentchild extends BaseEntity {
return childid;
}
public void setClassid(String classid) {
this.classid = classid;
}
public String getClassid() {
return classid;
}
public void setContentid(Long contentid) {
this.contentid = contentid;
}
@ -102,6 +116,7 @@ public class ByAssessmentchild extends BaseEntity {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("childid", getChildid())
.append("classid", getClassid())
.append("contentid", getContentid())
.append("type", getType())
.append("xn", getXn())
@ -109,4 +124,4 @@ public class ByAssessmentchild extends BaseEntity {
.append("createTime", getCreateTime())
.toString();
}
}
}

View File

@ -25,6 +25,12 @@ public class ByAssessmentrecordchild extends BaseEntity {
@Excel(name = "幼儿编号")
private Long childid;
/**
* 班级编号
*/
@Excel(name = "班级编号")
private String classid;
/**
* 学年
*/
@ -65,6 +71,14 @@ public class ByAssessmentrecordchild extends BaseEntity {
return childid;
}
public void setClassid(String classid) {
this.classid = classid;
}
public String getClassid() {
return classid;
}
public void setXn(String xn) {
this.xn = xn;
}
@ -102,6 +116,7 @@ public class ByAssessmentrecordchild extends BaseEntity {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("childid", getChildid())
.append("classid", getClassid())
.append("xn", getXn())
.append("state", getState())
.append("scope", getScope())
@ -109,4 +124,4 @@ public class ByAssessmentrecordchild extends BaseEntity {
.append("createTime", getCreateTime())
.toString();
}
}
}

View File

@ -7,6 +7,7 @@
<resultMap type="ByAssessmentchild" id="ByAssessmentchildResult">
<result property="id" column="id"/>
<result property="childid" column="childid"/>
<result property="classid" column="classid"/>
<result property="contentid" column="contentid"/>
<result property="type" column="type"/>
<result property="xn" column="xn"/>
@ -15,13 +16,14 @@
</resultMap>
<sql id="selectByAssessmentchildVo">
select id, childid, contentid, type, xn, userid, create_time from by_assessmentchild
select id, childid, classid, contentid, type, xn, userid, create_time from by_assessmentchild
</sql>
<select id="selectByAssessmentchildList" parameterType="ByAssessmentchild" resultMap="ByAssessmentchildResult">
<include refid="selectByAssessmentchildVo"/>
<where>
<if test="childid != null ">and childid = #{childid}</if>
<if test="classid != null and classid != ''">and classid = #{classid}</if>
<if test="contentid != null ">and contentid = #{contentid}</if>
<if test="type != null and type != ''">and type = #{type}</if>
<if test="xn != null and xn != ''">and xn = #{xn}</if>
@ -38,6 +40,7 @@
insert into by_assessmentchild
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="childid != null ">childid,</if>
<if test="classid != null and classid != ''">classid,</if>
<if test="contentid != null ">contentid,</if>
<if test="type != null and type != ''">type,</if>
<if test="xn != null and xn != ''">xn,</if>
@ -46,6 +49,7 @@
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="childid != null ">#{childid},</if>
<if test="classid != null and classid != ''">#{classid},</if>
<if test="contentid != null ">#{contentid},</if>
<if test="type != null and type != ''">#{type},</if>
<if test="xn != null and xn != ''">#{xn},</if>
@ -58,6 +62,7 @@
update by_assessmentchild
<trim prefix="SET" suffixOverrides=",">
<if test="childid != null ">childid = #{childid},</if>
<if test="classid != null and classid != ''">classid = #{classid},</if>
<if test="contentid != null ">contentid = #{contentid},</if>
<if test="type != null and type != ''">type = #{type},</if>
<if test="xn != null and xn != ''">xn = #{xn},</if>

View File

@ -2,11 +2,12 @@
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.project.benyi.mapper.ByAssessmentrecordchildMapper">
<mapper namespace="com.ruoyi.project.system.mapper.ByAssessmentrecordchildMapper">
<resultMap type="ByAssessmentrecordchild" id="ByAssessmentrecordchildResult">
<result property="id" column="id"/>
<result property="childid" column="childid"/>
<result property="classid" column="classid"/>
<result property="xn" column="xn"/>
<result property="state" column="state"/>
<result property="scope" column="scope"/>
@ -15,7 +16,7 @@
</resultMap>
<sql id="selectByAssessmentrecordchildVo">
select id, childid, xn, state, scope, userid, create_time from by_assessmentrecordchild
select id, childid, classid, xn, state, scope, userid, create_time from by_assessmentrecordchild
</sql>
<select id="selectByAssessmentrecordchildList" parameterType="ByAssessmentrecordchild"
@ -23,6 +24,7 @@
<include refid="selectByAssessmentrecordchildVo"/>
<where>
<if test="childid != null ">and childid = #{childid}</if>
<if test="classid != null and classid != ''">and classid = #{classid}</if>
<if test="xn != null and xn != ''">and xn = #{xn}</if>
<if test="state != null and state != ''">and state = #{state}</if>
<if test="scope != null and scope != ''">and scope = #{scope}</if>
@ -40,6 +42,7 @@
insert into by_assessmentrecordchild
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="childid != null ">childid,</if>
<if test="classid != null and classid != ''">classid,</if>
<if test="xn != null and xn != ''">xn,</if>
<if test="state != null and state != ''">state,</if>
<if test="scope != null and scope != ''">scope,</if>
@ -48,6 +51,7 @@
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="childid != null ">#{childid},</if>
<if test="classid != null and classid != ''">#{classid},</if>
<if test="xn != null and xn != ''">#{xn},</if>
<if test="state != null and state != ''">#{state},</if>
<if test="scope != null and scope != ''">#{scope},</if>
@ -60,6 +64,7 @@
update by_assessmentrecordchild
<trim prefix="SET" suffixOverrides=",">
<if test="childid != null ">childid = #{childid},</if>
<if test="classid != null and classid != ''">classid = #{classid},</if>
<if test="xn != null and xn != ''">xn = #{xn},</if>
<if test="state != null and state != ''">state = #{state},</if>
<if test="scope != null and scope != ''">scope = #{scope},</if>