fix: execution
This commit is contained in:
parent
f01bf625ef
commit
0ee4b7fae2
@ -8,7 +8,7 @@
|
|||||||
align-center
|
align-center
|
||||||
@click.stop
|
@click.stop
|
||||||
>
|
>
|
||||||
<ExecutionDetailContent :detail="detail" />
|
<ExecutionDetailContent :detail="detail" :type="type" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
@ -16,6 +16,10 @@ import { ref, watch, onBeforeUnmount } from 'vue'
|
|||||||
import { cloneDeep } from 'lodash'
|
import { cloneDeep } from 'lodash'
|
||||||
import ExecutionDetailContent from './component/ExecutionDetailContent.vue'
|
import ExecutionDetailContent from './component/ExecutionDetailContent.vue'
|
||||||
|
|
||||||
|
const props = defineProps<{
|
||||||
|
type?: string
|
||||||
|
}>()
|
||||||
|
|
||||||
const dialogVisible = ref(false)
|
const dialogVisible = ref(false)
|
||||||
const detail = ref<any[]>([])
|
const detail = ref<any[]>([])
|
||||||
|
|
||||||
|
|||||||
@ -63,7 +63,7 @@
|
|||||||
<!-- 知识库引用 dialog -->
|
<!-- 知识库引用 dialog -->
|
||||||
<ParagraphSourceDialog ref="ParagraphSourceDialogRef" />
|
<ParagraphSourceDialog ref="ParagraphSourceDialogRef" />
|
||||||
<!-- 执行详情 dialog -->
|
<!-- 执行详情 dialog -->
|
||||||
<ExecutionDetailDialog ref="ExecutionDetailDialogRef" />
|
<ExecutionDetailDialog ref="ExecutionDetailDialogRef" :type="type" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
|||||||
@ -1,11 +1,15 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-scrollbar>
|
<el-scrollbar>
|
||||||
<div class="execution-details">
|
<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">
|
<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">
|
<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 />
|
<CaretRight />
|
||||||
</el-icon>
|
</el-icon>
|
||||||
<component
|
<component
|
||||||
@ -38,13 +42,11 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-collapse-transition>
|
<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.status === 200">
|
||||||
<!-- 开始 -->
|
<!-- 开始 -->
|
||||||
<template
|
<template
|
||||||
v-if="
|
v-if="item.type === WorkflowType.Start || item.type === WorkflowType.Application"
|
||||||
item.type === WorkflowType.Start || item.type === WorkflowType.Application
|
|
||||||
"
|
|
||||||
>
|
>
|
||||||
<div class="card-never border-r-6">
|
<div class="card-never border-r-6">
|
||||||
<h5 class="p-8-12">
|
<h5 class="p-8-12">
|
||||||
@ -64,9 +66,7 @@
|
|||||||
<span class="color-secondary">{{ f.label }}:</span> {{ f.value }}
|
<span class="color-secondary">{{ f.label }}:</span> {{ f.value }}
|
||||||
</div>
|
</div>
|
||||||
<div v-if="item.document_list?.length > 0">
|
<div v-if="item.document_list?.length > 0">
|
||||||
<p class="mb-8 color-secondary">
|
<p class="mb-8 color-secondary">{{ $t('common.fileUpload.document') }}:</p>
|
||||||
{{ $t('common.fileUpload.document') }}:
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<el-space wrap>
|
<el-space wrap>
|
||||||
<template v-for="(f, i) in item.document_list" :key="i">
|
<template v-for="(f, i) in item.document_list" :key="i">
|
||||||
@ -117,9 +117,7 @@
|
|||||||
</el-space>
|
</el-space>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="item.other_list?.length > 0">
|
<div v-if="item.other_list?.length > 0">
|
||||||
<p class="mb-8 color-secondary">
|
<p class="mb-8 color-secondary">{{ $t('common.fileUpload.document') }}:</p>
|
||||||
{{ $t('common.fileUpload.document') }}:
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<el-space wrap>
|
<el-space wrap>
|
||||||
<template v-for="(f, i) in item.other_list" :key="i">
|
<template v-for="(f, i) in item.other_list" :key="i">
|
||||||
@ -159,7 +157,7 @@
|
|||||||
v-for="(paragraph, paragraphIndex) in arraySort(
|
v-for="(paragraph, paragraphIndex) in arraySort(
|
||||||
item.paragraph_list,
|
item.paragraph_list,
|
||||||
'similarity',
|
'similarity',
|
||||||
true
|
true,
|
||||||
)"
|
)"
|
||||||
:key="paragraphIndex"
|
:key="paragraphIndex"
|
||||||
>
|
>
|
||||||
@ -193,10 +191,7 @@
|
|||||||
item.type == WorkflowType.Application
|
item.type == WorkflowType.Application
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<div
|
<div class="card-never border-r-6" v-if="item.type !== WorkflowType.Application">
|
||||||
class="card-never border-r-6"
|
|
||||||
v-if="item.type !== WorkflowType.Application"
|
|
||||||
>
|
|
||||||
<h5 class="p-8-12">
|
<h5 class="p-8-12">
|
||||||
{{ $t('views.application.applicationForm.form.roleSettings.label') }}
|
{{ $t('views.application.applicationForm.form.roleSettings.label') }}
|
||||||
</h5>
|
</h5>
|
||||||
@ -413,8 +408,7 @@
|
|||||||
<!-- 函数库 -->
|
<!-- 函数库 -->
|
||||||
<template
|
<template
|
||||||
v-if="
|
v-if="
|
||||||
item.type === WorkflowType.ToolLib ||
|
item.type === WorkflowType.ToolLib || item.type === WorkflowType.ToolLibCustom
|
||||||
item.type === WorkflowType.ToolLibCustom
|
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<div class="card-never border-r-6 mt-8">
|
<div class="card-never border-r-6 mt-8">
|
||||||
@ -507,10 +501,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<!-- 图片理解 -->
|
<!-- 图片理解 -->
|
||||||
<template v-if="item.type == WorkflowType.ImageUnderstandNode">
|
<template v-if="item.type == WorkflowType.ImageUnderstandNode">
|
||||||
<div
|
<div class="card-never border-r-6" v-if="item.type !== WorkflowType.Application">
|
||||||
class="card-never border-r-6"
|
|
||||||
v-if="item.type !== WorkflowType.Application"
|
|
||||||
>
|
|
||||||
<h5 class="p-8-12">
|
<h5 class="p-8-12">
|
||||||
{{ $t('views.application.applicationForm.form.roleSettings.label') }}
|
{{ $t('views.application.applicationForm.form.roleSettings.label') }}
|
||||||
</h5>
|
</h5>
|
||||||
@ -661,7 +652,10 @@
|
|||||||
</h5>
|
</h5>
|
||||||
<div class="p-8-12 border-t-dashed lighter">
|
<div class="p-8-12 border-t-dashed lighter">
|
||||||
<div class="mb-8">
|
<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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -697,6 +691,9 @@
|
|||||||
</el-collapse-transition>
|
</el-collapse-transition>
|
||||||
</el-card>
|
</el-card>
|
||||||
</template>
|
</template>
|
||||||
|
<template v-else v-for="(item, index) in arraySort(props.detail ?? [], 'index')">
|
||||||
|
|
||||||
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
</template>
|
</template>
|
||||||
@ -708,13 +705,14 @@ import { iconComponent } from '@/workflow/icons/utils'
|
|||||||
import { WorkflowType } from '@/enums/application'
|
import { WorkflowType } from '@/enums/application'
|
||||||
import { getImgUrl } from '@/utils/utils'
|
import { getImgUrl } from '@/utils/utils'
|
||||||
import DynamicsForm from '@/components/dynamics-form/index.vue'
|
import DynamicsForm from '@/components/dynamics-form/index.vue'
|
||||||
|
import { isWorkFlow } from '@/utils/application'
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
detail?: any[]
|
detail?: any[]
|
||||||
|
type: string
|
||||||
}>()
|
}>()
|
||||||
|
|
||||||
const current = ref<number | string>('')
|
const current = ref<number | string>('')
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.execution-details {
|
.execution-details {
|
||||||
|
|||||||
@ -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()
|
const upload = ref()
|
||||||
|
|
||||||
|
|||||||
@ -291,17 +291,13 @@
|
|||||||
<ExecutionDetailContent
|
<ExecutionDetailContent
|
||||||
v-if="rightPanelType === 'executionDetail'"
|
v-if="rightPanelType === 'executionDetail'"
|
||||||
:detail="executionDetail"
|
:detail="executionDetail"
|
||||||
|
:type="applicationDetail?.type"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</el-splitter-panel>
|
</el-splitter-panel>
|
||||||
</el-splitter>
|
</el-splitter>
|
||||||
</div>
|
</div>
|
||||||
</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" />
|
<EditTitleDialog ref="EditTitleDialogRef" @refresh="refreshFieldTitle" />
|
||||||
<ResetPassword
|
<ResetPassword
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user