From d0eeeafbaee31ffd76f443d3dec0db34eba05fa0 Mon Sep 17 00:00:00 2001 From: ngfchl Date: Sat, 8 Oct 2022 15:59:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=B3=E4=BE=A7=E6=8A=BD=E5=B1=89=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E4=BB=BB=E5=8A=A1=E8=AF=A6=E6=83=85=EF=BC=8C=E6=9A=82?= =?UTF-8?q?=E6=97=B6=E6=9C=AA=E5=AF=B9=E6=95=B0=E6=8D=AE=E5=81=9A=E8=BF=87?= =?UTF-8?q?=E6=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/auto_pt/downloading.html | 72 ++++++++++++++++++++++-------- 1 file changed, 54 insertions(+), 18 deletions(-) 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]