diff --git a/yanzhu-bigscreen/src/views/bimManage.vue b/yanzhu-bigscreen/src/views/bimManage.vue index 89065819..9c989456 100644 --- a/yanzhu-bigscreen/src/views/bimManage.vue +++ b/yanzhu-bigscreen/src/views/bimManage.vue @@ -234,24 +234,23 @@ 电箱监控 -
+
- + 提前完工
-
- +
+ 正常完工
-
- +
+ 延迟完工
-
- +
+ 正在施工
-
@@ -791,6 +790,7 @@ export default { }, 10); }, loadEngine() { + console.log("开始初始化..."); window.bimMgrApi = new SAPI( { serverIP: window.config.serverIP, //服务ip地址 @@ -861,7 +861,7 @@ export default { projectId: this.selProject.id, }) .then((d) => { - this.models = (d.rows || []).map((it) => { + this.models = (d.rows || []).map((it) => { it.modelId = it.lightweightName; it.visible = false; it.checked = true; @@ -921,7 +921,7 @@ export default { if (mode == "model") { this.models.forEach((it) => { api.Model.original(it.lightweightName); - api.Model.setAlpha(it.lightweightName,1); + api.Model.setAlpha(it.lightweightName, 1); }); this.resetScene(); } else { @@ -960,14 +960,22 @@ export default { }); //console.log("====>",beforeData,afterData,processData,standData); if (allData.length > 0) { - allData=allData.map(item=>item.featureId); - this.models.forEach(model=>{ - api.Model.setAlpha(model.lightweightName,0.5); + allData = allData.map((item) => item.featureId); + this.models.forEach((model) => { + api.Model.setAlpha(model.lightweightName, 0.5); }); - api.Feature.setColor(beforeData.map((it) => it.featureId).join("#"), "rgba(59, 255, 0,1)"); - api.Feature.setColor(standData.map((it) => it.featureId).join("#"), "rgba(255,255,255,1)"); - api.Feature.setColor(processData.map((it) => it.featureId).join("#"), "rgba(0,0, 255,1)"); - api.Feature.setColor(afterData.map((it) => it.featureId).join("#"), "rgba(250, 0, 0,1)"); + if (beforeData.length > 0) { + api.Feature.setColor(beforeData.map((it) => it.featureId).join("#"), "rgba(59, 255, 0,1)"); + } + if (standData.length > 0) { + api.Feature.setColor(standData.map((it) => it.featureId).join("#"), "rgba(255,255,255,1)"); + } + if (processData.length > 0) { + api.Feature.setColor(processData.map((it) => it.featureId).join("#"), "rgba(0,0, 255,1)"); + } + if (afterData.length > 0) { + api.Feature.setColor(afterData.map((it) => it.featureId).join("#"), "rgba(250, 0, 0,1)"); + } } }); } @@ -1232,23 +1240,27 @@ export default { } } } - .plan-chart{ + .plan-legend { position: absolute; top: calc(80vh - 110px); right: 40px; - &.isShow{ - right:calc(20% + 140px); + padding: 10px 10px 0px; + background: #00000080; + border-radius: 10px; + &.isShow { + right: calc(20% + 140px); } - .plan-item{ + .plan-item { display: flex; - font-size:12px; + font-size: 12px; margin-bottom: 10px; - span{ - display:block; - &:first-child{ - width:15px; - height:15px; - margin-right:4px; + align-items: center; + span { + display: block; + &:first-child { + width: 15px; + height: 15px; + margin-right: 4px; } } } @@ -1793,6 +1805,44 @@ export default { } } } + .div-mode { + top: calc(80vh - 170px); + border-radius: 20px; + padding: 20px 0px; + margin-left: -221px; + .mode-item { + font-size: 24px; + line-height: 60px; + margin: 0px 20px; + padding: 0px 20px; + border-radius: 13px; + .svg-icon { + width: 40px; + height: 40px; + margin-right: 4px; + } + } + } + .plan-legend { + top: calc(80vh - 110px); + right: 40px; + padding: 20px 20px 0px; + &.isShow { + right: calc(20% + 220px); + } + .plan-item { + font-size: 24px; + margin-bottom: 10px; + span { + display: block; + &:first-child { + width: 20px; + height: 20px; + margin-right: 8px; + } + } + } + } .div-tools { border-radius: 10px; &.menu-0 { diff --git a/yanzhu-ui-vue3/src/views/manage/plan/bimSelectTools2.js b/yanzhu-ui-vue3/src/views/manage/plan/bimSelectTools2.js index e542d59c..38156d01 100644 --- a/yanzhu-ui-vue3/src/views/manage/plan/bimSelectTools2.js +++ b/yanzhu-ui-vue3/src/views/manage/plan/bimSelectTools2.js @@ -173,17 +173,17 @@ function partLoadModel(that) { url, modelId, obj[modelId].join("#"), - (res) => {}, + (res) => { }, (res) => { - setTimeout(()=>{ - if (that.viewPoint) { + setTimeout(() => { + if (that.viewPoint) { api.Camera.setViewPort(that.viewPoint); } else { api.Camera.getViewPort((p) => { - that.viewPoint=p; + that.viewPoint = p; }); } - },1000); + }, 1000); that.$message.info("模型加载完成"); that.bimLoaded = true; that.doMenu(2); @@ -532,10 +532,14 @@ async function selectTreeData(that) { let obj = {}; nodes.forEach((d) => { let modelId = d.modelId; - if (!obj[modelId]) { - obj[modelId] = []; + if (modelId) { + if (!obj[modelId]) { + obj[modelId] = []; + } + if(d.glid){ + obj[modelId].push(d.glid); + } } - obj[modelId].push(d.glid); }); for (let modelId in obj) { let glids = obj[modelId];