// 智库概览信息
import request from "@/api/request.js";


// 获取新闻资讯
/**
 * @param {moduleId} 
 */
export function getNews(moduleId = "0105") {
  return request({
    method: 'GET',
    url: `/api/commonFeature/news/${moduleId}`,
  })
}


/**
 * 社交媒体
 */
export function getSocialMediaInfo(moduleId = "0105") {
  return request({
    method: "GET",
    url: `/api/commonFeature/remarks/${moduleId}`
  })
}

// 获取法案风险信号
/**
 * @param {moduleId} 
 */
export function getBillRiskSignal(moduleId = "0105") {
  return request({
    method: 'GET',
    url: `/api/commonFeature/riskSignal/${moduleId}`,
  })
}


//创新主体主页:统计不同创新主体类型对应的主体数量
export function getCountSubjectType() {
  return request({
    method: 'GET',
    url: `/api/innovateSubject/countSubjectType`,
  })
}
// 创新主体主页:统计不同地理对应的主体数量
export function getCountGeography() {
  return request({
    method: 'GET',
    url: `/api/innovateSubject/countGeography`,
  })
}

//创新主体主页:类型列表
export function getSubjectTypeList() {
  return request({
    method: 'GET',
    url: `/api/innovateSubject/subjectTypeList`,
  })
}

//创新主体主页:通过类型分页查询创新主体列表
export function findListBySubjectTypeId(params) {
  return request({
    method: 'GET',
    url: `/api/innovateSubject/findListBySubjectTypeId`,
    params
  })
}

//创新主体主页:综合排名
export function getOverallRanking(params) {
  return request({
    method: 'GET',
    url: `/api/innovateSubject/overallRanking`,
    params
  })
}

//创新主体主页:领域布局
export function getResearchField(params) {
  return request({
    method: 'GET',
    url: `/api/innovateSubject/researchField`,
    params
  })
}

//创新主体主页:主体类型分类领域布局
export function getResearchFieldSubjectType(params) {
  return request({
    method: 'GET',
    url: `/api/innovateSubject/researchFieldSubjectType`,
    params
  })
}

// 获取行业领域列表
export function getAreaType() {
  return request({
    method: 'GET',
    url: `/api/commonDict/areaType`,
  })
}
/***********详情页 */
//创新主体详情:基本信息
export function getInfo(params) {
  return request({
    method: 'GET',
    url: `/api/innovateSubject/info/${params.id}`,
    params
  })
}

//最新动态
export function getDynamics(params) {
  return request({
    method: 'GET',
    url: `/api/innovateSubject/dynamics/${params.orgId}`,
    params
  })
}

//创新主体详情:历史事件轴
export function getEventList(params) {
  return request({
    method: 'GET',
    url: `/api/innovateSubject/eventList/${params.id}`,
    params
  })
}

//创新主体详情:重点人物
export function getPersonList(params) {
  return request({
    method: 'GET',
    url: `/api/innovateSubject/personList/${params.id}`,
    params
  })
}
 
 

//合作情况:与中国合作数量变化
export function getCooperateNumWithChina(params) {
  return request({
    method: 'GET',
    url: `/api/innovateSubject/cooperateNumWithChina/${params.id}`,
    params
  })
}

// 合作情况:与中国合作类型变化
export function getCooperateTypeWithChina(params) {
  return request({
    method: 'GET',
    url: `/api/innovateSubject/cooperateTypeWithChina/${params.year}/${params.id}`,
    params
  })
}

// 合作情况:与中国合作领域变化
export function getCooperateAreaWithChina(params) {
  return request({
    method: 'GET',
    url: `/api/innovateSubject/cooperateAreaWithChina/${params.id}`,
    params
  })
}

//合作情况:与中国合作经费变化
export function getCooperateFundWithChina(params) {
  return request({
    method: 'GET',
    url: `/api/innovateSubject/cooperateFundWithChina/${params.id}`,
    params
  })
}

//合作情况:与中国合作事例
export function getCooperateExampleWithChina(params) {
  return request({
    method: 'GET',
    url: `/api/innovateSubject/cooperateExampleWithChina/${params.id}`,
    params
  })
}

 
 
 

// 专利数量统计
export function getPatentList(orgId) {
  return request({
    method: "GET",
    url: `/api/innovateSubject/patentList/${orgId}`
  })
}

// 论文数量统计
export function getPaperList(orgId) {
  return request({
    method: "GET",
    url: `/api/innovateSubject/paperList/${orgId}`
  })
}

// 领域实力分布
export function getStudyFieldList(orgId) {
  return request({
    method: "GET",
    url: `/api/innovateSubject/studyFieldList/${orgId}`
  })
}

// 经费增长情况
export function getFundGrowth(orgId) {
  return request({
    method: "GET",
    url: `/api/innovateSubject/fundGrowth/${orgId}`
  })
}

// 经费来源
export function getFundFromList(orgId) {
  return request({
    method: "GET",
    url: `/api/innovateSubject/fundFromList/${orgId}`
  })
}

// 经费分配
export function getFundToList(orgId) {
  return request({
    method: "GET",
    url: `/api/innovateSubject/fundToList/${orgId}`
  })
}
// 获取实验室列表
export function getLabList(orgId) {
  return request({
    method: 'GET',
    url: `/api/innovateSubject/labList/${orgId}`
  })
}

// 获取政策文件列表
export function getPolicyList(orgId, currentPage = 1, pageSize = 6) {
  return request({
    method: 'GET',
    url: `/api/innovateSubject/policyList/${orgId}`,
    params: { currentPage, pageSize }
  })
}
