diff --git a/src/components/DashBoard.vue b/src/components/DashBoard.vue
index a780c1f..4d1e744 100644
--- a/src/components/DashBoard.vue
+++ b/src/components/DashBoard.vue
@@ -5,7 +5,7 @@
- 查询参数类型:
+ 查询参数类型:
@@ -205,6 +205,11 @@ function queryLocalTask(){
break
}
}
+function resetLocalQuery(){
+ store.commit("_searchLocalByKeyword", "")
+ store.commit("_searchLocalByTaf", [''])
+ param.value = ""
+}
//删除任务
function deleteVideo(){
diff --git a/src/store/index.js b/src/store/index.js
index 150a0de..d0e371e 100644
--- a/src/store/index.js
+++ b/src/store/index.js
@@ -461,24 +461,35 @@ const mutations = {
_searchLocalByLink(state, link){
let tasks
let i = 0
- let found = false
+ let gid = null
+ let name = null
- if(state.showType === "gallery")
+ if(state.showType === "gallery") {
tasks = state.totalGalleryTask
+ gid = link.split("/")[4]
+ }
else
tasks = state.totalVideoTask
- for (i = 0; i < tasks.length; i++)
- if (tasks[i].link === link) {
+ if(gid === null)
+ for (i = 0; i < tasks.length; i++) {
+ if (tasks[i].link === link) {
+ state.page = Math.floor(i / state.length) + 1
+ name = tasks[i].name
+ break
+ }
+ }
+ else for (i = 0; i < tasks.length; i++)
+ if (tasks[i].gid === gid) {
state.page = Math.floor(i / state.length) + 1
- found = true
+ name = state.sortType === "shortName" ? tasks[i].shortName: tasks[i].name
break
}
- if(!found)
+ if(!name)
ElMessage("未找到此任务")
else
- ElMessage("已跳转到该任务所在页数")
+ ElMessage("已跳转到该任务所在页数,任务名:" + name)
},
_searchLocalByKeyword(state, keyword){
state.searchTask.splice(0)