import { request } from '/@/utils/service';


const apiPrefix =  '/api/cms/sku_attr_dict/';

export function getTableData(query: any) {
	return request({
		url: apiPrefix,
		method: 'GET',
		params: query
	});
}

export function getAllDept(query: any) {
	return request({
		url: '/api/system/dept/all_dept/',
		method: 'GET',
		params: query
	});
}

export function deleteRow(query: any) {
	return request({
		url: apiPrefix + query + '/',
		method: 'DELETE',
		params: query
	});
}

export function updateRow(body: any) {
	return request({
		url: apiPrefix +`${body.id}/` ,
		method: 'PUT',
		data: body
	});
}

export function createEnum(data:any) {
	return request({
		url: apiPrefix,
		method: 'post',
		data: data
	})
}

