diff --git a/src/components/SimpleProcessDesignerV2/src/node.ts b/src/components/SimpleProcessDesignerV2/src/node.ts index ecd68dc8..eba4c7ef 100644 --- a/src/components/SimpleProcessDesignerV2/src/node.ts +++ b/src/components/SimpleProcessDesignerV2/src/node.ts @@ -16,7 +16,8 @@ import { FieldPermissionType, ListenerParam } from './consts' -import { parseFormFields } from '@/components/FormCreate/src/utils/index' +import { parseFormFields } from '@/components/FormCreate/src/utils' + export function useWatchNode(props: { flowNode: SimpleFlowNode }): Ref { const node = ref(props.flowNode) watch( @@ -46,7 +47,7 @@ export function useFormFieldsPermission(defaultPermission: FieldPermissionType) // 字段权限配置. 需要有 field, title, permissioin 属性 const fieldsPermissionConfig = ref>>([]) - const formType = inject>('formType', ref()) // 表单类型 + const formType = inject>('formType', ref()) // 表单类型 const formFields = inject>('formFields', ref([])) // 流程表单字段 @@ -108,7 +109,7 @@ export function useFormFieldsPermission(defaultPermission: FieldPermissionType) * @description 获取表单的字段 */ export function useFormFields() { - const formFields = inject>('formFields',ref([])) // 流程表单字段 + const formFields = inject>('formFields', ref([])) // 流程表单字段 return parseFormCreateFields(unref(formFields)) } @@ -178,7 +179,7 @@ export function useNodeForm(nodeType: NodeType) { const postOptions = inject>('postList', ref([])) // 岗位列表 const userOptions = inject>('userList', ref([])) // 用户列表 const deptOptions = inject>('deptList', ref([])) // 部门列表 - const userGroupOptions = inject>('userGroupList',ref([])) // 用户组列表 + const userGroupOptions = inject>('userGroupList', ref([])) // 用户组列表 const deptTreeOptions = inject('deptTree', ref()) // 部门树 const formFields = inject>('formFields', ref([])) // 流程表单字段 const configForm = ref() diff --git a/src/components/SimpleProcessDesignerV2/src/nodes/DelayTimerNode.vue b/src/components/SimpleProcessDesignerV2/src/nodes/DelayTimerNode.vue index 7fbad1cd..ad6795aa 100644 --- a/src/components/SimpleProcessDesignerV2/src/nodes/DelayTimerNode.vue +++ b/src/components/SimpleProcessDesignerV2/src/nodes/DelayTimerNode.vue @@ -9,7 +9,6 @@ ]" >
-
- +
@@ -23,6 +27,9 @@
+
+ 除了UserTask以外节点的多实例待实现 +
@@ -301,19 +308,21 @@ const approveMethod = ref() const approveRatio = ref(100) const otherExtensions = ref() const getElementLoopNew = () => { - const extensionElements = - bpmnElement.value.businessObject?.extensionElements ?? - bpmnInstances().moddle.create('bpmn:ExtensionElements', { values: [] }) - approveMethod.value = extensionElements.values.filter( - (ex) => ex.$type === `${prefix}:ApproveMethod` - )?.[0]?.value + if (props.type === 'UserTask') { + const extensionElements = + bpmnElement.value.businessObject?.extensionElements ?? + bpmnInstances().moddle.create('bpmn:ExtensionElements', { values: [] }) + approveMethod.value = extensionElements.values.filter( + (ex) => ex.$type === `${prefix}:ApproveMethod` + )?.[0]?.value - otherExtensions.value = - extensionElements.values.filter((ex) => ex.$type !== `${prefix}:ApproveMethod`) ?? [] + otherExtensions.value = + extensionElements.values.filter((ex) => ex.$type !== `${prefix}:ApproveMethod`) ?? [] - if (!approveMethod.value) { - approveMethod.value = ApproveMethodType.SEQUENTIAL_APPROVE - updateLoopCharacteristics() + if (!approveMethod.value) { + approveMethod.value = ApproveMethodType.SEQUENTIAL_APPROVE + updateLoopCharacteristics() + } } } const onApproveMethodChange = () => { diff --git a/src/views/bpm/model/CategoryDraggableModel.vue b/src/views/bpm/model/CategoryDraggableModel.vue index 93ad06f0..bcbd47d2 100644 --- a/src/views/bpm/model/CategoryDraggableModel.vue +++ b/src/views/bpm/model/CategoryDraggableModel.vue @@ -1,5 +1,5 @@