import { baseRequest } from '@/utils/request'

const request = (url, ...arg) => baseRequest(`/base/department` + url, ...arg)

export default {
	getDepartmentTree(data) {
		return request('/tree', data, 'get')
	},
	getDepartmentPage(data) {
		return request('/page', data, 'get')
	},
	addDepartment(data) {
		return request('/add', data)
	},
	editDepartment(data) {
		return request('/edit', data)
	},
	delDepartment(data) {
		return request('/delete', data, 'post')
	},
	getDepartmentDetail(data) {
		return request('/detail', data, 'get')
	},
	getDepartmentUser(data) {
		return request('/userSelector', data, 'get')
	},
	getParentDepartment(data) {
		return request('/getTree', data, 'get')
	}
}
