能效诊断
This commit is contained in:
+262
@@ -0,0 +1,262 @@
|
||||
import myAxios from './axios'
|
||||
const sx = process.env.VUE_APP_CITY_TYPE == 'sx' ? '/ferry_service/ferryController/conveyor' : ''
|
||||
|
||||
// 查询客户基本信息分页列表
|
||||
export function getUserInfo(params) {
|
||||
return myAxios({
|
||||
url: `${sx}/energy-effcicency-net-service/nxzdCustomerBasicInfoNet/list`,
|
||||
method: 'POST',
|
||||
data: params
|
||||
})
|
||||
}
|
||||
// 发起预约提交
|
||||
export function takeInitiate(params) {
|
||||
return myAxios({
|
||||
url: `${sx}/energy-effcicency-net-service/taskNet/addTask`,
|
||||
method: 'POST',
|
||||
data: params
|
||||
})
|
||||
}
|
||||
// 查询任务管理列表
|
||||
export function taskList(params) {
|
||||
return myAxios({
|
||||
url: `${sx}/energy-effcicency-net-service/taskNet/pageList`,
|
||||
method: 'POST',
|
||||
data: params
|
||||
})
|
||||
}
|
||||
// 获取任务管理状态下拉
|
||||
export function taskType(params) {
|
||||
return myAxios({
|
||||
url: '/admin/dicdata/page?dict_type=TASK_STATUS&status_code=0¤t=1&size=10000',
|
||||
method: 'GET',
|
||||
data: params
|
||||
})
|
||||
}
|
||||
// 获取客户任务进度跟踪
|
||||
export function taskRecord(id) {
|
||||
return myAxios({
|
||||
url: `${sx}/energy-effcicency-net-service/taskNet/getTaskRecordByTaskId`,
|
||||
method: 'GET',
|
||||
params: {
|
||||
id
|
||||
}
|
||||
})
|
||||
}
|
||||
// 获取清洁能源下拉
|
||||
export function qjny(params) {
|
||||
return myAxios({
|
||||
url: '/admin/dicdata/page?dict_type=used_nxzd_qjny&status_code=0¤t=1&size=10000',
|
||||
method: 'GET',
|
||||
data: params
|
||||
})
|
||||
}
|
||||
// 获取再生水类型
|
||||
export function waterType(params) {
|
||||
return myAxios({
|
||||
url: '/admin/dicdata/page?dict_type=reclaimedWaterType&status_code=0¤t=1&size=10000',
|
||||
method: 'GET',
|
||||
data: params
|
||||
})
|
||||
}
|
||||
// 获取外墙结构
|
||||
export function wqjg(params) {
|
||||
return myAxios({
|
||||
url: '/admin/dicdata/page?dict_type=nxzd_wqcl&status_code=0¤t=1&size=10000',
|
||||
method: 'GET',
|
||||
data: params
|
||||
})
|
||||
}
|
||||
// 获取门窗玻璃
|
||||
export function mcbl(params) {
|
||||
return myAxios({
|
||||
url: '/admin/dicdata/page?dict_type=nxzd_mcbl&status_code=0¤t=1&size=10000',
|
||||
method: 'GET',
|
||||
data: params
|
||||
})
|
||||
}
|
||||
// 获取窗框材料
|
||||
export function ckcl(params) {
|
||||
return myAxios({
|
||||
url: '/admin/dicdata/page?dict_type=nxzd_mclx&status_code=0¤t=1&size=10000',
|
||||
method: 'GET',
|
||||
data: params
|
||||
})
|
||||
}
|
||||
// 获取能源类型
|
||||
export function nylx(params) {
|
||||
return myAxios({
|
||||
url: '/admin/dicdata/page?dict_type=diag_energy_code&status_code=0¤t=1&size=10000',
|
||||
method: 'GET',
|
||||
data: params
|
||||
})
|
||||
}
|
||||
// 获取分项计量类型
|
||||
export function fxjlType(params) {
|
||||
return myAxios({
|
||||
url: '/admin/dicdata/page?dict_type=nxzd_fxjllx&status_code=0¤t=1&size=10000',
|
||||
method: 'GET',
|
||||
data: params
|
||||
})
|
||||
}
|
||||
// 获取平台功能类别
|
||||
export function ptgnbh(params) {
|
||||
return myAxios({
|
||||
url: '/admin/dicdata/page?dict_type=nxzd_ptgnbh&status_code=0¤t=1&size=10000',
|
||||
method: 'GET',
|
||||
data: params
|
||||
})
|
||||
}
|
||||
// 获取建筑信息管理措施问询
|
||||
export function buildAsk(data) {
|
||||
return myAxios({
|
||||
url: `${sx}/energy-effcicency-net-service/nxzdEnquireNet/getEnquireInfoByModelType`,
|
||||
method: 'GET',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
// 新增保存建筑基本信息
|
||||
export function buildAdd(params) {
|
||||
return myAxios({
|
||||
url: `${sx}/energy-effcicency-net-service/nxzdBuildInfoNet/add`,
|
||||
method: 'POST',
|
||||
data: params
|
||||
})
|
||||
}
|
||||
// 修改保存建筑基本信息
|
||||
export function buildEdit(params) {
|
||||
return myAxios({
|
||||
url: `${sx}/energy-effcicency-net-service/nxzdBuildInfoNet/edit`,
|
||||
method: 'POST',
|
||||
data: params
|
||||
})
|
||||
}
|
||||
// 查询单个建筑基本信息
|
||||
export function getInfo(id) {
|
||||
return myAxios({
|
||||
url: `${sx}/energy-effcicency-net-service/nxzdBuildInfoNet/getInfo`,
|
||||
method: 'GET',
|
||||
params: id
|
||||
})
|
||||
}
|
||||
// 查询统计信息
|
||||
export function getStatisticAPI(params) {
|
||||
return myAxios({
|
||||
url: `${sx}/energy-effcicency-net-service/nxzdCustomerBasicInfoNet/getStatistic`,
|
||||
method: 'GET',
|
||||
params
|
||||
})
|
||||
}
|
||||
// 签名上传
|
||||
export function uploadNoting(params) {
|
||||
return myAxios({
|
||||
url: '/portal/file/minio/upload',
|
||||
method: 'POST',
|
||||
params: params
|
||||
})
|
||||
}
|
||||
//图片上传
|
||||
export function uploadFile(params) {
|
||||
// console.log(params);
|
||||
// console.log(decrypt(params));
|
||||
return myAxios({
|
||||
url: '/file/minio/upload',
|
||||
method: 'POST',
|
||||
data: params
|
||||
})
|
||||
}
|
||||
//图片读取
|
||||
export function downloadFile(attach_id) {
|
||||
return myAxios({
|
||||
url: '/file/minio/download',
|
||||
method: 'POST',
|
||||
params: attach_id
|
||||
})
|
||||
}
|
||||
// 生成诊断报告
|
||||
export function genReport(data) {
|
||||
return myAxios({
|
||||
url: `${sx}/energy-effcicency-net-service/nxzdReportTemplaNet/genReport`,
|
||||
method: 'GET',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
// 签名上传
|
||||
export function uploadSign(params) {
|
||||
return myAxios({
|
||||
url: `${sx}/energy-effcicency-net-service/nxzdReportTemplaNet/edit`,
|
||||
method: 'POST',
|
||||
data: params
|
||||
})
|
||||
}
|
||||
//能源信息
|
||||
export function getInfoAPI(data) {
|
||||
return myAxios({
|
||||
url: `${sx}/energy-effcicency-net-service/nxzdEnterpriseInfoNet/getInfo`,
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
// 修改能源管理信息
|
||||
export function editInfoAPI(params) {
|
||||
return myAxios({
|
||||
url: `${sx}/energy-effcicency-net-service/nxzdEnterpriseInfoNet/edit`,
|
||||
method: 'POST',
|
||||
data: params
|
||||
})
|
||||
}
|
||||
// 新增能源管理信息
|
||||
export function addInfoAPI(params) {
|
||||
return myAxios({
|
||||
url: `${sx}/energy-effcicency-net-service/nxzdEnterpriseInfoNet/add`,
|
||||
method: 'POST',
|
||||
data: params
|
||||
})
|
||||
}
|
||||
// 工业企业到能源管理页面查看是否新增,修改
|
||||
export function getInfoByCustomerIdAPI(data) {
|
||||
return myAxios({
|
||||
url: `${sx}/energy-effcicency-net-service/nxzdEnterpriseInfoNet/getInfo`,
|
||||
// url: `${sx}/energy-effcicency-net-service/nxzdEnterpriseInfoNet/getInfoByCustomerId`,
|
||||
method: 'GET',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
//提交更改状态
|
||||
export function changeSaveStateAPI(data) {
|
||||
return myAxios({
|
||||
url: `${sx}/energy-effcicency-net-service/taskNet/changeSaveState`,
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
//提交保存
|
||||
export function changeSubStateType(data) {
|
||||
return myAxios({
|
||||
url: `${sx}/energy-effcicency-net-service/nxzdBuildInfoNet/changeSubStateType`,
|
||||
method: 'GET',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
//查询工业企业三个主表的id
|
||||
export function getEnergyInfoByCustomerId(data) {
|
||||
return myAxios({
|
||||
url: `${sx}/energy-effcicency-net-service/nxzdEnterpriseInfoNet/getEnergyInfoByCustomerId`,
|
||||
method: 'GET',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
//图文识别上传
|
||||
export function fileController(params) {
|
||||
console.log(params);
|
||||
// console.log(decrypt(params));
|
||||
return myAxios({
|
||||
url: '/energy-effcicency-net-service/fileController/uploadFile',
|
||||
method: 'POST',
|
||||
data: params
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,219 @@
|
||||
import axios from 'axios';
|
||||
import { Notify, Toast } from 'vant';
|
||||
import { getTokenAUTH } from '@/utils/auth';
|
||||
import { baseURLs } from './config.js'
|
||||
import { getIsEncrypt } from '@/settings'
|
||||
import {encrypt, decrypt} from '@/utils/cryptology'
|
||||
import router from '../router'
|
||||
|
||||
|
||||
const pendingMap = new Map();
|
||||
|
||||
axios.defaults.headers["Content-Type"] = "application/json;charset=utf-8";
|
||||
// const cityType = process.env.VUE_APP_CITY_TYPE
|
||||
// const sxPath = '/ferry_service/ferryController/conveyor'
|
||||
// const noAddpath = ['/admin', '/file', '/thirdpart']
|
||||
|
||||
/**
|
||||
* 提示函数
|
||||
* 禁止点击蒙层,显示1秒后关闭
|
||||
*/
|
||||
|
||||
const tip = msg => {
|
||||
Toast({
|
||||
message: msg,
|
||||
duration: 1000,
|
||||
forbidClick: true
|
||||
})
|
||||
}
|
||||
|
||||
const LoadingInstance = {
|
||||
_target: null,
|
||||
_count: 0
|
||||
};
|
||||
|
||||
function myAxios(axiosConfig, customOptions) {
|
||||
const service = axios.create({
|
||||
baseURL: axiosConfig.type ? '' : baseURLs, // 设置统一的请求前缀
|
||||
timeout: 10000, // 设置统一的超时时长
|
||||
});
|
||||
|
||||
// 自定义配置
|
||||
let custom_options = Object.assign({
|
||||
repeat_request_cancel: false, // 是否开启取消重复请求, 默认为 true
|
||||
loading: false, // 是否开启loading层效果, 默认为false
|
||||
reduct_data_format: true, // 是否开启简洁的数据结构响应, 默认为true
|
||||
error_message_show: true, // 是否开启接口错误信息展示,默认为true
|
||||
code_message_show: false, // 是否开启code不为0时的信息提示, 默认为false
|
||||
}, customOptions);
|
||||
|
||||
// 请求拦截
|
||||
service.interceptors.request.use(
|
||||
config => {
|
||||
removePending(config);
|
||||
custom_options.repeat_request_cancel && addPending(config);
|
||||
// 创建loading实例
|
||||
if (custom_options.loading) {
|
||||
LoadingInstance._count++;
|
||||
if (LoadingInstance._count === 1) {
|
||||
LoadingInstance._target = tip('加载中');
|
||||
}
|
||||
}
|
||||
// 自动携带token
|
||||
if (getTokenAUTH() && typeof window !== "undefined") {
|
||||
config.headers.Authorization = 'Bearer ' + getTokenAUTH();
|
||||
}
|
||||
if (getIsEncrypt) {
|
||||
let data = config.method == 'get' ? config.params : config.data
|
||||
// console.log('加密前的请求参数', data)
|
||||
|
||||
// eslint-disable-next-line no-extra-boolean-cast
|
||||
if(config.url.split('/fileController').length==2 ){
|
||||
// data = encrypt(data, config)
|
||||
// console.log(data,'pppp');
|
||||
}else if (!!data && (config.url.split('/file/minio').length != 2 )) {
|
||||
data = encrypt(data, config)
|
||||
config.method == 'get' ? (config.params = data) : (config.data = data)
|
||||
}
|
||||
}
|
||||
return config;
|
||||
},
|
||||
error => {
|
||||
return Promise.reject(error);
|
||||
}
|
||||
);
|
||||
|
||||
// 响应拦截
|
||||
service.interceptors.response.use(
|
||||
response => {
|
||||
let res = response.data
|
||||
removePending(response.config);
|
||||
custom_options.loading && closeLoading(custom_options); // 关闭loading
|
||||
|
||||
if (custom_options.code_message_show && response.data && response.data.code !== 0) {
|
||||
Notify({ type: 'danger', message: response.data.message })
|
||||
// ElMessage({
|
||||
// type: 'error',
|
||||
// message: response.data.message
|
||||
// })
|
||||
return Promise.reject(response.data); // code不等于0, 页面具体逻辑就不执行了
|
||||
}
|
||||
|
||||
if (getIsEncrypt && !!res.encrypt_data) {
|
||||
let data = decrypt(res.encrypt_data)
|
||||
// console.log('解密后的返回值', data)
|
||||
res = {
|
||||
code: res.code,
|
||||
data,
|
||||
msg: res.msg,
|
||||
}
|
||||
}
|
||||
|
||||
return res
|
||||
},
|
||||
error => {
|
||||
error.config && removePending(error.config);
|
||||
custom_options.loading && closeLoading(custom_options); // 关闭loading
|
||||
custom_options.error_message_show && httpErrorStatusHandle(error); // 处理错误状态码
|
||||
return Promise.reject(error); // 错误继续返回给到具体页面
|
||||
}
|
||||
);
|
||||
|
||||
return service(axiosConfig)
|
||||
}
|
||||
|
||||
|
||||
|
||||
export default myAxios
|
||||
|
||||
/**
|
||||
* 处理异常
|
||||
* @param {*} error
|
||||
*/
|
||||
function httpErrorStatusHandle(error) {
|
||||
|
||||
// 处理被取消的请求
|
||||
if (axios.isCancel(error)) return console.error('请求的重复请求:' + error.message);
|
||||
let message = '';
|
||||
if (error && error.response) {
|
||||
switch (error.response.status) {
|
||||
case 302: message = '接口重定向了!'; break;
|
||||
case 400: message = '参数不正确!'; break;
|
||||
case 401: message = '您未登录,或者登录已经超时,请先登录!';
|
||||
// console.log(router,'114');
|
||||
// router.push('/login')
|
||||
// eslint-disable-next-line no-case-declarations
|
||||
let pathName = sessionStorage.getItem('path')
|
||||
router.push(pathName)
|
||||
break;
|
||||
case 403: message = '您没有权限操作!'; break;
|
||||
case 404: message = `请求地址出错: ${error.response.config.url}`; break; // 在正确域名下
|
||||
case 408: message = '请求超时!'; break;
|
||||
case 409: message = '系统已存在相同数据!'; break;
|
||||
case 500: message = '服务器内部错误!'; break;
|
||||
case 501: message = '服务未实现!'; break;
|
||||
case 502: message = '网关错误!'; break;
|
||||
case 503: message = '服务不可用!'; break;
|
||||
case 504: message = '服务暂时无法访问,请稍后再试!'; break;
|
||||
case 505: message = 'HTTP版本不受支持!'; break;
|
||||
default: message = '异常问题,请联系管理员!'; break
|
||||
}
|
||||
}
|
||||
if (error.message.includes('timeout')) message = '网络请求超时!';
|
||||
if (error.message.includes('Network')) message = window.navigator.onLine ? '服务端异常!' : '您断网了!';
|
||||
Notify({ type: 'danger', message: message })
|
||||
// ElMessage({
|
||||
// type: 'error',
|
||||
// message
|
||||
// })
|
||||
}
|
||||
|
||||
/**
|
||||
* 关闭Loading层实例
|
||||
* @param {*} _options
|
||||
*/
|
||||
function closeLoading(_options) {
|
||||
if (_options.loading && LoadingInstance._count > 0) LoadingInstance._count--;
|
||||
if (LoadingInstance._count === 0) {
|
||||
LoadingInstance._target && LoadingInstance._target.close();
|
||||
LoadingInstance._target = null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 储存每个请求的唯一cancel回调, 以此为标识
|
||||
* @param {*} config
|
||||
*/
|
||||
function addPending(config) {
|
||||
const pendingKey = getPendingKey(config);
|
||||
config.cancelToken = config.cancelToken || new axios.CancelToken((cancel) => {
|
||||
if (!pendingMap.has(pendingKey)) {
|
||||
pendingMap.set(pendingKey, cancel);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除重复的请求
|
||||
* @param {*} config
|
||||
*/
|
||||
function removePending(config) {
|
||||
const pendingKey = getPendingKey(config);
|
||||
if (pendingMap.has(pendingKey)) {
|
||||
const cancelToken = pendingMap.get(pendingKey);
|
||||
// 如你不明白此处为什么需要传递pendingKey可以看文章下方的补丁解释
|
||||
cancelToken(pendingKey);
|
||||
pendingMap.delete(pendingKey);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成唯一的每个请求的唯一key
|
||||
* @param {*} config
|
||||
* @returns
|
||||
*/
|
||||
function getPendingKey(config) {
|
||||
let { url, method, params, data } = config;
|
||||
if (typeof data === 'string') data = JSON.parse(data); // response里面返回的config.data是个字符串对象
|
||||
return [url, method, JSON.stringify(params), JSON.stringify(data)].join('&');
|
||||
}
|
||||
@@ -0,0 +1,191 @@
|
||||
import axios from 'axios';
|
||||
import { Notify, Toast } from 'vant';
|
||||
import { getTokenAUTH } from '@/utils/auth';
|
||||
import { baseURLs } from './config.js'
|
||||
import router from '../router'
|
||||
|
||||
|
||||
const pendingMap = new Map();
|
||||
|
||||
axios.defaults.headers["Content-Type"] = "application/json;charset=utf-8";
|
||||
|
||||
/**
|
||||
* 提示函数
|
||||
* 禁止点击蒙层,显示1秒后关闭
|
||||
*/
|
||||
|
||||
const tip = msg => {
|
||||
Toast({
|
||||
message: msg,
|
||||
duration: 1000,
|
||||
forbidClick: true
|
||||
})
|
||||
}
|
||||
|
||||
const LoadingInstance = {
|
||||
_target: null,
|
||||
_count: 0
|
||||
};
|
||||
|
||||
function myAxios2(axiosConfig, customOptions) {
|
||||
const service = axios.create({
|
||||
baseURL: axiosConfig.type ? '' : baseURLs, // 设置统一的请求前缀
|
||||
timeout: 50000, // 设置统一的超时时长
|
||||
});
|
||||
|
||||
// 自定义配置
|
||||
let custom_options = Object.assign({
|
||||
repeat_request_cancel: false, // 是否开启取消重复请求, 默认为 true
|
||||
loading: false, // 是否开启loading层效果, 默认为false
|
||||
reduct_data_format: true, // 是否开启简洁的数据结构响应, 默认为true
|
||||
error_message_show: true, // 是否开启接口错误信息展示,默认为true
|
||||
code_message_show: false, // 是否开启code不为0时的信息提示, 默认为false
|
||||
}, customOptions);
|
||||
|
||||
// 请求拦截
|
||||
service.interceptors.request.use(
|
||||
config => {
|
||||
removePending(config);
|
||||
custom_options.repeat_request_cancel && addPending(config);
|
||||
// 创建loading实例
|
||||
if (custom_options.loading) {
|
||||
LoadingInstance._count++;
|
||||
if (LoadingInstance._count === 1) {
|
||||
LoadingInstance._target = tip('加载中');
|
||||
}
|
||||
}
|
||||
// 自动携带token
|
||||
if (getTokenAUTH() && typeof window !== "undefined") {
|
||||
config.headers.Authorization = 'Bearer ' + getTokenAUTH();
|
||||
}
|
||||
|
||||
return config;
|
||||
},
|
||||
error => {
|
||||
return Promise.reject(error);
|
||||
}
|
||||
);
|
||||
|
||||
// 响应拦截
|
||||
service.interceptors.response.use(
|
||||
response => {
|
||||
removePending(response.config);
|
||||
custom_options.loading && closeLoading(custom_options); // 关闭loading
|
||||
|
||||
if (custom_options.code_message_show && response.data && response.data.code !== 0) {
|
||||
Notify({ type: 'danger', message: response.data.message })
|
||||
// ElMessage({
|
||||
// type: 'error',
|
||||
// message: response.data.message
|
||||
// })
|
||||
return Promise.reject(response.data); // code不等于0, 页面具体逻辑就不执行了
|
||||
}
|
||||
|
||||
return custom_options.reduct_data_format ? response.data : response;
|
||||
},
|
||||
error => {
|
||||
error.config && removePending(error.config);
|
||||
custom_options.loading && closeLoading(custom_options); // 关闭loading
|
||||
custom_options.error_message_show && httpErrorStatusHandle(error); // 处理错误状态码
|
||||
return Promise.reject(error); // 错误继续返回给到具体页面
|
||||
}
|
||||
);
|
||||
|
||||
return service(axiosConfig)
|
||||
}
|
||||
|
||||
|
||||
|
||||
export default myAxios2
|
||||
|
||||
/**
|
||||
* 处理异常
|
||||
* @param {*} error
|
||||
*/
|
||||
function httpErrorStatusHandle(error) {
|
||||
|
||||
// 处理被取消的请求
|
||||
if (axios.isCancel(error)) return console.error('请求的重复请求:' + error.message);
|
||||
let message = '';
|
||||
if (error && error.response) {
|
||||
switch (error.response.status) {
|
||||
case 302: message = '接口重定向了!'; break;
|
||||
case 400: message = '参数不正确!'; break;
|
||||
case 401: message = '您未登录,或者登录已经超时,请先登录!';
|
||||
// console.log(router,'114');
|
||||
// router.push('/login')
|
||||
// eslint-disable-next-line no-case-declarations
|
||||
let pathName = sessionStorage.getItem('path')
|
||||
router.push(pathName)
|
||||
break;
|
||||
case 403: message = '您没有权限操作!'; break;
|
||||
case 404: message = `请求地址出错: ${error.response.config.url}`; break; // 在正确域名下
|
||||
case 408: message = '请求超时!'; break;
|
||||
case 409: message = '系统已存在相同数据!'; break;
|
||||
case 500: message = '服务器内部错误!'; break;
|
||||
case 501: message = '服务未实现!'; break;
|
||||
case 502: message = '网关错误!'; break;
|
||||
case 503: message = '服务不可用!'; break;
|
||||
case 504: message = '服务暂时无法访问,请稍后再试!'; break;
|
||||
case 505: message = 'HTTP版本不受支持!'; break;
|
||||
default: message = '异常问题,请联系管理员!'; break
|
||||
}
|
||||
}
|
||||
if (error.message.includes('timeout')) message = '网络请求超时!';
|
||||
if (error.message.includes('Network')) message = window.navigator.onLine ? '服务端异常!' : '您断网了!';
|
||||
Notify({ type: 'danger', message: message })
|
||||
// ElMessage({
|
||||
// type: 'error',
|
||||
// message
|
||||
// })
|
||||
}
|
||||
|
||||
/**
|
||||
* 关闭Loading层实例
|
||||
* @param {*} _options
|
||||
*/
|
||||
function closeLoading(_options) {
|
||||
if (_options.loading && LoadingInstance._count > 0) LoadingInstance._count--;
|
||||
if (LoadingInstance._count === 0) {
|
||||
LoadingInstance._target.close();
|
||||
LoadingInstance._target = null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 储存每个请求的唯一cancel回调, 以此为标识
|
||||
* @param {*} config
|
||||
*/
|
||||
function addPending(config) {
|
||||
const pendingKey = getPendingKey(config);
|
||||
config.cancelToken = config.cancelToken || new axios.CancelToken((cancel) => {
|
||||
if (!pendingMap.has(pendingKey)) {
|
||||
pendingMap.set(pendingKey, cancel);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除重复的请求
|
||||
* @param {*} config
|
||||
*/
|
||||
function removePending(config) {
|
||||
const pendingKey = getPendingKey(config);
|
||||
if (pendingMap.has(pendingKey)) {
|
||||
const cancelToken = pendingMap.get(pendingKey);
|
||||
// 如你不明白此处为什么需要传递pendingKey可以看文章下方的补丁解释
|
||||
cancelToken(pendingKey);
|
||||
pendingMap.delete(pendingKey);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成唯一的每个请求的唯一key
|
||||
* @param {*} config
|
||||
* @returns
|
||||
*/
|
||||
function getPendingKey(config) {
|
||||
let { url, method, params, data } = config;
|
||||
if (typeof data === 'string') data = JSON.parse(data); // response里面返回的config.data是个字符串对象
|
||||
return [url, method, JSON.stringify(params), JSON.stringify(data)].join('&');
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
//公共api
|
||||
import myAxios from "./axios";
|
||||
import myAxios2 from "./axios2";
|
||||
const sx = process.env.VUE_APP_CITY_TYPE == 'sx'?'/ferry_service/ferryController/conveyor':''
|
||||
|
||||
/**
|
||||
* 查询系统码表
|
||||
* @param data 其中包括 codeSortId codeType 后端定义的枚举id及类型
|
||||
*/
|
||||
export function getCode(data) {
|
||||
return myAxios({
|
||||
url: `${sx}/energy-effcicency-net-service/nxzdPCodeYcControllerNet/list`, //后端接口路由
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 查询系统码表 -- 地区
|
||||
* @param data 暂时不用传其他数据,如果获取到客户/客户经理所在地需要传
|
||||
*/
|
||||
export function getOrgList() {
|
||||
return myAxios({
|
||||
url: `${sx}/energy-effcicency-net-service/area/queryAreaTree`, //后端接口路由
|
||||
method: 'post',
|
||||
data: {
|
||||
id: '123'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
//获取用户信息
|
||||
export function getUserInfo(params) {
|
||||
return myAxios({
|
||||
url: `/admin/user/info`, //后端接口路由
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
//获取ai
|
||||
export function getLoginInfoByGrsg(params) {
|
||||
return myAxios({
|
||||
url: `/thirdpart/grsg/loginGrsg`, //后端接口路由
|
||||
method: 'post',
|
||||
data: params
|
||||
})
|
||||
}
|
||||
//后端获取ai返回到前端
|
||||
export function getAi(params) {
|
||||
return myAxios({
|
||||
url:`${sx}/energy-effcicency-net-service/grsg/getAi`,
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
//获取当前登录人是客户还是客户经理
|
||||
export function getUserLevel() {
|
||||
return myAxios({
|
||||
url: `${sx}/energy-effcicency-net-service/nxzdCustomerBasicInfoNet/getLoginRole`, //后端接口路由
|
||||
method: 'get',
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
//获取返回base64
|
||||
export function downReportTime(data) {
|
||||
return myAxios2({
|
||||
url: `${sx}/energy-effcicency-net-service/nxzdReportTemplaNet/downReportTime`, //后端接口路由
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 保存日志
|
||||
export function saveLog(data) {
|
||||
return myAxios({
|
||||
url: `${sx}/energy-effcicency-net-service/log/saveLog`, //后端接口路由
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
let baseURL = ''
|
||||
// console.log(process.env.VUE_APP_CITY_TYPE);
|
||||
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
// 测试环境
|
||||
// baseURL = 'http://192.168.98.115:28083/' //后端ip和端口
|
||||
// baseURL = 'http://192.168.1.116:28083/' //南京国网测试后端ip和端口
|
||||
baseURL = 'http://192.168.98.115:9012/' //南京国网测试后端ip和端口
|
||||
// baseURL = 'https://portal.xt.nfjbill.ren:30004/proxy-ah/' //后端ip和端口
|
||||
|
||||
// baseURL = 'https://www.greensgcc.com/proxy-ah/effcicency/' //安徽本地测试
|
||||
// baseURL = 'https://www.greensgcc.com/proxy-nx/' //宁夏本地测试
|
||||
// baseURL = 'https://www.greensgcc.com/proxy-xj/' //新疆本地测试
|
||||
// baseURL = 'https://www.greensgcc.com/proxy-sx/' //山西本地测试
|
||||
|
||||
} else {
|
||||
// 生产环境
|
||||
// baseURL = '' // 本地 打包以后只需要空路径就行
|
||||
// baseURL = '/proxy-ah' //安徽 打包以后的路径
|
||||
baseURL = '/proxy-nx' //宁夏 打包以后的路径
|
||||
// baseURL = '/proxy-xj' //新疆 打包以后的路径
|
||||
// baseURL = '/proxy-sx' //山西 打包以后的路径
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
export const baseURLs = baseURL
|
||||
@@ -0,0 +1,57 @@
|
||||
import myAxios from "./axios";
|
||||
const sx = process.env.VUE_APP_CITY_TYPE == 'sx'?'/ferry_service/ferryController/conveyor':''
|
||||
|
||||
/**
|
||||
* 客户档案信息
|
||||
* --修改--
|
||||
* @param data
|
||||
*/
|
||||
|
||||
export function customerEdit(data) {
|
||||
return myAxios({
|
||||
url: `${sx}/energy-effcicency-net-service/nxzdCustomerBasicInfoNet/edit`, //后端接口路由
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询单个客户信息
|
||||
* @param id
|
||||
*/
|
||||
|
||||
export function getSingleInfo(id) {
|
||||
return myAxios({
|
||||
url: `${sx}/energy-effcicency-net-service/nxzdCustomerBasicInfoNet/getOneInfo`, //后端接口路由
|
||||
method: 'get',
|
||||
params: { id }
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询单个客户信息 -- 任务管理
|
||||
* @param id
|
||||
*/
|
||||
export function getSingleTaskInfo(id) {
|
||||
return myAxios({
|
||||
url: `${sx}/energy-effcicency-net-service/taskNet/getInfo`, //后端接口路由
|
||||
method: 'get',
|
||||
params: { id }
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 查询客户用电户号列表
|
||||
* @param data
|
||||
*/
|
||||
// nxzdCustomerBasicInfoNet
|
||||
export function getUseele(data) {
|
||||
return myAxios({
|
||||
url: `${sx}/energy-effcicency-net-service/nxzdCConsNet/list`, //后端接口路由
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
import myAxios from './axios'
|
||||
const sx = process.env.VUE_APP_CITY_TYPE == 'sx'?'/ferry_service/ferryController/conveyor':''
|
||||
|
||||
//通过id获取到当前id的详细信息
|
||||
export function getCurrentPersonInfoAPI(customerId) {
|
||||
return myAxios({
|
||||
url: `${sx}/energy-effcicency-net-service/nxzdCustomerBasicInfoNet/getOneInfo`, //后端接口路由
|
||||
method: 'get',
|
||||
params: { id: customerId }
|
||||
})
|
||||
}
|
||||
// 查询单个客户统计信息
|
||||
export function getCustomerStatisticAPI(id) {
|
||||
return myAxios({
|
||||
url:`${sx}/energy-effcicency-net-service/nxzdCustomerBasicInfoNet/getCustomerStatistic`, //后端接口路由
|
||||
method: 'get',
|
||||
params: { id }
|
||||
})
|
||||
}
|
||||
// 工业企业--通过id获取到当前id的详细信息
|
||||
export function getInfoAPI(customerId) {
|
||||
return myAxios({
|
||||
url:`${sx}/energy-effcicency-net-service/nxzdCustomerBasicInfoNet/getEnterpriseCustomerStatistic`, //后端接口路由
|
||||
method: 'get',
|
||||
params: { id: customerId }
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,176 @@
|
||||
import myAxios from "./axios";
|
||||
const sx = process.env.VUE_APP_CITY_TYPE == 'sx'?'/ferry_service/ferryController/conveyor':''
|
||||
|
||||
//建筑能耗数据信息
|
||||
|
||||
/**
|
||||
* 查询建筑能耗 -- 年
|
||||
* @param {
|
||||
* pageNum: 当前第几页,
|
||||
* pageSize: 每页展示多少行
|
||||
* }
|
||||
*/
|
||||
|
||||
export function getYearList(data) {
|
||||
return myAxios({
|
||||
url: `${sx}/energy-effcicency-net-service/nxzdEnergyDataYearNet/list`, //后端接口路由
|
||||
method: 'post',
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询单个建筑能耗 -- 年
|
||||
* @param id 获取所需编辑的id
|
||||
*
|
||||
*/
|
||||
|
||||
export function getSingleYearInfo(id) {
|
||||
return myAxios({
|
||||
url: `${sx}/energy-effcicency-net-service/nxzdEnergyDataYearNet/getInfo`, //后端接口路由
|
||||
method: 'get',
|
||||
params: { id }
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑能耗数据 -- 年
|
||||
* @param data
|
||||
*/
|
||||
export function yearEdit(data) {
|
||||
return myAxios({
|
||||
url: `${sx}/energy-effcicency-net-service/nxzdEnergyDataYearNet/edit`, //后端接口路由
|
||||
method: 'post',
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 查询建筑耗能 -- 月
|
||||
* @param {
|
||||
* pageNum: 当前第几页,
|
||||
* pageSize: 每页展示多少行,
|
||||
* energyMonth: 展示某月
|
||||
* }
|
||||
*
|
||||
*/
|
||||
export function getMonthList(data) {
|
||||
return myAxios({
|
||||
url: `${sx}/energy-effcicency-net-service/nxzdEnergyDataMonthNet/list`, //后端接口路由
|
||||
method: 'post',
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询单个建筑能耗 -- 月
|
||||
* @param id 获取所需编辑的id
|
||||
*
|
||||
*/
|
||||
|
||||
export function getSingleMonthInfo(id) {
|
||||
return myAxios({
|
||||
url: `${sx}/energy-effcicency-net-service/nxzdEnergyDataMonthNet/getInfo`, //后端接口路由
|
||||
method: 'get',
|
||||
params: { id }
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑能耗数据 -- 月
|
||||
* @param data
|
||||
*/
|
||||
export function monthEdit(data) {
|
||||
return myAxios({
|
||||
url: `${sx}/energy-effcicency-net-service/nxzdEnergyDataMonthNet/edit`, //后端接口路由
|
||||
method: 'post',
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
||||
//用能信息
|
||||
|
||||
//获取此用户是否有用能信息
|
||||
|
||||
export function getCustomerInfo(id) {
|
||||
return myAxios({
|
||||
url: `${sx}/energy-effcicency-net-service/nxzdUseEnergyEquipNet/getInfo`, //后端接口路由
|
||||
method: 'get',
|
||||
params: { customerId: id },
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增空调制冷系统
|
||||
* @param data
|
||||
*
|
||||
*/
|
||||
|
||||
export function addListRefrige(data) {
|
||||
return myAxios({
|
||||
url: `${sx}/energy-effcicency-net-service/nxzdRefrigeSystemNet/addList`, //后端接口路由
|
||||
method: 'post',
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增主要用能设备
|
||||
* @param data
|
||||
*/
|
||||
export function addEnergyEquip(data) {
|
||||
return myAxios({
|
||||
url: `${sx}/energy-effcicency-net-service/nxzdUseEnergyEquipNet/addEnergyEquip`, //后端接口路由
|
||||
method: 'post',
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改主要用能设备
|
||||
* @param data
|
||||
*/
|
||||
|
||||
export function editEnergyEquip(data) {
|
||||
return myAxios({
|
||||
url: `${sx}/energy-effcicency-net-service/nxzdUseEnergyEquipNet/edit`, //后端接口路由
|
||||
method: 'post',
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询单个主要用能设备信息
|
||||
* @param data
|
||||
*/
|
||||
export function getEnergyEquip(id) {
|
||||
return myAxios({
|
||||
url: `${sx}/energy-effcicency-net-service/nxzdUseEnergyEquipNet/getInfo`, //后端接口路由
|
||||
method: 'GET',
|
||||
params: id
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询所有闻讯信息
|
||||
* @param {
|
||||
* pageNum: 1, 分页查询当前页码
|
||||
* pageSize: 99999 分页查询当前页展示条数
|
||||
* }
|
||||
*/
|
||||
export function getSearchList() {
|
||||
const data = {
|
||||
pageNum: 1,
|
||||
pageSize: 99999
|
||||
}
|
||||
return myAxios({
|
||||
url: `${sx}/energy-effcicency-net-service/nxzdEnquireNet/list`, //后端接口路由
|
||||
method: 'post',
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
//公共api
|
||||
import myAxios from './axios'
|
||||
const sx = process.env.VUE_APP_CITY_TYPE == 'sx'?'/ferry_service/ferryController/conveyor':''
|
||||
|
||||
//通过id获取到当前id的详细信息
|
||||
export function getEnergyReportInfoAPI(data) {
|
||||
return myAxios({
|
||||
url: `${sx}/energy-effcicency-net-service/nxzdReportTemplaNet/getReport`, //后端接口路由
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
//能耗算分
|
||||
export function energyQuotaTaskCalc(data) {
|
||||
return myAxios({
|
||||
url:`${sx}/energy-effcicency-net-service/nxzdEnergyQuotaSetNet/energyQuotaTaskCalc`, //后端接口路由
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
//获取登录客户信息
|
||||
export function getLoginCustomerAPI() {
|
||||
return myAxios({
|
||||
url:`${sx}/energy-effcicency-net-service/nxzdCustomerBasicInfoNet/getLoginCustomer`, //后端接口路由
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
// 查询报告月份下拉数据
|
||||
export function getReportTimeListAPI(data) {
|
||||
return myAxios({
|
||||
url: `${sx}/energy-effcicency-net-service/nxzdReportTemplaNet/getReportTimeList`, //后端接口路由
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
//可以通过日期获取当前报表数据
|
||||
export function getReport(data) {
|
||||
return myAxios({
|
||||
url: `${sx}/energy-effcicency-net-service/nxzdCustomerBasicInfoNet/getReport`, //后端接口路由
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 查询企业用能列表
|
||||
export function getQyListAPI(data) {
|
||||
return myAxios({
|
||||
url: `${sx}/energy-effcicency-net-service/nxzdEnterpriseEnergyNet/list`, //后端接口路由
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 新增保存企业用能信息
|
||||
export function NewAddQyAPI(data) {
|
||||
return myAxios({
|
||||
url: `${sx}/energy-effcicency-net-service/nxzdEnterpriseEnergyNet/add`, //后端接口路由
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除企业用能信息
|
||||
export function DeleteQyAPI(data) {
|
||||
return myAxios({
|
||||
url: `${sx}/energy-effcicency-net-service/nxzdEnterpriseEnergyNet/remove`, //后端接口路由
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
// 查询单个企业用能信息
|
||||
export function getQyInfo(data) {
|
||||
return myAxios({
|
||||
url: `${sx}/energy-effcicency-net-service/nxzdEnterpriseEnergyNet/getInfo`, //后端接口路由
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改单个企业用能信息
|
||||
export function EditQyInfo(data) {
|
||||
return myAxios({
|
||||
url: `${sx}/energy-effcicency-net-service/nxzdEnterpriseEnergyNet/edit`, //后端接口路由
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
// 根据年份获取用户外购电信息
|
||||
export function getInfoByCustomerId(data) {
|
||||
return myAxios({
|
||||
url: `${sx}/energy-effcicency-net-service/nxzdEnergyDataYearNet/getInfoByCustomerId`, //后端接口路由
|
||||
method: 'GET',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
// 通过年份与客户id查询报告
|
||||
export function getReportByYear(data) {
|
||||
return myAxios({
|
||||
url: `${sx}/energy-effcicency-net-service/nxzdReportTemplaNet/getReportByYear`, //后端接口路由
|
||||
method: 'GET',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
//公共api
|
||||
import myAxios from './axios'
|
||||
const sx = process.env.VUE_APP_CITY_TYPE == 'sx'?'/ferry_service/ferryController/conveyor':''
|
||||
|
||||
//查询评价列表
|
||||
export function getCurrentUserEvaluate(data) {
|
||||
return myAxios({
|
||||
url: `${sx}/energy-effcicency-net-service/nxzdEvaluateNet/list`, //后端接口路由
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
//保存评价回复
|
||||
export function getCurrentUserEvaluateAdd(data) {
|
||||
return myAxios({
|
||||
url: `${sx}/energy-effcicency-net-service/nxzdEvaluateReplyNet/add`, //后端接口路由
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,282 @@
|
||||
import myAxios from "./axios";
|
||||
const sx = process.env.VUE_APP_CITY_TYPE == 'sx'?'/ferry_service/ferryController/conveyor':''
|
||||
|
||||
// 配电系统列表
|
||||
export function distributeList(params) {
|
||||
return myAxios({
|
||||
url: `${sx}/energy-effcicency-net-service/nxzdEnterprisDistributeSystemNet/list`,
|
||||
method: 'POST',
|
||||
data: params
|
||||
})
|
||||
}
|
||||
// 配电系统新增
|
||||
export function distributeAdd(params) {
|
||||
return myAxios({
|
||||
url: `${sx}/energy-effcicency-net-service/nxzdEnterprisDistributeSystemNet/add`,
|
||||
method: 'POST',
|
||||
data: params
|
||||
})
|
||||
}
|
||||
// 查询单个配电系统
|
||||
export function distributeGetInfo(id) {
|
||||
return myAxios({
|
||||
url: `${sx}/energy-effcicency-net-service/nxzdEnterprisDistributeSystemNet/getInfo`,
|
||||
method: 'GET',
|
||||
params: { id }
|
||||
})
|
||||
}
|
||||
// 修改保存配电系统
|
||||
export function distributeEdit(params) {
|
||||
return myAxios({
|
||||
url: `${sx}/energy-effcicency-net-service/nxzdEnterprisDistributeSystemNet/edit`,
|
||||
method: 'POST',
|
||||
data: params
|
||||
})
|
||||
}
|
||||
// 删除配电系统
|
||||
export function distributeRemove(ids) {
|
||||
return myAxios({
|
||||
url: `${sx}/energy-effcicency-net-service/nxzdEnterprisDistributeSystemNet/remove`,
|
||||
method: 'GET',
|
||||
params: { ids }
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 查询泵机系统分页列表
|
||||
export function pumpList(params) {
|
||||
return myAxios({
|
||||
url: `${sx}/energy-effcicency-net-service/nxzdEnterprisPumpSystemNet/list`,
|
||||
method: 'POST',
|
||||
data: params
|
||||
})
|
||||
}
|
||||
// 新增保存泵机系统
|
||||
export function pumpAdd(params) {
|
||||
return myAxios({
|
||||
url: `${sx}/energy-effcicency-net-service/nxzdEnterprisPumpSystemNet/add`,
|
||||
method: 'POST',
|
||||
data: params
|
||||
})
|
||||
}
|
||||
// 查询单个泵机系统
|
||||
export function pumpGetInfo(id) {
|
||||
return myAxios({
|
||||
url: `${sx}/energy-effcicency-net-service/nxzdEnterprisPumpSystemNet/getInfo`,
|
||||
method: 'GET',
|
||||
params: { id }
|
||||
})
|
||||
}
|
||||
// 修改保存泵机系统
|
||||
export function pumpEdit(params) {
|
||||
return myAxios({
|
||||
url: `${sx}/energy-effcicency-net-service/nxzdEnterprisPumpSystemNet/edit`,
|
||||
method: 'POST',
|
||||
data: params
|
||||
})
|
||||
}
|
||||
// 删除泵机系统
|
||||
export function pumpRemove(ids) {
|
||||
return myAxios({
|
||||
url: `${sx}/energy-effcicency-net-service/nxzdEnterprisPumpSystemNet/remove`,
|
||||
method: 'GET',
|
||||
params: { ids }
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 查询风机系统分页列表
|
||||
export function fanList(params) {
|
||||
return myAxios({
|
||||
url: `${sx}/energy-effcicency-net-service/nxzdEnterprisFanSystemNet/list`,
|
||||
method: 'POST',
|
||||
data: params
|
||||
})
|
||||
}
|
||||
// 新增保存风机系统
|
||||
export function fanAdd(params) {
|
||||
return myAxios({
|
||||
url: `${sx}/energy-effcicency-net-service/nxzdEnterprisFanSystemNet/add`,
|
||||
method: 'POST',
|
||||
data: params
|
||||
})
|
||||
}
|
||||
// 查询单个风机系统
|
||||
export function fanGetInfo(id) {
|
||||
return myAxios({
|
||||
url: `${sx}/energy-effcicency-net-service/nxzdEnterprisFanSystemNet/getInfo`,
|
||||
method: 'GET',
|
||||
params: { id }
|
||||
})
|
||||
}
|
||||
// 修改保存风机系统
|
||||
export function fanEdit(params) {
|
||||
return myAxios({
|
||||
url: `${sx}/energy-effcicency-net-service/nxzdEnterprisFanSystemNet/edit`,
|
||||
method: 'POST',
|
||||
data: params
|
||||
})
|
||||
}
|
||||
// 删除风机系统
|
||||
export function fanRemove(ids) {
|
||||
return myAxios({
|
||||
url: `${sx}/energy-effcicency-net-service/nxzdEnterprisFanSystemNet/remove`,
|
||||
method: 'GET',
|
||||
params: { ids }
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 查询空压机系统分页列表
|
||||
export function airList(params) {
|
||||
return myAxios({
|
||||
url: `${sx}/energy-effcicency-net-service/nxzdEnterprisAirSystemNet/list`,
|
||||
method: 'POST',
|
||||
data: params
|
||||
})
|
||||
}
|
||||
// 新增保存空压机系统
|
||||
export function airAdd(params) {
|
||||
return myAxios({
|
||||
url: `${sx}/energy-effcicency-net-service/nxzdEnterprisAirSystemNet/add`,
|
||||
method: 'POST',
|
||||
data: params
|
||||
})
|
||||
}
|
||||
// 查询单个空压机系统
|
||||
export function airGetInfo(id) {
|
||||
return myAxios({
|
||||
url: `${sx}/energy-effcicency-net-service/nxzdEnterprisAirSystemNet/getInfo`,
|
||||
method: 'GET',
|
||||
params: { id }
|
||||
})
|
||||
}
|
||||
// 修改保存空压机系统
|
||||
export function airEdit(params) {
|
||||
return myAxios({
|
||||
url: `${sx}/energy-effcicency-net-service/nxzdEnterprisAirSystemNet/edit`,
|
||||
method: 'POST',
|
||||
data: params
|
||||
})
|
||||
}
|
||||
// 删除空压机系统
|
||||
export function airRemove(ids) {
|
||||
return myAxios({
|
||||
url: `${sx}/energy-effcicency-net-service/nxzdEnterprisAirSystemNet/remove`,
|
||||
method: 'GET',
|
||||
params: { ids }
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// 查询单个企业基本信息与单个企业通用能源系统信息
|
||||
export function getInfoByCustomerId(customerId) {
|
||||
return myAxios({
|
||||
url: `${sx}/energy-effcicency-net-service/nxzdEnterprisSystemInfoNet/getInfoByCustomerId`,
|
||||
method: 'GET',
|
||||
params: { customerId }
|
||||
})
|
||||
}
|
||||
// 查询单个企业基本信息与单个企业通用能源系统信息
|
||||
export function getInfoByEnterpris(params) {
|
||||
return myAxios({
|
||||
url: `${sx}/energy-effcicency-net-service/nxzdEnterprisSystemInfoNet/getInfo`,
|
||||
method: 'GET',
|
||||
params: params
|
||||
})
|
||||
}
|
||||
// 根据客户id删除通用能源信息
|
||||
export function systemInfoRemove(data) {
|
||||
return myAxios({
|
||||
url: `${sx}/energy-effcicency-net-service/nxzdEnterprisSystemInfoNet/remove`,
|
||||
method: 'GET',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
// 新增保存企业基本信息与能源管理调研改造信息
|
||||
export function reformAdd(params) {
|
||||
return myAxios({
|
||||
url: `${sx}/energy-effcicency-net-service/nxzdEnterpriseReformNet/add`,
|
||||
method: 'POST',
|
||||
data: params
|
||||
})
|
||||
}
|
||||
// 查询企业基本信息与能源管理调研改造信息分页列表
|
||||
export function reformList(params) {
|
||||
return myAxios({
|
||||
url: `${sx}/energy-effcicency-net-service/nxzdEnterpriseReformNet/list`,
|
||||
method: 'POST',
|
||||
data: params
|
||||
})
|
||||
}
|
||||
// 查询单个企业基本信息与能源管理调研改造信息
|
||||
export function reformGetInfo(data) {
|
||||
return myAxios({
|
||||
url: `${sx}/energy-effcicency-net-service/nxzdEnterpriseReformNet/getInfo`,
|
||||
method: 'GET',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
// 修改保存企业基本信息与能源管理调研改造信息
|
||||
export function reformEdit(params) {
|
||||
return myAxios({
|
||||
url: `${sx}/energy-effcicency-net-service/nxzdEnterpriseReformNet/edit`,
|
||||
method: 'POST',
|
||||
data: params
|
||||
})
|
||||
}
|
||||
// 删除企业基本信息与能源管理调研改造信息
|
||||
export function reformRemove(data) {
|
||||
return myAxios({
|
||||
url: `${sx}/energy-effcicency-net-service/nxzdEnterpriseReformNet/remove`,
|
||||
method: 'GET',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
// 查询单个企业基本信息与单个企业通用能源系统信息
|
||||
export function enterprisGetInfo(data) {
|
||||
return myAxios({
|
||||
url: `${sx}/energy-effcicency-net-service/nxzdEnterprisSystemInfoNet/getInfoByCustomerId`,
|
||||
method: 'GET',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
// 新增保存企业通用能源系统信息主
|
||||
export function enterprisAdd(params) {
|
||||
return myAxios({
|
||||
url: `${sx}/energy-effcicency-net-service/nxzdEnterprisSystemInfoNet/add`,
|
||||
method: 'POST',
|
||||
data: params
|
||||
})
|
||||
}
|
||||
// 修改保存企业通用能源系统信息主
|
||||
export function enterprisEdit(params) {
|
||||
return myAxios({
|
||||
url: `${sx}/energy-effcicency-net-service/nxzdEnterprisSystemInfoNet/edit`,
|
||||
method: 'POST',
|
||||
data: params
|
||||
})
|
||||
}
|
||||
// 新增保存企业通用能源系统信息主
|
||||
export function systemInfoAdd(params) {
|
||||
return myAxios({
|
||||
url: `${sx}/energy-effcicency-net-service/nxzdEnterprisSystemInfoNet/add`,
|
||||
method: 'POST',
|
||||
data: params
|
||||
})
|
||||
}
|
||||
// 修改保存企业通用能源系统信息主
|
||||
export function systemInfoEdit(params) {
|
||||
return myAxios({
|
||||
url: `${sx}/energy-effcicency-net-service/nxzdEnterprisSystemInfoNet/edit`,
|
||||
method: 'POST',
|
||||
data: params
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user