import {request} from '../../util/request.js'

const getApplyManList = async () => { //获取用户详细
	let res = await request({
		url: '/applicantslist/getApplicants'
	})
	return res
}

const addNewApplyMan = async (param) => { //修改密码
	let res = await request({
		url: '/applicantslist/addApplicants',
		data:param,
		method:'POST'
	})
	return res
}

const delAppyMan = async (id) =>{
	let res = await request({
		url: '/applicantslist/delApplicant',
		data:{
			Code:id
		},
		method:'DELETE'
	})
	return res
}

const getLaboratorysList = async () => { 
	let res = await request({
		url: '/Lablist/getLab'
	})
	return res
}

const addLaboratorys = async (param) => { 
	let res = await request({
		url: '/Lablist/addLab',
		data:param,
		method:'POST'
	})
	return res
}

const delLaboratorys = async (id) =>{
	let res = await request({
		url: '/Lablist/delLab',
		data:{
			Code:id
		},
		method:'DELETE'
	})
	return res
}

const getIsolationpointsList = async () => { 
	let res = await request({
		url: '/isolationpoints/getIsolatedPoints'
	})
	return res
}

const addIsolationpoints = async (param) => { 
	let res = await request({
		url: '/isolationpoints/addIsolatedPoint',
		data:param,
		method:'POST'
	})
	return res
}

const delIsolationpoints = async (id) =>{
	let res = await request({
		url: '/isolationpoints/delIsolatedPoint',
		data:{
			Code:id
		},
		method:'DELETE'
	})
	return res
}

const getAdmissionsList = async () => { 
	let res = await request({
		url: '/entrance/getAdmission'
	})
	return res
}

const addAdmissions = async (param) => { 
	let res = await request({
		url: '/entrance/addAdmission',
		data:param,
		method:'POST'
	})
	return res
}

const delAdmissions = async (id) =>{
	let res = await request({
		url: '/entrance/delAdmission',
		data:{
			Code:id
		},
		method:'DELETE'
	})
	return res
}

export {		
	getApplyManList,
	addNewApplyMan,
	delAppyMan,
	getLaboratorysList,
	addLaboratorys,
	getIsolationpointsList,
	addIsolationpoints,
	getAdmissionsList,
	addAdmissions,
	delIsolationpoints,
	delLaboratorys,
	delAdmissions
}