/** @format */

import request from "@/utils/request";

//我的申请列表
export const getMiAuditApplyList = (params) => {
	return request({
		url: "/api/minaudit/order/getMiAuditApplyList",
		method: "get",
		params,
	});
};
// 备案查看
export const getMiAuditApplyOneList = (id) => {
	return request({
		url: "/api/minaudit/order/getMiAuditApplyOneList/" + id,
		method: "get",
	});
};
// 备案查看列表
export const getMiAuditApplyRoobtList = (params) => {
	return request({
		url: "/api/minaudit/order/getMiAuditApplyRoobtList",
		method: "get",
		params
	});
};
// 器具列表
export const pageAudit = (params) => {
	return request({
		url: "/api/minaudit/order/page-audit",
		method: "get",
		params
	});
};
// 提交备案
export const addMiAuditOrder = (data) => {
	return request({
		url: "/api/minaudit/order/addMiAuditOrder",
		method: "post",
		params: data,
	});
	// let f = new FormData();
	// Object.keys(data).forEach((key) => {
	// 	f.append(key, data[key]);
	// });
	// return request({
	// 	url: "/api/minaudit/order/addMiAuditOrder",
	// 	method: "post",
	// 	data: f,
	// });
};

//备案撤回
export const backAudit = (query) => {
	return request({
		url: "/api/minaudit/order/back-audit",
		method: "post",
		params: query
	});
};