import axios from '@/common/services/axios-instance'

class IamMyprojectService {
  // 获取表单list
  getMyProjectInfo() {
    return axios({
      url: `api/xcoa-mobile/v1/iamauditproject/myProjectList`,
      data: {
        columns: 'id',
        maxResults: 4,
        startPosition: 0,
      },
      method: 'post',
    }).then((res) => {
      return res.data
    })
  }

  // 根据项目ID获取项目信息
  getProjectInfoById(projectId) {
    return axios({
      url: `api/xcoa-mobile/v1/iamauditproject/getProjectInfoById?id=` + projectId,
    }).then((res) => {
      return res.data
    })
  }

  // 根据项目id获取阶段信息
  getPorjectWorkNodeInfo(projectId) {
    return axios({
      url: `api/xcoa-mobile/v1/iamworknode/getPorjectWorkNodeInfo?projectId=` + projectId,
    }).then((res) => {
      return res.data
    })
  }
}

export default new IamMyprojectService()
