幼儿评估
This commit is contained in:
parent
b47d7380f7
commit
796479c5f1
53
ruoyi-ui/src/api/benyi/assessmentchild.js
Normal file
53
ruoyi-ui/src/api/benyi/assessmentchild.js
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询幼儿评估列表
|
||||||
|
export function listAssessmentchild(query) {
|
||||||
|
return request({
|
||||||
|
url: '/benyi/assessmentchild/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询幼儿评估详细
|
||||||
|
export function getAssessmentchild(id) {
|
||||||
|
return request({
|
||||||
|
url: '/benyi/assessmentchild/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增幼儿评估
|
||||||
|
export function addAssessmentchild(data) {
|
||||||
|
return request({
|
||||||
|
url: '/benyi/assessmentchild',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改幼儿评估
|
||||||
|
export function updateAssessmentchild(data) {
|
||||||
|
return request({
|
||||||
|
url: '/benyi/assessmentchild',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除幼儿评估
|
||||||
|
export function delAssessmentchild(id) {
|
||||||
|
return request({
|
||||||
|
url: '/benyi/assessmentchild/' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 导出幼儿评估
|
||||||
|
export function exportAssessmentchild(query) {
|
||||||
|
return request({
|
||||||
|
url: '/benyi/assessmentchild/export',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
53
ruoyi-ui/src/api/benyi/assessmentrecordchild.js
Normal file
53
ruoyi-ui/src/api/benyi/assessmentrecordchild.js
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询幼儿评估记录列表
|
||||||
|
export function listAssessmentrecordchild(query) {
|
||||||
|
return request({
|
||||||
|
url: '/benyi/assessmentrecordchild/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询幼儿评估记录详细
|
||||||
|
export function getAssessmentrecordchild(id) {
|
||||||
|
return request({
|
||||||
|
url: '/benyi/assessmentrecordchild/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增幼儿评估记录
|
||||||
|
export function addAssessmentrecordchild(data) {
|
||||||
|
return request({
|
||||||
|
url: '/benyi/assessmentrecordchild',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改幼儿评估记录
|
||||||
|
export function updateAssessmentrecordchild(data) {
|
||||||
|
return request({
|
||||||
|
url: '/benyi/assessmentrecordchild',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除幼儿评估记录
|
||||||
|
export function delAssessmentrecordchild(id) {
|
||||||
|
return request({
|
||||||
|
url: '/benyi/assessmentrecordchild/' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 导出幼儿评估记录
|
||||||
|
export function exportAssessmentrecordchild(query) {
|
||||||
|
return request({
|
||||||
|
url: '/benyi/assessmentrecordchild/export',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
@ -13,6 +13,7 @@
|
|||||||
icon="el-icon-s-data"
|
icon="el-icon-s-data"
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="submitForm"
|
@click="submitForm"
|
||||||
|
v-hasPermi="['benyi:assessmentchild:add']"
|
||||||
>生成图表</el-button
|
>生成图表</el-button
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
@ -72,9 +73,14 @@
|
|||||||
:key="itemYs.id"
|
:key="itemYs.id"
|
||||||
>
|
>
|
||||||
<p class="checkbox-item flex align-center">
|
<p class="checkbox-item flex align-center">
|
||||||
<el-checkbox v-model="itemYs.id">{{
|
<el-checkbox-group
|
||||||
itemYs.name
|
v-model="checkList"
|
||||||
}}</el-checkbox>
|
@change="handlecheckedItemsChange"
|
||||||
|
>
|
||||||
|
<el-checkbox :label="itemYs.id" :key="itemYs.id">{{
|
||||||
|
itemYs.name
|
||||||
|
}}</el-checkbox>
|
||||||
|
</el-checkbox-group>
|
||||||
</p>
|
</p>
|
||||||
<div class="check-info" v-if="itemYs.ckbz">
|
<div class="check-info" v-if="itemYs.ckbz">
|
||||||
{{ itemYs.ckbz }}
|
{{ itemYs.ckbz }}
|
||||||
@ -156,15 +162,21 @@ import {
|
|||||||
} from "@/api/benyi/assessmentcontent";
|
} from "@/api/benyi/assessmentcontent";
|
||||||
|
|
||||||
import { getChildByAssessment } from "@/api/benyi/child";
|
import { getChildByAssessment } from "@/api/benyi/child";
|
||||||
|
import {
|
||||||
|
addAssessmentchild,
|
||||||
|
updateAssessmentchild,
|
||||||
|
} from "@/api/benyi/assessmentchild";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Assessmentstudent",
|
name: "Assessmentstudent",
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
childId: "",
|
||||||
childName: "",
|
childName: "",
|
||||||
childCsrq: "",
|
childCsrq: "",
|
||||||
bjmc: "",
|
bjmc: "",
|
||||||
|
classid: "",
|
||||||
trem: "",
|
trem: "",
|
||||||
zbjsxm: "",
|
zbjsxm: "",
|
||||||
assessmentscope: "",
|
assessmentscope: "",
|
||||||
@ -174,6 +186,8 @@ export default {
|
|||||||
ids: [],
|
ids: [],
|
||||||
// 评估内容表格数据
|
// 评估内容表格数据
|
||||||
assessmentcontentList: [],
|
assessmentcontentList: [],
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
// 查询参数
|
// 查询参数
|
||||||
queryParams: {
|
queryParams: {
|
||||||
parentid: undefined,
|
parentid: undefined,
|
||||||
@ -184,23 +198,26 @@ export default {
|
|||||||
},
|
},
|
||||||
activeName: "健康",
|
activeName: "健康",
|
||||||
checked: false,
|
checked: false,
|
||||||
|
checkList: [],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
// this.getList();
|
// this.getList();
|
||||||
const childId = this.$route.params && this.$route.params.id;
|
const childId = this.$route.params && this.$route.params.id;
|
||||||
console.log("childId:" + childId);
|
this.childId = childId;
|
||||||
|
// console.log("childId:" + childId);
|
||||||
this.getChild(childId);
|
this.getChild(childId);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getChild(childId) {
|
getChild(childId) {
|
||||||
getChildByAssessment(childId).then((response) => {
|
getChildByAssessment(childId).then((response) => {
|
||||||
console.log(response);
|
// console.log(response);
|
||||||
if (response.code == "200") {
|
if (response.code == "200") {
|
||||||
this.childName = response.data.name;
|
this.childName = response.data.name;
|
||||||
this.childCsrq = response.data.csrq;
|
this.childCsrq = response.data.csrq;
|
||||||
this.trem = response.trem;
|
this.trem = response.trem;
|
||||||
this.bjmc = response.data.bjmc;
|
this.bjmc = response.data.bjmc;
|
||||||
|
this.classid = response.data.classid;
|
||||||
this.zbjsxm = response.data.zbjsmc;
|
this.zbjsxm = response.data.zbjsmc;
|
||||||
if (response.isAssessment == "0") {
|
if (response.isAssessment == "0") {
|
||||||
this.msgError(
|
this.msgError(
|
||||||
@ -218,7 +235,7 @@ export default {
|
|||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
listAssessmentcontent(this.queryParams).then((response) => {
|
listAssessmentcontent(this.queryParams).then((response) => {
|
||||||
console.log("rows:" + response.rows);
|
// console.log("rows:" + response.rows);
|
||||||
this.assessmentcontentList = response.rows;
|
this.assessmentcontentList = response.rows;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
@ -233,11 +250,55 @@ export default {
|
|||||||
this.resetForm("queryForm");
|
this.resetForm("queryForm");
|
||||||
this.handleQuery();
|
this.handleQuery();
|
||||||
},
|
},
|
||||||
|
// // 表单重置
|
||||||
|
// reset() {
|
||||||
|
// this.form = {
|
||||||
|
// id: undefined,
|
||||||
|
// childid: undefined,
|
||||||
|
// classid: undefined,
|
||||||
|
// contentid: undefined,
|
||||||
|
// type: undefined,
|
||||||
|
// xn: undefined,
|
||||||
|
// userid: undefined,
|
||||||
|
// createTime: undefined,
|
||||||
|
// };
|
||||||
|
// this.resetForm("form");
|
||||||
|
// },
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
submitForm: function () {},
|
submitForm: function () {
|
||||||
|
var items = "";
|
||||||
|
this.checkList.forEach((item) => {
|
||||||
|
//当全选被选中的时候,循环遍历源数据,把数据的每一项加入到默认选中的数组去
|
||||||
|
items = items + item + ",";
|
||||||
|
});
|
||||||
|
// console.log(items);
|
||||||
|
// console.log("提交:"+this.checkList.length);
|
||||||
|
if (this.checkList.length == 0) {
|
||||||
|
this.msgError("请至少选择一项数据");
|
||||||
|
} else {
|
||||||
|
this.form.childid = this.childId;
|
||||||
|
this.form.classid = this.classid;
|
||||||
|
this.form.items = items;
|
||||||
|
this.form.type = "Y";
|
||||||
|
this.form.xn = this.trem;
|
||||||
|
addAssessmentchild(this.form).then((response) => {
|
||||||
|
if (response.code === 200) {
|
||||||
|
this.msgSuccess("评估成功");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
handleClick(tab) {
|
handleClick(tab) {
|
||||||
// this.activeName = tab
|
// this.activeName = tab
|
||||||
},
|
},
|
||||||
|
handlecheckedItemsChange(value) {
|
||||||
|
// var items = "";
|
||||||
|
// this.checkList.forEach((item) => {
|
||||||
|
// //当全选被选中的时候,循环遍历源数据,把数据的每一项加入到默认选中的数组去
|
||||||
|
// items = items + item + ",";
|
||||||
|
// });
|
||||||
|
// console.log(items);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -2,6 +2,8 @@ package com.ruoyi.project.benyi.controller;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.ruoyi.common.utils.SecurityUtils;
|
||||||
|
import com.ruoyi.project.common.SchoolCommon;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
@ -32,6 +34,8 @@ import com.ruoyi.framework.web.page.TableDataInfo;
|
|||||||
public class ByAssessmentchildController extends BaseController {
|
public class ByAssessmentchildController extends BaseController {
|
||||||
@Autowired
|
@Autowired
|
||||||
private IByAssessmentchildService byAssessmentchildService;
|
private IByAssessmentchildService byAssessmentchildService;
|
||||||
|
@Autowired
|
||||||
|
private SchoolCommon schoolCommon;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询幼儿评估列表
|
* 查询幼儿评估列表
|
||||||
@ -72,7 +76,23 @@ public class ByAssessmentchildController extends BaseController {
|
|||||||
@Log(title = "幼儿评估", businessType = BusinessType.INSERT)
|
@Log(title = "幼儿评估", businessType = BusinessType.INSERT)
|
||||||
@PostMapping
|
@PostMapping
|
||||||
public AjaxResult add(@RequestBody ByAssessmentchild byAssessmentchild) {
|
public AjaxResult add(@RequestBody ByAssessmentchild byAssessmentchild) {
|
||||||
return toAjax(byAssessmentchildService.insertByAssessmentchild(byAssessmentchild));
|
int iCount = 0;
|
||||||
|
byAssessmentchild.setUserid(SecurityUtils.getLoginUser().getUser().getUserId());
|
||||||
|
String strItems = byAssessmentchild.getItems();
|
||||||
|
//System.out.println("执行嘛?"+strItems);
|
||||||
|
//判断选中的checkbox是否为空
|
||||||
|
if (schoolCommon.isStringEmpty(strItems)) {
|
||||||
|
return AjaxResult.error("请至少选择一个评估项");
|
||||||
|
} else {
|
||||||
|
String[] strArr = strItems.split(",");
|
||||||
|
for (int i = 0; i < strArr.length; i++) {
|
||||||
|
//System.out.println("contentid:"+strArr[i]);
|
||||||
|
byAssessmentchild.setContentid(Long.valueOf(strArr[i]));
|
||||||
|
iCount = byAssessmentchildService.insertByAssessmentchild(byAssessmentchild);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return toAjax(iCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -55,6 +55,11 @@ public class ByAssessmentchild extends BaseEntity {
|
|||||||
@Excel(name = "创建人")
|
@Excel(name = "创建人")
|
||||||
private Long userid;
|
private Long userid;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 临时创建用
|
||||||
|
*/
|
||||||
|
private String items;
|
||||||
|
|
||||||
public void setId(Long id) {
|
public void setId(Long id) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
}
|
}
|
||||||
@ -111,6 +116,15 @@ public class ByAssessmentchild extends BaseEntity {
|
|||||||
return userid;
|
return userid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setItems(String items) {
|
||||||
|
this.items = items;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getItems() {
|
||||||
|
return items;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||||
@ -122,6 +136,7 @@ public class ByAssessmentchild extends BaseEntity {
|
|||||||
.append("xn", getXn())
|
.append("xn", getXn())
|
||||||
.append("userid", getUserid())
|
.append("userid", getUserid())
|
||||||
.append("createTime", getCreateTime())
|
.append("createTime", getCreateTime())
|
||||||
|
.append("items", getItems())
|
||||||
.toString();
|
.toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user