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

class AuditPorjectOverviewService {

    // 获取项目进度-仪表盘
    getProjectProgress(id) {
        return axios({
            url: `api/xcoa-mobile/v1/iamprojectoverview/getProjectProgress?projectId=` + id,
        })
    }

    // 获取工作底稿分布-堆叠柱状图
    getWorkingPaperSDistribution(id) {
        return axios({
            url: `api/xcoa-mobile/v1/iamprojectoverview/getWorkingPaperSDistribution?projectId=` + id,
        })
    }

    // 获取审计发现-饼图
    getAuditFindings(id) {
        return axios({
            url: `api/xcoa-mobile/v1/iamprojectoverview/getAuditFindings?projectId=` + id,
        })
    }

    // 获取工作底稿完成情况-柱状图
    getWorkingPapersCompletion(id) {
        return axios({
            url: `api/xcoa-mobile/v1/iamprojectoverview/getWorkingPapersCompletion?projectId=` + id,
        })
    }

    // 获取用户图片
    getUserAvatar( account ){
        return axios({
            url: `api/mobile/v1/user-manager/userAvatar/` + account,
            responseType: 'blob',
        })
    }

    // 获取数据字典配置
    getDictionary(id) {
        return axios({
          url: `api/xcoa-mobile/v1/iam-law/dictionary?key=${id}`,
          method: 'get',
        })
      }
}

export default new AuditPorjectOverviewService()
