import {http} from "@/utils/request.js"
export default {
	getUserInfo: () => http('/system/user/info/', 'GET'),
	getCode:(data) => http('/auth/sms_code/', 'POST', data),
	login:(data) => http('/auth/token/', 'POST', data),
	loginSecret:(data) => http('/auth/login_secret/', 'POST', data), //App密钥登录
	bindSecret:(data) => http('/system/user/bind_secret/', 'POST', data), //App密钥绑定
	bindWxmp:(data)=>http('/system/user/bind_wxmp/', 'POST', data), //微信小程序绑定
	unbindWxmp:(data)=>http('/system/user/unbind_wxmp/', 'POST', data), //微信小程序绑定
	changePw:(data) => http("/system/user/password/", 'PUT', data),
	codeLogin:(data) => http('/auth/login_sms_code/', 'POST', data),
	wxmpLogin: (data) => http('/auth/login_wxmp/', 'POST', data, true, false), //微信小程序登录
	wxmpClogin: (data) => http('/auth/login_wxmp/', 'POST', data, true, false), //微信小程序登录(自动创建账号)
	apkCheck: ()=>http('/system/apk/'), //apk检查
	uploadFile:(data ) => http('/file/', 'POST', data),//上传文件
	
	employeeList:(data) => http('/hrm/employee/', 'GET', data),
	employeeInfo:() => http('/hrm/employee/info/', 'GET'),
	
	getWorkflow: (data) => http('/wf/workflow/', 'GET', data),
	getTicket:(data) => http('/wf/ticket/', 'GET', data),
	getTicketItem:(id) => http(`/wf/ticket/${id}/`, 'GET'),
	getTicketFlowLogs:(id) => http(`/wf/ticket/${id}/flowlogs/`, 'GET'),
	ticketCreate:(data)=>http('/wf/ticket/', 'POST', data),
	ticketHandle:(id,data)=>http(`/wf/ticket/${id}/handle/`, 'POST', data),
	ticketRetreat:(id,data)=>http(`/wf/ticket/${id}/retreat/`, 'POST', data),
	getTransition:(id) => http(`/wf/ticket/${id}/transitions/`, 'GET'),
	workflowInitkey:(key) => http(`/wf/workflow/${key}/init_key/`, 'GET'),
	
	
	getMroom:(data) => http('/ofm/mroom/', 'GET', data),
	//会议室预定
	bookingList:(data) => http('/ofm/mroombooking/', 'GET', data),
	bookingItem:(id,data) => http(`/ofm/mroombooking/${id}/`, 'GET', data),
	bookingCreate:(data) => http(`/ofm/mroombooking/`, 'POST', data),
	bookingUpdate:(id,data) => http(`/ofm/mroombooking/${id}/`, 'PUT', data),
	bookingDelete:(id) => http(`/ofm/mroombooking/${id}/`, 'DELETE'),
	bookingSlot:(data) => http(`/ofm/mroomslot/`, 'GET' , data),
	//印章申请
	sealList:(data) => http(`/ofm/lendingseal/`, 'GET' , data),
	sealCreate:(data) => http(`/ofm/lendingseal/`, 'POST' , data),
	sealItem:(id,data) => http(`/ofm/lendingseal/${id}/`, 'GET', data),
	sealDelete:(id) => http(`/ofm/lendingseal/${id}/`, 'DELETE'),
	//档案借阅
	fileRecord:(data) => http(`/ofm/filerecord/`, 'GET' , data),
	borrowList:(data) => http(`/ofm/fileborrow/`, 'GET' , data),
	borrowCreate:(data) => http(`/ofm/fileborrow/`, 'POST' , data),
	borrowItem:(id,data) => http(`/ofm/fileborrow/${id}/`, 'GET', data),
	borrowDelete:(id) => http(`/ofm/fileborrow/${id}/`, 'DELETE'),
	//宣传报道
	publicList:(data) => http(`/ofm/publicity/`, 'GET' , data),
	publicCreate:(data) => http(`/ofm/publicity/`, 'POST' , data),
	publicItem:(id,data) => http(`/ofm/publicity/${id}/`, 'GET', data),
	publicDelete:(id) => http(`/ofm/publicity/${id}/`, 'DELETE'),
	//用车申请
	vehicleList:(data) => http(`/ofm/vehicle/`, 'GET' , data),
	vehicleCreate:(data) => http(`/ofm/vehicle/`, 'POST' , data),
	vehicleItem:(id,data) => http(`/ofm/vehicle/${id}/`, 'GET', data),
	vehicleDelete:(id) => http(`/ofm/vehicle/${id}/`, 'DELETE'),
	//专利审批
	patentList:(data) => http(`/srm/patentinfo/`, 'GET' , data),
	patentCreate:(data) => http(`/srm/patentinfo/`, 'POST' , data),
	patentItem:(id,data) => http(`/srm/patentinfo/${id}/`, 'GET', data),
	patentDelete:(id) => http(`/srm/patentinfo/${id}/`, 'DELETE'),
	//论文申密     
	paperseList:(data) => http(`/srm/paperse/`, 'GET' , data),
	paperseCreate:(data) => http(`/srm/paperse/`, 'POST' , data),
	paperseItem:(id,data) => http(`/srm/paperse/${id}/`, 'GET', data),
	paperseDelete:(id) => http(`/srm/paperse/${id}/`, 'DELETE'),
	//平台审批
	pfList:(data) => http(`/srm/pf/`, 'GET' , data),
	pfCreate:(data) => http(`/srm/pf/`, 'POST' , data),
	pfItem:(id,data) => http(`/srm/pf/${id}/`, 'GET', data),
	pfDelete:(id) => http(`/srm/pf/${id}/`, 'DELETE'),
	//离职申请
	resignationList:(data) => http(`/hrm/resignation/`, 'GET' , data),
	resignationCreate:(data) => http(`/hrm/resignation/`, 'POST' , data),
	resignationItem:(id,data) => http(`/hrm/resignation/${id}/`, 'GET', data),
	resignationDelete:(id) => http(`/hrm/resignation/${id}/`, 'DELETE'),
	//供应商申请
	resignationList:(data) => http(`/hrm/resignation/`, 'GET' , data),
	resignationCreate:(data) => http(`/hrm/resignation/`, 'POST' , data),
	resignationItem:(id,data) => http(`/hrm/resignation/${id}/`, 'GET', data),
	resignationDelete:(id) => http(`/hrm/resignation/${id}/`, 'DELETE'),
	//供应商审核
	supplierauditCreate:(data) => http(`/pum/supplieraudit/`, 'POST' , data),
	supplierauditItem:(id,data) => http(`/pum/supplieraudit/${id}/`, 'GET', data),
}