|
102 | 102 | <el-switch v-model="enable_exception" size="small" /> |
103 | 103 | </div> |
104 | 104 | </div> |
| 105 | + <div class="border-r-6 p-4-12 layout-bg lighter"> |
| 106 | + <template v-for="(item, index) in nodeFields" :key="index"> |
| 107 | + <div |
| 108 | + class="flex-between mb-8 mt-8" |
| 109 | + @mouseenter="showicon = index" |
| 110 | + @mouseleave="showicon = null" |
| 111 | + > |
| 112 | + <span class="break-all">{{ item.label }} {{ '{' + item.value + '}' }}</span> |
| 113 | + <el-tooltip |
| 114 | + effect="dark" |
| 115 | + :content="$t('workflow.setting.copyParam')" |
| 116 | + placement="top" |
| 117 | + v-if="showicon === index" |
| 118 | + > |
| 119 | + <el-button link @click="copyClick(item.globeLabel)" style="padding: 0"> |
| 120 | + <AppIcon iconName="app-copy"></AppIcon> |
| 121 | + </el-button> |
| 122 | + </el-tooltip> |
| 123 | + </div> |
| 124 | + </template> |
| 125 | + </div> |
105 | 126 |
|
106 | | - <template v-for="(item, index) in nodeFields" :key="index"> |
107 | | - <div |
108 | | - class="flex-between border-r-6 p-8-12 mb-8 layout-bg lighter" |
109 | | - @mouseenter="showicon = index" |
110 | | - @mouseleave="showicon = null" |
111 | | - > |
112 | | - <span class="break-all">{{ item.label }} {{ '{' + item.value + '}' }}</span> |
113 | | - <el-tooltip |
114 | | - effect="dark" |
115 | | - :content="$t('workflow.setting.copyParam')" |
116 | | - placement="top" |
117 | | - v-if="showicon === index" |
| 127 | + <div class="border-r-6 p-4-12 layout-bg lighter mt-8" v-if="enable_exception"> |
| 128 | + <template v-for="(item, index) in abnormalNodeFields" :key="index"> |
| 129 | + <div |
| 130 | + class="flex-between mb-8 mt-8" |
| 131 | + @mouseenter="showicon = 'abnormal' + index" |
| 132 | + @mouseleave="showicon = null" |
118 | 133 | > |
119 | | - <el-button link @click="copyClick(item.globeLabel)" style="padding: 0"> |
120 | | - <AppIcon iconName="app-copy"></AppIcon> |
121 | | - </el-button> |
122 | | - </el-tooltip> |
123 | | - </div> |
124 | | - </template> |
| 134 | + <span class="break-all">{{ item.label }} {{ '{' + item.value + '}' }}</span> |
| 135 | + <el-tooltip |
| 136 | + effect="dark" |
| 137 | + :content="$t('workflow.setting.copyParam')" |
| 138 | + placement="top" |
| 139 | + v-if="showicon === 'abnormal' + index" |
| 140 | + > |
| 141 | + <el-button link @click="copyClick(item.globeLabel)" style="padding: 0"> |
| 142 | + <AppIcon iconName="app-copy"></AppIcon> |
| 143 | + </el-button> |
| 144 | + </el-tooltip> |
| 145 | + </div> |
| 146 | + </template> |
| 147 | + </div> |
125 | 148 | </template> |
126 | 149 | </div> |
127 | 150 | </el-collapse-transition> |
@@ -380,21 +403,21 @@ const nodeFields = computed(() => { |
380 | 403 | globeValue: `{{context['${props.nodeModel.id}'].${field.value}}}`, |
381 | 404 | } |
382 | 405 | }) |
383 | | - if (enable_exception.value) { |
384 | | - return [ |
385 | | - ...fields, |
386 | | - { |
387 | | - label: t('workflow.abnormalInformation'), |
388 | | - value: 'exception_message', |
389 | | - globeLabel: `{{${props.nodeModel.properties.stepName}.exception_message}}`, |
390 | | - globeValue: `{{context['${props.nodeModel.id}'].exception_message}}`, |
391 | | - }, |
392 | | - ] |
393 | | - } |
394 | 406 | return fields |
395 | 407 | } |
396 | 408 | return [] |
397 | 409 | }) |
| 410 | +
|
| 411 | +const abnormalNodeFields = computed(() => { |
| 412 | + return [ |
| 413 | + { |
| 414 | + label: t('workflow.abnormalInformation'), |
| 415 | + value: 'exception_message', |
| 416 | + globeLabel: `{{${props.nodeModel.properties.stepName}.exception_message}}`, |
| 417 | + globeValue: `{{context['${props.nodeModel.id}'].exception_message}}`, |
| 418 | + }, |
| 419 | + ] |
| 420 | +}) |
398 | 421 | watch(enable_exception, () => { |
399 | 422 | props.nodeModel.graphModel.eventCenter.emit( |
400 | 423 | 'delete_edge', |
|
0 commit comments