fix: execution
This commit is contained in:
parent
f01bf625ef
commit
0ee4b7fae2
@ -8,7 +8,7 @@
|
||||
align-center
|
||||
@click.stop
|
||||
>
|
||||
<ExecutionDetailContent :detail="detail" />
|
||||
<ExecutionDetailContent :detail="detail" :type="type" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
@ -16,6 +16,10 @@ import { ref, watch, onBeforeUnmount } from 'vue'
|
||||
import { cloneDeep } from 'lodash'
|
||||
import ExecutionDetailContent from './component/ExecutionDetailContent.vue'
|
||||
|
||||
const props = defineProps<{
|
||||
type?: string
|
||||
}>()
|
||||
|
||||
const dialogVisible = ref(false)
|
||||
const detail = ref<any[]>([])
|
||||
|
||||
|
||||
@ -63,7 +63,7 @@
|
||||
<!-- 知识库引用 dialog -->
|
||||
<ParagraphSourceDialog ref="ParagraphSourceDialogRef" />
|
||||
<!-- 执行详情 dialog -->
|
||||
<ExecutionDetailDialog ref="ExecutionDetailDialogRef" />
|
||||
<ExecutionDetailDialog ref="ExecutionDetailDialogRef" :type="type" />
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
|
||||
@ -1,11 +1,15 @@
|
||||
<template>
|
||||
<el-scrollbar>
|
||||
<div class="execution-details">
|
||||
<template v-for="(item, index) in arraySort(props.detail ?? [], 'index')" :key="index">
|
||||
<template
|
||||
v-if="isWorkFlow(props.type)"
|
||||
v-for="(item, index) in arraySort(props.detail ?? [], 'index')"
|
||||
:key="index"
|
||||
>
|
||||
<el-card class="mb-8" shadow="never" style="--el-card-padding: 12px 16px">
|
||||
<div class="flex-between cursor" @click="current = current === index ? '' : index">
|
||||
<div class="flex-between cursor" @click="item['show'] = !item['show']">
|
||||
<div class="flex align-center">
|
||||
<el-icon class="mr-8 arrow-icon" :class="current === index ? 'rotate-90' : ''">
|
||||
<el-icon class="mr-8 arrow-icon" :class="item['show'] ? 'rotate-90' : ''">
|
||||
<CaretRight />
|
||||
</el-icon>
|
||||
<component
|
||||
@ -38,13 +42,11 @@
|
||||
</div>
|
||||
</div>
|
||||
<el-collapse-transition>
|
||||
<div class="mt-12" v-if="current === index">
|
||||
<div class="mt-12" v-if="item['show']">
|
||||
<template v-if="item.status === 200">
|
||||
<!-- 开始 -->
|
||||
<template
|
||||
v-if="
|
||||
item.type === WorkflowType.Start || item.type === WorkflowType.Application
|
||||
"
|
||||
v-if="item.type === WorkflowType.Start || item.type === WorkflowType.Application"
|
||||
>
|
||||
<div class="card-never border-r-6">
|
||||
<h5 class="p-8-12">
|
||||
@ -64,9 +66,7 @@
|
||||
<span class="color-secondary">{{ f.label }}:</span> {{ f.value }}
|
||||
</div>
|
||||
<div v-if="item.document_list?.length > 0">
|
||||
<p class="mb-8 color-secondary">
|
||||
{{ $t('common.fileUpload.document') }}:
|
||||
</p>
|
||||
<p class="mb-8 color-secondary">{{ $t('common.fileUpload.document') }}:</p>
|
||||
|
||||
<el-space wrap>
|
||||
<template v-for="(f, i) in item.document_list" :key="i">
|
||||
@ -117,9 +117,7 @@
|
||||
</el-space>
|
||||
</div>
|
||||
<div v-if="item.other_list?.length > 0">
|
||||
<p class="mb-8 color-secondary">
|
||||
{{ $t('common.fileUpload.document') }}:
|
||||
</p>
|
||||
<p class="mb-8 color-secondary">{{ $t('common.fileUpload.document') }}:</p>
|
||||
|
||||
<el-space wrap>
|
||||
<template v-for="(f, i) in item.other_list" :key="i">
|
||||
@ -159,7 +157,7 @@
|
||||
v-for="(paragraph, paragraphIndex) in arraySort(
|
||||
item.paragraph_list,
|
||||
'similarity',
|
||||
true
|
||||
true,
|
||||
)"
|
||||
:key="paragraphIndex"
|
||||
>
|
||||
@ -193,10 +191,7 @@
|
||||
item.type == WorkflowType.Application
|
||||
"
|
||||
>
|
||||
<div
|
||||
class="card-never border-r-6"
|
||||
v-if="item.type !== WorkflowType.Application"
|
||||
>
|
||||
<div class="card-never border-r-6" v-if="item.type !== WorkflowType.Application">
|
||||
<h5 class="p-8-12">
|
||||
{{ $t('views.application.applicationForm.form.roleSettings.label') }}
|
||||
</h5>
|
||||
@ -413,8 +408,7 @@
|
||||
<!-- 函数库 -->
|
||||
<template
|
||||
v-if="
|
||||
item.type === WorkflowType.ToolLib ||
|
||||
item.type === WorkflowType.ToolLibCustom
|
||||
item.type === WorkflowType.ToolLib || item.type === WorkflowType.ToolLibCustom
|
||||
"
|
||||
>
|
||||
<div class="card-never border-r-6 mt-8">
|
||||
@ -507,10 +501,7 @@
|
||||
</template>
|
||||
<!-- 图片理解 -->
|
||||
<template v-if="item.type == WorkflowType.ImageUnderstandNode">
|
||||
<div
|
||||
class="card-never border-r-6"
|
||||
v-if="item.type !== WorkflowType.Application"
|
||||
>
|
||||
<div class="card-never border-r-6" v-if="item.type !== WorkflowType.Application">
|
||||
<h5 class="p-8-12">
|
||||
{{ $t('views.application.applicationForm.form.roleSettings.label') }}
|
||||
</h5>
|
||||
@ -661,7 +652,10 @@
|
||||
</h5>
|
||||
<div class="p-8-12 border-t-dashed lighter">
|
||||
<div class="mb-8">
|
||||
<span class="color-secondary"> {{ $t('views.applicationWorkflow.nodes.mcpNode.tool') }}: </span> {{ item.mcp_tool }}
|
||||
<span class="color-secondary">
|
||||
{{ $t('views.applicationWorkflow.nodes.mcpNode.tool') }}:
|
||||
</span>
|
||||
{{ item.mcp_tool }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -697,6 +691,9 @@
|
||||
</el-collapse-transition>
|
||||
</el-card>
|
||||
</template>
|
||||
<template v-else v-for="(item, index) in arraySort(props.detail ?? [], 'index')">
|
||||
|
||||
</template>
|
||||
</div>
|
||||
</el-scrollbar>
|
||||
</template>
|
||||
@ -708,18 +705,19 @@ import { iconComponent } from '@/workflow/icons/utils'
|
||||
import { WorkflowType } from '@/enums/application'
|
||||
import { getImgUrl } from '@/utils/utils'
|
||||
import DynamicsForm from '@/components/dynamics-form/index.vue'
|
||||
import { isWorkFlow } from '@/utils/application'
|
||||
|
||||
const props = defineProps<{
|
||||
detail?: any[]
|
||||
type: string
|
||||
}>()
|
||||
|
||||
const current = ref<number | string>('')
|
||||
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.execution-details {
|
||||
.arrow-icon {
|
||||
transition: 0.2s;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -354,30 +354,6 @@ const localLoading = computed({
|
||||
},
|
||||
})
|
||||
|
||||
const showUserInput = ref(true)
|
||||
const form_data = ref<any>({})
|
||||
const api_form_data = ref<any>({})
|
||||
|
||||
const toggleUserInput = () => {
|
||||
showUserInput.value = !showUserInput.value
|
||||
if (showUserInput.value) {
|
||||
// 保存当前数据作为初始数据(用于可能的恢复)
|
||||
initialFormData.value = JSON.parse(JSON.stringify(form_data.value))
|
||||
initialApiFormData.value = JSON.parse(JSON.stringify(api_form_data.value))
|
||||
}
|
||||
}
|
||||
|
||||
function UserFormConfirm() {
|
||||
showUserInput.value = false
|
||||
}
|
||||
|
||||
function UserFormCancel() {
|
||||
// 恢复初始数据
|
||||
form_data.value = JSON.parse(JSON.stringify(initialFormData.value))
|
||||
api_form_data.value = JSON.parse(JSON.stringify(initialApiFormData.value))
|
||||
userFormRef.value?.render(form_data.value)
|
||||
showUserInput.value = false
|
||||
}
|
||||
|
||||
const upload = ref()
|
||||
|
||||
|
||||
@ -291,17 +291,13 @@
|
||||
<ExecutionDetailContent
|
||||
v-if="rightPanelType === 'executionDetail'"
|
||||
:detail="executionDetail"
|
||||
:type="applicationDetail?.type"
|
||||
/>
|
||||
</div>
|
||||
</el-splitter-panel>
|
||||
</el-splitter>
|
||||
</div>
|
||||
</div>
|
||||
<div class="collapse">
|
||||
<el-button @click="isCollapse = !isCollapse">
|
||||
<el-icon> <component :is="isCollapse ? 'Fold' : 'Expand'" /></el-icon>
|
||||
</el-button>
|
||||
</div>
|
||||
|
||||
<EditTitleDialog ref="EditTitleDialogRef" @refresh="refreshFieldTitle" />
|
||||
<ResetPassword
|
||||
|
||||
Loading…
Reference in New Issue
Block a user