update 重构 彻底删除proxy用法 改为vue3官方推荐写法
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import type { DemoForm, DemoQuery, DemoVO } from '@/api/demo/demo/types';
|
||||
import type { PageResult } from '@/api/types';
|
||||
import type { AxiosPromise } from '@/utils/api-types';
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { DemoVO, DemoForm, DemoQuery } from '@/api/demo/demo/types';
|
||||
import { PageResult } from '@/api/types';
|
||||
|
||||
/**
|
||||
* 查询测试单列表
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { TreeForm, TreeQuery, TreeVO } from '@/api/demo/tree/types';
|
||||
import type { AxiosPromise } from '@/utils/api-types';
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { TreeVO, TreeForm, TreeQuery } from '@/api/demo/tree/types';
|
||||
|
||||
/**
|
||||
* 查询测试树列表
|
||||
|
||||
+4
-4
@@ -1,8 +1,8 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { LoginData, LoginResult, VerifyCodeResult } from './types';
|
||||
import { UserInfo } from '@/api/system/user/types';
|
||||
import type { UserInfo } from '@/api/system/user/types';
|
||||
import type { AxiosPromise } from '@/utils/api-types';
|
||||
import { closePush } from '@/utils/push';
|
||||
import request from '@/utils/request';
|
||||
import type { LoginData, LoginResult, VerifyCodeResult } from './types';
|
||||
|
||||
// pc端固定客户端授权id
|
||||
const clientId = import.meta.env.VITE_APP_CLIENT_ID;
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
import type { RouteRecordRaw } from 'vue-router';
|
||||
import type { AxiosPromise } from '@/utils/api-types';
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { RouteRecordRaw } from 'vue-router';
|
||||
|
||||
// 获取路由
|
||||
export function getRouters(): AxiosPromise<RouteRecordRaw[]> {
|
||||
|
||||
Vendored
+2
-2
@@ -1,6 +1,6 @@
|
||||
import type { AxiosPromise } from '@/utils/api-types';
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { CacheVO } from './types';
|
||||
import type { CacheVO } from './types';
|
||||
|
||||
// 查询缓存详细
|
||||
export function getCache(): AxiosPromise<CacheVO> {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { PageResult } from '@/api/types';
|
||||
import type { AxiosPromise } from '@/utils/api-types';
|
||||
import request from '@/utils/request';
|
||||
import { LoginInfoQuery, LoginInfoVO } from './types';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { PageResult } from '@/api/types';
|
||||
import type { LoginInfoQuery, LoginInfoVO } from './types';
|
||||
|
||||
// 查询登录日志列表
|
||||
export function list(query: LoginInfoQuery): AxiosPromise<PageResult<LoginInfoVO>> {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { PageResult } from '@/api/types';
|
||||
import type { AxiosPromise } from '@/utils/api-types';
|
||||
import request from '@/utils/request';
|
||||
import { OnlineQuery, OnlineVO } from './types';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { PageResult } from '@/api/types';
|
||||
import type { OnlineQuery, OnlineVO } from './types';
|
||||
|
||||
// 查询在线用户列表
|
||||
export function list(query: OnlineQuery): AxiosPromise<PageResult<OnlineVO>> {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { PageResult } from '@/api/types';
|
||||
import type { AxiosPromise } from '@/utils/api-types';
|
||||
import request from '@/utils/request';
|
||||
import { OperLogQuery, OperLogVO } from './types';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { PageResult } from '@/api/types';
|
||||
import type { OperLogQuery, OperLogVO } from './types';
|
||||
|
||||
// 查询操作日志列表
|
||||
export function list(query: OperLogQuery): AxiosPromise<PageResult<OperLogVO>> {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { ClientForm, ClientQuery, ClientVO } from '@/api/system/client/types';
|
||||
import type { PageResult } from '@/api/types';
|
||||
import type { AxiosPromise } from '@/utils/api-types';
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { ClientVO, ClientForm, ClientQuery } from '@/api/system/client/types';
|
||||
import { PageResult } from '@/api/types';
|
||||
|
||||
/**
|
||||
* 查询客户端管理列表
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { PageResult } from '@/api/types';
|
||||
import type { AxiosPromise } from '@/utils/api-types';
|
||||
import request from '@/utils/request';
|
||||
import { ConfigForm, ConfigQuery, ConfigVO } from './types';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { PageResult } from '@/api/types';
|
||||
import type { ConfigForm, ConfigQuery, ConfigVO } from './types';
|
||||
|
||||
// 查询参数列表
|
||||
export function listConfig(query: ConfigQuery): AxiosPromise<PageResult<ConfigVO>> {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { AxiosPromise } from '@/utils/api-types';
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { DeptForm, DeptQuery, DeptTreeVO, DeptVO } from './types';
|
||||
import { type DeptForm, type DeptQuery, type DeptVO } from './types';
|
||||
|
||||
// 查询部门列表
|
||||
export const listDept = (query?: DeptQuery) => {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import type { PageResult } from '@/api/types';
|
||||
import type { AxiosPromise } from '@/utils/api-types';
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { DictDataForm, DictDataQuery, DictDataVO } from './types';
|
||||
import type { DictDataForm, DictDataQuery, DictDataVO } from './types';
|
||||
// 根据字典类型查询字典数据信息
|
||||
export function getDicts(dictType: string): AxiosPromise<DictDataVO[]> {
|
||||
return request({
|
||||
@@ -10,7 +11,7 @@ export function getDicts(dictType: string): AxiosPromise<DictDataVO[]> {
|
||||
}
|
||||
|
||||
// 查询字典数据列表
|
||||
export function listData(query: DictDataQuery): AxiosPromise<DictDataVO[]> {
|
||||
export function listData(query: DictDataQuery): AxiosPromise<PageResult<DictDataVO>> {
|
||||
return request({
|
||||
url: '/system/dict/data/list',
|
||||
method: 'get',
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { PageResult } from '@/api/types';
|
||||
import type { AxiosPromise } from '@/utils/api-types';
|
||||
import request from '@/utils/request';
|
||||
import { DictTypeForm, DictTypeVO, DictTypeQuery } from './types';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { PageResult } from '@/api/types';
|
||||
import type { DictTypeForm, DictTypeQuery, DictTypeVO } from './types';
|
||||
|
||||
// 查询字典类型列表
|
||||
export function listType(query: DictTypeQuery): AxiosPromise<PageResult<DictTypeVO>> {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { AxiosPromise } from '@/utils/api-types';
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { MenuQuery, MenuVO, MenuForm, MenuTreeOption, RoleMenuTree } from './types';
|
||||
import type { MenuForm, MenuQuery, MenuTreeOption, MenuVO, RoleMenuTree } from './types';
|
||||
|
||||
// 查询菜单列表
|
||||
export const listMenu = (query?: MenuQuery): AxiosPromise<MenuVO[]> => {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { MenuTypeEnum } from '@/enums/MenuTypeEnum';
|
||||
import type { MenuTypeEnum } from '@/enums/MenuTypeEnum';
|
||||
|
||||
/**
|
||||
* 菜单树形结构类型
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { AxiosPromise } from '@/utils/api-types';
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { MessageBoxVO } from './types';
|
||||
import type { MessageBoxVO } from './types';
|
||||
|
||||
export function getMessageBox(): AxiosPromise<MessageBoxVO> {
|
||||
return request({
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { PageResult } from '@/api/types';
|
||||
import type { AxiosPromise } from '@/utils/api-types';
|
||||
import request from '@/utils/request';
|
||||
import { NoticeForm, NoticeQuery, NoticeVO } from './types';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { PageResult } from '@/api/types';
|
||||
import type { NoticeForm, NoticeQuery, NoticeVO } from './types';
|
||||
// 查询公告列表
|
||||
export function listNotice(query: NoticeQuery): AxiosPromise<PageResult<NoticeVO>> {
|
||||
return request({
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { PageResult } from '@/api/types';
|
||||
import type { AxiosPromise } from '@/utils/api-types';
|
||||
import request from '@/utils/request';
|
||||
import { OssQuery, OssVO } from './types';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { PageResult } from '@/api/types';
|
||||
import type { OssQuery, OssVO } from './types';
|
||||
|
||||
// 查询OSS对象存储列表
|
||||
export function listOss(query: OssQuery): AxiosPromise<PageResult<OssVO>> {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { PageResult } from '@/api/types';
|
||||
import type { AxiosPromise } from '@/utils/api-types';
|
||||
import request from '@/utils/request';
|
||||
import { OssConfigForm, OssConfigQuery, OssConfigVO } from './types';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { PageResult } from '@/api/types';
|
||||
import type { OssConfigForm, OssConfigQuery, OssConfigVO } from './types';
|
||||
|
||||
// 查询对象存储配置列表
|
||||
export function listOssConfig(query: OssConfigQuery): AxiosPromise<PageResult<OssConfigVO>> {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import type { PageResult } from '@/api/types';
|
||||
import type { AxiosPromise } from '@/utils/api-types';
|
||||
import request from '@/utils/request';
|
||||
import { PostForm, PostQuery, PostVO } from './types';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { DeptTreeVO } from '../dept/types';
|
||||
import { PageResult } from '@/api/types';
|
||||
import type { DeptTreeVO } from '../dept/types';
|
||||
import type { PostForm, PostQuery, PostVO } from './types';
|
||||
|
||||
// 查询岗位列表
|
||||
export function listPost(query: PostQuery): AxiosPromise<PageResult<PostVO>> {
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
import { UserVO } from '@/api/system/user/types';
|
||||
import { UserQuery } from '@/api/system/user/types';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { RoleQuery, RoleVO, RoleDeptTree } from './types';
|
||||
import type { UserQuery, UserVO } from '@/api/system/user/types';
|
||||
import type { PageResult } from '@/api/types';
|
||||
import type { AxiosPromise } from '@/utils/api-types';
|
||||
import request from '@/utils/request';
|
||||
import { PageResult } from '@/api/types';
|
||||
import type { RoleDeptTree, RoleQuery, RoleVO } from './types';
|
||||
|
||||
export const listRole = (query: RoleQuery): AxiosPromise<PageResult<RoleVO>> => {
|
||||
return request({
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { DeptTreeVO } from './../dept/types';
|
||||
import { RoleVO } from '@/api/system/role/types';
|
||||
import type { RoleVO } from '@/api/system/role/types';
|
||||
import type { PageResult } from '@/api/types';
|
||||
import type { AxiosPromise } from '@/utils/api-types';
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { UserForm, UserQuery, UserVO, UserInfoVO } from './types';
|
||||
import { parseStrEmpty } from '@/utils/ruoyi';
|
||||
import { PageResult } from '@/api/types';
|
||||
import type { DeptTreeVO } from './../dept/types';
|
||||
import type { UserForm, UserInfoVO, UserQuery, UserVO } from './types';
|
||||
|
||||
/**
|
||||
* 查询用户列表
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { RoleVO } from '@/api/system/role/types';
|
||||
import { PostVO } from '@/api/system/post/types';
|
||||
import type { PostVO } from '@/api/system/post/types';
|
||||
import type { RoleVO } from '@/api/system/role/types';
|
||||
|
||||
/**
|
||||
* 用户信息
|
||||
@@ -43,6 +43,8 @@ export interface UserVO extends BaseEntity {
|
||||
loginDate: string;
|
||||
remark: string;
|
||||
deptName: string;
|
||||
/** 详情接口可能返回嵌套部门 */
|
||||
dept?: { deptName?: string };
|
||||
roles: RoleVO[];
|
||||
roleIds: any;
|
||||
postIds: any;
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
import type { PageResult } from '@/api/types';
|
||||
import type { AxiosPromise } from '@/utils/api-types';
|
||||
import request from '@/utils/request';
|
||||
import { DbTableQuery, DbTableVO, TableQuery, TableVO, GenTableVO, DbTableForm } from './types';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { PageResult } from '@/api/types';
|
||||
import type { DbTableForm, DbTableQuery, DbTableVO, GenTableDetailPayload, TableQuery, TableVO } from './types';
|
||||
|
||||
export type { GenTableDetailPayload } from './types';
|
||||
|
||||
// 查询生成表数据
|
||||
export const listTable = (query: TableQuery): AxiosPromise<PageResult<TableVO>> => {
|
||||
@@ -21,7 +23,7 @@ export const listDbTable = (query: DbTableQuery): AxiosPromise<PageResult<DbTabl
|
||||
};
|
||||
|
||||
// 查询表详细信息
|
||||
export const getGenTable = (tableId: string | number): AxiosPromise<GenTableVO> => {
|
||||
export const getGenTable = (tableId: string | number): AxiosPromise<GenTableDetailPayload> => {
|
||||
return request({
|
||||
url: '/tool/gen/' + tableId,
|
||||
method: 'get'
|
||||
@@ -29,7 +31,7 @@ export const getGenTable = (tableId: string | number): AxiosPromise<GenTableVO>
|
||||
};
|
||||
|
||||
// 修改代码生成信息
|
||||
export const updateGenTable = (data: DbTableForm): AxiosPromise<GenTableVO> => {
|
||||
export const updateGenTable = (data: DbTableForm): AxiosPromise<unknown> => {
|
||||
return request({
|
||||
url: '/tool/gen',
|
||||
method: 'put',
|
||||
@@ -38,7 +40,7 @@ export const updateGenTable = (data: DbTableForm): AxiosPromise<GenTableVO> => {
|
||||
};
|
||||
|
||||
// 导入表
|
||||
export const importTable = (data: { tables: string; dataName: string }): AxiosPromise<GenTableVO> => {
|
||||
export const importTable = (data: { tables: string; dataName: string }): AxiosPromise<unknown> => {
|
||||
return request({
|
||||
url: '/tool/gen/importTable',
|
||||
method: 'post',
|
||||
|
||||
@@ -103,7 +103,13 @@ export interface DbTableQuery extends PageQuery {
|
||||
tableComment: string;
|
||||
}
|
||||
|
||||
export interface GenTableVO {
|
||||
/**
|
||||
* 代码生成表详情接口 data 结构(与后端 Map 三键一致)
|
||||
* - info:当前表 GenTable
|
||||
* - rows:字段列表 GenTableColumn[]
|
||||
* - tables:全部表 GenTable[](主子表等选项)
|
||||
*/
|
||||
export interface GenTableDetailPayload {
|
||||
info: DbTableVO;
|
||||
rows: DbColumnVO[];
|
||||
tables: DbTableVO[];
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { CategoryForm, CategoryQuery, CategoryTreeVO, CategoryVO } from '@/api/workflow/category/types';
|
||||
import type { AxiosPromise } from '@/utils/api-types';
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { CategoryVO, CategoryForm, CategoryQuery, CategoryTreeVO } from '@/api/workflow/category/types';
|
||||
|
||||
/**
|
||||
* 查询流程分类列表
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import request from '@/utils/request';
|
||||
import {
|
||||
FlowDefinitionQuery,
|
||||
import type { PageResult } from '@/api/types';
|
||||
import type {
|
||||
definitionXmlVO,
|
||||
FlowDefinitionForm,
|
||||
FlowDefinitionQuery,
|
||||
FlowDefinitionVo
|
||||
} from '@/api/workflow/definition/types';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { PageResult } from '@/api/types';
|
||||
import type { AxiosPromise } from '@/utils/api-types';
|
||||
import request from '@/utils/request';
|
||||
|
||||
/**
|
||||
* 获取流程定义列表
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { PageResult } from '@/api/types';
|
||||
import type { FlowInstanceQuery, FlowInstanceVO } from '@/api/workflow/instance/types';
|
||||
import type { AxiosPromise } from '@/utils/api-types';
|
||||
import request from '@/utils/request';
|
||||
import { FlowInstanceQuery, FlowInstanceVO } from '@/api/workflow/instance/types';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { PageResult } from '@/api/types';
|
||||
|
||||
/**
|
||||
* 查询运行中实例列表
|
||||
@@ -34,7 +34,7 @@ export const pageByFinish = (query: FlowInstanceQuery): AxiosPromise<PageResult<
|
||||
*/
|
||||
export const flowHisTaskList = (businessId: string | number) => {
|
||||
return request({
|
||||
url: `/workflow/instance/flowHisTaskList/${businessId}` + '?t' + Math.random(),
|
||||
url: `/workflow/instance/flowHisTaskList/${businessId}?t=${Math.random()}`,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { FlowTaskVO } from '@/api/workflow/task/types';
|
||||
import type { FlowTaskVO } from '@/api/workflow/task/types';
|
||||
|
||||
export interface FlowInstanceQuery extends PageQuery {
|
||||
category?: string | number;
|
||||
nodeName?: string;
|
||||
flowCode?: string;
|
||||
flowName?: string;
|
||||
createByIds?: string[] | number[];
|
||||
createByIds?: Array<string | number>;
|
||||
businessId?: string;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { PageResult } from '@/api/types';
|
||||
import type { LeaveForm, LeaveQuery, LeaveVO } from '@/api/workflow/leave/types';
|
||||
import type { AxiosPromise } from '@/utils/api-types';
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { LeaveVO, LeaveQuery, LeaveForm } from '@/api/workflow/leave/types';
|
||||
import { PageResult } from '@/api/types';
|
||||
|
||||
/**
|
||||
* 查询请假列表
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { PageResult } from '@/api/types';
|
||||
import type { SpelForm, SpelQuery, SpelVO } from '@/api/workflow/spel/types';
|
||||
import type { AxiosPromise } from '@/utils/api-types';
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { SpelVO, SpelForm, SpelQuery } from '@/api/workflow/spel/types';
|
||||
import { PageResult } from '@/api/types';
|
||||
|
||||
/**
|
||||
* 查询流程spel表达式定义列表
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { PageResult } from '@/api/types';
|
||||
import type { FlowTaskVO, TaskOperationBo, TaskQuery } from '@/api/workflow/task/types';
|
||||
import type { AxiosPromise } from '@/utils/api-types';
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { TaskQuery, FlowTaskVO, TaskOperationBo } from '@/api/workflow/task/types';
|
||||
import { PageResult } from '@/api/types';
|
||||
|
||||
/**
|
||||
* 查询待办列表
|
||||
|
||||
@@ -2,7 +2,7 @@ export interface TaskQuery extends PageQuery {
|
||||
nodeName?: string;
|
||||
flowCode?: string;
|
||||
flowName?: string;
|
||||
createByIds?: string[] | number[];
|
||||
createByIds?: Array<string | number>;
|
||||
}
|
||||
|
||||
export interface ParticipantVo {
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
import { RouterJumpVo } from '@/api/workflow/workflowCommon/types';
|
||||
import type { RouterJumpVo } from '@/api/workflow/workflowCommon/types';
|
||||
import tab from '@/plugins/tab';
|
||||
import router from '@/router';
|
||||
|
||||
export default {
|
||||
routerJump(routerJumpVo: RouterJumpVo, proxy) {
|
||||
proxy.$tab.closePage(proxy.$route);
|
||||
proxy.$router.push({
|
||||
routerJump(routerJumpVo: RouterJumpVo) {
|
||||
tab.closePage(router.currentRoute.value);
|
||||
router.push({
|
||||
path: routerJumpVo.formPath,
|
||||
query: {
|
||||
id: routerJumpVo.businessId,
|
||||
|
||||
Reference in New Issue
Block a user