Commit dd72d35f by Lesan

feat: ConditionNodeConfig使用Condition组件

parent 96d1fced
......@@ -67,12 +67,13 @@ import {
ApproveMethodType,
AssignEmptyHandlerType,
AssignStartUserHandlerType,
ConditionType,
NODE_DEFAULT_NAME,
NodeType,
RejectHandlerType,
SimpleFlowNode
} from './consts'
import { generateUUID } from '@/utils'
import {generateUUID} from '@/utils'
defineOptions({
name: 'NodeHandler'
......@@ -163,7 +164,7 @@ const addNode = (type: number) => {
showText: '',
type: NodeType.CONDITION_NODE,
childNode: undefined,
conditionType: 1,
conditionType: ConditionType.RULE,
defaultFlow: false
},
{
......
<!-- TODO @lesan:其它路由条件,可以使用这个哇? -->
<template>
<el-form ref="formRef" :model="condition" :rules="formRules" label-position="top">
<el-form-item label="配置方式" prop="conditionType">
......@@ -118,13 +117,13 @@
<script setup lang="ts">
import {
CONDITION_CONFIG_TYPES,
COMPARISON_OPERATORS,
CONDITION_CONFIG_TYPES,
ConditionType,
ProcessVariableEnum
} from '../../consts'
import { BpmModelFormType } from '@/utils/constants'
import { useFormFields } from '../../node'
import {BpmModelFormType} from '@/utils/constants'
import {useFormFields} from '../../node'
const props = defineProps({
modelValue: {
......@@ -200,6 +199,13 @@ const addConditionGroup = (conditions) => {
}
conditions.push(condition)
}
const validate = async () => {
if (!formRef) return false
return await formRef.value.validate();
}
defineExpose({validate})
</script>
<style lang="scss" scoped>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment