mirror of
https://github.com/ngfchl/ptools
synced 2023-07-10 13:41:22 +08:00
1. 精简data数据
2. 设置数据刷新10分钟后结束,降低docker与下载器压力
This commit is contained in:
@@ -127,7 +127,7 @@
|
|||||||
{# @selection-change="tableSelected"#}
|
{# @selection-change="tableSelected"#}
|
||||||
:menu-config="tableMenu"
|
:menu-config="tableMenu"
|
||||||
@menu-click="contextMenuClickEvent"
|
@menu-click="contextMenuClickEvent"
|
||||||
:data="torrents"
|
:data="mainData.torrents"
|
||||||
height="700" size="mini"
|
height="700" size="mini"
|
||||||
auto-resize
|
auto-resize
|
||||||
:row-key="(row) => row.hash"
|
:row-key="(row) => row.hash"
|
||||||
@@ -266,7 +266,6 @@
|
|||||||
downloaders: [],
|
downloaders: [],
|
||||||
loading: false,
|
loading: false,
|
||||||
mainData: {},
|
mainData: {},
|
||||||
torrents: [],
|
|
||||||
dialogFormVisible: false,
|
dialogFormVisible: false,
|
||||||
timer: {},
|
timer: {},
|
||||||
deleteForm: false,
|
deleteForm: false,
|
||||||
@@ -418,6 +417,13 @@
|
|||||||
}, 1500)
|
}, 1500)
|
||||||
|
|
||||||
},
|
},
|
||||||
|
updated() {
|
||||||
|
// 十分钟后停止刷新
|
||||||
|
setTimeout(() => {
|
||||||
|
clearInterval(this.timer)
|
||||||
|
this.timer = null
|
||||||
|
}, 1000 * 60 * 10)
|
||||||
|
},
|
||||||
// 清除定时器,不然页面会卡死
|
// 清除定时器,不然页面会卡死
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
this.$once('hook:beforeDestroy',
|
this.$once('hook:beforeDestroy',
|
||||||
@@ -481,7 +487,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
).then(res => {
|
).then(res => {
|
||||||
{#console.log(res.data.data.torrents)#}
|
|
||||||
if (res.data.code === 0) {
|
if (res.data.code === 0) {
|
||||||
this.mainData = res.data.data
|
this.mainData = res.data.data
|
||||||
// 任务状态过滤器数据
|
// 任务状态过滤器数据
|
||||||
@@ -505,7 +510,6 @@
|
|||||||
{#console.log(this.categoryFilters)#}
|
{#console.log(this.categoryFilters)#}
|
||||||
this.server_state = res.data.data.server_state
|
this.server_state = res.data.data.server_state
|
||||||
// 获取种子
|
// 获取种子
|
||||||
this.torrents = res.data.data.torrents
|
|
||||||
//this.$message({
|
//this.$message({
|
||||||
// type: 'success',
|
// type: 'success',
|
||||||
// message: '任务加载成功!!'
|
// message: '任务加载成功!!'
|
||||||
|
|||||||
Reference in New Issue
Block a user