25
25
</template >
26
26
<div >
27
27
<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" >
29
29
<template #header >
30
30
<div class =" flex flex-items-center" >
31
31
<el-text size =" large" >路由{{ index + 1 }}</el-text >
@@ -228,7 +228,7 @@ const fieldOptions = computed(() => {
228
228
})
229
229
return fieldsCopy
230
230
})
231
- const routeGroup = ref <RouteCondition []>([])
231
+ const routeGroups = ref <RouteCondition []>([])
232
232
const nodeOptions = ref ()
233
233
234
234
// 保存配置
@@ -237,26 +237,26 @@ const saveConfig = async () => {
237
237
if (! showText ) return false
238
238
currentNode .value .name = nodeName .value !
239
239
currentNode .value .showText = showText
240
- currentNode .value .routeGroup = routeGroup .value
240
+ currentNode .value .routeGroups = routeGroups .value
241
241
settingVisible .value = false
242
242
return true
243
243
}
244
244
// 显示路由分支节点配置, 由父组件传过来
245
245
const showRouteNodeConfig = (node : SimpleFlowNode ) => {
246
246
getRoutableNode ()
247
- routeGroup .value = []
247
+ routeGroups .value = []
248
248
nodeName .value = node .name
249
- if (node .routeGroup ) {
250
- routeGroup .value = node .routeGroup
249
+ if (node .routeGroups ) {
250
+ routeGroups .value = node .routeGroups
251
251
}
252
252
}
253
253
254
254
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 ) {
256
256
message .warning (' 请配置路由!' )
257
257
return ' '
258
258
}
259
- for (const route of routeGroup .value ) {
259
+ for (const route of routeGroups .value ) {
260
260
if (! route .nodeId || ! route .conditionType ) {
261
261
message .warning (' 请完善路由配置项!' )
262
262
return ' '
@@ -276,7 +276,7 @@ const getShowText = () => {
276
276
}
277
277
}
278
278
}
279
- return ` ${routeGroup .value .length }条路由分支 `
279
+ return ` ${routeGroups .value .length }条路由分支 `
280
280
}
281
281
282
282
// TODO @lesan:这个需要实现么?
@@ -318,7 +318,7 @@ const addConditionGroup = (conditions) => {
318
318
}
319
319
320
320
const addRouteGroup = () => {
321
- routeGroup .value .push ({
321
+ routeGroups .value .push ({
322
322
nodeId: ' ' ,
323
323
conditionType: ConditionType .EXPRESSION ,
324
324
conditionExpression: ' ' ,
@@ -343,7 +343,7 @@ const addRouteGroup = () => {
343
343
}
344
344
345
345
const deleteRouteGroup = (index ) => {
346
- routeGroup .value .splice (index , 1 )
346
+ routeGroups .value .splice (index , 1 )
347
347
}
348
348
349
349
const getRoutableNode = () => {
0 commit comments