mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-12 18:15:07 +08:00
feat: add vue3(element-plus)
This commit is contained in:
32
yudao-ui-admin-vue3/src/api/system/dept/index.ts
Normal file
32
yudao-ui-admin-vue3/src/api/system/dept/index.ts
Normal file
@ -0,0 +1,32 @@
|
||||
import { defHttp } from '@/config/axios'
|
||||
import type { DeptVO } from './types'
|
||||
|
||||
// 查询部门(精简)列表
|
||||
export const listSimpleDeptApi = () => {
|
||||
return defHttp.get({ url: '/system/dept/list-all-simple' })
|
||||
}
|
||||
|
||||
// 查询部门列表
|
||||
export const getDeptPageApi = ({ params }) => {
|
||||
return defHttp.get<PageResult<DeptVO>>({ url: '/system/dept/list', params })
|
||||
}
|
||||
|
||||
// 查询部门详情
|
||||
export const getDeptApi = (id: number) => {
|
||||
return defHttp.get<DeptVO>({ url: '/system/dept/get?id=' + id })
|
||||
}
|
||||
|
||||
// 新增部门
|
||||
export const createDeptApi = (params: DeptVO) => {
|
||||
return defHttp.post({ url: '/system/dept/create', data: params })
|
||||
}
|
||||
|
||||
// 修改部门
|
||||
export const updateDeptApi = (params: DeptVO) => {
|
||||
return defHttp.put({ url: '/system/dept/update', data: params })
|
||||
}
|
||||
|
||||
// 删除部门
|
||||
export const deleteDeptApi = (id: number) => {
|
||||
return defHttp.delete({ url: '/system/dept/delete?id=' + id })
|
||||
}
|
7
yudao-ui-admin-vue3/src/api/system/dept/types.ts
Normal file
7
yudao-ui-admin-vue3/src/api/system/dept/types.ts
Normal file
@ -0,0 +1,7 @@
|
||||
export type DeptVO = {
|
||||
id: number
|
||||
name: string
|
||||
status: number
|
||||
parentId: number
|
||||
createTime: string
|
||||
}
|
36
yudao-ui-admin-vue3/src/api/system/dict/dict.data.ts
Normal file
36
yudao-ui-admin-vue3/src/api/system/dict/dict.data.ts
Normal file
@ -0,0 +1,36 @@
|
||||
import { defHttp } from '@/config/axios'
|
||||
import type { DictDataVO } from './types'
|
||||
|
||||
// 查询字典数据(精简)列表
|
||||
export const listSimpleDictDataApi = () => {
|
||||
return defHttp.get({ url: '/system/dict-data/list-all-simple' })
|
||||
}
|
||||
|
||||
// 查询字典数据列表
|
||||
export const getDictDataPageApi = ({ params }) => {
|
||||
return defHttp.get<PageResult<DictDataVO>>({ url: '/system/dict-data/page', params })
|
||||
}
|
||||
|
||||
// 查询字典数据详情
|
||||
export const getDictDataApi = (id: number) => {
|
||||
return defHttp.get({ url: '/system/dict-data/get?id=' + id })
|
||||
}
|
||||
|
||||
// 新增字典数据
|
||||
export const createDictDataApi = (params: DictDataVO) => {
|
||||
return defHttp.post({ url: '/system/dict-data/create', params })
|
||||
}
|
||||
|
||||
// 修改字典数据
|
||||
export const updateDictDataApi = (params: DictDataVO) => {
|
||||
return defHttp.put({ url: '/system/dict-data/update', params })
|
||||
}
|
||||
|
||||
// 删除字典数据
|
||||
export const deleteDictDataApi = (id: number) => {
|
||||
return defHttp.delete({ url: '/system/dict-data/delete?id=' + id })
|
||||
}
|
||||
// 导出字典类型数据
|
||||
export const exportDictDataApi = (params: DictDataVO) => {
|
||||
return defHttp.get({ url: '/system/dict-data/export', params })
|
||||
}
|
36
yudao-ui-admin-vue3/src/api/system/dict/dict.type.ts
Normal file
36
yudao-ui-admin-vue3/src/api/system/dict/dict.type.ts
Normal file
@ -0,0 +1,36 @@
|
||||
import { defHttp } from '@/config/axios'
|
||||
import type { DictTypeVO } from './types'
|
||||
|
||||
// 查询字典(精简)列表
|
||||
export const listSimpleDictTypeApi = () => {
|
||||
return defHttp.get({ url: '/system/dict-type/list-all-simple' })
|
||||
}
|
||||
|
||||
// 查询字典列表
|
||||
export const getDictTypePageApi = ({ params }) => {
|
||||
return defHttp.get<PageResult<DictTypeVO>>({ url: '/system/dict-type/page', params })
|
||||
}
|
||||
|
||||
// 查询字典详情
|
||||
export const getDictTypeApi = (id: number) => {
|
||||
return defHttp.get({ url: '/system/dict-type/get?id=' + id })
|
||||
}
|
||||
|
||||
// 新增字典
|
||||
export const createDictTypeApi = (params: DictTypeVO) => {
|
||||
return defHttp.post({ url: '/system/dict-type/create', params })
|
||||
}
|
||||
|
||||
// 修改字典
|
||||
export const updateDictTypeApi = (params: DictTypeVO) => {
|
||||
return defHttp.put({ url: '/system/dict-type/update', params })
|
||||
}
|
||||
|
||||
// 删除字典
|
||||
export const deleteDictTypeApi = (id: number) => {
|
||||
return defHttp.delete({ url: '/system/dict-type/delete?id=' + id })
|
||||
}
|
||||
// 导出字典类型
|
||||
export const exportDictTypeApi = (params: DictTypeVO) => {
|
||||
return defHttp.get({ url: '/system/dict-type/export', params })
|
||||
}
|
21
yudao-ui-admin-vue3/src/api/system/dict/types.ts
Normal file
21
yudao-ui-admin-vue3/src/api/system/dict/types.ts
Normal file
@ -0,0 +1,21 @@
|
||||
export type DictTypeVO = {
|
||||
id: number
|
||||
name: string
|
||||
type: string
|
||||
status: number
|
||||
remark: string
|
||||
createTime: string
|
||||
}
|
||||
|
||||
export type DictDataVO = {
|
||||
id: number
|
||||
sort: number
|
||||
label: string
|
||||
value: string
|
||||
dictType: string
|
||||
status: number
|
||||
colorType: string
|
||||
cssClass: string
|
||||
remark: string
|
||||
createTime: string
|
||||
}
|
31
yudao-ui-admin-vue3/src/api/system/errorCode/index.ts
Normal file
31
yudao-ui-admin-vue3/src/api/system/errorCode/index.ts
Normal file
@ -0,0 +1,31 @@
|
||||
import { defHttp } from '@/config/axios'
|
||||
import type { ErrorCodeVO } from './types'
|
||||
|
||||
// 查询错误码列表
|
||||
export const getErrorCodePageApi = ({ params }) => {
|
||||
return defHttp.get<PageResult<ErrorCodeVO>>({ url: '/system/error-code/page', params })
|
||||
}
|
||||
|
||||
// 查询错误码详情
|
||||
export const getErrorCodeApi = (id: number) => {
|
||||
return defHttp.get<ErrorCodeVO>({ url: '/system/error-code/get?id=' + id })
|
||||
}
|
||||
|
||||
// 新增错误码
|
||||
export const createErrorCodeApi = (params: ErrorCodeVO) => {
|
||||
return defHttp.post({ url: '/system/error-code/create', params })
|
||||
}
|
||||
|
||||
// 修改错误码
|
||||
export const updateErrorCodeApi = (params: ErrorCodeVO) => {
|
||||
return defHttp.put({ url: '/system/error-code/update', params })
|
||||
}
|
||||
|
||||
// 删除错误码
|
||||
export const deleteErrorCodeApi = (id: number) => {
|
||||
return defHttp.delete({ url: '/system/error-code/delete?id=' + id })
|
||||
}
|
||||
// 导出错误码
|
||||
export const excelErrorCodeApi = (params) => {
|
||||
return defHttp.get({ url: '/system/error-code/export-excel', params, responseType: 'blob' })
|
||||
}
|
9
yudao-ui-admin-vue3/src/api/system/errorCode/types.ts
Normal file
9
yudao-ui-admin-vue3/src/api/system/errorCode/types.ts
Normal file
@ -0,0 +1,9 @@
|
||||
export type ErrorCodeVO = {
|
||||
id: number
|
||||
type: number
|
||||
applicationName: string
|
||||
code: number
|
||||
message: string
|
||||
memo: string
|
||||
createTime: string
|
||||
}
|
11
yudao-ui-admin-vue3/src/api/system/loginLog/index.ts
Normal file
11
yudao-ui-admin-vue3/src/api/system/loginLog/index.ts
Normal file
@ -0,0 +1,11 @@
|
||||
import { defHttp } from '@/config/axios'
|
||||
import type { LoginLogVO } from './types'
|
||||
|
||||
// 查询登录日志列表
|
||||
export const getLoginLogPageApi = ({ params }) => {
|
||||
return defHttp.get<PageResult<LoginLogVO>>({ url: '/system/login-log/page', params })
|
||||
}
|
||||
// 导出登录日志
|
||||
export const exportLoginLogApi = (params) => {
|
||||
return defHttp.get({ url: '/system/login-log/export', params, responseType: 'blob' })
|
||||
}
|
11
yudao-ui-admin-vue3/src/api/system/loginLog/types.ts
Normal file
11
yudao-ui-admin-vue3/src/api/system/loginLog/types.ts
Normal file
@ -0,0 +1,11 @@
|
||||
export type LoginLogVO = {
|
||||
id: number
|
||||
logType: number
|
||||
traceId: number
|
||||
userType: number
|
||||
username: string
|
||||
status: number
|
||||
userIp: string
|
||||
userAgent: string
|
||||
createTime: string
|
||||
}
|
31
yudao-ui-admin-vue3/src/api/system/menu/index.ts
Normal file
31
yudao-ui-admin-vue3/src/api/system/menu/index.ts
Normal file
@ -0,0 +1,31 @@
|
||||
import { defHttp } from '@/config/axios'
|
||||
import type { MenuVO } from './types'
|
||||
|
||||
// 查询菜单(精简)列表
|
||||
export const listSimpleMenusApi = () => {
|
||||
return defHttp.get({ url: '/system/menu/list-all-simple' })
|
||||
}
|
||||
// 查询菜单列表
|
||||
export const getMenuListApi = (params) => {
|
||||
return defHttp.get({ url: '/system/menu/list', params })
|
||||
}
|
||||
|
||||
// 获取菜单详情
|
||||
export const getMenuApi = (id: number) => {
|
||||
return defHttp.get<MenuVO>({ url: '/system/menu/get?id=' + id })
|
||||
}
|
||||
|
||||
// 新增菜单
|
||||
export const createMenuApi = (params: MenuVO) => {
|
||||
return defHttp.post({ url: '/system/menu/create', params })
|
||||
}
|
||||
|
||||
// 修改菜单
|
||||
export const updateMenuApi = (params: MenuVO) => {
|
||||
return defHttp.put({ url: '/system/menu/update', params })
|
||||
}
|
||||
|
||||
// 删除菜单
|
||||
export const deleteMenuApi = (id: number) => {
|
||||
return defHttp.delete({ url: '/system/menu/delete?id=' + id })
|
||||
}
|
15
yudao-ui-admin-vue3/src/api/system/menu/types.ts
Normal file
15
yudao-ui-admin-vue3/src/api/system/menu/types.ts
Normal file
@ -0,0 +1,15 @@
|
||||
export type MenuVO = {
|
||||
id: number
|
||||
name: string
|
||||
permission: string
|
||||
type: number
|
||||
sort: number
|
||||
parentId: number
|
||||
path: string
|
||||
icon: string
|
||||
component: string
|
||||
status: number
|
||||
visible: boolean
|
||||
keepAlive: boolean
|
||||
createTime: string
|
||||
}
|
27
yudao-ui-admin-vue3/src/api/system/notice/index.ts
Normal file
27
yudao-ui-admin-vue3/src/api/system/notice/index.ts
Normal file
@ -0,0 +1,27 @@
|
||||
import { defHttp } from '@/config/axios'
|
||||
import type { NoticeVO } from './types'
|
||||
|
||||
// 查询公告列表
|
||||
export const getNoticePageApi = ({ params }) => {
|
||||
return defHttp.get<PageResult<NoticeVO>>({ url: '/system/notice/page', params })
|
||||
}
|
||||
|
||||
// 查询公告详情
|
||||
export const getNoticeApi = (id: number) => {
|
||||
return defHttp.get<NoticeVO>({ url: '/system/notice/get?id=' + id })
|
||||
}
|
||||
|
||||
// 新增公告
|
||||
export const createNoticeApi = (params: NoticeVO) => {
|
||||
return defHttp.post({ url: '/system/notice/create', params })
|
||||
}
|
||||
|
||||
// 修改公告
|
||||
export const updateNoticeApi = (params: NoticeVO) => {
|
||||
return defHttp.put({ url: '/system/notice/update', params })
|
||||
}
|
||||
|
||||
// 删除公告
|
||||
export const deleteNoticeApi = (id: number) => {
|
||||
return defHttp.delete({ url: '/system/notice/delete?id=' + id })
|
||||
}
|
12
yudao-ui-admin-vue3/src/api/system/notice/types.ts
Normal file
12
yudao-ui-admin-vue3/src/api/system/notice/types.ts
Normal file
@ -0,0 +1,12 @@
|
||||
export type NoticeVO = {
|
||||
id: number
|
||||
title: string
|
||||
type: number
|
||||
content: string
|
||||
status: number
|
||||
remark: string
|
||||
creator: string
|
||||
createTime: string
|
||||
updater: string
|
||||
updateTime: string
|
||||
}
|
27
yudao-ui-admin-vue3/src/api/system/oauth2/client.ts
Normal file
27
yudao-ui-admin-vue3/src/api/system/oauth2/client.ts
Normal file
@ -0,0 +1,27 @@
|
||||
import { defHttp } from '@/config/axios'
|
||||
import { OAuth2ClientVo } from './client.types'
|
||||
|
||||
// 查询 OAuth2列表
|
||||
export const getOAuth2ClientPageApi = ({ params }) => {
|
||||
return defHttp.get<PageResult<OAuth2ClientVo>>({ url: '/system/oauth2-client/page', params })
|
||||
}
|
||||
|
||||
// 查询 OAuth2详情
|
||||
export const getOAuth2ClientApi = (id: number) => {
|
||||
return defHttp.get<OAuth2ClientVo>({ url: '/system/oauth2-client/get?id=' + id })
|
||||
}
|
||||
|
||||
// 新增 OAuth2
|
||||
export const createOAuth2ClientApi = (params: OAuth2ClientVo) => {
|
||||
return defHttp.post({ url: '/system/oauth2-client/create', params })
|
||||
}
|
||||
|
||||
// 修改 OAuth2
|
||||
export const updateOAuth2ClientApi = (params: OAuth2ClientVo) => {
|
||||
return defHttp.put({ url: '/system/oauth2-client/update', params })
|
||||
}
|
||||
|
||||
// 删除 OAuth2
|
||||
export const deleteOAuth2ClientApi = (id: number) => {
|
||||
return defHttp.delete({ url: '/system/oauth2-client/delete?id=' + id })
|
||||
}
|
20
yudao-ui-admin-vue3/src/api/system/oauth2/client.types.ts
Normal file
20
yudao-ui-admin-vue3/src/api/system/oauth2/client.types.ts
Normal file
@ -0,0 +1,20 @@
|
||||
export type OAuth2ClientVo = {
|
||||
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
|
||||
isAdditionalInformationJson: boolean
|
||||
createTime: string
|
||||
}
|
12
yudao-ui-admin-vue3/src/api/system/oauth2/token.ts
Normal file
12
yudao-ui-admin-vue3/src/api/system/oauth2/token.ts
Normal file
@ -0,0 +1,12 @@
|
||||
import { defHttp } from '@/config/axios'
|
||||
import { OAuth2TokenVo } from './token.types'
|
||||
|
||||
// 查询 token列表
|
||||
export const getAccessTokenPageApi = ({ params }) => {
|
||||
return defHttp.get<PageResult<OAuth2TokenVo>>({ url: '/system/oauth2-token/page', params })
|
||||
}
|
||||
|
||||
// 删除 token
|
||||
export const deleteAccessTokenApi = (accessToken: number) => {
|
||||
return defHttp.delete({ url: '/system/oauth2-token/delete?accessToken=' + accessToken })
|
||||
}
|
10
yudao-ui-admin-vue3/src/api/system/oauth2/token.types.ts
Normal file
10
yudao-ui-admin-vue3/src/api/system/oauth2/token.types.ts
Normal file
@ -0,0 +1,10 @@
|
||||
export type OAuth2TokenVo = {
|
||||
id: number
|
||||
accessToken: string
|
||||
refreshToken: string
|
||||
userId: number
|
||||
userType: number
|
||||
clientId: string
|
||||
createTime: string
|
||||
expiresTime: string
|
||||
}
|
11
yudao-ui-admin-vue3/src/api/system/operatelog/index.ts
Normal file
11
yudao-ui-admin-vue3/src/api/system/operatelog/index.ts
Normal file
@ -0,0 +1,11 @@
|
||||
import { defHttp } from '@/config/axios'
|
||||
import type { OperateLogVO } from './types'
|
||||
|
||||
// 查询操作日志列表
|
||||
export const getOperateLogPageApi = ({ params }) => {
|
||||
return defHttp.get<PageResult<OperateLogVO>>({ url: '/system/operate-log/page', params })
|
||||
}
|
||||
// 导出操作日志
|
||||
export const exportOperateLogApi = (params) => {
|
||||
return defHttp.get({ url: '/system/operate-log/export', params, responseType: 'blob' })
|
||||
}
|
22
yudao-ui-admin-vue3/src/api/system/operatelog/types.ts
Normal file
22
yudao-ui-admin-vue3/src/api/system/operatelog/types.ts
Normal file
@ -0,0 +1,22 @@
|
||||
export type OperateLogVO = {
|
||||
id: number
|
||||
userNickname: string
|
||||
traceId: string
|
||||
userId: number
|
||||
module: string
|
||||
name: string
|
||||
type: number
|
||||
content: string
|
||||
exts: object
|
||||
requestMethod: string
|
||||
requestUrl: string
|
||||
userIp: string
|
||||
userAgent: string
|
||||
javaMethod: string
|
||||
javaMethodArgs: string
|
||||
startTime: string
|
||||
duration: number
|
||||
resultCode: number
|
||||
resultMsg: string
|
||||
resultData: string
|
||||
}
|
36
yudao-ui-admin-vue3/src/api/system/post/index.ts
Normal file
36
yudao-ui-admin-vue3/src/api/system/post/index.ts
Normal file
@ -0,0 +1,36 @@
|
||||
import { defHttp } from '@/config/axios'
|
||||
import type { PostVO } from './types'
|
||||
|
||||
// 查询岗位列表
|
||||
export const getPostPageApi = ({ params }) => {
|
||||
return defHttp.get<PageResult<PostVO>>({ url: '/system/post/page', params })
|
||||
}
|
||||
|
||||
// 获取岗位精简信息列表
|
||||
export const listSimplePostsApi = () => {
|
||||
return defHttp.get<PostVO[]>({ url: '/system/post/list-all-simple' })
|
||||
}
|
||||
// 查询岗位详情
|
||||
export const getPostApi = (id: number) => {
|
||||
return defHttp.get<PostVO>({ url: '/system/post/get?id=' + id })
|
||||
}
|
||||
|
||||
// 新增岗位
|
||||
export const createPostApi = (params: PostVO) => {
|
||||
return defHttp.post({ url: '/system/post/create', params })
|
||||
}
|
||||
|
||||
// 修改岗位
|
||||
export const updatePostApi = (params: PostVO) => {
|
||||
return defHttp.put({ url: '/system/post/update', params })
|
||||
}
|
||||
|
||||
// 删除岗位
|
||||
export const deletePostApi = (id: number) => {
|
||||
return defHttp.delete({ url: '/system/post/delete?id=' + id })
|
||||
}
|
||||
|
||||
// 导出岗位
|
||||
export const exportPostApi = (params) => {
|
||||
return defHttp.get({ url: '/system/post/export', params, responseType: 'blob' })
|
||||
}
|
9
yudao-ui-admin-vue3/src/api/system/post/types.ts
Normal file
9
yudao-ui-admin-vue3/src/api/system/post/types.ts
Normal file
@ -0,0 +1,9 @@
|
||||
export type PostVO = {
|
||||
id: number
|
||||
name: string
|
||||
code: string
|
||||
sort: number
|
||||
status: number
|
||||
remark: string
|
||||
createTime: string
|
||||
}
|
32
yudao-ui-admin-vue3/src/api/system/role/index.ts
Normal file
32
yudao-ui-admin-vue3/src/api/system/role/index.ts
Normal file
@ -0,0 +1,32 @@
|
||||
import { defHttp } from '@/config/axios'
|
||||
import type { RoleVO } from './types'
|
||||
|
||||
// 查询角色列表
|
||||
export const getRolePageApi = ({ params }) => {
|
||||
return defHttp.get<PageResult<RoleVO>>({ url: '/system/role/page', params })
|
||||
}
|
||||
|
||||
// 查询角色详情
|
||||
export const getRoleApi = (id: number) => {
|
||||
return defHttp.get<RoleVO>({ url: '/system/role/get?id=' + id })
|
||||
}
|
||||
|
||||
// 新增角色
|
||||
export const createRoleApi = (params: RoleVO) => {
|
||||
return defHttp.post({ url: '/system/role/create', params })
|
||||
}
|
||||
|
||||
// 修改角色
|
||||
export const updateRoleApi = (params: RoleVO) => {
|
||||
return defHttp.put({ url: '/system/role/update', params })
|
||||
}
|
||||
|
||||
// 修改角色状态
|
||||
export const updateRoleStatusApi = (params: RoleVO) => {
|
||||
return defHttp.put({ url: '/system/role/update-status', params })
|
||||
}
|
||||
|
||||
// 删除角色
|
||||
export const deleteRoleApi = (id: number) => {
|
||||
return defHttp.delete({ url: '/system/role/delete?id=' + id })
|
||||
}
|
9
yudao-ui-admin-vue3/src/api/system/role/types.ts
Normal file
9
yudao-ui-admin-vue3/src/api/system/role/types.ts
Normal file
@ -0,0 +1,9 @@
|
||||
export type RoleVO = {
|
||||
id: number
|
||||
name: string
|
||||
code: string
|
||||
sort: number
|
||||
status: number
|
||||
type: number
|
||||
createTime: string
|
||||
}
|
42
yudao-ui-admin-vue3/src/api/system/sensitiveWord/index.ts
Normal file
42
yudao-ui-admin-vue3/src/api/system/sensitiveWord/index.ts
Normal file
@ -0,0 +1,42 @@
|
||||
import { defHttp } from '@/config/axios'
|
||||
import type { SensitiveWordVO } from './types'
|
||||
|
||||
// 查询敏感词列表
|
||||
export const getSensitiveWordPageApi = ({ params }) => {
|
||||
return defHttp.get<PageResult<SensitiveWordVO>>({ url: '/system/sensitive-word/page', params })
|
||||
}
|
||||
|
||||
// 查询敏感词详情
|
||||
export const getSensitiveWordApi = (id: number) => {
|
||||
return defHttp.get<SensitiveWordVO>({ url: '/system/sensitive-word/get?id=' + id })
|
||||
}
|
||||
|
||||
// 新增敏感词
|
||||
export const createSensitiveWordApi = (params: SensitiveWordVO) => {
|
||||
return defHttp.post({ url: '/system/sensitive-word/create', params })
|
||||
}
|
||||
|
||||
// 修改敏感词
|
||||
export const updateSensitiveWordApi = (params: SensitiveWordVO) => {
|
||||
return defHttp.put({ url: '/system/sensitive-word/update', params })
|
||||
}
|
||||
|
||||
// 删除敏感词
|
||||
export const deleteSensitiveWordApi = (id: number) => {
|
||||
return defHttp.delete({ url: '/system/sensitive-word/delete?id=' + id })
|
||||
}
|
||||
|
||||
// 导出敏感词
|
||||
export const exportSensitiveWordApi = (params) => {
|
||||
return defHttp.get({ url: '/system/sensitive-word/export', params, responseType: 'blob' })
|
||||
}
|
||||
|
||||
// 获取所有敏感词的标签数组
|
||||
export const getSensitiveWordTagsApi = () => {
|
||||
return defHttp.get<SensitiveWordVO>({ url: '/system/sensitive-word/get-tags' })
|
||||
}
|
||||
|
||||
// 获得文本所包含的不合法的敏感词数组
|
||||
export const validateTextApi = (id: number) => {
|
||||
return defHttp.get<SensitiveWordVO>({ url: '/system/sensitive-word/validate-text?' + id })
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
export type SensitiveWordVO = {
|
||||
id: number
|
||||
name: string
|
||||
status: number
|
||||
description: string
|
||||
tags: string
|
||||
type: number
|
||||
createTime: string
|
||||
}
|
32
yudao-ui-admin-vue3/src/api/system/sms/smsChannel/index.ts
Normal file
32
yudao-ui-admin-vue3/src/api/system/sms/smsChannel/index.ts
Normal file
@ -0,0 +1,32 @@
|
||||
import { defHttp } from '@/config/axios'
|
||||
import type { SmsChannelVO } from './types'
|
||||
|
||||
// 查询短信渠道列表
|
||||
export const getSmsChannelPageApi = ({ params }) => {
|
||||
return defHttp.get<PageResult<SmsChannelVO>>({ url: '/system/sms-channel/page', params })
|
||||
}
|
||||
|
||||
// 获得短信渠道精简列表
|
||||
export function getSimpleSmsChannels() {
|
||||
return defHttp.get({ url: '/system/sms-channel/list-all-simple' })
|
||||
}
|
||||
|
||||
// 查询短信渠道详情
|
||||
export const getSmsChannelApi = (id: number) => {
|
||||
return defHttp.get<SmsChannelVO>({ url: '/system/sms-channel/get?id=' + id })
|
||||
}
|
||||
|
||||
// 新增短信渠道
|
||||
export const createSmsChannelApi = (params: SmsChannelVO) => {
|
||||
return defHttp.post({ url: '/system/sms-channel/create', params })
|
||||
}
|
||||
|
||||
// 修改短信渠道
|
||||
export const updateSmsChannelApi = (params: SmsChannelVO) => {
|
||||
return defHttp.put({ url: '/system/sms-channel/update', params })
|
||||
}
|
||||
|
||||
// 删除短信渠道
|
||||
export const deleteSmsChannelApi = (id: number) => {
|
||||
return defHttp.delete({ url: '/system/sms-channel/delete?id=' + id })
|
||||
}
|
10
yudao-ui-admin-vue3/src/api/system/sms/smsChannel/types.ts
Normal file
10
yudao-ui-admin-vue3/src/api/system/sms/smsChannel/types.ts
Normal file
@ -0,0 +1,10 @@
|
||||
export type SmsChannelVO = {
|
||||
id: number
|
||||
status: number
|
||||
signature: string
|
||||
remark: string
|
||||
apiKey: string
|
||||
apiSecret: string
|
||||
callbackUrl: string
|
||||
createTime: string
|
||||
}
|
12
yudao-ui-admin-vue3/src/api/system/sms/smsLog/index.ts
Normal file
12
yudao-ui-admin-vue3/src/api/system/sms/smsLog/index.ts
Normal file
@ -0,0 +1,12 @@
|
||||
import { defHttp } from '@/config/axios'
|
||||
import type { SmsLogVO } from './types'
|
||||
|
||||
// 查询短信日志列表
|
||||
export const getSmsLogPageApi = ({ params }) => {
|
||||
return defHttp.get<PageResult<SmsLogVO>>({ url: '/system/sms-log/page', params })
|
||||
}
|
||||
|
||||
// 导出短信日志
|
||||
export const exportSmsLogApi = (params) => {
|
||||
return defHttp.get({ url: '/system/sms-log/export', params, responseType: 'blob' })
|
||||
}
|
9
yudao-ui-admin-vue3/src/api/system/sms/smsLog/types.ts
Normal file
9
yudao-ui-admin-vue3/src/api/system/sms/smsLog/types.ts
Normal file
@ -0,0 +1,9 @@
|
||||
export type SmsLogVO = {
|
||||
id: number
|
||||
idchannelId: number
|
||||
templateId: number
|
||||
mobile: string
|
||||
sendStatus: number
|
||||
receiveStatus: number
|
||||
createTime: string
|
||||
}
|
37
yudao-ui-admin-vue3/src/api/system/sms/smsTemplate/index.ts
Normal file
37
yudao-ui-admin-vue3/src/api/system/sms/smsTemplate/index.ts
Normal file
@ -0,0 +1,37 @@
|
||||
import { defHttp } from '@/config/axios'
|
||||
import type { SmsTemplateVO, SmsSendVO } from './types'
|
||||
|
||||
// 查询短信模板列表
|
||||
export const getSmsTemplatePageApi = ({ params }) => {
|
||||
return defHttp.get<PageResult<SmsTemplateVO>>({ url: '/system/sms-template/page', params })
|
||||
}
|
||||
|
||||
// 查询短信模板详情
|
||||
export const getSmsTemplateApi = (id: number) => {
|
||||
return defHttp.get<SmsTemplateVO>({ url: '/system/sms-template/get?id=' + id })
|
||||
}
|
||||
|
||||
// 新增短信模板
|
||||
export const createSmsTemplateApi = (params: SmsTemplateVO) => {
|
||||
return defHttp.post({ url: '/system/sms-template/create', params })
|
||||
}
|
||||
|
||||
// 修改短信模板
|
||||
export const updateSmsTemplateApi = (params: SmsTemplateVO) => {
|
||||
return defHttp.put({ url: '/system/sms-template/update', params })
|
||||
}
|
||||
|
||||
// 删除短信模板
|
||||
export const deleteSmsTemplateApi = (id: number) => {
|
||||
return defHttp.delete({ url: '/system/sms-template/delete?id=' + id })
|
||||
}
|
||||
|
||||
// 发送短信
|
||||
export function sendSms(params: SmsSendVO) {
|
||||
return defHttp.post({ url: '/system/sms-template/send-sms', params })
|
||||
}
|
||||
|
||||
// 导出短信模板
|
||||
export const exportPostApi = (params) => {
|
||||
return defHttp.get({ url: '/system/sms-template/export-excel', params, responseType: 'blob' })
|
||||
}
|
19
yudao-ui-admin-vue3/src/api/system/sms/smsTemplate/types.ts
Normal file
19
yudao-ui-admin-vue3/src/api/system/sms/smsTemplate/types.ts
Normal file
@ -0,0 +1,19 @@
|
||||
export type SmsTemplateVO = {
|
||||
id: number
|
||||
type: number
|
||||
status: number
|
||||
code: string
|
||||
name: string
|
||||
content: string
|
||||
remark: string
|
||||
apiTemplateId: string
|
||||
channelId: number
|
||||
channelCode: string
|
||||
createTime: string
|
||||
}
|
||||
|
||||
export type SmsSendVO = {
|
||||
mobile: string
|
||||
templateCode: string
|
||||
templateParams: string
|
||||
}
|
32
yudao-ui-admin-vue3/src/api/system/tenant/index.ts
Normal file
32
yudao-ui-admin-vue3/src/api/system/tenant/index.ts
Normal file
@ -0,0 +1,32 @@
|
||||
import { defHttp } from '@/config/axios'
|
||||
import type { TenantVO } from './types'
|
||||
|
||||
// 查询租户列表
|
||||
export const getTenantPageApi = ({ params }) => {
|
||||
return defHttp.get<PageResult<TenantVO>>({ url: '/system/tenant/page', params })
|
||||
}
|
||||
|
||||
// 查询租户详情
|
||||
export const getTenantApi = (id: number) => {
|
||||
return defHttp.get<TenantVO>({ url: '/system/tenant/get?id=' + id })
|
||||
}
|
||||
|
||||
// 新增租户
|
||||
export const createTenantApi = (params: TenantVO) => {
|
||||
return defHttp.post({ url: '/system/tenant/create', params })
|
||||
}
|
||||
|
||||
// 修改租户
|
||||
export const updateTenantApi = (params: TenantVO) => {
|
||||
return defHttp.put({ url: '/system/tenant/update', params })
|
||||
}
|
||||
|
||||
// 删除租户
|
||||
export const deleteTenantApi = (id: number) => {
|
||||
return defHttp.delete({ url: '/system/tenant/delete?id=' + id })
|
||||
}
|
||||
|
||||
// 导出租户
|
||||
export const exportTenantApi = (params) => {
|
||||
return defHttp.get({ url: '/system/tenant/export-excel', params, responseType: 'blob' })
|
||||
}
|
12
yudao-ui-admin-vue3/src/api/system/tenant/types.ts
Normal file
12
yudao-ui-admin-vue3/src/api/system/tenant/types.ts
Normal file
@ -0,0 +1,12 @@
|
||||
export type TenantVO = {
|
||||
id: number
|
||||
name: string
|
||||
packageId: number
|
||||
contactName: string
|
||||
contactMobile: string
|
||||
accountCount: number
|
||||
expireTime: string
|
||||
domain: string
|
||||
status: number
|
||||
createTime: string
|
||||
}
|
33
yudao-ui-admin-vue3/src/api/system/tenantPackage/index.ts
Normal file
33
yudao-ui-admin-vue3/src/api/system/tenantPackage/index.ts
Normal file
@ -0,0 +1,33 @@
|
||||
import { defHttp } from '@/config/axios'
|
||||
import type { TenantPackageVO } from './types'
|
||||
|
||||
// 查询租户套餐列表
|
||||
export const getTenantPackageTypePageApi = ({ params }) => {
|
||||
return defHttp.get<PageResult<TenantPackageVO>>({ url: '/system/tenant-package/page', params })
|
||||
}
|
||||
|
||||
// 获得租户
|
||||
export const getTenantPackageApi = (id: number) => {
|
||||
return defHttp.get<TenantPackageVO>({ url: '/system/tenant-package/get?id=' + id })
|
||||
}
|
||||
|
||||
// 新增租户套餐
|
||||
export const createTenantPackageTypeApi = (params: TenantPackageVO) => {
|
||||
return defHttp.post({ url: '/system/tenant-package/create', params })
|
||||
}
|
||||
|
||||
// 修改租户套餐
|
||||
export const updateTenantPackageTypeApi = (params: TenantPackageVO) => {
|
||||
return defHttp.put({ url: '/system/tenant-package/update', params })
|
||||
}
|
||||
|
||||
// 删除租户套餐
|
||||
export const deleteTenantPackageTypeApi = (id: number) => {
|
||||
return defHttp.delete({ url: '/system/tenant-package/delete?id=' + id })
|
||||
}
|
||||
// // 获取租户套餐精简信息列表
|
||||
export const getTenantPackageList = () => {
|
||||
return defHttp.get({
|
||||
url: '/system/tenant-package/get-simple-list'
|
||||
})
|
||||
}
|
11
yudao-ui-admin-vue3/src/api/system/tenantPackage/types.ts
Normal file
11
yudao-ui-admin-vue3/src/api/system/tenantPackage/types.ts
Normal file
@ -0,0 +1,11 @@
|
||||
export type TenantPackageVO = {
|
||||
id: number
|
||||
name: string
|
||||
status: number
|
||||
remark: string
|
||||
creator: string
|
||||
createTime: string
|
||||
updater: string
|
||||
updateTime: string
|
||||
menuIds: string[]
|
||||
}
|
68
yudao-ui-admin-vue3/src/api/system/user/index.ts
Normal file
68
yudao-ui-admin-vue3/src/api/system/user/index.ts
Normal file
@ -0,0 +1,68 @@
|
||||
import { defHttp } from '@/config/axios'
|
||||
import type { UserVO } from './types'
|
||||
|
||||
// 查询用户管理列表
|
||||
export const getUserPageApi = ({ params }) => {
|
||||
return defHttp.get<PageResult<UserVO>>({ url: '/system/user/page', params })
|
||||
}
|
||||
|
||||
// 查询用户详情
|
||||
export const getUserApi = (id: number) => {
|
||||
return defHttp.get<UserVO>({ url: '/system/user/get?id=' + id })
|
||||
}
|
||||
|
||||
// 新增用户
|
||||
export const createUserApi = (params: UserVO) => {
|
||||
return defHttp.post({ url: '/system/user/create', params })
|
||||
}
|
||||
|
||||
// 修改用户
|
||||
export const updateUserApi = (params: UserVO) => {
|
||||
return defHttp.put({ url: '/system/user/update', params })
|
||||
}
|
||||
|
||||
// 删除用户
|
||||
export const deleteUserApi = (id: number) => {
|
||||
return defHttp.delete({ url: '/system/user/delete?id=' + id })
|
||||
}
|
||||
|
||||
// 导出用户
|
||||
export const exportUserApi = (params) => {
|
||||
return defHttp.get({ url: '/system/user/export', params, responseType: 'blob' })
|
||||
}
|
||||
|
||||
// 下载用户导入模板
|
||||
export const importUserTemplateApi = () => {
|
||||
return defHttp.get({ url: '/system/user/get-import-template', responseType: 'blob' })
|
||||
}
|
||||
|
||||
// 用户密码重置
|
||||
export const resetUserPwdApi = (userId: number, password: number) => {
|
||||
const data = {
|
||||
userId,
|
||||
password
|
||||
}
|
||||
return defHttp.put({
|
||||
url: '/system/user/resetPwd',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 用户状态修改
|
||||
export const updateUserStatusApi = (id: number, status: number) => {
|
||||
const data = {
|
||||
id,
|
||||
status
|
||||
}
|
||||
return defHttp.put({ url: '/system/user/update-status', data: data })
|
||||
}
|
||||
|
||||
// 查询授权角色
|
||||
export const getAuthRoleApi = (userId: string) => {
|
||||
return defHttp.get({ url: '/system/user/authRole/' + userId })
|
||||
}
|
||||
|
||||
// 保存授权角色
|
||||
export const updateAuthRoleApi = (data: any) => {
|
||||
return defHttp.put({ url: '/system/user/authRole', params: data })
|
||||
}
|
28
yudao-ui-admin-vue3/src/api/system/user/profile/index.ts
Normal file
28
yudao-ui-admin-vue3/src/api/system/user/profile/index.ts
Normal file
@ -0,0 +1,28 @@
|
||||
import { defHttp } from '@/config/axios'
|
||||
import { ProfileVO } from './types'
|
||||
|
||||
// 查询用户个人信息
|
||||
export const getUserProfileApi = () => {
|
||||
return defHttp.get<ProfileVO>({ url: '/system/user/profile/get' })
|
||||
}
|
||||
|
||||
// 修改用户个人信息
|
||||
export const updateUserProfileApi = ({ params }) => {
|
||||
return defHttp.put({ url: '/system/user/profile/update', params })
|
||||
}
|
||||
|
||||
// 用户密码重置
|
||||
export const updateUserPwdApi = (oldPassword: string, newPassword: string) => {
|
||||
return defHttp.put({
|
||||
url: '/system/user/profile/update-password',
|
||||
params: {
|
||||
oldPassword: oldPassword,
|
||||
newPassword: newPassword
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 用户头像上传
|
||||
export const uploadAvatarApi = (data) => {
|
||||
return defHttp.put({ url: '/system/user/profile/update-avatar', data: data })
|
||||
}
|
42
yudao-ui-admin-vue3/src/api/system/user/profile/types.ts
Normal file
42
yudao-ui-admin-vue3/src/api/system/user/profile/types.ts
Normal file
@ -0,0 +1,42 @@
|
||||
export type ProfileDept = {
|
||||
id: number
|
||||
name: string
|
||||
}
|
||||
export type ProfileRole = {
|
||||
id: number
|
||||
name: string
|
||||
}
|
||||
export type ProfilePost = {
|
||||
id: number
|
||||
name: string
|
||||
}
|
||||
export type SocialUser = {
|
||||
id: number
|
||||
type: number
|
||||
openid: string
|
||||
token: string
|
||||
rawTokenInfo: string
|
||||
nickname: string
|
||||
avatar: string
|
||||
rawUserInfo: string
|
||||
code: string
|
||||
state: string
|
||||
}
|
||||
export type ProfileVO = {
|
||||
id: number
|
||||
username: string
|
||||
nickname: string
|
||||
dept: ProfileDept
|
||||
roles: ProfileRole[]
|
||||
posts: ProfilePost[]
|
||||
socialUsers: SocialUser[]
|
||||
email: string
|
||||
mobile: string
|
||||
sex: number
|
||||
avatar: string
|
||||
status: number
|
||||
remark: string
|
||||
loginIp: string
|
||||
loginDate: Date
|
||||
createTime: Date
|
||||
}
|
16
yudao-ui-admin-vue3/src/api/system/user/types.ts
Normal file
16
yudao-ui-admin-vue3/src/api/system/user/types.ts
Normal file
@ -0,0 +1,16 @@
|
||||
export type UserVO = {
|
||||
id: number
|
||||
username: string
|
||||
nickname: string
|
||||
deptId: number
|
||||
postIds: string[]
|
||||
email: string
|
||||
mobile: string
|
||||
sex: number
|
||||
avatar: string
|
||||
loginIp: string
|
||||
status: number
|
||||
remark: string
|
||||
loginDate: string
|
||||
createTime: string
|
||||
}
|
Reference in New Issue
Block a user