diff --git a/src/store/index.js b/src/store/index.js index ab34cb0..8a09f7c 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -32,7 +32,7 @@ const actions = { })).then((res) => { if(res.data.result === "success") { ElMessage("提交成功") - context.commit("_setPreDownloadGallery", false) + context.commit("_setPreDownloadGallery", {gallery:false, resolution:data.targetResolution}) } else{ if(res.data.data) @@ -54,7 +54,7 @@ const actions = { }).then((res) => { if(res.data.result === 'success'){ const gallery = JSON.parse(res.data.data) - context.commit("_setPreDownloadGallery", gallery) + context.commit("_setPreDownloadGallery", {gallery}) } else ElMessage("查询失败") @@ -168,8 +168,12 @@ const mutations = { } }) }, - _setPreDownloadGallery(state,gallery){ - state.preDownloadGallery = gallery + _setPreDownloadGallery(state,data){ + if(data.gallery === false) { + state.preDownloadGallery.resolution = data.resolution + state.totalTask.push(state.preDownloadGallery) + } + state.preDownloadGallery = data.gallery }, _openHistoryPanel(state){ state.showHistory = true