From 2e5f9be6013f8da9d5c4f1702309256fad23d920 Mon Sep 17 00:00:00 2001 From: Germey Date: Sun, 3 Mar 2024 15:03:49 +0800 Subject: [PATCH] fix actions --- .../midjourney/tasks/TaskBriefList.vue | 9 +-- .../midjourney/tasks/TaskFullList.vue | 17 ++++-- .../midjourney/tasks/TaskPreview.vue | 47 ++++++--------- src/components/order/Create.vue | 11 +--- src/operators/midjourney.ts | 3 +- src/pages/chatdoc/Conversation.vue | 15 +---- src/pages/chatdoc/Index.vue | 4 +- src/pages/midjourney/History.vue | 12 ++-- src/pages/midjourney/Index.vue | 12 ++-- src/store/chatdoc/models.ts | 2 +- src/store/chatdoc/mutations.ts | 7 ++- src/store/chatdoc/state.ts | 9 ++- src/store/index.ts | 6 +- src/store/midjourney/actions.ts | 60 +++++++++++++------ src/store/midjourney/mutations.ts | 7 ++- src/store/midjourney/state.ts | 9 ++- 16 files changed, 128 insertions(+), 102 deletions(-) diff --git a/src/components/midjourney/tasks/TaskBriefList.vue b/src/components/midjourney/tasks/TaskBriefList.vue index f75b58df..455c84fc 100644 --- a/src/components/midjourney/tasks/TaskBriefList.vue +++ b/src/components/midjourney/tasks/TaskBriefList.vue @@ -14,7 +14,7 @@
- +
{{ $t('midjourney.button.history') }}
@@ -44,17 +44,18 @@ export default defineComponent({ }, computed: { loading() { - return this.$store.state.midjourney.getImagineTasksStatus === Status.Request; + return this.$store.state.midjourney.status.getApplication === Status.Request; }, tasks() { return this.$store.state.midjourney.imagineTasks; }, - applications() { - return this.$store.state.midjourney.applications; + application() { + return this.$store.state.midjourney.application; } }, async mounted() { await this.$store.dispatch('midjourney/setImagineTasks', undefined); + // @ts-ignore this.job = setInterval(() => { this.getImagineTasks(); }, 5000); diff --git a/src/components/midjourney/tasks/TaskFullList.vue b/src/components/midjourney/tasks/TaskFullList.vue index 414e88fc..2ce860bf 100644 --- a/src/components/midjourney/tasks/TaskFullList.vue +++ b/src/components/midjourney/tasks/TaskFullList.vue @@ -1,7 +1,7 @@