|
@@ -1,44 +1,32 @@
|
|
|
import request from 'utils/request'
|
|
|
-import { baseApi } from 'utils/config'
|
|
|
-import {fetch,post,put} from 'utils/http';
|
|
|
+import {
|
|
|
+ baseApi
|
|
|
+} from 'utils/config'
|
|
|
+import {
|
|
|
+ fetch,
|
|
|
+ post,
|
|
|
+ put
|
|
|
+} from 'utils/http';
|
|
|
|
|
|
//获取部门信息
|
|
|
-export function getTeamList (type) {
|
|
|
- return fetch('manageBase/dept/tree',{deptId: 12345,type: type})
|
|
|
- // return request({
|
|
|
- // url: baseApi + 'manageBase/dept/tree',
|
|
|
- // method: 'get',
|
|
|
- // params: {
|
|
|
- // deptId
|
|
|
- // }
|
|
|
- // })
|
|
|
+export function getTeamList(deptId, type) {
|
|
|
+ return fetch('manageBase/dept/tree', {
|
|
|
+ deptId: deptId,
|
|
|
+ type: type
|
|
|
+ })
|
|
|
}
|
|
|
//获取子部门信息
|
|
|
-export function getTeamChildList (deptId,type) {
|
|
|
- return fetch('manageBase/dept/child',{deptId: deptId,type:type})
|
|
|
- // return request({
|
|
|
- // url: baseApi + 'manageBase/dept/child',
|
|
|
- // method: 'get',
|
|
|
- // params: {
|
|
|
- // deptId
|
|
|
- // }
|
|
|
- // })
|
|
|
+export function getTeamChildList(deptId, type) {
|
|
|
+ return fetch('manageBase/dept/child', {
|
|
|
+ deptId: deptId,
|
|
|
+ type: type
|
|
|
+ })
|
|
|
}
|
|
|
//新增部门
|
|
|
-export function addTeam (data) {
|
|
|
- return post('manageBase/dept',data)
|
|
|
- // return request({
|
|
|
- // url: baseApi + 'manageBase/dept',
|
|
|
- // method: 'post',
|
|
|
- // data,
|
|
|
- // })
|
|
|
+export function addTeam(data) {
|
|
|
+ return post('manageBase/dept', data)
|
|
|
}
|
|
|
//修改部门
|
|
|
-export function setTeam (data) {
|
|
|
- return put('manageBase/dept',data)
|
|
|
- // return request({
|
|
|
- // url: baseApi + 'manageBase/dept',
|
|
|
- // method: 'put',
|
|
|
- // data,
|
|
|
- // })
|
|
|
-}
|
|
|
+export function setTeam(data) {
|
|
|
+ return put('manageBase/dept', data)
|
|
|
+}
|