/*
 * @Author: code4eat awesomedema@gmail.com
 * @Date: 2022-12-15 15:14:12
 * @LastEditors: code4eat awesomedema@gmail.com
 * @LastEditTime: 2023-07-24 13:44:24
 * @FilePath: /BudgetManaSystem/src/pages/Home/service.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */

import { request } from '@@/plugin-request'





//获取首页信息

export type getIndexDataRespType = {
    id:number,
    computeDate:string,
    code:number,
    name:string,
    preCode:number,
    sort:number,
    status:number,
    audit:string
}

export const getIndexData = (computeDate:string)=>{
       
       return request<getIndexDataRespType[]>('/performance/index', {
            method: 'GET',
            params:{computeDate},
       })
}


//获取当前计算年月

export const getComputeDate = ()=>{
       
    return request<string>('/performance/index/getCurrentComputeDate', {
         method: 'GET',
    })
}


//获取动态报表的path

export const getReportPath = (params:any)=>{
       
   return request('/performance/parameter/getList', {
         method: 'GET',
         params:{...params}
    });
}




