diff --git a/src/components/queryComponent/index.vue b/src/components/queryComponent/index.vue index f9caf1b..963fe4e 100644 --- a/src/components/queryComponent/index.vue +++ b/src/components/queryComponent/index.vue @@ -85,6 +85,7 @@ import { put, post } from "@/server/api.js"; // isShowAddButton: 是否显示新增按钮图标,也用来区分预测版本列表组件需要显示的功能 import uploadTemplate from "./upload.vue"; import lookError from "./lookError.vue"; +import {mapMutations} from 'vuex' export default { name: "QueryComponent", components: { @@ -125,6 +126,7 @@ export default { }) .catch(() => { }); }, + ...mapMutations("homePageStore", ["getReleaseAllLoading"]), // 全局发布 releaseAllHandle() { this.$confirm('是否确认全局发布?', "警告", { @@ -133,13 +135,17 @@ export default { type: "warning", }) .then(() => { + this.getReleaseAllLoading(true) return put('/admin/ap/custdemandverhead/issueglobalallversion') }) .then(() => { this.msgSuccess("全局发布成功"); this.$emit('batchReleaseEmit', true) + this.getReleaseAllLoading(false) }) - .catch(() => { }); + .catch(() => { + this.getReleaseAllLoading(false) + }); }, // 全局反发布 contraryReleaseAll() { diff --git a/src/store/homePage/homePage.js b/src/store/homePage/homePage.js index 84d0c02..40549cd 100644 --- a/src/store/homePage/homePage.js +++ b/src/store/homePage/homePage.js @@ -1,11 +1,15 @@ export default { namespaced: true, state: { - withTheRing: {} + withTheRing: {}, + releaseAllLoading: false, }, mutations: { getWithRingStatus (state, componentData) { state.withTheRing = componentData - } + }, + getReleaseAllLoading (state, componentData) { + state.releaseAllLoading = componentData + }, } }; diff --git a/src/views/plan/workbench/homePage/index.vue b/src/views/plan/workbench/homePage/index.vue index b47d380..999acbb 100644 --- a/src/views/plan/workbench/homePage/index.vue +++ b/src/views/plan/workbench/homePage/index.vue @@ -1,5 +1,5 @@