From 59756c672b6233d5b2019b91c7f8b3fc14217358 Mon Sep 17 00:00:00 2001
From: kun <1422840143@qq.com>
Date: Tue, 12 Dec 2023 11:43:19 +0800
Subject: [PATCH] =?UTF-8?q?fix:=20BUG=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
public/bimBaseProgressModel.html | 126 +
public/js/config.js | 2 +-
.../BIMCenter => public}/progressModel.html | 30 +-
src/assets/js/api/progressManagement.js | 1 +
src/assets/js/api/project.js | 3 +-
src/assets/js/http.js | 4 +-
src/router/index.js | 3740 +++++++++--------
.../BIMBASECenter/progressManagement.vue | 469 +++
.../BIMCenter/progressManagement.vue | 89 +-
9 files changed, 2550 insertions(+), 1914 deletions(-)
create mode 100644 public/bimBaseProgressModel.html
rename {src/views/projectFront/BIMCenter => public}/progressModel.html (78%)
create mode 100644 src/views/projectFront/BIMBASECenter/progressManagement.vue
diff --git a/public/bimBaseProgressModel.html b/public/bimBaseProgressModel.html
new file mode 100644
index 00000000..5c06c8c1
--- /dev/null
+++ b/public/bimBaseProgressModel.html
@@ -0,0 +1,126 @@
+
+
+
+
+ My first BIMFACE app
+
+
+
+
+
+
+
+
+
+
diff --git a/public/js/config.js b/public/js/config.js
index 0a958e0f..802d4761 100644
--- a/public/js/config.js
+++ b/public/js/config.js
@@ -20,7 +20,7 @@ var COMPANY = '' //通用
// COMPANY = 'shjg'//上海优益(上海建工)
// COMPANY = 'syhy'//沈阳和盈
// COMPANY = 'jxwjj'//嘉兴王江泾公用码头项目
-COMPANY = 'gxbs'//广西百色
+// COMPANY = 'gxbs'//广西百色
var PROJECT = {
local_test: 'common', // 普通版
diff --git a/src/views/projectFront/BIMCenter/progressModel.html b/public/progressModel.html
similarity index 78%
rename from src/views/projectFront/BIMCenter/progressModel.html
rename to public/progressModel.html
index 00395eac..9936a665 100644
--- a/src/views/projectFront/BIMCenter/progressModel.html
+++ b/public/progressModel.html
@@ -16,8 +16,7 @@
let app;
let modelState;
let configValue = {
- hideArr: [],
- colorArr: [],
+ bimComponent: [],
};
const bimCallback = (viewToken) => {
// let viewToken = '11b0d307c09f43bfa5fa3922bcce0342'
@@ -51,8 +50,8 @@
Glodon.Bimface.Viewer.Viewer3DEvent.MouseClicked,
(data) => {
console.log(data);
- // 往父级传递
- window.parent.postMessage({ msg: data.elementId });
+ // 往父级传递
+ window.parent.postMessage({ msg: data.elementId });
}
);
}
@@ -64,32 +63,27 @@
function renderConfigModel() {
// 恢复模型状态
viewer3D.setState(modelState);
- model3D.hideComponentsById(configValue.hideArr);
- configValue.colorArr.map((item) => {
- model3D.overrideComponentsColorById(
- [item.name],
- new Glodon.Web.Graphics.Color(item.color, 1)
- );
- });
+ model3D.overrideComponentsColorById(
+ configValue.bimComponent,
+ new Glodon.Web.Graphics.Color("#337AB7", 1)
+ );
viewer3D.render();
}
// 监听父组件的信息传递
window.addEventListener("message", async function(e) {
// const modelId = e.data.modelId
const data = e.data || {};
+ console.log(data);
if (data.token) {
// removeModel(modelId)
document.getElementById("domId").innerHTML = "";
await bimCallback(data.token);
- if (data.hideArr && data.colorArr) {
- configValue.hideArr = data.hideArr;
- configValue.colorArr = data.colorArr;
+ if (data.bimComponent && data.bimComponent.length > 0) {
+ configValue.bimComponent = data.bimComponent;
+ } else {
+ configValue.bimComponent = [];
}
}
- // console.log(e.data, '父级页面传来的数据')
- // setTimeout(() => {
- // window.parent.postMessage({ msg: 'hello' })
- // }, 2000)
});