mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
feat: 执行详情
This commit is contained in:
parent
6c579bd698
commit
60a6ffddef
|
|
@ -7,7 +7,7 @@
|
|||
<div class="flex-between cursor">
|
||||
<div class="flex align-center">
|
||||
<el-icon class="mr-8"><CaretRight /></el-icon>
|
||||
开始
|
||||
{{ item && item.name }}
|
||||
</div>
|
||||
<div class="flex align-center">
|
||||
<span class="mr-16 color-secondary">6.01s</span>
|
||||
|
|
@ -34,13 +34,13 @@ import { MdPreview } from 'md-editor-v3'
|
|||
const emit = defineEmits(['refresh'])
|
||||
|
||||
const dialogVisible = ref(false)
|
||||
const detail = ref<any>({})
|
||||
const detail = ref<any[]>([])
|
||||
|
||||
const current = ref('')
|
||||
|
||||
watch(dialogVisible, (bool) => {
|
||||
if (!bool) {
|
||||
detail.value = {}
|
||||
detail.value = []
|
||||
}
|
||||
})
|
||||
|
||||
|
|
|
|||
|
|
@ -153,6 +153,7 @@ import { ChatManagement, type chatType } from '@/api/type/application'
|
|||
import { randomId } from '@/utils/utils'
|
||||
import useStore from '@/stores'
|
||||
import MdRenderer from '@/components/markdown-renderer/MdRenderer.vue'
|
||||
import { isWorkFlow } from '@/utils/application'
|
||||
import { MdPreview } from 'md-editor-v3'
|
||||
import { debounce } from 'lodash'
|
||||
defineOptions({ name: 'AiChat' })
|
||||
|
|
@ -335,7 +336,7 @@ function getChartOpenId(chat?: any) {
|
|||
}
|
||||
})
|
||||
} else {
|
||||
if (obj.type === 'WORK_FLOW') {
|
||||
if (isWorkFlow(obj.type)) {
|
||||
const submitObj = {
|
||||
work_flow: obj.work_flow
|
||||
}
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, onMounted, computed } from 'vue'
|
||||
import { onBeforeRouteLeave, useRouter, useRoute } from 'vue-router'
|
||||
import { isAppIcon } from '@/utils/application'
|
||||
import { isAppIcon, isWorkFlow } from '@/utils/application'
|
||||
import useStore from '@/stores'
|
||||
const { common, dataset, application } = useStore()
|
||||
const route = useRoute()
|
||||
|
|
@ -162,7 +162,7 @@ function changeMenu(id: string) {
|
|||
} else if (isApplication.value) {
|
||||
const type = list.value?.filter((v) => v.id === id)?.[0]?.type
|
||||
if (
|
||||
type === 'WORK_FLOW' &&
|
||||
isWorkFlow(type) &&
|
||||
(lastMatched.name === 'AppSetting' || lastMatched.name === 'AppHitTest')
|
||||
) {
|
||||
router.push({ path: `/application/${id}/${type}/overview` })
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
<script setup lang="ts">
|
||||
import { computed } from 'vue'
|
||||
import { useRouter, useRoute, type RouteRecordRaw } from 'vue-router'
|
||||
|
||||
import { isWorkFlow } from '@/utils/application'
|
||||
const props = defineProps<{
|
||||
menu: RouteRecordRaw
|
||||
activeMenu: any
|
||||
|
|
@ -30,7 +30,7 @@ const {
|
|||
} = route as any
|
||||
|
||||
function showMenu() {
|
||||
if (type === 'WORK_FLOW') {
|
||||
if (isWorkFlow(type)) {
|
||||
return props.menu.name !== 'AppHitTest'
|
||||
} else {
|
||||
return true
|
||||
|
|
@ -38,7 +38,7 @@ function showMenu() {
|
|||
}
|
||||
|
||||
function clickHandle(item: any) {
|
||||
if (type === 'WORK_FLOW' && item.name === 'AppSetting') {
|
||||
if (isWorkFlow(type) && item.name === 'AppSetting') {
|
||||
router.push({ path: `/application/${id}/workflow` })
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,6 @@ export function isAppIcon(url: string | undefined) {
|
|||
return url === defaultIcon ? '' : url
|
||||
}
|
||||
|
||||
export function isWorkFlow(type: string) {
|
||||
export function isWorkFlow(type: string | undefined) {
|
||||
return type === 'WORK_FLOW'
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@
|
|||
<el-card
|
||||
shadow="never"
|
||||
class="mb-16"
|
||||
:class="applicationForm.type === 'WORK_FLOW' ? 'active' : ''"
|
||||
:class="isWorkFlow(applicationForm.type) ? 'active' : ''"
|
||||
>
|
||||
<el-radio value="WORK_FLOW" size="large">
|
||||
<p class="mb-4">高级编排</p>
|
||||
|
|
@ -80,6 +80,7 @@ import type { ApplicationFormType } from '@/api/type/application'
|
|||
import type { FormInstance, FormRules } from 'element-plus'
|
||||
import applicationApi from '@/api/application'
|
||||
import { MsgSuccess } from '@/utils/message'
|
||||
import { isWorkFlow } from '@/utils/application'
|
||||
import { t } from '@/locales'
|
||||
const router = useRouter()
|
||||
|
||||
|
|
@ -174,7 +175,7 @@ const submitHandle = async (formEl: FormInstance | undefined) => {
|
|||
applicationApi.postApplication(applicationForm.value, loading).then((res) => {
|
||||
console.log(res)
|
||||
MsgSuccess(t('views.application.applicationForm.buttons.createSuccess'))
|
||||
if (applicationForm.value.type === 'WORK_FLOW') {
|
||||
if (isWorkFlow(applicationForm.value.type)) {
|
||||
router.push({ path: `/application/${res.data.id}/workflow` })
|
||||
} else {
|
||||
router.push({ path: `/application/${res.data.id}/${res.data.type}/setting` })
|
||||
|
|
|
|||
|
|
@ -115,6 +115,7 @@ import CreateApplicationDialog from './component/CreateApplicationDialog.vue'
|
|||
import { MsgSuccess, MsgConfirm } from '@/utils/message'
|
||||
import { isAppIcon } from '@/utils/application'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { isWorkFlow } from '@/utils/application'
|
||||
import useStore from '@/stores'
|
||||
import { t } from '@/locales'
|
||||
const { application } = useStore()
|
||||
|
|
@ -133,10 +134,6 @@ const paginationConfig = reactive({
|
|||
|
||||
const searchValue = ref('')
|
||||
|
||||
function isWorkFlow(type: string) {
|
||||
return type === 'WORK_FLOW'
|
||||
}
|
||||
|
||||
function settingApplication(row: any) {
|
||||
if (isWorkFlow(row.type)) {
|
||||
router.push({ path: `/application/${row.id}/workflow` })
|
||||
|
|
|
|||
Loading…
Reference in New Issue