main
wangqiujuan0808 2023-12-15 13:13:36 +08:00
parent 370b5089c3
commit 5c070bbc93
7 changed files with 192 additions and 37 deletions

View File

@ -86,17 +86,11 @@ const handleNodeClick = (value) => {
width: 224px;
margin: 0 10px;
background: transparent;
color: #3cbfdf;
color: #fff;
}
.el-select {
margin: 10px;
}
:deep(.el-input__wrapper) {
background: transparent;
}
:deep(.el-input__inner) {
color: #3cbfdf;
}
}
</style>

View File

@ -10,14 +10,46 @@
<span class="name">面积</span>
<span class="text">{{ buildInfo.area }}</span>
</div>
<div>
<span class="name">墙体厚度</span>
<span class="text">{{ buildInfo.qthd }}</span>
</div>
<div>
<span class="name">材料类型</span>
<span class="text">{{ buildInfo.cllx }}</span>
</div>
<div>
<span class="name">保温层类型</span>
<span class="text">{{ buildInfo.bwclx }}</span>
</div>
<div>
<span class="name">饰面材料</span>
<span class="text">{{ buildInfo.smcl }}</span>
</div>
<div>
<span class="name">承重能力</span>
<span class="text">{{ buildInfo.cznl }}</span>
</div>
<div>
<span class="name">状态</span>
<span class="text">{{ buildInfo.status }}</span>
</div>
<div>
<span class="name">启用日期</span>
<span class="text">{{ buildInfo.date }}</span>
</div>
<div>
<span class="name">上次修缮日期</span>
<span class="text">{{ buildInfo.lastDate }}</span>
</div>
<div>
<span class="name">描述</span>
<span class="text">{{ buildInfo.desc }}</span>
</div>
<!-- <div>
<span class="name">备注</span>
<span class="text">{{ buildInfo.remark }}</span>
</div> -->
</dv-border-box-10>
</div>
</template>
@ -35,7 +67,7 @@ const buildInfo = computed(() => bimStore().activateTree.info);
// background: #0a1f2e;
// border: 1px solid red;
width: 360px;
height: 340px;
// height: 420px;
display: flex;
flex-direction: column;
align-items: center;
@ -43,15 +75,15 @@ const buildInfo = computed(() => bimStore().activateTree.info);
:deep(.border-box-content) {
padding: 10px;
>div {
line-height: 48px;
line-height: 36px;
display: flex;
justify-content: space-between;
}
.name {
width: 25%;
width: 40%;
}
.text {
width: 75%;
width: 59%;
color: #fff;
}
}

View File

@ -42,8 +42,16 @@ const data = reactive({
info: {
name: '原料糖化车间',
area: '9436 ㎡',
qthd: '14 cm',
cllx: '砖石/混凝土/钢结构',
bwclx: '外墙保温',
smcl: '乳胶漆',
cznl: '22 kPa',
status: '启用',
desc: '原料糖化车间负责原料糖化启用于2011年'
date: '2021年11月11日',
lastDate: '2022年2月3日',
desc: '原料糖化车间负责原料糖化启用于2011年',
remark: '备注'
},
deviceInfo: [
{
@ -74,8 +82,16 @@ const data = reactive({
info: {
name: '糖化间',
area: '9436 ㎡',
qthd: '34 cm',
cllx: '钢结构',
bwclx: '外墙保温',
smcl: '乳胶漆',
cznl: '22 kPa',
status: '启用',
desc: '糖化间负责原料糖化启用于2011年'
date: '2021年3月11日',
lastDate: '2022年5月20日',
desc: '原料糖化车间负责原料糖化启用于2011年',
remark: '备注'
},
deviceInfo: [
{
@ -106,9 +122,17 @@ const data = reactive({
clickName: 'yuanliao_room',
info: {
name: '原料处理间',
area: '9436 ㎡',
area: '36 ㎡',
qthd: '4 cm',
cllx: '混凝土',
bwclx: '外墙保温',
smcl: '乳胶漆',
cznl: '22 kPa',
status: '启用',
desc: '原料糖化车间负责原料糖化启用于2011年'
date: '2013年11月11日',
lastDate: '2020年12月3日',
desc: '原料糖化车间负责原料糖化启用于2011年',
remark: '备注'
},
deviceInfo: [
{
@ -139,9 +163,17 @@ const data = reactive({
clickName: 'touliao_room',
info: {
name: '投料间',
area: '836 ㎡',
area: '936 ㎡',
qthd: '15 cm',
cllx: '砖石/混凝土/钢结构',
bwclx: '内墙保温',
smcl: '石材',
cznl: '12 kPa',
status: '启用',
desc: '投料间负责原料糖化启用于2011年'
date: '20200年11月11日',
lastDate: '2022年2月3日',
desc: '原料糖化车间负责原料糖化启用于2011年',
remark: '备注'
},
deviceInfo: [
{
@ -173,6 +205,23 @@ const data = reactive({
});
const { buildValue, treeData, checkedkeys } = toRefs(data);
const emit = defineEmits(['handleNodeClick'])
Bus.on('handleTreeClick', (obj) => {
let o = treeData.value[0].children.find(ele => {
return ele.clickName == obj.parent.name;
})
if (o) {
nextTick(() => {
checkedkeys.value = o.id;
handleNodeClick(o);
})
}
})
onUnmounted(() => {
Bus.off("handleTreeClick")//
});
onMounted(() => {
nextTick(() => {
checkedkeys.value = treeData.value[0].id;

View File

@ -69,10 +69,10 @@ const openDialog = () => {
<style lang='scss' scoped>
.deviceDiv {
position: absolute;
top: 380px;
bottom: 20px;
right: 10px;
width: 360px;
height: 380px;
height: 330px;
display: flex;
flex-direction: column;
align-items: center;

View File

@ -60,7 +60,7 @@ const data = reactive({
},
{
label: '过滤槽',
id: '0-1',
id: '0-2',
clickName: 'set6',
info: {
name: '过滤槽',
@ -75,7 +75,7 @@ const data = reactive({
},
{
label: '设备二',
id: '0-2',
id: '0-3',
clickName: 'set2',
info: {
name: '设备二',
@ -89,7 +89,7 @@ const data = reactive({
},
{
label: '设备三',
id: '0-3',
id: '0-4',
clickName: 'set3',
info: {
name: '设备三',
@ -103,7 +103,7 @@ const data = reactive({
},
{
label: '设备四',
id: '0-4',
id: '0-5',
clickName: 'set4',
info: {
name: '设备四',
@ -115,6 +115,48 @@ const data = reactive({
},
children: []
},
{
label: '设备五',
id: '0-6',
clickName: 'set5',
info: {
name: '设备五',
type: '安防设备',
status: '启用',
location: '漳州厂区糖化间',
belong: '漳州厂区',
date: '2025-12-15'
},
children: []
},
{
label: '设备七',
id: '0-7',
clickName: 'set7',
info: {
name: '设备七',
type: '安防设备',
status: '启用',
location: '漳州厂区糖化间',
belong: '漳州厂区',
date: '2025-12-15'
},
children: []
},
{
label: '设备八',
id: '0-8',
clickName: 'set8',
info: {
name: '设备八',
type: '安防设备',
status: '启用',
location: '漳州厂区糖化间',
belong: '漳州厂区',
date: '2025-12-15'
},
children: []
},
],
}
],
@ -128,6 +170,24 @@ onMounted(() => {
handleNodeClick(treeData.value[0]);
})
});
Bus.on('handleTreeClick1', (obj) => {
let o = treeData.value[0].children.find(ele => {
return ele.clickName == obj.parent.name;
})
console.log(123, obj.parent.name);
if (o) {
nextTick(() => {
checkedkeys.value = o.id;
handleNodeClick(o);
})
}
})
onUnmounted(() => {
Bus.off("handleTreeClick")//
});
const handleNodeClick = (value) => {
bimStore().setActivateDeviceTree(value);
const isParent = value.children.length > 0;

View File

@ -7,6 +7,7 @@
<script setup>
import bimStore from '@/store/modules/bim';
import { onMounted } from 'vue';
import Bus from '@/utils/bus.js';
const menuList = [
{

View File

@ -174,7 +174,7 @@ const isSelent = (obj) => {
}
let selectedObjects = ref([]);
let selectBoxByClick, selectBoxByMouseon;
let selectBoxByClick, selectBoxByMouseon, pointLabel;
var marginLeft = 0;
var marginTop = 70;
//
@ -229,6 +229,17 @@ const onMouseDown = (event) => {
var selectedObject = isSelent(clickedObject);
//
boxLight(selectedObject);
if(bimStore().activateIndex == '0') {
//
Bus.emit('handleTreeClick', clickedObject);
return;
}
if(bimStore().activateIndex == '1') {
//
Bus.emit('handleTreeClick1', clickedObject);
return;
}
}
}
@ -352,6 +363,10 @@ const renders = () => {
let roamdObjects = ref([]);
//
const toHomeView = () => {
if (selectBoxByClick) {
scene.remove(selectBoxByClick);
}
removeLabel();
controls.reset();
}
//
@ -385,7 +400,7 @@ const addLabel = () => {
// console.log(123, obj);
centerSelectedGroup(obj);
let text = "设备二";
let pointLabel = createLableObj(text);
pointLabel = createLableObj(text);
obj.add(pointLabel);
labelRenderer.setSize(window.innerWidth, window.innerHeight);
labelRenderer.domElement.style.position = "absolute";
@ -404,9 +419,13 @@ const createLableObj = (text) => {
return pointLabel;
};
const removeLabel = () => {
if(pointLabel) {
isAddLabel.value = true;
document.body.removeChild(labelRenderer.domElement);
}
}
//
const setBottom = () => {
var target = scene.getObjectByName('floor2F');