75 changed files with 454 additions and 439 deletions
@ -0,0 +1,6 @@ |
|||||||
|
/** |
||||||
|
* @program: kicc-ui |
||||||
|
* @description: 基础相关常量 |
||||||
|
* @author: entfrm开发团队-王翔 |
||||||
|
* @create: 2022/4/8 |
||||||
|
*/ |
@ -0,0 +1,36 @@ |
|||||||
|
/** |
||||||
|
* @program: kicc-ui |
||||||
|
* @description: 基础相关实体类 |
||||||
|
* 类型定义 |
||||||
|
* @author: entfrm开发团队-王翔 |
||||||
|
* @create: 2022/4/8 |
||||||
|
*/ |
||||||
|
|
||||||
|
/** 扩展安全框架用户信息 */ |
||||||
|
export interface KiccUser { |
||||||
|
id: string; |
||||||
|
username: string; |
||||||
|
password: string; |
||||||
|
deptId: string; |
||||||
|
phone: string; |
||||||
|
enabled: boolean; |
||||||
|
tenantId: string; |
||||||
|
authorities: Recordable[]; |
||||||
|
accountNonLocked: boolean; |
||||||
|
accountNonExpired: boolean; |
||||||
|
credentialsNonExpired: boolean; |
||||||
|
[key: string]: any; |
||||||
|
} |
||||||
|
|
||||||
|
/** 基础模型 */ |
||||||
|
export interface BaseEntity { |
||||||
|
tenantId: string; |
||||||
|
currentUser: KiccUser; |
||||||
|
sqlFilter: string; |
||||||
|
} |
||||||
|
|
||||||
|
/** 结果集模型 */ |
||||||
|
export interface ResultVo<T = any> { |
||||||
|
result: T; |
||||||
|
extend: T; |
||||||
|
} |
@ -0,0 +1,6 @@ |
|||||||
|
/** |
||||||
|
* @program: kicc-ui |
||||||
|
* @description: 基础相关枚举 |
||||||
|
* @author: entfrm开发团队-王翔 |
||||||
|
* @create: 2022/4/8 |
||||||
|
*/ |
@ -0,0 +1,7 @@ |
|||||||
|
/** |
||||||
|
* @program: kicc-ui |
||||||
|
* @description: 基础相关异常 |
||||||
|
* 类型定义 |
||||||
|
* @author: entfrm开发团队-王翔 |
||||||
|
* @create: 2022/4/8 |
||||||
|
*/ |
@ -0,0 +1,6 @@ |
|||||||
|
/** |
||||||
|
* @program: kicc-ui |
||||||
|
* @description: 数据相关常量 |
||||||
|
* @author: entfrm开发团队-王翔 |
||||||
|
* @create: 2022/4/8 |
||||||
|
*/ |
@ -0,0 +1,34 @@ |
|||||||
|
/** |
||||||
|
* @program: kicc-ui |
||||||
|
* @description: 数据相关实体类 |
||||||
|
* 类型定义 |
||||||
|
* @author: entfrm开发团队-王翔 |
||||||
|
* @create: 2022/4/8 |
||||||
|
*/ |
||||||
|
|
||||||
|
/** 分页模型 */ |
||||||
|
export interface Page { |
||||||
|
size: number; |
||||||
|
current: number; |
||||||
|
total: number; |
||||||
|
[key: string]: any; |
||||||
|
} |
||||||
|
|
||||||
|
/** 通用模型 */ |
||||||
|
export interface CommonEntity { |
||||||
|
createById: string; |
||||||
|
createByName: string; |
||||||
|
createTime: string; |
||||||
|
updateById: string; |
||||||
|
updateByName: string; |
||||||
|
updateTime: string; |
||||||
|
remarks: string; |
||||||
|
} |
||||||
|
|
||||||
|
/** 树结构模型 */ |
||||||
|
export interface TreeEntity<T = any> { |
||||||
|
parentId: string; |
||||||
|
name: string; |
||||||
|
sort: number; |
||||||
|
children: T[] |
||||||
|
} |
@ -0,0 +1,6 @@ |
|||||||
|
/** |
||||||
|
* @program: kicc-ui |
||||||
|
* @description: 数据相关枚举 |
||||||
|
* @author: entfrm开发团队-王翔 |
||||||
|
* @create: 2022/4/8 |
||||||
|
*/ |
@ -1,11 +0,0 @@ |
|||||||
import { defHttp } from '/@/utils/http/axios'; |
|
||||||
import { getMenuListResultModel } from './model/menuModel'; |
|
||||||
|
|
||||||
enum Api { |
|
||||||
GetMenuList = '/system_proxy/system/menu/menuRoute', |
|
||||||
} |
|
||||||
|
|
||||||
/** 获取用户菜单 */ |
|
||||||
export const getMenuList = () => { |
|
||||||
return defHttp.get<getMenuListResultModel>({ url: Api.GetMenuList }); |
|
||||||
}; |
|
@ -1,12 +0,0 @@ |
|||||||
import type { RouteMeta } from 'vue-router'; |
|
||||||
export interface RouteItem { |
|
||||||
path: string; |
|
||||||
component: any; |
|
||||||
meta: RouteMeta; |
|
||||||
name?: string; |
|
||||||
redirect?: string; |
|
||||||
children?: RouteItem[]; |
|
||||||
} |
|
||||||
|
|
||||||
/** 获取菜单路由 */ |
|
||||||
export type getMenuListResultModel = RouteItem[]; |
|
@ -1,5 +0,0 @@ |
|||||||
export interface UploadApiResult { |
|
||||||
message: string; |
|
||||||
code: number; |
|
||||||
url: string; |
|
||||||
} |
|
@ -1,22 +0,0 @@ |
|||||||
import { UploadApiResult } from './model/uploadModel'; |
|
||||||
import { defHttp } from '/@/utils/http/axios'; |
|
||||||
import { UploadFileParams } from '/#/axios'; |
|
||||||
import { useGlobSetting } from '/@/hooks/setting'; |
|
||||||
|
|
||||||
const { uploadUrl = '' } = useGlobSetting(); |
|
||||||
|
|
||||||
/** |
|
||||||
* @description: Upload interface |
|
||||||
*/ |
|
||||||
export function uploadApi( |
|
||||||
params: UploadFileParams, |
|
||||||
onUploadProgress: (progressEvent: ProgressEvent) => void |
|
||||||
) { |
|
||||||
return defHttp.uploadFile<UploadApiResult>( |
|
||||||
{ |
|
||||||
url: uploadUrl, |
|
||||||
onUploadProgress, |
|
||||||
}, |
|
||||||
params |
|
||||||
); |
|
||||||
} |
|
@ -1,23 +0,0 @@ |
|||||||
// 引入基础包
|
|
||||||
import { Page, R, CommonEntity } from '/@/api/model'; |
|
||||||
|
|
||||||
// 查询参数
|
|
||||||
export type DeptDto = Page & Dept; |
|
||||||
|
|
||||||
// 部门对象
|
|
||||||
export interface Dept extends CommonEntity { |
|
||||||
deptId: string; |
|
||||||
code: string; |
|
||||||
name: string; |
|
||||||
parentId: string; |
|
||||||
sort: number; |
|
||||||
contacts: string; |
|
||||||
phone: string; |
|
||||||
address: string; |
|
||||||
email: string; |
|
||||||
status: string; |
|
||||||
[key: string]: any; |
|
||||||
} |
|
||||||
|
|
||||||
// 响应模型
|
|
||||||
export type DeptVo = R<Dept[]>; |
|
@ -1,24 +0,0 @@ |
|||||||
// 引入基础包
|
|
||||||
import { Page, R, CommonEntity } from '/@/api/model'; |
|
||||||
|
|
||||||
// 查询参数
|
|
||||||
export type MenuDto = Page & Menu; |
|
||||||
|
|
||||||
// 菜单对象
|
|
||||||
export interface Menu extends CommonEntity { |
|
||||||
id: string; |
|
||||||
name: string; |
|
||||||
parentId: string; |
|
||||||
type: string; |
|
||||||
path: string; |
|
||||||
component: string; |
|
||||||
permission: string; |
|
||||||
icon: string; |
|
||||||
keepAlive: string; |
|
||||||
hideMenu: string; |
|
||||||
sort: string; |
|
||||||
[key: string]: any; |
|
||||||
} |
|
||||||
|
|
||||||
// 响应模型
|
|
||||||
export type MenuVo = R<Menu[]>; |
|
@ -1,18 +0,0 @@ |
|||||||
// 引入基础包
|
|
||||||
import { CommonEntity, Page, R } from '/@/api/model'; |
|
||||||
|
|
||||||
// 查询参数
|
|
||||||
export type RoleDto = Page & Role; |
|
||||||
|
|
||||||
// 角色对象
|
|
||||||
export interface Role extends CommonEntity { |
|
||||||
id: string; |
|
||||||
name: string; |
|
||||||
code: string; |
|
||||||
sort: string; |
|
||||||
status: string; |
|
||||||
[key: string]: any; |
|
||||||
} |
|
||||||
|
|
||||||
// 响应模型
|
|
||||||
export type RoleVo = R<Role[]>; |
|
@ -1,28 +0,0 @@ |
|||||||
// 引入基础包
|
|
||||||
import { CommonEntity, Page, R } from '/@/api/model'; |
|
||||||
|
|
||||||
// 查询参数
|
|
||||||
export type UserDto = Page & User; |
|
||||||
|
|
||||||
// 用户对象
|
|
||||||
export interface User extends CommonEntity { |
|
||||||
id: string; |
|
||||||
userName: string; |
|
||||||
nickName: string; |
|
||||||
password: string; |
|
||||||
deptId: string; |
|
||||||
deptName: string; |
|
||||||
email: string; |
|
||||||
phone: string; |
|
||||||
sex: string; |
|
||||||
avatar: string; |
|
||||||
loginIp: string; |
|
||||||
loginTime: string; |
|
||||||
status: string; |
|
||||||
roleIds: string[]; |
|
||||||
permissions: string[]; |
|
||||||
[key: string]: any; |
|
||||||
} |
|
||||||
|
|
||||||
// 响应模型
|
|
||||||
export type UserVo = R<User[]>; |
|
@ -1,57 +0,0 @@ |
|||||||
|
|
||||||
/** 分页模型 */ |
|
||||||
export interface Page { |
|
||||||
size: number; |
|
||||||
current: number; |
|
||||||
total: number; |
|
||||||
[key: string]: any; |
|
||||||
} |
|
||||||
|
|
||||||
/** 响应信息主体 */ |
|
||||||
export interface R<T extends any> { |
|
||||||
code: number; |
|
||||||
msg: string; |
|
||||||
total: number; |
|
||||||
data: T; |
|
||||||
} |
|
||||||
|
|
||||||
/** 扩展安全框架用户信息 */ |
|
||||||
export interface KiccUser { |
|
||||||
tenantId: string; |
|
||||||
id: string; |
|
||||||
deptId: string; |
|
||||||
phone: string; |
|
||||||
[key: string]: any; |
|
||||||
} |
|
||||||
|
|
||||||
/** 基础模型 */ |
|
||||||
export interface BaseEntity { |
|
||||||
tenantId: string; |
|
||||||
currentUser: KiccUser; |
|
||||||
sqlFilter: string; |
|
||||||
} |
|
||||||
|
|
||||||
/** 通用模型 */ |
|
||||||
export interface CommonEntity { |
|
||||||
createById: string; |
|
||||||
createByName: string; |
|
||||||
createTime: string; |
|
||||||
updateById: string; |
|
||||||
updateByName: string; |
|
||||||
updateTime: string; |
|
||||||
remarks: string; |
|
||||||
} |
|
||||||
|
|
||||||
/** 树结构模型 */ |
|
||||||
export interface TreeEntity<T extends any> { |
|
||||||
parentId: string; |
|
||||||
name: string; |
|
||||||
sort: number; |
|
||||||
children: T[] |
|
||||||
} |
|
||||||
|
|
||||||
/** 结果集模型 */ |
|
||||||
export interface ResultVo<T extends any> { |
|
||||||
result: T; |
|
||||||
extend: T; |
|
||||||
} |
|
@ -0,0 +1,14 @@ |
|||||||
|
/** |
||||||
|
* 提供api模板规范代码参考,请尽量保证编写代码风格跟模板规范代码一致 |
||||||
|
* Copyright © 2020-2022 <a href="http://www.entfrm.com/">entfrm</a> All rights reserved. |
||||||
|
* author entfrm开发团队-王翔 |
||||||
|
*/ |
||||||
|
import { defHttp } from '/@/utils/http/axios'; |
||||||
|
import { MenuRouteResult } from '../entity/menu'; |
||||||
|
|
||||||
|
enum Api { |
||||||
|
list = '/system_proxy/system/menu/menuRoute', |
||||||
|
} |
||||||
|
|
||||||
|
/** 获取用户菜单 */ |
||||||
|
export const listMenuRoute = () => defHttp.get<MenuRouteResult>({ url: Api.list }); |
@ -0,0 +1,15 @@ |
|||||||
|
/** |
||||||
|
* 提供api模板规范代码参考,请尽量保证编写代码风格跟模板规范代码一致 |
||||||
|
* Copyright © 2020-2022 <a href="http://www.entfrm.com/">entfrm</a> All rights reserved. |
||||||
|
* author entfrm开发团队-王翔 |
||||||
|
*/ |
||||||
|
import { UploadResult } from '../entity/upload'; |
||||||
|
import { defHttp } from '/@/utils/http/axios'; |
||||||
|
import { UploadFileParams } from '/#/axios'; |
||||||
|
import { useGlobSetting } from '/@/hooks/setting'; |
||||||
|
|
||||||
|
const { uploadUrl = '' } = useGlobSetting(); |
||||||
|
|
||||||
|
/** 通用OSS上传 */ |
||||||
|
export const commonUpload = (params: UploadFileParams, onUploadProgress: (progressEvent: ProgressEvent) => void) => |
||||||
|
defHttp.uploadFile<UploadResult>({ url: uploadUrl, onUploadProgress }, params); |
@ -0,0 +1,12 @@ |
|||||||
|
/** |
||||||
|
* @program: kicc-ui |
||||||
|
* @description: 菜单路由实体类 |
||||||
|
* 类型定义 |
||||||
|
* @author: entfrm开发团队-王翔 |
||||||
|
* @create: 2022/4/8 |
||||||
|
*/ |
||||||
|
|
||||||
|
import {AppRouteRecordRaw} from "/@/router/types"; |
||||||
|
|
||||||
|
/** 菜单路由响应对象 */ |
||||||
|
export type MenuRouteResult = AppRouteRecordRaw[]; |
@ -0,0 +1,14 @@ |
|||||||
|
/** |
||||||
|
* @program: kicc-ui |
||||||
|
* @description: 文件上传实体类 |
||||||
|
* 类型定义 |
||||||
|
* @author: entfrm开发团队-王翔 |
||||||
|
* @create: 2022/4/8 |
||||||
|
*/ |
||||||
|
|
||||||
|
/** oss上传返回结果对象 */ |
||||||
|
export interface UploadResult { |
||||||
|
message: string; |
||||||
|
code: number; |
||||||
|
url: string; |
||||||
|
} |
@ -1,4 +1,4 @@ |
|||||||
import { ClientParams, ClientListGetResultModel, ClientListItem } from './model/clientModel'; |
import { ClientParams, ClientListGetResultModel, ClientListItem } from '../entity/clientModel'; |
||||||
import { defHttp } from '/@/utils/http/axios'; |
import { defHttp } from '/@/utils/http/axios'; |
||||||
|
|
||||||
enum Api { |
enum Api { |
@ -1,4 +1,4 @@ |
|||||||
import { ConfigParams, Config, ConfigResult } from './model/configModel' |
import { ConfigParams, Config, ConfigResult } from '../entity/configModel' |
||||||
import { defHttp } from '/@/utils/http/axios'; |
import { defHttp } from '/@/utils/http/axios'; |
||||||
import {isDef} from "/@/utils/is"; |
import {isDef} from "/@/utils/is"; |
||||||
|
|
@ -1,4 +1,4 @@ |
|||||||
import { DictParams, DictResult, Dict } from './model/dictModel'; |
import { DictParams, DictResult, Dict } from '../entity/dictModel'; |
||||||
import { defHttp } from '/@/utils/http/axios'; |
import { defHttp } from '/@/utils/http/axios'; |
||||||
import {isDef} from "/@/utils/is"; |
import {isDef} from "/@/utils/is"; |
||||||
|
|
@ -1,4 +1,4 @@ |
|||||||
import {DictDataParams, DictDataResult, DictData} from './model/dictDataModel'; |
import {DictDataParams, DictDataResult, DictData} from '../entity/dictDataModel'; |
||||||
import {defHttp} from '/@/utils/http/axios'; |
import {defHttp} from '/@/utils/http/axios'; |
||||||
import {isDef} from "/@/utils/is"; |
import {isDef} from "/@/utils/is"; |
||||||
|
|
@ -1,4 +1,4 @@ |
|||||||
import { LogParams, LogListGetResultModel } from './model/logModel'; |
import { LogParams, LogListGetResultModel } from '../entity/logModel'; |
||||||
import { defHttp } from '/@/utils/http/axios'; |
import { defHttp } from '/@/utils/http/axios'; |
||||||
|
|
||||||
enum Api { |
enum Api { |
@ -1,4 +1,10 @@ |
|||||||
// 引入基础包
|
/** |
||||||
|
* @program: kicc-ui |
||||||
|
* @description: 文件上传实体类 |
||||||
|
* 类型定义 |
||||||
|
* @author: entfrm开发团队-王翔 |
||||||
|
* @create: 2022/4/8 |
||||||
|
*/ |
||||||
import { Page, R } from '/@/api/model'; |
import { Page, R } from '/@/api/model'; |
||||||
|
|
||||||
// 定义查询参数
|
// 定义查询参数
|
@ -1,4 +1,10 @@ |
|||||||
// 引入基础包
|
/** |
||||||
|
* @program: kicc-ui |
||||||
|
* @description: 文件上传实体类 |
||||||
|
* 类型定义 |
||||||
|
* @author: entfrm开发团队-王翔 |
||||||
|
* @create: 2022/4/8 |
||||||
|
*/ |
||||||
import { Page, R, CommonEntity } from '/@/api/model'; |
import { Page, R, CommonEntity } from '/@/api/model'; |
||||||
|
|
||||||
export type ConfigParams = { |
export type ConfigParams = { |
@ -0,0 +1,30 @@ |
|||||||
|
/** |
||||||
|
* @program: kicc-ui |
||||||
|
* @description: 部门实体类 |
||||||
|
* 类型定义 |
||||||
|
* @author: entfrm开发团队-王翔 |
||||||
|
* @create: 2022/4/8 |
||||||
|
*/ |
||||||
|
import { R } from '/#/axios'; |
||||||
|
import { CommonEntity, Page } from '/@/api/common/data/entity'; |
||||||
|
|
||||||
|
/** 部门查询参数 */ |
||||||
|
export type DeptParams = Page & Dept; |
||||||
|
|
||||||
|
/** 部门对象 */ |
||||||
|
export interface Dept extends CommonEntity { |
||||||
|
deptId: string; |
||||||
|
code: string; |
||||||
|
name: string; |
||||||
|
parentId: string; |
||||||
|
sort: number; |
||||||
|
contacts: string; |
||||||
|
phone: string; |
||||||
|
address: string; |
||||||
|
email: string; |
||||||
|
status: string; |
||||||
|
[key: string]: any; |
||||||
|
} |
||||||
|
|
||||||
|
/** 部门响应对象 */ |
||||||
|
export type DeptResult = R<Dept[]>; |
@ -1,4 +1,10 @@ |
|||||||
// 引入基础包
|
/** |
||||||
|
* @program: kicc-ui |
||||||
|
* @description: 文件上传实体类 |
||||||
|
* 类型定义 |
||||||
|
* @author: entfrm开发团队-王翔 |
||||||
|
* @create: 2022/4/8 |
||||||
|
*/ |
||||||
import {CommonEntity, Page, R} from '/@/api/model'; |
import {CommonEntity, Page, R} from '/@/api/model'; |
||||||
|
|
||||||
// 定义查询参数
|
// 定义查询参数
|
@ -1,4 +1,10 @@ |
|||||||
// 引入基础包
|
/** |
||||||
|
* @program: kicc-ui |
||||||
|
* @description: 文件上传实体类 |
||||||
|
* 类型定义 |
||||||
|
* @author: entfrm开发团队-王翔 |
||||||
|
* @create: 2022/4/8 |
||||||
|
*/ |
||||||
import {CommonEntity, Page, R} from '/@/api/model'; |
import {CommonEntity, Page, R} from '/@/api/model'; |
||||||
|
|
||||||
// 定义查询参数
|
// 定义查询参数
|
@ -1,4 +1,10 @@ |
|||||||
// 引入基础包
|
/** |
||||||
|
* @program: kicc-ui |
||||||
|
* @description: 文件上传实体类 |
||||||
|
* 类型定义 |
||||||
|
* @author: entfrm开发团队-王翔 |
||||||
|
* @create: 2022/4/8 |
||||||
|
*/ |
||||||
import { Page, R } from '/@/api/model'; |
import { Page, R } from '/@/api/model'; |
||||||
|
|
||||||
// 定义查询参数
|
// 定义查询参数
|
@ -0,0 +1,31 @@ |
|||||||
|
/** |
||||||
|
* @program: kicc-ui |
||||||
|
* @description: 菜单实体类 |
||||||
|
* 类型定义 |
||||||
|
* @author: entfrm开发团队-王翔 |
||||||
|
* @create: 2022/4/8 |
||||||
|
*/ |
||||||
|
import { R } from '/#/axios'; |
||||||
|
import { CommonEntity, Page } from '/@/api/common/data/entity'; |
||||||
|
|
||||||
|
/** 菜单查询参数 */ |
||||||
|
export type MenuParams = Page & Menu; |
||||||
|
|
||||||
|
/** 菜单对象 */ |
||||||
|
export interface Menu extends CommonEntity { |
||||||
|
id: string; |
||||||
|
name: string; |
||||||
|
parentId: string; |
||||||
|
type: string; |
||||||
|
path: string; |
||||||
|
component: string; |
||||||
|
permission: string; |
||||||
|
icon: string; |
||||||
|
keepAlive: string; |
||||||
|
hideMenu: string; |
||||||
|
sort: string; |
||||||
|
[key: string]: any; |
||||||
|
} |
||||||
|
|
||||||
|
/** 菜单响应对象 */ |
||||||
|
export type MenuResult = R<Menu[]>; |
@ -0,0 +1,25 @@ |
|||||||
|
/** |
||||||
|
* @program: kicc-ui |
||||||
|
* @description: 角色实体类 |
||||||
|
* 类型定义 |
||||||
|
* @author: entfrm开发团队-王翔 |
||||||
|
* @create: 2022/4/8 |
||||||
|
*/ |
||||||
|
import { R } from '/#/axios'; |
||||||
|
import { CommonEntity, Page } from '/@/api/common/data/entity'; |
||||||
|
|
||||||
|
/** 角色查询参数 */ |
||||||
|
export type RoleParams = Page & Role; |
||||||
|
|
||||||
|
/** 角色对象 */ |
||||||
|
export interface Role extends CommonEntity { |
||||||
|
id: string; |
||||||
|
name: string; |
||||||
|
code: string; |
||||||
|
sort: string; |
||||||
|
status: string; |
||||||
|
[key: string]: any; |
||||||
|
} |
||||||
|
|
||||||
|
/** 角色响应对象 */ |
||||||
|
export type RoleResult = R<Role[]>; |
@ -0,0 +1,16 @@ |
|||||||
|
/** |
||||||
|
* @program: kicc-ui |
||||||
|
* @description: 用户实体类 |
||||||
|
* 类型定义 |
||||||
|
* @author: entfrm开发团队-王翔 |
||||||
|
* @create: 2022/4/8 |
||||||
|
*/ |
||||||
|
import { R } from '/#/axios'; |
||||||
|
import { Page } from '/@/api/common/data/entity'; |
||||||
|
import { User } from "/@/api/platform/core/entity/user"; |
||||||
|
|
||||||
|
/** 用户查询参数 */ |
||||||
|
export type UserParams = Page & User; |
||||||
|
|
||||||
|
/** 用户响应对象 */ |
||||||
|
export type UserResult = R<User[]>; |
Loading…
Reference in new issue