/*
 * @Author: code4eat awesomedema@gmail.com
 * @Date: 2023-03-03 16:31:27
 * @LastEditors: code4eat awesomedema@gmail.com
 * @LastEditTime: 2024-04-26 15:42:53
 * @FilePath: /KC-MiddlePlatform/src/pages/platform/setting/pubDicTypeMana/service.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */



import { Key } from 'react';
import { request } from 'umi';

//获取table列表数据

export const getReportListTableData = (params?: any) => {
  return request('/performance/retain/unitTypeList', {
    method: 'GET',
    params: { ...params }
  });
};


//获取职类

export const getJobCateReq = () => {
  return request('/performance/dict/getDictDataList', {
    method: 'GET',
    params:{
      current:1,pageSize:100,typeCode:1
    }
  });
};

//编辑表格数据

export const editData = (data: any) => {
  return request('/performance/retain/unitTypeRetainSave', {
    method: 'POST',
    data
  });
};

//删除表格操作
export const delData = (ids:Key[]) => {
  return request('/performance/retain/unitTypeRetainDelete', {
    method: 'POST',
    data:ids
  });
};




//获取可添加保留项目

export const getModalTableList = (unitType: string) => {
  return request('/performance/retain/unitTypeRetainDict', {
    method: 'GET',
    params: { unitType }
  });
};











