评估学习内容

This commit is contained in:
zhanglipeng 2020-12-02 09:37:17 +08:00
parent 5470bbe951
commit 3ce64b1e0e
7 changed files with 209 additions and 85 deletions

View File

@ -17,7 +17,13 @@ export function listNoAssessmentcontentByChild(childid) {
})
}
// 查询所有子节点
export function childnote(id) {
return request({
url: '/benyi/assessmentcontent/childnote/' + id,
method: 'get'
})
}
// 查询部门下拉树结构
export function treeselect() {

View File

@ -1,7 +1,7 @@
<template>
<div class="app-container">
<el-row :gutter="20" type="flex">
<el-col :span="8" :xs="24">
<el-row :gutter="20">
<el-col :span="4" :xs="24">
<div class="head-container">
<el-input
v-model="name"
@ -22,14 +22,69 @@
/>
</div>
</el-col>
<el-col :span="16" :xs="24">
<el-col :span="20" :xs="24">
<el-card class="box-card">
<div slot="header" class="clearfix">
<span class="box-card-title">{{ title }}</span>
</div>
<div class="text item">
<h3 class="box-card-title">内容</h3>
<div class="pad-left" v-html="note"></div>
<div class="block" v-loading="loading">
<div class="block-item-title" v-html="note" v-show="isshow"></div>
<div
v-for="(itemOne, index) in assessmentList.filter(
(p) => p.parentId == queryParams.id
)"
:key="index"
v-show="!isshow"
>
<h2 class="block-item-title flex align-center">
{{ itemOne.sort }}.{{ itemOne.name }}
</h2>
<ul class="block-content">
<li
v-for="(itemTwo, index) in assessmentList.filter(
(p) => p.parentId == itemOne.id
)"
:key="index"
>
<p class="block-content-title">
<span class="num">{{ itemTwo.sort }}. </span
>{{ itemTwo.name }}
</p>
<div
class="checkbox-content"
v-for="(itemThree, index) in assessmentList.filter(
(p) => p.parentId == itemTwo.id
)"
:key="index"
>
<p class="checkbox-item flex align-center">
{{ itemThree.sort }}.{{ itemThree.name }}
</p>
<div class="check-info" v-if="itemThree.ckbz">
{{ itemThree.ckbz }}
<!-- <p>男孩身高94.9-111.7厘米体重12.7-21.2公斤</p>
<p>女孩身高94.1-111.3厘米体重12.3-21.5公斤</p> -->
</div>
<div
class="checkbox-content"
v-for="(itemFour, index) in assessmentList.filter(
(p) => p.parentId == itemThree.id
)"
:key="index"
>
<p class="checkbox-item flex align-center">
{{ itemFour.sort }}.{{ itemFour.name }}
</p>
<div class="check-info" v-if="itemFour.ckbz">
{{ itemFour.ckbz }}
<!-- <p>男孩身高94.9-111.7厘米体重12.7-21.2公斤</p>
<p>女孩身高94.1-111.3厘米体重12.3-21.5公斤</p> -->
</div>
</div>
</div>
</li>
</ul>
</div>
</div>
</el-card>
</el-col>
@ -40,8 +95,9 @@
<script>
import {
treeselectstudy,
childnote,
getAssessmentcontent,
getAssessmentcontentbyparentid
getAssessmentcontentbyparentid,
} from "@/api/benyi/assessmentcontent";
import { listAssessmentintroduce } from "@/api/benyi/assessmentintroduce";
@ -49,30 +105,34 @@ export default {
name: "Assessmentstudy",
data() {
return {
//
//
loading: true,
//
name: undefined,
//
title: "儿童学习与发展评估介绍",
//
note: "",
isshow: true,
//
treeOptions: [],
assessmentList: [],
//
defaultProps: {
children: "children",
label: "label"
label: "label",
},
//
queryParams: {
id: undefined
}
id: undefined,
},
};
},
watch: {
//
name(val) {
this.$refs.tree.filter(val);
}
},
},
created() {
this.getTreeselect();
@ -81,7 +141,7 @@ export default {
methods: {
/** 查询部门下拉树结构 */
getTreeselect() {
treeselectstudy().then(response => {
treeselectstudy().then((response) => {
this.treeOptions = response.data;
});
},
@ -96,89 +156,44 @@ export default {
this.title = data.label;
if (data.id == "-1") {
this.getNote();
this.isshow = true;
} else {
this.queryParams.id = data.id;
this.getTaskList();
this.isshow = false;
}
},
/**查询评估介绍 */
getNote() {
listAssessmentintroduce(null).then(response => {
this.loading = true;
listAssessmentintroduce(null).then((response) => {
// console.log(":" + response.rows[0].content);
this.note = response.rows[0].content;
this.loading = false;
});
},
/** 查询一日流程任务列表 */
/** 查询任务列表 */
getTaskList() {
getAssessmentcontentbyparentid(this.queryParams.id).then(response => {
var tmp = "";
response.data.forEach(element => {
tmp = tmp + element.sort + ". " + element.name + "</br>";
// console.log("id" + this.queryParams.id);
// getAssessmentcontentbyparentid(this.queryParams.id).then((response) => {
// var tmp = "";
// response.data.forEach((element) => {
// tmp = tmp + element.sort + ". " + element.name + "</br>";
// });
// this.note = tmp;
// });
this.loading = true;
childnote(this.queryParams.id).then((res) => {
// console.log(res.data.length);
// console.log("id" + this.queryParams.id);
this.assessmentList = res.data;
this.loading = false;
});
this.note = tmp;
});
}
}
},
},
};
</script>
<style lang="scss" scoped>
.text {
font-size: 14px;
}
.item {
margin-bottom: 18px;
line-height: 22px;
}
.clearfix:before,
.clearfix:after {
display: table;
content: "";
}
.clearfix:after {
clear: both;
}
.box-card-title {
display: flex;
align-items: center;
font-size: 16px;
&::before {
content: "";
margin-right: 8px;
width: 4px;
height: 16px;
background: #1890ff;
}
&.mr {
margin: 10px 0;
}
}
.box-card-case {
margin: 0;
font-size: 14px;
font-weight: 700;
display: flex;
align-items: center;
&::before {
content: "";
margin-right: 8px;
width: 4px;
height: 14px;
background: #2c3e50;
}
&.mr {
margin: 10px 0;
}
}
.box-card-info {
font-size: 14px;
font-weight: 700;
}
.pad-left {
padding-left: 15px;
}
//
div {
-webkit-touch-callout: none;
@ -188,7 +203,7 @@ div {
-ms-user-select: none;
user-select: none;
}
.el-tree{
.el-tree {
max-height: calc(100vh - 180px);
overflow-y: auto;
}
@ -196,4 +211,64 @@ div {
max-height: calc(100vh - 130px);
overflow-y: auto;
}
.block {
padding: 10px;
color: #333;
.block-item-title {
padding: 10px 0;
margin: 0;
font-size: 16px;
font-weight: 500;
&::before {
content: "";
margin-right: 8px;
width: 4px;
height: 14px;
background: #1890ff;
}
}
.block-content {
border-radius: 5px;
padding: 10px;
background: #fcfcfc;
.block-content-title {
font-size: 14px;
font-weight: bold;
line-height: 24px;
padding-bottom: 5px;
.num {
font-size: 16px;
}
}
.checkbox-content {
padding-left: 20px;
margin-bottom: 15px;
}
.checkbox-item {
font-size: 14px;
line-height: 22px;
}
.check-info {
line-height: 18px;
font-size: 12px;
color: #999;
p {
padding-left: 10px;
}
}
.el-checkbox {
display: flex;
white-space: normal;
.el-checkbox__input {
margin-top: 2px;
}
}
}
}
@media (max-width: 768.98px) {
.title span {
font-size: 12px;
}
}
</style>

View File

@ -70,6 +70,16 @@ public class ByAssessmentcontentController extends BaseController {
return AjaxResult.success(byAssessmentcontentService.buildByAssessmentcontentTreeSelect(list));
}
/**
* 查询评估内容列表 根据id
*/
@PreAuthorize("@ss.hasPermi('benyi:assessmentcontent:list')")
@GetMapping("/childnote/{id}")
public AjaxResult childnote(@PathVariable("id") Long id) {
List<ByAssessmentcontent> list = byAssessmentcontentService.selectChildNodeByParentid(id);
return AjaxResult.success(list);
}
/**
* 获取评估内容详细信息
*/

View File

@ -106,4 +106,13 @@ public interface ByAssessmentcontentMapper {
* @return 结果
*/
public List<ByAssessmentcontent> selectNodeByid(Long id);
/**
* 节点根据id
*
* @param id 内容ID
* @return 结果
*/
public List<ByAssessmentcontent> selectChildNodeByParentid(Long id);
}

View File

@ -123,4 +123,12 @@ public interface IByAssessmentcontentService {
* @return 结果
*/
public List<ByAssessmentcontent> selectNodeByid(Long id);
/**
* 节点根据id
*
* @param id 内容ID
* @return 结果
*/
public List<ByAssessmentcontent> selectChildNodeByParentid(Long id);
}

View File

@ -246,4 +246,14 @@ public class ByAssessmentcontentServiceImpl implements IByAssessmentcontentServi
return byAssessmentcontentMapper.selectNodeByid(id);
}
/**
* 节点根据id
*
* @param id 内容ID
* @return 结果
*/
@Override
public List<ByAssessmentcontent> selectChildNodeByParentid(Long id){
return byAssessmentcontentMapper.selectChildNodeByParentid(id);
}
}

View File

@ -42,11 +42,11 @@ select -1 as id, -2 as parentId, title as name, 'N' as iselement, 0 as sort fro
union all
select dict_value,-1,dict_label,'N', 0 from sys_dict_data where dict_type='sys_dm_pgyssyfw'
union all
select id,parentId,name,iselement,sort from by_assessmentcontent where scope=1 and parentId!=0 and iselement='N'
select id,parentId,name,iselement,sort from by_assessmentcontent where scope=1 and parentId=1 and iselement='N'
union all
select id,parentId,name,iselement,sort from by_assessmentcontent where scope=2 and parentId!=0 and iselement='N'
select id,parentId,name,iselement,sort from by_assessmentcontent where scope=2 and parentId=2 and iselement='N'
union all
select id,parentId,name,iselement,sort from by_assessmentcontent where scope=3 and parentId!=0 and iselement='N'
select id,parentId,name,iselement,sort from by_assessmentcontent where scope=3 and parentId=3 and iselement='N'
) t
order by t.sort
</select>
@ -79,6 +79,12 @@ where find_in_set(id, getChildLst(#{id})) ;
where find_in_set(id, getChildLst(#{id})) and parentId>#{id} and iselement='N' order by id;
</select>
<!--根据节点id获取领域目标-->
<select id="selectChildNodeByParentid" parameterType="Long" resultMap="ByAssessmentcontentResult">
select id, parentId, name, iselement, scope, create_time, sort, ckbz from by_assessmentcontent
where find_in_set(id, getChildLst(#{id})) and id!=#{id} order by id;
</select>
<!--根据幼儿id获取未评选的指标-->
<select id="selectNoByAssessmentcontentListByChild" parameterType="Long" resultMap="ByAssessmentcontentResult">
SELECT id, parentId, name, iselement, scope, create_time, sort, ckbz, jyjy FROM by_assessmentcontent