mirror of
				https://github.com/continew-org/continew-admin-ui.git
				synced 2025-10-31 22:57:15 +08:00 
			
		
		
		
	chore: 优化 apis 导入,随着模块和接口的增加,方便维护
This commit is contained in:
		| @@ -1,7 +1,9 @@ | ||||
| import type * as Area from './type' | ||||
| import type * as T from './type' | ||||
| import http from '@/utils/http' | ||||
|  | ||||
| export type * from './type' | ||||
|  | ||||
| /** @desc 获取地区列表 */ | ||||
| export const getAreaList = (params: { type: 'province' | 'city' | 'area', code?: string }) => { | ||||
|   return http.get<Area.AreaItem>('/area/list', params) | ||||
|   return http.get<T.AreaItem>('/area/list', params) | ||||
| } | ||||
|   | ||||
| @@ -1,31 +1,33 @@ | ||||
| import type * as Auth from './type' | ||||
| import type * as T from './type' | ||||
| import http from '@/utils/http' | ||||
|  | ||||
| export type * from './type' | ||||
|  | ||||
| const BASE_URL = '/auth' | ||||
|  | ||||
| /** @desc 账号登录 */ | ||||
| export function accountLogin(req: Auth.AccountLoginReq) { | ||||
|   return http.post<Auth.LoginResp>(`${BASE_URL}/account`, req) | ||||
| export function accountLogin(req: T.AccountLoginReq) { | ||||
|   return http.post<T.LoginResp>(`${BASE_URL}/account`, req) | ||||
| } | ||||
|  | ||||
| /** @desc 手机号登录 */ | ||||
| export function phoneLogin(req: Auth.PhoneLoginReq) { | ||||
|   return http.post<Auth.LoginResp>(`${BASE_URL}/phone`, req) | ||||
| export function phoneLogin(req: T.PhoneLoginReq) { | ||||
|   return http.post<T.LoginResp>(`${BASE_URL}/phone`, req) | ||||
| } | ||||
|  | ||||
| /** @desc 邮箱登录 */ | ||||
| export function emailLogin(req: Auth.EmailLoginReq) { | ||||
|   return http.post<Auth.LoginResp>(`${BASE_URL}/email`, req) | ||||
| export function emailLogin(req: T.EmailLoginReq) { | ||||
|   return http.post<T.LoginResp>(`${BASE_URL}/email`, req) | ||||
| } | ||||
|  | ||||
| /** @desc 三方账号登录 */ | ||||
| export function socialLogin(source: string, req: any) { | ||||
|   return http.post<Auth.LoginResp>(`/oauth/${source}`, req) | ||||
|   return http.post<T.LoginResp>(`/oauth/${source}`, req) | ||||
| } | ||||
|  | ||||
| /** @desc 三方账号登录授权 */ | ||||
| export function socialAuth(source: string) { | ||||
|   return http.get<Auth.SocialAuthAuthorizeResp>(`/oauth/${source}`) | ||||
|   return http.get<T.SocialAuthAuthorizeResp>(`/oauth/${source}`) | ||||
| } | ||||
|  | ||||
| /** @desc 退出登录 */ | ||||
| @@ -35,10 +37,10 @@ export function logout() { | ||||
|  | ||||
| /** @desc 获取用户信息 */ | ||||
| export const getUserInfo = () => { | ||||
|   return http.get<Auth.UserInfo>(`${BASE_URL}/user/info`) | ||||
|   return http.get<T.UserInfo>(`${BASE_URL}/user/info`) | ||||
| } | ||||
|  | ||||
| /** @desc 获取路由信息 */ | ||||
| export const getUserRoute = () => { | ||||
|   return http.get<Auth.RouteItem[]>(`${BASE_URL}/route`) | ||||
|   return http.get<T.RouteItem[]>(`${BASE_URL}/route`) | ||||
| } | ||||
|   | ||||
| @@ -1,11 +1,13 @@ | ||||
| import type * as Common from './type' | ||||
| import type * as T from './type' | ||||
| import http from '@/utils/http' | ||||
|  | ||||
| export type * from './type' | ||||
|  | ||||
| const BASE_URL = '/captcha' | ||||
|  | ||||
| /** @desc 获取图片验证码 */ | ||||
| export function getImageCaptcha() { | ||||
|   return http.get<Common.ImageCaptchaResp>(`${BASE_URL}/image`) | ||||
|   return http.get<T.ImageCaptchaResp>(`${BASE_URL}/image`) | ||||
| } | ||||
|  | ||||
| /** @desc 获取短信验证码 */ | ||||
| @@ -20,10 +22,10 @@ export function getEmailCaptcha(query: { email: string }) { | ||||
|  | ||||
| /** @desc 获取行为验证码 */ | ||||
| export function getBehaviorCaptcha(req: any) { | ||||
|   return http.get<Common.BehaviorCaptchaResp>(`${BASE_URL}/behavior`, req) | ||||
|   return http.get<T.BehaviorCaptchaResp>(`${BASE_URL}/behavior`, req) | ||||
| } | ||||
|  | ||||
| /** @desc 校验行为验证码 */ | ||||
| export function checkBehaviorCaptcha(req: any) { | ||||
|   return http.post<Common.CheckBehaviorCaptchaResp>(`${BASE_URL}/behavior`, req) | ||||
|   return http.post<T.CheckBehaviorCaptchaResp>(`${BASE_URL}/behavior`, req) | ||||
| } | ||||
|   | ||||
| @@ -1,14 +1,16 @@ | ||||
| import type * as Common from './type' | ||||
| import type * as T from './type' | ||||
| import http from '@/utils/http' | ||||
|  | ||||
| export type * from './type' | ||||
|  | ||||
| const BASE_URL = '/dashboard' | ||||
|  | ||||
| /** @desc 查询访问趋势 */ | ||||
| export function listDashboardAccessTrend(days: number) { | ||||
|   return http.get<Common.DashboardAccessTrendResp[]>(`${BASE_URL}/access/trend/${days}`) | ||||
|   return http.get<T.DashboardAccessTrendResp[]>(`${BASE_URL}/access/trend/${days}`) | ||||
| } | ||||
|  | ||||
| /** @desc 查询公告列表 */ | ||||
| export function listDashboardNotice() { | ||||
|   return http.get<Common.DashboardNoticeResp[]>(`${BASE_URL}/notice`) | ||||
|   return http.get<T.DashboardNoticeResp[]>(`${BASE_URL}/notice`) | ||||
| } | ||||
|   | ||||
| @@ -1,24 +1,26 @@ | ||||
| import type * as Monitor from './type' | ||||
| import type * as T from './type' | ||||
| import http from '@/utils/http' | ||||
|  | ||||
| export type * from './type' | ||||
|  | ||||
| const BASE_URL = '/system/log' | ||||
|  | ||||
| /** @desc 查询日志列表 */ | ||||
| export function listLog(query: Monitor.LogPageQuery) { | ||||
|   return http.get<PageRes<Monitor.LogResp[]>>(`${BASE_URL}`, query) | ||||
| export function listLog(query: T.LogPageQuery) { | ||||
|   return http.get<PageRes<T.LogResp[]>>(`${BASE_URL}`, query) | ||||
| } | ||||
|  | ||||
| /** @desc 查询日志详情 */ | ||||
| export function getLog(id: string) { | ||||
|   return http.get<Monitor.LogDetailResp>(`${BASE_URL}/${id}`) | ||||
|   return http.get<T.LogDetailResp>(`${BASE_URL}/${id}`) | ||||
| } | ||||
|  | ||||
| /** @desc 导出登录日志 */ | ||||
| export function exportLoginLog(query: Monitor.LogQuery) { | ||||
| export function exportLoginLog(query: T.LogQuery) { | ||||
|   return http.download<any>(`${BASE_URL}/export/login`, query) | ||||
| } | ||||
|  | ||||
| /** @desc 导出操作日志 */ | ||||
| export function exportOperationLog(query: Monitor.LogQuery) { | ||||
| export function exportOperationLog(query: T.LogQuery) { | ||||
|   return http.download<any>(`${BASE_URL}/export/operation`, query) | ||||
| } | ||||
|   | ||||
| @@ -1,11 +1,13 @@ | ||||
| import type * as Monitor from './type' | ||||
| import type * as T from './type' | ||||
| import http from '@/utils/http' | ||||
|  | ||||
| export type * from './type' | ||||
|  | ||||
| const BASE_URL = '/monitor/online' | ||||
|  | ||||
| /** @desc 查询在线用户列表 */ | ||||
| export function listOnlineUser(query: Monitor.OnlineUserPageQuery) { | ||||
|   return http.get<PageRes<Monitor.OnlineUserResp[]>>(`${BASE_URL}`, query) | ||||
| export function listOnlineUser(query: T.OnlineUserPageQuery) { | ||||
|   return http.get<PageRes<T.OnlineUserResp[]>>(`${BASE_URL}`, query) | ||||
| } | ||||
|  | ||||
| /** @desc 强退在线用户 */ | ||||
|   | ||||
| @@ -1,6 +1,8 @@ | ||||
| import type * as Schedule from './type' | ||||
| import type * as T from './type' | ||||
| import http from '@/utils/http' | ||||
|  | ||||
| export type * from './type' | ||||
|  | ||||
| const BASE_URL = '/schedule/job' | ||||
|  | ||||
| /** @desc 查询任务组列表 */ | ||||
| @@ -9,8 +11,8 @@ export function listGroup() { | ||||
| } | ||||
|  | ||||
| /** @desc 查询任务列表 */ | ||||
| export function listJob(query: Schedule.JobPageQuery) { | ||||
|   return http.get<PageRes<Schedule.JobResp[]>>(`${BASE_URL}`, query) | ||||
| export function listJob(query: T.JobPageQuery) { | ||||
|   return http.get<PageRes<T.JobResp[]>>(`${BASE_URL}`, query) | ||||
| } | ||||
|  | ||||
| /** @desc 新增任务 */ | ||||
|   | ||||
| @@ -1,11 +1,13 @@ | ||||
| import type * as Schedule from './type' | ||||
| import type * as T from './type' | ||||
| import http from '@/utils/http' | ||||
|  | ||||
| export type * from './type' | ||||
|  | ||||
| const BASE_URL = '/schedule/log' | ||||
|  | ||||
| /** @desc 查询任务日志列表 */ | ||||
| export function listJobLog(query: Schedule.JobLogPageQuery) { | ||||
|   return http.get<PageRes<Schedule.JobLogResp[]>>(`${BASE_URL}`, query) | ||||
| export function listJobLog(query: T.JobLogPageQuery) { | ||||
|   return http.get<PageRes<T.JobLogResp[]>>(`${BASE_URL}`, query) | ||||
| } | ||||
|  | ||||
| /** @desc 查询任务日志详情 */ | ||||
| @@ -24,11 +26,11 @@ export function retryJob(id: number) { | ||||
| } | ||||
|  | ||||
| /** @desc 查询任务实例列表 */ | ||||
| export function listJobInstance(query: Schedule.JobInstanceQuery) { | ||||
|   return http.get<Schedule.JobInstanceResp[]>(`${BASE_URL}/instance`, query) | ||||
| export function listJobInstance(query: T.JobInstanceQuery) { | ||||
|   return http.get<T.JobInstanceResp[]>(`${BASE_URL}/instance`, query) | ||||
| } | ||||
|  | ||||
| /** @desc 查询任务实例日志列表 */ | ||||
| export function listJobInstanceLog(query: Schedule.JobInstanceLogQuery) { | ||||
|   return http.get<Schedule.JobInstanceLogResp>(`${BASE_URL}/instance/log`, query) | ||||
| export function listJobInstanceLog(query: T.JobInstanceLogQuery) { | ||||
|   return http.get<T.JobInstanceLogResp>(`${BASE_URL}/instance/log`, query) | ||||
| } | ||||
|   | ||||
| @@ -1,16 +1,18 @@ | ||||
| import type * as System from './type' | ||||
| import type * as T from './type' | ||||
| import http from '@/utils/http' | ||||
|  | ||||
| export type * from './type' | ||||
|  | ||||
| const BASE_URL = '/system/dept' | ||||
|  | ||||
| /** @desc 查询部门列表 */ | ||||
| export function listDept(query: System.DeptQuery) { | ||||
|   return http.get<System.DeptResp[]>(`${BASE_URL}/tree`, query) | ||||
| export function listDept(query: T.DeptQuery) { | ||||
|   return http.get<T.DeptResp[]>(`${BASE_URL}/tree`, query) | ||||
| } | ||||
|  | ||||
| /** @desc 查询部门详情 */ | ||||
| export function getDept(id: string) { | ||||
|   return http.get<System.DeptResp>(`${BASE_URL}/${id}`) | ||||
|   return http.get<T.DeptResp>(`${BASE_URL}/${id}`) | ||||
| } | ||||
|  | ||||
| /** @desc 新增部门 */ | ||||
| @@ -29,6 +31,6 @@ export function deleteDept(id: string) { | ||||
| } | ||||
|  | ||||
| /** @desc 导出部门 */ | ||||
| export function exportDept(query: System.DeptQuery) { | ||||
| export function exportDept(query: T.DeptQuery) { | ||||
|   return http.download<any>(`${BASE_URL}/export`, query) | ||||
| } | ||||
|   | ||||
| @@ -1,16 +1,18 @@ | ||||
| import type * as System from './type' | ||||
| import type * as T from './type' | ||||
| import http from '@/utils/http' | ||||
|  | ||||
| export type * from './type' | ||||
|  | ||||
| const BASE_URL = '/system/dict' | ||||
|  | ||||
| /** @desc 查询字典列表 */ | ||||
| export function listDict(query: System.DictQuery) { | ||||
|   return http.get<System.DictResp[]>(`${BASE_URL}/list`, query) | ||||
| export function listDict(query: T.DictQuery) { | ||||
|   return http.get<T.DictResp[]>(`${BASE_URL}/list`, query) | ||||
| } | ||||
|  | ||||
| /** @desc 查询字典详情 */ | ||||
| export function getDict(id: string) { | ||||
|   return http.get<System.DictResp>(`${BASE_URL}/${id}`) | ||||
|   return http.get<T.DictResp>(`${BASE_URL}/${id}`) | ||||
| } | ||||
|  | ||||
| /** @desc 新增字典 */ | ||||
| @@ -29,13 +31,13 @@ export function deleteDict(id: string) { | ||||
| } | ||||
|  | ||||
| /** @desc 查询字典项列表 */ | ||||
| export function listDictItem(query: System.DictItemPageQuery) { | ||||
|   return http.get<PageRes<System.DictItemResp[]>>(`${BASE_URL}/item`, query) | ||||
| export function listDictItem(query: T.DictItemPageQuery) { | ||||
|   return http.get<PageRes<T.DictItemResp[]>>(`${BASE_URL}/item`, query) | ||||
| } | ||||
|  | ||||
| /** @desc 查询字典项详情 */ | ||||
| export function getDictItem(id: string) { | ||||
|   return http.get<System.DictItemResp>(`${BASE_URL}/item/${id}`) | ||||
|   return http.get<T.DictItemResp>(`${BASE_URL}/item/${id}`) | ||||
| } | ||||
|  | ||||
| /** @desc 新增字典项 */ | ||||
|   | ||||
| @@ -1,11 +1,13 @@ | ||||
| import type * as System from './type' | ||||
| import type * as T from './type' | ||||
| import http from '@/utils/http' | ||||
|  | ||||
| export type * from './type' | ||||
|  | ||||
| const BASE_URL = '/system/file' | ||||
|  | ||||
| /** @desc 查询文件列表 */ | ||||
| export function listFile(query: System.FilePageQuery) { | ||||
|   return http.get<PageRes<System.FileItem[]>>(`${BASE_URL}`, query) | ||||
| export function listFile(query: T.FilePageQuery) { | ||||
|   return http.get<PageRes<T.FileItem[]>>(`${BASE_URL}`, query) | ||||
| } | ||||
|  | ||||
| /** @desc 修改文件 */ | ||||
| @@ -20,5 +22,5 @@ export function deleteFile(ids: string | Array<string>) { | ||||
|  | ||||
| /** @desc 查询文件资源统计统计 */ | ||||
| export function getFileStatistics() { | ||||
|   return http.get<System.FileStatisticsResp>(`${BASE_URL}/statistics`) | ||||
|   return http.get<T.FileStatisticsResp>(`${BASE_URL}/statistics`) | ||||
| } | ||||
|   | ||||
| @@ -1,16 +1,18 @@ | ||||
| import type * as System from './type' | ||||
| import type * as T from './type' | ||||
| import http from '@/utils/http' | ||||
|  | ||||
| export type * from './type' | ||||
|  | ||||
| const BASE_URL = '/system/menu' | ||||
|  | ||||
| /** @desc 查询菜单列表 */ | ||||
| export function listMenu(query: System.MenuQuery) { | ||||
|   return http.get<System.MenuResp[]>(`${BASE_URL}/tree`, query) | ||||
| export function listMenu(query: T.MenuQuery) { | ||||
|   return http.get<T.MenuResp[]>(`${BASE_URL}/tree`, query) | ||||
| } | ||||
|  | ||||
| /** @desc 查询菜单详情 */ | ||||
| export function getMenu(id: string) { | ||||
|   return http.get<System.MenuResp>(`${BASE_URL}/${id}`) | ||||
|   return http.get<T.MenuResp>(`${BASE_URL}/${id}`) | ||||
| } | ||||
|  | ||||
| /** @desc 新增菜单 */ | ||||
|   | ||||
| @@ -1,11 +1,13 @@ | ||||
| import type * as System from './type' | ||||
| import type * as T from './type' | ||||
| import http from '@/utils/http' | ||||
|  | ||||
| export type * from './type' | ||||
|  | ||||
| const BASE_URL = '/system/message' | ||||
|  | ||||
| /** @desc 查询消息列表 */ | ||||
| export function listMessage(query: System.MessagePageQuery) { | ||||
|   return http.get<PageRes<System.MessageResp[]>>(`${BASE_URL}`, query) | ||||
| export function listMessage(query: T.MessagePageQuery) { | ||||
|   return http.get<PageRes<T.MessageResp[]>>(`${BASE_URL}`, query) | ||||
| } | ||||
|  | ||||
| /** @desc 删除消息 */ | ||||
|   | ||||
| @@ -1,16 +1,18 @@ | ||||
| import type * as System from './type' | ||||
| import type * as T from './type' | ||||
| import http from '@/utils/http' | ||||
|  | ||||
| export type * from './type' | ||||
|  | ||||
| const BASE_URL = '/system/notice' | ||||
|  | ||||
| /** @desc 查询公告列表 */ | ||||
| export function listNotice(query: System.NoticePageQuery) { | ||||
|   return http.get<PageRes<System.NoticeResp[]>>(`${BASE_URL}`, query) | ||||
| export function listNotice(query: T.NoticePageQuery) { | ||||
|   return http.get<PageRes<T.NoticeResp[]>>(`${BASE_URL}`, query) | ||||
| } | ||||
|  | ||||
| /** @desc 查询公告详情 */ | ||||
| export function getNotice(id: string) { | ||||
|   return http.get<System.NoticeResp>(`${BASE_URL}/${id}`) | ||||
|   return http.get<T.NoticeResp>(`${BASE_URL}/${id}`) | ||||
| } | ||||
|  | ||||
| /** @desc 新增公告 */ | ||||
|   | ||||
| @@ -1,11 +1,13 @@ | ||||
| import type * as System from './type' | ||||
| import type * as T from './type' | ||||
| import http from '@/utils/http' | ||||
|  | ||||
| export type * from './type' | ||||
|  | ||||
| const BASE_URL = '/system/option' | ||||
|  | ||||
| /** @desc 查询参数列表 */ | ||||
| export function listOption(query: System.OptionQuery) { | ||||
|   return http.get<System.OptionResp[]>(`${BASE_URL}`, query) | ||||
| export function listOption(query: T.OptionQuery) { | ||||
|   return http.get<T.OptionResp[]>(`${BASE_URL}`, query) | ||||
| } | ||||
|  | ||||
| /** @desc 修改参数 */ | ||||
| @@ -14,6 +16,6 @@ export function updateOption(data: any) { | ||||
| } | ||||
|  | ||||
| /** @desc 重置参数 */ | ||||
| export function resetOptionValue(query: System.OptionQuery) { | ||||
| export function resetOptionValue(query: T.OptionQuery) { | ||||
|   return http.patch(`${BASE_URL}/value`, query) | ||||
| } | ||||
|   | ||||
| @@ -1,16 +1,18 @@ | ||||
| import type * as System from './type' | ||||
| import type * as T from './type' | ||||
| import http from '@/utils/http' | ||||
|  | ||||
| export type * from './type' | ||||
|  | ||||
| const BASE_URL = '/system/role' | ||||
|  | ||||
| /** @desc 查询角色列表 */ | ||||
| export function listRole(query: System.RolePageQuery) { | ||||
|   return http.get<PageRes<System.RoleResp[]>>(`${BASE_URL}`, query) | ||||
| export function listRole(query: T.RolePageQuery) { | ||||
|   return http.get<PageRes<T.RoleResp[]>>(`${BASE_URL}`, query) | ||||
| } | ||||
|  | ||||
| /** @desc 查询角色详情 */ | ||||
| export function getRole(id: string) { | ||||
|   return http.get<System.RoleDetailResp>(`${BASE_URL}/${id}`) | ||||
|   return http.get<T.RoleDetailResp>(`${BASE_URL}/${id}`) | ||||
| } | ||||
|  | ||||
| /** @desc 新增角色 */ | ||||
|   | ||||
| @@ -1,16 +1,18 @@ | ||||
| import type * as System from './type' | ||||
| import type * as T from './type' | ||||
| import http from '@/utils/http' | ||||
|  | ||||
| export type * from './type' | ||||
|  | ||||
| const BASE_URL = '/system/storage' | ||||
|  | ||||
| /** @desc 查询存储列表 */ | ||||
| export function listStorage(query: System.StoragePageQuery) { | ||||
|   return http.get<PageRes<System.StorageResp[]>>(`${BASE_URL}`, query) | ||||
| export function listStorage(query: T.StoragePageQuery) { | ||||
|   return http.get<PageRes<T.StorageResp[]>>(`${BASE_URL}`, query) | ||||
| } | ||||
|  | ||||
| /** @desc 查询存储详情 */ | ||||
| export function getStorage(id: string) { | ||||
|   return http.get<System.StorageResp>(`${BASE_URL}/${id}`) | ||||
|   return http.get<T.StorageResp>(`${BASE_URL}/${id}`) | ||||
| } | ||||
|  | ||||
| /** @desc 新增存储 */ | ||||
|   | ||||
| @@ -1,16 +1,18 @@ | ||||
| import type * as System from './type' | ||||
| import type * as T from './type' | ||||
| import http from '@/utils/http' | ||||
|  | ||||
| export type * from './type' | ||||
|  | ||||
| const BASE_URL = '/system/user' | ||||
|  | ||||
| /** @desc 查询用户列表 */ | ||||
| export function listUser(query: System.UserPageQuery) { | ||||
|   return http.get<PageRes<System.UserResp[]>>(`${BASE_URL}`, query) | ||||
| export function listUser(query: T.UserPageQuery) { | ||||
|   return http.get<PageRes<T.UserResp[]>>(`${BASE_URL}`, query) | ||||
| } | ||||
|  | ||||
| /** @desc 查询用户详情 */ | ||||
| export function getUser(id: string) { | ||||
|   return http.get<System.UserDetailResp>(`${BASE_URL}/${id}`) | ||||
|   return http.get<T.UserDetailResp>(`${BASE_URL}/${id}`) | ||||
| } | ||||
|  | ||||
| /** @desc 新增用户 */ | ||||
| @@ -29,7 +31,7 @@ export function deleteUser(ids: string | Array<string>) { | ||||
| } | ||||
|  | ||||
| /** @desc 导出用户 */ | ||||
| export function exportUser(query: System.UserQuery) { | ||||
| export function exportUser(query: T.UserQuery) { | ||||
|   return http.download(`${BASE_URL}/export`, query) | ||||
| } | ||||
|  | ||||
|   | ||||
| @@ -1,32 +1,34 @@ | ||||
| import type * as Tool from './type' | ||||
| import type { LabelValueState } from '@/types/global' | ||||
| import type * as T from './type' | ||||
| import http from '@/utils/http' | ||||
| import type { LabelValueState } from '@/types/global' | ||||
|  | ||||
| export type * from './type' | ||||
|  | ||||
| const BASE_URL = '/generator' | ||||
|  | ||||
| /** @desc 查询代码生成列表 */ | ||||
| export function listGenerator(query: Tool.TablePageQuery) { | ||||
|   return http.get<PageRes<Tool.TableResp[]>>(`${BASE_URL}/table`, query) | ||||
| export function listGenerator(query: T.TablePageQuery) { | ||||
|   return http.get<PageRes<T.TableResp[]>>(`${BASE_URL}/table`, query) | ||||
| } | ||||
|  | ||||
| /** @desc 查询字段配置列表 */ | ||||
| export function listFieldConfig(tableName: string, requireSync: boolean) { | ||||
|   return http.get<Tool.FieldConfigResp[]>(`${BASE_URL}/field/${tableName}?requireSync=${requireSync}`) | ||||
|   return http.get<T.FieldConfigResp[]>(`${BASE_URL}/field/${tableName}?requireSync=${requireSync}`) | ||||
| } | ||||
|  | ||||
| /** @desc 查询生成配置信息 */ | ||||
| export function getGenConfig(tableName: string) { | ||||
|   return http.get<Tool.GenConfigResp>(`${BASE_URL}/config/${tableName}`) | ||||
|   return http.get<T.GenConfigResp>(`${BASE_URL}/config/${tableName}`) | ||||
| } | ||||
|  | ||||
| /** @desc 保存配置信息 */ | ||||
| export function saveGenConfig(tableName: string, req: Tool.GeneratorConfigResp) { | ||||
| export function saveGenConfig(tableName: string, req: T.GeneratorConfigResp) { | ||||
|   return http.post(`${BASE_URL}/config/${tableName}`, req) | ||||
| } | ||||
|  | ||||
| /** @desc 生成预览 */ | ||||
| export function genPreview(tableName: string) { | ||||
|   return http.get<Tool.GeneratePreviewResp[]>(`${BASE_URL}/preview/${tableName}`) | ||||
|   return http.get<T.GeneratePreviewResp[]>(`${BASE_URL}/preview/${tableName}`) | ||||
| } | ||||
|  | ||||
| /** @desc 生成代码 */ | ||||
|   | ||||
| @@ -33,7 +33,7 @@ | ||||
| <script setup lang="ts"> | ||||
| import { type FormInstance, Message } from '@arco-design/web-vue' | ||||
| import { useStorage } from '@vueuse/core' | ||||
| import { getImageCaptcha } from '@/apis' | ||||
| import { getImageCaptcha } from '@/apis/common' | ||||
| import { useTabsStore, useUserStore } from '@/stores' | ||||
| import { encryptByRsa } from '@/utils/encrypt' | ||||
|  | ||||
|   | ||||
| @@ -22,7 +22,7 @@ | ||||
|  | ||||
| <script setup lang="ts"> | ||||
| import { type FormInstance, Message } from '@arco-design/web-vue' | ||||
| import { updateUserPassword } from '@/apis' | ||||
| import { updateUserPassword } from '@/apis/system' | ||||
| import { encryptByRsa } from '@/utils/encrypt' | ||||
|  | ||||
| interface Form { | ||||
|   | ||||
| @@ -93,7 +93,7 @@ import Background from './components/background/index.vue' | ||||
| import AccountLogin from './components/account/index.vue' | ||||
| import PhoneLogin from './components/phone/index.vue' | ||||
| import EmailLogin from './components/email/index.vue' | ||||
| import { socialAuth } from '@/apis' | ||||
| import { socialAuth } from '@/apis/auth' | ||||
| import { useAppStore } from '@/stores' | ||||
| import { useDevice } from '@/hooks' | ||||
|  | ||||
|   | ||||
| @@ -7,7 +7,7 @@ | ||||
| <script setup lang="ts"> | ||||
| import { Message } from '@arco-design/web-vue' | ||||
| import { useRoute, useRouter } from 'vue-router' | ||||
| import { bindSocialAccount } from '@/apis' | ||||
| import { bindSocialAccount } from '@/apis/system' | ||||
| import { useTabsStore, useUserStore } from '@/stores' | ||||
| import { isLogin } from '@/utils/auth' | ||||
|  | ||||
|   | ||||
| @@ -46,7 +46,7 @@ | ||||
|  | ||||
| <script setup lang="ts"> | ||||
| import dayjs from 'dayjs' | ||||
| import { type LogQuery, exportLoginLog, listLog } from '@/apis' | ||||
| import { type LogQuery, exportLoginLog, listLog } from '@/apis/monitor' | ||||
| import type { TableInstanceColumns } from '@/components/GiTable/type' | ||||
| import DateRangePicker from '@/components/DateRangePicker/index.vue' | ||||
| import { useDownload, useTable } from '@/hooks' | ||||
|   | ||||
| @@ -68,7 +68,7 @@ | ||||
| </template> | ||||
|  | ||||
| <script lang="ts" setup> | ||||
| import { type LogDetailResp, getLog } from '@/apis' | ||||
| import { type LogDetailResp, getLog } from '@/apis/monitor' | ||||
|  | ||||
| const dataId = ref('') | ||||
| const dataDetail = ref<LogDetailResp>() | ||||
|   | ||||
| @@ -58,7 +58,7 @@ | ||||
| <script setup lang="ts"> | ||||
| import dayjs from 'dayjs' | ||||
| import OperationLogDetailDrawer from './OperationLogDetailDrawer.vue' | ||||
| import { type LogQuery, type LogResp, exportOperationLog, listLog } from '@/apis' | ||||
| import { type LogQuery, type LogResp, exportOperationLog, listLog } from '@/apis/monitor' | ||||
| import type { TableInstanceColumns } from '@/components/GiTable/type' | ||||
| import DateRangePicker from '@/components/DateRangePicker/index.vue' | ||||
| import { useDownload, useTable } from '@/hooks' | ||||
|   | ||||
| @@ -44,7 +44,7 @@ | ||||
|  | ||||
| <script setup lang="ts"> | ||||
| import { Message } from '@arco-design/web-vue' | ||||
| import { type OnlineUserQuery, kickout, listOnlineUser } from '@/apis' | ||||
| import { type OnlineUserQuery, kickout, listOnlineUser } from '@/apis/monitor' | ||||
| import type { TableInstanceColumns } from '@/components/GiTable/type' | ||||
| import DateRangePicker from '@/components/DateRangePicker/index.vue' | ||||
| import { useUserStore } from '@/stores' | ||||
|   | ||||
| @@ -156,7 +156,7 @@ | ||||
| <script setup lang="ts"> | ||||
| import { type ColProps, type FormInstance, Message } from '@arco-design/web-vue' | ||||
| import { useWindowSize } from '@vueuse/core' | ||||
| import { addJob, listGroup, updateJob } from '@/apis' | ||||
| import { addJob, listGroup, updateJob } from '@/apis/schedule' | ||||
| import { useForm } from '@/hooks' | ||||
| import { useDict } from '@/hooks/app' | ||||
|  | ||||
|   | ||||
| @@ -36,7 +36,7 @@ | ||||
|  | ||||
| <script setup lang="ts"> | ||||
| import { useWindowSize } from '@vueuse/core' | ||||
| import type { JobResp } from '@/apis' | ||||
| import type { JobResp } from '@/apis/schedule' | ||||
| import { useDict } from '@/hooks/app' | ||||
|  | ||||
| const { width } = useWindowSize() | ||||
|   | ||||
| @@ -73,7 +73,7 @@ import { Message } from '@arco-design/web-vue' | ||||
| import { useRouter } from 'vue-router' | ||||
| import JobAddModal from './JobAddModal.vue' | ||||
| import JobDetailDrawer from './JobDetailDrawer.vue' | ||||
| import { type JobQuery, type JobResp, deleteJob, listGroup, listJob, triggerJob, updateJobStatus } from '@/apis' | ||||
| import { type JobQuery, type JobResp, deleteJob, listGroup, listJob, triggerJob, updateJobStatus } from '@/apis/schedule' | ||||
| import type { TableInstanceColumns } from '@/components/GiTable/type' | ||||
| import { useTable } from '@/hooks' | ||||
| import { useDict } from '@/hooks/app' | ||||
|   | ||||
| @@ -1,10 +1,10 @@ | ||||
| <template> | ||||
|   <a-modal v-model:visible="visible" title="任务日志详情" :bodyStyle="{ maxHeight: '80vh', overflow: 'auto' }" | ||||
|   <a-modal v-model:visible="visible" title="任务日志详情" :body-style="{ maxHeight: '80vh', overflow: 'auto' }" | ||||
|     :width="width >= 1500 ? 1500 : '100%'" :footer="false" @close="closed"> | ||||
|     <div style="display: flex;"> | ||||
|       <div style="padding: 10px 10px;"> | ||||
|         <div class="job_list"> | ||||
|           <div :class="`job_list_item ${item.id === activeId ? 'active' : ''}`" v-for="item in dataList" :key="item.id" | ||||
|           <div v-for="item in dataList" :key="item.id" :class="`job_list_item ${item.id === activeId ? 'active' : ''}`" | ||||
|             @click="onStartInfo(item)"> | ||||
|             <div class="content"> | ||||
|               <span class="title">{{ item.clientInfo.split('@')[1] }}</span> | ||||
| @@ -20,14 +20,13 @@ | ||||
|         <GiCodeView :code-json="content" /> | ||||
|       </div> | ||||
|     </div> | ||||
|  | ||||
|   </a-modal> | ||||
| </a-modal> | ||||
| </template> | ||||
|  | ||||
| <script setup lang="ts"> | ||||
| import { useWindowSize } from '@vueuse/core' | ||||
| import { type JobInstanceQuery, type JobInstanceResp, type JobLogResp, listJobInstance, listJobInstanceLog } from '@/apis' | ||||
| import dayjs from "dayjs"; | ||||
| import dayjs from 'dayjs' | ||||
| import { type JobInstanceQuery, type JobInstanceResp, type JobLogResp, listJobInstance, listJobInstanceLog } from '@/apis/schedule' | ||||
|  | ||||
| const { width } = useWindowSize() | ||||
| const queryForm = reactive<JobInstanceQuery>({}) | ||||
| @@ -35,39 +34,38 @@ const dataList = ref<JobInstanceResp[]>([]) | ||||
| const loading = ref(false) | ||||
| const activeId = ref<string | number>('') | ||||
| const statusList = { | ||||
|   '1': { | ||||
|   1: { | ||||
|     title: '待处理', | ||||
|     color: 'gray', | ||||
|     isRun: false | ||||
|   }, | ||||
|   '2': { | ||||
|   2: { | ||||
|     title: '运行中', | ||||
|     color: 'cyan', | ||||
|     isRun: true | ||||
|   }, | ||||
|   '3': { | ||||
|   3: { | ||||
|     title: '成功', | ||||
|     color: 'green', | ||||
|     isRun: false | ||||
|   }, | ||||
|   '4': { | ||||
|   4: { | ||||
|     title: '已失败', | ||||
|     color: 'red', | ||||
|     isRun: false | ||||
|   }, | ||||
|   '5': { | ||||
|   5: { | ||||
|     title: '已停止', | ||||
|     color: 'purple', | ||||
|     isRun: false | ||||
|   }, | ||||
|   '6': { | ||||
|   6: { | ||||
|     title: '已取消', | ||||
|     color: 'orange', | ||||
|     isRun: false | ||||
|   } | ||||
| } | ||||
|  | ||||
|  | ||||
| const visible = ref(false) | ||||
|  | ||||
| // 格式化日志 | ||||
| @@ -79,7 +77,6 @@ const formatLog = (log: any) => { | ||||
| const content = ref('') | ||||
| const setIntervalNode = ref<NodeJS.Timeout>() | ||||
|  | ||||
|  | ||||
| // 详情 | ||||
| const onDetail = (record: JobLogResp) => { | ||||
|   visible.value = true | ||||
| @@ -109,13 +106,11 @@ const onLogDetail = async (record: JobInstanceResp) => { | ||||
|   } catch (error) { | ||||
|     content.value = '' | ||||
|   } | ||||
|  | ||||
|  | ||||
| } | ||||
| const onStartInfo = (record: JobInstanceResp) => { | ||||
|   content.value = '' | ||||
|   clearInterval(setIntervalNode.value) | ||||
|   let isRun = statusList[record.taskStatus].isRun | ||||
|   const isRun = statusList[record.taskStatus].isRun | ||||
|   if (isRun) { | ||||
|     setIntervalNode.value = setInterval(() => { | ||||
|       onLogDetail(record) | ||||
| @@ -123,8 +118,6 @@ const onStartInfo = (record: JobInstanceResp) => { | ||||
|   } else { | ||||
|     onLogDetail(record) | ||||
|   } | ||||
|  | ||||
|  | ||||
| } | ||||
| // 查询列表数据 | ||||
| const getInstanceList = async (query: JobInstanceQuery = { ...queryForm }) => { | ||||
|   | ||||
| @@ -65,7 +65,7 @@ import { Message } from '@arco-design/web-vue' | ||||
| import { useRoute } from 'vue-router' | ||||
| import dayjs from 'dayjs' | ||||
| import JobLogDetailModal from './LogDetailModal.vue' | ||||
| import { type JobLogQuery, type JobLogResp, listGroup, listJobLog, retryJob, stopJob } from '@/apis' | ||||
| import { type JobLogQuery, type JobLogResp, listGroup, listJobLog, retryJob, stopJob } from '@/apis/schedule' | ||||
| import type { TableInstanceColumns } from '@/components/GiTable/type' | ||||
| import { useTable } from '@/hooks' | ||||
| import { useDict } from '@/hooks/app' | ||||
|   | ||||
| @@ -99,7 +99,7 @@ import { useWindowSize } from '@vueuse/core' | ||||
| import { type FileItem, Message } from '@arco-design/web-vue' | ||||
| import { VueCropper } from 'vue-cropper' | ||||
| import BasicInfoUpdateModal from './BasicInfoUpdateModal.vue' | ||||
| import { uploadAvatar } from '@/apis' | ||||
| import { uploadAvatar } from '@/apis/system' | ||||
| import 'vue-cropper/dist/index.css' | ||||
| import { useUserStore } from '@/stores' | ||||
| import getAvatar from '@/utils/avatar' | ||||
|   | ||||
| @@ -16,7 +16,7 @@ | ||||
| <script setup lang="ts"> | ||||
| import { useWindowSize } from '@vueuse/core' | ||||
| import { Message } from '@arco-design/web-vue' | ||||
| import { updateUserBaseInfo } from '@/apis' | ||||
| import { updateUserBaseInfo } from '@/apis/system' | ||||
| import { type Columns, GiForm } from '@/components/GiForm' | ||||
| import { useForm } from '@/hooks' | ||||
| import { useUserStore } from '@/stores' | ||||
|   | ||||
| @@ -107,7 +107,7 @@ import { | ||||
|   listOption, | ||||
|   resetOptionValue, | ||||
|   updateOption | ||||
| } from '@/apis' | ||||
| } from '@/apis/system' | ||||
| import { useAppStore } from '@/stores' | ||||
| import { useForm } from '@/hooks' | ||||
| import { fileToBase64 } from '@/utils' | ||||
|   | ||||
| @@ -61,7 +61,7 @@ import { | ||||
|   listOption, | ||||
|   resetOptionValue, | ||||
|   updateOption | ||||
| } from '@/apis' | ||||
| } from '@/apis/system' | ||||
| import { useForm } from '@/hooks' | ||||
|  | ||||
| defineOptions({ name: 'MailSetting' }) | ||||
|   | ||||
| @@ -81,7 +81,7 @@ | ||||
| <script setup lang="ts"> | ||||
| import { useWindowSize } from '@vueuse/core' | ||||
| import { type FormInstance, Message, Modal } from '@arco-design/web-vue' | ||||
| import { type OptionResp, type SecurityConfig, listOption, resetOptionValue, updateOption } from '@/apis' | ||||
| import { type OptionResp, type SecurityConfig, listOption, resetOptionValue, updateOption } from '@/apis/system' | ||||
| import { useForm } from '@/hooks' | ||||
|  | ||||
| defineOptions({ name: 'SecuritySetting' }) | ||||
|   | ||||
| @@ -16,7 +16,7 @@ | ||||
|  | ||||
| <script setup lang="ts"> | ||||
| import { Message } from '@arco-design/web-vue' | ||||
| import { addDept, getDept, updateDept } from '@/apis' | ||||
| import { addDept, getDept, updateDept } from '@/apis/system' | ||||
| import { type Columns, GiForm } from '@/components/GiForm' | ||||
| import { useForm } from '@/hooks' | ||||
| import { useDept } from '@/hooks/app' | ||||
|   | ||||
| @@ -74,7 +74,7 @@ | ||||
|  | ||||
| <script setup lang="ts"> | ||||
| import DeptAddModal from './DeptAddModal.vue' | ||||
| import { type DeptQuery, type DeptResp, deleteDept, exportDept, listDept } from '@/apis' | ||||
| import { type DeptQuery, type DeptResp, deleteDept, exportDept, listDept } from '@/apis/system' | ||||
| import type GiTable from '@/components/GiTable/index.vue' | ||||
| import type { TableInstanceColumns } from '@/components/GiTable/type' | ||||
| import { useDownload, useTable } from '@/hooks' | ||||
|   | ||||
| @@ -24,7 +24,7 @@ | ||||
|  | ||||
| <script setup lang="ts"> | ||||
| import { Message } from '@arco-design/web-vue' | ||||
| import { addDictItem, getDictItem, updateDictItem } from '@/apis' | ||||
| import { addDictItem, getDictItem, updateDictItem } from '@/apis/system' | ||||
| import { type Columns, GiForm } from '@/components/GiForm' | ||||
| import { useForm } from '@/hooks' | ||||
|  | ||||
|   | ||||
| @@ -64,7 +64,7 @@ | ||||
| <script setup lang="ts"> | ||||
| import DictTree from './tree/index.vue' | ||||
| import DictItemAddModal from './DictItemAddModal.vue' | ||||
| import { type DictItemQuery, type DictItemResp, deleteDictItem, listDictItem } from '@/apis' | ||||
| import { type DictItemQuery, type DictItemResp, deleteDictItem, listDictItem } from '@/apis/system' | ||||
| import type { TableInstanceColumns } from '@/components/GiTable/type' | ||||
| import { useTable } from '@/hooks' | ||||
| import { isMobile } from '@/utils' | ||||
|   | ||||
| @@ -16,7 +16,7 @@ | ||||
|  | ||||
| <script setup lang="ts"> | ||||
| import { Message } from '@arco-design/web-vue' | ||||
| import { addDict, getDict, updateDict } from '@/apis' | ||||
| import { addDict, getDict, updateDict } from '@/apis/system' | ||||
| import { type Columns, GiForm } from '@/components/GiForm' | ||||
| import { useForm } from '@/hooks' | ||||
|  | ||||
|   | ||||
| @@ -13,7 +13,7 @@ | ||||
| </template> | ||||
|  | ||||
| <script lang="ts" setup> | ||||
| import type { DictResp } from '@/apis' | ||||
| import type { DictResp } from '@/apis/system' | ||||
|  | ||||
| interface Props { | ||||
|   data: DictResp | ||||
|   | ||||
| @@ -42,7 +42,7 @@ import type { TreeNodeData } from '@arco-design/web-vue' | ||||
| import { mapTree } from 'xe-utils' | ||||
| import DictAddModal from './DictAddModal.vue' | ||||
| import RightMenu from './RightMenu.vue' | ||||
| import { type DictQuery, type DictResp, deleteDict, listDict } from '@/apis' | ||||
| import { type DictQuery, type DictResp, deleteDict, listDict } from '@/apis/system' | ||||
| import has from '@/utils/has' | ||||
|  | ||||
| interface Props { | ||||
|   | ||||
| @@ -21,7 +21,7 @@ | ||||
|  | ||||
| <script setup lang="ts"> | ||||
| import { useDraggable, useElementSize, useWindowSize } from '@vueuse/core' | ||||
| import type { FileItem } from '@/apis' | ||||
| import type { FileItem } from '@/apis/system' | ||||
|  | ||||
| interface Props { | ||||
|   data: FileItem | ||||
|   | ||||
| @@ -3,7 +3,7 @@ import { createApp } from 'vue' | ||||
| import ArcoVueIcon from '@arco-design/web-vue/es/icon' | ||||
| import ArcoVue from '@arco-design/web-vue' | ||||
| import ModalContent from './ModalContent.vue' | ||||
| import type { FileItem } from '@/apis' | ||||
| import type { FileItem } from '@/apis/system' | ||||
|  | ||||
| function createModal<T extends { callback?: () => void }>(component: Component, options?: T) { | ||||
|   // 创建一个挂载容器 | ||||
|   | ||||
| @@ -22,7 +22,7 @@ | ||||
|  | ||||
| <script setup lang="ts"> | ||||
| import FileImage from '../../main/FileMain/FileImage.vue' | ||||
| import type { FileItem } from '@/apis' | ||||
| import type { FileItem } from '@/apis/system' | ||||
| import { formatFileSize } from '@/utils' | ||||
|  | ||||
| interface Props { | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| import { h } from 'vue' | ||||
| import { Modal } from '@arco-design/web-vue' | ||||
| import ModalContent from './ModalContent.vue' | ||||
| import type { FileItem } from '@/apis' | ||||
| import type { FileItem } from '@/apis/system' | ||||
|  | ||||
| /** 打开 详情 弹窗 */ | ||||
| export function openFileDetailModal(fileItem: FileItem) { | ||||
|   | ||||
| @@ -15,7 +15,7 @@ | ||||
|  | ||||
| <script lang="ts" setup> | ||||
| import type { FormInstance } from '@arco-design/web-vue' | ||||
| import type { FileItem } from '@/apis' | ||||
| import type { FileItem } from '@/apis/system' | ||||
|  | ||||
| interface Props { | ||||
|   data: FileItem | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| import { h, ref } from 'vue' | ||||
| import { Message, Modal } from '@arco-design/web-vue' | ||||
| import ModalContent from './ModalContent.vue' | ||||
| import { type FileItem, updateFile } from '@/apis' | ||||
| import { type FileItem, updateFile } from '@/apis/system' | ||||
|  | ||||
| export function openFileRenameModal(data: FileItem, callback?: () => void) { | ||||
|   const ModalContentRef = ref<InstanceType<typeof ModalContent>>() | ||||
|   | ||||
| @@ -4,7 +4,7 @@ | ||||
|  | ||||
| <script lang="ts" setup> | ||||
| import Player from 'xgplayer' | ||||
| import type { FileItem } from '@/apis' | ||||
| import type { FileItem } from '@/apis/system' | ||||
|  | ||||
| interface Props { | ||||
|   data: FileItem | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| import { h } from 'vue' | ||||
| import { Modal } from '@arco-design/web-vue' | ||||
| import ModalContent from './ModalContent.vue' | ||||
| import type { FileItem } from '@/apis' | ||||
| import type { FileItem } from '@/apis/system' | ||||
|  | ||||
| export function previewFileVideoModal(data: FileItem) { | ||||
|   return Modal.open({ | ||||
|   | ||||
| @@ -24,7 +24,7 @@ import { LegendComponent, TitleComponent, TooltipComponent } from 'echarts/compo | ||||
| import { CanvasRenderer } from 'echarts/renderers' | ||||
| import { FileTypeList } from '@/constant/file' | ||||
| import { useChart } from '@/hooks' | ||||
| import { type FileStatisticsResp, getFileStatistics } from '@/apis' | ||||
| import { type FileStatisticsResp, getFileStatistics } from '@/apis/system' | ||||
| import { formatFileSize } from '@/utils' | ||||
|  | ||||
| use([TitleComponent, TooltipComponent, LegendComponent, PieChart, CanvasRenderer]) | ||||
|   | ||||
| @@ -42,7 +42,7 @@ | ||||
| <script setup lang="ts"> | ||||
| import FileImage from './FileImage.vue' | ||||
| import FileRightMenu from './FileRightMenu.vue' | ||||
| import type { FileItem } from '@/apis' | ||||
| import type { FileItem } from '@/apis/system' | ||||
|  | ||||
| interface Props { | ||||
|   data?: FileItem[] | ||||
|   | ||||
| @@ -5,7 +5,7 @@ | ||||
|  | ||||
| <script setup lang="ts"> | ||||
| import { FileIcon, ImageTypes } from '@/constant/file' | ||||
| import type { FileItem } from '@/apis' | ||||
| import type { FileItem } from '@/apis/system' | ||||
|  | ||||
| interface Props { | ||||
|   data: FileItem | ||||
|   | ||||
| @@ -67,7 +67,7 @@ | ||||
| import type { TableInstance, TableRowSelection } from '@arco-design/web-vue' | ||||
| import FileImage from './FileImage.vue' | ||||
| import FileRightMenu from './FileRightMenu.vue' | ||||
| import type { FileItem } from '@/apis' | ||||
| import type { FileItem } from '@/apis/system' | ||||
| import { formatFileSize } from '@/utils' | ||||
|  | ||||
| interface Props { | ||||
|   | ||||
| @@ -35,7 +35,7 @@ | ||||
|  | ||||
| <script setup lang="ts"> | ||||
| import { ref } from 'vue' | ||||
| import type { FileItem } from '@/apis' | ||||
| import type { FileItem } from '@/apis/system' | ||||
| import { encodeByBase64 } from '@/utils/encrypt' | ||||
|  | ||||
| const emit = defineEmits(['download']) | ||||
|   | ||||
| @@ -10,7 +10,7 @@ | ||||
| <script setup lang="ts"> | ||||
| import GiOption from '@/components/GiOption/index.vue' | ||||
| import GiOptionItem from '@/components/GiOptionItem/index.vue' | ||||
| import type { FileItem } from '@/apis' | ||||
| import type { FileItem } from '@/apis/system' | ||||
|  | ||||
| interface Props { | ||||
|   data?: FileItem | ||||
|   | ||||
| @@ -1,5 +1,5 @@ | ||||
| import { computed, ref } from 'vue' | ||||
| import type { FileItem } from '@/apis' | ||||
| import type { FileItem } from '@/apis/system' | ||||
|  | ||||
| type Mode = 'grid' | 'list' | ||||
|  | ||||
|   | ||||
| @@ -123,7 +123,7 @@ | ||||
| <script setup lang="ts"> | ||||
| import { type FormInstance, Message } from '@arco-design/web-vue' | ||||
| import { mapTree } from 'xe-utils' | ||||
| import { type MenuResp, addMenu, getMenu, updateMenu } from '@/apis' | ||||
| import { type MenuResp, addMenu, getMenu, updateMenu } from '@/apis/system' | ||||
| import { useForm } from '@/hooks' | ||||
| import { filterTree, transformPathToName } from '@/utils' | ||||
|  | ||||
|   | ||||
| @@ -85,7 +85,7 @@ | ||||
|  | ||||
| <script setup lang="ts"> | ||||
| import MenuAddModal from './MenuAddModal.vue' | ||||
| import { type MenuQuery, type MenuResp, deleteMenu, listMenu } from '@/apis' | ||||
| import { type MenuQuery, type MenuResp, deleteMenu, listMenu } from '@/apis/system' | ||||
| import type GiTable from '@/components/GiTable/index.vue' | ||||
| import type { TableInstanceColumns } from '@/components/GiTable/type' | ||||
| import { DisEnableStatusList } from '@/constant/common' | ||||
|   | ||||
| @@ -68,7 +68,7 @@ | ||||
| import { type FormInstance, Message } from '@arco-design/web-vue' | ||||
| import { MdEditor } from 'md-editor-v3' | ||||
| import { useWindowSize } from '@vueuse/core' | ||||
| import { addNotice, getNotice, updateNotice } from '@/apis' | ||||
| import { addNotice, getNotice, updateNotice } from '@/apis/system' | ||||
| import { useForm } from '@/hooks' | ||||
| import { useDict } from '@/hooks/app' | ||||
|  | ||||
|   | ||||
| @@ -38,7 +38,7 @@ | ||||
| <script setup lang="ts"> | ||||
| import { MdPreview } from 'md-editor-v3' | ||||
| import { useWindowSize } from '@vueuse/core' | ||||
| import { type NoticeResp, getNotice } from '@/apis' | ||||
| import { type NoticeResp, getNotice } from '@/apis/system' | ||||
|  | ||||
| const { width } = useWindowSize() | ||||
| const dataDetail = ref<NoticeResp>() | ||||
|   | ||||
| @@ -56,7 +56,7 @@ | ||||
| <script lang="ts" setup> | ||||
| import NoticeAddModal from './NoticeAddModal.vue' | ||||
| import NoticeDetailModal from './NoticeDetailModal.vue' | ||||
| import { type NoticeQuery, type NoticeResp, deleteNotice, listNotice } from '@/apis' | ||||
| import { type NoticeQuery, type NoticeResp, deleteNotice, listNotice } from '@/apis/system' | ||||
| import type { TableInstanceColumns } from '@/components/GiTable/type' | ||||
| import { useTable } from '@/hooks' | ||||
| import { useDict } from '@/hooks/app' | ||||
|   | ||||
| @@ -23,7 +23,7 @@ import { Message } from '@arco-design/web-vue' | ||||
| import AiEditor from '../components/edit/index.vue' | ||||
| import { useTabsStore } from '@/stores' | ||||
| import { type Columns, GiForm, type Options } from '@/components/GiForm' | ||||
| import { addNotice, getNotice, updateNotice } from '@/apis' | ||||
| import { addNotice, getNotice, updateNotice } from '@/apis/system' | ||||
| import { useForm } from '@/hooks' | ||||
| import { useDict } from '@/hooks/app' | ||||
|  | ||||
|   | ||||
| @@ -34,7 +34,7 @@ | ||||
| <script setup lang="tsx"> | ||||
| import AiEditor from '../components/detail/index.vue' | ||||
| import { useTabsStore } from '@/stores' | ||||
| import { getNotice } from '@/apis' | ||||
| import { getNotice } from '@/apis/system' | ||||
| import { useForm } from '@/hooks' | ||||
|  | ||||
| const containerRef = ref<HTMLElement | null>() | ||||
|   | ||||
| @@ -104,7 +104,7 @@ | ||||
| <script setup lang="ts"> | ||||
| import { type FormInstance, Message, type TreeNodeData } from '@arco-design/web-vue' | ||||
| import { useWindowSize } from '@vueuse/core' | ||||
| import { addRole, getRole, updateRole } from '@/apis' | ||||
| import { addRole, getRole, updateRole } from '@/apis/system' | ||||
| import { useForm } from '@/hooks' | ||||
| import { useDept, useDict, useMenu } from '@/hooks/app' | ||||
|  | ||||
|   | ||||
| @@ -53,7 +53,7 @@ | ||||
|  | ||||
| <script lang="ts" setup> | ||||
| import { useWindowSize } from '@vueuse/core' | ||||
| import { type RoleDetailResp, getRole } from '@/apis' | ||||
| import { type RoleDetailResp, getRole } from '@/apis/system' | ||||
| import { useDept, useDict, useMenu } from '@/hooks/app' | ||||
|  | ||||
| const { width } = useWindowSize() | ||||
|   | ||||
| @@ -83,7 +83,7 @@ | ||||
| <script setup lang="ts"> | ||||
| import { type FormInstance, Message, type TreeNodeData } from '@arco-design/web-vue' | ||||
| import { useWindowSize } from '@vueuse/core' | ||||
| import { addRole, getRole, updateRole } from '@/apis' | ||||
| import { addRole, getRole, updateRole } from '@/apis/system' | ||||
| import { useForm } from '@/hooks' | ||||
| import { useDept, useDict, useMenu } from '@/hooks/app' | ||||
|  | ||||
|   | ||||
| @@ -60,7 +60,7 @@ | ||||
| import RoleUpdateDrawer from './RoleUpdateDrawer.vue' | ||||
| import RoleDetailDrawer from './RoleDetailDrawer.vue' | ||||
| import RoleAddModal from './RoleAddModal.vue' | ||||
| import { type RoleQuery, type RoleResp, deleteRole, listRole } from '@/apis' | ||||
| import { type RoleQuery, type RoleResp, deleteRole, listRole } from '@/apis/system' | ||||
| import type { TableInstanceColumns } from '@/components/GiTable/type' | ||||
| import { useTable } from '@/hooks' | ||||
| import { useDict } from '@/hooks/app' | ||||
|   | ||||
| @@ -94,7 +94,7 @@ | ||||
| <script setup lang="ts"> | ||||
| import { type FormInstance, Message } from '@arco-design/web-vue' | ||||
| import { useWindowSize } from '@vueuse/core' | ||||
| import { addStorage, getStorage, updateStorage } from '@/apis' | ||||
| import { addStorage, getStorage, updateStorage } from '@/apis/system' | ||||
| import { useForm } from '@/hooks' | ||||
| import { useDict } from '@/hooks/app' | ||||
| import { encryptByRsa } from '@/utils/encrypt' | ||||
|   | ||||
| @@ -68,7 +68,7 @@ | ||||
|  | ||||
| <script setup lang="ts"> | ||||
| import StorageAddDrawer from './StorageAddDrawer.vue' | ||||
| import { type StorageQuery, type StorageResp, deleteStorage, listStorage } from '@/apis' | ||||
| import { type StorageQuery, type StorageResp, deleteStorage, listStorage } from '@/apis/system' | ||||
| import type { TableInstanceColumns } from '@/components/GiTable/type' | ||||
| import { useTable } from '@/hooks' | ||||
| import { useDict } from '@/hooks/app' | ||||
|   | ||||
| @@ -78,7 +78,7 @@ | ||||
| <script setup lang="ts"> | ||||
| import { type FormInstance, Message, type TreeNodeData } from '@arco-design/web-vue' | ||||
| import { useWindowSize } from '@vueuse/core' | ||||
| import { addUser, getUser, updateUser } from '@/apis' | ||||
| import { addUser, getUser, updateUser } from '@/apis/system' | ||||
| import type { Gender, Status } from '@/types/global' | ||||
| import { useForm } from '@/hooks' | ||||
| import { useDept, useRole } from '@/hooks/app' | ||||
|   | ||||
| @@ -30,7 +30,7 @@ | ||||
|  | ||||
| <script lang="ts" setup> | ||||
| import { useWindowSize } from '@vueuse/core' | ||||
| import { type UserDetailResp, getUser } from '@/apis' | ||||
| import { type UserDetailResp, getUser } from '@/apis/system' | ||||
|  | ||||
| const { width } = useWindowSize() | ||||
|  | ||||
|   | ||||
| @@ -84,7 +84,7 @@ | ||||
| <script setup lang="ts"> | ||||
| import { type FormInstance, Message, type RequestOption } from '@arco-design/web-vue' | ||||
| import { useWindowSize } from '@vueuse/core' | ||||
| import { type UserImportResp, downloadImportUserTemplate, importUser, parseImportUser } from '@/apis' | ||||
| import { type UserImportResp, downloadImportUserTemplate, importUser, parseImportUser } from '@/apis/system' | ||||
| import { useDownload, useForm } from '@/hooks' | ||||
|  | ||||
| const emit = defineEmits<{ | ||||
|   | ||||
| @@ -16,7 +16,7 @@ | ||||
|  | ||||
| <script setup lang="ts"> | ||||
| import { Message } from '@arco-design/web-vue' | ||||
| import { resetUserPwd } from '@/apis' | ||||
| import { resetUserPwd } from '@/apis/system' | ||||
| import { type Columns, GiForm } from '@/components/GiForm' | ||||
| import { useForm } from '@/hooks' | ||||
| import { encryptByRsa } from '@/utils/encrypt' | ||||
|   | ||||
| @@ -96,7 +96,7 @@ import UserAddDrawer from './UserAddDrawer.vue' | ||||
| import UserImportDrawer from './UserImportDrawer.vue' | ||||
| import UserDetailDrawer from './UserDetailDrawer.vue' | ||||
| import UserResetPwdModal from './UserResetPwdModal.vue' | ||||
| import { type UserQuery, type UserResp, deleteUser, exportUser, listUser } from '@/apis' | ||||
| import { type UserQuery, type UserResp, deleteUser, exportUser, listUser } from '@/apis/system' | ||||
| import type { TableInstanceColumns } from '@/components/GiTable/type' | ||||
| import { useDownload, useTable } from '@/hooks' | ||||
| import { isMobile } from '@/utils' | ||||
|   | ||||
| @@ -143,7 +143,7 @@ | ||||
| <script setup lang="ts"> | ||||
| import { type FormInstance, Message } from '@arco-design/web-vue' | ||||
| import { useWindowSize } from '@vueuse/core' | ||||
| import { type FieldConfigResp, type GeneratorConfigResp, getGenConfig, listFieldConfig, listFieldConfigDict, saveGenConfig } from '@/apis' | ||||
| import { type FieldConfigResp, type GeneratorConfigResp, getGenConfig, listFieldConfig, listFieldConfigDict, saveGenConfig } from '@/apis/tool' | ||||
| import type { LabelValueState } from '@/types/global' | ||||
| import type { TableInstanceColumns } from '@/components/GiTable/type' | ||||
| import { useForm } from '@/hooks' | ||||
|   | ||||
| @@ -66,7 +66,7 @@ | ||||
| <script setup lang="ts"> | ||||
| import { Message, type TreeNodeData } from '@arco-design/web-vue' | ||||
| import { useClipboard } from '@vueuse/core' | ||||
| import { type GeneratePreviewResp, genPreview } from '@/apis' | ||||
| import { type GeneratePreviewResp, genPreview } from '@/apis/tool' | ||||
|  | ||||
| // 生成 | ||||
| const emit = defineEmits<{ (e: 'generate', tableNames: string[]): void }>() | ||||
|   | ||||
| @@ -40,7 +40,7 @@ | ||||
| <script setup lang="ts"> | ||||
| import GenConfigDrawer from './GenConfigDrawer.vue' | ||||
| import GenPreviewModal from './GenPreviewModal.vue' | ||||
| import { generate, listGenerator } from '@/apis' | ||||
| import { generate, listGenerator } from '@/apis/tool' | ||||
| import type { TableInstanceColumns } from '@/components/GiTable/type' | ||||
| import { useTable } from '@/hooks' | ||||
| import { isMobile } from '@/utils' | ||||
|   | ||||
		Reference in New Issue
	
	Block a user