添加正在运行定时器,添加显示上次成功时间

This commit is contained in:
lijun 2025-12-14 16:02:26 +08:00
parent 8121c1ce7c
commit 609d97ddbd
1 changed files with 33 additions and 0 deletions

View File

@ -17,6 +17,7 @@ export default {
tableLoading: false,
ip: "",
tableData: [],
timer: null, //
tokenData: {
server: localStorage.getItem("cid_server") || "gep.ljsea.xyz",
token: localStorage.getItem("token"),
@ -59,6 +60,24 @@ export default {
};
},
watch: {
// runningDialogVisible
runningDialogVisible(newVal) {
if (newVal) {
//
this.timer = setInterval(() => {
this.GetCIDRuningList();
}, 1000);
} else {
//
if (this.timer) {
clearInterval(this.timer);
this.timer = null;
}
}
}
},
// methods
//
methods: {
@ -269,6 +288,14 @@ export default {
this.getIpClient();
this.getCIDList();
},
//
beforeUnmount() {
if (this.timer) {
clearInterval(this.timer);
this.timer = null;
}
},
};
</script>
@ -468,6 +495,12 @@ export default {
show-overflow-tooltip
width="100"
></el-table-column>
<el-table-column
prop="last_success"
label="上次成功"
show-overflow-tooltip
width="100"
></el-table-column>
<el-table-column label="操作" width="350">
<template #default="scope">
<el-button