mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-31 02:02:48 +00:00
feat: 高级编排调试
This commit is contained in:
parent
6cf7d72d0a
commit
f36b494c6a
|
|
@ -149,6 +149,16 @@ const postChatOpen: (data: ApplicationFormType) => Promise<Result<any>> = (data)
|
|||
return post(`${prefix}/chat/open`, data)
|
||||
}
|
||||
|
||||
/**
|
||||
* 获得工作流临时回话Id
|
||||
* @param 参数
|
||||
|
||||
}
|
||||
*/
|
||||
const postWorkflowChatOpen: (data: ApplicationFormType) => Promise<Result<any>> = (data) => {
|
||||
return post(`${prefix}/chat_workflow/open`, data)
|
||||
}
|
||||
|
||||
/**
|
||||
* 正式回话Id
|
||||
* @param 参数
|
||||
|
|
@ -257,5 +267,6 @@ export default {
|
|||
putChatVote,
|
||||
getApplicationHitTest,
|
||||
getApplicationModel,
|
||||
putPublishApplication
|
||||
putPublishApplication,
|
||||
postWorkflowChatOpen
|
||||
}
|
||||
|
|
|
|||
|
|
@ -371,16 +371,32 @@ function getChartOpenId(chat?: any) {
|
|||
}
|
||||
})
|
||||
} else {
|
||||
return applicationApi
|
||||
.postChatOpen(obj)
|
||||
.then((res) => {
|
||||
chartOpenId.value = res.data
|
||||
chatMessage(chat)
|
||||
})
|
||||
.catch((res) => {
|
||||
loading.value = false
|
||||
return Promise.reject(res)
|
||||
})
|
||||
if (obj.type === 'WORK_FLOW') {
|
||||
const submitObj = {
|
||||
work_flow: obj.work_flow
|
||||
}
|
||||
return applicationApi
|
||||
.postWorkflowChatOpen(submitObj)
|
||||
.then((res) => {
|
||||
chartOpenId.value = res.data
|
||||
chatMessage(chat)
|
||||
})
|
||||
.catch((res) => {
|
||||
loading.value = false
|
||||
return Promise.reject(res)
|
||||
})
|
||||
} else {
|
||||
return applicationApi
|
||||
.postChatOpen(obj)
|
||||
.then((res) => {
|
||||
chartOpenId.value = res.data
|
||||
chatMessage(chat)
|
||||
})
|
||||
.catch((res) => {
|
||||
loading.value = false
|
||||
return Promise.reject(res)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -154,8 +154,8 @@ const closeInterval = () => {
|
|||
|
||||
onMounted(() => {
|
||||
getDetail()
|
||||
// // 初始化定时任务
|
||||
// initInterval()
|
||||
// 初始化定时任务
|
||||
initInterval()
|
||||
})
|
||||
|
||||
onBeforeUnmount(() => {
|
||||
|
|
|
|||
|
|
@ -51,35 +51,44 @@
|
|||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<h4 class="title-decoration-1 mb-16">关联应用</h4>
|
||||
|
||||
<el-row :gutter="12">
|
||||
<el-col :span="12" v-for="(item, index) in application_list" :key="index" class="mb-16">
|
||||
<CardCheckbox value-field="id" :data="item" v-model="application_id_list">
|
||||
<template #icon>
|
||||
<AppAvatar
|
||||
v-if="isAppIcon(item?.icon)"
|
||||
shape="square"
|
||||
:size="32"
|
||||
style="background: none"
|
||||
class="mr-12"
|
||||
>
|
||||
<img :src="item?.icon" alt="" />
|
||||
</AppAvatar>
|
||||
<AppAvatar
|
||||
v-else-if="item?.name"
|
||||
:name="item?.name"
|
||||
pinyinColor
|
||||
shape="square"
|
||||
:size="32"
|
||||
class="mr-12"
|
||||
/>
|
||||
</template>
|
||||
{{ item.name }}
|
||||
</CardCheckbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div v-if="application_id_list.length > 0">
|
||||
<h4 class="title-decoration-1 mb-16">关联应用</h4>
|
||||
<el-row :gutter="12">
|
||||
<el-col
|
||||
:span="12"
|
||||
v-for="(item, index) in application_list.filter((obj: any) =>
|
||||
application_id_list.some((v: any) => v === obj?.id)
|
||||
)"
|
||||
:key="index"
|
||||
class="mb-16"
|
||||
>
|
||||
<el-card shadow="never">
|
||||
<div class="flex-between">
|
||||
<div class="flex align-center">
|
||||
<AppAvatar
|
||||
v-if="isAppIcon(item?.icon)"
|
||||
shape="square"
|
||||
:size="32"
|
||||
style="background: none"
|
||||
class="mr-12"
|
||||
>
|
||||
<img :src="item?.icon" alt="" />
|
||||
</AppAvatar>
|
||||
<AppAvatar
|
||||
v-else-if="item?.name"
|
||||
:name="item?.name"
|
||||
pinyinColor
|
||||
shape="square"
|
||||
:size="32"
|
||||
class="mr-12"
|
||||
/>
|
||||
{{ item.name }}
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
|
||||
<div class="text-right">
|
||||
<el-button @click="submit" type="primary"> 保存 </el-button>
|
||||
|
|
|
|||
|
|
@ -591,13 +591,4 @@ defineExpose({
|
|||
left: 24px;
|
||||
z-index: 2;
|
||||
}
|
||||
// .lf-dnd-text {
|
||||
// width: 200px;
|
||||
// }
|
||||
// .lf-dnd-shape {
|
||||
// height: 50px;
|
||||
// }
|
||||
// .lf-node-selected {
|
||||
// border: 1px solid #000;
|
||||
// }
|
||||
</style>
|
||||
|
|
|
|||
Loading…
Reference in New Issue