feat: 高级编排调试

This commit is contained in:
wangdan-fit2cloud 2024-06-20 15:16:14 +08:00
parent 6cf7d72d0a
commit f36b494c6a
5 changed files with 78 additions and 51 deletions

View File

@ -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
}

View File

@ -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)
})
}
}
}
/**

View File

@ -154,8 +154,8 @@ const closeInterval = () => {
onMounted(() => {
getDetail()
// //
// initInterval()
//
initInterval()
})
onBeforeUnmount(() => {

View File

@ -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>

View File

@ -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>