import request from "@/api/request.js";

// 最新科技政令
export function getDepartmentList(params) {
    return request({
        method: 'GET',
        url: `/api/administrativeDict/department`,
        params
    })
}

// 最新科技政令
export function getLatestDecree() {
    return request({
        method: 'GET',
        url: `/api/administrativeOrderOverview/info`,
    })
}

// 风险信号
export function getDecreeRiskSignal(params) {
    return request({
        method: 'GET',
        url: `/api/commonFeature/riskSignal/${params.moduleId}`,
    })
}

// 行政令发布频度
export function getDecreeYearOrder(params) {
    return request({
        method: 'POST',
        url: `/api/administrativeOrderOverview/yearOrder`,
        data: params
    })
}

// 政令涉及领域
export function getDecreeArea(params) {
    return request({
        method: 'POST',
        url: `/api/administrativeOrderOverview/industry`,
        data: params
    })
}

// 关键行政令
export function getKeyDecree(params) {
    return request({
        method: 'POST',
        url: `/api/administrativeOrderOverview/action`,
        data: params
    })
}

// 政令重点条款
export function getDecreeKeyInstruction(params) {
    return request({
        method: 'POST',
        url: `/api/administrativeOrderOverview/instruction`,
        data: params
    })
}

// 资源库
/**
 * @param {currentPage, pageSize, proposeName, researchTypeIds, sortFun, years} 
 */
export function getDecreeOrderList(params) {
    return request({
        method: 'GET',
        url: `/api/administrativeOrderOverview/orderList`,
        params
    })
}

// 左侧行业领域列表
export function getDecreehylyList(params) {
    return request({
        method: 'GET',
        url: `/api/billImpactAnalysis/industry/hylyList`,
        params
    })
}

// 发布机构
export function getDecreeTypeList() {
    return request({
        method: 'GET',
        url: `/api/administrativeDict/type`,
    })
}

// 关键机构
export function getKeyOrganization(params) {
    return request({
        method: 'GET',
        url: `/api/commonFeature/keyOrganization`,
        params
    })
}

// 所有机构
export function getAllOrganization(params) {
    return request({
        method: 'POST',
        url: `/api/administrativeOrderOverview/orderCount`,
        data: params
    })
}

// AI智能总结
export function getChartInterpretation(params) {
    return request({
        method: 'POST',
        url: `/aiAnalysis/chart_interpretation`,
        headers: {"X-API-Key": "aircasKEY19491001"},
        data: params
    })
}