黄伟杰 2 days ago
commit eeadfb2a14

@ -1,5 +1,6 @@
import request from '@/config/axios'
import qs from 'qs'
import {LocationQueryValue} from "vue-router";
// 物联设备 VO
export interface DeviceVO {
@ -166,10 +167,7 @@ export const DeviceApi = {
},
// 批量获取设备属性列表
getDeviceAttributeBatchList: async (params: {
goviewId: number | string
orgId?: number | string
}) => {
getDeviceAttributeBatchList: async (params: { deviceType: number; goviewId: string; orgId: string | null | LocationQueryValue[] }) => {
return await request.get({ url: `/iot/device/device-attribute/batchList`, params })
},
// 修改物联设备

@ -80,7 +80,7 @@ const calcPercent = (part: number, total: number) => {
const loadOverview = async () => {
try {
const res: any = await DashboardApi.getDeviceOperationalStatus({ orgId })
const res: any = await DashboardApi.getDeviceOperationalStatus({ orgId, deviceType: 2 })
const data = (res && typeof res === 'object' ? (res.data ?? res) : {}) as any
const totalDevices = Number(data.totalDevices ?? 0)

@ -399,6 +399,7 @@ const getDevicePageRows = (data: any): DeviceVO[] => {
const refreshDeviceStatusStatistics = async () => {
const ids = getDeviceIds().join(',')
const baseParams = {
deviceType: 2,
...(ids ? { ids } : {})
}
@ -492,6 +493,7 @@ const getDeviceIds = () => {
const buildParams = (startTime: string, endTime: string, pageSize = 100) => ({
ids: getDeviceIds().join(','),
deviceType: 2,
startTime,
endTime,
timelinePageNo: 1,
@ -551,6 +553,7 @@ const refreshOperationRecordRows = async () => {
const response = await DeviceOperationRecordApi.getDeviceOperationRecordPage({
pageNo: 1,
pageSize: 100,
deviceType: 2,
ids: getDeviceIds().join(','),
startTime: start,
endTime: end

@ -160,7 +160,7 @@ const getBottomLeft = (index: number) => {
const loadDeviceAttributes = async () => {
if (!goviewId) return
try {
const res = await DeviceApi.getDeviceAttributeBatchList({ goviewId, orgId })
const res = await DeviceApi.getDeviceAttributeBatchList({ goviewId, orgId, deviceType: 2 })
const list = (res && Array.isArray(res) ? res : []) as any[]
const cards: DeviceCardData[] = list.map((d: any) => {

@ -378,6 +378,7 @@ const getDeviceIds = () => {
const buildParams = (startTime: string, endTime: string, pageSize = 1000) => ({
ids: getDeviceIds().join(','),
deviceType: 2,
startTime,
endTime,
timelinePageNo: 1,

Loading…
Cancel
Save