47 vor 5 Monaten
Ursprung
Commit
9c23d292af

+ 39 - 0
src/views/system/studentAttendanceManage/studentAttendance/index.vue

@@ -1,4 +1,19 @@
 <template>
 <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>
   <ContentWrap>
     <!-- 搜索工作栏 -->
     <!-- 搜索工作栏 -->
     <el-form
     <el-form
@@ -215,6 +230,19 @@ const getUserInfo = async () => {
   userInfo.value = users
   userInfo.value = users
 }
 }
 
 
+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 loading = ref(true) // 列表的加载中
 const loading = ref(true) // 列表的加载中
 const list = ref<StudentAttendanceVO[]>([]) // 列表的数据
 const list = ref<StudentAttendanceVO[]>([]) // 列表的数据
 const total = ref(0) // 列表的总页数
 const total = ref(0) // 列表的总页数
@@ -343,6 +371,7 @@ onMounted(async () => {
   await getUserInfo()
   await getUserInfo()
   getList()
   getList()
   getSupervisor()
   getSupervisor()
+  getCount() // 获取实时出勤统计
 })
 })
 </script>
 </script>
 
 
@@ -370,4 +399,14 @@ onMounted(async () => {
 .status-unknown {
 .status-unknown {
   color: gray;
   color: gray;
 }
 }
+
+.flex {
+  display: flex;
+}
+
+.data-item {
+  margin: 0 20px; 
+  font-size: 16px; 
+  font-weight: bold;
+}
 </style>
 </style>

+ 39 - 0
src/views/system/studentAttendanceManage/studentAttendanceError/index.vue

@@ -1,4 +1,19 @@
 <template>
 <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>
   <ContentWrap>
     <!-- 搜索工作栏 -->
     <!-- 搜索工作栏 -->
     <el-form
     <el-form
@@ -203,6 +218,19 @@ defineOptions({ name: 'StudentAttendance' })
 const message = useMessage() // 消息弹窗
 const message = useMessage() // 消息弹窗
 const { t } = useI18n() // 国际化
 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 userInfo = ref({} as ProfileVO)
 const getUserInfo = async () => {
 const getUserInfo = async () => {
   const users = await getUserProfile()
   const users = await getUserProfile()
@@ -338,6 +366,7 @@ onMounted(async () => {
   await getUserInfo()
   await getUserInfo()
   getList()
   getList()
   getSupervisor()
   getSupervisor()
+  getCount() // 获取实时出勤统计
 })
 })
 </script>
 </script>
 
 
@@ -365,4 +394,14 @@ onMounted(async () => {
 .status-unknown {
 .status-unknown {
   color: gray;
   color: gray;
 }
 }
+
+.flex {
+  display: flex;
+}
+
+.data-item {
+  margin: 0 20px; 
+  font-size: 16px; 
+  font-weight: bold;
+}
 </style>
 </style>

+ 39 - 0
src/views/system/studentAttendanceManage/studentAttendanceExcused/index.vue

@@ -1,4 +1,19 @@
 <template>
 <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>
   <ContentWrap>
     <!-- 搜索工作栏 -->
     <!-- 搜索工作栏 -->
     <el-form
     <el-form
@@ -204,6 +219,19 @@ defineOptions({ name: 'StudentAttendance' })
 const message = useMessage() // 消息弹窗
 const message = useMessage() // 消息弹窗
 const { t } = useI18n() // 国际化
 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 userInfo = ref({} as ProfileVO)
 const getUserInfo = async () => {
 const getUserInfo = async () => {
   const users = await getUserProfile()
   const users = await getUserProfile()
@@ -339,6 +367,7 @@ onMounted(async () => {
   await getUserInfo()
   await getUserInfo()
   getList()
   getList()
   getSupervisor()
   getSupervisor()
+  getCount() // 获取实时出勤统计
 })
 })
 </script>
 </script>
 
 
@@ -366,4 +395,14 @@ onMounted(async () => {
 .status-unknown {
 .status-unknown {
   color: gray;
   color: gray;
 }
 }
+
+.flex {
+  display: flex;
+}
+
+.data-item {
+  margin: 0 20px; 
+  font-size: 16px; 
+  font-weight: bold;
+}
 </style>
 </style>