import { baseServer, dict } from '@/api'
import request from '@/utils/require'

// 详情
export function detailsFn(sbbh) {
	return request({
		url: `${baseServer}/equipment/${sbbh}`,
		method: 'get'
	})
}

// 删除
export function deleteFn(sbbh) {
	return request({
		url: `${baseServer}/equipment/${sbbh}`,
		method: 'delete'
	})
}

// 获取分页列表
export function getPageList(pageData, params) {
	return request({
		url: `${baseServer}/equipmentPage/${pageData.page}/${pageData.size}`,
		method: 'post',
		data: params
	})
}

// 新增
export function addFn(params) {
	return request({
		url: `${baseServer}/equipment`,
		method: 'post',
		data: params
	})
}

// 编辑
export function editFn(params) {
	return request({
		url: `${baseServer}/equipment`,
		method: 'put',
		data: params
	})
}
//批量审核
export function plsh(params) {
	return request({
		url: `${baseServer}/equipmentBatch`,
		method: 'put',
		data: params
	})
}

//审批

export function reviewInfo(params) {
	return request({
		url: `${baseServer}/equipmentFilingStatus`,
		method: 'post',
		data: params
	})
}
//类别
export function getTypeOtions(data) {
	return request({
		url: `${dict}/dataDictionary/getDataGroup?groupId=${data.groupId}&pdictCode=${data.pdictCode}`,
		method: 'get'
	})
}
//名称
export function getMcOtions(data) {
	return request({
		url: `${dict}/dataDictionary/getDataGroup?groupId=${data.groupId}&pdictCode=${data.pdictCode}`,
		method: 'get'
	})
}
//设施类型
export function sbfindByGroupId(data) {
	return request({
		url: `${dict}/dataDictionary/getDataGroup?groupId=${data.groupId}&pdictCode=${data.pdictCode}`,
		method: 'get'
	})
}
