diff --git a/src/components/SimpleProcessDesignerV2/src/consts.ts b/src/components/SimpleProcessDesignerV2/src/consts.ts
index c7285f93..b8d08b79 100644
--- a/src/components/SimpleProcessDesignerV2/src/consts.ts
+++ b/src/components/SimpleProcessDesignerV2/src/consts.ts
@@ -824,17 +824,48 @@ export type ChildProcessSetting = {
}
export type IOParameter = {
source: string
- sourceExpression: string
target: string
- targetExpression: string
}
export type StartUserSetting = {
- type: number
+ type: ChildProcessStartUserTypeEnum
formField?: string
- emptyType?: number
+ emptyType?: ChildProcessStartUserEmptyTypeEnum
}
export type TimeoutSetting = {
enable: boolean,
type?: DelayTypeEnum,
timeExpression?: string,
}
+export enum ChildProcessStartUserTypeEnum {
+ /**
+ * 同主流程发起人
+ */
+ MAIN_PROCESS_START_USER = 1,
+ /**
+ * 表单
+ */
+ FROM_FORM = 2,
+}
+export const CHILD_PROCESS_START_USER_TYPE = [
+ { label: '同主流程发起人', value: ChildProcessStartUserTypeEnum.MAIN_PROCESS_START_USER },
+ { label: '表单', value: ChildProcessStartUserTypeEnum.FROM_FORM }
+]
+export enum ChildProcessStartUserEmptyTypeEnum {
+ /**
+ * 同主流程发起人
+ */
+ MAIN_PROCESS_START_USER = 1,
+ /**
+ * 子流程管理员
+ */
+ CHILD_PROCESS_ADMIN = 2,
+ /**
+ * 主流程管理员
+ */
+ MAIN_PROCESS_ADMIN = 3,
+}
+export const CHILD_PROCESS_START_USER_EMPTY_TYPE = [
+ { label: '同主流程发起人', value: ChildProcessStartUserEmptyTypeEnum.MAIN_PROCESS_START_USER },
+ { label: '子流程管理员', value: ChildProcessStartUserEmptyTypeEnum.CHILD_PROCESS_ADMIN },
+ { label: '主流程管理员', value: ChildProcessStartUserEmptyTypeEnum.MAIN_PROCESS_ADMIN }
+]
diff --git a/src/components/SimpleProcessDesignerV2/src/nodes-config/ChildProcessNodeConfig.vue b/src/components/SimpleProcessDesignerV2/src/nodes-config/ChildProcessNodeConfig.vue
index 9e2ce4a2..0289151b 100644
--- a/src/components/SimpleProcessDesignerV2/src/nodes-config/ChildProcessNodeConfig.vue
+++ b/src/components/SimpleProcessDesignerV2/src/nodes-config/ChildProcessNodeConfig.vue
@@ -95,7 +95,7 @@
@@ -103,7 +103,6 @@
添加一行
-
@@ -160,11 +159,13 @@
添加一行
-
- 同主流程发起人
- 表单
+
+ {{ item.label }}
- 同主流程发起人
- 子流程管理员
- 主流程管理员
+
+ {{ item.label }}
({
async: false,
calledProcessDefinitionKey: '',
skipStartUserNode: false,
inVariables: [],
outVariables: [],
- startUserType: 1,
- startUserEmptyType: 1,
+ startUserType: ChildProcessStartUserTypeEnum.MAIN_PROCESS_START_USER,
+ startUserEmptyType: ChildProcessStartUserEmptyTypeEnum.MAIN_PROCESS_START_USER,
startUserFormField: '',
timeoutEnable: false,
timeoutType: DelayTypeEnum.FIXED_TIME_DURATION,
@@ -334,9 +357,8 @@ const saveConfig = async () => {
if (!formRef) return false
const valid = await formRef.value.validate()
if (!valid) return false
- // TODO @lesan:这里的 option 黄色告警,也处理下哈
const childInfo = childProcessOptions.value.find(
- (option) => option.key === configForm.value.calledProcessDefinitionKey
+ (option: any) => option.key === configForm.value.calledProcessDefinitionKey
)
currentNode.value.name = nodeName.value!
if (currentNode.value.childProcessSetting) {
@@ -378,7 +400,6 @@ const saveConfig = async () => {
return true
}
// 显示子流程节点配置, 由父组件传过来
-// TODO @lesan:inVariables、outVariables 红色告警
const showChildProcessNodeConfig = (node: SimpleFlowNode) => {
nodeName.value = node.name
if (node.childProcessSetting) {
@@ -421,15 +442,14 @@ const showChildProcessNodeConfig = (node: SimpleFlowNode) => {
defineExpose({ openDrawer, showChildProcessNodeConfig }) // 暴露方法给父组件
-// TODO @lesan:这里的 arr 黄色告警,也处理下哈,可以用 cursor quick fix 哈
-const addVariable = (arr) => {
- arr.push({
+const addVariable = (arr?: IOParameter[]) => {
+ arr?.push({
source: '',
target: ''
})
}
-const deleteVariable = (arr, index: number) => {
- arr.splice(index, 1)
+const deleteVariable = (index: number, arr?: IOParameter[]) => {
+ arr?.splice(index, 1)
}
const handleCalledElementChange = () => {
configForm.value.inVariables = []