feat:执行过程编排页面重构及删除功能新增
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, computed } from 'vue'
|
||||
import { ref, computed, watch, nextTick } from 'vue'
|
||||
import { useAgentsStore } from '@/stores'
|
||||
import SvgIcon from '@/components/SvgIcon/index.vue'
|
||||
import PlanModification from './TaskSyllabus/Branch/PlanModification.vue'
|
||||
@@ -13,6 +13,9 @@ const visible = ref(false)
|
||||
const activeTab = ref('outline')
|
||||
const isMaximized = ref(false)
|
||||
|
||||
// PlanTask 组件引用
|
||||
const planTaskRef = ref<InstanceType<typeof PlanTask> | null>(null)
|
||||
|
||||
// 判断是否有流程数据
|
||||
const planReady = computed(() => {
|
||||
return agentsStore.agentRawPlan.data !== undefined
|
||||
@@ -66,6 +69,18 @@ const handleTabChange = (tabKey: string) => {
|
||||
activeTab.value = tabKey
|
||||
}
|
||||
|
||||
// 切换到执行过程编排时,延迟触发自适应视图
|
||||
watch(activeTab, (newTab) => {
|
||||
if (newTab === 'process') {
|
||||
nextTick(() => {
|
||||
setTimeout(() => {
|
||||
// 通过 expose 的方法触发自适应视图(如果有的话)
|
||||
;(planTaskRef.value as any)?.triggerFitView?.()
|
||||
}, 400)
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
// 切换最大化/还原
|
||||
const toggleMaximize = () => {
|
||||
isMaximized.value = !isMaximized.value
|
||||
@@ -126,7 +141,7 @@ defineExpose({
|
||||
|
||||
<!-- 任务过程 -->
|
||||
<div v-show="activeTab === 'process'" class="tab-content">
|
||||
<PlanTask />
|
||||
<PlanTask ref="planTaskRef" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user