import request from '/@/utils/request';
import { InvestmentProjectProgress } from '/@/views/invMid/progressReport/interface/type';
///admin/investmentProjectsProgress/add
export interface responseData<T = any> {
  code: number;
  msg: string;
  data: T;
  ok?: boolean;
}
export interface getInvestmentProjectsProgressPageT {
	size: number;
	pages: number;
	current: number;
	total: number;
	records: InvestmentProjectProgress[];
}
// 请求列表参数
export interface InvestmentProjectsProgressQuery {
	size: number;
	page: number;
	projectName: string;
	projectStatus: string;
	implementingBody: string;
}
// 添加项目进度
export const addInvestmentProjectsProgressAPI = (data: InvestmentProjectProgress) => {
	return request<responseData>({
		url: '/admin/investmentProjectsProgress/add',
		method: 'post',
		data,
	});
};
// 获取项目进度列表
export const getInvestmentProjectsProgressPageAPI = (data: InvestmentProjectsProgressQuery) => {
	return request<getInvestmentProjectsProgressPageT>({
		url: '/admin/investmentProjectsProgress/page',
		method: 'post',
		data
	})
}
//查看投资项目进度
export const getInvestmentProjectsProgressViewAPI = (id: number|string) => {
	return request<InvestmentProjectProgress>({
		url: '/admin/investmentProjectsProgress/view',
		method: 'get',
		params: { id }
	})
}
// 报送国资
export const investmentProjectsProgressSubmitAPI = (id: string) => {
    return request({
        url: '/admin/investmentProjectsProgress/submit',
        method: 'get',
        params: { id }
    })
}
// /admin/investmentProjectsProgress/userDeptBelong
export const getInvestmentProjectsProgressUserDeptBelongAPI = () => {
    return request({
        url: '/admin/investmentProjectsProgress/userDeptBelong',
        method: 'get',
    });
}
// /admin/investmentProjectsProgress/getByProcessInstanceId
export const getInvestmentProjectsProgressGetByProcessInstanceIdAPI = (processInstanceId: string) => {
    return request<InvestmentProjectProgress>({
        url: '/admin/investmentProjectsProgress/getByProcessInstanceId',
        method: 'get',
        params: { processInstanceId }
    })
}
