Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
44
src/api/tunnelScene.js
Normal file
44
src/api/tunnelScene.js
Normal file
@@ -0,0 +1,44 @@
|
||||
import request from "@/utils/request.js";
|
||||
|
||||
// 设备类型
|
||||
export const getEquipmentType = () => {
|
||||
return request({
|
||||
url: "/tunnel/model/equipment/type/option",
|
||||
method: "get",
|
||||
});
|
||||
};
|
||||
// 获取设备
|
||||
export const getEquipment = (tunnelId, typeKey, equipmentIds = "1") => {
|
||||
return request({
|
||||
url: "/tunnel/model/equipment/option",
|
||||
method: "post",
|
||||
params: {
|
||||
tunnelId,
|
||||
typeKey,
|
||||
equipmentIds,
|
||||
},
|
||||
});
|
||||
};
|
||||
// 初始化数据
|
||||
export const initSceneData = (tunnelId) => {
|
||||
return request({
|
||||
url: `/tunnel/model/${tunnelId}`,
|
||||
method: "get",
|
||||
});
|
||||
};
|
||||
// 添加设备
|
||||
export const saveEquipment = (
|
||||
constructionLength,
|
||||
tunnelId,
|
||||
tunnelThreeConfig
|
||||
) => {
|
||||
return request({
|
||||
url: "/tunnel/model",
|
||||
method: "put",
|
||||
data: {
|
||||
constructionLength,
|
||||
tunnelId,
|
||||
tunnelThreeConfig,
|
||||
},
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user