允许创建任务时一并提交tag,修复切换搜索类型时本子会变的问题(我也不确定有没有修好)
This commit is contained in:
parent
9a653d3bc5
commit
6644d420db
@ -46,12 +46,16 @@
|
|||||||
<tr>本子大小:{{chosenGallery.fileSize}}</tr>
|
<tr>本子大小:{{chosenGallery.fileSize}}</tr>
|
||||||
<tr>本子状态:{{chosenGallery.status}}</tr>
|
<tr>本子状态:{{chosenGallery.status}}</tr>
|
||||||
<tr v-if="chosenGallery.availableResolution">
|
<tr v-if="chosenGallery.availableResolution">
|
||||||
目标分辨率:<el-select v-model="targetResolution">
|
目标分辨率:<el-select v-model="targetResolution" style="width: 200px">
|
||||||
<el-option v-for="(fileSize, resolution) in chosenGallery.availableResolution" :value="resolution"
|
<el-option v-for="(fileSize, resolution) in chosenGallery.availableResolution" :value="resolution"
|
||||||
:label="resolution + ' ' + fileSize">
|
:label="resolution + ' ' + fileSize">
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr v-if="chosenGallery.availableResolution">
|
||||||
|
自定义标签:<el-input v-model="tag"/>
|
||||||
|
</tr>
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
<el-button @click="postTask" v-if="chosenGallery.availableResolution">下载</el-button>
|
<el-button @click="postTask" v-if="chosenGallery.availableResolution">下载</el-button>
|
||||||
<tr v-if="chosenGallery.status === '下载完成'">
|
<tr v-if="chosenGallery.status === '下载完成'">
|
||||||
@ -162,6 +166,7 @@ let type = ref("link")
|
|||||||
let param = ref("")
|
let param = ref("")
|
||||||
|
|
||||||
let targetResolution = ref("")
|
let targetResolution = ref("")
|
||||||
|
let tag = ref("")
|
||||||
|
|
||||||
let realAuthCode = computed(() => {
|
let realAuthCode = computed(() => {
|
||||||
return store.state.AuthCode
|
return store.state.AuthCode
|
||||||
@ -208,7 +213,10 @@ function postTask(){
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
let tempLink = coverLink(param.value)
|
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 = ""
|
targetResolution.value = ""
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -236,7 +244,6 @@ function queryLocalTask(){
|
|||||||
}
|
}
|
||||||
function resetLocalQuery(){
|
function resetLocalQuery(){
|
||||||
store.commit("_searchLocalByKeyword", "")
|
store.commit("_searchLocalByKeyword", "")
|
||||||
store.commit("_searchLocalByTag", [''])
|
|
||||||
param.value = ""
|
param.value = ""
|
||||||
}
|
}
|
||||||
function queryGalleries(link){
|
function queryGalleries(link){
|
||||||
@ -425,7 +432,7 @@ function saveDarkConfig(){
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
.el-input{
|
.el-input{
|
||||||
width: 300px;
|
width: 200px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#loading {
|
#loading {
|
||||||
|
|||||||
@ -38,11 +38,12 @@ const actions = {
|
|||||||
axios.post(GalleryManageUrl, qs.stringify({
|
axios.post(GalleryManageUrl, qs.stringify({
|
||||||
AuthCode: state.AuthCode,
|
AuthCode: state.AuthCode,
|
||||||
link: data.link,
|
link: data.link,
|
||||||
targetResolution: data.targetResolution
|
targetResolution: data.targetResolution,
|
||||||
|
tag: data.tag
|
||||||
})).then((res) => {
|
})).then((res) => {
|
||||||
if(res.data.result === "success") {
|
if(res.data.result === "success") {
|
||||||
ElMessage("提交成功")
|
ElMessage("提交成功")
|
||||||
context.commit("_setChosenGallery", {gallery: false, resolution:data.targetResolution})
|
context.commit("_setChosenGallery", {gallery: false, resolution:data.targetResolution, tag: data.tag})
|
||||||
if(state.galleryRefreshTimer === 0)
|
if(state.galleryRefreshTimer === 0)
|
||||||
state.galleryRefreshTimer = setInterval(() => {
|
state.galleryRefreshTimer = setInterval(() => {
|
||||||
context.dispatch("updateGalleryTasks", "undone").then()
|
context.dispatch("updateGalleryTasks", "undone").then()
|
||||||
@ -391,7 +392,8 @@ const mutations = {
|
|||||||
ElMessage("未找到该关键字的任务")
|
ElMessage("未找到该关键字的任务")
|
||||||
else
|
else
|
||||||
state.currentTasks = state.searchTask
|
state.currentTasks = state.searchTask
|
||||||
}
|
}else
|
||||||
|
confirmCurrentTask(state)
|
||||||
},
|
},
|
||||||
_searchLocalByTag(state, tags) {
|
_searchLocalByTag(state, tags) {
|
||||||
state.searchTask.splice(0)
|
state.searchTask.splice(0)
|
||||||
@ -418,7 +420,8 @@ const mutations = {
|
|||||||
ElMessage("未找到符合这些tag的任务")
|
ElMessage("未找到符合这些tag的任务")
|
||||||
else
|
else
|
||||||
state.currentTasks = state.searchTask
|
state.currentTasks = state.searchTask
|
||||||
}
|
}else
|
||||||
|
confirmCurrentTask(state)
|
||||||
},
|
},
|
||||||
_deleteGallery(state, gid){
|
_deleteGallery(state, gid){
|
||||||
let tasks = [state.totalGalleryTask, state.downloadGallery, state.collectGallery]
|
let tasks = [state.totalGalleryTask, state.downloadGallery, state.collectGallery]
|
||||||
@ -431,7 +434,7 @@ const mutations = {
|
|||||||
state.chosenGallery.fileSize = "等待下载完成后再查看"
|
state.chosenGallery.fileSize = "等待下载完成后再查看"
|
||||||
state.chosenGallery.createTimeDisplay = "等待下载完成后再查看"
|
state.chosenGallery.createTimeDisplay = "等待下载完成后再查看"
|
||||||
state.chosenGallery.progress = "已提交"
|
state.chosenGallery.progress = "已提交"
|
||||||
state.chosenGallery.tag = ""
|
state.chosenGallery.tag = data.tag
|
||||||
state.chosenGallery.downloader = state.userId
|
state.chosenGallery.downloader = state.userId
|
||||||
state.totalGalleryTask.push(state.chosenGallery)
|
state.totalGalleryTask.push(state.chosenGallery)
|
||||||
state.downloadGallery.push(state.chosenGallery)
|
state.downloadGallery.push(state.chosenGallery)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user