形象进度

dev_xd
lj7788@126.com 2025-07-09 12:07:10 +08:00
parent c2dafcc271
commit eb26185e00
2 changed files with 91 additions and 37 deletions

View File

@ -234,24 +234,23 @@
<span class="sp-text">电箱监控</span>
</div>
</div>
<div class="plan-chart" :class="{ isShow: leftShow, isHide: !leftShow }" v-if="mode=='plan'">
<div class="plan-legend" :class="{ isShow: leftShow, isHide: !leftShow }" v-if="mode == 'plan'">
<div class="plan-item">
<span style="background:rgba(59, 255, 0,1)"></span>
<span style="background: rgba(59, 255, 0, 1)"></span>
<span>提前完工</span>
</div>
<div class="plan-item">
<span style="background:rgba(255,255,255,1)"></span>
<div class="plan-item">
<span style="background: rgba(255, 255, 255, 1)"></span>
<span>正常完工</span>
</div>
<div class="plan-item">
<span style="background:rgba(250, 0, 0,1)"></span>
<div class="plan-item">
<span style="background: rgba(250, 0, 0, 1)"></span>
<span>延迟完工</span>
</div>
<div class="plan-item">
<span style="background:rgba(0,0, 255,1)"></span>
<div class="plan-item">
<span style="background: rgba(0, 0, 255, 1)"></span>
<span>正在施工</span>
</div>
</div>
<video-dialog ref="videoDlg"></video-dialog>
</div>
@ -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 {

View File

@ -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];