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

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

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

// 风险信号
export function getDecreeRiskSignal() {
    return request({
        method: 'GET',
        url: `/api/administrativeOrderOverview/riskSignal`,
    })
}

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

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

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

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

// 资源库
/**
 * @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`,
    })
}