mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-09-23 21:51:59 +08:00
refactor: refactor axios
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
import request from '@/config/axios'
|
||||
import { FormVO } from './types'
|
||||
const request = useAxios()
|
||||
|
||||
// 创建工作流的表单定义
|
||||
export const createFormApi = async (data: FormVO) => {
|
||||
|
@@ -1,6 +1,5 @@
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
import request from '@/config/axios'
|
||||
import { LeaveVO } from './types'
|
||||
const request = useAxios()
|
||||
|
||||
// 创建请假申请
|
||||
export const createLeaveApi = async (data: LeaveVO) => {
|
||||
|
@@ -1,6 +1,5 @@
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
import request from '@/config/axios'
|
||||
import { ModelVO } from './types'
|
||||
const request = useAxios()
|
||||
|
||||
export const getModelPageApi = async (params) => {
|
||||
return await request.get({ url: '/bpm/model/page', params })
|
||||
|
@@ -1,6 +1,5 @@
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
import request from '@/config/axios'
|
||||
import { ProcessInstanceVO } from './types'
|
||||
const request = useAxios()
|
||||
|
||||
export const getMyProcessInstancePageApi = async (params) => {
|
||||
return await request.get({ url: '/bpm/process-instance/my-page', params })
|
||||
|
@@ -1,6 +1,4 @@
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
|
||||
const request = useAxios()
|
||||
import request from '@/config/axios'
|
||||
|
||||
export const getTodoTaskPage = async (params) => {
|
||||
return await request.get({ url: '/bpm/task/todo-page', params })
|
||||
|
@@ -1,6 +1,5 @@
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
import request from '@/config/axios'
|
||||
import { TaskAssignVO } from './types'
|
||||
const request = useAxios()
|
||||
|
||||
export const getTaskAssignRuleList = async (params) => {
|
||||
return await request.get({ url: '/bpm/task-assign-rule/list', params })
|
||||
|
@@ -1,6 +1,5 @@
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
import request from '@/config/axios'
|
||||
import { UserGroupVO } from './types'
|
||||
const request = useAxios()
|
||||
|
||||
// 创建用户组
|
||||
export const createUserGroupApi = async (data: UserGroupVO) => {
|
||||
|
@@ -1,6 +1,4 @@
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
|
||||
const request = useAxios()
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 查询列表API 访问日志
|
||||
export const getApiAccessLogPageApi = (params) => {
|
||||
|
@@ -1,6 +1,4 @@
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
|
||||
const request = useAxios()
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 查询列表API 访问日志
|
||||
export const getApiErrorLogPageApi = (params) => {
|
||||
|
@@ -1,8 +1,6 @@
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
import request from '@/config/axios'
|
||||
import type { CodegenUpdateReqVO, CodegenCreateListReqVO } from './types'
|
||||
|
||||
const request = useAxios()
|
||||
|
||||
// 查询列表代码生成表定义
|
||||
export const getCodegenTablePageApi = (params) => {
|
||||
return request.get({ url: '/infra/codegen/table/page', params })
|
||||
|
@@ -1,8 +1,6 @@
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
import request from '@/config/axios'
|
||||
import type { ConfigVO } from './types'
|
||||
|
||||
const request = useAxios()
|
||||
|
||||
// 查询参数列表
|
||||
export const getConfigPageApi = (params) => {
|
||||
return request.get({ url: '/infra/config/page', params })
|
||||
|
@@ -1,8 +1,6 @@
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
import request from '@/config/axios'
|
||||
import type { DataSourceConfigVO } from './types'
|
||||
|
||||
const request = useAxios()
|
||||
|
||||
// 查询数据源配置列表
|
||||
export const getDataSourceConfigListApi = () => {
|
||||
return request.get({ url: '/infra/data-source-config/list' })
|
||||
|
@@ -1,6 +1,4 @@
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
|
||||
const request = useAxios()
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 导出Html
|
||||
export const exportHtmlApi = () => {
|
||||
|
@@ -1,8 +1,6 @@
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
import request from '@/config/axios'
|
||||
import type { FileConfigVO } from './types'
|
||||
|
||||
const request = useAxios()
|
||||
|
||||
// 查询文件配置列表
|
||||
export const getFileConfigPageApi = (params) => {
|
||||
return request.get({ url: '/infra/file-config/page', params })
|
||||
|
@@ -1,6 +1,4 @@
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
|
||||
const request = useAxios()
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 查询文件列表
|
||||
export const getFilePageApi = (params) => {
|
||||
|
@@ -1,8 +1,6 @@
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
import request from '@/config/axios'
|
||||
import type { JobVO } from './types'
|
||||
|
||||
const request = useAxios()
|
||||
|
||||
// 任务列表
|
||||
export const getJobPageApi = (params) => {
|
||||
return request.get({ url: '/infra/job/page', params })
|
||||
|
@@ -1,6 +1,4 @@
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
|
||||
const request = useAxios()
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 任务日志列表
|
||||
export const getJobLogPageApi = (params) => {
|
||||
|
@@ -1,6 +1,4 @@
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
|
||||
const request = useAxios()
|
||||
import request from '@/config/axios'
|
||||
|
||||
/**
|
||||
* 获取redis 监控信息
|
||||
|
@@ -1,9 +1,7 @@
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
import request from '@/config/axios'
|
||||
import { getRefreshToken } from '@/utils/auth'
|
||||
import type { UserLoginVO } from './types'
|
||||
|
||||
const request = useAxios()
|
||||
|
||||
export interface CodeImgResult {
|
||||
captchaOnOff: boolean
|
||||
img: string
|
||||
|
@@ -1,8 +1,6 @@
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
import request from '@/config/axios'
|
||||
import type { AppVO } from './types'
|
||||
|
||||
const request = useAxios()
|
||||
|
||||
// 查询列表支付应用
|
||||
export const getAppPageApi = (params) => {
|
||||
return request.get({ url: '/pay/app/page', params })
|
||||
|
@@ -1,8 +1,6 @@
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
import request from '@/config/axios'
|
||||
import type { ChannelVO } from './types'
|
||||
|
||||
const request = useAxios()
|
||||
|
||||
// 查询列表支付渠道
|
||||
export const getChannelPageApi = (params) => {
|
||||
return request.get({ url: '/pay/channel/page', params })
|
||||
|
@@ -1,8 +1,6 @@
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
import request from '@/config/axios'
|
||||
import type { MerchantVO } from './types'
|
||||
|
||||
const request = useAxios()
|
||||
|
||||
// 查询列表支付商户
|
||||
export const getMerchantPageApi = (params) => {
|
||||
return request.get({ url: '/pay/merchant/page', params })
|
||||
|
@@ -1,8 +1,6 @@
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
import request from '@/config/axios'
|
||||
import type { OrderVO } from './types'
|
||||
|
||||
const request = useAxios()
|
||||
|
||||
// 查询列表支付订单
|
||||
export const getOrderPageApi = async (params) => {
|
||||
return await request.get({ url: '/pay/order/page', params })
|
||||
|
@@ -1,8 +1,6 @@
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
import request from '@/config/axios'
|
||||
import type { RefundVO } from './types'
|
||||
|
||||
const request = useAxios()
|
||||
|
||||
// 查询列表退款订单
|
||||
export const getRefundPageApi = (params) => {
|
||||
return request.get({ url: '/pay/refund/page', params })
|
||||
|
@@ -1,8 +1,6 @@
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
import request from '@/config/axios'
|
||||
import type { DeptVO, DeptListReqVO } from './types'
|
||||
|
||||
const request = useAxios()
|
||||
|
||||
// 查询部门(精简)列表
|
||||
export const listSimpleDeptApi = () => {
|
||||
return request.get({ url: '/system/dept/list-all-simple' })
|
||||
|
@@ -1,8 +1,6 @@
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
import request from '@/config/axios'
|
||||
import type { DictDataVO, DictDataPageReqVO, DictDataExportReqVO } from './types'
|
||||
|
||||
const request = useAxios()
|
||||
|
||||
// 查询字典数据(精简)列表
|
||||
export const listSimpleDictDataApi = () => {
|
||||
return request.get({ url: '/system/dict-data/list-all-simple' })
|
||||
|
@@ -1,8 +1,6 @@
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
import request from '@/config/axios'
|
||||
import type { DictTypeVO, DictTypePageReqVO, DictTypeExportReqVO } from './types'
|
||||
|
||||
const request = useAxios()
|
||||
|
||||
// 查询字典(精简)列表
|
||||
export const listSimpleDictTypeApi = () => {
|
||||
return request.get({ url: '/system/dict-type/list-all-simple' })
|
||||
|
@@ -1,8 +1,6 @@
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
import request from '@/config/axios'
|
||||
import type { ErrorCodeVO } from './types'
|
||||
|
||||
const request = useAxios()
|
||||
|
||||
// 查询错误码列表
|
||||
export const getErrorCodePageApi = (params) => {
|
||||
return request.get({ url: '/system/error-code/page', params })
|
||||
|
@@ -1,6 +1,4 @@
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
|
||||
const request = useAxios()
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 查询登录日志列表
|
||||
export const getLoginLogPageApi = (params) => {
|
||||
|
@@ -1,8 +1,6 @@
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
import request from '@/config/axios'
|
||||
import type { MenuVO } from './types'
|
||||
|
||||
const request = useAxios()
|
||||
|
||||
// 查询菜单(精简)列表
|
||||
export const listSimpleMenusApi = () => {
|
||||
return request.get({ url: '/system/menu/list-all-simple' })
|
||||
|
@@ -1,8 +1,6 @@
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
import request from '@/config/axios'
|
||||
import type { NoticeVO } from './types'
|
||||
|
||||
const request = useAxios()
|
||||
|
||||
// 查询公告列表
|
||||
export const getNoticePageApi = (params) => {
|
||||
return request.get({ url: '/system/notice/page', params })
|
||||
|
@@ -1,8 +1,6 @@
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
import request from '@/config/axios'
|
||||
import { OAuth2ClientVo } from './client.types'
|
||||
|
||||
const request = useAxios()
|
||||
|
||||
// 查询 OAuth2列表
|
||||
export const getOAuth2ClientPageApi = (params) => {
|
||||
return request.get({ url: '/system/oauth2-client/page', params })
|
||||
|
@@ -1,6 +1,4 @@
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
|
||||
const request = useAxios()
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 查询 token列表
|
||||
export const getAccessTokenPageApi = (params) => {
|
||||
|
@@ -1,6 +1,4 @@
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
|
||||
const request = useAxios()
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 查询操作日志列表
|
||||
export const getOperateLogPageApi = (params) => {
|
||||
|
@@ -1,12 +1,10 @@
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
import request from '@/config/axios'
|
||||
import type {
|
||||
PermissionAssignRoleDataScopeReqVO,
|
||||
PermissionAssignRoleMenuReqVO,
|
||||
PermissionAssignUserRoleReqVO
|
||||
} from './types'
|
||||
|
||||
const request = useAxios()
|
||||
|
||||
// 查询角色拥有的菜单权限
|
||||
export const listRoleMenusApi = async (roleId: number) => {
|
||||
return await request.get({ url: '/system/permission/list-role-resources?roleId=' + roleId })
|
||||
|
@@ -1,8 +1,6 @@
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
import request from '@/config/axios'
|
||||
import type { PostVO, PostPageReqVO, PostExportReqVO } from './types'
|
||||
|
||||
const request = useAxios()
|
||||
|
||||
// 查询岗位列表
|
||||
export const getPostPageApi = async (params: PostPageReqVO) => {
|
||||
return await request.get({ url: '/system/post/page', params })
|
||||
|
@@ -1,8 +1,6 @@
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
import request from '@/config/axios'
|
||||
import type { RoleVO } from './types'
|
||||
|
||||
const request = useAxios()
|
||||
|
||||
// 查询角色列表
|
||||
export const getRolePageApi = async (params) => {
|
||||
return await request.get({ url: '/system/role/page', params })
|
||||
|
@@ -1,8 +1,6 @@
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
import request from '@/config/axios'
|
||||
import type { SensitiveWordVO } from './types'
|
||||
|
||||
const request = useAxios()
|
||||
|
||||
// 查询敏感词列表
|
||||
export const getSensitiveWordPageApi = (params) => {
|
||||
return request.get({ url: '/system/sensitive-word/page', params })
|
||||
|
@@ -1,8 +1,6 @@
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
import request from '@/config/axios'
|
||||
import type { SmsChannelVO } from './types'
|
||||
|
||||
const request = useAxios()
|
||||
|
||||
// 查询短信渠道列表
|
||||
export const getSmsChannelPageApi = (params) => {
|
||||
return request.get({ url: '/system/sms-channel/page', params })
|
||||
|
@@ -1,6 +1,4 @@
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
|
||||
const request = useAxios()
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 查询短信日志列表
|
||||
export const getSmsLogPageApi = (params) => {
|
||||
|
@@ -1,8 +1,6 @@
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
import request from '@/config/axios'
|
||||
import type { SmsTemplateVO } from './types'
|
||||
|
||||
const request = useAxios()
|
||||
|
||||
// 查询短信模板列表
|
||||
export const getSmsTemplatePageApi = (params) => {
|
||||
return request.get({ url: '/system/sms-template/page', params })
|
||||
|
@@ -1,8 +1,6 @@
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
import request from '@/config/axios'
|
||||
import type { TenantVO } from './types'
|
||||
|
||||
const request = useAxios()
|
||||
|
||||
// 查询租户列表
|
||||
export const getTenantPageApi = (params) => {
|
||||
return request.get({ url: '/system/tenant/page', params })
|
||||
|
@@ -1,8 +1,6 @@
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
import request from '@/config/axios'
|
||||
import type { TenantPackageVO } from './types'
|
||||
|
||||
const request = useAxios()
|
||||
|
||||
// 查询租户套餐列表
|
||||
export const getTenantPackageTypePageApi = (params) => {
|
||||
return request.get({ url: '/system/tenant-package/page', params })
|
||||
|
@@ -1,8 +1,6 @@
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
import request from '@/config/axios'
|
||||
import type { UserVO } from './types'
|
||||
|
||||
const request = useAxios()
|
||||
|
||||
// 查询用户管理列表
|
||||
export const getUserPageApi = (params) => {
|
||||
return request.get({ url: '/system/user/page', params })
|
||||
|
@@ -1,6 +1,4 @@
|
||||
import { useAxios } from '@/hooks/web/useAxios'
|
||||
|
||||
const request = useAxios()
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 查询用户个人信息
|
||||
export const getUserProfileApi = () => {
|
||||
|
Reference in New Issue
Block a user