Commit eb7e85e7 authored by chenghong_tao's avatar chenghong_tao

增加loading状态

parent c147ba53
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
:icon="Refresh" :icon="Refresh"
size="small" size="small"
circle circle
:disabled="isLoading" :disabled="taskStore.isLoading"
@click="reStartSSE" @click="reStartSSE"
/> />
<el-button <el-button
...@@ -112,6 +112,11 @@ watch( ...@@ -112,6 +112,11 @@ watch(
{ immediate: true } { immediate: true }
); );
watch(() => isLoading.value, (newValue) => {
console.log('isLoading status : ', newValue)
taskStore.setIsLoading(newValue)
})
const isReStartWorkflow = ref(false) const isReStartWorkflow = ref(false)
const workflowStatus = ref(null) const workflowStatus = ref(null)
// 默认支持 SSE 协议 // 默认支持 SSE 协议
......
...@@ -6,7 +6,8 @@ export const useTaskStore = defineStore('task', { ...@@ -6,7 +6,8 @@ export const useTaskStore = defineStore('task', {
taskId: '', // 当前任务id taskId: '', // 当前任务id
conversation_id: '', // 当前会话id conversation_id: '', // 当前会话id
message_id: '', // 当前消息id message_id: '', // 当前消息id
workflow_run_id: '' // 当前工作流运行id workflow_run_id: '', // 当前工作流运行id
isLoading: false
} }
}, },
actions: { actions: {
...@@ -24,6 +25,9 @@ export const useTaskStore = defineStore('task', { ...@@ -24,6 +25,9 @@ export const useTaskStore = defineStore('task', {
setWorkflowRunId (workflow_run_id) { setWorkflowRunId (workflow_run_id) {
this.workflow_run_id = workflow_run_id this.workflow_run_id = workflow_run_id
}, },
setIsLoading(isLoading) {
this.isLoading = isLoading
},
clear () { clear () {
this.taskId = '' this.taskId = ''
this.conversation_id = '' this.conversation_id = ''
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment