diff --git a/ruoyi-ui/src/views/benyi/checkinstatisticsschool/index.vue b/ruoyi-ui/src/views/benyi/checkinstatisticsschool/index.vue index 86531668a..e7d8a5b14 100644 --- a/ruoyi-ui/src/views/benyi/checkinstatisticsschool/index.vue +++ b/ruoyi-ui/src/views/benyi/checkinstatisticsschool/index.vue @@ -41,7 +41,11 @@
-

幼儿园班级儿童考勤表({{ this.month }})

+

{{this.user.dept.deptName}}班级儿童考勤表

+

+ 考勤月份:{{ this.month }} ------ 班级总数:{{ this.classcount }} ------ + 幼儿总数:{{ this.chilidcount }} +

import { listDatetime } from "@/api/benyi/checkindetail"; import { listClassCheck } from "@/api/system/class"; +import { listChild } from "@/api/benyi/child"; +import { getUserProfile } from "@/api/system/user"; export default { name: "checkinstatisticsschool", data() { return { + //用户信息 + user: {}, + //幼儿总数 + chilidcount: "", + //班级数量 + classcount: "", + //月份 month: "", // 遮罩层 loading: true, @@ -127,8 +140,14 @@ export default { created() { this.getNowTime(); //得到月份 this.getHeadList(); + this.getUser(); }, methods: { + getUser() { + getUserProfile().then(response => { + this.user = response.data; + }); + }, getNowTime() { var now = new Date(); var year = now.getFullYear(); // 得到年份 @@ -157,6 +176,12 @@ export default { }); this.getList(); + this.getChildCount(); + }, + getChildCount() { + listChild(null).then((response) => { + this.chilidcount = response.rows.length; + }); }, getList() { this.loading = true; @@ -166,6 +191,7 @@ export default { } listClassCheck(this.queryParams).then((response) => { console.log(response.rows); + this.classcount = response.rows.length - 1; // this.tableData = response.rows; response.rows.forEach((res) => { this.tableData.push({ diff --git a/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByChildController.java b/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByChildController.java index dca03bf7f..7eefb46fb 100644 --- a/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByChildController.java +++ b/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByChildController.java @@ -41,7 +41,7 @@ public class ByChildController extends BaseController { /** * 查询幼儿信息列表 */ - @PreAuthorize("@ss.hasPermi('benyi:child:list')") + @PreAuthorize("@ss.hasPermi('benyi:child:list')" + "||@ss.hasPermi('benyi:checkinstatisticsschool:list')") @GetMapping("/list") public TableDataInfo list(ByChild byChild) { startPage();