-
-
流程结束
+
diff --git a/src/views/flowDesign/nodes/type.ts b/src/views/flowDesign/nodes/type.ts
index 41931f3..8627d4c 100644
--- a/src/views/flowDesign/nodes/type.ts
+++ b/src/views/flowDesign/nodes/type.ts
@@ -15,9 +15,16 @@ export interface FlowNode {
pid?: string
name: string
type: NodeType
+ executionListeners?: NodeListener[]
child?: FlowNode
}
+export interface NodeListener {
+ event: string
+ implementationType: 'class' | 'expression' | 'delegateExpression'
+ implementation: string
+}
+
export interface StartNode extends FlowNode {
formProperties: FormProperty[]
}
@@ -77,6 +84,8 @@ export interface ApprovalNode extends AssigneeNode {
formProperties: FormProperty[]
// 操作权限
operations: OperationPermissions
+ // 任务监听器
+ taskListeners?: NodeListener[]
}
export interface TimerNode extends FlowNode {
diff --git a/src/views/flowDesign/panels/ApprovalPanel.vue b/src/views/flowDesign/panels/ApprovalPanel.vue
index f76fea8..59a27e8 100644
--- a/src/views/flowDesign/panels/ApprovalPanel.vue
+++ b/src/views/flowDesign/panels/ApprovalPanel.vue
@@ -4,6 +4,7 @@ import type { Field } from '@/components/Render/type'
import UserSelector from '@/components/UserSelector/index.vue'
import AssigneePanel from './AssigneePanel.vue'
import type { Ref } from 'vue'
+import TaskListeners from './TaskListeners.vue'
const { fields } = inject<{ fields: Ref
; admin: string[] }>('flowDesign', {
fields: ref([]),
@@ -133,6 +134,9 @@ watchEffect(() => {
placeholder="指定人员"
/>
+
+
+
diff --git a/src/views/flowDesign/panels/EndPanel.vue b/src/views/flowDesign/panels/EndPanel.vue
new file mode 100644
index 0000000..c163d7f
--- /dev/null
+++ b/src/views/flowDesign/panels/EndPanel.vue
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/flowDesign/panels/ExecutionListeners.vue b/src/views/flowDesign/panels/ExecutionListeners.vue
new file mode 100644
index 0000000..23e8e87
--- /dev/null
+++ b/src/views/flowDesign/panels/ExecutionListeners.vue
@@ -0,0 +1,107 @@
+
+
+
+
+
+
+ 配置
+
+
+
+
+
添加监听器
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 监听器
+
+
+ 实现 ExecutionListener 接口
+ 委托表达式:${myExecutionListener}
+ 表达式: ${myExecutionListener.notify(execution)}
+ java类:${com.example.listener.MyExecutionListener}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/flowDesign/panels/StartPanel.vue b/src/views/flowDesign/panels/StartPanel.vue
index 1e52c4e..27be49a 100644
--- a/src/views/flowDesign/panels/StartPanel.vue
+++ b/src/views/flowDesign/panels/StartPanel.vue
@@ -2,11 +2,13 @@
import type { FormProperty, StartNode } from '../nodes/type'
import type { Field } from '@/components/Render/type'
import type { Ref } from 'vue'
+import ExecutionListeners from './ExecutionListeners.vue'
const { fields } = inject<{ fields: Ref }>('flowDesign', { fields: ref([]) })
const props = defineProps<{
activeData: StartNode
}>()
+const activeName = ref('basicSettings')
const allReadonly = computed({
get() {
return props.activeData.formProperties.every((e) => e.readonly)
@@ -84,33 +86,46 @@ watchEffect(() => {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
diff --git a/src/views/flowDesign/panels/TaskListeners.vue b/src/views/flowDesign/panels/TaskListeners.vue
new file mode 100644
index 0000000..9bee386
--- /dev/null
+++ b/src/views/flowDesign/panels/TaskListeners.vue
@@ -0,0 +1,107 @@
+
+
+
+
+
+
+ 配置
+
+
+
+
+
添加监听器
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 监听器
+
+
+ 委托表达式:${myCreateTaskListener}
+ 表达式: ${myCreateTaskListener.notify(execution)}
+ java类:${com.example.listener.MyCreateTaskListener}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/flowDesign/panels/index.vue b/src/views/flowDesign/panels/index.vue
index c1de4b0..61fc5c4 100644
--- a/src/views/flowDesign/panels/index.vue
+++ b/src/views/flowDesign/panels/index.vue
@@ -7,6 +7,7 @@ import Cc from './CcPanel.vue'
import Timer from './TimerPanel.vue'
import Notify from './NotifyPanel.vue'
import Condition from './ConditionPanel.vue'
+import End from './EndPanel.vue'
import type { FlowNode } from '../nodes/type'
defineProps<{
@@ -19,7 +20,8 @@ const panels: Recordable = {
cc: Cc,
timer: Timer,
notify: Notify,
- condition: Condition
+ condition: Condition,
+ end: End
}
const showInput = ref(false)
const onClickOutside = () => {
diff --git a/src/views/home/index.vue b/src/views/home/index.vue
index b1d5195..462175f 100644
--- a/src/views/home/index.vue
+++ b/src/views/home/index.vue
@@ -10,12 +10,14 @@ const process = ref({
pid: undefined,
type: 'start',
name: '发起人',
+ executionListeners: [],
formProperties: [],
child: {
id: 'end',
pid: 'root',
type: 'end',
- name: '结束',
+ name: '流程结束',
+ executionListeners: [],
child: undefined
} as EndNode
} as StartNode)