|
@@ -1,5 +1,5 @@
|
|
|
<template>
|
|
|
- <div id="menuScreen">
|
|
|
+ <div id="menuScreen" style="position: relative;">
|
|
|
<div class="title">德荣食堂</div>
|
|
|
<div class="title2">
|
|
|
<span>时段</span>
|
|
@@ -33,22 +33,27 @@
|
|
|
</el-table>
|
|
|
</div>
|
|
|
</div>
|
|
|
+
|
|
|
+ <p class="people">{{nowDate}}园区打卡人数:{{ dakaNum }}人</p>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { menuList } from '@/api/canteen/basic.js'
|
|
|
+import axios from 'axios'
|
|
|
+import { menuList, dakaPeople } from '@/api/canteen/basic.js'
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
tableData: [],
|
|
|
nowDate: '',
|
|
|
- intervalId: null
|
|
|
+ intervalId: null,
|
|
|
+ dakaNum: ''
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
this.getList();
|
|
|
this.dataRefreh()
|
|
|
+ this.getPeoples()
|
|
|
},
|
|
|
destroyed(){
|
|
|
// 在页面销毁后,清除计时器
|
|
@@ -93,13 +98,24 @@ export default {
|
|
|
this.intervalId = setInterval(() => {
|
|
|
console.log("刷新" + new Date());
|
|
|
this.getList(); //加载数据函数
|
|
|
- }, 1000*60*10);
|
|
|
+ this.getPeoples() // 加载园区打卡人数
|
|
|
+ }, 1000*60*5);
|
|
|
},
|
|
|
// 停止定时器
|
|
|
clear() {
|
|
|
clearInterval(this.intervalId); //清除计时器
|
|
|
this.intervalId = null; //设置为null
|
|
|
},
|
|
|
+ // 获取园区打卡数据
|
|
|
+ getPeoples() {
|
|
|
+ axios.defaults.baseURL = ''
|
|
|
+ axios.get('/data-service-center/accessControl/getPeople ').then(res => {
|
|
|
+ console.log(res.data)
|
|
|
+ if(res.data.code === 200) {
|
|
|
+ this.dakaNum = res.data.data
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
},
|
|
|
}
|
|
|
</script>
|
|
@@ -193,4 +209,11 @@ export default {
|
|
|
::v-deep .el-table .cell {
|
|
|
line-height: normal;
|
|
|
}
|
|
|
+.people {
|
|
|
+ position: absolute;
|
|
|
+ top: 0;right: 1%;
|
|
|
+ font-size: 3vh;
|
|
|
+ font-weight: 600;
|
|
|
+ color: #fff;
|
|
|
+}
|
|
|
</style>
|