diff --git a/apps/web-antd/src/views/ai/chat/manager/index.vue b/apps/web-antd/src/views/ai/chat/manager/index.vue
index 48d7d5357..69c4e844b 100644
--- a/apps/web-antd/src/views/ai/chat/manager/index.vue
+++ b/apps/web-antd/src/views/ai/chat/manager/index.vue
@@ -3,7 +3,7 @@ import { ref } from 'vue';
import { DocAlert, Page } from '@vben/common-ui';
-import { Card, Tabs } from 'ant-design-vue';
+import { Tabs } from 'ant-design-vue';
import ChatConversationList from './modules/conversation-list.vue';
import ChatMessageList from './modules/message-list.vue';
@@ -17,15 +17,13 @@ const activeTabName = ref('conversation');
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
diff --git a/apps/web-antd/src/views/ai/chat/manager/modules/conversation-list.vue b/apps/web-antd/src/views/ai/chat/manager/modules/conversation-list.vue
index 90adc32f8..6bfe70216 100644
--- a/apps/web-antd/src/views/ai/chat/manager/modules/conversation-list.vue
+++ b/apps/web-antd/src/views/ai/chat/manager/modules/conversation-list.vue
@@ -23,7 +23,7 @@ function handleRefresh() {
gridApi.query();
}
-/** 删除消息 */
+/** 删除对话 */
async function handleDelete(row: AiChatConversationApi.ChatConversation) {
const hideLoading = message.loading({
content: $t('ui.actionMessage.deleting', [row.id]),
@@ -72,9 +72,6 @@ const [Grid, gridApi] = useVbenVxeGrid({
-
-
-
+import { ref } from 'vue';
+
+import { DocAlert, Page } from '@vben/common-ui';
+
+import { ElTabs } from 'element-plus';
+
+import ChatConversationList from './modules/conversation-list.vue';
+import ChatMessageList from './modules/message-list.vue';
+
+const activeTabName = ref('conversation');
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/apps/web-ele/src/views/ai/chat/manager/modules/conversation-list.vue b/apps/web-ele/src/views/ai/chat/manager/modules/conversation-list.vue
new file mode 100644
index 000000000..b6ea3dcc9
--- /dev/null
+++ b/apps/web-ele/src/views/ai/chat/manager/modules/conversation-list.vue
@@ -0,0 +1,93 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/apps/web-ele/src/views/ai/chat/manager/modules/message-list.vue b/apps/web-ele/src/views/ai/chat/manager/modules/message-list.vue
new file mode 100644
index 000000000..f5682141b
--- /dev/null
+++ b/apps/web-ele/src/views/ai/chat/manager/modules/message-list.vue
@@ -0,0 +1,90 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/apps/web-ele/src/views/ai/image/manager/data.ts b/apps/web-ele/src/views/ai/image/manager/data.ts
new file mode 100644
index 000000000..68cc3c4ee
--- /dev/null
+++ b/apps/web-ele/src/views/ai/image/manager/data.ts
@@ -0,0 +1,180 @@
+import type { VbenFormSchema } from '#/adapter/form';
+import type { VxeTableGridOptions } from '#/adapter/vxe-table';
+import type { SystemUserApi } from '#/api/system/user';
+
+import { DICT_TYPE } from '@vben/constants';
+import { getDictOptions } from '@vben/hooks';
+
+import { getSimpleUserList } from '#/api/system/user';
+import { getRangePickerDefaultProps } from '#/utils';
+
+let userList: SystemUserApi.User[] = [];
+async function getUserData() {
+ userList = await getSimpleUserList();
+}
+
+getUserData();
+
+/** 列表的搜索表单 */
+export function useGridFormSchema(): VbenFormSchema[] {
+ return [
+ {
+ fieldName: 'userId',
+ label: '用户编号',
+ component: 'ApiSelect',
+ componentProps: {
+ api: getSimpleUserList,
+ labelField: 'nickname',
+ valueField: 'id',
+ placeholder: '请选择用户编号',
+ clearable: true,
+ },
+ },
+ {
+ fieldName: 'platform',
+ label: '平台',
+ component: 'Select',
+ componentProps: {
+ placeholder: '请选择平台',
+ clearable: true,
+ options: getDictOptions(DICT_TYPE.AI_PLATFORM, 'string'),
+ },
+ },
+ {
+ fieldName: 'status',
+ label: '绘画状态',
+ component: 'Select',
+ componentProps: {
+ placeholder: '请选择绘画状态',
+ clearable: true,
+ options: getDictOptions(DICT_TYPE.AI_IMAGE_STATUS, 'number'),
+ },
+ },
+ {
+ fieldName: 'publicStatus',
+ label: '是否发布',
+ component: 'Select',
+ componentProps: {
+ placeholder: '请选择是否发布',
+ clearable: true,
+ options: getDictOptions(DICT_TYPE.INFRA_BOOLEAN_STRING, 'boolean'),
+ },
+ },
+ {
+ fieldName: 'createTime',
+ label: '创建时间',
+ component: 'RangePicker',
+ componentProps: {
+ ...getRangePickerDefaultProps(),
+ allowClear: true,
+ },
+ },
+ ];
+}
+
+/** 列表的字段 */
+export function useGridColumns(
+ onPublicStatusChange?: (
+ newStatus: boolean,
+ row: any,
+ ) => PromiseLike,
+): VxeTableGridOptions['columns'] {
+ return [
+ {
+ field: 'id',
+ title: '编号',
+ minWidth: 180,
+ fixed: 'left',
+ },
+ {
+ field: 'picUrl',
+ title: '图片',
+ minWidth: 110,
+ fixed: 'left',
+ cellRender: {
+ name: 'CellImage',
+ },
+ },
+ {
+ field: 'userId',
+ title: '用户',
+ minWidth: 180,
+ formatter: ({ cellValue }) =>
+ userList.find((user) => user.id === cellValue)?.nickname || '-',
+ },
+ {
+ field: 'platform',
+ title: '平台',
+ minWidth: 120,
+ cellRender: {
+ name: 'CellDict',
+ props: { type: DICT_TYPE.AI_PLATFORM },
+ },
+ },
+ {
+ field: 'model',
+ title: '模型',
+ minWidth: 180,
+ },
+ {
+ field: 'status',
+ title: '绘画状态',
+ minWidth: 100,
+ cellRender: {
+ name: 'CellDict',
+ props: { type: DICT_TYPE.AI_IMAGE_STATUS },
+ },
+ },
+ {
+ minWidth: 100,
+ title: '是否发布',
+ field: 'publicStatus',
+ align: 'center',
+ cellRender: {
+ attrs: { beforeChange: onPublicStatusChange },
+ name: 'CellSwitch',
+ props: {
+ activeValue: true,
+ inactiveValue: false,
+ },
+ },
+ },
+ {
+ field: 'prompt',
+ title: '提示词',
+ minWidth: 180,
+ },
+ {
+ field: 'createTime',
+ title: '创建时间',
+ minWidth: 180,
+ formatter: 'formatDateTime',
+ },
+ {
+ field: 'width',
+ title: '宽度',
+ minWidth: 180,
+ },
+ {
+ field: 'height',
+ title: '高度',
+ minWidth: 180,
+ },
+ {
+ field: 'errorMessage',
+ title: '错误信息',
+ minWidth: 180,
+ },
+ {
+ field: 'taskId',
+ title: '任务编号',
+ minWidth: 180,
+ },
+ {
+ title: '操作',
+ width: 130,
+ fixed: 'right',
+ slots: { default: 'actions' },
+ },
+ ];
+}
diff --git a/apps/web-ele/src/views/ai/image/manager/index.vue b/apps/web-ele/src/views/ai/image/manager/index.vue
new file mode 100644
index 000000000..576490053
--- /dev/null
+++ b/apps/web-ele/src/views/ai/image/manager/index.vue
@@ -0,0 +1,116 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/apps/web-ele/src/views/ai/music/manager/data.ts b/apps/web-ele/src/views/ai/music/manager/data.ts
new file mode 100644
index 000000000..7b5c63a32
--- /dev/null
+++ b/apps/web-ele/src/views/ai/music/manager/data.ts
@@ -0,0 +1,202 @@
+import type { VbenFormSchema } from '#/adapter/form';
+import type { VxeTableGridOptions } from '#/adapter/vxe-table';
+import type { SystemUserApi } from '#/api/system/user';
+
+import { DICT_TYPE } from '@vben/constants';
+import { getDictOptions } from '@vben/hooks';
+
+import { getSimpleUserList } from '#/api/system/user';
+import { getRangePickerDefaultProps } from '#/utils';
+
+/** 关联数据 */
+let userList: SystemUserApi.User[] = [];
+getSimpleUserList().then((data) => (userList = data));
+
+/** 列表的搜索表单 */
+export function useGridFormSchema(): VbenFormSchema[] {
+ return [
+ {
+ fieldName: 'userId',
+ label: '用户编号',
+ component: 'ApiSelect',
+ componentProps: {
+ api: getSimpleUserList,
+ labelField: 'nickname',
+ valueField: 'id',
+ placeholder: '请选择用户编号',
+ clearable: true,
+ },
+ },
+ {
+ fieldName: 'title',
+ label: '音乐名称',
+ component: 'Input',
+ componentProps: {
+ placeholder: '请输入音乐名称',
+ clearable: true,
+ },
+ },
+ {
+ fieldName: 'status',
+ label: '绘画状态',
+ component: 'Select',
+ componentProps: {
+ placeholder: '请选择绘画状态',
+ clearable: true,
+ options: getDictOptions(DICT_TYPE.AI_MUSIC_STATUS, 'number'),
+ },
+ },
+ {
+ fieldName: 'generateMode',
+ label: '生成模式',
+ component: 'Select',
+ componentProps: {
+ placeholder: '请选择生成模式',
+ clearable: true,
+ options: getDictOptions(DICT_TYPE.AI_GENERATE_MODE, 'number'),
+ },
+ },
+ {
+ fieldName: 'createTime',
+ label: '创建时间',
+ component: 'RangePicker',
+ componentProps: {
+ ...getRangePickerDefaultProps(),
+ allowClear: true,
+ },
+ },
+ {
+ fieldName: 'publicStatus',
+ label: '是否发布',
+ component: 'Select',
+ componentProps: {
+ placeholder: '请选择是否发布',
+ clearable: true,
+ options: getDictOptions(DICT_TYPE.INFRA_BOOLEAN_STRING, 'boolean'),
+ },
+ },
+ ];
+}
+
+/** 列表的字段 */
+export function useGridColumns(
+ onPublicStatusChange?: (
+ newStatus: boolean,
+ row: any,
+ ) => PromiseLike,
+): VxeTableGridOptions['columns'] {
+ return [
+ {
+ field: 'id',
+ title: '编号',
+ minWidth: 180,
+ fixed: 'left',
+ },
+ {
+ title: '音乐名称',
+ minWidth: 180,
+ fixed: 'left',
+ field: 'title',
+ },
+ {
+ minWidth: 180,
+ title: '用户',
+ field: 'userId',
+ formatter: ({ cellValue }) => {
+ return userList.find((user) => user.id === cellValue)?.nickname || '-';
+ },
+ },
+ {
+ field: 'status',
+ title: '音乐状态',
+ minWidth: 100,
+ cellRender: {
+ name: 'CellDict',
+ props: { type: DICT_TYPE.AI_MUSIC_STATUS },
+ },
+ },
+ {
+ field: 'model',
+ title: '模型',
+ minWidth: 180,
+ },
+ {
+ title: '内容',
+ minWidth: 180,
+ slots: { default: 'content' },
+ },
+ {
+ field: 'duration',
+ title: '时长(秒)',
+ minWidth: 100,
+ },
+ {
+ field: 'prompt',
+ title: '提示词',
+ minWidth: 180,
+ },
+ {
+ field: 'lyric',
+ title: '歌词',
+ minWidth: 180,
+ },
+ {
+ field: 'gptDescriptionPrompt',
+ title: '描述',
+ minWidth: 180,
+ },
+ {
+ field: 'generateMode',
+ title: '生成模式',
+ minWidth: 100,
+ cellRender: {
+ name: 'CellDict',
+ props: { type: DICT_TYPE.AI_GENERATE_MODE },
+ },
+ },
+ {
+ field: 'tags',
+ title: '风格标签',
+ minWidth: 180,
+ cellRender: {
+ name: 'CellTags',
+ },
+ },
+ {
+ minWidth: 100,
+ title: '是否发布',
+ field: 'publicStatus',
+ align: 'center',
+ cellRender: {
+ attrs: { beforeChange: onPublicStatusChange },
+ name: 'CellSwitch',
+ props: {
+ activeValue: true,
+ inactiveValue: false,
+ },
+ },
+ },
+ {
+ field: 'taskId',
+ title: '任务编号',
+ minWidth: 180,
+ },
+ {
+ field: 'errorMessage',
+ title: '错误信息',
+ minWidth: 180,
+ },
+ {
+ field: 'createTime',
+ title: '创建时间',
+ minWidth: 180,
+ formatter: 'formatDateTime',
+ },
+ {
+ title: '操作',
+ width: 130,
+ fixed: 'right',
+ slots: { default: 'actions' },
+ },
+ ];
+}
diff --git a/apps/web-ele/src/views/ai/music/manager/index.vue b/apps/web-ele/src/views/ai/music/manager/index.vue
new file mode 100644
index 000000000..9095e1b5f
--- /dev/null
+++ b/apps/web-ele/src/views/ai/music/manager/index.vue
@@ -0,0 +1,152 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 音乐
+
+
+ 视频
+
+
+ 封面
+
+
+
+
+
+
+
+