|
@@ -3,6 +3,10 @@ import request from '@/config/axios'
|
|
|
// 设备台账 VO
|
|
// 设备台账 VO
|
|
|
export interface IotDeviceVO {
|
|
export interface IotDeviceVO {
|
|
|
id: number // 主键id
|
|
id: number // 主键id
|
|
|
|
|
+ totalRunTime: number // 累计运行时长H
|
|
|
|
|
+ totalMileage: number // 累计运行里程KM
|
|
|
|
|
+ multiAttrsTotalMileage: Record<string, number> // 多属性累计运行里程KM
|
|
|
|
|
+ multiAttrsTotalRuntime: Record<string, number> // 多属性累计运行时长H
|
|
|
deviceCode: string // 资产编码
|
|
deviceCode: string // 资产编码
|
|
|
deviceName: string // 设备名称
|
|
deviceName: string // 设备名称
|
|
|
brand: number // 品牌
|
|
brand: number // 品牌
|
|
@@ -49,6 +53,9 @@ export const IotDeviceApi = {
|
|
|
getCompany: async (params: any) => {
|
|
getCompany: async (params: any) => {
|
|
|
return await request.get({ url: `/rq/iot-device/company?id=` + params })
|
|
return await request.get({ url: `/rq/iot-device/company?id=` + params })
|
|
|
},
|
|
},
|
|
|
|
|
+ getCompanyByDevice: async (params: any) => {
|
|
|
|
|
+ return await request.get({ url: `/rq/iot-device/company/` + params })
|
|
|
|
|
+ },
|
|
|
getMaxCode: async (params: any) => {
|
|
getMaxCode: async (params: any) => {
|
|
|
return await request.get({ url: `/rq/iot-device/max?yfCode=` + params })
|
|
return await request.get({ url: `/rq/iot-device/max?yfCode=` + params })
|
|
|
},
|
|
},
|
|
@@ -113,16 +120,12 @@ export const IotDeviceApi = {
|
|
|
getIotDevice: async (id: number) => {
|
|
getIotDevice: async (id: number) => {
|
|
|
return await request.get({ url: `/rq/iot-device/get?id=` + id })
|
|
return await request.get({ url: `/rq/iot-device/get?id=` + id })
|
|
|
},
|
|
},
|
|
|
|
|
+
|
|
|
getIotDeviceTds: async (id: number) => {
|
|
getIotDeviceTds: async (id: number) => {
|
|
|
- return await request.get({
|
|
|
|
|
- url: `/rq/iot-device/get/gateway/td?id=` + id
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ return await request.get({ url: `/rq/iot-device/get/gateway/td?id=` + id })
|
|
|
},
|
|
},
|
|
|
-
|
|
|
|
|
getIotDeviceZHBDTds: async (id: number) => {
|
|
getIotDeviceZHBDTds: async (id: number) => {
|
|
|
- return await request.get({
|
|
|
|
|
- url: `/rq/iot-device/get/zhbd/td?id=` + id
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ return await request.get({ url: `/rq/iot-device/get/zhbd/td?id=` + id })
|
|
|
},
|
|
},
|
|
|
// 新增设备台账
|
|
// 新增设备台账
|
|
|
createIotDevice: async (data: IotDeviceVO) => {
|
|
createIotDevice: async (data: IotDeviceVO) => {
|
|
@@ -153,15 +156,36 @@ export const IotDeviceApi = {
|
|
|
exportIotDevice: async (params) => {
|
|
exportIotDevice: async (params) => {
|
|
|
return await request.download({ url: `/rq/iot-device/export-excel`, params })
|
|
return await request.download({ url: `/rq/iot-device/export-excel`, params })
|
|
|
},
|
|
},
|
|
|
|
|
+
|
|
|
|
|
+ exportIotDeviceAdjust: async (params) => {
|
|
|
|
|
+ return await request.download({ url: `/pms/iot-device-status-log/export-excel`, params })
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ exportIotDevicePerson: async (params) => {
|
|
|
|
|
+ return await request.download({ url: `/pms/iot-device-person-log/export-excel`, params })
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ exportIotDeviceAllot: async (params) => {
|
|
|
|
|
+ return await request.download({ url: `/pms/iot-device-allot-log/export-excel`, params })
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ exportIotDeviceMainAlarm: async (params) => {
|
|
|
|
|
+ return await request.download({ url: `/pms/iot-main-work-order/exportMaintenances`, params })
|
|
|
|
|
+ },
|
|
|
getIotDeviceTdPage: async (params: any) => {
|
|
getIotDeviceTdPage: async (params: any) => {
|
|
|
return await request.get({ url: `/rq/iot-device/td/page`, params })
|
|
return await request.get({ url: `/rq/iot-device/td/page`, params })
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
- // 设备成套接口
|
|
|
|
|
|
|
+ getIotDeviceOliConnectPage: async (params: any) => {
|
|
|
|
|
+ return await request.get({ url: `/rq/iot-device/td/ly/page`, params })
|
|
|
|
|
+ },
|
|
|
|
|
|
|
|
- // 查看详情时获取成套设备列表
|
|
|
|
|
- getIotDeviceSets: async (params: any) => {
|
|
|
|
|
- return await request.get({ url: `/rq/iot-device-group-detail/page`, params })
|
|
|
|
|
|
|
+ getMonitoringQuery: async (params: any) => {
|
|
|
|
|
+ return await request.get({ url: `rq/stat/td/ly/chart`, params })
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ exportMonitoringQuery: async (params: any) => {
|
|
|
|
|
+ return await request.download({ url: `rq/ly/export`, params })
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
// 新增时根据部门id获取设备列表
|
|
// 新增时根据部门id获取设备列表
|
|
@@ -169,6 +193,28 @@ export const IotDeviceApi = {
|
|
|
return await request.get({ url: `/rq/iot-device/dept/${id}` })
|
|
return await request.get({ url: `/rq/iot-device/dept/${id}` })
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
|
|
+ // 设备总数量
|
|
|
|
|
+ getIotDeviceCount: async (params: any) => {
|
|
|
|
|
+ return await request.get({ url: `/rq/report/device/count`, params })
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ // 设备状态
|
|
|
|
|
+ getIotDeviceStatus: async (params: any) => {
|
|
|
|
|
+ return await request.get({ url: `/rq/report/device/status`, params })
|
|
|
|
|
+ },
|
|
|
|
|
+ // 分类top
|
|
|
|
|
+ getIotDeviceClassify: async (params: any) => {
|
|
|
|
|
+ return await request.get({ url: `/rq/report/device/type`, params })
|
|
|
|
|
+ },
|
|
|
|
|
+ // 列表
|
|
|
|
|
+ getIotDeviceList: async (params: any) => {
|
|
|
|
|
+ return await request.get({ url: `/rq/report/device/page`, params })
|
|
|
|
|
+ },
|
|
|
|
|
+ // 查看详情时获取成套设备列表
|
|
|
|
|
+ getIotDeviceSets: async (params: any) => {
|
|
|
|
|
+ return await request.get({ url: `/rq/iot-device-group-detail/page`, params })
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
// 获取成套列表
|
|
// 获取成套列表
|
|
|
getIotDeviceSetList: async (params: any) => {
|
|
getIotDeviceSetList: async (params: any) => {
|
|
|
return await request.get({ url: `/rq/iot-device-group/page`, params })
|
|
return await request.get({ url: `/rq/iot-device-group/page`, params })
|
|
@@ -189,5 +235,19 @@ export const IotDeviceApi = {
|
|
|
// 获取关联设备
|
|
// 获取关联设备
|
|
|
getIotDeviceSetRelation: async (params) => {
|
|
getIotDeviceSetRelation: async (params) => {
|
|
|
return await request.get({ url: `/rq/iot-device-group/device/group`, params })
|
|
return await request.get({ url: `/rq/iot-device-group/device/group`, params })
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ // 设备报表导出
|
|
|
|
|
+ exportDeviceReport: async (params) => {
|
|
|
|
|
+ return await request.download({ url: `/rq/report/export-excel`, params })
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ // 获取成套设备参数
|
|
|
|
|
+ getDeviceSetParams: async (id) => {
|
|
|
|
|
+ return await request.get({ url: `/rq/iot-device-group/td/${id}` })
|
|
|
|
|
+ },
|
|
|
|
|
+ // 获取所有设备品牌
|
|
|
|
|
+ getDeviceBrand: async () => {
|
|
|
|
|
+ return await request.get({ url: `/supplier/base/all` })
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|