feat: 工作编排

This commit is contained in:
wangdan-fit2cloud 2024-06-20 15:39:04 +08:00
parent 33d02ed146
commit 6476d17ced
2 changed files with 12 additions and 8 deletions

View File

@ -9,7 +9,7 @@
<el-button icon="Plus" @click="showPopover = !showPopover" v-click-outside="clickoutside">
添加组件
</el-button>
<el-button @click="showDebug = true">
<el-button @click="showDebug = true" :disabled="showDebug">
<AppIcon iconName="app-play-outlined" class="mr-4"></AppIcon>
调试</el-button
>
@ -18,11 +18,7 @@
</div>
<!-- 下拉框 -->
<el-collapse-transition>
<div
v-show="showPopover"
class="workflow-dropdown-menu border border-r-4"
v-click-outside="clickoutsideDebug"
>
<div v-show="showPopover" class="workflow-dropdown-menu border border-r-4">
<h5 class="title">基础组件</h5>
<template v-for="(item, index) in menuNodes" :key="index">
<div class="workflow-dropdown-item cursor flex p-8-12" @mousedown="onmousedown(item)">
@ -41,7 +37,12 @@
</div>
<!-- 调试 -->
<el-collapse-transition>
<div class="workflow-debug-container" :class="enlarge ? 'enlarge' : ''" v-if="showDebug">
<div
v-click-outside="clickoutsideDebug"
class="workflow-debug-container"
:class="enlarge ? 'enlarge' : ''"
v-if="showDebug"
>
<div class="workflow-debug-header">
<div class="flex-between">
<h4 class="ml-24">

View File

@ -7,7 +7,7 @@
<component :is="iconComponent(`${nodeModel.type}-icon`)" class="mr-8" :size="24" />
<h4>{{ nodeModel.properties.stepName }}</h4>
</div>
<div @click.stop>
<div @click.stop v-if="showOperate(nodeModel.type)">
<el-dropdown trigger="click">
<el-button text @click.stop>
<el-icon class="color-secondary"><MoreFilled /></el-icon>
@ -78,6 +78,9 @@ const props = defineProps<{
nodeModel: any
}>()
function showOperate(type: string) {
return type !== 'base-node' && type !== 'start-node'
}
</script>
<style lang="scss" scoped>
.workflow-node-container {