🔖 项目重命名.
This commit is contained in:
96
orion-visor-ui/src/api/system/dict-key.ts
Normal file
96
orion-visor-ui/src/api/system/dict-key.ts
Normal file
@@ -0,0 +1,96 @@
|
||||
import type { DataGrid, Pagination } from '@/types/global';
|
||||
import type { TableData } from '@arco-design/web-vue/es/table/interface';
|
||||
import axios from 'axios';
|
||||
import qs from 'query-string';
|
||||
|
||||
/**
|
||||
* 字典配置项创建请求
|
||||
*/
|
||||
export interface DictKeyCreateRequest {
|
||||
keyName?: string;
|
||||
valueType?: string;
|
||||
extraSchema?: string;
|
||||
description?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 字典配置项更新请求
|
||||
*/
|
||||
export interface DictKeyUpdateRequest extends DictKeyCreateRequest {
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* 字典配置项查询请求
|
||||
*/
|
||||
export interface DictKeyQueryRequest extends Pagination {
|
||||
searchValue?: string;
|
||||
id?: number;
|
||||
keyName?: string;
|
||||
description?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 字典配置项查询响应
|
||||
*/
|
||||
export interface DictKeyQueryResponse extends TableData {
|
||||
id: number;
|
||||
keyName: string;
|
||||
valueType: string;
|
||||
extraSchema: string;
|
||||
description: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建字典配置项
|
||||
*/
|
||||
export function createDictKey(request: DictKeyCreateRequest) {
|
||||
return axios.post('/infra/dict-key/create', request);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新字典配置项
|
||||
*/
|
||||
export function updateDictKey(request: DictKeyUpdateRequest) {
|
||||
return axios.put('/infra/dict-key/update', request);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询全部字典配置项
|
||||
*/
|
||||
export function getDictKeyList() {
|
||||
return axios.post<Array<DictKeyQueryResponse>>('/infra/dict-key/list');
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询字典配置项
|
||||
*/
|
||||
export function getDictKeyPage(request: DictKeyQueryRequest) {
|
||||
return axios.post<DataGrid<DictKeyQueryResponse>>('/infra/dict-key/query', request);
|
||||
}
|
||||
|
||||
/**
|
||||
* 刷新字典缓存
|
||||
*/
|
||||
export function refreshCache() {
|
||||
return axios.put('/infra/dict-key/refresh-cache');
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除字典配置项
|
||||
*/
|
||||
export function deleteDictKey(id: number) {
|
||||
return axios.delete('/infra/dict-key/delete', { params: { id } });
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除字典配置项
|
||||
*/
|
||||
export function batchDeleteDictKey(idList: Array<number>) {
|
||||
return axios.delete('/infra/dict-key/batch-delete', {
|
||||
params: { idList },
|
||||
paramsSerializer: params => {
|
||||
return qs.stringify(params, { arrayFormat: 'comma' });
|
||||
}
|
||||
});
|
||||
}
|
||||
125
orion-visor-ui/src/api/system/dict-value.ts
Normal file
125
orion-visor-ui/src/api/system/dict-value.ts
Normal file
@@ -0,0 +1,125 @@
|
||||
import type { DataGrid, Options, Pagination } from '@/types/global';
|
||||
import type { TableData } from '@arco-design/web-vue/es/table/interface';
|
||||
import axios from 'axios';
|
||||
import qs from 'query-string';
|
||||
|
||||
/**
|
||||
* 字典配置值创建请求
|
||||
*/
|
||||
export interface DictValueCreateRequest {
|
||||
keyId?: number;
|
||||
name?: string;
|
||||
value?: string;
|
||||
label?: string;
|
||||
extra?: string;
|
||||
sort?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* 字典配置值更新请求
|
||||
*/
|
||||
export interface DictValueUpdateRequest extends DictValueCreateRequest {
|
||||
id?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* 字典配置值回滚请求
|
||||
*/
|
||||
export interface DictValueRollbackRequest {
|
||||
id?: number;
|
||||
valueId?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* 字典配置值查询请求
|
||||
*/
|
||||
export interface DictValueQueryRequest extends Pagination {
|
||||
keyId?: number;
|
||||
keyName?: string;
|
||||
value?: string;
|
||||
label?: string;
|
||||
extra?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 字典配置值查询响应
|
||||
*/
|
||||
export interface DictValueQueryResponse extends TableData {
|
||||
id: number;
|
||||
keyId: number;
|
||||
keyName: string;
|
||||
keyDescription: string;
|
||||
value: string;
|
||||
label: string;
|
||||
extra: string;
|
||||
sort: number;
|
||||
createTime: number;
|
||||
updateTime: number;
|
||||
creator: string;
|
||||
updater: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 字典配置值选项查询响应
|
||||
*/
|
||||
export interface DictValueOptionsQueryResponse extends Options {
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建字典配置值
|
||||
*/
|
||||
export function createDictValue(request: DictValueCreateRequest) {
|
||||
return axios.post('/infra/dict-value/create', request);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新字典配置值
|
||||
*/
|
||||
export function updateDictValue(request: DictValueUpdateRequest) {
|
||||
return axios.put('/infra/dict-value/update', request);
|
||||
}
|
||||
|
||||
/**
|
||||
* 回滚字典配置值
|
||||
*/
|
||||
export function rollbackDictValue(request: DictValueRollbackRequest) {
|
||||
return axios.put('/infra/dict-value/rollback', request);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询字典配置值
|
||||
*/
|
||||
export function getDictValueList(keys: string[]) {
|
||||
return axios.get<Record<string, Array<DictValueOptionsQueryResponse>>>('/infra/dict-value/list', {
|
||||
params: { keys },
|
||||
paramsSerializer: params => {
|
||||
return qs.stringify(params, { arrayFormat: 'comma' });
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询字典配置值
|
||||
*/
|
||||
export function getDictValuePage(request: DictValueQueryRequest) {
|
||||
return axios.post<DataGrid<DictValueQueryResponse>>('/infra/dict-value/query', request);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除字典配置值
|
||||
*/
|
||||
export function deleteDictValue(id: number) {
|
||||
return axios.delete('/infra/dict-value/delete', { params: { id } });
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除字典配置值
|
||||
*/
|
||||
export function batchDeleteDictValue(idList: Array<number>) {
|
||||
return axios.delete('/infra/dict-value/batch-delete', {
|
||||
params: { idList },
|
||||
paramsSerializer: params => {
|
||||
return qs.stringify(params, { arrayFormat: 'comma' });
|
||||
}
|
||||
});
|
||||
}
|
||||
97
orion-visor-ui/src/api/system/menu.ts
Normal file
97
orion-visor-ui/src/api/system/menu.ts
Normal file
@@ -0,0 +1,97 @@
|
||||
import type { TableData } from '@arco-design/web-vue/es/table/interface';
|
||||
import axios from 'axios';
|
||||
|
||||
/**
|
||||
* 菜单创建请求
|
||||
*/
|
||||
export interface MenuCreateRequest {
|
||||
parentId?: number;
|
||||
name?: string;
|
||||
permission?: string;
|
||||
type?: number;
|
||||
sort?: number;
|
||||
visible?: number;
|
||||
cache?: number;
|
||||
newWindow?: number;
|
||||
icon?: string;
|
||||
path?: string;
|
||||
component?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 菜单更新请求
|
||||
*/
|
||||
export interface MenuUpdateRequest extends MenuCreateRequest {
|
||||
id?: number;
|
||||
status?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* 菜单查询请求
|
||||
*/
|
||||
export interface MenuQueryRequest {
|
||||
name?: string;
|
||||
status?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* 菜单查询响应
|
||||
*/
|
||||
export interface MenuQueryResponse extends TableData {
|
||||
id: number;
|
||||
parentId: number;
|
||||
name: string;
|
||||
permission: string;
|
||||
type: number;
|
||||
sort: number;
|
||||
visible: number;
|
||||
status: number;
|
||||
cache: number;
|
||||
newWindow: number,
|
||||
icon: string;
|
||||
path: string;
|
||||
component: string;
|
||||
children: Array<MenuQueryResponse>;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询菜单列表
|
||||
*/
|
||||
export function getMenuList(request: MenuQueryRequest) {
|
||||
return axios.post<MenuQueryResponse[]>('/infra/system-menu/list', request);
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建菜单
|
||||
*/
|
||||
export function createMenu(request: MenuCreateRequest) {
|
||||
return axios.post('/infra/system-menu/create', request);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改菜单
|
||||
*/
|
||||
export function updateMenu(request: MenuUpdateRequest) {
|
||||
return axios.put<MenuQueryResponse[]>('/infra/system-menu/update', request);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改菜单状态
|
||||
*/
|
||||
export function updateMenuStatus(request: MenuUpdateRequest) {
|
||||
return axios.put<MenuQueryResponse[]>('/infra/system-menu/update-status', request);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除菜单
|
||||
*/
|
||||
export function deleteMenu(id: number) {
|
||||
return axios.delete<MenuQueryResponse[]>('/infra/system-menu/delete', { params: { id } });
|
||||
}
|
||||
|
||||
/**
|
||||
* 刷新缓存
|
||||
*/
|
||||
export function refreshCache() {
|
||||
return axios.put('/infra/permission/refresh-cache');
|
||||
}
|
||||
75
orion-visor-ui/src/api/system/message.ts
Normal file
75
orion-visor-ui/src/api/system/message.ts
Normal file
@@ -0,0 +1,75 @@
|
||||
import axios from 'axios';
|
||||
|
||||
/**
|
||||
* 系统消息查询请求
|
||||
*/
|
||||
export interface MessageQueryRequest {
|
||||
limit?: number;
|
||||
maxId?: number;
|
||||
classify?: string;
|
||||
queryUnread?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* 系统消息查询响应
|
||||
*/
|
||||
export interface MessageRecordResponse {
|
||||
id: number;
|
||||
classify: string;
|
||||
type: string;
|
||||
status: number;
|
||||
relKey: string;
|
||||
title: string;
|
||||
content: string;
|
||||
contentHtml: string;
|
||||
createTime: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询系统消息列表
|
||||
*/
|
||||
export function getSystemMessageList(request: MessageQueryRequest) {
|
||||
return axios.post<Array<MessageRecordResponse>>('/infra/system-message/list', request);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询系统消息数量
|
||||
*/
|
||||
export function getSystemMessageCount(queryUnread: boolean) {
|
||||
return axios.get<Record<string, number>>('/infra/system-message/count', { params: { queryUnread } });
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询是否有未读消息
|
||||
*/
|
||||
export function checkHasUnreadMessage() {
|
||||
return axios.get<boolean>('/infra/system-message/has-unread');
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新系统消息为已读
|
||||
*/
|
||||
export function updateSystemMessageRead(id: number) {
|
||||
return axios.put('/infra/system-message/read', undefined, { params: { id } });
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新全部系统消息为已读
|
||||
*/
|
||||
export function updateSystemMessageReadAll(classify: string) {
|
||||
return axios.put('/infra/system-message/read-all', undefined, { params: { classify } });
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除系统消息
|
||||
*/
|
||||
export function deleteSystemMessage(id: number) {
|
||||
return axios.delete('/infra/system-message/delete', { params: { id } });
|
||||
}
|
||||
|
||||
/**
|
||||
* 清理已读的系统消息
|
||||
*/
|
||||
export function clearSystemMessage(classify: string) {
|
||||
return axios.delete('/infra/system-message/clear', { params: { classify } });
|
||||
}
|
||||
8
orion-visor-ui/src/api/system/upload.ts
Normal file
8
orion-visor-ui/src/api/system/upload.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
import { createAppWebSocket } from '@/utils/http';
|
||||
|
||||
/**
|
||||
* 打开文件上传 websocket
|
||||
*/
|
||||
export const openFileUploadChannel = (uploadToken: string) => {
|
||||
return createAppWebSocket(`/file/upload/${uploadToken}`);
|
||||
};
|
||||
Reference in New Issue
Block a user