import { useMessage } from "/@/hooks/web/useMessage";
import { defHttp } from '/@/utils/http/axios';

const { createConfirm } = useMessage();

enum Api {
  //rateStdTreeList = '/rm/rmStdMain/rateStdTreeList',
  //rateStdOptionList = '/rm/rmStdMain/rateStdOptionList',
  //addRate = '/rm/rmStdMain/addRate',
  //addRateOk = '/rm/rmStdMain/addRateOk',
  pjrateStdTreeList = '/rm/rmStdMain/pjRateStdTreeList',
  pjrateStdOptionList = '/rm/rmStdMain/pjRateStdOptionList',
  pjaddRate = '/rm/rmStdMain/pjAddRate',
  pjaddRateOk = '/rm/rmStdMain/pjAddRateOk',
  pjrateStdTreeViewList = '/rm/rmStdMain/pjRateStdTreeViewList',
  rateKeyItemTreeList = '/rate/rateTask/rateKeyItemTreeList',
  rateStdOptionList = '/rate/rateTask/rateStdOptionList',
  addRate = '/rate/rateTask/addRate',
  addRateOk = '/rate/rateTask/addRateOk',
  rateKeyItemFileList = '/rate/rateTask/rateKeyItemFileList',
  approverateKeyItemTreeList = '/rate/rateTask/approverateKeyItemTreeList',
  addAppRate = '/rate/rateTask/addAppRate',
  addAppRateOk = '/rate/rateTask/addAppRateOk',
  raterateKeyItemTreeList= '/rate/rateTask/raterateKeyItemTreeList',
  addRateRate = '/rate/rateTask/addRateRate',
  addRateRateOk = '/rate/rateTask/addRateRateOk',
  pfrateStdOptionList = '/rate/rateTask/pfrateStdOptionList',
  raterateKeyItemTreeViewList= '/rate/rateTask/raterateKeyItemTreeViewList',
}
/**
 * 列表接口
 * @param params
 */
export const getRateStdTreeList = (params) =>
  defHttp.get({url: Api.rateStdTreeList, params});
/**
 * 
 * @param params 获得具体的选项
 * @returns 
 */
export const getRateStdOptionList = (params) =>
  defHttp.get({url: Api.rateStdOptionList, params});

/**
 * 保存评分
 */
export const saveAddRate = (params) =>
  defHttp.post({url: Api.addRate, params});

/**
 * 完成评分
 */
export const successRate = (params) =>
  defHttp.post({url: Api.addRateOk, params});


/**
 * 列表接口
 * @param params
 */
export const getpjRateStdTreeList = (params) =>
  defHttp.get({url: Api.pjrateStdTreeList, params});
/**
 * 
 * @param params 获得具体的选项
 * @returns 
 */
export const getpjRateStdOptionList = (params) =>
  defHttp.get({url: Api.pjrateStdOptionList, params});

/**
 * 保存评分
 */
export const pjsaveAddRate = (params) =>
  defHttp.post({url: Api.pjaddRate, params});

/**
 * 完成评分
 */
export const pjsuccessRate = (params) =>
  defHttp.post({url: Api.pjaddRateOk, params});

  /**
 * 列表接口
 * @param params
 */
export const getpjRateStdTreeViewList = (params) =>
defHttp.get({url: Api.pjrateStdTreeViewList, params});
//new start
/**
 * 列表接口
 * @param params
 */
 export const getRateKeyItemTreeList = (params) =>
 defHttp.get({url: Api.rateKeyItemTreeList, params});

 /**
 * 
 * @param params 获得要素的要求的文档
 * @returns 
 */
export const getRateKeyItemFileList = (params) =>
defHttp.get({url: Api.rateKeyItemFileList, params});


/**
 * 列表接口
 * @param params
 */
 export const getApproverateKeyItemTreeList = (params) =>
 defHttp.get({url: Api.approverateKeyItemTreeList, params});

/**
 * 保存审核
 */
 export const saveaddAppRate = (params) =>
 defHttp.post({url: Api.addAppRate, params});

 /**
 * 完成审核
 */
export const successAppRate = (params) =>
defHttp.post({url: Api.addAppRateOk, params});

/**
 * 列表接口
 * @param params
 */
 export const getRaterateKeyItemTreeList = (params) =>
 defHttp.get({url: Api.raterateKeyItemTreeList, params});

 /**
 * 保存审核
 */
  export const saveaddRateRate = (params) =>
  defHttp.post({url: Api.addRateRate, params});
 
  /**
  * 完成审核
  */
 export const successRateRate = (params) =>
 defHttp.post({url: Api.addRateRateOk, params});

 /**
 * 
 * @param params 获得具体的选项
 * @returns 
 */
export const getPfRateStdOptionList = (params) =>
defHttp.get({url: Api.pfrateStdOptionList, params});

/**
 * 列表接口
 * @param params
 */
 export const getRaterateKeyItemTreeViewList = (params) =>
 defHttp.get({url: Api.raterateKeyItemTreeViewList, params});
 