diff --git a/ui/src/assets/icon_condition.svg b/ui/src/assets/icon_condition.svg
new file mode 100644
index 000000000..2bc80a212
--- /dev/null
+++ b/ui/src/assets/icon_condition.svg
@@ -0,0 +1,3 @@
+
diff --git a/ui/src/components/workflow/common/NodeControl.vue b/ui/src/components/workflow/common/NodeControl.vue
index 5eb4e9613..ff4ce3e1c 100644
--- a/ui/src/components/workflow/common/NodeControl.vue
+++ b/ui/src/components/workflow/common/NodeControl.vue
@@ -1,29 +1,28 @@
- 放大
- 缩小
- 适应
+ 放大
+ 缩小
+ 适应
diff --git a/ui/src/components/workflow/common/app-node/index.ts b/ui/src/components/workflow/common/app-node/index.ts
index e935c76cb..f00e0a612 100644
--- a/ui/src/components/workflow/common/app-node/index.ts
+++ b/ui/src/components/workflow/common/app-node/index.ts
@@ -103,7 +103,7 @@ class AppNodeModel extends HtmlNodeModel {
})
}
setAttributes() {
- this.width = 340
+ this.width = this.properties?.width || 340
const circleOnlyAsTarget = {
message: '只允许从右边的锚点连出',
diff --git a/ui/src/components/workflow/icons/condition-node-icon.vue b/ui/src/components/workflow/icons/condition-node-icon.vue
index 9a01ac96c..6deed3108 100644
--- a/ui/src/components/workflow/icons/condition-node-icon.vue
+++ b/ui/src/components/workflow/icons/condition-node-icon.vue
@@ -1,6 +1,6 @@
-
-
+
+
diff --git a/ui/src/components/workflow/index.vue b/ui/src/components/workflow/index.vue
index 12edcffa8..75222edbb 100644
--- a/ui/src/components/workflow/index.vue
+++ b/ui/src/components/workflow/index.vue
@@ -1,10 +1,7 @@
-
-
-
-
-
+
+
+
diff --git a/ui/src/components/workflow/nodes/condition-node/index.ts b/ui/src/components/workflow/nodes/condition-node/index.ts
index 0c7df419b..8f84672c3 100644
--- a/ui/src/components/workflow/nodes/condition-node/index.ts
+++ b/ui/src/components/workflow/nodes/condition-node/index.ts
@@ -1,12 +1,12 @@
-import ChatNodeVue from './index.vue'
+import ConditioNodeVue from './index.vue'
import { AppNode, AppNodeModel } from '@/components/workflow/common/app-node/index'
-class ChatNode extends AppNode {
+class ConditioNode extends AppNode {
constructor(props: any) {
- super(props, ChatNodeVue)
+ super(props, ConditioNodeVue)
}
}
export default {
- type: 'start-node',
+ type: 'condition-node',
model: AppNodeModel,
- view: ChatNode
+ view: ConditioNode
}
diff --git a/ui/src/components/workflow/nodes/condition-node/index.vue b/ui/src/components/workflow/nodes/condition-node/index.vue
index f51d29d9c..d73deedf3 100644
--- a/ui/src/components/workflow/nodes/condition-node/index.vue
+++ b/ui/src/components/workflow/nodes/condition-node/index.vue
@@ -1,46 +1,168 @@
- 全局变量
- 当前时 {time}
- 参数输出
- 用户问题 {question}
+
+
+
+ {{ judgeLabel(index) }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 添加条件
+
+
+
+
+ 添加分支
+
+
diff --git a/ui/src/components/workflow/nodes/search-dataset-node/index.vue b/ui/src/components/workflow/nodes/search-dataset-node/index.vue
index efa2b042e..997da655e 100644
--- a/ui/src/components/workflow/nodes/search-dataset-node/index.vue
+++ b/ui/src/components/workflow/nodes/search-dataset-node/index.vue
@@ -108,8 +108,6 @@ const {
const props = defineProps<{ nodeModel: any }>()
-console.log(props.nodeModel)
-
const form = {
dataset_id_list: [],
dataset_setting: {
diff --git a/ui/src/components/workflow/nodes/start-node/index.vue b/ui/src/components/workflow/nodes/start-node/index.vue
index aec6ae0e1..383f39598 100644
--- a/ui/src/components/workflow/nodes/start-node/index.vue
+++ b/ui/src/components/workflow/nodes/start-node/index.vue
@@ -7,10 +7,15 @@
diff --git a/ui/src/styles/element-plus.scss b/ui/src/styles/element-plus.scss
index 8aa2ef734..abb45910b 100644
--- a/ui/src/styles/element-plus.scss
+++ b/ui/src/styles/element-plus.scss
@@ -5,7 +5,7 @@
--el-box-shadow-light: 0px 2px 4px 0px rgba(31, 35, 41, 0.12);
--el-border-color: #dee0e3;
--el-text-color-regular: #1f2329;
- --el-color-info: #8f959e;
+ --el-color-info: #8f959e !important;
}
.el-button {
diff --git a/ui/src/styles/index.scss b/ui/src/styles/index.scss
index 373b1d80b..24a010d4b 100644
--- a/ui/src/styles/index.scss
+++ b/ui/src/styles/index.scss
@@ -5,4 +5,4 @@
@import 'nprogress/nprogress.css';
@import 'highlight.js/styles/default.css';
@import 'md-editor-v3/lib/style.css';
-@import './md-editor.scss';
\ No newline at end of file
+@import './md-editor.scss';
diff --git a/ui/src/views/application-workflow/index.vue b/ui/src/views/application-workflow/index.vue
index 45eb529ee..f23839256 100644
--- a/ui/src/views/application-workflow/index.vue
+++ b/ui/src/views/application-workflow/index.vue
@@ -6,6 +6,8 @@
创建应用
+
+
添加组件
@@ -19,9 +21,9 @@
基础组件
-
+
-
{{ item.label }}
+
{{ item.label }}
{{ item.text }}
@@ -50,6 +52,13 @@ function onmousedown(item: any) {
workflowRef.value?.onmousedown(item)
}
+function validate() {
+ workflowRef.value?.validate()
+}
+function getGraphData() {
+ workflowRef.value?.getGraphData()
+}
+
onMounted(() => {})
onBeforeUnmount(() => {})
@@ -76,9 +85,10 @@ onBeforeUnmount(() => {})
width: 240px;
box-shadow: 0px 4px 8px 0px var(--app-text-color-light-1);
background: #ffffff;
+ padding-bottom: 8px;
.title {
- padding: 8px 12px 4px;
+ padding: 12px 12px 4px;
}
.workflow-dropdown-item {
&:hover {