fix: routeGroups命名问题
parent
a2759680f8
commit
e5f6020582
|
@ -116,7 +116,7 @@ export interface SimpleFlowNode {
|
||||||
// 延迟设置
|
// 延迟设置
|
||||||
delaySetting?: DelaySetting
|
delaySetting?: DelaySetting
|
||||||
// 路由分支
|
// 路由分支
|
||||||
routeGroup?: RouteCondition[]
|
routeGroups?: RouteCondition[]
|
||||||
defaultFlowId?: string
|
defaultFlowId?: string
|
||||||
}
|
}
|
||||||
// 候选人策略枚举 ( 用于审批节点。抄送节点 )
|
// 候选人策略枚举 ( 用于审批节点。抄送节点 )
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
</template>
|
</template>
|
||||||
<div>
|
<div>
|
||||||
<el-form label-position="top">
|
<el-form label-position="top">
|
||||||
<el-card class="mb-15px" v-for="(item, index) in routeGroup" :key="index">
|
<el-card class="mb-15px" v-for="(item, index) in routeGroups" :key="index">
|
||||||
<template #header>
|
<template #header>
|
||||||
<div class="flex flex-items-center">
|
<div class="flex flex-items-center">
|
||||||
<el-text size="large">路由{{ index + 1 }}</el-text>
|
<el-text size="large">路由{{ index + 1 }}</el-text>
|
||||||
|
@ -228,7 +228,7 @@ const fieldOptions = computed(() => {
|
||||||
})
|
})
|
||||||
return fieldsCopy
|
return fieldsCopy
|
||||||
})
|
})
|
||||||
const routeGroup = ref<RouteCondition[]>([])
|
const routeGroups = ref<RouteCondition[]>([])
|
||||||
const nodeOptions = ref()
|
const nodeOptions = ref()
|
||||||
|
|
||||||
// 保存配置
|
// 保存配置
|
||||||
|
@ -237,26 +237,26 @@ const saveConfig = async () => {
|
||||||
if (!showText) return false
|
if (!showText) return false
|
||||||
currentNode.value.name = nodeName.value!
|
currentNode.value.name = nodeName.value!
|
||||||
currentNode.value.showText = showText
|
currentNode.value.showText = showText
|
||||||
currentNode.value.routeGroup = routeGroup.value
|
currentNode.value.routeGroups = routeGroups.value
|
||||||
settingVisible.value = false
|
settingVisible.value = false
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
// 显示路由分支节点配置, 由父组件传过来
|
// 显示路由分支节点配置, 由父组件传过来
|
||||||
const showRouteNodeConfig = (node: SimpleFlowNode) => {
|
const showRouteNodeConfig = (node: SimpleFlowNode) => {
|
||||||
getRoutableNode()
|
getRoutableNode()
|
||||||
routeGroup.value = []
|
routeGroups.value = []
|
||||||
nodeName.value = node.name
|
nodeName.value = node.name
|
||||||
if (node.routeGroup) {
|
if (node.routeGroups) {
|
||||||
routeGroup.value = node.routeGroup
|
routeGroups.value = node.routeGroups
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const getShowText = () => {
|
const getShowText = () => {
|
||||||
if (!routeGroup.value || !Array.isArray(routeGroup.value) || routeGroup.value.length <= 0) {
|
if (!routeGroups.value || !Array.isArray(routeGroups.value) || routeGroups.value.length <= 0) {
|
||||||
message.warning('请配置路由!')
|
message.warning('请配置路由!')
|
||||||
return ''
|
return ''
|
||||||
}
|
}
|
||||||
for (const route of routeGroup.value) {
|
for (const route of routeGroups.value) {
|
||||||
if (!route.nodeId || !route.conditionType) {
|
if (!route.nodeId || !route.conditionType) {
|
||||||
message.warning('请完善路由配置项!')
|
message.warning('请完善路由配置项!')
|
||||||
return ''
|
return ''
|
||||||
|
@ -276,7 +276,7 @@ const getShowText = () => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return `${routeGroup.value.length}条路由分支`
|
return `${routeGroups.value.length}条路由分支`
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO @lesan:这个需要实现么?
|
// TODO @lesan:这个需要实现么?
|
||||||
|
@ -318,7 +318,7 @@ const addConditionGroup = (conditions) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const addRouteGroup = () => {
|
const addRouteGroup = () => {
|
||||||
routeGroup.value.push({
|
routeGroups.value.push({
|
||||||
nodeId: '',
|
nodeId: '',
|
||||||
conditionType: ConditionType.EXPRESSION,
|
conditionType: ConditionType.EXPRESSION,
|
||||||
conditionExpression: '',
|
conditionExpression: '',
|
||||||
|
@ -343,7 +343,7 @@ const addRouteGroup = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const deleteRouteGroup = (index) => {
|
const deleteRouteGroup = (index) => {
|
||||||
routeGroup.value.splice(index, 1)
|
routeGroups.value.splice(index, 1)
|
||||||
}
|
}
|
||||||
|
|
||||||
const getRoutableNode = () => {
|
const getRoutableNode = () => {
|
||||||
|
|
Loading…
Reference in New Issue