|
@@ -1,4 +1,19 @@
|
|
|
<template>
|
|
|
+<ContentWrap>
|
|
|
+ <!-- 数据展示 -->
|
|
|
+ <div class="flex">
|
|
|
+ <div class="data-item" style="color: black;">
|
|
|
+ 正常打卡人数: <span>{{ totalSate.normalNum }}</span>
|
|
|
+ </div>
|
|
|
+ <div class="data-item" style="color: #f56c6c;">
|
|
|
+ 异常打卡人数: <span>{{ totalSate.errorNum }}</span>
|
|
|
+ </div>
|
|
|
+ <div class="data-item" style="color: gray;">
|
|
|
+ 请假人数: <span>{{ totalSate.excuseNum }}</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </ContentWrap>
|
|
|
+
|
|
|
<ContentWrap>
|
|
|
<!-- 搜索工作栏 -->
|
|
|
<el-form
|
|
@@ -203,6 +218,19 @@ defineOptions({ name: 'StudentAttendance' })
|
|
|
const message = useMessage() // 消息弹窗
|
|
|
const { t } = useI18n() // 国际化
|
|
|
|
|
|
+let totalSate = reactive({
|
|
|
+ normalNum: 0,
|
|
|
+ errorNum: 0,
|
|
|
+ excuseNum: 0,
|
|
|
+})
|
|
|
+const getCount = async () => {
|
|
|
+ const data = await StudentAttendanceApi.getDayAttendance()
|
|
|
+ console.log("实时出勤统计", data);
|
|
|
+ totalSate.errorNum = data.errorNum
|
|
|
+ totalSate.normalNum = data.normalNum
|
|
|
+ totalSate.excuseNum = data.excuseNum
|
|
|
+}
|
|
|
+
|
|
|
const userInfo = ref({} as ProfileVO)
|
|
|
const getUserInfo = async () => {
|
|
|
const users = await getUserProfile()
|
|
@@ -338,6 +366,7 @@ onMounted(async () => {
|
|
|
await getUserInfo()
|
|
|
getList()
|
|
|
getSupervisor()
|
|
|
+ getCount() // 获取实时出勤统计
|
|
|
})
|
|
|
</script>
|
|
|
|
|
@@ -365,4 +394,14 @@ onMounted(async () => {
|
|
|
.status-unknown {
|
|
|
color: gray;
|
|
|
}
|
|
|
+
|
|
|
+.flex {
|
|
|
+ display: flex;
|
|
|
+}
|
|
|
+
|
|
|
+.data-item {
|
|
|
+ margin: 0 20px;
|
|
|
+ font-size: 16px;
|
|
|
+ font-weight: bold;
|
|
|
+}
|
|
|
</style>
|