首页和评估教育建议

This commit is contained in:
zhanglipeng 2020-11-30 16:20:21 +08:00
parent 3ebc280a25
commit 6eb980e5a3
6 changed files with 134 additions and 92 deletions

View File

@ -0,0 +1,9 @@
import request from '@/utils/request'
// 查询信息
export function info() {
return request({
url: '/system/home/info',
method: 'get',
})
}

View File

@ -56,25 +56,17 @@
> >
<p class="block-content-title"> <p class="block-content-title">
<span class="num">{{ itemMb.sort }}. </span <span class="num">{{ itemMb.sort }}. </span
>{{ itemMb.name }} >{{ itemMb.name }}(未满足评估标准)
</p> </p>
<div
class="checkbox-content"
v-for="(itemYs, i) in assessmentcontentList.filter(
(p) => p.parentId == itemMb.id
)"
:key="itemYs.id"
>
<p class="checkbox-item flex align-center"> <p class="checkbox-item flex align-center">
建议{{ i + 1 }}.{{ itemYs.jyjy }} 教育建议 {{ itemMb.jyjy }}
</p> </p>
</div>
</li> </li>
<li <li
v-for="itemMb in assessmentcontentList.filter( v-for="(itemMb,index) in assessmentcontentList.filter(
(p) => p.parentId == itemFzly.id (p) => p.parentId == itemFzly.id
)" )"
:key="itemMb.id" :key="index"
v-show=" v-show="
assessmentcontentList.filter( assessmentcontentList.filter(
(p) => p.parentId == itemMb.id (p) => p.parentId == itemMb.id
@ -85,7 +77,7 @@
> >
<p class="block-content-title"> <p class="block-content-title">
<span class="num">{{ itemMb.sort }}. </span <span class="num">{{ itemMb.sort }}. </span
>{{ itemMb.name }} (满足标准) >{{ itemMb.name }} (满足评估标准)
</p> </p>
</li> </li>
</ul> </ul>
@ -131,25 +123,17 @@
> >
<p class="block-content-title"> <p class="block-content-title">
<span class="num">{{ itemMb.sort }}. </span <span class="num">{{ itemMb.sort }}. </span
>{{ itemMb.name }} >{{ itemMb.name }}(未满足评估标准)
</p> </p>
<div
class="checkbox-content"
v-for="(itemYs, i) in assessmentcontentList.filter(
(p) => p.parentId == itemMb.id
)"
:key="itemYs.id"
>
<p class="checkbox-item flex align-center"> <p class="checkbox-item flex align-center">
建议{{ i + 1 }}.{{ itemYs.jyjy }} 教育建议 {{ itemMb.jyjy }}
</p> </p>
</div>
</li> </li>
<li <li
v-for="itemMb in assessmentcontentList.filter( v-for="(itemMb,index) in assessmentcontentList.filter(
(p) => p.parentId == itemFzly.id (p) => p.parentId == itemFzly.id
)" )"
:key="itemMb.id" :key="index"
v-show=" v-show="
assessmentcontentList.filter( assessmentcontentList.filter(
(p) => p.parentId == itemMb.id (p) => p.parentId == itemMb.id
@ -160,7 +144,7 @@
> >
<p class="block-content-title"> <p class="block-content-title">
<span class="num">{{ itemMb.sort }}. </span <span class="num">{{ itemMb.sort }}. </span
>{{ itemMb.name }} (满足标准) >{{ itemMb.name }} (满足评估标准)
</p> </p>
</li> </li>
</ul> </ul>
@ -209,25 +193,17 @@
> >
<p class="block-content-title"> <p class="block-content-title">
<span class="num">{{ itemMb.sort }}. </span <span class="num">{{ itemMb.sort }}. </span
>{{ itemMb.name }} >{{ itemMb.name }}(未满足评估标准)
</p> </p>
<div
class="checkbox-content"
v-for="(itemYs, i) in assessmentcontentList.filter(
(p) => p.parentId == itemMb.id
)"
:key="itemYs.id"
>
<p class="checkbox-item flex align-center"> <p class="checkbox-item flex align-center">
建议{{ i + 1 }}.{{ itemYs.jyjy }} 教育建议 {{ itemMb.jyjy }}
</p> </p>
</div>
</li> </li>
<li <li
v-for="itemMb in assessmentcontentList.filter( v-for="(itemMb,index) in assessmentcontentList.filter(
(p) => p.parentId == itemFzly.id (p) => p.parentId == itemFzly.id
)" )"
:key="itemMb.id" :key="index"
v-show=" v-show="
assessmentcontentList.filter( assessmentcontentList.filter(
(p) => p.parentId == itemMb.id (p) => p.parentId == itemMb.id
@ -238,7 +214,7 @@
> >
<p class="block-content-title"> <p class="block-content-title">
<span class="num">{{ itemMb.sort }}. </span <span class="num">{{ itemMb.sort }}. </span
>{{ itemMb.name }} (满足标准) >{{ itemMb.name }} (满足评估标准)
</p> </p>
</li> </li>
</ul> </ul>
@ -287,25 +263,17 @@
> >
<p class="block-content-title"> <p class="block-content-title">
<span class="num">{{ itemMb.sort }}. </span <span class="num">{{ itemMb.sort }}. </span
>{{ itemMb.name }} >{{ itemMb.name }}(未满足评估标准)
</p> </p>
<div
class="checkbox-content"
v-for="(itemYs, i) in assessmentcontentList.filter(
(p) => p.parentId == itemMb.id
)"
:key="itemYs.id"
>
<p class="checkbox-item flex align-center"> <p class="checkbox-item flex align-center">
建议{{ i + 1 }}.{{ itemYs.jyjy }} 教育建议 {{ itemMb.jyjy }}
</p> </p>
</div>
</li> </li>
<li <li
v-for="itemMb in assessmentcontentList.filter( v-for="(itemMb,index) in assessmentcontentList.filter(
(p) => p.parentId == itemFzly.id (p) => p.parentId == itemFzly.id
)" )"
:key="itemMb.id" :key="index"
v-show=" v-show="
assessmentcontentList.filter( assessmentcontentList.filter(
(p) => p.parentId == itemMb.id (p) => p.parentId == itemMb.id
@ -316,7 +284,7 @@
> >
<p class="block-content-title"> <p class="block-content-title">
<span class="num">{{ itemMb.sort }}. </span <span class="num">{{ itemMb.sort }}. </span
>{{ itemMb.name }} (满足标准) >{{ itemMb.name }} (满足评估标准)
</p> </p>
</li> </li>
</ul> </ul>
@ -365,25 +333,17 @@
> >
<p class="block-content-title"> <p class="block-content-title">
<span class="num">{{ itemMb.sort }}. </span <span class="num">{{ itemMb.sort }}. </span
>{{ itemMb.name }} >{{ itemMb.name }}(未满足评估标准)
</p> </p>
<div
class="checkbox-content"
v-for="(itemYs, i) in assessmentcontentList.filter(
(p) => p.parentId == itemMb.id
)"
:key="itemYs.id"
>
<p class="checkbox-item flex align-center"> <p class="checkbox-item flex align-center">
建议{{ i + 1 }}.{{ itemYs.jyjy }} 教育建议 {{ itemMb.jyjy }}
</p> </p>
</div>
</li> </li>
<li <li
v-for="itemMb in assessmentcontentList.filter( v-for="(itemMb,index) in assessmentcontentList.filter(
(p) => p.parentId == itemFzly.id (p) => p.parentId == itemFzly.id
)" )"
:key="itemMb.id" :key="index"
v-show=" v-show="
assessmentcontentList.filter( assessmentcontentList.filter(
(p) => p.parentId == itemMb.id (p) => p.parentId == itemMb.id
@ -394,7 +354,7 @@
> >
<p class="block-content-title"> <p class="block-content-title">
<span class="num">{{ itemMb.sort }}. </span <span class="num">{{ itemMb.sort }}. </span
>{{ itemMb.name }} (满足标准) >{{ itemMb.name }} (满足评估标准)
</p> </p>
</li> </li>
</ul> </ul>

View File

@ -86,6 +86,9 @@ export default {
}, },
setOptions() { setOptions() {
this.chart.setOption({ this.chart.setOption({
title: {
text: "考勤统计",
},
xAxis: { xAxis: {
data: this.classOptions, data: this.classOptions,
boundaryGap: false, boundaryGap: false,

View File

@ -65,6 +65,9 @@ export default {
this.chart = echarts.init(this.$el, "macarons"); this.chart = echarts.init(this.$el, "macarons");
this.chart.setOption({ this.chart.setOption({
title: {
text: "教职工学历统计",
},
tooltip: { tooltip: {
trigger: "item", trigger: "item",
formatter: "{a} <br/>{b} : {c} ({d}%)" formatter: "{a} <br/>{b} : {c} ({d}%)"

View File

@ -5,62 +5,72 @@
</div> </div>
<div class="text item">班级总数{{ classTotal }}</div> <div class="text item">班级总数{{ classTotal }}</div>
<div class="text item">教职工总数{{ userTotal }}</div> <div class="text item">教职工总数{{ userTotal }}</div>
<div class="text item">幼儿总数0</div> <div class="text item">幼儿总数{{ childTotal }}</div>
<div class="text item">今日园历活动数0</div> <!-- <div class="text item">今日园历活动数0</div> -->
<div class="text item">学习视频数0</div> <div class="text item">学习视频数{{ videoTotal }}</div>
</el-card> </el-card>
</template> </template>
<script> <script>
import { listUser, getUserProfile } from "@/api/system/user"; import { listUser, getUserProfile } from "@/api/system/user";
import { listClass } from "@/api/system/class"; import { listClass } from "@/api/system/class";
import { info } from "@/api/system/home";
export default { export default {
props: { props: {
className: { className: {
type: String, type: String,
default: "chart" default: "chart",
}, },
width: { width: {
type: String, type: String,
default: "100%" default: "100%",
}, },
height: { height: {
type: String, type: String,
default: "480px" default: "480px",
} },
}, },
data() { data() {
return { return {
deptName: {}, deptName: {},
classTotal: 0, classTotal: 0,
userTotal: 0 userTotal: 0,
childTotal: 0,
videoTotal: 0,
}; };
}, },
created() { created() {
this.getDeptName(); this.getDeptName();
this.getClassCount(); this.getClassCount();
this.getUserCount(); this.getUserCount();
this.getInfo();
}, },
methods: { methods: {
getInfo() {
info().then((response) => {
this.childTotal = response.childcount;
this.videoTotal = response.videocount;
});
},
getDeptName() { getDeptName() {
getUserProfile().then(response => { getUserProfile().then((response) => {
this.deptName = response.data.dept.deptName; this.deptName = response.data.dept.deptName;
}); });
}, },
/** 查询班级信息列表 */ /** 查询班级信息列表 */
getClassCount() { getClassCount() {
listClass(null).then(response => { listClass(null).then((response) => {
this.classTotal = response.total; this.classTotal = response.total;
}); });
}, },
/** 查询用户列表 */ /** 查询用户列表 */
getUserCount() { getUserCount() {
listUser(null).then(response => { listUser(null).then((response) => {
this.userTotal = response.total; this.userTotal = response.total;
}); });
} },
} },
}; };
</script> </script>

View File

@ -0,0 +1,57 @@
package com.ruoyi.project.system.controller;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.framework.web.controller.BaseController;
import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.project.benyi.domain.ByChild;
import com.ruoyi.project.benyi.domain.ByTrainVideo;
import com.ruoyi.project.benyi.service.IByChildService;
import com.ruoyi.project.benyi.service.IByTrainVideoService;
import com.ruoyi.project.common.SchoolCommon;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
* 班级信息Controller
*
* @author tsbz
* @date 2020-11-30
*/
@RestController
@RequestMapping("/system/home")
public class HomeController extends BaseController {
@Autowired
private IByChildService byChildService;
@Autowired
private IByTrainVideoService byTrainVideoService;
@Autowired
private SchoolCommon schoolCommon;
@GetMapping("/info")
public AjaxResult getInfo() {
AjaxResult ajaxResult = AjaxResult.success();
ByChild byChild = new ByChild();
byChild.setSchoolid(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
//判断是否为班主任
String classId = schoolCommon.getClassId();
if (!schoolCommon.isStringEmpty(classId)) {
byChild.setClassid(classId);
}
List<ByChild> listchild = byChildService.selectByChildList(byChild);
ajaxResult.put("childcount", listchild.size());//获取当前用户的幼儿总数
ByTrainVideo byTrainVideo=new ByTrainVideo();
List<ByTrainVideo> listvideo = byTrainVideoService.selectByTrainVideoList(byTrainVideo);
ajaxResult.put("videocount", listvideo.size());//获取视频总数
return ajaxResult;
}
}