first commit
This commit is contained in:
19
src/api/system/area/index.ts
Normal file
19
src/api/system/area/index.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import { http } from '@/http/http'
|
||||
|
||||
/** 地区信息 */
|
||||
export interface Area {
|
||||
id: number
|
||||
name: string
|
||||
parentId?: number
|
||||
children?: Area[]
|
||||
}
|
||||
|
||||
/** 获得地区树 */
|
||||
export function getAreaTree() {
|
||||
return http.get<Area[]>('/system/area/tree')
|
||||
}
|
||||
|
||||
/** 获得 IP 对应的地区名 */
|
||||
export function getAreaByIp(ip: string) {
|
||||
return http.get<string>(`/system/area/get-by-ip?ip=${ip}`)
|
||||
}
|
||||
45
src/api/system/dept/index.ts
Normal file
45
src/api/system/dept/index.ts
Normal file
@@ -0,0 +1,45 @@
|
||||
import { http } from '@/http/http'
|
||||
|
||||
/** 部门信息 */
|
||||
export interface Dept {
|
||||
id?: number
|
||||
name: string
|
||||
parentId: number
|
||||
status: number
|
||||
sort: number
|
||||
leaderUserId?: number
|
||||
phone?: string
|
||||
email?: string
|
||||
createTime?: Date
|
||||
children?: Dept[]
|
||||
}
|
||||
|
||||
/** 获取部门列表 */
|
||||
export function getDeptList(params?: { name?: string, status?: number }) {
|
||||
return http.get<Dept[]>('/system/dept/list', params)
|
||||
}
|
||||
|
||||
/** 获取部门精简列表 */
|
||||
export function getSimpleDeptList() {
|
||||
return http.get<Dept[]>('/system/dept/simple-list')
|
||||
}
|
||||
|
||||
/** 获取部门详情 */
|
||||
export function getDept(id: number) {
|
||||
return http.get<Dept>(`/system/dept/get?id=${id}`)
|
||||
}
|
||||
|
||||
/** 创建部门 */
|
||||
export function createDept(data: Dept) {
|
||||
return http.post<number>('/system/dept/create', data)
|
||||
}
|
||||
|
||||
/** 更新部门 */
|
||||
export function updateDept(data: Dept) {
|
||||
return http.put<boolean>('/system/dept/update', data)
|
||||
}
|
||||
|
||||
/** 删除部门 */
|
||||
export function deleteDept(id: number) {
|
||||
return http.delete<boolean>(`/system/dept/delete?id=${id}`)
|
||||
}
|
||||
46
src/api/system/dict/data/index.ts
Normal file
46
src/api/system/dict/data/index.ts
Normal file
@@ -0,0 +1,46 @@
|
||||
import type { PageParam, PageResult } from '@/http/types'
|
||||
import { http } from '@/http/http'
|
||||
|
||||
/** 字典数据 */
|
||||
export interface DictData {
|
||||
id?: number
|
||||
dictType: string
|
||||
label: string
|
||||
value: string
|
||||
colorType?: string
|
||||
cssClass?: string
|
||||
sort?: number
|
||||
status: number
|
||||
remark?: string
|
||||
createTime?: Date
|
||||
}
|
||||
|
||||
/** 查询字典数据(精简)列表 */
|
||||
export function getSimpleDictDataList() {
|
||||
return http.get<DictData[]>('/system/dict-data/simple-list')
|
||||
}
|
||||
|
||||
/** 查询字典数据分页列表 */
|
||||
export function getDictDataPage(params: PageParam) {
|
||||
return http.get<PageResult<DictData>>('/system/dict-data/page', params)
|
||||
}
|
||||
|
||||
/** 查询字典数据详情 */
|
||||
export function getDictData(id: number) {
|
||||
return http.get<DictData>(`/system/dict-data/get?id=${id}`)
|
||||
}
|
||||
|
||||
/** 新增字典数据 */
|
||||
export function createDictData(data: DictData) {
|
||||
return http.post<number>('/system/dict-data/create', data)
|
||||
}
|
||||
|
||||
/** 修改字典数据 */
|
||||
export function updateDictData(data: DictData) {
|
||||
return http.put<boolean>('/system/dict-data/update', data)
|
||||
}
|
||||
|
||||
/** 删除字典数据 */
|
||||
export function deleteDictData(id: number) {
|
||||
return http.delete<boolean>(`/system/dict-data/delete?id=${id}`)
|
||||
}
|
||||
42
src/api/system/dict/type/index.ts
Normal file
42
src/api/system/dict/type/index.ts
Normal file
@@ -0,0 +1,42 @@
|
||||
import type { PageParam, PageResult } from '@/http/types'
|
||||
import { http } from '@/http/http'
|
||||
|
||||
/** 字典类型 */
|
||||
export interface DictType {
|
||||
id?: number
|
||||
name: string
|
||||
type: string
|
||||
status: number
|
||||
remark?: string
|
||||
createTime?: Date
|
||||
}
|
||||
|
||||
/** 查询字典类型(精简)列表 */
|
||||
export function getSimpleDictTypeList() {
|
||||
return http.get<DictType[]>('/system/dict-type/list-all-simple')
|
||||
}
|
||||
|
||||
/** 查询字典类型分页列表 */
|
||||
export function getDictTypePage(params: PageParam) {
|
||||
return http.get<PageResult<DictType>>('/system/dict-type/page', params)
|
||||
}
|
||||
|
||||
/** 查询字典类型详情 */
|
||||
export function getDictType(id: number) {
|
||||
return http.get<DictType>(`/system/dict-type/get?id=${id}`)
|
||||
}
|
||||
|
||||
/** 新增字典类型 */
|
||||
export function createDictType(data: DictType) {
|
||||
return http.post<number>('/system/dict-type/create', data)
|
||||
}
|
||||
|
||||
/** 修改字典类型 */
|
||||
export function updateDictType(data: DictType) {
|
||||
return http.put<boolean>('/system/dict-type/update', data)
|
||||
}
|
||||
|
||||
/** 删除字典类型 */
|
||||
export function deleteDictType(id: number) {
|
||||
return http.delete<boolean>(`/system/dict-type/delete?id=${id}`)
|
||||
}
|
||||
26
src/api/system/login-log/index.ts
Normal file
26
src/api/system/login-log/index.ts
Normal file
@@ -0,0 +1,26 @@
|
||||
import type { PageParam, PageResult } from '@/http/types'
|
||||
import { http } from '@/http/http'
|
||||
|
||||
/** 登录日志信息 */
|
||||
export interface LoginLog {
|
||||
id?: number
|
||||
traceId?: string
|
||||
userId?: number
|
||||
userType?: number
|
||||
logType?: number
|
||||
username?: string
|
||||
userIp?: string
|
||||
userAgent?: string
|
||||
result?: number
|
||||
createTime?: Date
|
||||
}
|
||||
|
||||
/** 获取登录日志分页列表 */
|
||||
export function getLoginLogPage(params: PageParam) {
|
||||
return http.get<PageResult<LoginLog>>('/system/login-log/page', params)
|
||||
}
|
||||
|
||||
/** 获取登录日志详情 */
|
||||
export function getLoginLog(id: number) {
|
||||
return http.get<LoginLog>(`/system/login-log/get?id=${id}`)
|
||||
}
|
||||
45
src/api/system/mail/account/index.ts
Normal file
45
src/api/system/mail/account/index.ts
Normal file
@@ -0,0 +1,45 @@
|
||||
import type { PageParam, PageResult } from '@/http/types'
|
||||
import { http } from '@/http/http'
|
||||
|
||||
/** 邮箱账号信息 */
|
||||
export interface MailAccount {
|
||||
id?: number
|
||||
mail: string
|
||||
username: string
|
||||
password?: string
|
||||
host: string
|
||||
port: number
|
||||
sslEnable: boolean
|
||||
starttlsEnable: boolean
|
||||
createTime?: string
|
||||
}
|
||||
|
||||
/** 获取邮箱账号分页列表 */
|
||||
export function getMailAccountPage(params: PageParam) {
|
||||
return http.get<PageResult<MailAccount>>('/system/mail-account/page', params)
|
||||
}
|
||||
|
||||
/** 获取邮箱账号(精简)列表 */
|
||||
export function getSimpleMailAccountList() {
|
||||
return http.get<MailAccount[]>('/system/mail-account/simple-list')
|
||||
}
|
||||
|
||||
/** 获取邮箱账号详情 */
|
||||
export function getMailAccount(id: number) {
|
||||
return http.get<MailAccount>(`/system/mail-account/get?id=${id}`)
|
||||
}
|
||||
|
||||
/** 创建邮箱账号 */
|
||||
export function createMailAccount(data: MailAccount) {
|
||||
return http.post<number>('/system/mail-account/create', data)
|
||||
}
|
||||
|
||||
/** 更新邮箱账号 */
|
||||
export function updateMailAccount(data: MailAccount) {
|
||||
return http.put<boolean>('/system/mail-account/update', data)
|
||||
}
|
||||
|
||||
/** 删除邮箱账号 */
|
||||
export function deleteMailAccount(id: number) {
|
||||
return http.delete<boolean>(`/system/mail-account/delete?id=${id}`)
|
||||
}
|
||||
34
src/api/system/mail/log/index.ts
Normal file
34
src/api/system/mail/log/index.ts
Normal file
@@ -0,0 +1,34 @@
|
||||
import type { PageParam, PageResult } from '@/http/types'
|
||||
import { http } from '@/http/http'
|
||||
|
||||
/** 邮件日志信息 */
|
||||
export interface MailLog {
|
||||
id?: number
|
||||
userId?: number
|
||||
userType?: number
|
||||
templateId?: number
|
||||
templateCode?: string
|
||||
templateTitle?: string
|
||||
templateContent?: string
|
||||
templateParams?: Record<string, any>
|
||||
accountId?: number
|
||||
fromMail?: string
|
||||
toMails?: string[]
|
||||
ccMails?: string[]
|
||||
bccMails?: string[]
|
||||
sendStatus?: number
|
||||
sendTime?: string
|
||||
sendMessageId?: string
|
||||
sendException?: string
|
||||
createTime?: string
|
||||
}
|
||||
|
||||
/** 获取邮件日志分页列表 */
|
||||
export function getMailLogPage(params: PageParam) {
|
||||
return http.get<PageResult<MailLog>>('/system/mail-log/page', params)
|
||||
}
|
||||
|
||||
/** 获取邮件日志详情 */
|
||||
export function getMailLog(id: number) {
|
||||
return http.get<MailLog>(`/system/mail-log/get?id=${id}`)
|
||||
}
|
||||
56
src/api/system/mail/template/index.ts
Normal file
56
src/api/system/mail/template/index.ts
Normal file
@@ -0,0 +1,56 @@
|
||||
import type { PageParam, PageResult } from '@/http/types'
|
||||
import { http } from '@/http/http'
|
||||
|
||||
/** 邮件模板信息 */
|
||||
export interface MailTemplate {
|
||||
id?: number
|
||||
name: string
|
||||
code: string
|
||||
accountId?: number
|
||||
nickname?: string
|
||||
title: string
|
||||
content: string
|
||||
status: number
|
||||
remark?: string
|
||||
params?: string[]
|
||||
createTime?: string
|
||||
}
|
||||
|
||||
/** 发送邮件请求 */
|
||||
export interface MailSendReqVO {
|
||||
templateCode: string
|
||||
templateParams: Record<string, any>
|
||||
toMails: string[]
|
||||
ccMails?: string[]
|
||||
bccMails?: string[]
|
||||
}
|
||||
|
||||
/** 获取邮件模板分页列表 */
|
||||
export function getMailTemplatePage(params: PageParam) {
|
||||
return http.get<PageResult<MailTemplate>>('/system/mail-template/page', params)
|
||||
}
|
||||
|
||||
/** 获取邮件模板详情 */
|
||||
export function getMailTemplate(id: number) {
|
||||
return http.get<MailTemplate>(`/system/mail-template/get?id=${id}`)
|
||||
}
|
||||
|
||||
/** 创建邮件模板 */
|
||||
export function createMailTemplate(data: MailTemplate) {
|
||||
return http.post<number>('/system/mail-template/create', data)
|
||||
}
|
||||
|
||||
/** 更新邮件模板 */
|
||||
export function updateMailTemplate(data: MailTemplate) {
|
||||
return http.put<boolean>('/system/mail-template/update', data)
|
||||
}
|
||||
|
||||
/** 删除邮件模板 */
|
||||
export function deleteMailTemplate(id: number) {
|
||||
return http.delete<boolean>(`/system/mail-template/delete?id=${id}`)
|
||||
}
|
||||
|
||||
/** 发送邮件 */
|
||||
export function sendMail(data: MailSendReqVO) {
|
||||
return http.post<number>('/system/mail-template/send-mail', data)
|
||||
}
|
||||
51
src/api/system/menu/index.ts
Normal file
51
src/api/system/menu/index.ts
Normal file
@@ -0,0 +1,51 @@
|
||||
import { http } from '@/http/http'
|
||||
|
||||
/** 菜单信息 */
|
||||
export interface Menu {
|
||||
id?: number
|
||||
name: string
|
||||
permission: string
|
||||
type: number
|
||||
sort: number
|
||||
parentId: number
|
||||
path: string
|
||||
icon: string
|
||||
component: string
|
||||
componentName?: string
|
||||
status: number
|
||||
visible: boolean
|
||||
keepAlive: boolean
|
||||
alwaysShow?: boolean
|
||||
createTime?: Date
|
||||
children?: Menu[]
|
||||
}
|
||||
|
||||
/** 获取菜单列表 */
|
||||
export function getMenuList(params?: { name?: string, status?: number }) {
|
||||
return http.get<Menu[]>('/system/menu/list', params)
|
||||
}
|
||||
|
||||
/** 获取菜单精简列表 */
|
||||
export function getSimpleMenuList() {
|
||||
return http.get<Menu[]>('/system/menu/simple-list')
|
||||
}
|
||||
|
||||
/** 获取菜单详情 */
|
||||
export function getMenu(id: number) {
|
||||
return http.get<Menu>(`/system/menu/get?id=${id}`)
|
||||
}
|
||||
|
||||
/** 创建菜单 */
|
||||
export function createMenu(data: Menu) {
|
||||
return http.post<number>('/system/menu/create', data)
|
||||
}
|
||||
|
||||
/** 更新菜单 */
|
||||
export function updateMenu(data: Menu) {
|
||||
return http.put<boolean>('/system/menu/update', data)
|
||||
}
|
||||
|
||||
/** 删除菜单 */
|
||||
export function deleteMenu(id: number) {
|
||||
return http.delete<boolean>(`/system/menu/delete?id=${id}`)
|
||||
}
|
||||
39
src/api/system/notice/index.ts
Normal file
39
src/api/system/notice/index.ts
Normal file
@@ -0,0 +1,39 @@
|
||||
import type { PageParam, PageResult } from '@/http/types'
|
||||
import { http } from '@/http/http'
|
||||
|
||||
const baseUrl = '/system/notice'
|
||||
|
||||
/** 通知公告信息 */
|
||||
export interface Notice {
|
||||
id?: number
|
||||
title: string
|
||||
content: string
|
||||
type: number
|
||||
status: number
|
||||
createTime?: Date
|
||||
}
|
||||
|
||||
/** 获取通知公告分页列表 */
|
||||
export function getNoticePage(params: PageParam) {
|
||||
return http.get<PageResult<Notice>>(`${baseUrl}/page`, params)
|
||||
}
|
||||
|
||||
/** 获取通知公告详情 */
|
||||
export function getNotice(id: number) {
|
||||
return http.get<Notice>(`${baseUrl}/get?id=${id}`)
|
||||
}
|
||||
|
||||
/** 创建通知公告 */
|
||||
export function createNotice(data: Notice) {
|
||||
return http.post<number>(`${baseUrl}/create`, data)
|
||||
}
|
||||
|
||||
/** 更新通知公告 */
|
||||
export function updateNotice(data: Notice) {
|
||||
return http.put<boolean>(`${baseUrl}/update`, data)
|
||||
}
|
||||
|
||||
/** 删除通知公告 */
|
||||
export function deleteNotice(id: number) {
|
||||
return http.delete<boolean>(`${baseUrl}/delete?id=${id}`)
|
||||
}
|
||||
54
src/api/system/notify/message/index.ts
Normal file
54
src/api/system/notify/message/index.ts
Normal file
@@ -0,0 +1,54 @@
|
||||
import type { PageParam, PageResult } from '@/http/types'
|
||||
import { http } from '@/http/http'
|
||||
|
||||
/** 站内信消息信息 */
|
||||
export interface NotifyMessage {
|
||||
id: number
|
||||
userId: number
|
||||
userType: number
|
||||
templateId: number
|
||||
templateCode: string
|
||||
templateNickname: string
|
||||
templateContent: string
|
||||
templateType: number
|
||||
templateParams: string
|
||||
readStatus: boolean
|
||||
readTime: Date
|
||||
createTime?: Date
|
||||
}
|
||||
|
||||
/** 查询站内信消息列表 */
|
||||
export function getNotifyMessagePage(params: PageParam) {
|
||||
return http.get<PageResult<NotifyMessage>>('/system/notify-message/page', params)
|
||||
}
|
||||
|
||||
/** 查询站内信消息详情 */
|
||||
export function getNotifyMessage(id: number) {
|
||||
return http.get<NotifyMessage>(`/system/notify-message/get`, { id })
|
||||
}
|
||||
|
||||
/** 获取我的站内信分页 */
|
||||
export function getMyNotifyMessagePage(params: PageParam) {
|
||||
return http.get<PageResult<NotifyMessage>>('/system/notify-message/my-page', params)
|
||||
}
|
||||
|
||||
/** 获取我的站内信详情 */
|
||||
export function getMyNotifyMessage(id: number) {
|
||||
return http.get<NotifyMessage>(`/system/notify-message/get`, { id })
|
||||
}
|
||||
|
||||
/** 批量标记站内信已读 */
|
||||
export function updateNotifyMessageRead(ids: number | number[]) {
|
||||
const idsArray = Array.isArray(ids) ? ids : [ids]
|
||||
return http.put<boolean>('/system/notify-message/update-read', undefined, { ids: idsArray })
|
||||
}
|
||||
|
||||
/** 标记所有站内信为已读 */
|
||||
export function updateAllNotifyMessageRead() {
|
||||
return http.put<boolean>('/system/notify-message/update-all-read')
|
||||
}
|
||||
|
||||
/** 获取当前用户的未读站内信数量 */
|
||||
export function getUnreadNotifyMessageCount() {
|
||||
return http.get<number>('/system/notify-message/get-unread-count')
|
||||
}
|
||||
54
src/api/system/notify/template/index.ts
Normal file
54
src/api/system/notify/template/index.ts
Normal file
@@ -0,0 +1,54 @@
|
||||
import type { PageParam, PageResult } from '@/http/types'
|
||||
import { http } from '@/http/http'
|
||||
|
||||
/** 站内信模板信息 */
|
||||
export interface NotifyTemplate {
|
||||
id?: number
|
||||
name: string
|
||||
nickname: string
|
||||
code: string
|
||||
content: string
|
||||
type?: number
|
||||
params?: string[]
|
||||
status: number
|
||||
remark?: string
|
||||
createTime?: Date
|
||||
}
|
||||
|
||||
/** 发送站内信请求 */
|
||||
export interface NotifySendReqVO {
|
||||
userId: number
|
||||
userType: number
|
||||
templateCode: string
|
||||
templateParams: Record<string, any>
|
||||
}
|
||||
|
||||
/** 查询站内信模板列表 */
|
||||
export function getNotifyTemplatePage(params: PageParam) {
|
||||
return http.get<PageResult<NotifyTemplate>>('/system/notify-template/page', params)
|
||||
}
|
||||
|
||||
/** 查询站内信模板详情 */
|
||||
export function getNotifyTemplate(id: number) {
|
||||
return http.get<NotifyTemplate>(`/system/notify-template/get`, { id })
|
||||
}
|
||||
|
||||
/** 新增站内信模板 */
|
||||
export function createNotifyTemplate(data: NotifyTemplate) {
|
||||
return http.post<number>('/system/notify-template/create', data)
|
||||
}
|
||||
|
||||
/** 修改站内信模板 */
|
||||
export function updateNotifyTemplate(data: NotifyTemplate) {
|
||||
return http.put<boolean>('/system/notify-template/update', data)
|
||||
}
|
||||
|
||||
/** 删除站内信模板 */
|
||||
export function deleteNotifyTemplate(id: number) {
|
||||
return http.delete<boolean>(`/system/notify-template/delete?id=${id}`)
|
||||
}
|
||||
|
||||
/** 发送站内信 */
|
||||
export function sendNotify(data: NotifySendReqVO) {
|
||||
return http.post<number>('/system/notify-template/send-notify', data)
|
||||
}
|
||||
48
src/api/system/oauth2/client/index.ts
Normal file
48
src/api/system/oauth2/client/index.ts
Normal file
@@ -0,0 +1,48 @@
|
||||
import type { PageParam, PageResult } from '@/http/types'
|
||||
import { http } from '@/http/http'
|
||||
|
||||
/** OAuth2.0 客户端信息 */
|
||||
export interface OAuth2Client {
|
||||
id?: number
|
||||
clientId: string
|
||||
secret: string
|
||||
name: string
|
||||
logo: string
|
||||
description: string
|
||||
status: number
|
||||
accessTokenValiditySeconds: number
|
||||
refreshTokenValiditySeconds: number
|
||||
redirectUris: string[]
|
||||
autoApprove: boolean
|
||||
authorizedGrantTypes: string[]
|
||||
scopes: string[]
|
||||
authorities: string[]
|
||||
resourceIds: string[]
|
||||
additionalInformation: string
|
||||
createTime?: Date
|
||||
}
|
||||
|
||||
/** 获取 OAuth2.0 客户端分页列表 */
|
||||
export function getOAuth2ClientPage(params: PageParam) {
|
||||
return http.get<PageResult<OAuth2Client>>('/system/oauth2-client/page', params)
|
||||
}
|
||||
|
||||
/** 获取 OAuth2.0 客户端详情 */
|
||||
export function getOAuth2Client(id: number) {
|
||||
return http.get<OAuth2Client>(`/system/oauth2-client/get?id=${id}`)
|
||||
}
|
||||
|
||||
/** 创建 OAuth2.0 客户端 */
|
||||
export function createOAuth2Client(data: OAuth2Client) {
|
||||
return http.post<number>('/system/oauth2-client/create', data)
|
||||
}
|
||||
|
||||
/** 更新 OAuth2.0 客户端 */
|
||||
export function updateOAuth2Client(data: OAuth2Client) {
|
||||
return http.put<boolean>('/system/oauth2-client/update', data)
|
||||
}
|
||||
|
||||
/** 删除 OAuth2.0 客户端 */
|
||||
export function deleteOAuth2Client(id: number) {
|
||||
return http.delete<boolean>(`/system/oauth2-client/delete?id=${id}`)
|
||||
}
|
||||
24
src/api/system/oauth2/token/index.ts
Normal file
24
src/api/system/oauth2/token/index.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
import type { PageParam, PageResult } from '@/http/types'
|
||||
import { http } from '@/http/http'
|
||||
|
||||
/** OAuth2.0 令牌信息 */
|
||||
export interface OAuth2Token {
|
||||
id?: number
|
||||
accessToken: string
|
||||
refreshToken: string
|
||||
userId: number
|
||||
userType: number
|
||||
clientId: string
|
||||
createTime?: Date
|
||||
expiresTime?: Date
|
||||
}
|
||||
|
||||
/** 获取 OAuth2.0 令牌分页列表 */
|
||||
export function getOAuth2TokenPage(params: PageParam) {
|
||||
return http.get<PageResult<OAuth2Token>>('/system/oauth2-token/page', params)
|
||||
}
|
||||
|
||||
/** 删除 OAuth2.0 令牌 */
|
||||
export function deleteOAuth2Token(accessToken: string) {
|
||||
return http.delete<boolean>(`/system/oauth2-token/delete?accessToken=${accessToken}`)
|
||||
}
|
||||
31
src/api/system/operate-log/index.ts
Normal file
31
src/api/system/operate-log/index.ts
Normal file
@@ -0,0 +1,31 @@
|
||||
import type { PageParam, PageResult } from '@/http/types'
|
||||
import { http } from '@/http/http'
|
||||
|
||||
/** 操作日志信息 */
|
||||
export interface OperateLog {
|
||||
id?: number
|
||||
traceId?: string
|
||||
userId?: number
|
||||
userType?: number
|
||||
userName?: string
|
||||
type?: string
|
||||
subType?: string
|
||||
bizId?: number
|
||||
action?: string
|
||||
extra?: string
|
||||
requestMethod?: string
|
||||
requestUrl?: string
|
||||
userIp?: string
|
||||
userAgent?: string
|
||||
createTime?: Date
|
||||
}
|
||||
|
||||
/** 获取操作日志分页列表 */
|
||||
export function getOperateLogPage(params: PageParam) {
|
||||
return http.get<PageResult<OperateLog>>('/system/operate-log/page', params)
|
||||
}
|
||||
|
||||
/** 获取操作日志详情 */
|
||||
export function getOperateLog(id: number) {
|
||||
return http.get<OperateLog>(`/system/operate-log/get?id=${id}`)
|
||||
}
|
||||
43
src/api/system/post/index.ts
Normal file
43
src/api/system/post/index.ts
Normal file
@@ -0,0 +1,43 @@
|
||||
import type { PageParam, PageResult } from '@/http/types'
|
||||
import { http } from '@/http/http'
|
||||
|
||||
/** 岗位信息 */
|
||||
export interface Post {
|
||||
id?: number
|
||||
name: string
|
||||
code: string
|
||||
sort: number
|
||||
status: number
|
||||
remark?: string
|
||||
createTime?: string
|
||||
}
|
||||
|
||||
/** 获取岗位分页列表 */
|
||||
export function getPostPage(params: PageParam) {
|
||||
return http.get<PageResult<Post>>('/system/post/page', params)
|
||||
}
|
||||
|
||||
/** 获取岗位精简列表 */
|
||||
export function getSimplePostList() {
|
||||
return http.get<Post[]>('/system/post/simple-list')
|
||||
}
|
||||
|
||||
/** 获取岗位详情 */
|
||||
export function getPost(id: number) {
|
||||
return http.get<Post>(`/system/post/get?id=${id}`)
|
||||
}
|
||||
|
||||
/** 创建岗位 */
|
||||
export function createPost(data: Post) {
|
||||
return http.post<number>('/system/post/create', data)
|
||||
}
|
||||
|
||||
/** 更新岗位 */
|
||||
export function updatePost(data: Post) {
|
||||
return http.put<boolean>('/system/post/update', data)
|
||||
}
|
||||
|
||||
/** 删除岗位 */
|
||||
export function deletePost(id: number) {
|
||||
return http.delete<boolean>(`/system/post/delete?id=${id}`)
|
||||
}
|
||||
46
src/api/system/role/index.ts
Normal file
46
src/api/system/role/index.ts
Normal file
@@ -0,0 +1,46 @@
|
||||
import type { PageParam, PageResult } from '@/http/types'
|
||||
import { http } from '@/http/http'
|
||||
|
||||
/** 角色信息 */
|
||||
export interface Role {
|
||||
id: number
|
||||
name: string
|
||||
code: string
|
||||
sort: number
|
||||
status: number
|
||||
type?: number
|
||||
remark?: string
|
||||
dataScope?: number
|
||||
dataScopeDeptIds?: number[]
|
||||
createTime?: Date
|
||||
}
|
||||
|
||||
/** 获取角色分页列表 */
|
||||
export function getRolePage(params: PageParam) {
|
||||
return http.get<PageResult<Role>>('/system/role/page', params)
|
||||
}
|
||||
|
||||
/** 获取角色详情 */
|
||||
export function getRole(id: number) {
|
||||
return http.get<Role>(`/system/role/get?id=${id}`)
|
||||
}
|
||||
|
||||
/** 创建角色 */
|
||||
export function createRole(data: Role) {
|
||||
return http.post<number>('/system/role/create', data)
|
||||
}
|
||||
|
||||
/** 更新角色 */
|
||||
export function updateRole(data: Role) {
|
||||
return http.put<boolean>('/system/role/update', data)
|
||||
}
|
||||
|
||||
/** 删除角色 */
|
||||
export function deleteRole(id: number) {
|
||||
return http.delete<boolean>(`/system/role/delete?id=${id}`)
|
||||
}
|
||||
|
||||
/** 获取角色精简列表 */
|
||||
export function getSimpleRoleList() {
|
||||
return http.get<Role[]>('/system/role/simple-list')
|
||||
}
|
||||
45
src/api/system/sms/channel/index.ts
Normal file
45
src/api/system/sms/channel/index.ts
Normal file
@@ -0,0 +1,45 @@
|
||||
import type { PageParam, PageResult } from '@/http/types'
|
||||
import { http } from '@/http/http'
|
||||
|
||||
/** 短信渠道信息 */
|
||||
export interface SmsChannel {
|
||||
id?: number
|
||||
code: string
|
||||
status: number
|
||||
signature: string
|
||||
remark?: string
|
||||
apiKey: string
|
||||
apiSecret?: string
|
||||
callbackUrl?: string
|
||||
createTime?: Date
|
||||
}
|
||||
|
||||
/** 获取短信渠道分页列表 */
|
||||
export function getSmsChannelPage(params: PageParam) {
|
||||
return http.get<PageResult<SmsChannel>>('/system/sms-channel/page', params)
|
||||
}
|
||||
|
||||
/** 获取短信渠道精简列表 */
|
||||
export function getSimpleSmsChannelList() {
|
||||
return http.get<SmsChannel[]>('/system/sms-channel/simple-list')
|
||||
}
|
||||
|
||||
/** 获取短信渠道详情 */
|
||||
export function getSmsChannel(id: number) {
|
||||
return http.get<SmsChannel>(`/system/sms-channel/get?id=${id}`)
|
||||
}
|
||||
|
||||
/** 创建短信渠道 */
|
||||
export function createSmsChannel(data: SmsChannel) {
|
||||
return http.post<number>('/system/sms-channel/create', data)
|
||||
}
|
||||
|
||||
/** 更新短信渠道 */
|
||||
export function updateSmsChannel(data: SmsChannel) {
|
||||
return http.put<boolean>('/system/sms-channel/update', data)
|
||||
}
|
||||
|
||||
/** 删除短信渠道 */
|
||||
export function deleteSmsChannel(id: number) {
|
||||
return http.delete<boolean>(`/system/sms-channel/delete?id=${id}`)
|
||||
}
|
||||
39
src/api/system/sms/log/index.ts
Normal file
39
src/api/system/sms/log/index.ts
Normal file
@@ -0,0 +1,39 @@
|
||||
import type { PageParam, PageResult } from '@/http/types'
|
||||
import { http } from '@/http/http'
|
||||
|
||||
/** 短信日志信息 */
|
||||
export interface SmsLog {
|
||||
id?: number
|
||||
channelId?: number
|
||||
channelCode: string
|
||||
templateId?: number
|
||||
templateCode: string
|
||||
templateType?: number
|
||||
templateContent: string
|
||||
templateParams?: Record<string, any>
|
||||
apiTemplateId: string
|
||||
mobile: string
|
||||
userId?: number
|
||||
userType?: number
|
||||
sendStatus?: number
|
||||
sendTime?: string
|
||||
apiSendCode?: string
|
||||
apiSendMsg?: string
|
||||
apiRequestId?: string
|
||||
apiSerialNo?: string
|
||||
receiveStatus?: number
|
||||
receiveTime?: string
|
||||
apiReceiveCode?: string
|
||||
apiReceiveMsg?: string
|
||||
createTime?: string
|
||||
}
|
||||
|
||||
/** 获取短信日志分页列表 */
|
||||
export function getSmsLogPage(params: PageParam) {
|
||||
return http.get<PageResult<SmsLog>>('/system/sms-log/page', params)
|
||||
}
|
||||
|
||||
/** 获取短信日志详情 */
|
||||
export function getSmsLog(id: number) {
|
||||
return http.get<SmsLog>(`/system/sms-log/get?id=${id}`)
|
||||
}
|
||||
55
src/api/system/sms/template/index.ts
Normal file
55
src/api/system/sms/template/index.ts
Normal file
@@ -0,0 +1,55 @@
|
||||
import type { PageParam, PageResult } from '@/http/types'
|
||||
import { http } from '@/http/http'
|
||||
|
||||
/** 短信模板信息 */
|
||||
export interface SmsTemplate {
|
||||
id?: number
|
||||
type?: number
|
||||
status: number
|
||||
code: string
|
||||
name: string
|
||||
content: string
|
||||
remark?: string
|
||||
apiTemplateId: string
|
||||
channelId?: number
|
||||
channelCode?: string
|
||||
params?: string[]
|
||||
createTime?: Date
|
||||
}
|
||||
|
||||
/** 发送短信请求 */
|
||||
export interface SmsSendReqVO {
|
||||
mobile: string
|
||||
templateCode: string
|
||||
templateParams: Record<string, any>
|
||||
}
|
||||
|
||||
/** 获取短信模板分页列表 */
|
||||
export function getSmsTemplatePage(params: PageParam) {
|
||||
return http.get<PageResult<SmsTemplate>>('/system/sms-template/page', params)
|
||||
}
|
||||
|
||||
/** 获取短信模板详情 */
|
||||
export function getSmsTemplate(id: number) {
|
||||
return http.get<SmsTemplate>(`/system/sms-template/get?id=${id}`)
|
||||
}
|
||||
|
||||
/** 创建短信模板 */
|
||||
export function createSmsTemplate(data: SmsTemplate) {
|
||||
return http.post<number>('/system/sms-template/create', data)
|
||||
}
|
||||
|
||||
/** 更新短信模板 */
|
||||
export function updateSmsTemplate(data: SmsTemplate) {
|
||||
return http.put<boolean>('/system/sms-template/update', data)
|
||||
}
|
||||
|
||||
/** 删除短信模板 */
|
||||
export function deleteSmsTemplate(id: number) {
|
||||
return http.delete<boolean>(`/system/sms-template/delete?id=${id}`)
|
||||
}
|
||||
|
||||
/** 发送短信 */
|
||||
export function sendSms(data: SmsSendReqVO) {
|
||||
return http.post<number>('/system/sms-template/send-sms', data)
|
||||
}
|
||||
41
src/api/system/social/client/index.ts
Normal file
41
src/api/system/social/client/index.ts
Normal file
@@ -0,0 +1,41 @@
|
||||
import type { PageParam, PageResult } from '@/http/types'
|
||||
import { http } from '@/http/http'
|
||||
|
||||
/** 社交客户端信息 */
|
||||
export interface SocialClient {
|
||||
id?: number
|
||||
name: string
|
||||
socialType: number
|
||||
userType: number
|
||||
clientId: string
|
||||
clientSecret: string
|
||||
agentId?: string
|
||||
publicKey?: string
|
||||
status: number
|
||||
createTime?: Date
|
||||
}
|
||||
|
||||
/** 获取社交客户端分页列表 */
|
||||
export function getSocialClientPage(params: PageParam) {
|
||||
return http.get<PageResult<SocialClient>>('/system/social-client/page', params)
|
||||
}
|
||||
|
||||
/** 获取社交客户端详情 */
|
||||
export function getSocialClient(id: number) {
|
||||
return http.get<SocialClient>(`/system/social-client/get?id=${id}`)
|
||||
}
|
||||
|
||||
/** 创建社交客户端 */
|
||||
export function createSocialClient(data: SocialClient) {
|
||||
return http.post<number>('/system/social-client/create', data)
|
||||
}
|
||||
|
||||
/** 更新社交客户端 */
|
||||
export function updateSocialClient(data: SocialClient) {
|
||||
return http.put<boolean>('/system/social-client/update', data)
|
||||
}
|
||||
|
||||
/** 删除社交客户端 */
|
||||
export function deleteSocialClient(id: number) {
|
||||
return http.delete<boolean>(`/system/social-client/delete?id=${id}`)
|
||||
}
|
||||
28
src/api/system/social/user/index.ts
Normal file
28
src/api/system/social/user/index.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
import type { PageParam, PageResult } from '@/http/types'
|
||||
import { http } from '@/http/http'
|
||||
|
||||
/** 社交用户信息 */
|
||||
export interface SocialUser {
|
||||
id?: number
|
||||
type: number
|
||||
openid: string
|
||||
token: string
|
||||
rawTokenInfo: string
|
||||
nickname: string
|
||||
avatar: string
|
||||
rawUserInfo: string
|
||||
code: string
|
||||
state: string
|
||||
createTime?: Date
|
||||
updateTime?: Date
|
||||
}
|
||||
|
||||
/** 获取社交用户分页列表 */
|
||||
export function getSocialUserPage(params: PageParam) {
|
||||
return http.get<PageResult<SocialUser>>('/system/social-user/page', params)
|
||||
}
|
||||
|
||||
/** 获取社交用户详情 */
|
||||
export function getSocialUser(id: number) {
|
||||
return http.get<SocialUser>(`/system/social-user/get?id=${id}`)
|
||||
}
|
||||
46
src/api/system/tenant/index.ts
Normal file
46
src/api/system/tenant/index.ts
Normal file
@@ -0,0 +1,46 @@
|
||||
import type { PageParam, PageResult } from '@/http/types'
|
||||
import { http } from '@/http/http'
|
||||
|
||||
/** 租户信息 */
|
||||
export interface Tenant {
|
||||
id?: number
|
||||
name: string
|
||||
packageId: number
|
||||
contactName: string
|
||||
contactMobile: string
|
||||
accountCount: number
|
||||
expireTime: Date | any
|
||||
websites: string[]
|
||||
status: number
|
||||
createTime?: Date
|
||||
}
|
||||
|
||||
/** 获取租户分页列表 */
|
||||
export function getTenantPage(params: PageParam) {
|
||||
return http.get<PageResult<Tenant>>('/system/tenant/page', params)
|
||||
}
|
||||
|
||||
/** 获取租户精简信息列表 */
|
||||
export function getSimpleTenantList() {
|
||||
return http.get<Tenant[]>('/system/tenant/simple-list')
|
||||
}
|
||||
|
||||
/** 获取租户详情 */
|
||||
export function getTenant(id: number) {
|
||||
return http.get<Tenant>(`/system/tenant/get?id=${id}`)
|
||||
}
|
||||
|
||||
/** 创建租户 */
|
||||
export function createTenant(data: Tenant) {
|
||||
return http.post<number>('/system/tenant/create', data)
|
||||
}
|
||||
|
||||
/** 更新租户 */
|
||||
export function updateTenant(data: Tenant) {
|
||||
return http.put<boolean>('/system/tenant/update', data)
|
||||
}
|
||||
|
||||
/** 删除租户 */
|
||||
export function deleteTenant(id: number) {
|
||||
return http.delete<boolean>(`/system/tenant/delete?id=${id}`)
|
||||
}
|
||||
42
src/api/system/tenant/package/index.ts
Normal file
42
src/api/system/tenant/package/index.ts
Normal file
@@ -0,0 +1,42 @@
|
||||
import type { PageParam, PageResult } from '@/http/types'
|
||||
import { http } from '@/http/http'
|
||||
|
||||
/** 租户套餐信息 */
|
||||
export interface TenantPackage {
|
||||
id?: number
|
||||
name: string
|
||||
status: number
|
||||
remark: string
|
||||
menuIds: number[]
|
||||
createTime?: Date
|
||||
}
|
||||
|
||||
/** 获取租户套餐分页列表 */
|
||||
export function getTenantPackagePage(params: PageParam) {
|
||||
return http.get<PageResult<TenantPackage>>('/system/tenant-package/page', params)
|
||||
}
|
||||
|
||||
/** 获取租户套餐精简信息列表 */
|
||||
export function getTenantPackageList() {
|
||||
return http.get<TenantPackage[]>('/system/tenant-package/get-simple-list')
|
||||
}
|
||||
|
||||
/** 获取租户套餐详情 */
|
||||
export function getTenantPackage(id: number) {
|
||||
return http.get<TenantPackage>(`/system/tenant-package/get?id=${id}`)
|
||||
}
|
||||
|
||||
/** 创建租户套餐 */
|
||||
export function createTenantPackage(data: TenantPackage) {
|
||||
return http.post<number>('/system/tenant-package/create', data)
|
||||
}
|
||||
|
||||
/** 更新租户套餐 */
|
||||
export function updateTenantPackage(data: TenantPackage) {
|
||||
return http.put<boolean>('/system/tenant-package/update', data)
|
||||
}
|
||||
|
||||
/** 删除租户套餐 */
|
||||
export function deleteTenantPackage(id: number) {
|
||||
return http.delete<boolean>(`/system/tenant-package/delete?id=${id}`)
|
||||
}
|
||||
72
src/api/system/user/index.ts
Normal file
72
src/api/system/user/index.ts
Normal file
@@ -0,0 +1,72 @@
|
||||
import type { PageParam, PageResult } from '@/http/types'
|
||||
import { http } from '@/http/http'
|
||||
|
||||
/** 用户信息 */
|
||||
export interface User {
|
||||
id?: number
|
||||
username: string
|
||||
nickname: string
|
||||
password?: string
|
||||
deptId?: number
|
||||
deptName?: string
|
||||
postIds?: number[]
|
||||
email?: string
|
||||
mobile?: string
|
||||
sex?: number
|
||||
avatar?: string
|
||||
status: number
|
||||
remark?: string
|
||||
loginIp?: string
|
||||
loginDate?: string
|
||||
createTime?: string
|
||||
}
|
||||
|
||||
/** 获取用户分页列表 */
|
||||
export function getUserPage(params: PageParam) {
|
||||
return http.get<PageResult<User>>('/system/user/page', params)
|
||||
}
|
||||
|
||||
/** 获取用户详情 */
|
||||
export function getUser(id: number) {
|
||||
return http.get<User>(`/system/user/get?id=${id}`)
|
||||
}
|
||||
|
||||
/** 创建用户 */
|
||||
export function createUser(data: User) {
|
||||
return http.post<number>('/system/user/create', data)
|
||||
}
|
||||
|
||||
/** 更新用户 */
|
||||
export function updateUser(data: User) {
|
||||
return http.put<boolean>('/system/user/update', data)
|
||||
}
|
||||
|
||||
/** 删除用户 */
|
||||
export function deleteUser(id: number) {
|
||||
return http.delete<boolean>(`/system/user/delete?id=${id}`)
|
||||
}
|
||||
|
||||
/** 重置用户密码 */
|
||||
export function resetUserPassword(id: number, password: string) {
|
||||
return http.put<boolean>('/system/user/update-password', { id, password })
|
||||
}
|
||||
|
||||
/** 修改用户状态 */
|
||||
export function updateUserStatus(id: number, status: number) {
|
||||
return http.put<boolean>('/system/user/update-status', { id, status })
|
||||
}
|
||||
|
||||
/** 获取用户拥有的角色列表 */
|
||||
export function getUserRoleIds(userId: number) {
|
||||
return http.get<number[]>(`/system/permission/list-user-roles?userId=${userId}`)
|
||||
}
|
||||
|
||||
/** 分配用户角色 */
|
||||
export function assignUserRole(userId: number, roleIds: number[]) {
|
||||
return http.post<boolean>('/system/permission/assign-user-role', { userId, roleIds })
|
||||
}
|
||||
|
||||
/** 获取用户精简列表 */
|
||||
export function getSimpleUserList() {
|
||||
return http.get<User[]>('/system/user/simple-list')
|
||||
}
|
||||
48
src/api/system/user/profile/index.ts
Normal file
48
src/api/system/user/profile/index.ts
Normal file
@@ -0,0 +1,48 @@
|
||||
import { http } from '@/http/http'
|
||||
|
||||
/** 用户个人中心信息 */
|
||||
export interface UserProfileVO {
|
||||
id: number
|
||||
username: string
|
||||
nickname: string
|
||||
email?: string
|
||||
mobile?: string
|
||||
sex?: number
|
||||
avatar?: string
|
||||
loginIp: string
|
||||
loginDate: Date
|
||||
createTime: Date
|
||||
roles: { id: number, name: string }[]
|
||||
dept: { id: number, name: string }
|
||||
posts: { id: number, name: string }[]
|
||||
}
|
||||
|
||||
/** 更新个人信息请求 */
|
||||
export interface UpdateProfileReqVO {
|
||||
nickname?: string
|
||||
email?: string
|
||||
mobile?: string
|
||||
sex?: number
|
||||
avatar?: string
|
||||
}
|
||||
|
||||
/** 更新密码请求 */
|
||||
export interface UpdatePasswordReqVO {
|
||||
oldPassword: string
|
||||
newPassword: string
|
||||
}
|
||||
|
||||
/** 获取登录用户个人信息 */
|
||||
export function getUserProfile() {
|
||||
return http.get<UserProfileVO>('/system/user/profile/get')
|
||||
}
|
||||
|
||||
/** 修改用户个人信息 */
|
||||
export function updateUserProfile(data: UpdateProfileReqVO) {
|
||||
return http.put<boolean>('/system/user/profile/update', data)
|
||||
}
|
||||
|
||||
/** 修改用户个人密码 */
|
||||
export function updateUserPassword(data: UpdatePasswordReqVO) {
|
||||
return http.put<boolean>('/system/user/profile/update-password', data)
|
||||
}
|
||||
Reference in New Issue
Block a user