允许创建任务时一并提交tag,修复切换搜索类型时本子会变的问题(我也不确定有没有修好)
This commit is contained in:
parent
59ba787609
commit
1d9f4f9d66
@ -9,7 +9,7 @@
|
||||
<el-option value="link" label="链接"/>
|
||||
<el-option value="keyword" label="关键字"/>
|
||||
<el-option value="tag" label="标签"/>
|
||||
</el-select>
|
||||
</el-select><br>
|
||||
参数:
|
||||
<el-input style="width: 250px;" v-model="param" class="el-input"></el-input>
|
||||
</el-col>
|
||||
@ -53,6 +53,9 @@
|
||||
</el-option>
|
||||
</el-select>
|
||||
</tr>
|
||||
<tr v-if="chosenGallery.availableResolution">
|
||||
自定义标签:<el-input v-model="tag" style="width: 200px"/>
|
||||
</tr>
|
||||
</table>
|
||||
<el-button @click="postTask" v-if="chosenGallery.availableResolution">下载</el-button>
|
||||
<tr v-if="chosenGallery.status === '下载完成'">
|
||||
@ -166,6 +169,7 @@ let type = ref("link")
|
||||
let param = ref("")
|
||||
|
||||
let targetResolution = ref("")
|
||||
let tag = ref("")
|
||||
|
||||
let realAuthCode = computed(() => {
|
||||
return store.state.AuthCode
|
||||
@ -214,7 +218,7 @@ 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 = ""
|
||||
}
|
||||
|
||||
|
||||
@ -38,11 +38,14 @@ 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()
|
||||
@ -379,7 +382,8 @@ const mutations = {
|
||||
})
|
||||
if (state.searchTask.length === 0)
|
||||
ElMessage("未找到该关键字的任务")
|
||||
}
|
||||
}else
|
||||
confirmCurrentTask(state)
|
||||
},
|
||||
_searchLocalByTag(state, tags) {
|
||||
state.searchTask.splice(0)
|
||||
@ -404,7 +408,8 @@ const mutations = {
|
||||
|
||||
if (state.searchTask.length === 0)
|
||||
ElMessage("未找到符合这些tag的任务")
|
||||
}
|
||||
}else
|
||||
confirmCurrentTask(state)
|
||||
},
|
||||
_deleteGallery(state, gid){
|
||||
let tasks = [state.totalGalleryTask, state.downloadGallery, state.collectGallery]
|
||||
@ -417,7 +422,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)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user