import request from "@/utils/httpRequest";
import { TEST_PATH as prefix } from "../../AppPath";

export default {
	list(data) {
		return request({
			url: prefix + "/test/addressBook/list",
			method: "post",
			data: data,
		});
	},
	deptList(id) {
		return request({
			url: prefix + "/test/addressBook/deptList",
			method: "get",
			params: {
				deptId: id,
			},
		});
	},

	getWorkListCord(params) {
		return request({
			url: prefix + "/test/attendance/getWorkListCord",
			method: "get",
			params: params,
		});
	},
	getByUserId(params) {
		return request({
			url: prefix + "/test/attendance/getByUserId",
			method: "get",
			params: params,
		});
	},
	// 删除部门
	delDept(data) {
		return request({
			url: prefix + "/test/addressBook/delDept",
			method: "post",
			data: data,
		});
	},

	// 新增部门
	addDept(data) {
		return request({
			url: prefix + "/test/addressBook/addDept",
			method: "post",
			data: data,
		});
	},

	// 修改部门
	updateDept(data) {
		return request({
			url: prefix + "/test/addressBook/updateDept",
			method: "post",
			data: data,
		});
	},

	queryById(params) {
		return request({
			url: prefix + "/test/addressBook/queryById",
			method: "get",
			params: params,
		});
	},

	//获取假期列表
	getattcolumns(params) {
		return request({
			url: prefix + "/test/attendance/getattcolumns",
			method: "get",
			params: params,
		});
	},
	//获取用户假期详情
	getleavetimebynames(params) {
		return request({
			url: prefix + "/test/attendance/getleavetimebynames",
			method: "get",
			params: params,
		});
	},
	// 新建用户
	addUser(data) {
		return request({
			url: prefix + "/test/addressBook/addUser",
			method: "post",
			data: data,
		});
	},
	selectUserById(params) {
		return request({
			url: prefix + "/test/addressBook/selectUserById",
			method: "get",
			params: params,
		});
	},
	updateUser(data) {
		return request({
			url: prefix + "/test/addressBook/updateUser",
			method: "post",
			data: data,
		});
	},
};
