refactor: vxe crud

This commit is contained in:
xingyu4j
2022-11-13 13:16:11 +08:00
parent 7cbd6cfb68
commit 120417b792
16 changed files with 190 additions and 119 deletions

View File

@ -1,13 +1,32 @@
import request from '@/config/axios'
import type { MenuVO } from './types'
export interface 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
}
export interface MenuPageReqVO {
name?: string
status?: number
}
// 查询菜单(精简)列表
export const listSimpleMenusApi = () => {
return request.get({ url: '/system/menu/list-all-simple' })
}
// 查询菜单列表
export const getMenuListApi = (params) => {
export const getMenuListApi = (params: MenuPageReqVO) => {
return request.get({ url: '/system/menu/list', params })
}

View File

@ -1,15 +0,0 @@
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
}

View File

@ -1,8 +1,24 @@
import request from '@/config/axios'
import type { NoticeVO } from './types'
export interface NoticeVO {
id: number
title: string
type: number
content: string
status: number
remark: string
creator: string
createTime: string
updater: string
updateTime: string
}
export interface NoticePageReqVO extends BasePage {
title?: string
status?: number
}
// 查询公告列表
export const getNoticePageApi = (params) => {
export const getNoticePageApi = (params: NoticePageReqVO) => {
return request.get({ url: '/system/notice/page', params })
}

View File

@ -1,12 +0,0 @@
export type NoticeVO = {
id: number
title: string
type: number
content: string
status: number
remark: string
creator: string
createTime: string
updater: string
updateTime: string
}

View File

@ -1,5 +1,26 @@
import request from '@/config/axios'
import type { PostVO, PostPageReqVO, PostExportReqVO } from './types'
export interface PostVO {
id?: number
name: string
code: string
sort: number
status: number
remark: string
createTime?: string
}
export interface PostPageReqVO extends BasePage {
code?: string
name?: string
status?: number
}
export interface PostExportReqVO {
code?: string
name?: string
status?: number
}
// 查询岗位列表
export const getPostPageApi = async (params: PostPageReqVO) => {
@ -31,7 +52,6 @@ export const deletePostApi = async (id: number) => {
}
// 导出岗位
// TODO @星语:导出这块,咱怎么弄哈
export const exportPostApi = async (params: PostExportReqVO) => {
return await request.download({ url: '/system/post/export', params })
}

View File

@ -1,24 +0,0 @@
export type PostVO = {
id?: number
name: string
code: string
sort: number
status: number
remark: string
createTime?: string
}
// TODO @星语:要不要搞个 Page 基类呀?和后端对应
export type PostPageReqVO = {
code: string
name: string
status?: number
pageSize?: number
pageNo?: number
}
export type PostExportReqVO = {
code: string
name: string
status?: number
}