1212 ref =" el"
1313 v-bind:modelValue =" form_data.branch"
1414 :disabled =" form_data.branch === 2"
15- :filter =" '.no-drag'"
1615 handle =" .handle"
1716 :animation =" 150"
1817 ghostClass =" ghost"
2423 shadow =" never"
2524 class =" drag-card card-never mb-8"
2625 :class =" {
27- 'no-drag': index === form_data.branch.length - 1 || form_data.branch.length === 2
26+ 'no-drag': index === form_data.branch.length - 1 || form_data.branch.length === 2,
2827 }"
2928 style =" --el-card-padding : 12px "
3029 >
6160 type: 'array',
6261 required: true,
6362 message: $t('views.applicationWorkflow.variable.placeholder'),
64- trigger: 'change'
63+ trigger: 'change',
6564 }"
6665 >
6766 <NodeCascader
7978 :rules =" {
8079 required: true,
8180 message: $t(
82- 'views.applicationWorkflow.nodes.conditionNode.conditions.requiredMessage'
81+ 'views.applicationWorkflow.nodes.conditionNode.conditions.requiredMessage',
8382 ),
84- trigger: 'change'
83+ trigger: 'change',
8584 }"
8685 >
8786 <el-select
9089 v-model =" condition.compare"
9190 :placeholder ="
9291 $t(
93- 'views.applicationWorkflow.nodes.conditionNode.conditions.requiredMessage'
92+ 'views.applicationWorkflow.nodes.conditionNode.conditions.requiredMessage',
9493 )
9594 "
9695 clearable
106105 <el-form-item
107106 v-if ="
108107 !['is_null', 'is_not_null', 'is_true', 'is_not_true'].includes(
109- condition.compare
108+ condition.compare,
110109 )
111110 "
112111 :prop =" 'branch.' + index + '.conditions.' + cIndex + '.value'"
113112 :rules =" {
114113 required: true,
115114 message: $t('views.applicationWorkflow.nodes.conditionNode.valueMessage'),
116- trigger: 'blur'
115+ trigger: 'blur',
117116 }"
118117 >
119118 <el-input
@@ -177,20 +176,20 @@ const form = {
177176 {
178177 field: [],
179178 compare: ' ' ,
180- value: ' '
181- }
179+ value: ' ' ,
180+ },
182181 ],
183182 id: randomId (),
184183 type: ' IF' ,
185- condition: ' and'
184+ condition: ' and' ,
186185 },
187186 {
188187 conditions: [],
189188 id: randomId (),
190189 type: ' ELSE' ,
191- condition: ' and'
192- }
193- ]
190+ condition: ' and' ,
191+ },
192+ ],
194193}
195194
196195const wheel = (e : any ) => {
@@ -206,7 +205,7 @@ const resizeCondition = (wh: any, row: any, index: number) => {
206205 const branch_condition_list = cloneDeep (
207206 props .nodeModel .properties .branch_condition_list
208207 ? props .nodeModel .properties .branch_condition_list
209- : []
208+ : [],
210209 )
211210 const new_branch_condition_list = branch_condition_list .map ((item : any ) => {
212211 if (item .id === row .id ) {
@@ -229,15 +228,15 @@ const form_data = computed({
229228 },
230229 set : (value ) => {
231230 set (props .nodeModel .properties , ' node_data' , value )
232- }
231+ },
233232})
234233
235234const ConditionNodeFormRef = ref <FormInstance >()
236235const nodeCascaderRef = ref ()
237236const validate = () => {
238237 const v_list = [
239238 ConditionNodeFormRef .value ?.validate (),
240- ... nodeCascaderRef .value .map ((item : any ) => item .validate ())
239+ ... nodeCascaderRef .value .map ((item : any ) => item .validate ()),
241240 ]
242241 return Promise .all (v_list ).catch ((err ) => {
243242 return Promise .reject ({ node: props .nodeModel , errMessage: err })
@@ -265,12 +264,12 @@ function addBranch() {
265264 {
266265 field: [],
267266 compare: ' ' ,
268- value: ' '
269- }
267+ value: ' ' ,
268+ },
270269 ],
271270 type: ' ELSE IF ' + (list .length - 1 ),
272271 id: randomId (),
273- condition: ' and'
272+ condition: ' and' ,
274273 }
275274 list .splice (list .length - 1 , 0 , obj )
276275 refreshBranchAnchor (list , true )
@@ -280,7 +279,7 @@ function refreshBranchAnchor(list: Array<any>, is_add: boolean) {
280279 const branch_condition_list = cloneDeep (
281280 props .nodeModel .properties .branch_condition_list
282281 ? props .nodeModel .properties .branch_condition_list
283- : []
282+ : [],
284283 )
285284 const new_branch_condition_list = list
286285 .map ((item , index ) => {
@@ -304,7 +303,7 @@ function addCondition(index: number) {
304303 list [index ][' conditions' ].push ({
305304 field: [],
306305 compare: ' ' ,
307- value: ' '
306+ value: ' ' ,
308307 })
309308 set (props .nodeModel .properties .node_data , ' branch' , list )
310309}
@@ -315,14 +314,14 @@ function deleteCondition(index: number, cIndex: number) {
315314 if (list [index ][' conditions' ].length === 0 ) {
316315 const delete_edge = list .splice (index , 1 )
317316 const delete_target_anchor_id_list = delete_edge .map (
318- (item : any ) => props .nodeModel .id + ' _' + item .id + ' _right'
317+ (item : any ) => props .nodeModel .id + ' _' + item .id + ' _right' ,
319318 )
320319
321320 props .nodeModel .graphModel .eventCenter .emit (
322321 ' delete_edge' ,
323322 props .nodeModel .outgoing .edges
324323 .filter ((item : any ) => delete_target_anchor_id_list .includes (item .sourceAnchorId ))
325- .map ((item : any ) => item .id )
324+ .map ((item : any ) => item .id ),
326325 )
327326 refreshBranchAnchor (list , false )
328327
0 commit comments