diff --git a/src/api/device/instance.ts b/src/api/device/instance.ts index 0465df68..562118ac 100644 --- a/src/api/device/instance.ts +++ b/src/api/device/instance.ts @@ -174,4 +174,46 @@ export const delTags = (deviceId: string, id: string) => server.remove(`/device/ * @param deviceId 设备id * @returns */ -export const configurationReset = (deviceId: string) => server.put(`/device-instance/${deviceId}/configuration/_reset`) \ No newline at end of file +export const configurationReset = (deviceId: string) => server.put(`/device-instance/${deviceId}/configuration/_reset`) + +/** + * 查询事件详情列表 + * @param deviceId 设备id + * @param eventId 事件id + * @param data + * @returns + */ +export const getEventList = (deviceId: string, eventId: string, data: Record) => server.post(`/device-instance/${deviceId}/event/${eventId}?format=true`, data) + +/** + * 设置属性至设备 + * @param deviceId 设备id + * @param data + * @returns + */ +export const setProperty = (deviceId: string, data: Record) => server.put(`/device-instance/${deviceId}/property`, data) + +/** + * 获取最新属性值 + * @param deviceId 设备id + * @param type 属性id + * @returns + */ +export const getProperty = (deviceId: string, type: string) => server.get(`/device/standard/${deviceId}/property/${type}`) + +/** + * 查询设备的物模型指标 + * @param deviceId 设备id + * @param propertyId 属性id + * @returns + */ +export const queryMetric = (deviceId: string, propertyId: string) => server.get(`/device-instance/${deviceId}/metric/property/${propertyId}`) + +/** + * 保存设备的物模型指标 + * @param deviceId 设备id + * @param propertyId 属性id + * @param data + * @returns + */ +export const saveMetric = (deviceId: string, propertyId: string, data: Record) => server.patch(`/device-instance/${deviceId}/metric/property/${propertyId}`, data) diff --git a/src/api/iot-card/platform.ts b/src/api/iot-card/platform.ts new file mode 100644 index 00000000..89b84490 --- /dev/null +++ b/src/api/iot-card/platform.ts @@ -0,0 +1,31 @@ +import server from '@/utils/request' + +/** + * 分页查询平台接入列表 + * @param data + */ +export const queryList = (data: any) => server.post(`/network/card/platform/_query`, data) + +/** + * 根据id查询详情 + * @param id + */ +export const queryById = (id: any) => server.get(`/network/card/platform/${id}`) + +/** + * 新增 + * @param data + */ +export const save = (data: any) => server.post(`/network/card/platform`, data) + +/** + * 编辑 + * @param data + */ +export const update = (data: any) => server.patch(`/network/card/platform`, data) + +/** + * 删除 + * @param id + */ +export const del = (id: string) => server.remove(`/network/card/platform/${id}`) \ No newline at end of file diff --git a/src/api/iot-card/record.ts b/src/api/iot-card/record.ts new file mode 100644 index 00000000..45414c5f --- /dev/null +++ b/src/api/iot-card/record.ts @@ -0,0 +1,7 @@ +import server from '@/utils/request' + +/** + * 分页查询操作记录列表 + * @param data + */ +export const queryList = (data: any) => server.post(`/network/card/stateOperate/_log`, data) \ No newline at end of file diff --git a/src/api/media/dashboard.ts b/src/api/media/dashboard.ts index 9e8a2e40..e55ae9a0 100644 --- a/src/api/media/dashboard.ts +++ b/src/api/media/dashboard.ts @@ -6,5 +6,6 @@ export default { agg: () => server.get(`/media/record/file/agg`), // 播放中数量 aggPlaying: () => server.get(`/media/channel/playing/agg`), - + // 获取播放数量(人次) + getPlayCount: (data: any) => server.post(`/dashboard/_multi`, data), } \ No newline at end of file diff --git a/src/api/media/home.ts b/src/api/media/home.ts index 8385fd80..131f9745 100644 --- a/src/api/media/home.ts +++ b/src/api/media/home.ts @@ -2,8 +2,8 @@ import server from '@/utils/request' export default { // 设备数量 - deviceCount: () => server.get(`/media/device/_count`), + deviceCount: (params: any) => server.get(`/media/device/_count`, params), // 通道数量 - channelCount: () => server.post(`/media/channel/_count`), + channelCount: (data: any) => server.post(`/media/channel/_count`, data), } \ No newline at end of file diff --git a/src/components/PermissionButton/index.vue b/src/components/PermissionButton/index.vue index 9ec5b437..f8d0e739 100644 --- a/src/components/PermissionButton/index.vue +++ b/src/components/PermissionButton/index.vue @@ -4,14 +4,14 @@ - + - +