Remove unused online workflow components

This commit is contained in:
2026-06-09 00:11:25 +08:00
parent 0a86fa80b4
commit ac0ef146ef
33 changed files with 0 additions and 4280 deletions
@@ -20,15 +20,5 @@ export type PageEditorData = PreviewData;
export type PagePublishInfo = PreviewData;
export type SystemSummaryData = PreviewData;
export const AppDesignPanel = DesignPreviewDialog;
export const AppSettingsPanel = DesignPreviewDialog;
export const BasicInfoEditor = DesignPreviewDialog;
export const DashboardBasicInfoConfirmPanel = DesignPreviewDialog;
export const DashboardDesignConfirmPanel = DesignPreviewDialog;
export const DashboardPublishConfirmPanel = DesignPreviewDialog;
export const DesignEditorPanel = DesignPreviewDialog;
export const FormEditorContent = DesignPreviewDialog;
export const PageBasicInfoEditor = DesignPreviewDialog;
export const PageEditorContent = DesignPreviewDialog;
export const PagePublishInfoEditor = DesignPreviewDialog;
export const SystemSummaryConfirmPanel = DesignPreviewDialog;
@@ -1,59 +0,0 @@
<script setup lang="ts">
import { LayoutTemplate } from '@vben/icons';
import { $t } from '@vben/locales';
import BaseNode from './BaseNode.vue';
defineProps(['selected', 'data', 'id']);
</script>
<template>
<BaseNode
:selected="selected"
:execution-status="data.executionStatus"
:execution-result="data.executionResult"
:label="data.label || $t('ai-platform.workflow.nodes.app_create.label')"
:inputs="[{ id: 'target' }]"
:outputs="[{ id: 'source' }]"
:node-id="id"
node-type="app_create"
>
<template #icon><LayoutTemplate class="size-5" /></template>
<template #desc>
{{ $t('ai-platform.workflow.nodes.app_create.desc') }}
</template>
<div class="space-y-2">
<div class="text-muted-foreground space-y-1 text-xs">
<div v-if="data.name" class="flex justify-between">
<span>{{ $t('ai-platform.workflow.nodes.app_create.appName') }}</span>
<span class="max-w-[120px] truncate">{{ data.name }}</span>
</div>
<div v-if="data.code" class="flex justify-between">
<span>{{ $t('ai-platform.workflow.nodes.app_create.appCode') }}</span>
<span class="font-mono">{{ data.code }}</span>
</div>
<div class="flex justify-between">
<span>{{
$t('ai-platform.workflow.nodes.app_create.updateIfExists')
}}</span>
<span>{{
data.update_if_exists
? $t('ai-platform.workflow.nodes.common.yes')
: $t('ai-platform.workflow.nodes.common.no')
}}</span>
</div>
</div>
<!-- 输出变量 -->
<div class="rounded bg-green-50 px-2 py-1 text-xs dark:bg-green-950">
<div
class="flex items-center justify-between text-green-700 dark:text-green-300"
>
<span>{{ $t('ai-platform.workflow.nodes.common.output') }}</span>
<span class="font-mono">app_id, app_code</span>
</div>
</div>
</div>
</BaseNode>
</template>
@@ -1,57 +0,0 @@
<script setup lang="ts">
import { LayoutDashboard } from '@vben/icons';
import { $t } from '@vben/locales';
import BaseNode from './BaseNode.vue';
defineProps(['selected', 'data', 'id']);
</script>
<template>
<BaseNode
:selected="selected"
:execution-status="data.executionStatus"
:execution-result="data.executionResult"
:label="data.label || $t('ai-platform.workflow.nodes.app_design.label')"
:inputs="[{ id: 'target' }]"
:outputs="[{ id: 'source' }]"
:node-id="id"
node-type="app_design"
>
<template #icon><LayoutDashboard class="size-5" /></template>
<template #desc>
{{ $t('ai-platform.workflow.nodes.app_design.desc') }}
</template>
<div class="space-y-2">
<div class="text-muted-foreground space-y-1 text-xs">
<div v-if="data.design_title" class="flex justify-between">
<span>{{
$t('ai-platform.workflow.nodes.app_design.designTitle')
}}</span>
<span class="max-w-[120px] truncate">{{ data.design_title }}</span>
</div>
<div class="flex justify-between">
<span>{{
$t('ai-platform.workflow.nodes.app_design.needConfirm')
}}</span>
<span>{{
data.require_confirmation !== false
? $t('ai-platform.workflow.nodes.common.yes')
: $t('ai-platform.workflow.nodes.common.no')
}}</span>
</div>
</div>
<!-- 输出变量 -->
<div class="rounded bg-green-50 px-2 py-1 text-xs dark:bg-green-950">
<div
class="flex items-center justify-between text-green-700 dark:text-green-300"
>
<span>{{ $t('ai-platform.workflow.nodes.common.output') }}</span>
<span class="font-mono">design_content</span>
</div>
</div>
</div>
</BaseNode>
</template>
@@ -1,69 +0,0 @@
<script setup lang="ts">
import { Settings } from '@vben/icons';
import { $t } from '@vben/locales';
import BaseNode from './BaseNode.vue';
defineProps(['selected', 'data', 'id']);
</script>
<template>
<BaseNode
:selected="selected"
:execution-status="data.executionStatus"
:execution-result="data.executionResult"
:label="data.label || $t('ai-platform.workflow.nodes.app_settings.label')"
:inputs="[{ id: 'target' }]"
:outputs="[{ id: 'source' }]"
:node-id="id"
node-type="app_settings"
>
<template #icon><Settings class="size-5" /></template>
<template #desc>
{{ $t('ai-platform.workflow.nodes.app_settings.desc') }}
</template>
<div class="space-y-2">
<div class="text-muted-foreground space-y-1 text-xs">
<div v-if="data.app_name" class="flex justify-between">
<span>{{
$t('ai-platform.workflow.nodes.app_settings.appName')
}}</span>
<span class="max-w-[120px] truncate">{{ data.app_name }}</span>
</div>
<div v-if="data.app_layout" class="flex justify-between">
<span>{{
$t('ai-platform.workflow.nodes.app_settings.layoutMode')
}}</span>
<span>{{ data.app_layout }}</span>
</div>
<div v-if="data.theme_builtin_type" class="flex justify-between">
<span>{{
$t('ai-platform.workflow.nodes.app_settings.builtinTheme')
}}</span>
<span>{{ data.theme_builtin_type }}</span>
</div>
<div class="flex justify-between">
<span>{{
$t('ai-platform.workflow.nodes.app_settings.needConfirm')
}}</span>
<span>{{
data.require_confirmation !== false
? $t('ai-platform.workflow.nodes.common.yes')
: $t('ai-platform.workflow.nodes.common.no')
}}</span>
</div>
</div>
<!-- 输出变量 -->
<div class="rounded bg-green-50 px-2 py-1 text-xs dark:bg-green-950">
<div
class="flex items-center justify-between text-green-700 dark:text-green-300"
>
<span>{{ $t('ai-platform.workflow.nodes.common.output') }}</span>
<span class="font-mono">settings</span>
</div>
</div>
</div>
</BaseNode>
</template>
@@ -1,57 +0,0 @@
<script setup lang="ts">
import { Save } from '@vben/icons';
import { $t } from '@vben/locales';
import BaseNode from './BaseNode.vue';
defineProps(['selected', 'data', 'id']);
</script>
<template>
<BaseNode
:selected="selected"
:execution-status="data.executionStatus"
:execution-result="data.executionResult"
:label="data.label || $t('ai-platform.workflow.nodes.app_update.label')"
:inputs="[{ id: 'target' }]"
:outputs="[{ id: 'source' }]"
:node-id="id"
node-type="app_update"
>
<template #icon><Save class="size-5" /></template>
<template #desc>
{{ $t('ai-platform.workflow.nodes.app_update.desc') }}
</template>
<div class="space-y-2">
<div class="text-muted-foreground space-y-1 text-xs">
<div v-if="data.settings" class="flex justify-between">
<span>{{
$t('ai-platform.workflow.nodes.app_update.settingsSource')
}}</span>
<span class="max-w-[120px] truncate font-mono">{{
data.settings
}}</span>
</div>
<div v-if="data.application_id" class="flex justify-between">
<span>{{ $t('ai-platform.workflow.nodes.app_update.app') }}</span>
<span class="max-w-[120px] truncate">{{ data.application_id }}</span>
</div>
<div v-else class="flex justify-between">
<span>{{ $t('ai-platform.workflow.nodes.app_update.target') }}</span>
<span>{{ $t('ai-platform.workflow.nodes.app_update.mainApp') }}</span>
</div>
</div>
<!-- 输出变量 -->
<div class="rounded bg-green-50 px-2 py-1 text-xs dark:bg-green-950">
<div
class="flex items-center justify-between text-green-700 dark:text-green-300"
>
<span>{{ $t('ai-platform.workflow.nodes.common.output') }}</span>
<span class="font-mono">update_success, config_id</span>
</div>
</div>
</div>
</BaseNode>
</template>
@@ -1,58 +0,0 @@
<script setup lang="ts">
import { FileText } from '@vben/icons';
import { $t } from '@vben/locales';
import BaseNode from './BaseNode.vue';
defineProps<{
data: any;
id: string;
selected: boolean;
}>();
</script>
<template>
<BaseNode
:selected="selected"
:execution-status="data.executionStatus"
:execution-result="data.executionResult"
:label="
data.label || $t('ai-platform.workflow.nodes.dashboard_basic_info.label')
"
:inputs="[{ id: 'target' }]"
:outputs="[{ id: 'source' }]"
:node-id="id"
node-type="dashboard_basic_info"
>
<template #icon><FileText class="size-5" /></template>
<template #desc>
{{ $t('ai-platform.workflow.nodes.dashboard_basic_info.desc') }}
</template>
<div class="space-y-1 text-xs">
<div v-if="data.name" class="text-muted-foreground truncate">
<span class="font-medium">{{
$t('ai-platform.workflow.nodes.dashboard_basic_info.name')
}}</span>
{{ data.name }}
</div>
<div v-if="data.code" class="text-muted-foreground truncate">
<span class="font-medium">{{
$t('ai-platform.workflow.nodes.dashboard_basic_info.code')
}}</span>
{{ data.code }}
</div>
<div v-if="data.category" class="text-muted-foreground truncate">
<span class="font-medium">{{
$t('ai-platform.workflow.nodes.dashboard_basic_info.category')
}}</span>
{{ data.category }}
</div>
</div>
<template #footer>
<div class="text-muted-foreground truncate text-[10px]">
{{ $t('ai-platform.workflow.nodes.common.output') }}
dashboard_basic_info
</div>
</template>
</BaseNode>
</template>
@@ -1,65 +0,0 @@
<script setup lang="ts">
import { FilePlus } from '@vben/icons';
import { $t } from '@vben/locales';
import BaseNode from './BaseNode.vue';
defineProps<{
data: any;
id: string;
selected: boolean;
}>();
</script>
<template>
<BaseNode
:selected="selected"
:execution-status="data.executionStatus"
:execution-result="data.executionResult"
:label="
data.label || $t('ai-platform.workflow.nodes.dashboard_create.label')
"
:inputs="[{ id: 'target' }]"
:outputs="[{ id: 'source' }]"
:node-id="id"
node-type="dashboard_create"
>
<template #icon><FilePlus class="size-5" /></template>
<template #desc>
{{ $t('ai-platform.workflow.nodes.dashboard_create.desc') }}
</template>
<div class="space-y-1 text-xs">
<div
v-if="data.dashboard_basic_info"
class="text-muted-foreground truncate"
>
<span class="font-medium">{{
$t('ai-platform.workflow.nodes.dashboard_create.basicInfo')
}}</span>
{{ $t('ai-platform.workflow.nodes.common.configured') }}
</div>
<div v-if="data.page_config" class="text-muted-foreground truncate">
<span class="font-medium">{{
$t('ai-platform.workflow.nodes.dashboard_create.pageConfig')
}}</span>
{{ $t('ai-platform.workflow.nodes.common.configured') }}
</div>
<div class="text-muted-foreground">
<span class="font-medium">{{
$t('ai-platform.workflow.nodes.dashboard_create.updateIfExists')
}}</span>
{{
data.update_if_exists !== false
? $t('ai-platform.workflow.nodes.common.yes')
: $t('ai-platform.workflow.nodes.common.no')
}}
</div>
</div>
<template #footer>
<div class="text-muted-foreground truncate text-[10px]">
{{ $t('ai-platform.workflow.nodes.common.output') }} dashboard_id,
dashboard_code
</div>
</template>
</BaseNode>
</template>
@@ -1,55 +0,0 @@
<script setup lang="ts">
import { LayoutDashboard } from '@vben/icons';
import { $t } from '@vben/locales';
import BaseNode from './BaseNode.vue';
defineProps<{
data: any;
id: string;
selected: boolean;
}>();
</script>
<template>
<BaseNode
:selected="selected"
:execution-status="data.executionStatus"
:execution-result="data.executionResult"
:label="
data.label || $t('ai-platform.workflow.nodes.dashboard_design.label')
"
:inputs="[{ id: 'target' }]"
:outputs="[{ id: 'source' }]"
:node-id="id"
node-type="dashboard_design"
>
<template #icon><LayoutDashboard class="size-5" /></template>
<template #desc>
{{ $t('ai-platform.workflow.nodes.dashboard_design.desc') }}
</template>
<div class="space-y-1 text-xs">
<div v-if="data.design_title" class="text-muted-foreground truncate">
<span class="font-medium">{{
$t('ai-platform.workflow.nodes.dashboard_design.title')
}}</span>
{{ data.design_title }}
</div>
<div class="text-muted-foreground">
<span class="font-medium">{{
$t('ai-platform.workflow.nodes.dashboard_design.needConfirm')
}}</span>
{{
data.require_confirmation !== false
? $t('ai-platform.workflow.nodes.dashboard_design.need')
: $t('ai-platform.workflow.nodes.dashboard_design.notNeed')
}}
</div>
</div>
<template #footer>
<div class="text-muted-foreground truncate text-[10px]">
{{ $t('ai-platform.workflow.nodes.common.output') }} page_config
</div>
</template>
</BaseNode>
</template>
@@ -1,57 +0,0 @@
<script setup lang="ts">
import { Upload } from '@vben/icons';
import { $t } from '@vben/locales';
import BaseNode from './BaseNode.vue';
defineProps<{
data: any;
id: string;
selected: boolean;
}>();
</script>
<template>
<BaseNode
:selected="selected"
:execution-status="data.executionStatus"
:execution-result="data.executionResult"
:label="
data.label || $t('ai-platform.workflow.nodes.dashboard_publish.label')
"
:inputs="[{ id: 'target' }]"
:outputs="[{ id: 'source' }]"
:node-id="id"
node-type="dashboard_publish"
>
<template #icon><Upload class="size-5" /></template>
<template #desc>
{{ $t('ai-platform.workflow.nodes.dashboard_publish.desc') }}
</template>
<div class="space-y-1 text-xs">
<div v-if="data.dashboard_id" class="text-muted-foreground truncate">
<span class="font-medium">{{
$t('ai-platform.workflow.nodes.dashboard_publish.dashboard')
}}</span>
{{ data.dashboard_id }}
</div>
<div v-if="data.menu_name" class="text-muted-foreground truncate">
<span class="font-medium">{{
$t('ai-platform.workflow.nodes.dashboard_publish.menuName')
}}</span>
{{ data.menu_name }}
</div>
<div v-if="data.menu_icon" class="text-muted-foreground truncate">
<span class="font-medium">{{
$t('ai-platform.workflow.nodes.dashboard_publish.icon')
}}</span>
{{ data.menu_icon }}
</div>
</div>
<template #footer>
<div class="text-muted-foreground truncate text-[10px]">
{{ $t('ai-platform.workflow.nodes.common.output') }} menu_id, route_path
</div>
</template>
</BaseNode>
</template>
@@ -1,75 +0,0 @@
<script setup lang="ts">
import { FileText } from '@vben/icons';
import { $t } from '@vben/locales';
import BaseNode from './BaseNode.vue';
defineProps(['selected', 'data', 'id']);
</script>
<template>
<BaseNode
:selected="selected"
:execution-status="data.executionStatus"
:execution-result="data.executionResult"
:label="
data.label || $t('ai-platform.workflow.nodes.form_basic_info.label')
"
:inputs="[{ id: 'target' }]"
:outputs="[{ id: 'source' }]"
:node-id="id"
node-type="form_basic_info"
>
<template #icon><FileText class="size-5" /></template>
<template #desc>
{{ $t('ai-platform.workflow.nodes.form_basic_info.desc') }}
</template>
<div class="space-y-2">
<div
class="flex items-center justify-between rounded bg-purple-50 px-2 py-1 text-purple-700 dark:bg-purple-950 dark:text-purple-300"
>
<span class="font-medium">{{
$t('ai-platform.workflow.nodes.form_basic_info.formName')
}}</span>
<span class="max-w-[120px] truncate">{{
data.name || $t('ai-platform.workflow.nodes.common.notConfigured')
}}</span>
</div>
<div class="text-muted-foreground space-y-1 text-xs">
<div class="flex justify-between">
<span>{{
$t('ai-platform.workflow.nodes.form_basic_info.formCode')
}}</span>
<span class="font-mono">{{
data.code ||
(data.auto_generate_code
? $t('ai-platform.workflow.nodes.form_basic_info.autoGenerate')
: '-')
}}</span>
</div>
<div class="flex justify-between">
<span>{{
$t('ai-platform.workflow.nodes.form_basic_info.formType')
}}</span>
<span>{{
data.form_type === 'workflow'
? $t('ai-platform.workflow.nodes.form_basic_info.workflow')
: $t('ai-platform.workflow.nodes.form_basic_info.normal')
}}</span>
</div>
</div>
<!-- 输出变量 -->
<div class="rounded bg-green-50 px-2 py-1 text-xs dark:bg-green-950">
<div
class="flex items-center justify-between text-green-700 dark:text-green-300"
>
<span>{{ $t('ai-platform.workflow.nodes.common.output') }}</span>
<span class="font-mono">form_basic_info</span>
</div>
</div>
</div>
</BaseNode>
</template>
@@ -1,51 +0,0 @@
<script setup lang="ts">
import { FilePlus } from '@vben/icons';
import { $t } from '@vben/locales';
import BaseNode from './BaseNode.vue';
defineProps(['selected', 'data', 'id']);
</script>
<template>
<BaseNode
:selected="selected"
:execution-status="data.executionStatus"
:execution-result="data.executionResult"
:label="data.label || $t('ai-platform.workflow.nodes.form_create.label')"
:inputs="[{ id: 'target' }]"
:outputs="[{ id: 'source' }]"
:node-id="id"
node-type="form_create"
>
<template #icon><FilePlus class="size-5" /></template>
<template #desc>
{{ $t('ai-platform.workflow.nodes.form_create.desc') }}
</template>
<div class="space-y-2">
<div class="text-muted-foreground space-y-1 text-xs">
<div class="flex justify-between">
<span>{{
$t('ai-platform.workflow.nodes.form_create.updateIfExists')
}}</span>
<span>{{
data.update_if_exists !== false
? $t('ai-platform.workflow.nodes.common.yes')
: $t('ai-platform.workflow.nodes.common.no')
}}</span>
</div>
</div>
<!-- 输出变量 -->
<div class="rounded bg-green-50 px-2 py-1 text-xs dark:bg-green-950">
<div
class="flex items-center justify-between text-green-700 dark:text-green-300"
>
<span>{{ $t('ai-platform.workflow.nodes.common.output') }}</span>
<span class="font-mono">form_id, form_code</span>
</div>
</div>
</div>
</BaseNode>
</template>
@@ -1,189 +0,0 @@
<script setup lang="ts">
import { computed } from 'vue';
import { Code, FilePlus, FileText, Search, Trash2 } from '@vben/icons';
import { $t } from '@vben/locales';
import BaseNode from './BaseNode.vue';
const props = defineProps<{
data: any;
id: string;
selected?: boolean;
type: string;
}>();
// 根据节点类型获取显示信息
const nodeInfo = computed(() => {
switch (props.type) {
case 'form_data_create': {
return {
label: $t('ai-platform.workflow.nodes.form_data.create'),
icon: FilePlus,
desc: $t('ai-platform.workflow.nodes.form_data.createDesc'),
};
}
case 'form_data_delete': {
return {
label: $t('ai-platform.workflow.nodes.form_data.delete'),
icon: Trash2,
desc: $t('ai-platform.workflow.nodes.form_data.deleteDesc'),
};
}
case 'form_data_list': {
return {
label: $t('ai-platform.workflow.nodes.form_data.list'),
icon: Search,
desc: $t('ai-platform.workflow.nodes.form_data.listDesc'),
};
}
case 'form_data_read': {
return {
label: $t('ai-platform.workflow.nodes.form_data.read'),
icon: FileText,
desc: $t('ai-platform.workflow.nodes.form_data.readDesc'),
};
}
case 'form_data_update': {
return {
label: $t('ai-platform.workflow.nodes.form_data.update'),
icon: FileText,
desc: $t('ai-platform.workflow.nodes.form_data.updateDesc'),
};
}
case 'form_schema_to_llm': {
return {
label: $t('ai-platform.workflow.nodes.form_data.schemaToLLM'),
icon: Code,
desc: $t('ai-platform.workflow.nodes.form_data.schemaToLLMDesc'),
};
}
default: {
return {
label: $t('ai-platform.workflow.nodes.form_data.label'),
icon: FileText,
desc: $t('ai-platform.workflow.nodes.form_data.desc'),
};
}
}
});
const label = computed(() => props.data?.label || nodeInfo.value.label);
</script>
<template>
<BaseNode
:selected="selected"
:execution-status="data.executionStatus"
:execution-result="data.executionResult"
:label="label"
:inputs="[{ id: 'target' }]"
:outputs="[{ id: 'source' }]"
:node-id="id"
:node-type="type"
>
<template #icon>
<component :is="nodeInfo.icon" class="size-5" />
</template>
<template #desc>{{ nodeInfo.desc }}</template>
<div class="space-y-2">
<!-- 表单编码 -->
<div
v-if="type !== 'form_schema_to_llm'"
class="flex items-center justify-between rounded bg-blue-50 px-2 py-1 text-blue-700 dark:bg-blue-950 dark:text-blue-300"
>
<span class="font-medium">{{
$t('ai-platform.workflow.nodes.form_data.formCode')
}}</span>
<span class="font-mono text-xs">{{
data.form_code ||
$t('ai-platform.workflow.nodes.common.notConfigured')
}}</span>
</div>
<!-- 表单转LLM特殊显示 -->
<div
v-if="type === 'form_schema_to_llm'"
class="flex items-center justify-between rounded bg-purple-50 px-2 py-1 text-purple-700 dark:bg-purple-950 dark:text-purple-300"
>
<span class="font-medium">{{
$t('ai-platform.workflow.nodes.form_data.formCode')
}}</span>
<span class="font-mono text-xs">{{
data.form_code ||
$t('ai-platform.workflow.nodes.common.notConfigured')
}}</span>
</div>
<!-- 配置信息 -->
<div class="text-muted-foreground space-y-1 text-xs">
<div v-if="type === 'form_data_read'" class="flex justify-between">
<span>{{ $t('ai-platform.workflow.nodes.form_data.recordId') }}</span>
<span>{{
data.record_id
? $t('ai-platform.workflow.nodes.common.configured')
: '-'
}}</span>
</div>
<div v-if="type === 'form_data_update'" class="flex justify-between">
<span>{{ $t('ai-platform.workflow.nodes.form_data.recordId') }}</span>
<span>{{
data.record_id
? $t('ai-platform.workflow.nodes.common.configured')
: '-'
}}</span>
</div>
<div v-if="type === 'form_data_update'" class="flex justify-between">
<span>{{
$t('ai-platform.workflow.nodes.form_data.updateData')
}}</span>
<span>{{
data.data ? $t('ai-platform.workflow.nodes.common.configured') : '-'
}}</span>
</div>
<div v-if="type === 'form_data_create'" class="flex justify-between">
<span>{{
$t('ai-platform.workflow.nodes.form_data.createData')
}}</span>
<span>{{
data.data ? $t('ai-platform.workflow.nodes.common.configured') : '-'
}}</span>
</div>
<div v-if="type === 'form_data_delete'" class="flex justify-between">
<span>{{ $t('ai-platform.workflow.nodes.form_data.recordId') }}</span>
<span>{{
data.record_id
? $t('ai-platform.workflow.nodes.common.configured')
: '-'
}}</span>
</div>
<div v-if="type === 'form_data_list'" class="flex justify-between">
<span>{{
$t('ai-platform.workflow.nodes.form_data.filterCondition')
}}</span>
<span>{{
data.filters
? $t('ai-platform.workflow.nodes.common.configured')
: '-'
}}</span>
</div>
</div>
<!-- 输出变量 -->
<div class="rounded bg-green-50 px-2 py-1 text-xs dark:bg-green-950">
<div
class="flex items-center justify-between text-green-700 dark:text-green-300"
>
<span>{{
$t('ai-platform.workflow.nodes.common.outputVariable')
}}</span>
<span class="font-mono">{{
data.output_variable ||
$t('ai-platform.workflow.nodes.common.notConfigured')
}}</span>
</div>
</div>
</div>
</BaseNode>
</template>
@@ -1,74 +0,0 @@
<script setup lang="ts">
import { DatabaseZap } from '@vben/icons';
import { $t } from '@vben/locales';
import BaseNode from './BaseNode.vue';
defineProps(['selected', 'data', 'id']);
</script>
<template>
<BaseNode
:selected="selected"
:execution-status="data.executionStatus"
:execution-result="data.executionResult"
:label="data.label || $t('ai-platform.workflow.nodes.form_db_create.label')"
:inputs="[{ id: 'target' }]"
:outputs="[{ id: 'source' }]"
:node-id="id"
node-type="form_database_create"
>
<template #icon><DatabaseZap class="size-5" /></template>
<template #desc>
{{ $t('ai-platform.workflow.nodes.form_db_create.desc') }}
</template>
<div class="space-y-2">
<div
class="flex items-center justify-between rounded bg-green-50 px-2 py-1 text-green-700 dark:bg-green-950 dark:text-green-300"
>
<span class="font-medium">{{
$t('ai-platform.workflow.nodes.form_db_create.operation')
}}</span>
<span>{{
$t('ai-platform.workflow.nodes.form_db_create.createTable')
}}</span>
</div>
<div class="text-muted-foreground space-y-1 text-xs">
<div class="flex justify-between">
<span>{{
$t('ai-platform.workflow.nodes.form_db_create.tableExists')
}}</span>
<span>{{
data.if_exists === 'replace'
? $t('ai-platform.workflow.nodes.form_db_create.dropRecreate')
: data.if_exists === 'error'
? $t('ai-platform.workflow.nodes.form_db_create.error')
: $t('ai-platform.workflow.nodes.form_db_create.skip')
}}</span>
</div>
<div class="flex justify-between">
<span>{{
$t('ai-platform.workflow.nodes.form_db_create.autoCreateSchema')
}}</span>
<span>{{
data.create_schema_if_not_exists !== false
? $t('ai-platform.workflow.nodes.common.yes')
: $t('ai-platform.workflow.nodes.common.no')
}}</span>
</div>
</div>
<!-- 输出变量 -->
<div class="rounded bg-green-50 px-2 py-1 text-xs dark:bg-green-950">
<div
class="flex items-center justify-between text-green-700 dark:text-green-300"
>
<span>{{ $t('ai-platform.workflow.nodes.common.output') }}</span>
<span class="font-mono">creation_result</span>
</div>
</div>
</div>
</BaseNode>
</template>
@@ -1,80 +0,0 @@
<script setup lang="ts">
import { Database } from '@vben/icons';
import { $t } from '@vben/locales';
import BaseNode from './BaseNode.vue';
defineProps(['selected', 'data', 'id']);
</script>
<template>
<BaseNode
:selected="selected"
:execution-status="data.executionStatus"
:execution-result="data.executionResult"
:label="data.label || $t('ai-platform.workflow.nodes.form_db_design.label')"
:inputs="[{ id: 'target' }]"
:outputs="[{ id: 'source' }]"
:node-id="id"
node-type="form_database_design"
>
<template #icon><Database class="size-5" /></template>
<template #desc>
{{ $t('ai-platform.workflow.nodes.form_db_design.desc') }}
</template>
<div class="space-y-2">
<div
class="flex items-center justify-between rounded bg-blue-50 px-2 py-1 text-blue-700 dark:bg-blue-950 dark:text-blue-300"
>
<span class="font-medium">{{
$t('ai-platform.workflow.nodes.form_db_design.database')
}}</span>
<span>{{ data.db_config || 'default' }}</span>
</div>
<div class="text-muted-foreground space-y-1 text-xs">
<div class="flex justify-between">
<span>{{
$t('ai-platform.workflow.nodes.form_db_design.mainTable')
}}</span>
<span>{{
data.main_table
? $t('ai-platform.workflow.nodes.common.configured')
: $t('ai-platform.workflow.nodes.common.notConfigured')
}}</span>
</div>
<div class="flex justify-between">
<span>{{
$t('ai-platform.workflow.nodes.form_db_design.subTable')
}}</span>
<span>{{
data.sub_tables
? $t('ai-platform.workflow.nodes.common.configured')
: $t('ai-platform.workflow.nodes.form_db_design.noSubTable')
}}</span>
</div>
<div class="flex justify-between">
<span>{{
$t('ai-platform.workflow.nodes.form_db_design.systemFields')
}}</span>
<span>{{
data.auto_add_system_fields !== false
? $t('ai-platform.workflow.nodes.form_db_design.autoAdd')
: $t('ai-platform.workflow.nodes.form_db_design.noAdd')
}}</span>
</div>
</div>
<!-- 输出变量 -->
<div class="rounded bg-green-50 px-2 py-1 text-xs dark:bg-green-950">
<div
class="flex items-center justify-between text-green-700 dark:text-green-300"
>
<span>{{ $t('ai-platform.workflow.nodes.common.output') }}</span>
<span class="font-mono">database_design</span>
</div>
</div>
</div>
</BaseNode>
</template>
@@ -1,86 +0,0 @@
<script setup lang="ts">
import { TableProperties } from '@vben/icons';
import { $t } from '@vben/locales';
import BaseNode from './BaseNode.vue';
defineProps(['selected', 'data', 'id']);
</script>
<template>
<BaseNode
:selected="selected"
:execution-status="data.executionStatus"
:execution-result="data.executionResult"
:label="
data.label || $t('ai-platform.workflow.nodes.form_list_design.label')
"
:inputs="[{ id: 'target' }]"
:outputs="[{ id: 'source' }]"
:node-id="id"
node-type="form_list_design"
>
<template #icon><TableProperties class="size-5" /></template>
<template #desc>
{{ $t('ai-platform.workflow.nodes.form_list_design.desc') }}
</template>
<div class="space-y-2">
<div
class="flex items-center justify-between rounded bg-indigo-50 px-2 py-1 text-indigo-700 dark:bg-indigo-950 dark:text-indigo-300"
>
<span class="font-medium">{{
$t('ai-platform.workflow.nodes.form_list_design.containerType')
}}</span>
<span>{{
data.container_type === 'drawer'
? $t('ai-platform.workflow.nodes.form_list_design.drawer')
: data.container_type === 'dialog'
? $t('ai-platform.workflow.nodes.form_list_design.dialog')
: data.container_type === 'page'
? $t('ai-platform.workflow.nodes.form_list_design.page')
: $t('ai-platform.workflow.nodes.form_list_design.drawer')
}}</span>
</div>
<div class="text-muted-foreground space-y-1 text-xs">
<div class="flex justify-between">
<span>{{
$t('ai-platform.workflow.nodes.form_list_design.pageSize')
}}</span>
<span>{{ data.page_size || 20 }}</span>
</div>
<div class="flex justify-between">
<span>{{
$t('ai-platform.workflow.nodes.form_list_design.autoQueryFields')
}}</span>
<span>{{
data.auto_query_fields !== false
? $t('ai-platform.workflow.nodes.common.yes')
: $t('ai-platform.workflow.nodes.common.no')
}}</span>
</div>
<div class="flex justify-between">
<span>{{
$t('ai-platform.workflow.nodes.form_list_design.autoColumns')
}}</span>
<span>{{
data.auto_columns !== false
? $t('ai-platform.workflow.nodes.common.yes')
: $t('ai-platform.workflow.nodes.common.no')
}}</span>
</div>
</div>
<!-- 输出变量 -->
<div class="rounded bg-green-50 px-2 py-1 text-xs dark:bg-green-950">
<div
class="flex items-center justify-between text-green-700 dark:text-green-300"
>
<span>{{ $t('ai-platform.workflow.nodes.common.output') }}</span>
<span class="font-mono">list_config</span>
</div>
</div>
</div>
</BaseNode>
</template>
@@ -1,56 +0,0 @@
<script setup lang="ts">
import { Send } from '@vben/icons';
import { $t } from '@vben/locales';
import BaseNode from './BaseNode.vue';
defineProps(['selected', 'data', 'id']);
</script>
<template>
<BaseNode
:selected="selected"
:execution-status="data.executionStatus"
:execution-result="data.executionResult"
:label="data.label || $t('ai-platform.workflow.nodes.form_publish.label')"
:inputs="[{ id: 'target' }]"
:outputs="[{ id: 'source' }]"
:node-id="id"
node-type="form_publish"
>
<template #icon><Send class="size-5" /></template>
<template #desc>
{{ $t('ai-platform.workflow.nodes.form_publish.desc') }}
</template>
<div class="space-y-2">
<div class="text-muted-foreground space-y-1 text-xs">
<div class="flex justify-between">
<span>{{
$t('ai-platform.workflow.nodes.form_publish.menuName')
}}</span>
<span class="max-w-[120px] truncate">{{
data.menu_name ||
$t('ai-platform.workflow.nodes.form_publish.notSet')
}}</span>
</div>
<div class="flex justify-between">
<span>{{
$t('ai-platform.workflow.nodes.form_publish.menuIcon')
}}</span>
<span>{{ data.menu_icon || 'lucide:file-text' }}</span>
</div>
</div>
<!-- 输出变量 -->
<div class="rounded bg-green-50 px-2 py-1 text-xs dark:bg-green-950">
<div
class="flex items-center justify-between text-green-700 dark:text-green-300"
>
<span>{{ $t('ai-platform.workflow.nodes.common.output') }}</span>
<span class="font-mono">menu_id, route_path</span>
</div>
</div>
</div>
</BaseNode>
</template>
@@ -1,89 +0,0 @@
<script setup lang="ts">
import { LayoutTemplate } from '@vben/icons';
import { $t } from '@vben/locales';
import BaseNode from './BaseNode.vue';
defineProps(['selected', 'data', 'id']);
</script>
<template>
<BaseNode
:selected="selected"
:execution-status="data.executionStatus"
:execution-result="data.executionResult"
:label="data.label || $t('ai-platform.workflow.nodes.form_ui_design.label')"
:inputs="[{ id: 'target' }]"
:outputs="[{ id: 'source' }]"
:node-id="id"
node-type="form_ui_design"
>
<template #icon><LayoutTemplate class="size-5" /></template>
<template #desc>
{{ $t('ai-platform.workflow.nodes.form_ui_design.desc') }}
</template>
<div class="space-y-2">
<div
class="flex items-center justify-between rounded bg-purple-50 px-2 py-1 text-purple-700 dark:bg-purple-950 dark:text-purple-300"
>
<span class="font-medium">{{
$t('ai-platform.workflow.nodes.form_ui_design.layoutMode')
}}</span>
<span>{{
data.layout_mode === 'auto'
? $t('ai-platform.workflow.nodes.form_ui_design.auto')
: data.layout_mode === 'single'
? $t('ai-platform.workflow.nodes.form_ui_design.singleCol')
: data.layout_mode === 'double'
? $t('ai-platform.workflow.nodes.form_ui_design.doubleCol')
: data.layout_mode === 'triple'
? $t('ai-platform.workflow.nodes.form_ui_design.tripleCol')
: $t('ai-platform.workflow.nodes.form_ui_design.auto')
}}</span>
</div>
<div class="text-muted-foreground space-y-1 text-xs">
<div class="flex justify-between">
<span>{{
$t('ai-platform.workflow.nodes.form_ui_design.formName')
}}</span>
<span>{{
data.form_name ||
$t('ai-platform.workflow.nodes.form_ui_design.auto')
}}</span>
</div>
<div class="flex justify-between">
<span>{{
$t('ai-platform.workflow.nodes.form_ui_design.enableGrouping')
}}</span>
<span>{{
data.enable_grouping !== false
? $t('ai-platform.workflow.nodes.common.yes')
: $t('ai-platform.workflow.nodes.common.no')
}}</span>
</div>
<div class="flex justify-between">
<span>{{
$t('ai-platform.workflow.nodes.form_ui_design.hideSystemFields')
}}</span>
<span>{{
data.hide_system_fields !== false
? $t('ai-platform.workflow.nodes.common.yes')
: $t('ai-platform.workflow.nodes.common.no')
}}</span>
</div>
</div>
<!-- 输出变量 -->
<div class="rounded bg-green-50 px-2 py-1 text-xs dark:bg-green-950">
<div
class="flex items-center justify-between text-green-700 dark:text-green-300"
>
<span>{{ $t('ai-platform.workflow.nodes.common.output') }}</span>
<span class="font-mono">form_ui_design</span>
</div>
</div>
</div>
</BaseNode>
</template>
@@ -1,189 +0,0 @@
<script setup lang="ts">
import { ref, watch } from 'vue';
import { $t } from '@vben/locales';
import {
ElForm,
ElFormItem,
ElInput,
ElOption,
ElSelect,
ElSwitch,
} from 'element-plus';
import SmartInput from '../components/SmartInput.vue';
const props = defineProps<{ data: any; nodeId: string }>();
const emit = defineEmits(['update']);
const form = ref({
label: $t('ai-platform.workflow.panels.appCreate.label'),
name: '',
code: '',
description: '',
icon: '',
app_type: 'mixed',
update_if_exists: false,
...props.data,
});
watch(
form,
(val) => {
emit('update', val);
},
{ deep: true },
);
</script>
<template>
<ElForm label-position="top">
<ElFormItem :label="$t('ai-platform.workflow.panels.common.nodeName')">
<ElInput
v-model="form.label"
:placeholder="$t('ai-platform.workflow.panels.appCreate.placeholder')"
/>
</ElFormItem>
<ElFormItem>
<template #label>
<div class="flex items-center gap-2">
<span>{{
$t('ai-platform.workflow.panels.appCreate.appNameOutput')
}}</span>
<span class="text-red-500">*</span>
</div>
</template>
<SmartInput
v-model="form.name"
:current-node-id="nodeId"
:placeholder="
$t('ai-platform.workflow.panels.appCreate.appNamePlaceholder')
"
/>
<div class="text-muted-foreground mt-1 text-xs">
{{ $t('ai-platform.workflow.panels.appCreate.appNameHint')
}}<code v-pre>{{llm-1.app_name}}</code>
</div>
</ElFormItem>
<ElFormItem>
<template #label>
<div class="flex items-center gap-2">
<span>{{
$t('ai-platform.workflow.panels.appCreate.appCodeOutput')
}}</span>
<span class="text-red-500">*</span>
</div>
</template>
<SmartInput
v-model="form.code"
:current-node-id="nodeId"
:placeholder="
$t('ai-platform.workflow.panels.appCreate.appCodePlaceholder')
"
/>
<div class="text-muted-foreground mt-1 text-xs">
{{ $t('ai-platform.workflow.panels.appCreate.appCodeHint') }}
</div>
</ElFormItem>
<ElFormItem :label="$t('ai-platform.workflow.panels.appCreate.appDesc')">
<SmartInput
v-model="form.description"
:current-node-id="nodeId"
type="textarea"
:rows="3"
:placeholder="
$t('ai-platform.workflow.panels.appCreate.appDescPlaceholder')
"
/>
</ElFormItem>
<ElFormItem :label="$t('ai-platform.workflow.panels.appCreate.appIcon')">
<SmartInput
v-model="form.icon"
:current-node-id="nodeId"
:placeholder="
$t('ai-platform.workflow.panels.appCreate.appIconPlaceholder')
"
/>
</ElFormItem>
<ElFormItem :label="$t('ai-platform.workflow.panels.appCreate.appType')">
<ElSelect
v-model="form.app_type"
:placeholder="
$t('ai-platform.workflow.panels.appCreate.appTypePlaceholder')
"
class="w-full"
>
<ElOption
:label="$t('ai-platform.workflow.panels.appCreate.mixedApp')"
value="mixed"
/>
<ElOption
:label="$t('ai-platform.workflow.panels.appCreate.formApp')"
value="form"
/>
<ElOption
:label="$t('ai-platform.workflow.panels.appCreate.workflowApp')"
value="workflow"
/>
<ElOption
:label="$t('ai-platform.workflow.panels.appCreate.dashboardApp')"
value="dashboard"
/>
<ElOption
:label="$t('ai-platform.workflow.panels.appCreate.screenApp')"
value="screen"
/>
</ElSelect>
</ElFormItem>
<ElFormItem
:label="$t('ai-platform.workflow.panels.appCreate.updateIfExists')"
>
<ElSwitch v-model="form.update_if_exists" />
<div class="text-muted-foreground mt-1 text-xs">
{{ $t('ai-platform.workflow.panels.appCreate.updateIfExistsHint') }}
</div>
</ElFormItem>
<!-- 输出变量说明 -->
<div
class="mt-4 rounded border border-green-200 bg-green-50 p-3 dark:border-green-800 dark:bg-green-950"
>
<div class="mb-2 font-medium text-green-700 dark:text-green-300">
{{ $t('ai-platform.workflow.panels.common.outputVars') }}
</div>
<div class="text-muted-foreground space-y-1 text-xs">
<div class="flex justify-between">
<span class="font-mono">app_id</span>
<span>{{
$t('ai-platform.workflow.panels.appCreate.createdAppId')
}}</span>
</div>
<div class="flex justify-between">
<span class="font-mono">app_code</span>
<span>{{
$t('ai-platform.workflow.panels.appCreate.appCodeOutput')
}}</span>
</div>
<div class="flex justify-between">
<span class="font-mono">app_name</span>
<span>{{
$t('ai-platform.workflow.panels.appCreate.appNameOutput')
}}</span>
</div>
<div class="flex justify-between">
<span class="font-mono">success</span>
<span>{{
$t('ai-platform.workflow.panels.appCreate.successOutput')
}}</span>
</div>
</div>
</div>
</ElForm>
</template>
@@ -1,114 +0,0 @@
<script setup lang="ts">
import { ref, watch } from 'vue';
import { $t } from '@vben/locales';
import { ElForm, ElFormItem, ElInput } from 'element-plus';
import ConfirmModeSelect from '../components/ConfirmModeSelect.vue';
import SmartInput from '../components/SmartInput.vue';
const props = defineProps<{ data: any; nodeId: string }>();
const emit = defineEmits(['update']);
const form = ref({
label: $t('ai-platform.workflow.panels.appDesign.label'),
design_content: '',
design_title: $t(
'ai-platform.workflow.panels.appDesign.designTitlePlaceholder',
),
require_confirmation: true,
...props.data,
});
watch(
form,
(val) => {
emit('update', val);
},
{ deep: true },
);
</script>
<template>
<ElForm label-position="top">
<ElFormItem :label="$t('ai-platform.workflow.panels.common.nodeName')">
<ElInput
v-model="form.label"
:placeholder="$t('ai-platform.workflow.panels.appDesign.placeholder')"
/>
</ElFormItem>
<ElFormItem>
<template #label>
<div class="flex items-center gap-2">
<span>{{
$t('ai-platform.workflow.panels.appDesign.designContent')
}}</span>
<span class="text-red-500">*</span>
</div>
</template>
<SmartInput
v-model="form.design_content"
:current-node-id="nodeId"
type="textarea"
:rows="6"
:placeholder="
$t('ai-platform.workflow.panels.appDesign.designContentPlaceholder')
"
/>
<div class="text-muted-foreground mt-1 text-xs">
{{ $t('ai-platform.workflow.panels.appDesign.designContentHint')
}}<code v-pre>{{llm-1.output}}</code>
</div>
</ElFormItem>
<ElFormItem
:label="$t('ai-platform.workflow.panels.appDesign.designTitle')"
>
<SmartInput
v-model="form.design_title"
:current-node-id="nodeId"
:placeholder="
$t('ai-platform.workflow.panels.appDesign.designTitlePlaceholder')
"
/>
</ElFormItem>
<ElFormItem :label="$t('ai-platform.workflow.panels.common.confirmMode')">
<ConfirmModeSelect
v-model="form.require_confirmation"
:current-node-id="nodeId"
/>
</ElFormItem>
<!-- 输出变量说明 -->
<div
class="mt-4 rounded border border-green-200 bg-green-50 p-3 dark:border-green-800 dark:bg-green-950"
>
<div class="mb-2 font-medium text-green-700 dark:text-green-300">
{{ $t('ai-platform.workflow.panels.common.outputVars') }}
</div>
<div class="text-muted-foreground space-y-1 text-xs">
<div class="flex justify-between">
<span class="font-mono">design_content</span>
<span>{{
$t('ai-platform.workflow.panels.appDesign.designContentOutput')
}}</span>
</div>
<div class="flex justify-between">
<span class="font-mono">design_title</span>
<span>{{
$t('ai-platform.workflow.panels.appDesign.designTitleOutput')
}}</span>
</div>
<div class="flex justify-between">
<span class="font-mono">confirmed</span>
<span>{{
$t('ai-platform.workflow.panels.appDesign.confirmedOutput')
}}</span>
</div>
</div>
</div>
</ElForm>
</template>
@@ -1,196 +0,0 @@
<script setup lang="ts">
import { ref, watch } from 'vue';
import { $t } from '@vben/locales';
import { ElForm, ElFormItem, ElInput, ElOption, ElSelect } from 'element-plus';
import ConfirmModeSelect from '../components/ConfirmModeSelect.vue';
import SmartInput from '../components/SmartInput.vue';
const props = defineProps<{ data: any; nodeId: string }>();
const emit = defineEmits(['update']);
const form = ref({
label: $t('ai-platform.workflow.panels.appSettings.label'),
app_name: '',
home_path: '',
logo_source: '',
theme_builtin_type: 'default',
theme_color_primary: '',
app_layout: 'sidebar-nav',
require_confirmation: true,
...props.data,
});
// 布局选项
const layoutOptions = [
{
label: $t('ai-platform.appSettings.layoutOptions.sidebar-nav'),
value: 'sidebar-nav',
},
{
label: $t('ai-platform.appSettings.layoutOptions.sidebar-mixed-nav'),
value: 'sidebar-mixed-nav',
},
{
label: $t('ai-platform.appSettings.layoutOptions.header-nav'),
value: 'header-nav',
},
{
label: $t('ai-platform.appSettings.layoutOptions.mixed-nav'),
value: 'mixed-nav',
},
{
label: $t('ai-platform.appSettings.layoutOptions.full-content'),
value: 'full-content',
},
];
// 主题选项
const themeOptions = [
{
label: $t('ai-platform.appSettings.themeOptions.default'),
value: 'default',
},
{ label: $t('ai-platform.appSettings.themeOptions.violet'), value: 'violet' },
{ label: $t('ai-platform.appSettings.themeOptions.pink'), value: 'pink' },
{ label: $t('ai-platform.appSettings.themeOptions.rose'), value: 'rose' },
{ label: $t('ai-platform.appSettings.themeOptions.sky'), value: 'sky' },
{ label: $t('ai-platform.appSettings.themeOptions.cyan'), value: 'cyan' },
{ label: $t('ai-platform.appSettings.themeOptions.green'), value: 'green' },
{ label: $t('ai-platform.appSettings.themeOptions.orange'), value: 'orange' },
{ label: $t('ai-platform.appSettings.themeOptions.yellow'), value: 'yellow' },
{ label: $t('ai-platform.appSettings.themeOptions.zinc'), value: 'zinc' },
{
label: $t('ai-platform.appSettings.themeOptions.neutral'),
value: 'neutral',
},
{ label: $t('ai-platform.appSettings.themeOptions.slate'), value: 'slate' },
{ label: $t('ai-platform.appSettings.themeOptions.gray'), value: 'gray' },
{
label: $t('ai-platform.appSettings.themeOptions.deep-blue'),
value: 'deep-blue',
},
{
label: $t('ai-platform.appSettings.themeOptions.deep-green'),
value: 'deep-green',
},
];
watch(
form,
(val) => {
emit('update', val);
},
{ deep: true },
);
</script>
<template>
<ElForm label-position="top">
<ElFormItem :label="$t('ai-platform.workflow.panels.common.nodeName')">
<ElInput
v-model="form.label"
:placeholder="$t('ai-platform.workflow.panels.appSettings.placeholder')"
/>
</ElFormItem>
<ElFormItem :label="$t('ai-platform.appSettings.appName')">
<SmartInput
v-model="form.app_name"
:current-node-id="nodeId"
:placeholder="$t('ai-platform.appSettings.appNamePlaceholder')"
/>
<div class="text-muted-foreground mt-1 text-xs">
{{ $t('ai-platform.workflow.panels.appSettings.varRefHint') }}
<code v-pre>{{llm-1.output}}</code>
</div>
</ElFormItem>
<ElFormItem :label="$t('ai-platform.workflow.panels.appSettings.homePath')">
<SmartInput
v-model="form.home_path"
:current-node-id="nodeId"
placeholder="e.g. /dashboard"
/>
<div class="text-muted-foreground mt-1 text-xs">
{{ $t('ai-platform.workflow.panels.appSettings.homePathHint') }}
</div>
</ElFormItem>
<ElFormItem :label="$t('ai-platform.appSettings.logoSource')">
<SmartInput
v-model="form.logo_source"
:current-node-id="nodeId"
:placeholder="$t('ai-platform.appSettings.logoSourcePlaceholder')"
/>
<div class="text-muted-foreground mt-1 text-xs">
{{ $t('ai-platform.workflow.panels.appSettings.logoHint') }}
</div>
</ElFormItem>
<ElFormItem :label="$t('ai-platform.appSettings.builtinTheme')">
<ElSelect v-model="form.theme_builtin_type" class="w-full">
<ElOption
v-for="item in themeOptions"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</ElSelect>
</ElFormItem>
<ElFormItem :label="$t('ai-platform.appSettings.primaryColor')">
<SmartInput
v-model="form.theme_color_primary"
:current-node-id="nodeId"
placeholder="e.g. hsl(212 100% 45%)"
/>
<div class="text-muted-foreground mt-1 text-xs">
{{ $t('ai-platform.workflow.panels.appSettings.primaryColorHint') }}
</div>
</ElFormItem>
<ElFormItem :label="$t('ai-platform.appSettings.layout')">
<ElSelect v-model="form.app_layout" class="w-full">
<ElOption
v-for="item in layoutOptions"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</ElSelect>
</ElFormItem>
<ElFormItem :label="$t('ai-platform.workflow.panels.common.confirmMode')">
<ConfirmModeSelect
v-model="form.require_confirmation"
:current-node-id="nodeId"
/>
</ElFormItem>
<!-- 输出变量说明 -->
<div
class="mt-4 rounded border border-green-200 bg-green-50 p-3 dark:border-green-800 dark:bg-green-950"
>
<div class="mb-2 font-medium text-green-700 dark:text-green-300">
{{ $t('ai-platform.workflow.panels.common.outputVars') }}
</div>
<div class="text-muted-foreground space-y-1 text-xs">
<div class="flex justify-between">
<span class="font-mono">settings</span>
<span>{{
$t('ai-platform.workflow.panels.appSettings.settingsOutput')
}}</span>
</div>
<div class="flex justify-between">
<span class="font-mono">confirmed</span>
<span>{{
$t('ai-platform.workflow.panels.appSettings.confirmedOutput')
}}</span>
</div>
</div>
</div>
</ElForm>
</template>
@@ -1,103 +0,0 @@
<script setup lang="ts">
import { ref, watch } from 'vue';
import { $t } from '@vben/locales';
import { ElForm, ElFormItem, ElInput } from 'element-plus';
import SmartInput from '../components/SmartInput.vue';
const props = defineProps<{ data: any; nodeId: string }>();
const emit = defineEmits(['update']);
const form = ref({
label: $t('ai-platform.workflow.panels.appUpdate.label'),
settings: '',
application_id: '',
...props.data,
});
watch(
form,
(val) => {
emit('update', val);
},
{ deep: true },
);
</script>
<template>
<ElForm label-position="top">
<ElFormItem :label="$t('ai-platform.workflow.panels.common.nodeName')">
<ElInput
v-model="form.label"
:placeholder="$t('ai-platform.workflow.panels.appUpdate.placeholder')"
/>
</ElFormItem>
<ElFormItem>
<template #label>
<div class="flex items-center gap-2">
<span>{{
$t('ai-platform.workflow.panels.appUpdate.appSettingsLabel')
}}</span>
<span class="text-red-500">*</span>
</div>
</template>
<SmartInput
v-model="form.settings"
:current-node-id="nodeId"
:placeholder="
$t('ai-platform.workflow.panels.appUpdate.appSettingsPlaceholder')
"
/>
<div class="text-muted-foreground mt-1 text-xs">
{{ $t('ai-platform.workflow.panels.appUpdate.appSettingsHint')
}}<code v-pre>{{app_settings-1.settings}}</code>
</div>
</ElFormItem>
<ElFormItem :label="$t('ai-platform.workflow.panels.appUpdate.appId')">
<SmartInput
v-model="form.application_id"
:current-node-id="nodeId"
:placeholder="
$t('ai-platform.workflow.panels.appUpdate.appIdPlaceholder')
"
/>
<div class="text-muted-foreground mt-1 text-xs">
{{ $t('ai-platform.workflow.panels.appUpdate.appIdHint')
}}<code v-pre>{{ application_id }}</code>
</div>
</ElFormItem>
<!-- 输出变量说明 -->
<div
class="mt-4 rounded border border-green-200 bg-green-50 p-3 dark:border-green-800 dark:bg-green-950"
>
<div class="mb-2 font-medium text-green-700 dark:text-green-300">
{{ $t('ai-platform.workflow.panels.common.outputVars') }}
</div>
<div class="text-muted-foreground space-y-1 text-xs">
<div class="flex justify-between">
<span class="font-mono">update_success</span>
<span>{{
$t('ai-platform.workflow.panels.appUpdate.updateSuccess')
}}</span>
</div>
<div class="flex justify-between">
<span class="font-mono">config_id</span>
<span>{{
$t('ai-platform.workflow.panels.appUpdate.configId')
}}</span>
</div>
<div class="flex justify-between">
<span class="font-mono">update_message</span>
<span>{{
$t('ai-platform.workflow.panels.appUpdate.updateMessage')
}}</span>
</div>
</div>
</div>
</ElForm>
</template>
@@ -1,164 +0,0 @@
<script setup lang="ts">
import { ref, watch } from 'vue';
import { $t } from '@vben/locales';
import {
ElForm,
ElFormItem,
ElInput,
ElInputNumber,
ElOption,
ElSelect,
} from 'element-plus';
import ConfirmModeSelect from '../components/ConfirmModeSelect.vue';
import SmartInput from '../components/SmartInput.vue';
const props = defineProps<{
data: any;
nodeId: string;
}>();
const emit = defineEmits(['update']);
const form = ref({
label: $t('ai-platform.workflow.panels.dashboardBasicInfo.label'),
name: '',
code: '',
category: 'dashboard',
description: '',
sort: 0,
require_confirmation: true,
...props.data,
});
watch(
form,
(newVal) => {
emit('update', newVal);
},
{ deep: true },
);
const categoryOptions = [
{
label: $t('ai-platform.workflow.panels.dashboardBasicInfo.catDashboard'),
value: 'dashboard',
},
{
label: $t('ai-platform.workflow.panels.dashboardBasicInfo.catPortal'),
value: 'portal',
},
{
label: $t('ai-platform.workflow.panels.dashboardBasicInfo.catDataboard'),
value: 'databoard',
},
{
label: $t('ai-platform.workflow.panels.dashboardBasicInfo.catOther'),
value: 'other',
},
];
</script>
<template>
<div class="space-y-4">
<ElForm :model="form" label-position="top" size="small">
<ElFormItem :label="$t('ai-platform.workflow.panels.common.nodeName')">
<ElInput
v-model="form.label"
:placeholder="
$t('ai-platform.workflow.panels.dashboardBasicInfo.placeholder')
"
/>
</ElFormItem>
<ElFormItem
:label="
$t('ai-platform.workflow.panels.dashboardBasicInfo.dashboardName')
"
required
>
<SmartInput
v-model="form.name"
:placeholder="
$t(
'ai-platform.workflow.panels.dashboardBasicInfo.dashboardNamePlaceholder',
)
"
:current-node-id="nodeId"
/>
</ElFormItem>
<ElFormItem
:label="
$t('ai-platform.workflow.panels.dashboardBasicInfo.dashboardCode')
"
>
<SmartInput
v-model="form.code"
:placeholder="
$t(
'ai-platform.workflow.panels.dashboardBasicInfo.dashboardCodePlaceholder',
)
"
:current-node-id="nodeId"
/>
</ElFormItem>
<ElFormItem
:label="$t('ai-platform.workflow.panels.dashboardBasicInfo.category')"
>
<ElSelect
v-model="form.category"
class="w-full"
:placeholder="
$t(
'ai-platform.workflow.panels.dashboardBasicInfo.categoryPlaceholder',
)
"
>
<ElOption
v-for="opt in categoryOptions"
:key="opt.value"
:label="opt.label"
:value="opt.value"
/>
</ElSelect>
</ElFormItem>
<ElFormItem
:label="
$t('ai-platform.workflow.panels.dashboardBasicInfo.description')
"
>
<SmartInput
v-model="form.description"
type="textarea"
:placeholder="
$t('ai-platform.workflow.panels.dashboardBasicInfo.descPlaceholder')
"
:current-node-id="nodeId"
/>
</ElFormItem>
<ElFormItem
:label="$t('ai-platform.workflow.panels.dashboardBasicInfo.sort')"
>
<ElInputNumber
v-model="form.sort"
:min="0"
:max="9999"
class="w-full"
/>
</ElFormItem>
<ElFormItem :label="$t('ai-platform.workflow.panels.common.confirmMode')">
<ConfirmModeSelect
v-model="form.require_confirmation"
:current-node-id="nodeId"
/>
</ElFormItem>
</ElForm>
</div>
</template>
@@ -1,135 +0,0 @@
<script setup lang="ts">
import { ref, watch } from 'vue';
import { $t } from '@vben/locales';
import { ElForm, ElFormItem, ElInput, ElSwitch } from 'element-plus';
import SmartInput from '../components/SmartInput.vue';
const props = defineProps<{
data: any;
nodeId: string;
}>();
const emit = defineEmits(['update']);
const form = ref({
label: $t('ai-platform.workflow.panels.dashboardCreate.label'),
dashboard_basic_info: '',
page_config: '',
application_id: '',
update_if_exists: true,
...props.data,
});
watch(
form,
(newVal) => {
emit('update', newVal);
},
{ deep: true },
);
</script>
<template>
<div class="space-y-4">
<ElForm :model="form" label-position="top" size="small">
<ElFormItem :label="$t('ai-platform.workflow.panels.common.nodeName')">
<ElInput
v-model="form.label"
:placeholder="
$t('ai-platform.workflow.panels.dashboardCreate.placeholder')
"
/>
</ElFormItem>
<ElFormItem
:label="$t('ai-platform.workflow.panels.dashboardCreate.basicInfo')"
required
>
<SmartInput
v-model="form.dashboard_basic_info"
:placeholder="
$t(
'ai-platform.workflow.panels.dashboardCreate.basicInfoPlaceholder',
)
"
:current-node-id="nodeId"
/>
</ElFormItem>
<ElFormItem
:label="$t('ai-platform.workflow.panels.dashboardCreate.pageConfig')"
required
>
<SmartInput
v-model="form.page_config"
:placeholder="
$t(
'ai-platform.workflow.panels.dashboardCreate.pageConfigPlaceholder',
)
"
:current-node-id="nodeId"
/>
</ElFormItem>
<ElFormItem
:label="$t('ai-platform.workflow.panels.dashboardCreate.appId')"
>
<SmartInput
v-model="form.application_id"
:placeholder="
$t('ai-platform.workflow.panels.dashboardCreate.appIdPlaceholder')
"
:current-node-id="nodeId"
/>
</ElFormItem>
<ElFormItem
:label="
$t('ai-platform.workflow.panels.dashboardCreate.updateIfExists')
"
>
<ElSwitch v-model="form.update_if_exists" />
<span class="text-muted-foreground ml-2 text-xs">
{{
$t('ai-platform.workflow.panels.dashboardCreate.updateIfExistsHint')
}}
</span>
</ElFormItem>
</ElForm>
<div class="bg-muted/50 rounded-lg p-3">
<div class="text-muted-foreground text-xs">
<p class="mb-2 font-medium">
{{ $t('ai-platform.workflow.panels.common.outputVars') }}:
</p>
<ul class="list-inside list-disc space-y-1">
<li>
<code>dashboard_id</code> -
{{
$t(
'ai-platform.workflow.panels.dashboardCreate.dashboardIdOutput',
)
}}
</li>
<li>
<code>dashboard_code</code> -
{{
$t(
'ai-platform.workflow.panels.dashboardCreate.dashboardCodeOutput',
)
}}
</li>
<li>
<code>page_meta</code> -
{{
$t('ai-platform.workflow.panels.dashboardCreate.pageMetaOutput')
}}
</li>
</ul>
</div>
</div>
</div>
</template>
@@ -1,119 +0,0 @@
<script setup lang="ts">
import { ref, watch } from 'vue';
import { $t } from '@vben/locales';
import { ElForm, ElFormItem, ElInput } from 'element-plus';
import ConfirmModeSelect from '../components/ConfirmModeSelect.vue';
import SmartInput from '../components/SmartInput.vue';
const props = defineProps<{
data: any;
nodeId: string;
}>();
const emit = defineEmits(['update']);
const form = ref({
label: $t('ai-platform.workflow.panels.dashboardDesign.label'),
dashboard_code: '',
design_title: $t('ai-platform.workflow.panels.dashboardDesign.designTitle'),
design_suggestion: '',
require_confirmation: true,
...props.data,
});
watch(
form,
(newVal) => {
emit('update', newVal);
},
{ deep: true },
);
</script>
<template>
<div class="space-y-4">
<ElForm :model="form" label-position="top" size="small">
<ElFormItem :label="$t('ai-platform.workflow.panels.common.nodeName')">
<ElInput
v-model="form.label"
:placeholder="
$t('ai-platform.workflow.panels.dashboardDesign.placeholder')
"
/>
</ElFormItem>
<ElFormItem
:label="$t('ai-platform.workflow.panels.dashboardDesign.dashboardCode')"
>
<SmartInput
v-model="form.dashboard_code"
:placeholder="
$t(
'ai-platform.workflow.panels.dashboardDesign.dashboardCodePlaceholder',
)
"
:current-node-id="nodeId"
/>
</ElFormItem>
<ElFormItem
:label="
$t('ai-platform.workflow.panels.dashboardDesign.designTitleLabel')
"
>
<ElInput
v-model="form.design_title"
:placeholder="
$t('ai-platform.workflow.panels.dashboardDesign.placeholder')
"
/>
</ElFormItem>
<ElFormItem
:label="
$t('ai-platform.workflow.panels.dashboardDesign.designSuggestion')
"
>
<SmartInput
v-model="form.design_suggestion"
type="textarea"
:placeholder="
$t(
'ai-platform.workflow.panels.dashboardDesign.designSuggestionPlaceholder',
)
"
:current-node-id="nodeId"
/>
</ElFormItem>
<ElFormItem :label="$t('ai-platform.workflow.panels.common.confirmMode')">
<ConfirmModeSelect
v-model="form.require_confirmation"
:current-node-id="nodeId"
/>
</ElFormItem>
</ElForm>
<div class="bg-muted/50 rounded-lg p-3">
<div class="text-muted-foreground text-xs">
<p class="mb-2 font-medium">
{{ $t('ai-platform.workflow.panels.common.usage') }}:
</p>
<ul class="list-inside list-disc space-y-1">
<li>
{{ $t('ai-platform.workflow.panels.dashboardDesign.usageTip1') }}
</li>
<li>
{{ $t('ai-platform.workflow.panels.dashboardDesign.usageTip2') }}
</li>
<li>
{{ $t('ai-platform.workflow.panels.dashboardDesign.usageTip3') }}
</li>
</ul>
</div>
</div>
</div>
</template>
@@ -1,165 +0,0 @@
<script setup lang="ts">
import { ref, watch } from 'vue';
import { $t } from '@vben/locales';
import { ElForm, ElFormItem, ElInput, ElInputNumber } from 'element-plus';
import ConfirmModeSelect from '../components/ConfirmModeSelect.vue';
import SmartInput from '../components/SmartInput.vue';
const props = defineProps<{
data: any;
nodeId: string;
}>();
const emit = defineEmits(['update']);
const form = ref({
label: $t('ai-platform.workflow.panels.dashboardPublish.label'),
dashboard_id: '',
menu_name: '',
menu_parent_id: '',
menu_icon: 'lucide:layout-dashboard',
menu_order: 0,
application_id: '',
require_confirmation: true,
...props.data,
});
watch(
form,
(newVal) => {
emit('update', newVal);
},
{ deep: true },
);
</script>
<template>
<div class="space-y-4">
<ElForm :model="form" label-position="top" size="small">
<ElFormItem :label="$t('ai-platform.workflow.panels.common.nodeName')">
<ElInput
v-model="form.label"
:placeholder="
$t('ai-platform.workflow.panels.dashboardPublish.placeholder')
"
/>
</ElFormItem>
<ElFormItem
:label="$t('ai-platform.workflow.panels.dashboardPublish.dashboardId')"
required
>
<SmartInput
v-model="form.dashboard_id"
:placeholder="
$t(
'ai-platform.workflow.panels.dashboardPublish.dashboardIdPlaceholder',
)
"
:current-node-id="nodeId"
/>
</ElFormItem>
<ElFormItem
:label="$t('ai-platform.workflow.panels.dashboardPublish.menuName')"
required
>
<SmartInput
v-model="form.menu_name"
:placeholder="
$t(
'ai-platform.workflow.panels.dashboardPublish.menuNamePlaceholder',
)
"
:current-node-id="nodeId"
/>
</ElFormItem>
<ElFormItem
:label="$t('ai-platform.workflow.panels.dashboardPublish.parentMenuId')"
>
<SmartInput
v-model="form.menu_parent_id"
:placeholder="
$t(
'ai-platform.workflow.panels.dashboardPublish.parentMenuIdPlaceholder',
)
"
:current-node-id="nodeId"
/>
</ElFormItem>
<ElFormItem
:label="$t('ai-platform.workflow.panels.dashboardPublish.menuIcon')"
>
<ElInput
v-model="form.menu_icon"
placeholder="lucide:layout-dashboard"
/>
</ElFormItem>
<ElFormItem
:label="$t('ai-platform.workflow.panels.dashboardPublish.menuSort')"
>
<ElInputNumber
v-model="form.menu_order"
:min="0"
:max="9999"
class="w-full"
/>
</ElFormItem>
<ElFormItem
:label="$t('ai-platform.workflow.panels.dashboardPublish.appId')"
>
<SmartInput
v-model="form.application_id"
:placeholder="
$t('ai-platform.workflow.panels.dashboardPublish.appIdPlaceholder')
"
:current-node-id="nodeId"
/>
</ElFormItem>
<ElFormItem :label="$t('ai-platform.workflow.panels.common.confirmMode')">
<ConfirmModeSelect
v-model="form.require_confirmation"
:current-node-id="nodeId"
/>
</ElFormItem>
</ElForm>
<div class="bg-muted/50 rounded-lg p-3">
<div class="text-muted-foreground text-xs">
<p class="mb-2 font-medium">
{{ $t('ai-platform.workflow.panels.common.outputVars') }}:
</p>
<ul class="list-inside list-disc space-y-1">
<li>
<code>menu_id</code> -
{{
$t('ai-platform.workflow.panels.dashboardPublish.menuIdOutput')
}}
</li>
<li>
<code>route_path</code> -
{{
$t('ai-platform.workflow.panels.dashboardPublish.routePathOutput')
}}
</li>
<li>
<code>publish_result</code> -
{{
$t(
'ai-platform.workflow.panels.dashboardPublish.publishResultOutput',
)
}}
</li>
</ul>
</div>
</div>
</div>
</template>
@@ -1,206 +0,0 @@
<script setup lang="ts">
import { ref, watch } from 'vue';
import { $t } from '@vben/locales';
import {
ElForm,
ElFormItem,
ElInput,
ElInputNumber,
ElOption,
ElSelect,
} from 'element-plus';
import ConfirmModeSelect from '../components/ConfirmModeSelect.vue';
import SmartInput from '../components/SmartInput.vue';
const props = defineProps<{ data: any; nodeId: string }>();
const emit = defineEmits(['update']);
const form = ref({
label: $t('ai-platform.workflow.panels.formBasicInfo.label'),
name: '',
code: '',
form_type: 'normal',
description: '',
sort: 0,
auto_generate_code: false,
require_confirmation: true,
...props.data,
});
watch(
form,
(val) => {
emit('update', val);
},
{ deep: true },
);
</script>
<template>
<ElForm label-position="top" size="small" class="space-y-4">
<ElFormItem :label="$t('ai-platform.workflow.panels.common.nodeName')">
<ElInput
v-model="form.label"
:placeholder="
$t('ai-platform.workflow.panels.formBasicInfo.placeholder')
"
/>
</ElFormItem>
<ElFormItem
:label="$t('ai-platform.workflow.panels.formBasicInfo.formName')"
required
>
<template #label>
<div class="flex items-center gap-2">
<span>{{
$t('ai-platform.workflow.panels.formBasicInfo.formName')
}}</span>
<span class="text-red-500">*</span>
</div>
</template>
<SmartInput
v-model="form.name"
:current-node-id="nodeId"
:placeholder="
$t('ai-platform.workflow.panels.formBasicInfo.formNamePlaceholder') +
' {{llm_basic_name}}'
"
/>
<div class="text-muted-foreground mt-1 text-xs">
{{ $t('ai-platform.workflow.panels.formBasicInfo.formNameHint')
}}{{ llm_basic_name }}
</div>
</ElFormItem>
<ElFormItem
:label="$t('ai-platform.workflow.panels.formBasicInfo.formCode')"
>
<SmartInput
v-model="form.code"
:current-node-id="nodeId"
:placeholder="
$t('ai-platform.workflow.panels.formBasicInfo.formCodePlaceholder') +
' {{llm_basic_code}}'
"
/>
<div class="text-muted-foreground mt-1 text-xs">
{{ $t('ai-platform.workflow.panels.formBasicInfo.formCodeHint') }}
</div>
</ElFormItem>
<ElFormItem
:label="$t('ai-platform.workflow.panels.formBasicInfo.autoGenCode')"
>
<ElSwitch v-model="form.auto_generate_code" />
<div class="text-muted-foreground mt-1 text-xs">
{{ $t('ai-platform.workflow.panels.formBasicInfo.autoGenCodeHint') }}
</div>
</ElFormItem>
<ElFormItem
:label="$t('ai-platform.workflow.panels.formBasicInfo.formType')"
>
<ElSelect
v-model="form.form_type"
:placeholder="
$t('ai-platform.workflow.panels.formBasicInfo.formTypePlaceholder')
"
>
<ElOption
:label="$t('ai-platform.workflow.panels.formBasicInfo.normalForm')"
value="normal"
/>
<ElOption
:label="$t('ai-platform.workflow.panels.formBasicInfo.workflowForm')"
value="workflow"
/>
</ElSelect>
</ElFormItem>
<ElFormItem
:label="$t('ai-platform.workflow.panels.formBasicInfo.formDesc')"
>
<SmartInput
v-model="form.description"
:current-node-id="nodeId"
type="textarea"
:rows="3"
:placeholder="
$t('ai-platform.workflow.panels.formBasicInfo.formDescPlaceholder')
"
/>
</ElFormItem>
<ElFormItem :label="$t('ai-platform.workflow.panels.formBasicInfo.sort')">
<ElInputNumber
v-model="form.sort"
:min="0"
:placeholder="
$t('ai-platform.workflow.panels.formBasicInfo.sortPlaceholder')
"
class="w-full"
/>
<div class="text-muted-foreground mt-1 text-xs">
{{ $t('ai-platform.workflow.panels.formBasicInfo.sortHint') }}
</div>
</ElFormItem>
<ElFormItem :label="$t('ai-platform.workflow.panels.common.confirmMode')">
<ConfirmModeSelect
v-model="form.require_confirmation"
:current-node-id="nodeId"
/>
</ElFormItem>
<!-- 输出变量说明 -->
<div
class="mt-4 rounded border border-green-200 bg-green-50 p-3 dark:border-green-800 dark:bg-green-950"
>
<div class="mb-2 font-medium text-green-700 dark:text-green-300">
{{ $t('ai-platform.workflow.panels.common.outputVars') }}
</div>
<div class="text-muted-foreground space-y-1 text-xs">
<div class="flex justify-between">
<span class="font-mono">form_basic_info</span>
<span>{{
$t('ai-platform.workflow.panels.formBasicInfo.fullConfigOutput')
}}</span>
</div>
<div class="flex justify-between">
<span class="font-mono">form_name</span>
<span>{{
$t('ai-platform.workflow.panels.formBasicInfo.formNameOutput')
}}</span>
</div>
<div class="flex justify-between">
<span class="font-mono">form_code</span>
<span>{{
$t('ai-platform.workflow.panels.formBasicInfo.formCodeOutput')
}}</span>
</div>
<div class="flex justify-between">
<span class="font-mono">form_type</span>
<span>{{
$t('ai-platform.workflow.panels.formBasicInfo.formTypeOutput')
}}</span>
</div>
<div class="flex justify-between">
<span class="font-mono">form_description</span>
<span>{{
$t('ai-platform.workflow.panels.formBasicInfo.formDescOutput')
}}</span>
</div>
<div class="flex justify-between">
<span class="font-mono">form_sort</span>
<span>{{
$t('ai-platform.workflow.panels.formBasicInfo.sortOutput')
}}</span>
</div>
</div>
</div>
</ElForm>
</template>
@@ -1,228 +0,0 @@
<script setup lang="ts">
import { ref, watch } from 'vue';
import { $t } from '@vben/locales';
import { ElForm, ElFormItem, ElInput, ElSwitch } from 'element-plus';
import SmartInput from '../components/SmartInput.vue';
const props = defineProps<{ data: any; nodeId: string }>();
const emit = defineEmits(['update']);
const form = ref({
label: $t('ai-platform.workflow.panels.formCreate.label'),
form_basic_info: '',
database_design: '',
form_ui_design: '',
list_config: '',
application_id: '',
update_if_exists: true,
...props.data,
});
watch(
form,
(val) => {
emit('update', val);
},
{ deep: true },
);
</script>
<template>
<ElForm label-position="top" size="small" class="space-y-4">
<ElFormItem :label="$t('ai-platform.workflow.panels.common.nodeName')">
<ElInput
v-model="form.label"
:placeholder="$t('ai-platform.workflow.panels.formCreate.placeholder')"
/>
</ElFormItem>
<ElFormItem>
<template #label>
<div class="flex items-center gap-2">
<span>{{
$t('ai-platform.workflow.panels.formCreate.formBasicInfo')
}}</span>
<span class="text-red-500">*</span>
<span class="text-muted-foreground text-xs">(object)</span>
</div>
</template>
<SmartInput
v-model="form.form_basic_info"
:current-node-id="nodeId"
type="textarea"
:rows="2"
placeholder="{{form_basic_info.form_basic_info}}"
/>
<div class="text-muted-foreground mt-1 text-xs">
{{ $t('ai-platform.workflow.panels.formCreate.basicInfoHint') }}
</div>
</ElFormItem>
<ElFormItem>
<template #label>
<div class="flex items-center gap-2">
<span>{{
$t('ai-platform.workflow.panels.formCreate.dbDesignConfig')
}}</span>
<span class="text-red-500">*</span>
<span class="text-muted-foreground text-xs">(object)</span>
</div>
</template>
<SmartInput
v-model="form.database_design"
:current-node-id="nodeId"
type="textarea"
:rows="2"
placeholder="{{form_database_design.database_design}}"
/>
<div class="text-muted-foreground mt-1 text-xs">
{{ $t('ai-platform.workflow.panels.formCreate.dbDesignHint') }}
</div>
</ElFormItem>
<ElFormItem>
<template #label>
<div class="flex items-center gap-2">
<span>{{
$t('ai-platform.workflow.panels.formCreate.uiDesignConfig')
}}</span>
<span class="text-red-500">*</span>
<span class="text-muted-foreground text-xs">(object)</span>
</div>
</template>
<SmartInput
v-model="form.form_ui_design"
:current-node-id="nodeId"
type="textarea"
:rows="2"
placeholder="{{form_ui_design.form_ui_design}}"
/>
<div class="text-muted-foreground mt-1 text-xs">
{{ $t('ai-platform.workflow.panels.formCreate.uiDesignHint') }}
</div>
</ElFormItem>
<ElFormItem>
<template #label>
<div class="flex items-center gap-2">
<span>{{
$t('ai-platform.workflow.panels.formCreate.listDesignConfig')
}}</span>
<span class="text-red-500">*</span>
<span class="text-muted-foreground text-xs">(object)</span>
</div>
</template>
<SmartInput
v-model="form.list_config"
:current-node-id="nodeId"
type="textarea"
:rows="2"
placeholder="{{form_list_design.list_config}}"
/>
<div class="text-muted-foreground mt-1 text-xs">
{{ $t('ai-platform.workflow.panels.formCreate.listDesignHint') }}
</div>
</ElFormItem>
<ElFormItem>
<template #label>
<div class="flex items-center gap-2">
<span>{{ $t('ai-platform.workflow.panels.formCreate.appId') }}</span>
<span class="text-muted-foreground text-xs">{{
$t('ai-platform.workflow.panels.llm.optional')
}}</span>
</div>
</template>
<SmartInput
v-model="form.application_id"
:current-node-id="nodeId"
:placeholder="
$t('ai-platform.workflow.panels.formCreate.appIdPlaceholder')
"
/>
</ElFormItem>
<ElFormItem
:label="$t('ai-platform.workflow.panels.formCreate.updateIfExists')"
>
<ElSwitch v-model="form.update_if_exists" />
<div class="text-muted-foreground mt-1 text-xs">
{{ $t('ai-platform.workflow.panels.formCreate.updateIfExistsHint') }}
</div>
</ElFormItem>
<!-- 输出变量说明 -->
<div
class="mt-4 rounded border border-green-200 bg-green-50 p-3 dark:border-green-800 dark:bg-green-950"
>
<div class="mb-2 font-medium text-green-700 dark:text-green-300">
{{ $t('ai-platform.workflow.panels.common.outputVars') }}
</div>
<div class="text-muted-foreground space-y-1 text-xs">
<div class="flex justify-between">
<span class="font-mono">form_id</span>
<span>{{
$t('ai-platform.workflow.panels.formCreate.formIdOutput')
}}</span>
</div>
<div class="flex justify-between">
<span class="font-mono">form_code</span>
<span>{{
$t('ai-platform.workflow.panels.formCreate.formCodeOutput')
}}</span>
</div>
<div class="flex justify-between">
<span class="font-mono">form_meta</span>
<span>{{
$t('ai-platform.workflow.panels.formCreate.formMetaOutput')
}}</span>
</div>
</div>
</div>
<!-- 工作流说明 -->
<div
class="mt-4 rounded border border-blue-200 bg-blue-50 p-3 dark:border-blue-800 dark:bg-blue-950"
>
<div class="mb-2 font-medium text-blue-700 dark:text-blue-300">
{{ $t('ai-platform.workflow.panels.formCreate.fullWorkflow') }}
</div>
<div class="text-muted-foreground text-xs">
<div class="flex items-center gap-1">
<span>{{
$t('ai-platform.workflow.panels.formCreate.formBasicInfo')
}}</span>
<span></span>
<span>{{
$t('ai-platform.workflow.panels.formCreate.dbDesign')
}}</span>
<span></span>
<span>{{
$t('ai-platform.workflow.panels.formCreate.dbCreate')
}}</span>
</div>
<div class="mt-1 flex items-center gap-1">
<span></span>
<span>{{
$t('ai-platform.workflow.panels.formCreate.uiDesign')
}}</span>
<span></span>
<span>{{
$t('ai-platform.workflow.panels.formCreate.listDesign')
}}</span>
<span></span>
<span class="font-medium text-blue-600 dark:text-blue-400">{{
$t('ai-platform.workflow.panels.formCreate.formCreateStep')
}}</span>
<span></span>
<span>{{
$t('ai-platform.workflow.panels.formCreate.formPublish')
}}</span>
</div>
</div>
</div>
</ElForm>
</template>
@@ -1,242 +0,0 @@
<script setup lang="ts">
import { ref, watch } from 'vue';
import { $t } from '@vben/locales';
import {
ElForm,
ElFormItem,
ElInput,
ElInputNumber,
ElSwitch,
} from 'element-plus';
import SmartInput from '../components/SmartInput.vue';
const props = defineProps<{
data: any;
nodeId: string;
nodeType: string;
}>();
const emit = defineEmits(['update']);
// 根据节点类型设置默认值
const getDefaultLabel = () => {
switch (props.nodeType) {
case 'form_data_create': {
return $t('ai-platform.workflow.panels.formData.createLabel');
}
case 'form_data_delete': {
return $t('ai-platform.workflow.panels.formData.deleteLabel');
}
case 'form_data_list': {
return $t('ai-platform.workflow.panels.formData.listLabel');
}
case 'form_data_read': {
return $t('ai-platform.workflow.panels.formData.readLabel');
}
case 'form_data_update': {
return $t('ai-platform.workflow.panels.formData.updateLabel');
}
case 'form_schema_to_llm': {
return $t('ai-platform.workflow.panels.formData.schemaToLlmLabel');
}
default: {
return $t('ai-platform.workflow.panels.formData.label');
}
}
};
const getDefaultOutputVariable = () => {
switch (props.nodeType) {
case 'form_data_create': {
return 'form_data_create_result';
}
case 'form_data_delete': {
return 'form_data_delete_result';
}
case 'form_data_list': {
return 'form_data_list';
}
case 'form_data_read': {
return 'form_data';
}
case 'form_data_update': {
return 'form_data_update_result';
}
case 'form_schema_to_llm': {
return 'llm_output_schema';
}
default: {
return 'form_data_result';
}
}
};
const form = ref({
label: getDefaultLabel(),
form_code: '',
id: '',
data: '',
page: 1,
page_size: 20,
filters: '',
sort: [],
hard_delete: false,
is_array: false,
include_fields: [],
exclude_fields: [],
output_variable: getDefaultOutputVariable(),
...props.data,
});
watch(
form,
(val) => {
emit('update', val);
},
{ deep: true },
);
// 判断是否显示某个字段
const showField = (field: string) => {
const nodeType = props.nodeType;
switch (field) {
case 'data': {
return ['form_data_create', 'form_data_update'].includes(nodeType);
}
case 'exclude_fields':
case 'include_fields':
case 'is_array': {
return nodeType === 'form_schema_to_llm';
}
case 'filters':
case 'page':
case 'page_size':
case 'sort': {
return nodeType === 'form_data_list';
}
case 'hard_delete': {
return nodeType === 'form_data_delete';
}
case 'id': {
return ['form_data_delete', 'form_data_read', 'form_data_update'].includes(nodeType);
}
default: {
return true;
}
}
};
</script>
<template>
<ElForm label-position="top" size="small" class="space-y-4">
<ElFormItem :label="$t('ai-platform.workflow.panels.common.nodeName')">
<ElInput v-model="form.label" :placeholder="getDefaultLabel()" />
</ElFormItem>
<ElFormItem :label="$t('ai-platform.workflow.panels.formData.formCode')">
<SmartInput
v-model="form.form_code"
:current-node-id="nodeId"
:placeholder="
$t('ai-platform.workflow.panels.formData.formCodeInputPlaceholder') +
' {{form_code}}'
"
/>
<div class="text-muted-foreground mt-1 text-xs">
{{ $t('ai-platform.workflow.panels.formData.formCodeInputHint') }}
</div>
</ElFormItem>
<!-- 记录ID读取/更新/删除 -->
<ElFormItem v-if="showField('id')" :label="$t('ai-platform.workflow.panels.formData.recordId')">
<SmartInput
v-model="form.id"
:current-node-id="nodeId"
:placeholder="
$t('ai-platform.workflow.panels.formData.recordIdPlaceholder') +
' {{record_id}}'
"
/>
</ElFormItem>
<!-- 数据创建/更新 -->
<ElFormItem v-if="showField('data')">
<template #label>
<div class="flex items-center gap-2">
<span>{{ $t('ai-platform.workflow.panels.formData.data') }}</span>
<span class="text-muted-foreground text-xs">(JSON)</span>
</div>
</template>
<SmartInput
v-model="form.data"
:current-node-id="nodeId"
type="textarea"
:rows="6"
:placeholder="$t('ai-platform.workflow.panels.formData.dataPlaceholder') + ' {{llm_response}}'"
/>
<div class="text-muted-foreground mt-1 text-xs">
{{ $t('ai-platform.workflow.panels.formData.dataHint') }}
</div>
</ElFormItem>
<!-- 分页列表查询 -->
<template v-if="showField('page')">
<div class="flex gap-4">
<ElFormItem :label="$t('ai-platform.workflow.panels.formData.pageNum')" class="flex-1">
<ElInputNumber v-model="form.page" :min="1" class="w-full" />
</ElFormItem>
<ElFormItem :label="$t('ai-platform.workflow.panels.formData.pageSize')" class="flex-1">
<ElInputNumber v-model="form.page_size" :min="1" :max="1000" class="w-full" />
</ElFormItem>
</div>
</template>
<!-- 过滤条件列表查询 -->
<ElFormItem v-if="showField('filters')">
<template #label>
<div class="flex items-center gap-2">
<span>{{ $t('ai-platform.workflow.panels.formData.filterConditions') }}</span>
<span class="text-muted-foreground text-xs">(JSON)</span>
</div>
</template>
<SmartInput
v-model="form.filters"
:current-node-id="nodeId"
type="textarea"
:rows="4"
placeholder="{&quot;status&quot;: &quot;active&quot;, &quot;name&quot;: {&quot;type&quot;: &quot;like&quot;, &quot;value&quot;: &quot;Zhang&quot;}}"
/>
</ElFormItem>
<!-- 硬删除删除 -->
<ElFormItem v-if="showField('hard_delete')">
<div class="flex items-center gap-2">
<ElSwitch v-model="form.hard_delete" />
<span class="text-sm">{{ $t('ai-platform.workflow.panels.formData.hardDelete') }}</span>
</div>
<div class="text-muted-foreground mt-1 text-xs">
{{ $t('ai-platform.workflow.panels.formData.hardDeleteHint') }}
</div>
</ElFormItem>
<!-- 数组模式表单转LLM结构 -->
<ElFormItem v-if="showField('is_array')">
<div class="flex items-center gap-2">
<ElSwitch v-model="form.is_array" />
<span class="text-sm">{{ $t('ai-platform.workflow.panels.formData.generateArray') }}</span>
</div>
<div class="text-muted-foreground mt-1 text-xs">
{{ $t('ai-platform.workflow.panels.formData.generateArrayHint') }}
</div>
</ElFormItem>
<ElFormItem :label="$t('ai-platform.workflow.panels.common.outputVarName')">
<ElInput v-model="form.output_variable" :placeholder="getDefaultOutputVariable()" />
<div class="text-muted-foreground mt-1 text-xs">
{{ $t('ai-platform.workflow.panels.formData.outputVarHint') }}
</div>
</ElFormItem>
</ElForm>
</template>
@@ -1,206 +0,0 @@
<script setup lang="ts">
import { ref, watch } from 'vue';
import { $t } from '@vben/locales';
import {
ElAlert,
ElForm,
ElFormItem,
ElInput,
ElOption,
ElSelect,
ElSwitch,
} from 'element-plus';
import SmartInput from '../components/SmartInput.vue';
const props = defineProps<{ data: any; nodeId: string }>();
const emit = defineEmits(['update']);
const form = ref({
label: $t('ai-platform.workflow.panels.formDbCreate.label'),
database_design: '',
db_database: '',
db_schema: '',
if_exists: 'skip',
create_schema_if_not_exists: true,
...props.data,
});
watch(
form,
(val) => {
emit('update', val);
},
{ deep: true },
);
</script>
<template>
<ElForm label-position="top" size="small" class="space-y-4">
<ElFormItem :label="$t('ai-platform.workflow.panels.common.nodeName')">
<ElInput
v-model="form.label"
:placeholder="
$t('ai-platform.workflow.panels.formDbCreate.placeholder')
"
/>
</ElFormItem>
<ElAlert type="warning" :closable="false" show-icon class="mb-4">
<template #title>
<span class="text-sm">{{
$t('ai-platform.workflow.panels.formDbCreate.cautionWarning')
}}</span>
</template>
</ElAlert>
<ElFormItem
:label="$t('ai-platform.workflow.panels.formDbCreate.dbDesignConfig')"
required
>
<template #label>
<div class="flex items-center gap-2">
<span>{{
$t('ai-platform.workflow.panels.formDbCreate.dbDesignConfig')
}}</span>
<span class="text-red-500">*</span>
</div>
</template>
<SmartInput
v-model="form.database_design"
:current-node-id="nodeId"
type="textarea"
:rows="4"
:placeholder="
$t(
'ai-platform.workflow.panels.formDbCreate.dbDesignConfigPlaceholder',
) + ' {{database_design}}'
"
/>
<div class="text-muted-foreground mt-1 text-xs">
{{ $t('ai-platform.workflow.panels.formDbCreate.dbDesignConfigHint') }}
</div>
</ElFormItem>
<ElFormItem
:label="$t('ai-platform.workflow.panels.formDbCreate.database')"
>
<SmartInput
v-model="form.db_database"
:current-node-id="nodeId"
:placeholder="
$t('ai-platform.workflow.panels.formDbCreate.databasePlaceholder')
"
/>
<div class="text-muted-foreground mt-1 text-xs">
{{ $t('ai-platform.workflow.panels.formDbCreate.databaseHint') }}
</div>
</ElFormItem>
<ElFormItem :label="$t('ai-platform.workflow.panels.formDbCreate.schema')">
<SmartInput
v-model="form.db_schema"
:current-node-id="nodeId"
:placeholder="
$t('ai-platform.workflow.panels.formDbCreate.schemaPlaceholder') +
' {{schema_name}}'
"
/>
<div class="text-muted-foreground mt-1 text-xs">
{{ $t('ai-platform.workflow.panels.formDbCreate.schemaHint') }}
</div>
</ElFormItem>
<ElFormItem
:label="$t('ai-platform.workflow.panels.formDbCreate.ifExists')"
>
<ElSelect
v-model="form.if_exists"
:placeholder="
$t('ai-platform.workflow.panels.formDbCreate.ifExistsPlaceholder')
"
>
<ElOption
:label="
$t('ai-platform.workflow.panels.formDbCreate.skipRecommended')
"
value="skip"
/>
<ElOption
:label="$t('ai-platform.workflow.panels.formDbCreate.throwError')"
value="error"
/>
<ElOption
:label="$t('ai-platform.workflow.panels.formDbCreate.replaceDanger')"
value="replace"
/>
</ElSelect>
<div class="text-muted-foreground mt-1 text-xs">
{{ $t('ai-platform.workflow.panels.formDbCreate.ifExistsHint') }}
</div>
</ElFormItem>
<ElFormItem
:label="$t('ai-platform.workflow.panels.formDbCreate.autoCreateSchema')"
>
<ElSwitch v-model="form.create_schema_if_not_exists" />
<div class="text-muted-foreground mt-1 text-xs">
{{
$t('ai-platform.workflow.panels.formDbCreate.autoCreateSchemaHint')
}}
</div>
</ElFormItem>
<!-- 输出变量说明 -->
<div
class="mt-4 rounded border border-green-200 bg-green-50 p-3 dark:border-green-800 dark:bg-green-950"
>
<div class="mb-2 font-medium text-green-700 dark:text-green-300">
{{ $t('ai-platform.workflow.panels.common.outputVars') }}
</div>
<div class="text-muted-foreground space-y-1 text-xs">
<div class="flex justify-between">
<span class="font-mono">creation_result</span>
<span>{{
$t('ai-platform.workflow.panels.formDbCreate.resultOutput')
}}</span>
</div>
<div class="flex justify-between">
<span class="font-mono">all_tables_ready</span>
<span>{{
$t('ai-platform.workflow.panels.formDbCreate.allReadyOutput')
}}</span>
</div>
<div class="flex justify-between">
<span class="font-mono">created_count</span>
<span>{{
$t('ai-platform.workflow.panels.formDbCreate.successCountOutput')
}}</span>
</div>
<div class="flex justify-between">
<span class="font-mono">error_count</span>
<span>{{
$t('ai-platform.workflow.panels.formDbCreate.errorCountOutput')
}}</span>
</div>
</div>
</div>
<!-- 警告提示 -->
<div
class="mt-4 rounded border border-orange-200 bg-orange-50 p-3 dark:border-orange-800 dark:bg-orange-950"
>
<div class="mb-2 font-medium text-orange-700 dark:text-orange-300">
{{ $t('ai-platform.workflow.panels.formDbCreate.notes') }}
</div>
<ul class="text-muted-foreground list-disc space-y-1 pl-4 text-xs">
<li>{{ $t('ai-platform.workflow.panels.formDbCreate.note1') }}</li>
<li>{{ $t('ai-platform.workflow.panels.formDbCreate.note2') }}</li>
<li>{{ $t('ai-platform.workflow.panels.formDbCreate.note3') }}</li>
<li>{{ $t('ai-platform.workflow.panels.formDbCreate.note4') }}</li>
</ul>
</div>
</ElForm>
</template>
@@ -1,360 +0,0 @@
<script setup lang="ts">
import { computed, ref, watch } from 'vue';
import { $t } from '@vben/locales';
import {
ElForm,
ElFormItem,
ElInput,
ElRadioButton,
ElRadioGroup,
ElSwitch,
} from 'element-plus';
import ConfirmModeSelect from '../components/ConfirmModeSelect.vue';
import DbConnectionSelect from '../components/DbConnectionSelect.vue';
import DbDatabaseSelect from '../components/DbDatabaseSelect.vue';
import SmartInput from '../components/SmartInput.vue';
const props = defineProps<{ data: any; nodeId: string }>();
const emit = defineEmits(['update']);
const form = ref({
label: $t('ai-platform.workflow.panels.formDbDesign.label'),
design_mode: 'main', // 'main' or 'sub'
// 主表配置
table_name: '',
fields: '',
// 从表配置
sub_table_name: '',
sub_fields: '',
parent_table: '',
foreign_key: '',
// 通用配置
db_config: 'default',
db_database: '',
db_schema: '',
db_type: 'postgresql',
auto_add_system_fields: true,
require_confirmation: true,
...props.data,
});
watch(
form,
(val) => {
emit('update', val);
},
{ deep: true },
);
const resolvedDbTypeLabel = computed(() => form.value.db_type || 'postgresql');
function handleConnectionChange(payload: {
database?: string;
dbName: string;
dbType: string;
}) {
const connectionChanged = form.value.db_config !== payload.dbName;
form.value.db_config = payload.dbName;
form.value.db_type = payload.dbType;
if (connectionChanged) {
form.value.db_database = payload.database || '';
}
}
</script>
<template>
<ElForm label-position="top" size="small" class="space-y-4">
<ElFormItem :label="$t('ai-platform.workflow.panels.common.nodeName')">
<ElInput
v-model="form.label"
:placeholder="
$t('ai-platform.workflow.panels.formDbDesign.placeholder')
"
/>
</ElFormItem>
<ElFormItem
:label="$t('ai-platform.workflow.panels.formDbDesign.designMode')"
>
<ElRadioGroup v-model="form.design_mode">
<ElRadioButton value="main">
{{ $t('ai-platform.workflow.panels.formDbDesign.mainTable') }}
</ElRadioButton>
<ElRadioButton value="sub">
{{ $t('ai-platform.workflow.panels.formDbDesign.subTable') }}
</ElRadioButton>
</ElRadioGroup>
<div class="text-muted-foreground mt-1 text-xs">
{{ $t('ai-platform.workflow.panels.formDbDesign.designModeHint') }}
</div>
</ElFormItem>
<!-- 主表配置 -->
<template v-if="form.design_mode === 'main'">
<ElFormItem>
<template #label>
<div class="flex items-center gap-2">
<span>{{
$t('ai-platform.workflow.panels.formDbDesign.tableName')
}}</span>
<span class="text-red-500">*</span>
<span class="text-muted-foreground text-xs">(string)</span>
</div>
</template>
<SmartInput
v-model="form.table_name"
:current-node-id="nodeId"
:placeholder="
$t('ai-platform.workflow.panels.formDbDesign.tableNamePlaceholder') +
' {{llm_table_name}}'
"
/>
<div class="text-muted-foreground mt-1 text-xs">
{{ $t('ai-platform.workflow.panels.formDbDesign.tableNameHint') }}
</div>
</ElFormItem>
<ElFormItem>
<template #label>
<div class="flex items-center gap-2">
<span>{{
$t('ai-platform.workflow.panels.formDbDesign.fieldList')
}}</span>
<span class="text-red-500">*</span>
<span class="text-muted-foreground text-xs">(array)</span>
</div>
</template>
<SmartInput
v-model="form.fields"
:current-node-id="nodeId"
type="textarea"
:rows="8"
:placeholder="
$t('ai-platform.workflow.panels.formDbDesign.fieldListPlaceholder') +
' {{llm_fields}}'
"
/>
<div class="text-muted-foreground mt-1 text-xs">
{{ $t('ai-platform.workflow.panels.formDbDesign.fieldListHint') }}
</div>
</ElFormItem>
</template>
<!-- 从表配置 -->
<template v-else>
<ElFormItem>
<template #label>
<div class="flex items-center gap-2">
<span>{{
$t('ai-platform.workflow.panels.formDbDesign.subTableName')
}}</span>
<span class="text-red-500">*</span>
<span class="text-muted-foreground text-xs">(string)</span>
</div>
</template>
<SmartInput
v-model="form.sub_table_name"
:current-node-id="nodeId"
:placeholder="
$t('ai-platform.workflow.panels.formDbDesign.subTableNamePlaceholder')
"
/>
<div class="text-muted-foreground mt-1 text-xs">
{{ $t('ai-platform.workflow.panels.formDbDesign.subTableNameHint') }}
</div>
</ElFormItem>
<ElFormItem>
<template #label>
<div class="flex items-center gap-2">
<span>{{
$t('ai-platform.workflow.panels.formDbDesign.relatedMainTable')
}}</span>
<span class="text-red-500">*</span>
<span class="text-muted-foreground text-xs">(string)</span>
</div>
</template>
<SmartInput
v-model="form.parent_table"
:current-node-id="nodeId"
:placeholder="
$t(
'ai-platform.workflow.panels.formDbDesign.relatedMainTablePlaceholder',
)
"
/>
<div class="text-muted-foreground mt-1 text-xs">
{{
$t('ai-platform.workflow.panels.formDbDesign.relatedMainTableHint')
}}
</div>
</ElFormItem>
<ElFormItem>
<template #label>
<div class="flex items-center gap-2">
<span>{{
$t('ai-platform.workflow.panels.formDbDesign.foreignKey')
}}</span>
<span class="text-muted-foreground text-xs">(string)</span>
</div>
</template>
<SmartInput
v-model="form.foreign_key"
:current-node-id="nodeId"
:placeholder="
$t('ai-platform.workflow.panels.formDbDesign.foreignKeyPlaceholder')
"
/>
<div class="text-muted-foreground mt-1 text-xs">
{{ $t('ai-platform.workflow.panels.formDbDesign.foreignKeyHint') }}
</div>
</ElFormItem>
<ElFormItem>
<template #label>
<div class="flex items-center gap-2">
<span>{{
$t('ai-platform.workflow.panels.formDbDesign.fieldList')
}}</span>
<span class="text-red-500">*</span>
<span class="text-muted-foreground text-xs">(array)</span>
</div>
</template>
<SmartInput
v-model="form.sub_fields"
:current-node-id="nodeId"
type="textarea"
:rows="8"
:placeholder="
$t(
'ai-platform.workflow.panels.formDbDesign.subFieldListPlaceholder',
)
"
/>
<div class="text-muted-foreground mt-1 text-xs">
{{ $t('ai-platform.workflow.panels.formDbDesign.subFieldListHint') }}
</div>
</ElFormItem>
</template>
<DbConnectionSelect
v-model="form.db_config"
write-mode
@change="handleConnectionChange"
/>
<DbDatabaseSelect
v-model="form.db_database"
:db-name="form.db_config"
:db-type="form.db_type"
:current-node-id="nodeId"
/>
<ElFormItem>
<template #label>
<div class="flex items-center gap-2">
<span>{{
$t('ai-platform.workflow.panels.formDbDesign.dbSchema')
}}</span>
<span class="text-muted-foreground text-xs">(string)</span>
</div>
</template>
<SmartInput
v-model="form.db_schema"
:current-node-id="nodeId"
:placeholder="
$t('ai-platform.workflow.panels.formDbDesign.dbSchemaPlaceholder')
"
/>
<div class="text-muted-foreground mt-1 text-xs">
{{ $t('ai-platform.workflow.panels.formDbDesign.dbSchemaHint') }}
</div>
</ElFormItem>
<ElFormItem :label="$t('ai-platform.workflow.panels.formDbDesign.dbType')">
<ElInput :model-value="resolvedDbTypeLabel" readonly />
<div class="text-muted-foreground mt-1 text-xs">
{{ $t('ai-platform.workflow.panels.formDbDesign.dbTypeHint') }}
</div>
</ElFormItem>
<ElFormItem
:label="
$t('ai-platform.workflow.panels.formDbDesign.autoAddSystemFields')
"
>
<ElSwitch v-model="form.auto_add_system_fields" />
<div class="text-muted-foreground mt-1 text-xs">
{{
$t('ai-platform.workflow.panels.formDbDesign.autoAddSystemFieldsHint')
}}
</div>
</ElFormItem>
<ElFormItem :label="$t('ai-platform.workflow.panels.common.confirmMode')">
<ConfirmModeSelect
v-model="form.require_confirmation"
:current-node-id="nodeId"
/>
</ElFormItem>
<!-- 输出变量说明 -->
<div
class="mt-4 rounded border border-green-200 bg-green-50 p-3 dark:border-green-800 dark:bg-green-950"
>
<div class="mb-2 font-medium text-green-700 dark:text-green-300">
{{ $t('ai-platform.workflow.panels.common.outputVars') }}
</div>
<div class="text-muted-foreground space-y-1 text-xs">
<div class="flex justify-between">
<span class="font-mono">database_design</span>
<span>{{
$t('ai-platform.workflow.panels.formDbDesign.fullDesignOutput')
}}</span>
</div>
<div class="flex justify-between">
<span class="font-mono">table_name</span>
<span>{{
$t('ai-platform.workflow.panels.formDbDesign.tableNameOutput')
}}</span>
</div>
<div class="flex justify-between">
<span class="font-mono">field_count</span>
<span>{{
$t('ai-platform.workflow.panels.formDbDesign.fieldCountOutput')
}}</span>
</div>
</div>
</div>
<!-- 字段配置示例 -->
<div
class="mt-4 rounded border border-blue-200 bg-blue-50 p-3 dark:border-blue-800 dark:bg-blue-950"
>
<div class="mb-2 font-medium text-blue-700 dark:text-blue-300">
{{ $t('ai-platform.workflow.panels.formDbDesign.fieldConfigExample') }}
</div>
<pre class="text-muted-foreground overflow-x-auto text-[10px]">
[
{
"name": "name",
"type": "varchar",
"maxLength": 100,
"comment": "Name",
"nullable": false
},
{
"name": "age",
"type": "int",
"comment": "Age",
"nullable": true
}
]</pre
>
</div>
</ElForm>
</template>
@@ -1,286 +0,0 @@
<script setup lang="ts">
import { ref, watch } from 'vue';
import { $t } from '@vben/locales';
import {
ElForm,
ElFormItem,
ElInput,
ElOption,
ElSelect,
ElSwitch,
} from 'element-plus';
import ConfirmModeSelect from '../components/ConfirmModeSelect.vue';
import SmartInput from '../components/SmartInput.vue';
const props = defineProps<{ data: any; nodeId: string }>();
const emit = defineEmits(['update']);
const form = ref({
label: $t('ai-platform.workflow.panels.formListDesign.label'),
form_ui_design: '',
database_design: '',
auto_query_fields: true,
auto_columns: true,
container_type: 'drawer',
page_size: 20,
show_index: true,
show_selection: true,
enable_export: true,
enable_import: false,
require_confirmation: true,
...props.data,
});
watch(
form,
(val) => {
emit('update', val);
},
{ deep: true },
);
</script>
<template>
<ElForm label-position="top" size="small" class="space-y-4">
<ElFormItem :label="$t('ai-platform.workflow.panels.common.nodeName')">
<ElInput
v-model="form.label"
:placeholder="
$t('ai-platform.workflow.panels.formListDesign.placeholder')
"
/>
</ElFormItem>
<ElFormItem>
<template #label>
<div class="flex items-center gap-2">
<span>{{
$t('ai-platform.workflow.panels.formListDesign.uiDesignConfig')
}}</span>
<span class="text-red-500">*</span>
<span class="text-muted-foreground text-xs">(object)</span>
</div>
</template>
<SmartInput
v-model="form.form_ui_design"
:current-node-id="nodeId"
type="textarea"
:rows="3"
:placeholder="
$t(
'ai-platform.workflow.panels.formListDesign.uiDesignConfigPlaceholder',
) + ' {{form_ui_design.form_ui_design}}'
"
/>
<div class="text-muted-foreground mt-1 text-xs">
{{
$t('ai-platform.workflow.panels.formListDesign.uiDesignConfigHint')
}}
</div>
</ElFormItem>
<ElFormItem>
<template #label>
<div class="flex items-center gap-2">
<span>{{
$t('ai-platform.workflow.panels.formListDesign.dbDesignConfig')
}}</span>
<span class="text-muted-foreground text-xs"
>(object,
{{ $t('ai-platform.workflow.panels.llm.optional') }})</span
>
</div>
</template>
<SmartInput
v-model="form.database_design"
:current-node-id="nodeId"
type="textarea"
:rows="2"
:placeholder="
$t(
'ai-platform.workflow.panels.formListDesign.dbDesignConfigPlaceholder',
) + ' {{form_database_design.database_design}}'
"
/>
<div class="text-muted-foreground mt-1 text-xs">
{{
$t('ai-platform.workflow.panels.formListDesign.dbDesignConfigHint')
}}
</div>
</ElFormItem>
<ElFormItem
:label="$t('ai-platform.workflow.panels.formListDesign.autoGenQuery')"
>
<ElSwitch v-model="form.auto_query_fields" />
<div class="text-muted-foreground mt-1 text-xs">
{{ $t('ai-platform.workflow.panels.formListDesign.autoGenQueryHint') }}
</div>
</ElFormItem>
<ElFormItem
:label="$t('ai-platform.workflow.panels.formListDesign.autoGenColumns')"
>
<ElSwitch v-model="form.auto_columns" />
<div class="text-muted-foreground mt-1 text-xs">
{{
$t('ai-platform.workflow.panels.formListDesign.autoGenColumnsHint')
}}
</div>
</ElFormItem>
<ElFormItem
:label="$t('ai-platform.workflow.panels.formListDesign.containerType')"
>
<ElSelect
v-model="form.container_type"
:placeholder="
$t(
'ai-platform.workflow.panels.formListDesign.containerTypePlaceholder',
)
"
>
<ElOption
:label="$t('ai-platform.workflow.panels.formListDesign.drawer')"
value="drawer"
/>
<ElOption
:label="$t('ai-platform.workflow.panels.formListDesign.dialog')"
value="dialog"
/>
<ElOption
:label="$t('ai-platform.workflow.panels.formListDesign.page')"
value="page"
/>
</ElSelect>
<div class="text-muted-foreground mt-1 text-xs">
{{ $t('ai-platform.workflow.panels.formListDesign.containerTypeHint') }}
</div>
</ElFormItem>
<ElFormItem
:label="$t('ai-platform.workflow.panels.formListDesign.pageSize')"
>
<ElSelect
v-model="form.page_size"
:placeholder="
$t('ai-platform.workflow.panels.formListDesign.pageSizePlaceholder')
"
>
<ElOption
:label="
$t('ai-platform.workflow.panels.formListDesign.perPage', {
count: 10,
})
"
:value="10"
/>
<ElOption
:label="
$t('ai-platform.workflow.panels.formListDesign.perPage', {
count: 20,
})
"
:value="20"
/>
<ElOption
:label="
$t('ai-platform.workflow.panels.formListDesign.perPage', {
count: 50,
})
"
:value="50"
/>
<ElOption
:label="
$t('ai-platform.workflow.panels.formListDesign.perPage', {
count: 100,
})
"
:value="100"
/>
</ElSelect>
</ElFormItem>
<ElFormItem
:label="$t('ai-platform.workflow.panels.formListDesign.showIndex')"
>
<ElSwitch v-model="form.show_index" />
</ElFormItem>
<ElFormItem
:label="$t('ai-platform.workflow.panels.formListDesign.showSelection')"
>
<ElSwitch v-model="form.show_selection" />
</ElFormItem>
<ElFormItem
:label="$t('ai-platform.workflow.panels.formListDesign.enableExport')"
>
<ElSwitch v-model="form.enable_export" />
</ElFormItem>
<ElFormItem
:label="$t('ai-platform.workflow.panels.formListDesign.enableImport')"
>
<ElSwitch v-model="form.enable_import" />
</ElFormItem>
<ElFormItem :label="$t('ai-platform.workflow.panels.common.confirmMode')">
<ConfirmModeSelect
v-model="form.require_confirmation"
:current-node-id="nodeId"
/>
</ElFormItem>
<!-- 输出变量说明 -->
<div
class="mt-4 rounded border border-green-200 bg-green-50 p-3 dark:border-green-800 dark:bg-green-950"
>
<div class="mb-2 font-medium text-green-700 dark:text-green-300">
{{ $t('ai-platform.workflow.panels.common.outputVars') }}
</div>
<div class="text-muted-foreground space-y-1 text-xs">
<div class="flex justify-between">
<span class="font-mono">list_config</span>
<span>{{
$t('ai-platform.workflow.panels.formListDesign.fullConfigOutput')
}}</span>
</div>
<div class="flex justify-between">
<span class="font-mono">query_field_count</span>
<span>{{
$t(
'ai-platform.workflow.panels.formListDesign.queryFieldCountOutput',
)
}}</span>
</div>
<div class="flex justify-between">
<span class="font-mono">column_count</span>
<span>{{
$t('ai-platform.workflow.panels.formListDesign.columnCountOutput')
}}</span>
</div>
</div>
</div>
<!-- 智能推断说明 -->
<div
class="mt-4 rounded border border-indigo-200 bg-indigo-50 p-3 dark:border-indigo-800 dark:bg-indigo-950"
>
<div class="mb-2 font-medium text-indigo-700 dark:text-indigo-300">
{{ $t('ai-platform.workflow.panels.formListDesign.inferRules') }}
</div>
<div class="text-muted-foreground space-y-1 text-xs">
<div> {{ $t('ai-platform.workflow.panels.formListDesign.inferRule1') }}</div>
<div> {{ $t('ai-platform.workflow.panels.formListDesign.inferRule2') }}</div>
<div> {{ $t('ai-platform.workflow.panels.formListDesign.inferRule3') }}</div>
<div> {{ $t('ai-platform.workflow.panels.formListDesign.inferRule4') }}</div>
<div> {{ $t('ai-platform.workflow.panels.formListDesign.inferRule5') }}</div>
</div>
</div>
</ElForm>
</template>
@@ -1,132 +0,0 @@
<script setup lang="ts">
import { ref, watch } from 'vue';
import { $t } from '@vben/locales';
import { ElForm, ElFormItem, ElInput } from 'element-plus';
import ConfirmModeSelect from '../components/ConfirmModeSelect.vue';
import SmartInput from '../components/SmartInput.vue';
const props = defineProps<{ data: any; nodeId: string }>();
const emit = defineEmits(['update']);
const form = ref({
label: $t('ai-platform.workflow.panels.formPublish.label'),
form_id: '',
form_code: '',
require_confirmation: true,
...props.data,
});
watch(
form,
(val) => {
emit('update', val);
},
{ deep: true },
);
</script>
<template>
<ElForm label-position="top" size="small" class="space-y-4">
<ElFormItem :label="$t('ai-platform.workflow.panels.common.nodeName')">
<ElInput
v-model="form.label"
:placeholder="$t('ai-platform.workflow.panels.formPublish.placeholder')"
/>
</ElFormItem>
<ElFormItem>
<template #label>
<div class="flex items-center gap-2">
<span>{{
$t('ai-platform.workflow.panels.formPublish.formId')
}}</span>
<span class="text-red-500">*</span>
<span class="text-muted-foreground text-xs">(string)</span>
</div>
</template>
<SmartInput
v-model="form.form_id"
:current-node-id="nodeId"
placeholder="{{form_create.form_id}}"
/>
<div class="text-muted-foreground mt-1 text-xs">
{{ $t('ai-platform.workflow.panels.formPublish.formIdHint') }}
</div>
</ElFormItem>
<ElFormItem>
<template #label>
<div class="flex items-center gap-2">
<span>{{
$t('ai-platform.workflow.panels.formPublish.formCode')
}}</span>
<span class="text-muted-foreground text-xs">{{
$t('ai-platform.workflow.panels.llm.optional')
}}</span>
</div>
</template>
<SmartInput
v-model="form.form_code"
:current-node-id="nodeId"
placeholder="{{form_create.form_code}}"
/>
<div class="text-muted-foreground mt-1 text-xs">
{{ $t('ai-platform.workflow.panels.formPublish.formCodeHint') }}
</div>
</ElFormItem>
<ElFormItem :label="$t('ai-platform.workflow.panels.common.confirmMode')">
<ConfirmModeSelect
v-model="form.require_confirmation"
:current-node-id="nodeId"
/>
</ElFormItem>
<!-- 输出变量说明 -->
<div
class="mt-4 rounded border border-green-200 bg-green-50 p-3 dark:border-green-800 dark:bg-green-950"
>
<div class="mb-2 font-medium text-green-700 dark:text-green-300">
{{ $t('ai-platform.workflow.panels.common.outputVars') }}
</div>
<div class="text-muted-foreground space-y-1 text-xs">
<div class="flex justify-between">
<span class="font-mono">menu_id</span>
<span>{{
$t('ai-platform.workflow.panels.formPublish.menuIdOutput')
}}</span>
</div>
<div class="flex justify-between">
<span class="font-mono">route_path</span>
<span>{{
$t('ai-platform.workflow.panels.formPublish.routePathOutput')
}}</span>
</div>
<div class="flex justify-between">
<span class="font-mono">publish_result</span>
<span>{{
$t('ai-platform.workflow.panels.formPublish.publishResultOutput')
}}</span>
</div>
</div>
</div>
<!-- 工作流说明 -->
<div
class="mt-4 rounded border border-blue-200 bg-blue-50 p-3 dark:border-blue-800 dark:bg-blue-950"
>
<div class="mb-2 font-medium text-blue-700 dark:text-blue-300">
{{ $t('ai-platform.workflow.panels.common.usage') }}
</div>
<div class="text-muted-foreground text-xs">
<p>{{ $t('ai-platform.workflow.panels.formPublish.usageTip1') }}</p>
<p class="mt-1">
{{ $t('ai-platform.workflow.panels.formPublish.usageTip2') }}
</p>
</div>
</div>
</ElForm>
</template>
@@ -1,248 +0,0 @@
<script setup lang="ts">
import { ref, watch } from 'vue';
import { $t } from '@vben/locales';
import {
ElForm,
ElFormItem,
ElInput,
ElInputNumber,
ElOption,
ElSelect,
ElSwitch,
} from 'element-plus';
import ConfirmModeSelect from '../components/ConfirmModeSelect.vue';
import SmartInput from '../components/SmartInput.vue';
const props = defineProps<{ data: any; nodeId: string }>();
const emit = defineEmits(['update']);
const form = ref({
label: $t('ai-platform.workflow.panels.formUIDesign.label'),
database_design: '',
form_name: '',
form_code: '',
layout_mode: 'auto',
label_width: 120,
enable_grouping: true,
hide_system_fields: true,
require_confirmation: true,
...props.data,
});
watch(
form,
(val) => {
emit('update', val);
},
{ deep: true },
);
</script>
<template>
<ElForm label-position="top" size="small" class="space-y-4">
<ElFormItem :label="$t('ai-platform.workflow.panels.common.nodeName')">
<ElInput
v-model="form.label"
:placeholder="
$t('ai-platform.workflow.panels.formUIDesign.placeholder')
"
/>
</ElFormItem>
<ElFormItem>
<template #label>
<div class="flex items-center gap-2">
<span>{{
$t('ai-platform.workflow.panels.formUIDesign.dbDesignConfig')
}}</span>
<span class="text-red-500">*</span>
<span class="text-muted-foreground text-xs">(object)</span>
</div>
</template>
<SmartInput
v-model="form.database_design"
:current-node-id="nodeId"
type="textarea"
:rows="3"
:placeholder="
$t(
'ai-platform.workflow.panels.formUIDesign.dbDesignConfigPlaceholder',
) + ' {{form_database_design.database_design}}'
"
/>
<div class="text-muted-foreground mt-1 text-xs">
{{ $t('ai-platform.workflow.panels.formUIDesign.dbDesignConfigHint') }}
</div>
</ElFormItem>
<ElFormItem>
<template #label>
<div class="flex items-center gap-2">
<span>{{
$t('ai-platform.workflow.panels.formUIDesign.formName')
}}</span>
<span class="text-muted-foreground text-xs">(string)</span>
</div>
</template>
<SmartInput
v-model="form.form_name"
:current-node-id="nodeId"
:placeholder="
$t('ai-platform.workflow.panels.formUIDesign.formNamePlaceholder')
"
/>
<div class="text-muted-foreground mt-1 text-xs">
{{ $t('ai-platform.workflow.panels.formUIDesign.formNameHint') }}
</div>
</ElFormItem>
<ElFormItem>
<template #label>
<div class="flex items-center gap-2">
<span>{{
$t('ai-platform.workflow.panels.formUIDesign.formCode')
}}</span>
<span class="text-muted-foreground text-xs">(string)</span>
</div>
</template>
<SmartInput
v-model="form.form_code"
:current-node-id="nodeId"
:placeholder="
$t('ai-platform.workflow.panels.formUIDesign.formCodePlaceholder')
"
/>
<div class="text-muted-foreground mt-1 text-xs">
{{ $t('ai-platform.workflow.panels.formUIDesign.formCodeHint') }}
</div>
</ElFormItem>
<ElFormItem
:label="$t('ai-platform.workflow.panels.formUIDesign.layoutMode')"
>
<ElSelect
v-model="form.layout_mode"
:placeholder="
$t('ai-platform.workflow.panels.formUIDesign.layoutModePlaceholder')
"
>
<ElOption
:label="$t('ai-platform.workflow.panels.formUIDesign.layoutAuto')"
value="auto"
/>
<ElOption
:label="$t('ai-platform.workflow.panels.formUIDesign.layoutSingle')"
value="single"
/>
<ElOption
:label="$t('ai-platform.workflow.panels.formUIDesign.layoutDouble')"
value="double"
/>
<ElOption
:label="$t('ai-platform.workflow.panels.formUIDesign.layoutTriple')"
value="triple"
/>
</ElSelect>
<div class="text-muted-foreground mt-1 text-xs">
{{ $t('ai-platform.workflow.panels.formUIDesign.layoutAutoHint') }}
</div>
</ElFormItem>
<ElFormItem
:label="$t('ai-platform.workflow.panels.formUIDesign.labelWidth')"
>
<ElInputNumber
v-model="form.label_width"
:min="60"
:max="200"
:step="10"
controls-position="right"
/>
<div class="text-muted-foreground mt-1 text-xs">
{{ $t('ai-platform.workflow.panels.formUIDesign.labelWidthHint') }}
</div>
</ElFormItem>
<ElFormItem
:label="$t('ai-platform.workflow.panels.formUIDesign.enableGrouping')"
>
<ElSwitch v-model="form.enable_grouping" />
<div class="text-muted-foreground mt-1 text-xs">
{{ $t('ai-platform.workflow.panels.formUIDesign.enableGroupingHint') }}
</div>
</ElFormItem>
<ElFormItem
:label="$t('ai-platform.workflow.panels.formUIDesign.hideSystemFields')"
>
<ElSwitch v-model="form.hide_system_fields" />
<div class="text-muted-foreground mt-1 text-xs">
{{
$t('ai-platform.workflow.panels.formUIDesign.hideSystemFieldsHint')
}}
</div>
</ElFormItem>
<ElFormItem :label="$t('ai-platform.workflow.panels.common.confirmMode')">
<ConfirmModeSelect
v-model="form.require_confirmation"
:current-node-id="nodeId"
/>
</ElFormItem>
<!-- 输出变量说明 -->
<div
class="mt-4 rounded border border-green-200 bg-green-50 p-3 dark:border-green-800 dark:bg-green-950"
>
<div class="mb-2 font-medium text-green-700 dark:text-green-300">
{{ $t('ai-platform.workflow.panels.common.outputVars') }}
</div>
<div class="text-muted-foreground space-y-1 text-xs">
<div class="flex justify-between">
<span class="font-mono">form_ui_design</span>
<span>{{
$t('ai-platform.workflow.panels.formUIDesign.fullConfigOutput')
}}</span>
</div>
<div class="flex justify-between">
<span class="font-mono">form_code</span>
<span>{{
$t('ai-platform.workflow.panels.formUIDesign.formCodeOutput')
}}</span>
</div>
<div class="flex justify-between">
<span class="font-mono">field_count</span>
<span>{{
$t('ai-platform.workflow.panels.formUIDesign.fieldCountOutput')
}}</span>
</div>
<div class="flex justify-between">
<span class="font-mono">group_count</span>
<span>{{
$t('ai-platform.workflow.panels.formUIDesign.groupCountOutput')
}}</span>
</div>
</div>
</div>
<!-- 智能映射说明 -->
<div
class="mt-4 rounded border border-purple-200 bg-purple-50 p-3 dark:border-purple-800 dark:bg-purple-950"
>
<div class="mb-2 font-medium text-purple-700 dark:text-purple-300">
{{ $t('ai-platform.workflow.panels.formUIDesign.mappingRules') }}
</div>
<div class="text-muted-foreground space-y-1 text-xs">
<div> {{ $t('ai-platform.workflow.panels.formUIDesign.mappingRule1') }}</div>
<div> {{ $t('ai-platform.workflow.panels.formUIDesign.mappingRule2') }}</div>
<div> {{ $t('ai-platform.workflow.panels.formUIDesign.mappingRule3') }}</div>
<div> {{ $t('ai-platform.workflow.panels.formUIDesign.mappingRule4') }}</div>
<div> {{ $t('ai-platform.workflow.panels.formUIDesign.mappingRule5') }}</div>
<div> {{ $t('ai-platform.workflow.panels.formUIDesign.mappingRule6') }}</div>
</div>
</div>
</ElForm>
</template>