|
|
@@ -1,7 +1,8 @@
|
|
|
import { http } from '@/utils/http/axios';
|
|
|
-import { ViewType } from '@/types/scene/constant.ts';
|
|
|
-import * as SceneTypes from '@/types/scene/type.ts';
|
|
|
import { CompanyInfoList, CompanyLayoutInfoList } from '@/types/scene-layout/type';
|
|
|
+import { ViewType } from '@/types/scene/constant';
|
|
|
+import * as SceneTypes from '@/types/scene/type';
|
|
|
+import { CompanyInfoItem } from '@/types/scene/type';
|
|
|
|
|
|
/** 获取公司-工厂-工位数据 */
|
|
|
export const getShopSpaceList = () => {
|
|
|
@@ -23,7 +24,10 @@ export const getLayoutApi = (param: { workshopId: string; viewType: ViewType })
|
|
|
|
|
|
/** 查询车间小地图布局 */
|
|
|
export const getWorkshopMiniMapLayoutApi = (workshopId: string) => {
|
|
|
- return getLayoutApi({ viewType: ViewType.minMap, workshopId }).then((res) => res[0]);
|
|
|
+ return http.request<SceneTypes.LayoutResp>({
|
|
|
+ url: `/layout/getPcWorkshopLayout?workshopId=${workshopId}`,
|
|
|
+ method: 'get',
|
|
|
+ });
|
|
|
};
|
|
|
|
|
|
/** 更新-新增小地图页面布局 */
|
|
|
@@ -38,15 +42,20 @@ export const updateLayoutApi = (data: SceneTypes.UpdateViewLayoutParam) => {
|
|
|
|
|
|
/** 更新-新增小地图页面布局 */
|
|
|
export const updateMinMapViewLayoutApi = (
|
|
|
- param: Pick<SceneTypes.UpdateViewLayoutParam, 'layout' | 'targetId'>,
|
|
|
+ param: Pick<SceneTypes.UpdateViewLayoutParam, 'layout' | 'targetId' | 'viewType'>,
|
|
|
) => {
|
|
|
- return updateLayoutApi({ viewType: ViewType.minMap, ...param });
|
|
|
+ return http.request<SceneTypes.LayoutResp[]>({
|
|
|
+ url: `/admin/minimap/updateViewLayout`,
|
|
|
+ method: 'post',
|
|
|
+ data: new URLSearchParams(param as any).toString(),
|
|
|
+ headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
|
|
|
+ });
|
|
|
};
|
|
|
|
|
|
-/** ??? */
|
|
|
-export const getCamerasByWorkSpace = (params: { workshopId: number }) => {
|
|
|
- return http.request<SceneTypes.WorkSpaceCameraRelative[]>({
|
|
|
- url: '/workshop/getWorkspaceCameraList',
|
|
|
+/** 获取车间下的相机列表 */
|
|
|
+export const getCamerasByWorkShopId = (params: { workshopId: number }) => {
|
|
|
+ return http.request<SceneTypes.GetCameraStatusByWorkshopRes>({
|
|
|
+ url: '/admin/cameraConfig/queryWorkspaceCameraList',
|
|
|
method: 'get',
|
|
|
params,
|
|
|
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
|