12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- import http from '@/api'
- /**
- * @name 查询部门列表
- * @param query 参数
- * @returns 返回列表
- */
- export const listDeptApi = (query: any) => {
- return http.get<any>('/system/dept/list', query, { loading: true })
- }
- /**
- * @name 查询部门详细
- * @param deptId deptId
- * @returns returns
- */
- export const getDeptApi = (deptId: any) => {
- return http.get<any>(`/system/dept/${deptId}`)
- }
- /**
- * @name 新增部门
- * @param data data
- * @returns returns
- */
- export const addDeptApi = (data: any) => {
- return http.post<any>('/system/dept', data, { loading: false })
- }
- /**
- * @name 修改部门
- * @param data data
- * @returns returns
- */
- export const updateDeptApi = (data: any) => {
- return http.put<any>('/system/dept', data, { loading: false })
- }
- /**
- * @name 删除部门
- * @param deptId deptId
- * @returns returns
- */
- export const delDeptApi = (deptId: any) => {
- return http.delete<any>(`/system/dept/${deptId}`)
- }
- /**
- * @name 下载模板
- * @returns returns
- */
- export const importTemplateApi = () => {
- return http.downloadPost('/system/dept/importTemplate', {})
- }
- /**
- * @name 导入数据
- * @returns returns
- */
- export const importDataApi = (data: any) => {
- return http.post('/system/dept/importData', data)
- }
- /**
- * @name 导出数据
- * @returns returns
- */
- export const exportApi = (data: any) => {
- return http.downloadPost('/system/dept/export', data)
- }
|