feat:任务执行执行状态加载动画添加
This commit is contained in:
@@ -37,20 +37,20 @@ const branchLoading = ref(false)
|
||||
// Mock 数据配置
|
||||
const USE_MOCK_DATA = true
|
||||
|
||||
// 节点和边数据(改为 ref 以支持动态添加)
|
||||
// 节点和边数据
|
||||
const nodes = ref<Node[]>([])
|
||||
const edges = ref<Edge[]>([])
|
||||
|
||||
// 🆕 当前选中的节点ID集合(用于高亮整条分支)
|
||||
//当前选中的节点ID集合
|
||||
const selectedNodeIds = ref<Set<string>>(new Set())
|
||||
|
||||
// 用于防止重复同步的标志
|
||||
let isSyncing = false
|
||||
|
||||
// 🆕 初始化标记,避免重复初始化(使用 sessionStorage 持久化)
|
||||
//初始化标记,避免重复初始化
|
||||
const BRANCHES_INIT_KEY_PREFIX = 'plan-task-branches-initialized-'
|
||||
|
||||
// 🆕 最后选中的分支ID(使用 sessionStorage 持久化)
|
||||
// 🆕 最后选中的分支ID
|
||||
const LAST_SELECTED_BRANCH_KEY = 'plan-task-last-selected-branch'
|
||||
|
||||
// ==================== 辅助函数定义 ====================
|
||||
@@ -591,10 +591,10 @@ const syncBranchesToStore = () => {
|
||||
onMounted(() => {
|
||||
if (currentTask.value) {
|
||||
initializeFlow()
|
||||
// 适应视图
|
||||
// 适应视图 - 增加padding让节点显示更小
|
||||
nextTick(() => {
|
||||
setTimeout(() => {
|
||||
fit({ padding: 0.15, duration: 300 })
|
||||
fit({ padding: 0.4, duration: 300 })
|
||||
}, 100)
|
||||
})
|
||||
}
|
||||
@@ -1277,13 +1277,14 @@ onConnect(params => addEdges(params))
|
||||
v-model:nodes="nodes"
|
||||
v-model:edges="edges"
|
||||
:delete-key-code="null"
|
||||
:default-viewport="{ zoom: 1, x: 0, y: 0 }"
|
||||
fit-view-on-init
|
||||
:default-viewport="{ zoom: 0.3, x: 0, y: 0 }"
|
||||
:min-zoom="0.2"
|
||||
:max-zoom="4"
|
||||
@node-click="onNodeClick"
|
||||
class="vue-flow-container"
|
||||
>
|
||||
<!-- <Background /> -->
|
||||
<Controls />
|
||||
<!-- <Controls /> -->
|
||||
|
||||
<template #node-root="nodeProps">
|
||||
<div class="root-task-node-wrapper">
|
||||
|
||||
@@ -440,11 +440,12 @@ defineExpose({
|
||||
:class="executeBtnClass"
|
||||
:color="variables.tertiary"
|
||||
:title="executeBtnTitle"
|
||||
:disabled="!agentsStore.agentRawPlan.data"
|
||||
:disabled="!agentsStore.agentRawPlan.data || loading"
|
||||
@mouseenter="handleExecuteMouseEnter"
|
||||
@click="handleRun"
|
||||
>
|
||||
<svg-icon icon-class="action" />
|
||||
<svg-icon v-if="loading" icon-class="loading" class="animate-spin" />
|
||||
<svg-icon v-else icon-class="action" />
|
||||
<span v-if="showExecuteText" class="btn-text">任务执行</span>
|
||||
</el-button>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user