|
170 | 170 | :step-strictly="true" |
171 | 171 | /> |
172 | 172 | </el-form-item> |
173 | | - <el-form-item |
174 | | - :rules="{ |
175 | | - type: 'array', |
176 | | - required: true, |
177 | | - message: $t('workflow.nodes.imageUnderstandNode.image.requiredMessage'), |
178 | | - trigger: 'change', |
179 | | - }" |
180 | | - > |
181 | | - <div class="flex align-center"> |
182 | | - <div> |
183 | | - <span>{{ $t('workflow.nodes.imageUnderstandNode.image.label') }} </span> |
| 173 | + <div class="flex" style="justify-content: space-between"> |
| 174 | + {{ t('workflow.nodes.aiChatNode.vision.label') }} |
| 175 | + <el-switch size="small" v-model="vision" /> |
| 176 | + </div> |
| 177 | + <template v-if="vision"> |
| 178 | + <el-form-item |
| 179 | + :rules="{ |
| 180 | + type: 'array', |
| 181 | + required: true, |
| 182 | + message: $t('workflow.nodes.imageUnderstandNode.image.requiredMessage'), |
| 183 | + trigger: 'change', |
| 184 | + }" |
| 185 | + > |
| 186 | + <div class="flex align-center"> |
| 187 | + <div> |
| 188 | + <span>{{ $t('workflow.nodes.imageUnderstandNode.image.label') }} </span> |
| 189 | + </div> |
| 190 | + <el-tooltip effect="dark" placement="right"> |
| 191 | + <template #content> |
| 192 | + <div style="white-space: pre-wrap; font-family: monospace">{{ fileTooltip }}</div> |
| 193 | + </template> |
| 194 | + <AppIcon iconName="app-warning" class="app-warning-icon"></AppIcon> |
| 195 | + </el-tooltip> |
184 | 196 | </div> |
185 | | - <el-tooltip effect="dark" placement="right"> |
186 | | - <template #content> |
187 | | - <div style="white-space: pre-wrap; font-family: monospace">{{ fileTooltip }}</div> |
188 | | - </template> |
189 | | - <AppIcon iconName="app-warning" class="app-warning-icon"></AppIcon> |
190 | | - </el-tooltip> |
191 | | - </div> |
192 | | - <NodeCascader |
193 | | - ref="nodeCascaderRef" |
194 | | - :nodeModel="nodeModel" |
195 | | - class="w-full" |
196 | | - :placeholder="$t('workflow.nodes.imageUnderstandNode.image.requiredMessage')" |
197 | | - v-model="chat_data.image_list" |
198 | | - /> |
199 | | - </el-form-item> |
200 | | - <el-form-item |
201 | | - :rules="{ |
202 | | - type: 'array', |
203 | | - required: false, |
204 | | - message: $t('workflow.nodes.videoUnderstandNode.video.requiredMessage'), |
205 | | - trigger: 'change', |
206 | | - }" |
207 | | - > |
208 | | - <div class="flex align-center"> |
209 | | - <div> |
210 | | - <span>{{ $t('workflow.nodes.videoUnderstandNode.video.label') }} </span> |
| 197 | + <NodeCascader |
| 198 | + ref="nodeCascaderRef" |
| 199 | + :nodeModel="nodeModel" |
| 200 | + class="w-full" |
| 201 | + :placeholder="$t('workflow.nodes.imageUnderstandNode.image.requiredMessage')" |
| 202 | + v-model="chat_data.image_list" |
| 203 | + /> |
| 204 | + </el-form-item> |
| 205 | + <el-form-item |
| 206 | + :rules="{ |
| 207 | + type: 'array', |
| 208 | + required: false, |
| 209 | + message: $t('workflow.nodes.videoUnderstandNode.video.requiredMessage'), |
| 210 | + trigger: 'change', |
| 211 | + }" |
| 212 | + > |
| 213 | + <div class="flex align-center"> |
| 214 | + <div> |
| 215 | + <span>{{ $t('workflow.nodes.videoUnderstandNode.video.label') }} </span> |
| 216 | + </div> |
| 217 | + <el-tooltip effect="dark" placement="right"> |
| 218 | + <template #content> |
| 219 | + <div style="white-space: pre-wrap; font-family: monospace">{{ fileTooltip }}</div> |
| 220 | + </template> |
| 221 | + <AppIcon iconName="app-warning" class="app-warning-icon"></AppIcon> |
| 222 | + </el-tooltip> |
211 | 223 | </div> |
212 | | - <el-tooltip effect="dark" placement="right"> |
213 | | - <template #content> |
214 | | - <div style="white-space: pre-wrap; font-family: monospace">{{ fileTooltip }}</div> |
215 | | - </template> |
216 | | - <AppIcon iconName="app-warning" class="app-warning-icon"></AppIcon> |
217 | | - </el-tooltip> |
218 | | - </div> |
219 | | - <NodeCascader |
220 | | - ref="nodeCascaderRef" |
221 | | - :nodeModel="nodeModel" |
222 | | - class="w-full" |
223 | | - :placeholder="$t('workflow.nodes.videoUnderstandNode.video.requiredMessage')" |
224 | | - v-model="chat_data.video_list" |
225 | | - /> |
226 | | - </el-form-item> |
| 224 | + <NodeCascader |
| 225 | + ref="nodeCascaderRef" |
| 226 | + :nodeModel="nodeModel" |
| 227 | + class="w-full" |
| 228 | + :placeholder="$t('workflow.nodes.videoUnderstandNode.video.requiredMessage')" |
| 229 | + v-model="chat_data.video_list" |
| 230 | + /> </el-form-item |
| 231 | + ></template> |
| 232 | + |
227 | 233 | <div class="mb-8 mt-12 flex-between"> |
228 | 234 | <span class="mr-4 lighter"> |
229 | 235 | {{ $t('views.tool.skill.title') }} |
@@ -616,7 +622,14 @@ const route = useRoute() |
616 | 622 | const { |
617 | 623 | params: { id }, |
618 | 624 | } = route as any |
619 | | -
|
| 625 | +const vision = computed({ |
| 626 | + get: () => { |
| 627 | + return props.nodeModel.properties.node_data.vision |
| 628 | + }, |
| 629 | + set: (vision: boolean) => { |
| 630 | + set(props.nodeModel.properties.node_data, 'vision', vision) |
| 631 | + }, |
| 632 | +}) |
620 | 633 | const apiType = computed(() => { |
621 | 634 | if (route.path.includes('resource-management')) { |
622 | 635 | return 'systemManage' |
|
0 commit comments