|
@@ -1,198 +1,50 @@
|
|
|
import { http } from '@/utils/http/axios';
|
|
import { http } from '@/utils/http/axios';
|
|
|
-
|
|
|
|
|
-/** 场景标签信息 */
|
|
|
|
|
-export type SceneLabelOrModuleItem = {
|
|
|
|
|
- /** 标签id */
|
|
|
|
|
- id: number;
|
|
|
|
|
- /** 标签代码 */
|
|
|
|
|
- code: string;
|
|
|
|
|
- /** 创建时间 */
|
|
|
|
|
- createdAt: string;
|
|
|
|
|
- /** 0-未删除,大于0-已删除 */
|
|
|
|
|
- isDeleted: number;
|
|
|
|
|
- /** 标签名称 */
|
|
|
|
|
- name: string;
|
|
|
|
|
- /** 说明 */
|
|
|
|
|
- remark: string;
|
|
|
|
|
- /** 状态: 0-正常,1-不正常 */
|
|
|
|
|
- status: number;
|
|
|
|
|
- /** 更新时间 */
|
|
|
|
|
- updatedAt: string;
|
|
|
|
|
-};
|
|
|
|
|
-
|
|
|
|
|
-/** 工位信息 */
|
|
|
|
|
-export type WorkSpaceInfoItem = {
|
|
|
|
|
- /** 工位id */
|
|
|
|
|
- id: number;
|
|
|
|
|
- /** 所属工厂id */
|
|
|
|
|
- workshopId: number;
|
|
|
|
|
- /** 工位名称 */
|
|
|
|
|
- name: string;
|
|
|
|
|
- /** 工位code */
|
|
|
|
|
- code: string;
|
|
|
|
|
- /** 工位描述 */
|
|
|
|
|
- remark: string;
|
|
|
|
|
- /** 状态: 0-启用, 1-禁用 */
|
|
|
|
|
- status: number;
|
|
|
|
|
- /** 创建时间 */
|
|
|
|
|
- createdAt: string;
|
|
|
|
|
- /** 更新时间 */
|
|
|
|
|
- updatedAt: string;
|
|
|
|
|
- /** 0-未删除,大于0-已删除 */
|
|
|
|
|
- isDeleted: number;
|
|
|
|
|
- /** 工位负责人 */
|
|
|
|
|
- principal: string;
|
|
|
|
|
- /** 排序序号 */
|
|
|
|
|
- serial: number;
|
|
|
|
|
-};
|
|
|
|
|
-
|
|
|
|
|
-/** 工厂信息 */
|
|
|
|
|
-export type WorkShopInfoItem = {
|
|
|
|
|
- /** 工厂id */
|
|
|
|
|
- id: number;
|
|
|
|
|
- /** 所属公司id */
|
|
|
|
|
- companyId: number;
|
|
|
|
|
- /** 1-生产安全 2-安全环保 */
|
|
|
|
|
- // type: number;
|
|
|
|
|
- /** 工厂名称 */
|
|
|
|
|
- name: string;
|
|
|
|
|
- /** 工厂code */
|
|
|
|
|
- code: string;
|
|
|
|
|
- /** 工厂描述 */
|
|
|
|
|
- remark: string;
|
|
|
|
|
- /** 状态: 0-启用, 1-禁用 */
|
|
|
|
|
- status: number;
|
|
|
|
|
- /** 创建时间 */
|
|
|
|
|
- createdAt: string;
|
|
|
|
|
- /** 更新时间 */
|
|
|
|
|
- updatedAt: string;
|
|
|
|
|
- /** 0-未删除,大于0-已删除 */
|
|
|
|
|
- isDeleted: number;
|
|
|
|
|
- /** 下属工位列表 */
|
|
|
|
|
- children: WorkSpaceInfoItem[];
|
|
|
|
|
- /** 场景标签 */
|
|
|
|
|
- labelName: string;
|
|
|
|
|
- /** 场景标签id */
|
|
|
|
|
- sceneLabelId: number;
|
|
|
|
|
- /** 排序序号 */
|
|
|
|
|
- serial: number;
|
|
|
|
|
- /** 车间模板 */
|
|
|
|
|
- workshopModule: SceneLabelOrModuleItem;
|
|
|
|
|
-};
|
|
|
|
|
-
|
|
|
|
|
-/** 公司信息 */
|
|
|
|
|
-export type CompanyInfoItem = {
|
|
|
|
|
- /** 公司id */
|
|
|
|
|
- id: number;
|
|
|
|
|
- /** 上级公司ID, 无上级为0 */
|
|
|
|
|
- parentId: number;
|
|
|
|
|
- /** 公司名称 */
|
|
|
|
|
- name: string;
|
|
|
|
|
- /** 公司code */
|
|
|
|
|
- code: string;
|
|
|
|
|
- /** 公司描述 */
|
|
|
|
|
- remark: string;
|
|
|
|
|
- /** 状态: 0-启用, 1-禁用 */
|
|
|
|
|
- status: number;
|
|
|
|
|
- /** 创建时间 */
|
|
|
|
|
- createdAt: string;
|
|
|
|
|
- /** 更新时间 */
|
|
|
|
|
- updatedAt: string;
|
|
|
|
|
- /** 排序序号 */
|
|
|
|
|
- serial: number;
|
|
|
|
|
- /** 0-未删除,大于0-已删除 */
|
|
|
|
|
- isDeleted: number;
|
|
|
|
|
- /** 下属工厂列表 */
|
|
|
|
|
- children: WorkShopInfoItem[];
|
|
|
|
|
- /** 场景标签列表 */
|
|
|
|
|
- labelList: SceneLabelOrModuleItem[];
|
|
|
|
|
- /** 场景模板列表 */
|
|
|
|
|
- moduleList: SceneLabelOrModuleItem[];
|
|
|
|
|
- // 模板列表信息
|
|
|
|
|
- labelModuleList: { sceneLabel: SceneLabelOrModuleItem; sceneModule: SceneLabelOrModuleItem }[];
|
|
|
|
|
-};
|
|
|
|
|
|
|
+import { ViewType } from '@/types/scene/constant.ts';
|
|
|
|
|
+import * as SceneTypes from '@/types/scene/type.ts';
|
|
|
|
|
|
|
|
/** 获取公司-工厂-工位数据 */
|
|
/** 获取公司-工厂-工位数据 */
|
|
|
export const getShopSpaceList = () => {
|
|
export const getShopSpaceList = () => {
|
|
|
- return http.request<CompanyInfoItem[]>({
|
|
|
|
|
|
|
+ return http.request<SceneTypes.CompanyInfoItem[]>({
|
|
|
url: '/scene/getList',
|
|
url: '/scene/getList',
|
|
|
method: 'get',
|
|
method: 'get',
|
|
|
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
|
|
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
|
|
|
});
|
|
});
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
-interface LayoutResp {
|
|
|
|
|
- /** 创建时间 */
|
|
|
|
|
- createdAt: string;
|
|
|
|
|
- /** 自增主键 */
|
|
|
|
|
- id: number;
|
|
|
|
|
- /** 页面布局json */
|
|
|
|
|
- layout: string;
|
|
|
|
|
- /** 目标id: 对应公司ID/车间ID */
|
|
|
|
|
- targetId: number;
|
|
|
|
|
- viewType: ViewType;
|
|
|
|
|
- integrationState?: number;
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
/** 查询地图布局 */
|
|
/** 查询地图布局 */
|
|
|
export const getLayoutApi = (param: { workshopId: string; viewType: ViewType }) => {
|
|
export const getLayoutApi = (param: { workshopId: string; viewType: ViewType }) => {
|
|
|
- return http.request<LayoutResp[]>({
|
|
|
|
|
|
|
+ return http.request<SceneTypes.LayoutResp[]>({
|
|
|
url: `/layout/getWorkshopLayout?viewType=${param.viewType}&workshopId=${param.workshopId}`,
|
|
url: `/layout/getWorkshopLayout?viewType=${param.viewType}&workshopId=${param.workshopId}`,
|
|
|
method: 'get',
|
|
method: 'get',
|
|
|
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
|
|
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
|
|
|
});
|
|
});
|
|
|
};
|
|
};
|
|
|
|
|
+
|
|
|
/** 查询车间小地图布局 */
|
|
/** 查询车间小地图布局 */
|
|
|
export const getWorkshopMiniMapLayoutApi = (workshopId: string) => {
|
|
export const getWorkshopMiniMapLayoutApi = (workshopId: string) => {
|
|
|
return getLayoutApi({ viewType: ViewType.minMap, workshopId }).then((res) => res[0]);
|
|
return getLayoutApi({ viewType: ViewType.minMap, workshopId }).then((res) => res[0]);
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
-enum ViewType {
|
|
|
|
|
- safety = 1,
|
|
|
|
|
- minMap = 2,
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-interface UpdateViewLayoutParam {
|
|
|
|
|
- layout: string;
|
|
|
|
|
- targetId: string;
|
|
|
|
|
- viewType: ViewType;
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
/** 更新-新增小地图页面布局 */
|
|
/** 更新-新增小地图页面布局 */
|
|
|
-export const updateLayoutApi = (data: UpdateViewLayoutParam) => {
|
|
|
|
|
- return http.request<LayoutResp[]>({
|
|
|
|
|
|
|
+export const updateLayoutApi = (data: SceneTypes.UpdateViewLayoutParam) => {
|
|
|
|
|
+ return http.request<SceneTypes.LayoutResp[]>({
|
|
|
url: `/layout/updateViewLayout`,
|
|
url: `/layout/updateViewLayout`,
|
|
|
method: 'post',
|
|
method: 'post',
|
|
|
data: new URLSearchParams(data as any).toString(),
|
|
data: new URLSearchParams(data as any).toString(),
|
|
|
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
|
|
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
|
|
|
});
|
|
});
|
|
|
};
|
|
};
|
|
|
|
|
+
|
|
|
/** 更新-新增小地图页面布局 */
|
|
/** 更新-新增小地图页面布局 */
|
|
|
export const updateMinMapViewLayoutApi = (
|
|
export const updateMinMapViewLayoutApi = (
|
|
|
- param: Pick<UpdateViewLayoutParam, 'layout' | 'targetId'>,
|
|
|
|
|
|
|
+ param: Pick<SceneTypes.UpdateViewLayoutParam, 'layout' | 'targetId'>,
|
|
|
) => {
|
|
) => {
|
|
|
return updateLayoutApi({ viewType: ViewType.minMap, ...param });
|
|
return updateLayoutApi({ viewType: ViewType.minMap, ...param });
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
-export type CameraItem = {
|
|
|
|
|
- /** 相机名称 */
|
|
|
|
|
- name: string;
|
|
|
|
|
- /** 相机code */
|
|
|
|
|
- code: string;
|
|
|
|
|
- /** 相机IP地址 */
|
|
|
|
|
- cameraIp: string;
|
|
|
|
|
- /** 相机描述 */
|
|
|
|
|
- remark: string;
|
|
|
|
|
- /** 状态: 0-启用, 1-禁用 */
|
|
|
|
|
- status: number;
|
|
|
|
|
- /** 推流地址 */
|
|
|
|
|
- pushstreamIp: string;
|
|
|
|
|
-};
|
|
|
|
|
-
|
|
|
|
|
-export type WorkSpaceCameraRelative = WorkSpaceInfoItem & { cameraList: CameraItem[] };
|
|
|
|
|
-
|
|
|
|
|
|
|
+/** ??? */
|
|
|
export const getCamerasByWorkSpace = (params: { workshopId: number }) => {
|
|
export const getCamerasByWorkSpace = (params: { workshopId: number }) => {
|
|
|
- return http.request<WorkSpaceCameraRelative[]>({
|
|
|
|
|
|
|
+ return http.request<SceneTypes.WorkSpaceCameraRelative[]>({
|
|
|
url: '/workshop/getWorkspaceCameraList',
|
|
url: '/workshop/getWorkspaceCameraList',
|
|
|
method: 'get',
|
|
method: 'get',
|
|
|
params,
|
|
params,
|
|
@@ -200,17 +52,8 @@ export const getCamerasByWorkSpace = (params: { workshopId: number }) => {
|
|
|
});
|
|
});
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
-/** 公司主页配置 */
|
|
|
|
|
-interface UpdateCompanyLayoutParam extends Omit<UpdateViewLayoutParam, 'targetId'> {
|
|
|
|
|
- /** 标签id */
|
|
|
|
|
- labelId: number;
|
|
|
|
|
- targetId: number;
|
|
|
|
|
- /** 更新时需要上传layout布局id */
|
|
|
|
|
- id?: number;
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
/** 新增公司主页配置 */
|
|
/** 新增公司主页配置 */
|
|
|
-export const uploadCompanyLayoutApi = (data: UpdateCompanyLayoutParam) => {
|
|
|
|
|
|
|
+export const uploadCompanyLayoutApi = (data: SceneTypes.UpdateCompanyLayoutParam) => {
|
|
|
return http.request({
|
|
return http.request({
|
|
|
url: '/homepageConfig/saveCompanyLayout',
|
|
url: '/homepageConfig/saveCompanyLayout',
|
|
|
method: 'post',
|
|
method: 'post',
|
|
@@ -218,12 +61,15 @@ export const uploadCompanyLayoutApi = (data: UpdateCompanyLayoutParam) => {
|
|
|
});
|
|
});
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
-export const uploadCompanyLayout = (param: Omit<UpdateCompanyLayoutParam, 'viewType'>) => {
|
|
|
|
|
|
|
+/** ??? */
|
|
|
|
|
+export const uploadCompanyLayout = (
|
|
|
|
|
+ param: Omit<SceneTypes.UpdateCompanyLayoutParam, 'viewType'>,
|
|
|
|
|
+) => {
|
|
|
return uploadCompanyLayoutApi({ ...param, viewType: ViewType.safety });
|
|
return uploadCompanyLayoutApi({ ...param, viewType: ViewType.safety });
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
/** 更新公司主页配置 */
|
|
/** 更新公司主页配置 */
|
|
|
-export const updateCompanyLayoutApi = (data: UpdateCompanyLayoutParam) => {
|
|
|
|
|
|
|
+export const updateCompanyLayoutApi = (data: SceneTypes.UpdateCompanyLayoutParam) => {
|
|
|
return http.request({
|
|
return http.request({
|
|
|
url: '/homepageConfig/updateCompanyLayout',
|
|
url: '/homepageConfig/updateCompanyLayout',
|
|
|
method: 'put',
|
|
method: 'put',
|
|
@@ -231,7 +77,10 @@ export const updateCompanyLayoutApi = (data: UpdateCompanyLayoutParam) => {
|
|
|
});
|
|
});
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
-export const updateCompanyLayout = (param: Omit<UpdateCompanyLayoutParam, 'viewType'>) => {
|
|
|
|
|
|
|
+/** ??? */
|
|
|
|
|
+export const updateCompanyLayout = (
|
|
|
|
|
+ param: Omit<SceneTypes.UpdateCompanyLayoutParam, 'viewType'>,
|
|
|
|
|
+) => {
|
|
|
return updateCompanyLayoutApi({ ...param, viewType: ViewType.safety });
|
|
return updateCompanyLayoutApi({ ...param, viewType: ViewType.safety });
|
|
|
};
|
|
};
|
|
|
|
|
|
|
@@ -269,3 +118,213 @@ export const delCompanyLayout = (params: number) => {
|
|
|
method: 'delete',
|
|
method: 'delete',
|
|
|
});
|
|
});
|
|
|
};
|
|
};
|
|
|
|
|
+
|
|
|
|
|
+/**
|
|
|
|
|
+ * @description: 添加公司
|
|
|
|
|
+ */
|
|
|
|
|
+export const addCompany = (data: SceneTypes.ComAddDatas): Promise<number> => {
|
|
|
|
|
+ return http.request({
|
|
|
|
|
+ url: '/scene/saveCompany',
|
|
|
|
|
+ method: 'post',
|
|
|
|
|
+ data,
|
|
|
|
|
+ });
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
|
|
+/**
|
|
|
|
|
+ * @description: 编辑公司
|
|
|
|
|
+ */
|
|
|
|
|
+export const editCompany = (data: SceneTypes.ComAddDatas): Promise<number> => {
|
|
|
|
|
+ return http.request({
|
|
|
|
|
+ url: '/scene/updateCompany',
|
|
|
|
|
+ method: 'put',
|
|
|
|
|
+ data,
|
|
|
|
|
+ });
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
|
|
+/**
|
|
|
|
|
+ * @description: 删除公司
|
|
|
|
|
+ */
|
|
|
|
|
+export const delCompany = (companyId: number) => {
|
|
|
|
|
+ return http.request({
|
|
|
|
|
+ url: `/scene/deleteCompany?companyId=${companyId}`,
|
|
|
|
|
+ method: 'DELETE',
|
|
|
|
|
+ });
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
|
|
+/**
|
|
|
|
|
+ * @description: 添加车间
|
|
|
|
|
+ */
|
|
|
|
|
+export const addWorkshop = (data: SceneTypes.WorkshopAddDatas): Promise<number> => {
|
|
|
|
|
+ return http.request({
|
|
|
|
|
+ url: '/scene/saveWorkshop',
|
|
|
|
|
+ method: 'post',
|
|
|
|
|
+ data,
|
|
|
|
|
+ });
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
|
|
+/**
|
|
|
|
|
+ * @description: 编辑车间
|
|
|
|
|
+ */
|
|
|
|
|
+export const editWorkshop = (data: SceneTypes.WorkshopAddDatas): Promise<number> => {
|
|
|
|
|
+ return http.request({
|
|
|
|
|
+ url: '/scene/updateWorkshop',
|
|
|
|
|
+ method: 'put',
|
|
|
|
|
+ data,
|
|
|
|
|
+ });
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
|
|
+/**
|
|
|
|
|
+ * @description: 删除车间
|
|
|
|
|
+ */
|
|
|
|
|
+export const delWorkshop = (workshopId: number) => {
|
|
|
|
|
+ return http.request({
|
|
|
|
|
+ url: `/scene/deleteWorkshop?workshopId=${workshopId}`,
|
|
|
|
|
+ method: 'DELETE',
|
|
|
|
|
+ });
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
|
|
+/**
|
|
|
|
|
+ * @description: 添加工位
|
|
|
|
|
+ */
|
|
|
|
|
+export const addWorkspace = (data: SceneTypes.WorkspaceAddDatas): Promise<number> => {
|
|
|
|
|
+ return http.request({
|
|
|
|
|
+ url: '/scene/saveWorkspace',
|
|
|
|
|
+ method: 'post',
|
|
|
|
|
+ data,
|
|
|
|
|
+ });
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
|
|
+/**
|
|
|
|
|
+ * @description: 编辑工位
|
|
|
|
|
+ */
|
|
|
|
|
+export const editWorkspace = (data: SceneTypes.WorkspaceAddDatas): Promise<number> => {
|
|
|
|
|
+ return http.request({
|
|
|
|
|
+ url: '/scene/updateWorkspace',
|
|
|
|
|
+ method: 'put',
|
|
|
|
|
+ data,
|
|
|
|
|
+ });
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
|
|
+/**
|
|
|
|
|
+ * @description: 删除工位
|
|
|
|
|
+ */
|
|
|
|
|
+export const delWorkspace = (workspaceId: number) => {
|
|
|
|
|
+ return http.request({
|
|
|
|
|
+ url: `/scene/deleteWorkspace?workspaceId=${workspaceId}`,
|
|
|
|
|
+ method: 'DELETE',
|
|
|
|
|
+ });
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
|
|
+/** ??? */
|
|
|
|
|
+export const getSceneList = (
|
|
|
|
|
+ skipPerm: boolean = true,
|
|
|
|
|
+): Promise<
|
|
|
|
|
+ SceneTypes.SceneListType<
|
|
|
|
|
+ SceneTypes.GetListWorkshop<SceneTypes.WorkspaceAddDatas, SceneTypes.WorkShopTempleteType>,
|
|
|
|
|
+ SceneTypes.LabelModuleListType
|
|
|
|
|
+ >[]
|
|
|
|
|
+> => {
|
|
|
|
|
+ return http.request({
|
|
|
|
|
+ url: `/scene/getList?skipPerm=${skipPerm}`,
|
|
|
|
|
+ method: 'get',
|
|
|
|
|
+ });
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
|
|
+//排序列表
|
|
|
|
|
+export const sortSceneList = (
|
|
|
|
|
+ data: SceneTypes.SceneListType<
|
|
|
|
|
+ SceneTypes.GetListWorkshop<SceneTypes.WorkspaceAddDatas, SceneTypes.WorkShopTempleteType>,
|
|
|
|
|
+ SceneTypes.LabelModuleListType
|
|
|
|
|
+ >[],
|
|
|
|
|
+) => {
|
|
|
|
|
+ return http.request({
|
|
|
|
|
+ url: '/scene/updateSort',
|
|
|
|
|
+ method: 'put',
|
|
|
|
|
+ data,
|
|
|
|
|
+ });
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
|
|
+/** ??? */
|
|
|
|
|
+export const getCompanyList = (): Promise<SceneTypes.CompanyType[]> => {
|
|
|
|
|
+ return http.request({
|
|
|
|
|
+ url: '/relationship/getEnterpriseList',
|
|
|
|
|
+ method: 'get',
|
|
|
|
|
+ });
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
|
|
+/** ??? */
|
|
|
|
|
+export const changeRelate = (data: SceneTypes.InputType) => {
|
|
|
|
|
+ return http.request({
|
|
|
|
|
+ url: '/relationship/addEnterpriseRel',
|
|
|
|
|
+ method: 'put',
|
|
|
|
|
+ data,
|
|
|
|
|
+ });
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
|
|
+/** ??? */
|
|
|
|
|
+export const querySceneLabel = (): Promise<SceneTypes.SceneLabelType[]> => {
|
|
|
|
|
+ return http.request({
|
|
|
|
|
+ url: '/template/getSceneLabelList',
|
|
|
|
|
+ method: 'get',
|
|
|
|
|
+ });
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
|
|
+/** ??? */
|
|
|
|
|
+export const querytemplate = (): Promise<SceneTypes.TemplateType[]> => {
|
|
|
|
|
+ return http.request({
|
|
|
|
|
+ url: '/template/getSceneModuleList',
|
|
|
|
|
+ method: 'get',
|
|
|
|
|
+ });
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
|
|
+/** ??? */
|
|
|
|
|
+export const queryWorkshopModule = (): Promise<SceneTypes.WorkshopModuleType[]> => {
|
|
|
|
|
+ return http.request({
|
|
|
|
|
+ url: '/template/getWorkshopModuleList',
|
|
|
|
|
+ method: 'get',
|
|
|
|
|
+ });
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
|
|
+/** ??? */
|
|
|
|
|
+export const querySceneLabelByCompany = (): Promise<SceneTypes.SceneLabelByCompanyType[]> => {
|
|
|
|
|
+ return http.request({
|
|
|
|
|
+ url: '/template/findSceneLabelByCompany',
|
|
|
|
|
+ method: 'get',
|
|
|
|
|
+ });
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
|
|
+/** ??? */
|
|
|
|
|
+export const addCompanyModuleLabel = (data: SceneTypes.SceneTempleteType[]) => {
|
|
|
|
|
+ return http.request({
|
|
|
|
|
+ url: '/template/saveCompanyModuleLabelRel',
|
|
|
|
|
+ method: 'post',
|
|
|
|
|
+ data,
|
|
|
|
|
+ });
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
|
|
+//编辑公司-场景标签-场景模板关系
|
|
|
|
|
+export const editCompanyModuleLabel = (data: SceneTypes.SceneTempleteType[]) => {
|
|
|
|
|
+ return http.request({
|
|
|
|
|
+ url: '/template/updateCompanyModuleLabelRel',
|
|
|
|
|
+ method: 'post',
|
|
|
|
|
+ data,
|
|
|
|
|
+ });
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
|
|
+/** ??? */
|
|
|
|
|
+export const addWorkshopModuleLabel = (data: SceneTypes.WorkShopTempleteType) => {
|
|
|
|
|
+ return http.request({
|
|
|
|
|
+ url: '/template/saveWorkshopModuleRel',
|
|
|
|
|
+ method: 'post',
|
|
|
|
|
+ data,
|
|
|
|
|
+ });
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
|
|
+/** ??? */
|
|
|
|
|
+export const editWorkshopModuleLabel = (data: SceneTypes.WorkShopTempleteType) => {
|
|
|
|
|
+ return http.request({
|
|
|
|
|
+ url: '/template/updateWorkshopModuleRel',
|
|
|
|
|
+ method: 'post',
|
|
|
|
|
+ data,
|
|
|
|
|
+ });
|
|
|
|
|
+};
|