|
|
@@ -2,6 +2,15 @@ import request from '/@/api/http/request';
|
|
|
import { getWorkspaceId } from '/@/utils/index';
|
|
|
|
|
|
// Api参数类型
|
|
|
+export type FetchDeviceFeedbackRecordListApiParams = Partial<{
|
|
|
+ begin_time: number,
|
|
|
+ end_time: number,
|
|
|
+ username: number,
|
|
|
+ search_info: string,
|
|
|
+ page: number,
|
|
|
+ page_size: number,
|
|
|
+}>;
|
|
|
+
|
|
|
export type CreateDeviceFeedbackApiParams = {
|
|
|
logs_info: string,
|
|
|
happen_time: number,
|
|
|
@@ -23,19 +32,24 @@ export type SignLoginApiParams = {
|
|
|
signature: string,
|
|
|
};
|
|
|
|
|
|
-export type FetchFeedbackRecordListApiParams = {
|
|
|
+export type FetchFeedbackRecordListApiParams = Partial<{
|
|
|
+ begin_time: number,
|
|
|
+ end_time: number,
|
|
|
+ status: number,
|
|
|
+ username: number,
|
|
|
+ search_info: string,
|
|
|
page: number,
|
|
|
page_size: number,
|
|
|
-};
|
|
|
+}>;
|
|
|
|
|
|
-export type FetchChangeRecordListApiParams = {
|
|
|
+export type FetchChangeRecordListApiParams = Partial<{
|
|
|
+ begin_time: number,
|
|
|
+ end_time: number,
|
|
|
+ device_name: string,
|
|
|
+ search_info: string,
|
|
|
page: number,
|
|
|
page_size: number,
|
|
|
- begin_time?: number, // 开始时间
|
|
|
- end_time?: number, // 结束时间
|
|
|
- device_name?: string,//设备类型
|
|
|
- logsInformation?: string,//模糊查询内容
|
|
|
-};
|
|
|
+}>;
|
|
|
|
|
|
export type FetchMediaFileListApiParams = Partial<{
|
|
|
begin_time: number,
|
|
|
@@ -87,25 +101,17 @@ export type FetchPilotPasswordApiParams = {
|
|
|
userId: string,
|
|
|
};
|
|
|
|
|
|
-export type FetchGetLogListApiParms = {
|
|
|
- begin_time: number,
|
|
|
- end_time: number,
|
|
|
- template_type: number,
|
|
|
- username: number,
|
|
|
- search_info: string,
|
|
|
- page: number,
|
|
|
- page_size: number,
|
|
|
-}
|
|
|
-
|
|
|
// Api函数类型
|
|
|
export type FetchDeviceLogListApi = (sn: string, params: { domain_list: string }) => Promise<any>;
|
|
|
+export type FetchDeviceFeedbackRecordListApi = (sn: string, params: FetchDeviceFeedbackRecordListApiParams) => Promise<any>;
|
|
|
+export type FetchDeviceLogDetailApi = (params: { logsId: string }) => Promise<any>;
|
|
|
export type CreateDeviceFeedbackApi = (sn: string, data: CreateDeviceFeedbackApiParams) => Promise<any>;
|
|
|
export type SignLoginApi = (data: SignLoginApiParams) => Promise<any>;
|
|
|
export type FetchDeviceModelApi = (params?: { flg: boolean }) => Promise<any>;
|
|
|
export type FetchDeviceStatusApi = (params: { snList: string }) => Promise<any>;
|
|
|
export type FetchPayloadListApi = () => Promise<any>;
|
|
|
export type FetchFeedbackRecordListApi = (data: FetchFeedbackRecordListApiParams) => Promise<any>;
|
|
|
-export type FetchChangeRecordListApi = (params: FetchFeedbackRecordListApiParams) => Promise<any>;
|
|
|
+export type FetchChangeRecordListApi = (params: FetchChangeRecordListApiParams) => Promise<any>;
|
|
|
export type FetchProjectListApi = () => Promise<any>;
|
|
|
export type FetchMediaFileListApi = (params: FetchMediaFileListApiParams) => Promise<any>;
|
|
|
export type BatchDownloadMediaFileApi = (params: BatchDownloadMediaFileApiParams) => Promise<any>;
|
|
|
@@ -120,7 +126,6 @@ export type FetchTrajectoryListApi = (params: FetchTrajectoryListApiParams) => P
|
|
|
export type FetchTrajectoryMapApi = (taskId: string) => Promise<any>;
|
|
|
export type AddPilotApi = (data: AddPilotApiParams) => Promise<any>;
|
|
|
export type FetchPilotPasswordApi = (params: FetchPilotPasswordApiParams) => Promise<any>;
|
|
|
-export type FetchGetLogListApi = (params: FetchGetLogListApiParms) => Promise<any>;
|
|
|
|
|
|
export const getUploadPath = () => {
|
|
|
return `api/media/api/v1/files/${getWorkspaceId()}/file/upload`;
|
|
|
@@ -132,6 +137,18 @@ const fetchDeviceLogListApi: FetchDeviceLogListApi = async (sn, params) => {
|
|
|
return res.data;
|
|
|
};
|
|
|
|
|
|
+// 获取设备异常反馈记录列表
|
|
|
+const fetchDeviceFeedbackRecordListApi: FetchDeviceFeedbackRecordListApi = async (sn, params) => {
|
|
|
+ const res = await request.get(`/manage/api/v1/workspaces/${getWorkspaceId()}/devices/${sn}/deviceSnLogsList`, { params: params });
|
|
|
+ return res.data;
|
|
|
+};
|
|
|
+
|
|
|
+// 获取设备日志详情
|
|
|
+const fetchDeviceLogDetailApi: FetchDeviceLogDetailApi = async (params) => {
|
|
|
+ const res = await request.get(`/manage/api/v1/workspaces/${getWorkspaceId()}/devices/logsDetail/`, { params: params });
|
|
|
+ return res.data;
|
|
|
+};
|
|
|
+
|
|
|
// 创建设备异常反馈
|
|
|
const createDeviceFeedbackApi: CreateDeviceFeedbackApi = async (sn, data) => {
|
|
|
const res = await request.post(`/manage/api/v1/workspaces/${getWorkspaceId()}/devices/${sn}/createLogs`, data);
|
|
|
@@ -164,7 +181,7 @@ const fetchPayloadListApi: FetchPayloadListApi = async () => {
|
|
|
|
|
|
// 获取反馈记录列表
|
|
|
const fetchFeedbackRecordListApi: FetchFeedbackRecordListApi = async (data) => {
|
|
|
- const res = await request.get('/manage/api/v1/devices', { params: data });
|
|
|
+ const res = await request.get(`/manage/api/v1/workspaces/${getWorkspaceId()}/devices/logsList`, { params: data });
|
|
|
return res.data;
|
|
|
};
|
|
|
|
|
|
@@ -271,14 +288,10 @@ const fetchPilotPasswordApi: FetchPilotPasswordApi = async (params) => {
|
|
|
return res.data;
|
|
|
};
|
|
|
|
|
|
-// 获取异常变化记录列表
|
|
|
-const fetchGetLogListApi: FetchGetLogListApi = async (params) => {
|
|
|
- const res = await request.get(`/manage/api/v1/workspaces/${getWorkspaceId()}/devices/logsList`, { params: params });
|
|
|
- return res.data;
|
|
|
-};
|
|
|
-
|
|
|
export const apis = {
|
|
|
fetchDeviceLogList: fetchDeviceLogListApi,
|
|
|
+ fetchDeviceFeedbackRecordList: fetchDeviceFeedbackRecordListApi,
|
|
|
+ fetchDeviceLogDetail: fetchDeviceLogDetailApi,
|
|
|
createDeviceFeedback: createDeviceFeedbackApi,
|
|
|
signLogin: signLoginApi,
|
|
|
fetchDeviceModel: fetchDeviceModelApi,
|
|
|
@@ -300,5 +313,4 @@ export const apis = {
|
|
|
fetchTrajectoryMap: fetchTrajectoryMapApi,
|
|
|
AddPilot: addPilotApi,
|
|
|
fetchPilotPassword: fetchPilotPasswordApi,
|
|
|
- fetchGetLogList:fetchGetLogListApi,
|
|
|
};
|