|
@@ -22,8 +22,8 @@ const props = defineProps({
|
|
|
},
|
|
|
});
|
|
|
const bigScreenData: any = inject("bigScreenData");
|
|
|
-onMounted(async () => {
|
|
|
- let res = await teamAttendance();
|
|
|
+const loadData = async () => {
|
|
|
+ let res = await teamAttendance()
|
|
|
if (res.data.length > 0) {
|
|
|
let dicts = {
|
|
|
deptName: `<span style='font-size:${bigScreenData.value.fontSize * 1.5}px'>班组名称</span>`,
|
|
@@ -57,7 +57,13 @@ onMounted(async () => {
|
|
|
},
|
|
|
};
|
|
|
}
|
|
|
-});
|
|
|
+}
|
|
|
+onMounted(() => {
|
|
|
+ loadData()
|
|
|
+ const timer = setInterval(loadData, 60 * 5 * 1000) // 60秒 = 60000毫秒
|
|
|
+ // 组件卸载时清除定时器
|
|
|
+ onUnmounted(() => clearInterval(timer))
|
|
|
+})
|
|
|
|
|
|
const tableHover = (data: any) => {
|
|
|
// console.log("mouseover", data.row[data.columnIndex]);
|