From 6644d420db451a1d356c8d8727eff5c863267ac0 Mon Sep 17 00:00:00 2001 From: chuzhongzai Date: Sun, 23 Apr 2023 16:11:48 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=81=E8=AE=B8=E5=88=9B=E5=BB=BA=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E6=97=B6=E4=B8=80=E5=B9=B6=E6=8F=90=E4=BA=A4tag?= =?UTF-8?q?=EF=BC=8C=E4=BF=AE=E5=A4=8D=E5=88=87=E6=8D=A2=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E6=97=B6=E6=9C=AC=E5=AD=90=E4=BC=9A=E5=8F=98?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98=EF=BC=88=E6=88=91=E4=B9=9F=E4=B8=8D?= =?UTF-8?q?=E7=A1=AE=E5=AE=9A=E6=9C=89=E6=B2=A1=E6=9C=89=E4=BF=AE=E5=A5=BD?= =?UTF-8?q?=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/DashBoard.vue | 15 +++++++++++---- src/store/index.js | 13 ++++++++----- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/src/components/DashBoard.vue b/src/components/DashBoard.vue index b06f42c..4423ac6 100644 --- a/src/components/DashBoard.vue +++ b/src/components/DashBoard.vue @@ -46,12 +46,16 @@ 本子大小:{{chosenGallery.fileSize}} 本子状态:{{chosenGallery.status}} - 目标分辨率: + 目标分辨率: + + 自定义标签: + + 下载 @@ -162,6 +166,7 @@ let type = ref("link") let param = ref("") let targetResolution = ref("") +let tag = ref("") let realAuthCode = computed(() => { return store.state.AuthCode @@ -208,7 +213,10 @@ function postTask(){ return } let tempLink = coverLink(param.value) - store.dispatch("postGalleryTask", {link: tempLink, targetResolution: targetResolution.value}) + store.dispatch("postGalleryTask", + {link: tempLink, + targetResolution: targetResolution.value, + tag:tag.value}) targetResolution.value = "" } @@ -236,7 +244,6 @@ function queryLocalTask(){ } function resetLocalQuery(){ store.commit("_searchLocalByKeyword", "") - store.commit("_searchLocalByTag", ['']) param.value = "" } function queryGalleries(link){ @@ -425,7 +432,7 @@ function saveDarkConfig(){ text-align: center; } .el-input{ - width: 300px; + width: 200px; } #loading { diff --git a/src/store/index.js b/src/store/index.js index 1a1e8a2..b62e8cd 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -38,11 +38,12 @@ const actions = { axios.post(GalleryManageUrl, qs.stringify({ AuthCode: state.AuthCode, link: data.link, - targetResolution: data.targetResolution + targetResolution: data.targetResolution, + tag: data.tag })).then((res) => { if(res.data.result === "success") { ElMessage("提交成功") - context.commit("_setChosenGallery", {gallery: false, resolution:data.targetResolution}) + context.commit("_setChosenGallery", {gallery: false, resolution:data.targetResolution, tag: data.tag}) if(state.galleryRefreshTimer === 0) state.galleryRefreshTimer = setInterval(() => { context.dispatch("updateGalleryTasks", "undone").then() @@ -391,7 +392,8 @@ const mutations = { ElMessage("未找到该关键字的任务") else state.currentTasks = state.searchTask - } + }else + confirmCurrentTask(state) }, _searchLocalByTag(state, tags) { state.searchTask.splice(0) @@ -418,7 +420,8 @@ const mutations = { ElMessage("未找到符合这些tag的任务") else state.currentTasks = state.searchTask - } + }else + confirmCurrentTask(state) }, _deleteGallery(state, gid){ let tasks = [state.totalGalleryTask, state.downloadGallery, state.collectGallery] @@ -431,7 +434,7 @@ const mutations = { state.chosenGallery.fileSize = "等待下载完成后再查看" state.chosenGallery.createTimeDisplay = "等待下载完成后再查看" state.chosenGallery.progress = "已提交" - state.chosenGallery.tag = "" + state.chosenGallery.tag = data.tag state.chosenGallery.downloader = state.userId state.totalGalleryTask.push(state.chosenGallery) state.downloadGallery.push(state.chosenGallery)