fix: BUG修改
This commit is contained in:
parent
89970d51c1
commit
c56c50eb86
@ -92,7 +92,10 @@
|
|||||||
// window.parent.postMessage({ msg: dealArr, tip: 'hidden' });
|
// window.parent.postMessage({ msg: dealArr, tip: 'hidden' });
|
||||||
// });
|
// });
|
||||||
// 往父级传递
|
// 往父级传递
|
||||||
window.parent.postMessage({ msg: event.nodeIdArray, tip: 'hidden' });
|
window.parent.postMessage({
|
||||||
|
msg: event.nodeIdArray,
|
||||||
|
tip: "hidden",
|
||||||
|
});
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
// 设置监听事件(主要用于模型树显示)
|
// 设置监听事件(主要用于模型树显示)
|
||||||
@ -111,7 +114,10 @@
|
|||||||
// window.parent.postMessage({ msg: dealArr, tip: 'hidden' });
|
// window.parent.postMessage({ msg: dealArr, tip: 'hidden' });
|
||||||
// });
|
// });
|
||||||
// 往父级传递
|
// 往父级传递
|
||||||
window.parent.postMessage({ msg: event.nodeIdArray, tip: 'show' });
|
window.parent.postMessage({
|
||||||
|
msg: event.nodeIdArray,
|
||||||
|
tip: "show",
|
||||||
|
});
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -140,12 +146,12 @@
|
|||||||
}
|
}
|
||||||
// 处理数据
|
// 处理数据
|
||||||
function dealArrData(arr) {
|
function dealArrData(arr) {
|
||||||
arr.map(item => {
|
arr.map((item) => {
|
||||||
if(item.children && item.children.length > 0){
|
if (item.children && item.children.length > 0) {
|
||||||
dealArrData(item.children)
|
dealArrData(item.children);
|
||||||
}
|
}
|
||||||
dealArr.push({dbId: item.dbId})
|
dealArr.push({ dbId: item.dbId });
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
function renderConfigModel(obvApi) {
|
function renderConfigModel(obvApi) {
|
||||||
console.log(obvApi);
|
console.log(obvApi);
|
||||||
@ -161,6 +167,7 @@
|
|||||||
// 构件着色
|
// 构件着色
|
||||||
if (configValue.colorArr.length > 0) {
|
if (configValue.colorArr.length > 0) {
|
||||||
configValue.colorArr.map((item) => {
|
configValue.colorArr.map((item) => {
|
||||||
|
if (item.modelId) {
|
||||||
let firstIndex = item.color.indexOf(",");
|
let firstIndex = item.color.indexOf(",");
|
||||||
let secondIndex = item.color.indexOf(",", firstIndex + 1);
|
let secondIndex = item.color.indexOf(",", firstIndex + 1);
|
||||||
let thirdIndex = item.color.indexOf(")", -1);
|
let thirdIndex = item.color.indexOf(")", -1);
|
||||||
@ -172,6 +179,7 @@
|
|||||||
item.color.substring(secondIndex + 2, thirdIndex),
|
item.color.substring(secondIndex + 2, thirdIndex),
|
||||||
1
|
1
|
||||||
);
|
);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
// else {
|
// else {
|
||||||
|
|||||||
@ -89,10 +89,17 @@
|
|||||||
}
|
}
|
||||||
function renderConfigModel(obvApi) {
|
function renderConfigModel(obvApi) {
|
||||||
console.log(obvApi);
|
console.log(obvApi);
|
||||||
|
console.log(configValue.bimComponent);
|
||||||
// 构件着色
|
// 构件着色
|
||||||
if (configValue.bimComponent.length > 0) {
|
if (configValue.bimComponent.length > 0) {
|
||||||
// 构件着色
|
// 构件着色
|
||||||
obvApi.setObjectsColor(configValue.bimComponent, 51, 122, 183, 1);
|
configValue.bimComponent.map((item) => {
|
||||||
|
if(item.modelId){
|
||||||
|
// 构件着色
|
||||||
|
obvApi.setObjectsColor([item], 51, 122, 183, 1);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
// obvApi.setObjectsColor(configValue.bimComponent, 51, 122, 183, 1);
|
||||||
} else {
|
} else {
|
||||||
obvApi.restoreObjectsColor();
|
obvApi.restoreObjectsColor();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -11,7 +11,13 @@
|
|||||||
:value="item.value"
|
:value="item.value"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
<el-button type="primary" size="small" @click="saveSelected" v-if="formData.type == 1" style="margin-left: 10px;"
|
<el-color-picker
|
||||||
|
v-model="formData.color"
|
||||||
|
v-if="formData.type == 2"
|
||||||
|
style="margin-left: 10px;"
|
||||||
|
color-format="rgb"
|
||||||
|
></el-color-picker>
|
||||||
|
<el-button type="primary" size="small" @click="saveSelected" style="margin-left: 10px;"
|
||||||
>保存</el-button
|
>保存</el-button
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
@ -29,7 +35,7 @@
|
|||||||
>保存</el-button
|
>保存</el-button
|
||||||
>
|
>
|
||||||
</div> -->
|
</div> -->
|
||||||
<div class="data-show" v-if="formData.type == 2">
|
<!-- <div class="data-show" v-if="formData.type == 2">
|
||||||
<span>选中的数据值:</span>
|
<span>选中的数据值:</span>
|
||||||
<div class="selected-box">
|
<div class="selected-box">
|
||||||
<template v-show="selectedColorList.length > 0">
|
<template v-show="selectedColorList.length > 0">
|
||||||
@ -50,7 +56,7 @@
|
|||||||
<el-button type="primary" size="small" @click="saveSelected"
|
<el-button type="primary" size="small" @click="saveSelected"
|
||||||
>保存</el-button
|
>保存</el-button
|
||||||
>
|
>
|
||||||
</div>
|
</div> -->
|
||||||
</div>
|
</div>
|
||||||
<iframe
|
<iframe
|
||||||
:src="url"
|
:src="url"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user