fix: useTable warning

This commit is contained in:
xingyu
2022-07-25 22:54:12 +08:00
parent 3d0cb5200b
commit 877254af10
11 changed files with 87 additions and 23 deletions

View File

@ -1,5 +1,5 @@
import { useAxios } from '@/hooks/web/useAxios'
import type { DeptVO } from './types'
import type { DeptVO, DeptListReqVO } from './types'
const request = useAxios()
@ -9,7 +9,7 @@ export const listSimpleDeptApi = () => {
}
// 查询部门列表
export const getDeptPageApi = (params) => {
export const getDeptPageApi = (params: DeptListReqVO) => {
return request.get({ url: '/system/dept/list', params })
}

View File

@ -5,3 +5,8 @@ export type DeptVO = {
parentId: number
createTime: string
}
export type DeptListReqVO = {
name: string
status: number
}

View File

@ -1,5 +1,5 @@
import { useAxios } from '@/hooks/web/useAxios'
import type { DictDataVO } from './types'
import type { DictDataVO, DictDataPageReqVO, DictDataExportReqVO } from './types'
const request = useAxios()
@ -9,7 +9,7 @@ export const listSimpleDictDataApi = () => {
}
// 查询字典数据列表
export const getDictDataPageApi = (params) => {
export const getDictDataPageApi = (params: DictDataPageReqVO) => {
return request.get({ url: '/system/dict-data/page', params })
}
@ -33,6 +33,6 @@ export const deleteDictDataApi = (id: number) => {
return request.delete({ url: '/system/dict-data/delete?id=' + id })
}
// 导出字典类型数据
export const exportDictDataApi = (params: DictDataVO) => {
export const exportDictDataApi = (params: DictDataExportReqVO) => {
return request.get({ url: '/system/dict-data/export', params })
}

View File

@ -1,5 +1,5 @@
import { useAxios } from '@/hooks/web/useAxios'
import type { DictTypeVO } from './types'
import type { DictTypeVO, DictTypePageReqVO, DictTypeExportReqVO } from './types'
const request = useAxios()
@ -9,7 +9,7 @@ export const listSimpleDictTypeApi = () => {
}
// 查询字典列表
export const getDictTypePageApi = (params) => {
export const getDictTypePageApi = (params: DictTypePageReqVO) => {
return request.get({ url: '/system/dict-type/page', params })
}
@ -33,6 +33,6 @@ export const deleteDictTypeApi = (id: number) => {
return request.delete({ url: '/system/dict-type/delete?id=' + id })
}
// 导出字典类型
export const exportDictTypeApi = (params: DictTypeVO) => {
export const exportDictTypeApi = (params: DictTypeExportReqVO) => {
return request.get({ url: '/system/dict-type/export', params })
}

View File

@ -7,6 +7,20 @@ export type DictTypeVO = {
createTime: string
}
export type DictTypePageReqVO = {
name: string
type: string
status: number
createTime: []
}
export type DictTypeExportReqVO = {
name: string
type: string
status: number
createTime: []
}
export type DictDataVO = {
id: number
sort: number
@ -19,3 +33,14 @@ export type DictDataVO = {
remark: string
createTime: string
}
export type DictDataPageReqVO = {
label: string
dictType: string
status: number
}
export type DictDataExportReqVO = {
label: string
dictType: string
status: number
}

View File

@ -1,10 +1,10 @@
import { useAxios } from '@/hooks/web/useAxios'
import type { PostVO } from './types'
import type { PostVO, PostPageReqVO, PostExportReqVO } from './types'
const request = useAxios()
// 查询岗位列表
export const getPostPageApi = async (params) => {
export const getPostPageApi = async (params: PostPageReqVO) => {
return await request.get({ url: '/system/post/page', params })
}
@ -33,6 +33,6 @@ export const deletePostApi = async (id: number) => {
}
// 导出岗位
export const exportPostApi = async (params) => {
export const exportPostApi = async (params: PostExportReqVO) => {
return await request.download({ url: '/system/post/export', params })
}

View File

@ -7,3 +7,15 @@ export type PostVO = {
remark: string
createTime: string
}
export type PostPageReqVO = {
code: string
name: string
status: number
}
export type PostExportReqVO = {
code: string
name: string
status: number
}