+
{
- // 将表格和工具栏进行关联
- const $table = this.$refs.dataTable
- console.log(this.$refs)
- console.log($table)
- $table.connect(this.$refs.xToolbar)
- //})
+
{#console.log("获取下载器数量:", this.downloaders.length)#}
{#this.get_downloading(this.downloaders[0].id)#}
this.timer = setInterval(() => {
@@ -443,33 +465,50 @@
)
},
created() {
-
+ this.$nextTick(() => {
+ // 将表格和工具栏进行关联
+ const $table = this.$refs.dataTable
+ console.log(this.$refs)
+ console.log($table)
+ $table.connect(this.$refs.xToolbar)
+ })
},
watch: {},
methods: {
+ clearFilters() {
+ //清除筛选
+ this.$refs.dataTable.clearFilter()
+ },
+ clearSelection() {
+ //清除选中
+ this.$refs.dataTable.clearCheckboxRow()
+ },
stopRefresh() {
+ this.refresh = true
clearInterval(this.timer)
this.timer = null
},
startRefresh() {
+ this.refresh = false
this.timer = setInterval(() => {
- this.get_downloading(this.downloaders[0].id)
+ this.get_downloading(this.downloader_id)
}, 1500)
},
handleButtonClick(id) {
- const loading = this.$loading({
- lock: true, //lock的修改符--默认是false
- text: 'Loading', //显示在加载图标下方的加载文案
- spinner: 'el-icon-loading', //自定义加载图标类名
- background: 'rgba(0, 0, 0, 0.7)', //遮罩层颜色
- target: document.querySelector('#table') //loadin覆盖的dom元素节点
- });
+ {#const loading = this.$loading({#}
+ {# lock: true, //lock的修改符--默认是false#}
+ {# text: 'Loading', //显示在加载图标下方的加载文案#}
+ {# spinner: 'el-icon-loading', //自定义加载图标类名#}
+ {# background: 'rgba(0, 0, 0, 0.7)', //遮罩层颜色#}
+ {# target: document.querySelector('#table') //loadin覆盖的dom元素节点#}
+ //});
this.loading = true
clearInterval(this.timer)
this.timer = null
this.mainData = []
this.get_downloading(id)
- loading.close()
+ {#this.loading = false#}
+ {#loading.close()#}
{#this.loading = false#}
this.timer = setInterval(() => {
this.get_downloading(id)
@@ -496,7 +535,6 @@
})
},
get_downloading(downloader_id) {
-
axios.get(
"{% url "downloading" %}",
{
@@ -532,13 +570,14 @@
$table.setFilter(categoryColumn, this.categoryFilters)
}
const trackerColumn = $table.getColumnByField('tracker')
- console.log(trackerColumn)
+ {#console.log(trackerColumn)#}
if (trackerColumn) {
$table.setFilter(trackerColumn, trackerFilter)
}
}
{#console.log(res.data.data.tracker_filters)#}
this.server_state = res.data.data.server_state
+ this.loading = false
// 获取种子
//this.$message({
// type: 'success',