举牌验收+BIM WebGL显示
parent
cff600a3b7
commit
8b6f89bf8f
|
@ -27,11 +27,12 @@
|
|||
<script src="/cdn/echarts/echarts.min.js"></script>
|
||||
<script src="/cdn/echarts/echarts-liquidfill.min.js"></script>
|
||||
|
||||
<link rel="stylesheet" href="/cesium/Widgets/widgets.css" />
|
||||
<link rel="stylesheet" href="/cdn/Cesium/Widgets/widgets.css" />
|
||||
<!-- <script src="/cesium/jquery-3.0.0.min.js"></script> -->
|
||||
<script src="/cesium/Cesium.js?v=20230913"></script>
|
||||
<script src="/cesium/BIMGISEngine-min.js?v=20230920"></script>
|
||||
<script src="/cesium/initApi.js?v=20230920"></script>
|
||||
<script src="/cdn/Cesium/Cesium.js?v=20250729"></script>
|
||||
<script src="/cdn/Cesium/BIMGISEngine.js?v=20250729"></script>
|
||||
<script src="/cdn/Cesium/initApi.js?v=20230920"></script>
|
||||
|
||||
<!--<script src="/cdn/map/initApi.js"></script> -->
|
||||
<script src="/cdn/map/mapmodle.js?v=2024032501"></script>
|
||||
<!-- <script type="text/javascript" src="https://api.map.baidu.com/api?v=1.0&&type=webgl&ak=6zAD8CIavtzWnkGg0a7roush5maGMIPn"></script> -->
|
||||
|
|
|
@ -0,0 +1,43 @@
|
|||
function loadEngine(that,elId,apiName,cb) {
|
||||
let opt = {
|
||||
container: elId, //[必须]容器id
|
||||
showfps: false, //[可选]显示fps
|
||||
openearth: true, //[可选]开启gis场景
|
||||
// imageryprovider: "tianditu_image", //[可选]gis底图
|
||||
openterrain: false, //[可选]开启gis地形
|
||||
maxspaceerror: 5000, //[可选]模型可视距离; 建议设置:常规BIM时3000或更大、BIM启用LOD时100~1000、倾斜摄影,点云数据时0.1~0.5
|
||||
loading: false, //[可选]gis模式加载动画
|
||||
bgcolor: "#87CEFA", //[可选]bim模式场景背景色
|
||||
selectedcolor: "#FFFF00", //[可选]选中构件颜色
|
||||
throughwall: true, //[可选]相机是否穿墙
|
||||
sitepath: "/cdn/Cesium/",//[可选]设置天空盒路径,指向Cesium文件夹
|
||||
editmode: true, //[可选]是否开启编辑模式
|
||||
searchbox: true, //[可选]gis模型是否显示搜索框
|
||||
mapbox: true, //[可选]gis模型是否显示地图选择
|
||||
isRequestWebgl2: true, //[可选]是否使用webgl2进行渲染
|
||||
colorBlendMode: 1, //0:HIGHLIGHT 1:REPLACE 2:MIX ,构件选中后的着色模式
|
||||
secretkey: window.config.secretKey,
|
||||
language: "zh-CN", // 语言国际化 中文简体(zh-CN)、中文繁体(zh-TW)、英文(en), 默认中文简体
|
||||
targetFrameRate: 20, //目标渲染帧率 默认20
|
||||
};
|
||||
window[apiName] = new API(opt);
|
||||
console.log("初始化成功(client)");
|
||||
let api = window[apiName]
|
||||
setTimeout(() => {
|
||||
if (that.bimCfg.showGis) {
|
||||
that.showGis = true;
|
||||
api.Public.setGisState(true);
|
||||
api.viewer.terrainProvider = Cesium.createWorldTerrain({
|
||||
requestVertexNormals: true, //开启地形光照
|
||||
requestWaterMask: true, // 开启水面波纹
|
||||
})
|
||||
} else if (that.bimCfg.background) {
|
||||
api.Public.setGisState(false, that.bimCfg.background);
|
||||
}
|
||||
cb && cb();
|
||||
}, 10);
|
||||
}
|
||||
|
||||
export default {
|
||||
loadEngine
|
||||
}
|
|
@ -1,4 +1,6 @@
|
|||
import bimTools from "./bimTools";
|
||||
import apiTools from './apiTools.js'
|
||||
import sapiTools from './sapiTools.js'
|
||||
|
||||
const options = {
|
||||
taskMapping: {
|
||||
|
@ -143,8 +145,20 @@ const ganttStyle = {
|
|||
stroke: "#000000A0",
|
||||
},
|
||||
};
|
||||
|
||||
function initEngine(that) {
|
||||
if (that.isClient()) {
|
||||
apiTools.loadEngine(that, "bim4DContainer", 'bim4DApi',
|
||||
() => {
|
||||
initLoadModel(that);
|
||||
}
|
||||
)
|
||||
} else {
|
||||
sapiTools.loadEngine(that, "bim4DContainer", 'bim4DApi', () => {
|
||||
initLoadModel(that);
|
||||
})
|
||||
}
|
||||
}
|
||||
function initEngine2(that) {
|
||||
console.log("开始初始化引擎");
|
||||
window.bim4DApi = new SAPI(
|
||||
{
|
||||
|
@ -221,6 +235,7 @@ function initLoadModel(that) {
|
|||
.then((d) => {
|
||||
that.models = (d.rows || []).map((it) => {
|
||||
it.modelId = it.lightweightName;
|
||||
it.bimCfg = that.$tryToJson(it.bimConfig || "{}", {});
|
||||
it.visible = false;
|
||||
it.checked = true;
|
||||
it.gis = that.$tryToJson(it.gisJson || "{}", {});
|
||||
|
@ -242,6 +257,15 @@ function initLoadModel(that) {
|
|||
function addModel(that, modelId, cb) {
|
||||
let api = window.bim4DApi;
|
||||
let url = `${window.config.modelUrl}/Tools/output/model/${modelId}/root.glt`;
|
||||
let direction = null;
|
||||
let modelInfo = that.models.find(m => m.modelId == modelId);
|
||||
if (that.isClient()) {
|
||||
url = `/bimdata/Tools/output/model/${modelId}/root.glt`;
|
||||
if (modelInfo) {
|
||||
direction = modelInfo.bimCfg.direction;
|
||||
}
|
||||
}
|
||||
|
||||
console.log(modelId, url);
|
||||
api.Model.add(
|
||||
url,
|
||||
|
@ -252,7 +276,11 @@ function addModel(that, modelId, cb) {
|
|||
console.log("加载模型成功");
|
||||
setTimeout(() => {
|
||||
if (that.viewPoint) {
|
||||
api.Camera.setViewPort(that.viewPoint);
|
||||
if (that.viewPoint.world) {
|
||||
if (!that.isClient()) {
|
||||
api.Camera.setViewPort(that.viewPoint);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
api.Camera.getViewPort((p) => {
|
||||
that.viewPoint = p;
|
||||
|
@ -268,7 +296,8 @@ function addModel(that, modelId, cb) {
|
|||
};
|
||||
fnInit();
|
||||
}, 1000);
|
||||
}
|
||||
},
|
||||
direction
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -85,10 +85,28 @@ function initHideParts(that, api) {
|
|||
hideFn();
|
||||
}
|
||||
|
||||
function resetScene(that, api) {
|
||||
that.selectedViewpoint = null;
|
||||
that.selectedRoam = null;
|
||||
api.Camera.stopImmersiveRoam();
|
||||
api.Model.location(api.m_model.keys().toArray()[0]);
|
||||
if (!that.isClient()) {
|
||||
api.Plugin.deleteMiniMap();
|
||||
}
|
||||
if (that.viewPoint) {
|
||||
if (that.viewPoint.world) {
|
||||
if (!that.isClient()) {
|
||||
api.Camera.setViewPort(that.viewPoint);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default {
|
||||
initBimCfg,
|
||||
initBimGis,
|
||||
initLoadModel,
|
||||
initModelPosition,
|
||||
initHideParts
|
||||
initHideParts,
|
||||
resetScene
|
||||
}
|
|
@ -132,7 +132,7 @@ function measurementArea(that) {
|
|||
}
|
||||
|
||||
//构件体积
|
||||
function measuringVolume(that) {}
|
||||
function measuringVolume(that) { }
|
||||
//构件距离
|
||||
function distance(that) {
|
||||
let api = bimBriefingApi;
|
||||
|
@ -189,10 +189,10 @@ function actorVisible(that) {
|
|||
let modelId = featureId.split("^")[0];
|
||||
api.Feature.setVisible(featureId, false);
|
||||
that.hideFeatureIds.push({
|
||||
show:false,
|
||||
id:featureId.split("^")[1],
|
||||
modelId:modelId,
|
||||
featureId:featureId
|
||||
show: false,
|
||||
id: featureId.split("^")[1],
|
||||
modelId: modelId,
|
||||
featureId: featureId
|
||||
});
|
||||
}
|
||||
});
|
||||
|
@ -202,13 +202,17 @@ function clearEvent(that) {
|
|||
let api = bimBriefingApi;
|
||||
if (api) {
|
||||
actorShow(that);
|
||||
api.Feature.getByEvent(false);
|
||||
if (!that.isClient()) {
|
||||
api.Feature.getByEvent(false);
|
||||
api.Model.clearBoundsBox();
|
||||
|
||||
api.Measurement.setFaceToFaceState(!1);
|
||||
|
||||
api.Measurement.setPointToFaceVerticalDistanceState(!1);
|
||||
|
||||
api.Public.clearAllDrawObject();
|
||||
}
|
||||
api.Model.closeClip();
|
||||
api.Model.clearBoundsBox();
|
||||
api.Measurement.setFaceToFaceState(!1);
|
||||
api.Measurement.setPointToFaceVerticalDistanceState(!1);
|
||||
api.Public.clearAllDrawObject();
|
||||
api.Feature.getByEvent(!1);
|
||||
api.Measurement.angle(!1);
|
||||
api.Measurement.distance(!1);
|
||||
api.Measurement.clearAllTrace();
|
||||
|
|
|
@ -0,0 +1,65 @@
|
|||
function loadEngine(that, elId, apiName, cb) {
|
||||
console.log("开始初始化...");
|
||||
window[apiName] = new SAPI(
|
||||
{
|
||||
serverIP: window.config.serverIP, //服务ip地址
|
||||
port: window.config.port, //HTTP端口
|
||||
useHttps: window.config.useHttps, //使用Https
|
||||
container: elId, //[必须]容器id
|
||||
secretKey: window.config.secretKey,
|
||||
openEarth: window.config.openEarth, //[可选]开启Gis场景
|
||||
bgColor: window.config.bgColor, //[可选]bim场景背景色, 传值即为纯色天空盒
|
||||
tintColor: window.config.tintColor, //[可选]osgb单体化颜色
|
||||
sceneTime: window.config.sceneTime, //[可选]分别为当前时间、日出时间、日落时间
|
||||
cadMode: window.config.cadMode, // 是否是Cad图纸预览模式
|
||||
},
|
||||
() => {
|
||||
that.initSuccess = true;
|
||||
console.log("初始化成功");
|
||||
setTimeout(() => {
|
||||
cb && cb();
|
||||
}, 1000);
|
||||
let mapOptions = {
|
||||
imgs: {
|
||||
// 六面图片
|
||||
top: "/cdn/bim/sapi/img/top.png",
|
||||
bottom: "/cdn/bim/sapi/img/under.png",
|
||||
east: "/cdn/bim/sapi/img/east.png",
|
||||
south: "/cdn/bim/sapi/img/south.png",
|
||||
west: "/cdn/bim/sapi/img/west.png",
|
||||
north: "/cdn/bim/sapi/img/north.png",
|
||||
},
|
||||
offset: {
|
||||
// 屏幕坐标偏移
|
||||
corner: GLENavigationCube.RightTop,
|
||||
x: 25,
|
||||
y: 20,
|
||||
},
|
||||
cube: {
|
||||
hoverColor: "#7193dc", // 立方导航快鼠标移过显示颜色
|
||||
size: 32, // 导航立方尺寸
|
||||
hotPointSize: 7, // 导航立方棱角热点区域尺寸
|
||||
cubeTextColor: "#4c4c4ccc", // cube 各个面文字颜色
|
||||
cubeStrokeColor: "#374769cc", // cube 各个面边框颜色
|
||||
cubeFillColor: "#374769cc", // cube 各个面填充颜色
|
||||
},
|
||||
zoomRatios: 1, // 缩放倍率
|
||||
show: true, // 是否显示
|
||||
showAxes: true, // 是否显示XYZ轴线
|
||||
};
|
||||
let api = window[apiName]
|
||||
api.Plugin.initNavCube(mapOptions);
|
||||
if (that.bimCfg.showGis) {
|
||||
api.Public.setGisState(true);
|
||||
api.Public.setTerrainState(false, "/cdn/Cesium/layer.json", false)
|
||||
api.Public.setGisState(true);
|
||||
} else if (that.bimCfg.background) {
|
||||
api.Public.setGisState(false, that.bimCfg.background);
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
export default {
|
||||
loadEngine
|
||||
}
|
|
@ -5,10 +5,7 @@
|
|||
</div>
|
||||
<div id="bim4D" :key="elId">
|
||||
<div id="bim4DContainer" class="bim4DContainer"></div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="div-tools">
|
||||
<div class="div-tools">
|
||||
<div class="tool-item" @click="resetScene">
|
||||
<div class="icon">
|
||||
<svg-icon icon-class="home" />
|
||||
|
@ -18,6 +15,10 @@
|
|||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="slider-info" v-if="hasLoad">
|
||||
<template v-if="isPlay == 0">
|
||||
|
@ -74,7 +75,8 @@ import ganttElastic from "gantt-elastic";
|
|||
import ganttHeader from "gantt-elastic-header";
|
||||
import bim4DTools from "./bim/bim4DTools";
|
||||
import bimTools from "./bim/bimTools";
|
||||
|
||||
import apiTools from './bim/apiTools.js'
|
||||
import sapiTools from './bim/sapiTools.js'
|
||||
export default {
|
||||
components: {
|
||||
ganttElastic,
|
||||
|
@ -150,6 +152,9 @@ export default {
|
|||
window.D4App = this;
|
||||
},
|
||||
methods: {
|
||||
isClient() {
|
||||
return this.bimCfg.clientApi;
|
||||
},
|
||||
doSaveSetting() {
|
||||
if (isNaN(parseInt(this.playTime))) {
|
||||
this.playTime = 500;
|
||||
|
@ -167,6 +172,9 @@ export default {
|
|||
this.oldPlayTime = this.playTime;
|
||||
},
|
||||
initEngine() {
|
||||
if (!this.selProject) {
|
||||
return;
|
||||
}
|
||||
this.elId++;
|
||||
bimTools.initBimCfg(this);
|
||||
setTimeout(() => {
|
||||
|
@ -281,7 +289,8 @@ export default {
|
|||
bim4DTools.doPLay(this);
|
||||
},
|
||||
resetScene(){
|
||||
bim4DTools.resetScene(this);
|
||||
//bim4DTools.resetScene(this);
|
||||
bimTools.resetScene(this,bim4DApi)
|
||||
},
|
||||
},
|
||||
};
|
||||
|
@ -391,6 +400,7 @@ export default {
|
|||
}
|
||||
#bim4D {
|
||||
height: calc(100% - 40px);
|
||||
position: relative;
|
||||
#bim4DContainer {
|
||||
height: 100%;
|
||||
}
|
||||
|
@ -410,7 +420,7 @@ export default {
|
|||
|
||||
.div-tools {
|
||||
position: absolute;
|
||||
top: calc(70vh - 100px);
|
||||
bottom: 10%;
|
||||
left: 50%;
|
||||
margin-left: -34px;
|
||||
display: flex;
|
||||
|
|
|
@ -219,7 +219,8 @@ import debounce from "lodash.debounce";
|
|||
import { MergeArray, DelArray } from "@/utils/tools";
|
||||
import briefingTools from "./bim/briefingTools";
|
||||
import SvgIcon from "@/components/SvgIcon.vue";
|
||||
import BimTools from './bim/bimTools'
|
||||
import apiTools from './bim/apiTools.js'
|
||||
import sapiTools from './bim/sapiTools.js'
|
||||
import bimTools from "./bim/bimTools";
|
||||
export default {
|
||||
components: { SvgIcon },
|
||||
|
@ -269,6 +270,9 @@ export default {
|
|||
this.initEngine();
|
||||
},
|
||||
methods: {
|
||||
isClient() {
|
||||
return this.bimCfg.clientApi;
|
||||
},
|
||||
clearAllHide() {
|
||||
this.$confirm("确定要显示所有构件吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
|
@ -499,6 +503,9 @@ export default {
|
|||
this.leftShow = !this.leftShow;
|
||||
},
|
||||
initEngine() {
|
||||
if (!this.selProject) {
|
||||
return;
|
||||
}
|
||||
this.elId++;
|
||||
this.modelTrees = [];
|
||||
this.models = [];
|
||||
|
@ -509,7 +516,11 @@ export default {
|
|||
this.attributeInformation = "";
|
||||
bimTools.initBimCfg(this);
|
||||
setTimeout(() => {
|
||||
this.loadEngine();
|
||||
if (this.isClient()) {
|
||||
apiTools.loadEngine(this, "bimBriefingContainer", 'bimBriefingApi', this.initLoadModel)
|
||||
} else {
|
||||
sapiTools.loadEngine(this, "bimBriefingContainer", 'bimBriefingApi', this.initLoadModel)
|
||||
}
|
||||
}, 10);
|
||||
},
|
||||
loadEngine() {
|
||||
|
@ -586,6 +597,7 @@ export default {
|
|||
.then((d) => {
|
||||
this.models = (d.rows || []).map((it) => {
|
||||
it.modelId = it.lightweightName;
|
||||
it.bimCfg = this.$tryToJson(it.bimConfig || "{}", {});
|
||||
it.visible = false;
|
||||
it.checked = true;
|
||||
it.gis = this.$tryToJson(it.gisJson || "{}", {});
|
||||
|
@ -607,9 +619,7 @@ export default {
|
|||
bimTools.initLoadModel(this, bimBriefingApi)
|
||||
}
|
||||
});
|
||||
this.init();
|
||||
},
|
||||
init() { },
|
||||
loadModelTree() {
|
||||
this.modelTrees = [
|
||||
{
|
||||
|
@ -672,6 +682,14 @@ export default {
|
|||
},
|
||||
addModel(modelId, cb) {
|
||||
let url = `${window.config.modelUrl}/Tools/output/model/${modelId}/root.glt`;
|
||||
let direction = null;
|
||||
let modelInfo = this.models.find(m => m.modelId == modelId);
|
||||
if (this.isClient()) {
|
||||
url = `/bimdata/Tools/output/model/${modelId}/root.glt`;
|
||||
if (modelInfo) {
|
||||
direction = modelInfo.bimCfg.direction;
|
||||
}
|
||||
}
|
||||
let api = bimBriefingApi
|
||||
console.log(modelId, url);
|
||||
api.Model.add(
|
||||
|
@ -683,7 +701,9 @@ export default {
|
|||
console.log("加载模型成功");
|
||||
setTimeout(() => {
|
||||
if (this.viewPoint) {
|
||||
api.Camera.setViewPort(this.viewPoint);
|
||||
if (!this.isClient()) {
|
||||
api.Camera.setViewPort(this.viewPoint);
|
||||
}
|
||||
} else {
|
||||
api.Camera.getViewPort((p) => {
|
||||
this.viewPoint = p;
|
||||
|
@ -691,18 +711,15 @@ export default {
|
|||
}
|
||||
this.modelLoaded = true;
|
||||
}, 1000);
|
||||
}
|
||||
},
|
||||
direction
|
||||
);
|
||||
},
|
||||
resetScene() {
|
||||
this.selectedViewpoint = null;
|
||||
this.selectedRoam = null;
|
||||
bimBriefingApi.Camera.stopImmersiveRoam();
|
||||
bimBriefingApi.Model.location(bimBriefingApi.m_model.keys().toArray()[0]);
|
||||
bimBriefingApi.Plugin.deleteMiniMap();
|
||||
if (this.viewPoint) {
|
||||
bimBriefingApi.Camera.setViewPort(this.viewPoint);
|
||||
}
|
||||
bimTools.resetScene(this, bimBriefingApi)
|
||||
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
|
@ -329,6 +329,8 @@ const css = `<style>
|
|||
</style>`;
|
||||
import debounce from "lodash.debounce";
|
||||
import videoDialog from "./bim/videoDialog.vue";
|
||||
import apiTools from './bim/apiTools.js'
|
||||
import sapiTools from './bim/sapiTools.js'
|
||||
export default {
|
||||
components: {
|
||||
videoDialog,
|
||||
|
@ -385,7 +387,6 @@ export default {
|
|||
power: false, //电箱监控
|
||||
},
|
||||
menuShowCount: 0,
|
||||
isClient: false,
|
||||
modelLoadSuccess: false, //模型加载成功
|
||||
mode: "model", //显示模式 model-整体模型 plan-形象进度
|
||||
bimCfg: {//BIM显示配置
|
||||
|
@ -430,6 +431,9 @@ export default {
|
|||
this.updateButtonShow();
|
||||
},
|
||||
methods: {
|
||||
isClient() {
|
||||
return this.bimCfg.clientApi;
|
||||
},
|
||||
updateButtonShow() {
|
||||
let objs = this.$root.showMenus || [];
|
||||
this.menuShow.video = objs.find((it) => it.component == "video") ? true : false;
|
||||
|
@ -775,103 +779,13 @@ export default {
|
|||
this.elId++;
|
||||
this.activeMenu = 0;
|
||||
setTimeout(() => {
|
||||
this.isClient = localStorage.getItem("BimClient");
|
||||
if (this.bimCfg.clientApi) {
|
||||
this.loadEngine2();
|
||||
if (this.isClient()) {
|
||||
apiTools.loadEngine(this, "bimManageContainer", 'bimMgrApi', this.initLoadModel)
|
||||
} else {
|
||||
this.loadEngine();
|
||||
sapiTools.loadEngine(this, "bimManageContainer", 'bimMgrApi', this.initLoadModel)
|
||||
}
|
||||
}, 10);
|
||||
},
|
||||
loadEngine2() {
|
||||
let opt = {
|
||||
container: "bimManageContainer", //[必须]容器id
|
||||
showfps: false, //[可选]显示fps
|
||||
openearth: true, //[可选]开启gis场景
|
||||
// imageryprovider: "tianditu_image", //[可选]gis底图
|
||||
openterrain: false, //[可选]开启gis地形
|
||||
maxspaceerror: 5000, //[可选]模型可视距离; 建议设置:常规BIM时3000或更大、BIM启用LOD时100~1000、倾斜摄影,点云数据时0.1~0.5
|
||||
loading: false, //[可选]gis模式加载动画
|
||||
bgcolor: "#87CEFA", //[可选]bim模式场景背景色
|
||||
selectedcolor: "#FFFF00", //[可选]选中构件颜色
|
||||
throughwall: true, //[可选]相机是否穿墙
|
||||
sitepath: "../Cesium/",//[可选]设置天空盒路径,指向Cesium文件夹
|
||||
editmode: true, //[可选]是否开启编辑模式
|
||||
searchbox: true, //[可选]gis模型是否显示搜索框
|
||||
mapbox: true, //[可选]gis模型是否显示地图选择
|
||||
isRequestWebgl2: true, //[可选]是否使用webgl2进行渲染
|
||||
colorBlendMode: 1, //0:HIGHLIGHT 1:REPLACE 2:MIX ,构件选中后的着色模式
|
||||
secretkey: window.config.secretKey,
|
||||
language: "zh-CN", // 语言国际化 中文简体(zh-CN)、中文繁体(zh-TW)、英文(en), 默认中文简体
|
||||
targetFrameRate: 20, //目标渲染帧率 默认20
|
||||
};
|
||||
window.bimMgrApi = new API(opt);
|
||||
console.log("初始化成功");
|
||||
setTimeout(() => {
|
||||
this.initLoadModel();
|
||||
}, 10);
|
||||
},
|
||||
loadEngine() {
|
||||
console.log("开始初始化...");
|
||||
window.bimMgrApi = new SAPI(
|
||||
{
|
||||
serverIP: window.config.serverIP, //服务ip地址
|
||||
port: window.config.port, //HTTP端口
|
||||
useHttps: window.config.useHttps, //使用Https
|
||||
container: "bimManageContainer", //[必须]容器id
|
||||
secretKey: window.config.secretKey,
|
||||
openEarth: window.config.openEarth, //[可选]开启Gis场景
|
||||
bgColor: window.config.bgColor, //[可选]bim场景背景色, 传值即为纯色天空盒
|
||||
tintColor: window.config.tintColor, //[可选]osgb单体化颜色
|
||||
sceneTime: window.config.sceneTime, //[可选]分别为当前时间、日出时间、日落时间
|
||||
cadMode: window.config.cadMode, // 是否是Cad图纸预览模式
|
||||
},
|
||||
() => {
|
||||
this.initSuccess = true;
|
||||
console.log("初始化成功");
|
||||
setTimeout(() => {
|
||||
this.initLoadModel();
|
||||
}, 1000);
|
||||
let mapOptions = {
|
||||
imgs: {
|
||||
// 六面图片
|
||||
top: "/cdn/bim/sapi/img/top.png",
|
||||
bottom: "/cdn/bim/sapi/img/under.png",
|
||||
east: "/cdn/bim/sapi/img/east.png",
|
||||
south: "/cdn/bim/sapi/img/south.png",
|
||||
west: "/cdn/bim/sapi/img/west.png",
|
||||
north: "/cdn/bim/sapi/img/north.png",
|
||||
},
|
||||
offset: {
|
||||
// 屏幕坐标偏移
|
||||
corner: GLENavigationCube.RightTop,
|
||||
x: 25,
|
||||
y: 20,
|
||||
},
|
||||
cube: {
|
||||
hoverColor: "#7193dc", // 立方导航快鼠标移过显示颜色
|
||||
size: 32, // 导航立方尺寸
|
||||
hotPointSize: 7, // 导航立方棱角热点区域尺寸
|
||||
cubeTextColor: "#4c4c4ccc", // cube 各个面文字颜色
|
||||
cubeStrokeColor: "#374769cc", // cube 各个面边框颜色
|
||||
cubeFillColor: "#374769cc", // cube 各个面填充颜色
|
||||
},
|
||||
zoomRatios: 1, // 缩放倍率
|
||||
show: true, // 是否显示
|
||||
showAxes: true, // 是否显示XYZ轴线
|
||||
};
|
||||
bimMgrApi.Plugin.initNavCube(mapOptions);
|
||||
if (this.bimCfg.showGis) {
|
||||
let api = bimMgrApi
|
||||
api.Public.setGisState(true);
|
||||
api.Public.setTerrainState(false, "http://113.201.2.107:9304/layer.json", false)
|
||||
api.Public.setGisState(true);
|
||||
} else if (this.bimCfg.background) {
|
||||
api.Public.setGisState(false, this.bimCfg.background);
|
||||
}
|
||||
}
|
||||
);
|
||||
},
|
||||
initLoadModel() {
|
||||
if (this.selProject == null) {
|
||||
return;
|
||||
|
@ -896,6 +810,7 @@ export default {
|
|||
.then((d) => {
|
||||
this.models = (d.rows || []).map((it) => {
|
||||
it.modelId = it.lightweightName;
|
||||
it.bimCfg = this.$tryToJson(it.bimConfig || "{}", {});
|
||||
it.visible = false;
|
||||
it.checked = true;
|
||||
it.gis = this.$tryToJson(it.gisJson || "{}", {});
|
||||
|
@ -923,8 +838,13 @@ export default {
|
|||
},
|
||||
addModel(modelId, cb) {
|
||||
let url = `${window.config.modelUrl}/Tools/output/model/${modelId}/root.glt`;
|
||||
if (this.bimCfg.clientApi) {
|
||||
let direction = null;
|
||||
let modelInfo = this.models.find(m => m.modelId == modelId);
|
||||
if (this.isClient()) {
|
||||
url = `/bimdata/Tools/output/model/${modelId}/root.glt`;
|
||||
if (modelInfo) {
|
||||
direction = modelInfo.bimCfg.direction;
|
||||
}
|
||||
}
|
||||
let api = bimMgrApi;
|
||||
console.log(modelId, url);
|
||||
|
@ -949,11 +869,11 @@ export default {
|
|||
});
|
||||
}
|
||||
}
|
||||
//this.initModelPosition(modelId);
|
||||
|
||||
this.modelLoadSuccess = true;
|
||||
api.Model.location(modelId)
|
||||
}, 1000);
|
||||
}
|
||||
}, direction
|
||||
);
|
||||
},
|
||||
initModelPosition() {
|
||||
|
@ -1081,7 +1001,10 @@ export default {
|
|||
resetScene() {
|
||||
bimMgrApi.Camera.stopImmersiveRoam();
|
||||
bimMgrApi.Model.location(bimMgrApi.m_model.keys().toArray()[0]);
|
||||
bimMgrApi.Plugin.deleteMiniMap();
|
||||
if (!this.isClient()) {
|
||||
bimMgrApi.Plugin.deleteMiniMap();
|
||||
}
|
||||
|
||||
if (this.viewPoint) {
|
||||
bimMgrApi.Camera.setViewPort(this.viewPoint);
|
||||
}
|
||||
|
|
|
@ -95,8 +95,9 @@
|
|||
|
||||
<script>
|
||||
import debounce from "lodash.debounce";
|
||||
import { MergeArray, DelArray } from "@/utils/tools";
|
||||
import bimTools from './bim/bimTools'
|
||||
import apiTools from './bim/apiTools.js'
|
||||
import sapiTools from './bim/sapiTools.js'
|
||||
export default {
|
||||
name: "BIMRoaming",
|
||||
data() {
|
||||
|
@ -143,6 +144,9 @@ export default {
|
|||
this.initEngine();
|
||||
},
|
||||
methods: {
|
||||
isClient() {
|
||||
return this.bimCfg.clientApi;
|
||||
},
|
||||
loadNode(node, resolve) {
|
||||
let that = this;
|
||||
if (node.level == 0) {
|
||||
|
@ -368,71 +372,21 @@ export default {
|
|||
}
|
||||
this.leftShow = !this.leftShow;
|
||||
},
|
||||
|
||||
initEngine() {
|
||||
if (!this.selProject) {
|
||||
return;
|
||||
}
|
||||
this.elId++;
|
||||
this.activeMenu = 0;
|
||||
bimTools.initBimCfg(this);
|
||||
setTimeout(() => {
|
||||
if (this.bimCfg.clientApi) {
|
||||
if (this.isClient()) {
|
||||
apiTools.loadEngine(this, "bimRoamingContainer", 'bimRoadmApi', this.initLoadModel)
|
||||
} else {
|
||||
this.loadEngine();
|
||||
sapiTools.loadEngine(this, "bimRoamingContainer", 'bimRoadmApi', this.initLoadModel)
|
||||
}
|
||||
}, 10);
|
||||
},
|
||||
loadEngine() {
|
||||
window.bimRoadmApi = new SAPI(
|
||||
{
|
||||
serverIP: window.config.serverIP, //服务ip地址
|
||||
port: window.config.port, //HTTP端口
|
||||
useHttps: window.config.useHttps, //使用Https
|
||||
container: "bimRoamingContainer", //[必须]容器id
|
||||
secretKey: window.config.secretKey,
|
||||
openEarth: window.config.openEarth, //[可选]开启Gis场景
|
||||
bgColor: window.config.bgColor, //[可选]bim场景背景色, 传值即为纯色天空盒
|
||||
tintColor: window.config.tintColor, //[可选]osgb单体化颜色
|
||||
sceneTime: window.config.sceneTime, //[可选]分别为当前时间、日出时间、日落时间
|
||||
cadMode: window.config.cadMode, // 是否是Cad图纸预览模式
|
||||
},
|
||||
() => {
|
||||
this.initSuccess = true;
|
||||
console.log("初始化成功");
|
||||
setTimeout(() => {
|
||||
this.initLoadModel();
|
||||
}, 10);
|
||||
let mapOptions = {
|
||||
imgs: {
|
||||
// 六面图片
|
||||
top: "/cdn/bim/sapi/img/top.png",
|
||||
bottom: "/cdn/bim/sapi/img/under.png",
|
||||
east: "/cdn/bim/sapi/img/east.png",
|
||||
south: "/cdn/bim/sapi/img/south.png",
|
||||
west: "/cdn/bim/sapi/img/west.png",
|
||||
north: "/cdn/bim/sapi/img/north.png",
|
||||
},
|
||||
offset: {
|
||||
// 屏幕坐标偏移
|
||||
corner: GLENavigationCube.RightTop,
|
||||
x: 25,
|
||||
y: 20,
|
||||
},
|
||||
cube: {
|
||||
hoverColor: "#7193dc", // 立方导航快鼠标移过显示颜色
|
||||
size: 32, // 导航立方尺寸
|
||||
hotPointSize: 7, // 导航立方棱角热点区域尺寸
|
||||
cubeTextColor: "#4c4c4ccc", // cube 各个面文字颜色
|
||||
cubeStrokeColor: "#374769cc", // cube 各个面边框颜色
|
||||
cubeFillColor: "#374769cc", // cube 各个面填充颜色
|
||||
},
|
||||
zoomRatios: 1, // 缩放倍率
|
||||
show: true, // 是否显示
|
||||
showAxes: true, // 是否显示XYZ轴线
|
||||
};
|
||||
bimRoadmApi.Plugin.initNavCube(mapOptions);
|
||||
bimTools.initBimGis(this, bimRoadmApi)
|
||||
}
|
||||
);
|
||||
},
|
||||
initLoadModel() {
|
||||
this.$api.bim.getDefaultViewPoint(this.selProject.id, 1).then((d) => {
|
||||
let pt = "";
|
||||
|
@ -454,6 +408,7 @@ export default {
|
|||
.then((d) => {
|
||||
this.models = (d.rows || []).map((it) => {
|
||||
it.modelId = it.lightweightName;
|
||||
it.bimCfg = this.$tryToJson(it.bimConfig || "{}", {});
|
||||
it.visible = false;
|
||||
it.checked = true;
|
||||
it.gis = this.$tryToJson(it.gisJson || "{}", {});
|
||||
|
@ -585,6 +540,15 @@ export default {
|
|||
addModel(modelId, cb) {
|
||||
let url = `${window.config.modelUrl}/Tools/output/model/${modelId}/root.glt`;
|
||||
console.log(modelId, url);
|
||||
let direction = null;
|
||||
let modelInfo = this.models.find(m => m.modelId == modelId);
|
||||
if (this.isClient()) {
|
||||
url = `/bimdata/Tools/output/model/${modelId}/root.glt`;
|
||||
if (modelInfo) {
|
||||
direction = modelInfo.bimCfg.direction;
|
||||
}
|
||||
}
|
||||
|
||||
let api = bimRoadmApi;
|
||||
api.Model.add(
|
||||
url,
|
||||
|
@ -595,7 +559,12 @@ export default {
|
|||
console.log("加载模型成功");
|
||||
setTimeout(() => {
|
||||
if (this.viewPoint) {
|
||||
api.Camera.setViewPort(this.viewPoint);
|
||||
if (this.viewPoint.world) {
|
||||
if (!this.isClient()) {
|
||||
api.Camera.setViewPort(this.viewPoint);
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
api.Camera.getViewPort((p) => {
|
||||
this.viewPoint = p;
|
||||
|
@ -603,18 +572,11 @@ export default {
|
|||
}
|
||||
this.modelLoaded = true;
|
||||
}, 1000);
|
||||
}
|
||||
}, direction
|
||||
);
|
||||
},
|
||||
resetScene() {
|
||||
this.selectedViewpoint = null;
|
||||
this.selectedRoam = null;
|
||||
bimRoadmApi.Camera.stopImmersiveRoam();
|
||||
bimRoadmApi.Model.location(bimRoadmApi.m_model.keys().toArray()[0]);
|
||||
bimRoadmApi.Plugin.deleteMiniMap();
|
||||
if (this.viewPoint) {
|
||||
bimRoadmApi.Camera.setViewPort(this.viewPoint);
|
||||
}
|
||||
bimTools.resetScene(this,bimRoadmApi)
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
|
@ -39,22 +39,16 @@ module.exports = defineConfig({
|
|||
"^/xd/": "/",
|
||||
},
|
||||
},
|
||||
"/cesium": {
|
||||
target: `http://62.234.3.186/cesium/`,
|
||||
changeOrigin: true,
|
||||
pathRewrite: {
|
||||
"^/cesium": "/",
|
||||
},
|
||||
},
|
||||
|
||||
"/bimdata": {
|
||||
target: `http://62.234.3.186/bimdata/`,
|
||||
target: `http://62.234.3.186/bimdata`,
|
||||
changeOrigin: true,
|
||||
pathRewrite: {
|
||||
"^/bimdata": "/",
|
||||
},
|
||||
},
|
||||
"/cdn": {
|
||||
target: `http://62.234.3.186/cdn/`,
|
||||
target: `http://62.234.3.186/cdn`,
|
||||
changeOrigin: true,
|
||||
pathRewrite: {
|
||||
"^/cdn": "/",
|
||||
|
|
|
@ -58,7 +58,7 @@
|
|||
</appender>
|
||||
|
||||
<!-- 系统模块日志级别控制 -->
|
||||
<logger name="com.yanzhu" level="info" />
|
||||
<logger name="com.yanzhu" level="debug" />
|
||||
<!-- Spring日志级别控制 -->
|
||||
<logger name="org.springframework" level="warn" />
|
||||
|
||||
|
|
|
@ -17,17 +17,16 @@
|
|||
type="text/javascript"
|
||||
src="https://api.map.baidu.com/api?v=1.0&&type=webgl&ak=6zAD8CIavtzWnkGg0a7roush5maGMIPn"
|
||||
></script>
|
||||
<script src="/cdn/Cesium/Cesium.js"></script>
|
||||
<script src="/cdn/Cesium/BIMGISEngine.js"></script>
|
||||
<script src="/cdn/Cesium/initApi.js?v=20230920"></script>
|
||||
<script src="/cdn/echarts/echarts.min.js"></script>
|
||||
<script src="/cdn/bim/sapi/BIMGISEngine.js"></script>
|
||||
<script src="/cdn/bim/sapi/config.js?v=20240415"></script>
|
||||
|
||||
<link rel="stylesheet" href="/cesium/Widgets/widgets.css" />
|
||||
<!-- <script src="/cesium/jquery-3.0.0.min.js"></script> -->
|
||||
<!-- <script src="/cesium/Cesium.js?v=20230913"></script>
|
||||
<script src="/cesium/BIMGISEngine-min.js?v=20230920"></script> -->
|
||||
<script src="/cdn/Cesium/Cesium.js"></script>
|
||||
<script src="/cdn/Cesium/BIMGISEngine.js"></script>
|
||||
<script src="/cesium/initApi.js?v=20230920"></script>
|
||||
<link rel="stylesheet" href="/cdn/Cesium/Widgets/widgets.css" />
|
||||
|
||||
|
||||
|
||||
<!--[if lt IE 11
|
||||
]><script>
|
||||
|
|
|
@ -88,6 +88,9 @@ export default {
|
|||
this.$nextTick(() => { });
|
||||
},
|
||||
methods: {
|
||||
isClient(){
|
||||
return this.me.bimCfg.clientApi;
|
||||
},
|
||||
loadNode(node, resolve) {
|
||||
let that = this;
|
||||
if (node.level == 0) {
|
||||
|
@ -207,18 +210,22 @@ export default {
|
|||
|
||||
if (modelInfo) {
|
||||
let cfg = modelInfo.bimCfg;
|
||||
|
||||
let x = cfg?.x || 0;
|
||||
let y = cfg?.y || 0;
|
||||
let z = cfg?.z || 0;
|
||||
let rotateZ = cfg?.rotateZ || 0;
|
||||
let rotateZ=cfg?.rotateZ||0;
|
||||
let rotateX=cfg?.rotateX||0;
|
||||
let rotateY=cfg?.rotateY||0;
|
||||
if (x * 1 + y * 1 + z * 1 != 0) {
|
||||
api.Model.moveToPosition([x, y, 0], 0, modelId)
|
||||
console.log(x, y, z)
|
||||
api.Model.moveToPosition([x, y, z], 0, modelId)
|
||||
}
|
||||
if (rotateZ * 1 != 0) {
|
||||
if (this.me.bimCfg.clientApi) {
|
||||
|
||||
} else {
|
||||
api.Model.rotate(0, 0, rotateZ, modelId)
|
||||
api.Model.rotate(rotateX,rotateY, rotateZ, modelId)
|
||||
}
|
||||
}
|
||||
if (cfg && cfg.hideParts) {
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
<template v-if="isClient">
|
||||
<template v-if="clientEditMode">
|
||||
<el-button type="primary" @click="doSaveEditData">保存</el-button>
|
||||
<el-button @click="doCancelEditMode">取消编辑旋转模式</el-button>
|
||||
</template>
|
||||
<el-button v-else type="primary" @click="updateRotate">更新旋转角度</el-button>
|
||||
</template>
|
||||
|
@ -116,16 +115,12 @@ export default {
|
|||
}
|
||||
});
|
||||
},
|
||||
doCancelEditMode() {
|
||||
this.clientEditMode = false;
|
||||
api.Edit.setEditMode("")
|
||||
},
|
||||
doModelMove() {
|
||||
ElMessage.info("左键单击选择移动位置,右键单击结束操作!");
|
||||
if (this.me.bimCfg.clientApi) {
|
||||
APITools.moveToPosition(this);
|
||||
} else {
|
||||
APITools.moveToPosition(this);
|
||||
SAPITools.moveToPosition(this);
|
||||
}
|
||||
},
|
||||
onCancel() {
|
||||
|
@ -192,7 +187,7 @@ export default {
|
|||
this.saveData.x = this.form.x;
|
||||
this.saveData.y = this.form.y;
|
||||
this.saveData.z = this.form.z;
|
||||
if (this.saveData.rotateZ != 0) {
|
||||
if (this.saveData.rotateZ != 0 && !this.isClient) {
|
||||
api.Model.rotate(0, 0, this.saveData.rotateZ, this.modelId)
|
||||
}
|
||||
},
|
||||
|
@ -202,7 +197,7 @@ export default {
|
|||
api.Edit.setEditMode("Rotate")
|
||||
this.clientEditMode = true;
|
||||
} else {
|
||||
api.Model.rotateForEdit(this.form.rotateX, this.form.rotateY, this.form.rotateZ, this.modelId)
|
||||
api.Model.rotate(0, 0, this.form.rotateZ, this.modelId)
|
||||
}
|
||||
this.saveData.rotateZ = this.form.rotateZ;
|
||||
},
|
||||
|
|
|
@ -53,11 +53,12 @@ function doModelMove(that) {
|
|||
function moveToPosition(that) {
|
||||
api.Public.event("LEFT_CLICK", (n) => {
|
||||
api.Public.pickupCoordinate(n.position, e => {
|
||||
var a = [api.Public.radiansToDegrees(e[0]), api.Public.radiansToDegrees(e[1]), 0];
|
||||
console.log(e)
|
||||
var a = [api.Public.radiansToDegrees(e[0]), api.Public.radiansToDegrees(e[1]),e[2]];
|
||||
api.Model.moveToPosition(a, 0, that.modelId)
|
||||
that.form.x = a[0];
|
||||
that.form.y = a[1];
|
||||
that.form.z = 0;
|
||||
that.form.z =a[2];
|
||||
that.saveData.x = that.form.x;
|
||||
that.saveData.y = that.form.y;
|
||||
that.saveData.z = that.form.z;
|
||||
|
|
|
@ -144,6 +144,9 @@ export default {
|
|||
});
|
||||
},
|
||||
methods: {
|
||||
isClient() {
|
||||
return this.bimCfg.clientApi;
|
||||
},
|
||||
doCloseMove() {
|
||||
this.$refs.moveModel.resetPosition();
|
||||
this.showMove = false;
|
||||
|
@ -158,6 +161,11 @@ export default {
|
|||
if (this.showGis) {
|
||||
if (this.bimCfg.clientApi) {
|
||||
api.Public.setGisState(true);
|
||||
api.viewer.terrainProvider = Cesium.createWorldTerrain({
|
||||
requestVertexNormals: true, //开启地形光照
|
||||
requestWaterMask: true, // 开启水面波纹
|
||||
})
|
||||
|
||||
} else {
|
||||
api.Public.setGisState(true);
|
||||
api.Public.setTerrainState(false, "http://113.201.2.107:9304/layer.json", false)
|
||||
|
@ -179,22 +187,25 @@ export default {
|
|||
}
|
||||
api.Camera.stopImmersiveRoam();
|
||||
api.Model.location(api.m_model.keys().toArray()[0]);
|
||||
if(!this.bimCfg.clientApi){
|
||||
if (!this.bimCfg.clientApi) {
|
||||
api.Plugin.deleteMiniMap();
|
||||
}
|
||||
if (this.viewPoint) {
|
||||
if(this.viewPoint.world){
|
||||
if(!this.bimCfg.clientApi){
|
||||
api.Camera.setViewPort(this.viewPoint);
|
||||
if (this.viewPoint.world) {
|
||||
if (!this.bimCfg.clientApi) {
|
||||
api.Camera.setViewPort(this.viewPoint);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
doMenu(n) {
|
||||
if (this.activeMenu == 4) {
|
||||
api.Public.clearHandler();
|
||||
api.Feature.getByEvent(false);
|
||||
if (!this.isClient()) {
|
||||
api.Feature.getByEvent(false);
|
||||
}
|
||||
|
||||
}
|
||||
if (n == this.activeMenu) {
|
||||
if (n == 0) {
|
||||
|
@ -245,10 +256,18 @@ export default {
|
|||
}
|
||||
},
|
||||
doModelMove() {
|
||||
let that=this
|
||||
if (api.m_model.size == 1) {
|
||||
let modelId = api.m_model.keys().toArray()[0];
|
||||
that.showMove = true;
|
||||
that.modelId = modelId;
|
||||
that.$refs.moveModel.initData(modelId)
|
||||
return;
|
||||
}
|
||||
ElMessage.info("请在场景中选择要移动的模型!");
|
||||
if(this.bimCfg.clientApi){
|
||||
if (this.bimCfg.clientApi) {
|
||||
APITools.doModelMove(this);
|
||||
}else{
|
||||
} else {
|
||||
SAPITools.doModelMove(this);
|
||||
}
|
||||
},
|
||||
|
|
|
@ -64,7 +64,7 @@ function doModelMove(that) {
|
|||
if (n && n["id"]) {
|
||||
let modelId = n.id.split("^")[0];
|
||||
that.showMove = true;
|
||||
that.modelId=modelId;
|
||||
that.modelId = modelId;
|
||||
that.$refs.moveModel.initData(modelId)
|
||||
} else {
|
||||
ElMessage.warning("请在模型上选点!");
|
||||
|
@ -74,33 +74,34 @@ function doModelMove(that) {
|
|||
}
|
||||
|
||||
//在地图上移动模型
|
||||
function moveToPosition(that){
|
||||
api.Public.event("LEFT_CLICK", ((n) => {
|
||||
api.Public.pickupCoordinate(true, ((n) => {
|
||||
api.Public.convertWorldToCartographicLocation(n, m => {
|
||||
api.Model.moveToPosition(m, 0, that.modelId)
|
||||
if (that.saveData.rotateZ != 0) {
|
||||
api.Model.rotate(0, 0, that.saveData.rotateZ, that.modelId)
|
||||
}
|
||||
that.movePoint = m;
|
||||
});
|
||||
function moveToPosition(that) {
|
||||
api.Public.event("LEFT_CLICK", ((n) => {
|
||||
api.Public.pickupCoordinate(true, ((n) => {
|
||||
console.log(n);
|
||||
api.Public.convertWorldToCartographicLocation(n, m => {
|
||||
api.Model.moveToPosition(m, 0, that.modelId)
|
||||
if (that.saveData.rotateZ != 0) {
|
||||
api.Model.rotate(that.saveData.x, that.saveData.y, that.saveData.rotateZ, that.modelId)
|
||||
}
|
||||
))
|
||||
}
|
||||
)),
|
||||
api.Public.event("RIGHT_CLICK", ((n) => {
|
||||
api.Public.clearHandler(),
|
||||
api.Public.pickupCoordinate(false);
|
||||
ElMessage.info("已结束模型移动!"),
|
||||
that.activeMenu = -1;
|
||||
let pt = that.movePoint;
|
||||
that.form.x = pt[0]
|
||||
that.form.y = pt[1]
|
||||
that.form.z = pt[2]
|
||||
that.saveData.x = that.form.x;
|
||||
that.saveData.y = that.form.y;
|
||||
that.saveData.z = that.form.z;
|
||||
}));
|
||||
that.movePoint = m;
|
||||
});
|
||||
}
|
||||
))
|
||||
}
|
||||
)),
|
||||
api.Public.event("RIGHT_CLICK", ((n) => {
|
||||
api.Public.clearHandler(),
|
||||
api.Public.pickupCoordinate(false);
|
||||
ElMessage.info("已结束模型移动!"),
|
||||
that.activeMenu = -1;
|
||||
let pt = that.movePoint;
|
||||
that.form.x = pt[0]
|
||||
that.form.y = pt[1]
|
||||
that.form.z = pt[2]
|
||||
that.saveData.x = that.form.x;
|
||||
that.saveData.y = that.form.y;
|
||||
that.saveData.z = that.form.z;
|
||||
}));
|
||||
}
|
||||
|
||||
export default {
|
||||
|
|
|
@ -415,7 +415,7 @@ function submitForm() {
|
|||
getList();
|
||||
});
|
||||
} else {
|
||||
form.value.approveStatus = "100";
|
||||
form.value.approveStatus = "4";
|
||||
addProjectChecked(form.value).then(response => {
|
||||
proxy.$modal.msgSuccess("新增成功");
|
||||
open.value = false;
|
||||
|
|
|
@ -39,8 +39,8 @@ export default defineConfig(({ mode, command }) => {
|
|||
},
|
||||
// https://cn.vitejs.dev/config/#server-proxy
|
||||
"/dev-api": {
|
||||
//target: "http://localhost:8080",
|
||||
target: "http://62.234.3.186",
|
||||
target: "http://localhost:8080",
|
||||
//target: "http://62.234.3.186",
|
||||
changeOrigin: true,
|
||||
rewrite: (p) => p.replace(/^\/dev-api/, ""),
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue