首页和评估教育建议
This commit is contained in:
parent
3ebc280a25
commit
6eb980e5a3
9
ruoyi-ui/src/api/system/home.js
Normal file
9
ruoyi-ui/src/api/system/home.js
Normal file
@ -0,0 +1,9 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询信息
|
||||
export function info() {
|
||||
return request({
|
||||
url: '/system/home/info',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
@ -56,25 +56,17 @@
|
||||
>
|
||||
<p class="block-content-title">
|
||||
<span class="num">{{ itemMb.sort }}. </span
|
||||
>{{ itemMb.name }}
|
||||
>{{ itemMb.name }}(未满足评估标准)
|
||||
</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">
|
||||
建议{{ i + 1 }}.{{ itemYs.jyjy }}
|
||||
教育建议 {{ itemMb.jyjy }}
|
||||
</p>
|
||||
</div>
|
||||
</li>
|
||||
<li
|
||||
v-for="itemMb in assessmentcontentList.filter(
|
||||
v-for="(itemMb,index) in assessmentcontentList.filter(
|
||||
(p) => p.parentId == itemFzly.id
|
||||
)"
|
||||
:key="itemMb.id"
|
||||
:key="index"
|
||||
v-show="
|
||||
assessmentcontentList.filter(
|
||||
(p) => p.parentId == itemMb.id
|
||||
@ -85,7 +77,7 @@
|
||||
>
|
||||
<p class="block-content-title">
|
||||
<span class="num">{{ itemMb.sort }}. </span
|
||||
>{{ itemMb.name }} (满足标准)
|
||||
>{{ itemMb.name }} (满足评估标准)
|
||||
</p>
|
||||
</li>
|
||||
</ul>
|
||||
@ -131,25 +123,17 @@
|
||||
>
|
||||
<p class="block-content-title">
|
||||
<span class="num">{{ itemMb.sort }}. </span
|
||||
>{{ itemMb.name }}
|
||||
>{{ itemMb.name }}(未满足评估标准)
|
||||
</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">
|
||||
建议{{ i + 1 }}.{{ itemYs.jyjy }}
|
||||
教育建议 {{ itemMb.jyjy }}
|
||||
</p>
|
||||
</div>
|
||||
</li>
|
||||
<li
|
||||
v-for="itemMb in assessmentcontentList.filter(
|
||||
v-for="(itemMb,index) in assessmentcontentList.filter(
|
||||
(p) => p.parentId == itemFzly.id
|
||||
)"
|
||||
:key="itemMb.id"
|
||||
:key="index"
|
||||
v-show="
|
||||
assessmentcontentList.filter(
|
||||
(p) => p.parentId == itemMb.id
|
||||
@ -160,7 +144,7 @@
|
||||
>
|
||||
<p class="block-content-title">
|
||||
<span class="num">{{ itemMb.sort }}. </span
|
||||
>{{ itemMb.name }} (满足标准)
|
||||
>{{ itemMb.name }} (满足评估标准)
|
||||
</p>
|
||||
</li>
|
||||
</ul>
|
||||
@ -209,25 +193,17 @@
|
||||
>
|
||||
<p class="block-content-title">
|
||||
<span class="num">{{ itemMb.sort }}. </span
|
||||
>{{ itemMb.name }}
|
||||
>{{ itemMb.name }}(未满足评估标准)
|
||||
</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">
|
||||
建议{{ i + 1 }}.{{ itemYs.jyjy }}
|
||||
教育建议 {{ itemMb.jyjy }}
|
||||
</p>
|
||||
</div>
|
||||
</li>
|
||||
<li
|
||||
v-for="itemMb in assessmentcontentList.filter(
|
||||
v-for="(itemMb,index) in assessmentcontentList.filter(
|
||||
(p) => p.parentId == itemFzly.id
|
||||
)"
|
||||
:key="itemMb.id"
|
||||
:key="index"
|
||||
v-show="
|
||||
assessmentcontentList.filter(
|
||||
(p) => p.parentId == itemMb.id
|
||||
@ -238,7 +214,7 @@
|
||||
>
|
||||
<p class="block-content-title">
|
||||
<span class="num">{{ itemMb.sort }}. </span
|
||||
>{{ itemMb.name }} (满足标准)
|
||||
>{{ itemMb.name }} (满足评估标准)
|
||||
</p>
|
||||
</li>
|
||||
</ul>
|
||||
@ -287,25 +263,17 @@
|
||||
>
|
||||
<p class="block-content-title">
|
||||
<span class="num">{{ itemMb.sort }}. </span
|
||||
>{{ itemMb.name }}
|
||||
>{{ itemMb.name }}(未满足评估标准)
|
||||
</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">
|
||||
建议{{ i + 1 }}.{{ itemYs.jyjy }}
|
||||
教育建议 {{ itemMb.jyjy }}
|
||||
</p>
|
||||
</div>
|
||||
</li>
|
||||
<li
|
||||
v-for="itemMb in assessmentcontentList.filter(
|
||||
v-for="(itemMb,index) in assessmentcontentList.filter(
|
||||
(p) => p.parentId == itemFzly.id
|
||||
)"
|
||||
:key="itemMb.id"
|
||||
:key="index"
|
||||
v-show="
|
||||
assessmentcontentList.filter(
|
||||
(p) => p.parentId == itemMb.id
|
||||
@ -316,7 +284,7 @@
|
||||
>
|
||||
<p class="block-content-title">
|
||||
<span class="num">{{ itemMb.sort }}. </span
|
||||
>{{ itemMb.name }} (满足标准)
|
||||
>{{ itemMb.name }} (满足评估标准)
|
||||
</p>
|
||||
</li>
|
||||
</ul>
|
||||
@ -365,25 +333,17 @@
|
||||
>
|
||||
<p class="block-content-title">
|
||||
<span class="num">{{ itemMb.sort }}. </span
|
||||
>{{ itemMb.name }}
|
||||
>{{ itemMb.name }}(未满足评估标准)
|
||||
</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">
|
||||
建议{{ i + 1 }}.{{ itemYs.jyjy }}
|
||||
教育建议 {{ itemMb.jyjy }}
|
||||
</p>
|
||||
</div>
|
||||
</li>
|
||||
<li
|
||||
v-for="itemMb in assessmentcontentList.filter(
|
||||
v-for="(itemMb,index) in assessmentcontentList.filter(
|
||||
(p) => p.parentId == itemFzly.id
|
||||
)"
|
||||
:key="itemMb.id"
|
||||
:key="index"
|
||||
v-show="
|
||||
assessmentcontentList.filter(
|
||||
(p) => p.parentId == itemMb.id
|
||||
@ -394,7 +354,7 @@
|
||||
>
|
||||
<p class="block-content-title">
|
||||
<span class="num">{{ itemMb.sort }}. </span
|
||||
>{{ itemMb.name }} (满足标准)
|
||||
>{{ itemMb.name }} (满足评估标准)
|
||||
</p>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -86,6 +86,9 @@ export default {
|
||||
},
|
||||
setOptions() {
|
||||
this.chart.setOption({
|
||||
title: {
|
||||
text: "考勤统计",
|
||||
},
|
||||
xAxis: {
|
||||
data: this.classOptions,
|
||||
boundaryGap: false,
|
||||
|
@ -65,6 +65,9 @@ export default {
|
||||
this.chart = echarts.init(this.$el, "macarons");
|
||||
|
||||
this.chart.setOption({
|
||||
title: {
|
||||
text: "教职工学历统计",
|
||||
},
|
||||
tooltip: {
|
||||
trigger: "item",
|
||||
formatter: "{a} <br/>{b} : {c} ({d}%)"
|
||||
|
@ -5,62 +5,72 @@
|
||||
</div>
|
||||
<div class="text item">班级总数:{{ classTotal }}</div>
|
||||
<div class="text item">教职工总数:{{ userTotal }}</div>
|
||||
<div class="text item">幼儿总数:0</div>
|
||||
<div class="text item">今日园历活动数:0</div>
|
||||
<div class="text item">学习视频数:0</div>
|
||||
<div class="text item">幼儿总数:{{ childTotal }}</div>
|
||||
<!-- <div class="text item">今日园历活动数:0</div> -->
|
||||
<div class="text item">学习视频数:{{ videoTotal }}</div>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listUser, getUserProfile } from "@/api/system/user";
|
||||
import { listClass } from "@/api/system/class";
|
||||
import { info } from "@/api/system/home";
|
||||
|
||||
export default {
|
||||
props: {
|
||||
className: {
|
||||
type: String,
|
||||
default: "chart"
|
||||
default: "chart",
|
||||
},
|
||||
width: {
|
||||
type: String,
|
||||
default: "100%"
|
||||
default: "100%",
|
||||
},
|
||||
height: {
|
||||
type: String,
|
||||
default: "480px"
|
||||
}
|
||||
default: "480px",
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
deptName: {},
|
||||
classTotal: 0,
|
||||
userTotal: 0
|
||||
userTotal: 0,
|
||||
childTotal: 0,
|
||||
videoTotal: 0,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getDeptName();
|
||||
this.getClassCount();
|
||||
this.getUserCount();
|
||||
this.getInfo();
|
||||
},
|
||||
methods: {
|
||||
getInfo() {
|
||||
info().then((response) => {
|
||||
this.childTotal = response.childcount;
|
||||
this.videoTotal = response.videocount;
|
||||
});
|
||||
},
|
||||
getDeptName() {
|
||||
getUserProfile().then(response => {
|
||||
getUserProfile().then((response) => {
|
||||
this.deptName = response.data.dept.deptName;
|
||||
});
|
||||
},
|
||||
/** 查询班级信息列表 */
|
||||
getClassCount() {
|
||||
listClass(null).then(response => {
|
||||
listClass(null).then((response) => {
|
||||
this.classTotal = response.total;
|
||||
});
|
||||
},
|
||||
/** 查询用户列表 */
|
||||
getUserCount() {
|
||||
listUser(null).then(response => {
|
||||
listUser(null).then((response) => {
|
||||
this.userTotal = response.total;
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user