xq fix:"重新修改了逆变器列表、项目列表"
This commit is contained in:
70
src/api/business/inverter/index.ts
Normal file
70
src/api/business/inverter/index.ts
Normal file
@ -0,0 +1,70 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { InverterVO, InverterForm, InverterQuery } from '@/api/business/inverter/types';
|
||||
|
||||
/**
|
||||
* 查询逆变器列列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listInverter = (query?: InverterQuery): AxiosPromise<InverterVO[]> => {
|
||||
return request({
|
||||
url: '/business/inverter/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询逆变器列详细
|
||||
* @param id
|
||||
*/
|
||||
export const getInverter = (id: string | number): AxiosPromise<InverterVO> => {
|
||||
return request({
|
||||
url: '/business/inverter/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增逆变器列
|
||||
* @param data
|
||||
*/
|
||||
export const addInverter = (data: InverterForm) => {
|
||||
return request({
|
||||
url: '/business/inverter',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改逆变器列
|
||||
* @param data
|
||||
*/
|
||||
export const updateInverter = (data: InverterForm) => {
|
||||
return request({
|
||||
url: '/business/inverter',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除逆变器列
|
||||
* @param id
|
||||
*/
|
||||
export const delInverter = (id: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/business/inverter/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
||||
|
||||
export const getAll = () => {
|
||||
return request({
|
||||
url: '/business/project/all',
|
||||
method: 'get'
|
||||
});
|
||||
};
|
509
src/api/business/inverter/types.ts
Normal file
509
src/api/business/inverter/types.ts
Normal file
@ -0,0 +1,509 @@
|
||||
export interface InverterVO {
|
||||
/**
|
||||
* 逆变器id
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 逆变器SN
|
||||
*/
|
||||
sn: string;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
projectId: string | number;
|
||||
|
||||
/**
|
||||
* 电站id
|
||||
*/
|
||||
stationid: string | number;
|
||||
|
||||
/**
|
||||
* 电站名称
|
||||
*/
|
||||
stationname: string;
|
||||
|
||||
/**
|
||||
* 业主id
|
||||
*/
|
||||
userid: string | number;
|
||||
|
||||
/**
|
||||
* 装机容量
|
||||
*/
|
||||
power: string;
|
||||
|
||||
/**
|
||||
* 装机容量单位
|
||||
*/
|
||||
powerstr: string;
|
||||
|
||||
/**
|
||||
* 当日能量
|
||||
*/
|
||||
etoday: string;
|
||||
|
||||
/**
|
||||
* 当日发电量原始值
|
||||
*/
|
||||
etoday1: string;
|
||||
|
||||
/**
|
||||
* 当日能量单位
|
||||
*/
|
||||
etodaystr: string;
|
||||
|
||||
/**
|
||||
* 总电量
|
||||
*/
|
||||
etotal: string;
|
||||
|
||||
/**
|
||||
* 累计发电量原始值
|
||||
*/
|
||||
etotal1: string;
|
||||
|
||||
/**
|
||||
* 总能量单位
|
||||
*/
|
||||
etotalstr: string;
|
||||
|
||||
/**
|
||||
* 满发小时数
|
||||
*/
|
||||
fullhour: string;
|
||||
|
||||
/**
|
||||
* 功率
|
||||
*/
|
||||
pac: string;
|
||||
|
||||
/**
|
||||
* 功率单位
|
||||
*/
|
||||
pacstr: string;
|
||||
|
||||
/**
|
||||
* 逆变器状态:
|
||||
1 = 在线
|
||||
2 = 离线
|
||||
3 = 报警
|
||||
*/
|
||||
state: number;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
datatimestamp: number;
|
||||
|
||||
/**
|
||||
* 采集器SN
|
||||
*/
|
||||
collectorsn: string;
|
||||
|
||||
/**
|
||||
* 逆变器类型
|
||||
*/
|
||||
productmodel: string;
|
||||
|
||||
/**
|
||||
* 直流输入路数:值+1 = 实际路数
|
||||
如:值0 = 1路,值1 = 2路,值2 = 3路…
|
||||
*/
|
||||
dcinputtype: number;
|
||||
|
||||
/**
|
||||
* 交流输出类:0 = 单相,其他 = 三相
|
||||
*/
|
||||
acoutputtype: number;
|
||||
|
||||
/**
|
||||
* 逆变器系列
|
||||
*/
|
||||
series: string;
|
||||
|
||||
/**
|
||||
* 逆变器名称
|
||||
*/
|
||||
name: string;
|
||||
|
||||
/**
|
||||
* 电站地址
|
||||
*/
|
||||
addr: string;
|
||||
|
||||
/**
|
||||
* 采集器状态
|
||||
*/
|
||||
collectorstate: number;
|
||||
|
||||
/**
|
||||
* 逆变器离线状态:
|
||||
0 = 正常离线
|
||||
1 = 异常离线
|
||||
*/
|
||||
stateexceptionflag: number;
|
||||
|
||||
/**
|
||||
* 累计满发小时数
|
||||
*/
|
||||
totalfullhour: string;
|
||||
|
||||
/**
|
||||
* 逆变器电表类型,详见附录3
|
||||
*/
|
||||
invertermetermodel: number;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
createdate: number;
|
||||
|
||||
/**
|
||||
* 质保结束时间
|
||||
*/
|
||||
updateshelfendtime: number;
|
||||
|
||||
}
|
||||
|
||||
export interface InverterForm extends BaseEntity {
|
||||
/**
|
||||
* 逆变器id
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 逆变器SN
|
||||
*/
|
||||
sn?: string;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
projectId?: string | number;
|
||||
|
||||
/**
|
||||
* 电站id
|
||||
*/
|
||||
stationid?: string | number;
|
||||
|
||||
/**
|
||||
* 电站名称
|
||||
*/
|
||||
stationname?: string;
|
||||
|
||||
/**
|
||||
* 业主id
|
||||
*/
|
||||
userid?: string | number;
|
||||
|
||||
/**
|
||||
* 装机容量
|
||||
*/
|
||||
power?: string;
|
||||
|
||||
/**
|
||||
* 装机容量单位
|
||||
*/
|
||||
powerstr?: string;
|
||||
|
||||
/**
|
||||
* 当日能量
|
||||
*/
|
||||
etoday?: string;
|
||||
|
||||
/**
|
||||
* 当日发电量原始值
|
||||
*/
|
||||
etoday1?: string;
|
||||
|
||||
/**
|
||||
* 当日能量单位
|
||||
*/
|
||||
etodaystr?: string;
|
||||
|
||||
/**
|
||||
* 总电量
|
||||
*/
|
||||
etotal?: string;
|
||||
|
||||
/**
|
||||
* 累计发电量原始值
|
||||
*/
|
||||
etotal1?: string;
|
||||
|
||||
/**
|
||||
* 总能量单位
|
||||
*/
|
||||
etotalstr?: string;
|
||||
|
||||
/**
|
||||
* 满发小时数
|
||||
*/
|
||||
fullhour?: string;
|
||||
|
||||
/**
|
||||
* 功率
|
||||
*/
|
||||
pac?: string;
|
||||
|
||||
/**
|
||||
* 功率单位
|
||||
*/
|
||||
pacstr?: string;
|
||||
|
||||
/**
|
||||
* 逆变器状态:
|
||||
1 = 在线
|
||||
2 = 离线
|
||||
3 = 报警
|
||||
*/
|
||||
state?: number;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
datatimestamp?: number;
|
||||
|
||||
/**
|
||||
* 采集器SN
|
||||
*/
|
||||
collectorsn?: string;
|
||||
|
||||
/**
|
||||
* 逆变器类型
|
||||
*/
|
||||
productmodel?: string;
|
||||
|
||||
/**
|
||||
* 直流输入路数:值+1 = 实际路数
|
||||
如:值0 = 1路,值1 = 2路,值2 = 3路…
|
||||
*/
|
||||
dcinputtype?: number;
|
||||
|
||||
/**
|
||||
* 交流输出类:0 = 单相,其他 = 三相
|
||||
*/
|
||||
acoutputtype?: number;
|
||||
|
||||
/**
|
||||
* 逆变器系列
|
||||
*/
|
||||
series?: string;
|
||||
|
||||
/**
|
||||
* 逆变器名称
|
||||
*/
|
||||
name?: string;
|
||||
|
||||
/**
|
||||
* 电站地址
|
||||
*/
|
||||
addr?: string;
|
||||
|
||||
/**
|
||||
* 采集器状态
|
||||
*/
|
||||
collectorstate?: number;
|
||||
|
||||
/**
|
||||
* 逆变器离线状态:
|
||||
0 = 正常离线
|
||||
1 = 异常离线
|
||||
*/
|
||||
stateexceptionflag?: number;
|
||||
|
||||
/**
|
||||
* 累计满发小时数
|
||||
*/
|
||||
totalfullhour?: string;
|
||||
|
||||
/**
|
||||
* 逆变器电表类型,详见附录3
|
||||
*/
|
||||
invertermetermodel?: number;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
createdate?: number;
|
||||
|
||||
/**
|
||||
* 质保结束时间
|
||||
*/
|
||||
updateshelfendtime?: number;
|
||||
|
||||
}
|
||||
|
||||
export interface InverterQuery extends PageQuery {
|
||||
|
||||
/**
|
||||
* 逆变器SN
|
||||
*/
|
||||
sn?: string;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
projectId?: string | number;
|
||||
|
||||
/**
|
||||
* 电站id
|
||||
*/
|
||||
stationid?: string | number;
|
||||
|
||||
/**
|
||||
* 电站名称
|
||||
*/
|
||||
stationname?: string;
|
||||
|
||||
/**
|
||||
* 业主id
|
||||
*/
|
||||
userid?: string | number;
|
||||
|
||||
/**
|
||||
* 装机容量
|
||||
*/
|
||||
power?: string;
|
||||
|
||||
/**
|
||||
* 装机容量单位
|
||||
*/
|
||||
powerstr?: string;
|
||||
|
||||
/**
|
||||
* 当日能量
|
||||
*/
|
||||
etoday?: string;
|
||||
|
||||
/**
|
||||
* 当日发电量原始值
|
||||
*/
|
||||
etoday1?: string;
|
||||
|
||||
/**
|
||||
* 当日能量单位
|
||||
*/
|
||||
etodaystr?: string;
|
||||
|
||||
/**
|
||||
* 总电量
|
||||
*/
|
||||
etotal?: string;
|
||||
|
||||
/**
|
||||
* 累计发电量原始值
|
||||
*/
|
||||
etotal1?: string;
|
||||
|
||||
/**
|
||||
* 总能量单位
|
||||
*/
|
||||
etotalstr?: string;
|
||||
|
||||
/**
|
||||
* 满发小时数
|
||||
*/
|
||||
fullhour?: string;
|
||||
|
||||
/**
|
||||
* 功率
|
||||
*/
|
||||
pac?: string;
|
||||
|
||||
/**
|
||||
* 功率单位
|
||||
*/
|
||||
pacstr?: string;
|
||||
|
||||
/**
|
||||
* 逆变器状态:
|
||||
1 = 在线
|
||||
2 = 离线
|
||||
3 = 报警
|
||||
*/
|
||||
state?: number;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
datatimestamp?: number;
|
||||
|
||||
/**
|
||||
* 采集器SN
|
||||
*/
|
||||
collectorsn?: string;
|
||||
|
||||
/**
|
||||
* 逆变器类型
|
||||
*/
|
||||
productmodel?: string;
|
||||
|
||||
/**
|
||||
* 直流输入路数:值+1 = 实际路数
|
||||
如:值0 = 1路,值1 = 2路,值2 = 3路…
|
||||
*/
|
||||
dcinputtype?: number;
|
||||
|
||||
/**
|
||||
* 交流输出类:0 = 单相,其他 = 三相
|
||||
*/
|
||||
acoutputtype?: number;
|
||||
|
||||
/**
|
||||
* 逆变器系列
|
||||
*/
|
||||
series?: string;
|
||||
|
||||
/**
|
||||
* 逆变器名称
|
||||
*/
|
||||
name?: string;
|
||||
|
||||
/**
|
||||
* 电站地址
|
||||
*/
|
||||
addr?: string;
|
||||
|
||||
/**
|
||||
* 采集器状态
|
||||
*/
|
||||
collectorstate?: number;
|
||||
|
||||
/**
|
||||
* 逆变器离线状态:
|
||||
0 = 正常离线
|
||||
1 = 异常离线
|
||||
*/
|
||||
stateexceptionflag?: number;
|
||||
|
||||
/**
|
||||
* 累计满发小时数
|
||||
*/
|
||||
totalfullhour?: string;
|
||||
|
||||
/**
|
||||
* 逆变器电表类型,详见附录3
|
||||
*/
|
||||
invertermetermodel?: number;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
createdate?: number;
|
||||
|
||||
/**
|
||||
* 质保结束时间
|
||||
*/
|
||||
updateshelfendtime?: number;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
||||
|
||||
|
||||
|
@ -62,9 +62,9 @@ export const delNbq = (nbqId: string | number | Array<string | number>) => {
|
||||
});
|
||||
};
|
||||
|
||||
export const getAll = () => {
|
||||
return request({
|
||||
url: '/business/nbq/listNotPage',
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
// export const getAll = () => {
|
||||
// return request({
|
||||
// url: '/business/nbq/all',
|
||||
// method: 'get'
|
||||
// });
|
||||
// };
|
||||
|
63
src/api/business/project/index.ts
Normal file
63
src/api/business/project/index.ts
Normal file
@ -0,0 +1,63 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { ProjectVO, ProjectForm, ProjectQuery } from '@/api/business/project/types';
|
||||
|
||||
/**
|
||||
* 查询项目列列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listProject = (query?: ProjectQuery): AxiosPromise<ProjectVO[]> => {
|
||||
return request({
|
||||
url: '/business/project/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询项目列详细
|
||||
* @param projectId
|
||||
*/
|
||||
export const getProject = (projectId: string | number): AxiosPromise<ProjectVO> => {
|
||||
return request({
|
||||
url: '/business/project/' + projectId,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增项目列
|
||||
* @param data
|
||||
*/
|
||||
export const addProject = (data: ProjectForm) => {
|
||||
return request({
|
||||
url: '/business/project',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改项目列
|
||||
* @param data
|
||||
*/
|
||||
export const updateProject = (data: ProjectForm) => {
|
||||
return request({
|
||||
url: '/business/project',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除项目列
|
||||
* @param projectId
|
||||
*/
|
||||
export const delProject = (projectId: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/business/project/' + projectId,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
126
src/api/business/project/types.ts
Normal file
126
src/api/business/project/types.ts
Normal file
@ -0,0 +1,126 @@
|
||||
export interface ProjectVO {
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
projectId: string | number;
|
||||
|
||||
/**
|
||||
* 项目简介
|
||||
*/
|
||||
projectBrief: string;
|
||||
|
||||
/**
|
||||
* 项目地址
|
||||
*/
|
||||
address: string;
|
||||
|
||||
/**
|
||||
* 项目负责人
|
||||
*/
|
||||
projectLeader: string;
|
||||
|
||||
/**
|
||||
* 负责人电话
|
||||
*/
|
||||
telephone: string;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
state: string;
|
||||
|
||||
/**
|
||||
* 项目类型(字典)
|
||||
*/
|
||||
type: string;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark: string;
|
||||
|
||||
}
|
||||
|
||||
export interface ProjectForm extends BaseEntity {
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
projectId?: string | number;
|
||||
|
||||
/**
|
||||
* 项目简介
|
||||
*/
|
||||
projectBrief?: string;
|
||||
|
||||
/**
|
||||
* 项目地址
|
||||
*/
|
||||
address?: string;
|
||||
|
||||
/**
|
||||
* 项目负责人
|
||||
*/
|
||||
projectLeader?: string;
|
||||
|
||||
/**
|
||||
* 负责人电话
|
||||
*/
|
||||
telephone?: string;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
state?: string;
|
||||
|
||||
/**
|
||||
* 项目类型(字典)
|
||||
*/
|
||||
type?: string;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark?: string;
|
||||
|
||||
}
|
||||
|
||||
export interface ProjectQuery extends PageQuery {
|
||||
|
||||
/**
|
||||
* 项目简介
|
||||
*/
|
||||
projectBrief?: string;
|
||||
|
||||
/**
|
||||
* 项目地址
|
||||
*/
|
||||
address?: string;
|
||||
|
||||
/**
|
||||
* 项目负责人
|
||||
*/
|
||||
projectLeader?: string;
|
||||
|
||||
/**
|
||||
* 负责人电话
|
||||
*/
|
||||
telephone?: string;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
state?: string;
|
||||
|
||||
/**
|
||||
* 项目类型(字典)
|
||||
*/
|
||||
type?: string;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user