import request from "@/utils/request"

// 地图数据


export async function getMapData(params) {
    return await request({
        url: '/site/index/mapcount',
        method: 'get',
        params, noloading: true
    })
}


// 本年问题分析
export async function getYearQuestion(params) {
    return await request({
        url: '/site/index/yearQuestion',
        method: 'get',
        params
    })
}


// 本年问题等级分析
export async function getLevelQuestion(params) {
    return await request({
        url: '/site/index/levelQuestion',
        method: 'get',
        params
    })
}

// 本年问题处理分析
export async function getStatusQuestion(params) {
    return await request({
        url: '/site/index/statusQuestion',
        method: 'get',
        params
    })
}


// 工程问题情况
export async function getProjectQuestion(params) {
    return await request({
        url: '/site/index/projectQuestion',
        method: 'get',
        params
    })
}


// // 区域问题列表  弃用
// export async function getAreaQuestionByAreaId(areaId) {
//     return await request({
//         url: `/site/index/type`,
//         method: 'get',
//         params: {
//             city_id: areaId
//         }
//     })
// }



// 区域问题列表
export async function getScoreByCity(areaId) {
    return await request({
        url: `/site/index/get_project`,
        method: 'get',
        params: {
            city_id: areaId
        }
    })
}

// 右侧得分
export async function getScoreStatusByCity(areaId) {
    return await request({
        url: `/site/index/getscore`,
        method: 'get',
        params: {
            city_id: areaId
        }
    })
}


// 获取工程列表接口
export async function getProjectList(params, noloading) {
    return await request({
        url: `/site/index/getproject`,
        method: 'get',
        params,
        noloading: noloading,
    })
}

// 获取严重问题列表
export async function getImportantQuestion(params) {
    return await request({
        url: `/site/index/getLevel`,
        method: 'get',
        params
    })
}


// 获取严重问题列表
export async function getWarningStatusNum() {
    return await request({
        url: `/site/index/warning_config`,
        method: 'get',
    })
}


// 获取政府监管选项下拉
export async function getZFJGConfig() {
    return await request({
        url: `/site/question/table`,
        method: 'get',
    })
}

// 获取政府监管问题列表
export async function getZFJGQuestionList(params) {
    return await request({
        url: `/site/question`,
        method: 'get',
        params,
        noloading: true
    })
}

// 获取政府监管问题详情

export async function getZFJGQuestionDetail(id) {
    return await request({
        url: `/site/question/pages/detail/${id}`,
        method: 'get',
    })
}



// 获取创新创优详情
export async function getExcellenceDetail(id) {
    return await request({
        url: `/site/excellence?project_id=${id}`,
        method: 'get',
    })
}

//获取质量评定列表接口
export async function getZLPDList(id) {
    return await request({
        url: `/site/part/info/${id}?part_type=2`,
        method: 'get',
    })
}

//获取质量检测列表接口
export async function getZLJCList(id) {
    return await request({
        url: `/site/quality/check/getcheck?project_id=${id}`,
        method: 'get',
    })
}



// 获取区域详情接口
export async function getAreaDetail(projectId) {
    return await request({
        url: `/site/index/whole/${projectId}`,
        method: 'get',
    })
}

// 获取政府监管预警接口
export async function getGovernmentRegulation(params) {
    return await request({
        url: '/site/question?question_level=3',
        method: 'get',
        params
    })
}

// 获取质量检测应接口
export async function getQualityInspection(params) {
    return await request({
        url: '/site/index/getcheck',
        method: 'get',
        params
    })
}


// 获取外观质量接口
export async function getQualityAppearance(params) {
    return await request({
        url: '/site/index/appearance',
        method: 'get',
        params
    })
}


// 获取质量事故/缺陷预警
export async function getQualityIncident(params) {
    return await request({
        url: '/site/index/incident',
        method: 'get',
        params
    })
}

// 获取质量事故/缺陷预警详情
export async function getSGQXData(id) {
    return await request({
        url: `/site/quality/incident/${id}`,
        method: 'get',
    })
}


