import { defHttp } from '/@/utils/http/axios';

enum Api {
  loginfo = '/sys/loginfo',
  visitInfo = '/sys/visitInfo',
  sysInfotest = '/sys/sysInfotest',
  getBaseInfoList = '/page/pageTitleconfig/getBaseInfoList',
  // getFxjcInfo = '/page/pageTitleconfig/getFxjcInfo',
  // getFxjcInfoBili = '/page/pageTitleconfig/getFxjcInfoBili',
  // getSjfxInfo ='/page/pageTitleconfig/getSjfxInfo',
  // getQstb1 ='/page/pageTitleconfig/getQstb1',
  // getQstbTitle  ='/page/pageTitleconfig/getQstbTitle',
  // getQstb1ByYear  ='/page/pageTitleconfig/getQstb1ByYear',

  getPageChartData  ='/page/pageMonitorchart/getPageChartData',
  getMtricDataByMtrcNo  ='/page/pageMonitorchart/getMtricDataByMtrcNo',

  metricRiskLevelSta  ='/page/pageMonitorchart/metricRiskLevelSta',
  problemStat  ='/page/pageMonitorchart/problemStat',

  statProblemLevel  ='/page/pageMonitorchart/getPageStatProblemLevel',
  noticelist = '/sys/annountCement/vue3List',

  getMyTask = '/page/pageTitleconfig/getMyTask',
  editMyTask ='/my/myTask/edit',

}
/**
 * 日志统计信息
 * @param params
 */
export const getLoginfo = (params) => defHttp.get({ url: Api.loginfo, params }, { isTransformResponse: false });
/**
 * 访问量信息
 * @param params
 */
export const getVisitInfo = (params) => defHttp.get({ url: Api.visitInfo, params }, { isTransformResponse: false });
export const getSysInfotest = (params) => defHttp.get({ url: Api.sysInfotest, params }, { isTransformResponse: false });

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

//底部折线图用到的方法
 export const getPageChartData = () => defHttp.get({ url: Api.getPageChartData });
 export const getMtricDataByMtrcNo = (params) => defHttp.post({ url: Api.getMtricDataByMtrcNo, params }, { isTransformResponse: false });

 export const metricRiskLevelSta = () => defHttp.get({ url: Api.metricRiskLevelSta });
 export const problemStat = () => defHttp.get({ url: Api.problemStat});

//问题不同等级统计
 export const getPageStatProblemLevel = () => defHttp.get({ url: Api.statProblemLevel});

 export const getNoticeList = (params) => {
  // params["fromUser"] = ""
  // params["starFlag"] = ""
  // params["rangeDateKey"] = ""
  // params["beginDate"] = ""
  // params["endDate"] = ""
  return defHttp.get({ url: Api.noticelist, params });
 };


 export const getMyTask = (params) => {
  return defHttp.get({url: Api.getMyTask, params});
 }

 export const updateMyTask = (params) => {
  return defHttp.post({url: Api.editMyTask, params});
 }




