diff --git a/templates/auto_pt/downloading.html b/templates/auto_pt/downloading.html index 1c9b466..6046976 100644 --- a/templates/auto_pt/downloading.html +++ b/templates/auto_pt/downloading.html @@ -167,6 +167,8 @@ @selection-change="tableSelected" :menu-config="tableMenu" @menu-click="contextMenuClickEvent" + @cell-dblclick="showDetails" + {# @cell-click="detailClick"#} :data="mainData.torrents" :loading="loading" height="700" size="mini" @@ -271,6 +273,28 @@ +
+ + + + + + + +
@@ -319,21 +343,22 @@ categoryForm: false, refresh: false, downloader_id: 0, + details: false, torrent: { - name: '', - category: '', - size: '', - downloaded: '', - uploaded: '', - dlspeed: '', - upspeed: '', - progress: '', - ratio: '', - seeding_time: '', - state: '', - last_activity: '', - added_on: '', - tracker: '', + {#name: '',#} + {#category: '',#} + {#size: '',#} + {#downloaded: '',#} + {#uploaded: '',#} + {#dlspeed: '',#} + {#upspeed: '',#} + {#progress: '',#} + {#ratio: '',#} + {#seeding_time: '',#} + {#state: '',#} + {#last_activity: '',#} + {#added_on: '',#} + {#tracker: '',#} }, customColors: [ {color: '#f56c6c', percentage: 20}, @@ -476,14 +501,23 @@ this.$nextTick(() => { // 将表格和工具栏进行关联 const $table = this.$refs.dataTable - console.log(this.$refs) - console.log($table) + {#console.log(this.$refs)#} + {#console.log($table)#} $table.connect(this.$refs.xToolbar) }) this.get_downloaders() }, watch: {}, methods: { + showDetails({row, rowIndex, $rowIndex, column, columnIndex, $columnIndex, $event}) { + console.log(row) + this.torrent = row + this.details = true + }, + closeDrawer() { + this.details = false + this.torrent = {} + }, clearFilters() { //清除筛选 this.$refs.dataTable.clearFilter() @@ -652,8 +686,10 @@ handleTracker({row, column, cellValue, index}) { // 格式化输出tracker所属的站点 let site = this.tracker_list.find(site => cellValue.includes(site.tracker)) - {#console.log(site)#} - return site ? site.name : cellValue + {#console.log(row)#} + {#console.log(cellValue.includes('joy'))#} + {#return cellValue#} + return null != site ? site.name : cellValue }, handleState({row, column, cellValue, index}) { return download_state[cellValue]