import http from '../http';

//获取协同集合
export async function getTeamworkPageList(param) {
	param = param || { FPageIndex: 1, FPageSize: 10 };
	let result = {};
	await http.post('/api/Teamwork/GetTeamworkPageList', param).then((data) => {
		result = data;
	});
	return result;
}

//获取流程集合
export async function getTeamProcessList(teamId) {
	let param = { FPageIndex: 1, FPageSize: 999, FTeamID: teamId };
	let result = [];
	await http.post('/api/Teamwork/GetTeamProcessList', param).then((data) => {
		result = data.Data.List || [];
	});
	return result;
}

//获取协同视图信息
export async function getTeamworkView(param) {
	let result = {};
	await http.post('/api/Teamwork/GetTeamworkView', param).then((data) => {
		result = data.Data;
	});
	return result;
}

//下载BOM
export async function downloadBOM(teamId) {
	let param = { FTeamID: teamId };
	let result = [];
	await http.post('/api/Teamwork/DockDownBomData', param).then((data) => {
		result = data;
	});
	return result;
}

export async function EditTypeList(param) {
	let result = [];
	await http.post('/api/Teamwork/EditTypeList', param).then((data) => {
		result = data;
	});
	return result;
}