|
@@ -7,12 +7,6 @@
|
|
|
:loading="loading"
|
|
|
:searchConfig="searchConfig"
|
|
|
highlight-current-row
|
|
|
- :action-list="[
|
|
|
- // {
|
|
|
- // text: '刷新',
|
|
|
- // action: () => getList(),
|
|
|
- // },
|
|
|
- ]"
|
|
|
@get-list="getList">
|
|
|
</byTable>
|
|
|
</div>
|
|
@@ -155,6 +149,7 @@ const getList = async (req) => {
|
|
|
sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
|
|
|
loading.value = true;
|
|
|
proxy.post("/excelGenerateLog/page", sourceList.value.pagination).then((res) => {
|
|
|
+ console.log(res.rows);
|
|
|
sourceList.value.data = res.rows;
|
|
|
sourceList.value.pagination.total = res.total;
|
|
|
setTimeout(() => {
|
|
@@ -189,6 +184,21 @@ const clickDelete = (row) => {
|
|
|
})
|
|
|
.catch(() => {});
|
|
|
};
|
|
|
+const timer = ref(null);
|
|
|
+const startTimer = () => {
|
|
|
+ timer.value = setInterval(() => {
|
|
|
+ if (sourceList.value.data && sourceList.value.data.length > 0) {
|
|
|
+ let list = sourceList.value.data.filter((item) => [1, 2, 3].includes(item.status));
|
|
|
+ if (list && list.length > 0) {
|
|
|
+ getList();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }, 5000);
|
|
|
+};
|
|
|
+startTimer();
|
|
|
+onBeforeUnmount(() => {
|
|
|
+ clearInterval(timer.value); // 清除定时器
|
|
|
+});
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped></style>
|