From ba0ae9b9efdc54421134d559233a2f4dbc409380 Mon Sep 17 00:00:00 2001 From: potato <171122@qq.com> Date: Wed, 30 Oct 2024 16:30:30 +0800 Subject: [PATCH] 123123 --- src/data/i18n.ts | 18 +++++++++++++++++- src/entities/Comment.ts | 22 ++++++++++++++++++++++ src/features/Console.ts | 27 +++++++++++++++------------ src/locales/menu/zh_CN.json | 3 ++- 4 files changed, 56 insertions(+), 14 deletions(-) create mode 100644 src/entities/Comment.ts diff --git a/src/data/i18n.ts b/src/data/i18n.ts index c85141d..e6dd32c 100644 --- a/src/data/i18n.ts +++ b/src/data/i18n.ts @@ -328,7 +328,8 @@ const i18ns: I18n[] = [ "userManage": "用户管理", "relationManage": "关系管理", "consoleHome": "控制台首页", - "labelManage": "标签管理" + "labelManage": "标签管理", + "conmmentManage": "评论管理" } }, { @@ -549,6 +550,21 @@ const i18ns: I18n[] = [ } } }, + { + id: "f70261a2fc23af2a9f459353e5ac1ea3", + namespace: "comment", + language: "zh-CN", + module: "", + position: "oak-app-domain/Comment", + data: { + "name": "评论", + "attr": { + "creator": "创建者", + "content": "内容", + "essay": "文章" + } + } + }, { id: "b06ea1d96db9f0a2d2f3ff3ad966c9c5", namespace: "domain", diff --git a/src/entities/Comment.ts b/src/entities/Comment.ts new file mode 100644 index 0000000..dff4ec9 --- /dev/null +++ b/src/entities/Comment.ts @@ -0,0 +1,22 @@ +import { Schema as Essay } from './Essay'; +import { EntityDesc, EntityShape } from 'oak-domain/lib/types'; +import { String } from 'oak-domain/lib/types/DataType'; +import { Schema as User } from 'oak-general-business/lib/entities/User'; +//Comment.ToDoIdSubQuery +export interface Schema extends EntityShape { + creator: User; + content: String<1024>; + essay: Essay; +} +export const entityDesc: EntityDesc = { + locales: { + zh_CN: { + name: '评论', + attr: { + creator: '创建者', + content: '内容', + essay: '文章', + }, + }, + }, +}; diff --git a/src/features/Console.ts b/src/features/Console.ts index d6e5a8b..0be08ec 100644 --- a/src/features/Console.ts +++ b/src/features/Console.ts @@ -1,3 +1,4 @@ +import { message } from 'antd'; import BaseConsole, { Menu } from 'oak-frontend-base/es/features/console'; import { EntityDict } from '@project/oak-app-domain'; import { groupBy } from 'oak-domain/lib/utils/lodash'; @@ -38,25 +39,22 @@ const menus: IMenu[] = [ name: 'consoleHome', icon: 'workbench', url: '/home', - destEntity: 'userRelation', + destEntity: '', order: 0, - actions: ['select'], }, { name: 'userManage', icon: 'addpeople', url: '/userRelation/manage', parent: 'System', - destEntity: 'userRelation', - actions: ['select'], + destEntity: '', }, { name: 'relationManage', icon: 'share', url: '/relation/entityList', parent: 'System', - destEntity: 'userRelation', - actions: ['select'], + destEntity: '', }, // category { @@ -64,16 +62,14 @@ const menus: IMenu[] = [ icon: 'stealth', url: '/category/list', order: 2, - destEntity: 'userRelation', - actions: ['select'], + destEntity: '', }, { name: 'essayManage', icon: 'barrage', url: '/essay/list', order: 3, - destEntity: 'userRelation', - actions: ['select'], + destEntity: '', }, // 标签关联 { @@ -81,9 +77,16 @@ const menus: IMenu[] = [ icon: 'accessory', url: '/label/list', order: 4, - destEntity: 'userRelation', - actions: ['select'], + destEntity: '', }, + //评论管理 + { + name: 'commentManage', + icon: 'message', + url:'/comment/list', + destEntity: '', + order:5, + } ]; export default class Console extends BaseConsole { diff --git a/src/locales/menu/zh_CN.json b/src/locales/menu/zh_CN.json index cd10c0b..b794d6c 100644 --- a/src/locales/menu/zh_CN.json +++ b/src/locales/menu/zh_CN.json @@ -5,5 +5,6 @@ "userManage": "用户管理", "relationManage": "关系管理", "consoleHome" : "控制台首页", - "labelManage": "标签管理" + "labelManage": "标签管理", + "conmmentManage":"评论管理" }