Skip to content

Commit e5f6020

Browse files
committed
fix: routeGroups命名问题
1 parent a275968 commit e5f6020

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

src/components/SimpleProcessDesignerV2/src/consts.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ export interface SimpleFlowNode {
116116
// 延迟设置
117117
delaySetting?: DelaySetting
118118
// 路由分支
119-
routeGroup?: RouteCondition[]
119+
routeGroups?: RouteCondition[]
120120
defaultFlowId?: string
121121
}
122122
// 候选人策略枚举 ( 用于审批节点。抄送节点 )

src/components/SimpleProcessDesignerV2/src/nodes-config/RouteNodeConfig.vue

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
</template>
2626
<div>
2727
<el-form label-position="top">
28-
<el-card class="mb-15px" v-for="(item, index) in routeGroup" :key="index">
28+
<el-card class="mb-15px" v-for="(item, index) in routeGroups" :key="index">
2929
<template #header>
3030
<div class="flex flex-items-center">
3131
<el-text size="large">路由{{ index + 1 }}</el-text>
@@ -228,7 +228,7 @@ const fieldOptions = computed(() => {
228228
})
229229
return fieldsCopy
230230
})
231-
const routeGroup = ref<RouteCondition[]>([])
231+
const routeGroups = ref<RouteCondition[]>([])
232232
const nodeOptions = ref()
233233
234234
// 保存配置
@@ -237,26 +237,26 @@ const saveConfig = async () => {
237237
if (!showText) return false
238238
currentNode.value.name = nodeName.value!
239239
currentNode.value.showText = showText
240-
currentNode.value.routeGroup = routeGroup.value
240+
currentNode.value.routeGroups = routeGroups.value
241241
settingVisible.value = false
242242
return true
243243
}
244244
// 显示路由分支节点配置, 由父组件传过来
245245
const showRouteNodeConfig = (node: SimpleFlowNode) => {
246246
getRoutableNode()
247-
routeGroup.value = []
247+
routeGroups.value = []
248248
nodeName.value = node.name
249-
if (node.routeGroup) {
250-
routeGroup.value = node.routeGroup
249+
if (node.routeGroups) {
250+
routeGroups.value = node.routeGroups
251251
}
252252
}
253253
254254
const getShowText = () => {
255-
if (!routeGroup.value || !Array.isArray(routeGroup.value) || routeGroup.value.length <= 0) {
255+
if (!routeGroups.value || !Array.isArray(routeGroups.value) || routeGroups.value.length <= 0) {
256256
message.warning('请配置路由!')
257257
return ''
258258
}
259-
for (const route of routeGroup.value) {
259+
for (const route of routeGroups.value) {
260260
if (!route.nodeId || !route.conditionType) {
261261
message.warning('请完善路由配置项!')
262262
return ''
@@ -276,7 +276,7 @@ const getShowText = () => {
276276
}
277277
}
278278
}
279-
return `${routeGroup.value.length}条路由分支`
279+
return `${routeGroups.value.length}条路由分支`
280280
}
281281
282282
// TODO @lesan:这个需要实现么?
@@ -318,7 +318,7 @@ const addConditionGroup = (conditions) => {
318318
}
319319
320320
const addRouteGroup = () => {
321-
routeGroup.value.push({
321+
routeGroups.value.push({
322322
nodeId: '',
323323
conditionType: ConditionType.EXPRESSION,
324324
conditionExpression: '',
@@ -343,7 +343,7 @@ const addRouteGroup = () => {
343343
}
344344
345345
const deleteRouteGroup = (index) => {
346-
routeGroup.value.splice(index, 1)
346+
routeGroups.value.splice(index, 1)
347347
}
348348
349349
const getRoutableNode = () => {

0 commit comments

Comments
 (0)