import {defHttp} from '/@/utils/http/axios'; import { useMessage } from "/@/hooks/web/useMessage"; const { createConfirm } = useMessage(); enum Api { list = '/heating/heatanalysis/yunweiPage', edit='/heating/heatanalysis/updateFaultLevel', companylist = '/heating/thermalcompany/list', heatsourcelist = '/heating/heatsource/list', heatsourcestationlist = '/heating/heatsourcestation/list', exportXls = '/heating/heatanalysis/exportYunweiXls', } /** * 导出api * @param params */ export const getExportUrl = Api.exportXls; /** * 列表接口 * @param params */ export const list = (params) => defHttp.get({url: Api.list, params}); export const companylist = (params) => defHttp.get({url: Api.companylist, params}); export const heatsourcelist = (params) => defHttp.get({url: Api.heatsourcelist, params}); export const heatsourcestationlist = (params) => defHttp.get({url: Api.heatsourcestationlist, params}); /** * 更新故障等级 * @param params */ export const saveOrUpdate = (params) => { return defHttp.post({url: Api.edit, params},{ isTransformResponse: false }); }