diff --git a/apps/web-antd/src/api/core/log.ts b/apps/web-antd/src/api/core/log.ts index d5c2a3b..cc22dd3 100644 --- a/apps/web-antd/src/api/core/log.ts +++ b/apps/web-antd/src/api/core/log.ts @@ -9,6 +9,14 @@ export interface UserLogAssetParam { Event?: string; PageSize: number; CurrentPage: number; + AppId?: number; +} +export interface UserLogOrder{ + Id: number, + Time: number, + Type: number, + Diff: number, + ChessId: string, } export interface UserLogInfo{ @@ -27,13 +35,6 @@ export interface UserLogInfo{ Order:UserLogOrder[], } -export interface UserLogOrder{ - Id: number, - Time: number, - Type: number, - Diff: number, - ChessId: string, -} export interface UserOrder{ Id: number, @@ -63,4 +64,4 @@ export async function getUserlogInfoApi(data : UserLogAssetParam) { export async function getUserlogOrderApi(data : UserLogAssetParam) { return requestClient.post('/log/order', data); } - \ No newline at end of file + diff --git a/apps/web-antd/src/api/core/mail.ts b/apps/web-antd/src/api/core/mail.ts new file mode 100644 index 0000000..f925bb1 --- /dev/null +++ b/apps/web-antd/src/api/core/mail.ts @@ -0,0 +1,38 @@ + +import { requestClient } from '#/api/request'; + +export interface MailData { + AppId : number; + ServerId: number; + PageSize?: number; + CurrentPage?: number; + mail_id?: number; + title: string; + content: string; + items : string; + start_time: number; + end_time: number; + register_time: number; + mail_type: number; + to_uids :string; + create_time?: number; +} + +export interface MailListParam { + AppId : number; + ServerId: number; + PageSize: number; + CurrentPage: number; +} + +export async function getMailListApi(p:MailListParam) { + return requestClient.post('/mail/list', p); +} + +export async function addMailApi(data:MailData) { + return requestClient.post('/mail/send', data); +} + +export async function deleteMailApi(AppId:number, ServerId:number, mail_id:number) { + return requestClient.post('/mail/delete', {mail_id:mail_id, AppId:AppId, ServerId:ServerId}); +} \ No newline at end of file diff --git a/apps/web-antd/src/api/core/server.ts b/apps/web-antd/src/api/core/server.ts index 8ad3ad7..dd90881 100644 --- a/apps/web-antd/src/api/core/server.ts +++ b/apps/web-antd/src/api/core/server.ts @@ -16,22 +16,42 @@ export interface ServerData { ServerName: string; Status: number; OpenServerTime: number; + StartTime?: number; + PlayerNum?: number; Loading?:boolean; + Reload?:boolean; +} + +export interface serverParam { + AppId: number; + Type?: number; } export async function getAppListApi(){ return requestClient.post('/server/list'); } -export async function getServerListApi(AppId: number){ - return requestClient.post('/server/serverList', {AppId: AppId}); +export async function getServerListApi(P: serverParam){ + return requestClient.post('/server/serverList', P, {timeout: 120000}); +} + +export async function updateAppApi(AppId: number){ + return requestClient.post('/server/updateApp', {AppId: AppId}, {timeout: 120000}); } export async function releaseApp(appId: number, appName: string){ return requestClient.post(`/server/release`, {AppId: appId, AppName: appName}, {timeout: 120000}); } -export async function addServer(AppId:number, ServerId:number, ServerName: string, Status: number){ - return requestClient.post(`/server/addServer`, {AppId:AppId, ServerId: ServerId, ServerName: ServerName, Status: Status}); +export async function restartServer(appId: number, serverId: number, serverName: string){ + return requestClient.post(`/server/restart`, {AppId: appId, ServerId: serverId, ServerName: serverName}, {timeout: 120000}); +} + +export async function reloadServer(appId: number, serverId: number, serverName: string){ + return requestClient.post(`/server/reload`, {AppId: appId, ServerId: serverId, ServerName: serverName}, {timeout: 120000}); +} + +export async function addServer(AppId:number, ServerId:number, ServerName: string, Status: number, OpenServerTime: number){ + return requestClient.post(`/server/addServer`, {AppId:AppId, ServerId: ServerId, ServerName: ServerName, Status: Status, OpenServerTime: OpenServerTime}); } diff --git a/apps/web-antd/src/api/core/statistics.ts b/apps/web-antd/src/api/core/statistics.ts new file mode 100644 index 0000000..9469c2c --- /dev/null +++ b/apps/web-antd/src/api/core/statistics.ts @@ -0,0 +1,19 @@ + +import { requestClient } from '#/api/request'; + +export interface OperationParam{ + AppId: number; + ServerList?: number[]; +} + +export async function getStatisticsLevel(data : OperationParam) { + return requestClient.post('/statistics/level', data); +} + +export async function getstatisticsInfo(data : OperationParam) { + return requestClient.post('/statistics/info', data, {timeout: 120000}); +} + +export async function getstatisticsHeat(data : OperationParam) { + return requestClient.post('/statistics/heat', data, {timeout: 120000}); +} \ No newline at end of file diff --git a/apps/web-antd/src/api/core/user.ts b/apps/web-antd/src/api/core/user.ts index d657330..075aad4 100644 --- a/apps/web-antd/src/api/core/user.ts +++ b/apps/web-antd/src/api/core/user.ts @@ -9,6 +9,7 @@ export interface UserData { } export interface UserListParam { Id: number; + ServerId: number; pageSize: number; currentPage: number; } diff --git a/apps/web-antd/src/locales/langs/zh-CN/page.json b/apps/web-antd/src/locales/langs/zh-CN/page.json index 3aa4189..5e7e30a 100644 --- a/apps/web-antd/src/locales/langs/zh-CN/page.json +++ b/apps/web-antd/src/locales/langs/zh-CN/page.json @@ -18,6 +18,11 @@ "eventlog": "事件日志", "orderlog": "订单日志" }, + "operation":{ + "title": "运营管理", + "level": "等级分布", + "mail": "邮件管理" + }, "log":{ "event": { "order_finish": "完成订单", diff --git a/apps/web-antd/src/router/routes/modules/dashboard.ts b/apps/web-antd/src/router/routes/modules/dashboard.ts index 035ff18..4ea05ef 100644 --- a/apps/web-antd/src/router/routes/modules/dashboard.ts +++ b/apps/web-antd/src/router/routes/modules/dashboard.ts @@ -5,7 +5,6 @@ import { $t } from '#/locales'; const routes: RouteRecordRaw[] = [ { - mode:'history', component: BasicLayout, meta: { icon: 'lucide:layout-dashboard', @@ -25,16 +24,16 @@ const routes: RouteRecordRaw[] = [ title: $t('page.dashboard.analytics'), }, }, - // { - // name: 'ServerList', - // path: '/server-list', - // component: () => import('#/views/dashboard/serverList/index.vue'), - // meta: { - // affixTab: true, - // icon: 'lucide:area-chart', - // title: $t('page.dashboard.server-list'), - // }, - // }, + { + name: 'ServerList', + path: '/server-list', + component: () => import('#/views/dashboard/serverList/index.vue'), + meta: { + affixTab: true, + icon: 'lucide:area-chart', + title: $t('page.dashboard.server-list'), + }, + }, ], }, ]; diff --git a/apps/web-antd/src/router/routes/modules/operation.ts b/apps/web-antd/src/router/routes/modules/operation.ts new file mode 100644 index 0000000..83c8ad6 --- /dev/null +++ b/apps/web-antd/src/router/routes/modules/operation.ts @@ -0,0 +1,42 @@ +import type { RouteRecordRaw } from 'vue-router'; + +import { BasicLayout } from '#/layouts'; +import { $t } from '#/locales'; + +const routes: RouteRecordRaw[] = [ + { + component: BasicLayout, + meta: { + icon: 'lucide:file-clock', + order: 1001, + title: $t('page.operation.title'), + }, + name: 'Operation', + path: '/operation', + children: [ + { + name: 'Level', + path: '/level', + component: () => import('#/views/operation/level/index.vue'), + meta: { + affixTab: true, + icon: 'lucide:area-chart', + title: $t('page.operation.level'), + }, + }, + { + name: 'Mail', + path: '/mail', + component: () => import('#/views/operation/mail/index.vue'), + meta: { + affixTab: true, + icon: 'lucide:area-chart', + title: $t('page.operation.mail'), + }, + } + + ], + }, +]; + +export default routes; diff --git a/apps/web-antd/src/views/dashboard/analytics/analytics-trends.vue b/apps/web-antd/src/views/dashboard/analytics/analytics-trends.vue index fadfc91..a965936 100644 --- a/apps/web-antd/src/views/dashboard/analytics/analytics-trends.vue +++ b/apps/web-antd/src/views/dashboard/analytics/analytics-trends.vue @@ -1,16 +1,19 @@