修改初始化
This commit is contained in:
@@ -92,7 +92,7 @@ async function handleMounted() {
|
||||
// 给对象初加载设备模型
|
||||
demo.initDevicesModel(map);
|
||||
await Promise.all([map.get("equ_fan"), map.get("equ_sensors")]);
|
||||
demo.tunnelModeInit();
|
||||
// demo.tunnelModeInit()
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
}
|
||||
@@ -221,39 +221,7 @@ function handleCancel() {
|
||||
demo._resetState();
|
||||
demo.clearTagsObj();
|
||||
}
|
||||
//现在首先有二种方案,是写在TunnelScene.vue中还是demo.js中呢?
|
||||
//我认为可能看数据在哪获取?到时候看在哪里导入,首先我们放在TunnelScene里面吧
|
||||
//因为没获取到接口,我们先写死!!!
|
||||
//需要参考接口的数据结构!!!,主要是传入函数的参数应该是什么结构???
|
||||
const ThreeConfig = {
|
||||
code: 0,
|
||||
data: {
|
||||
tunnelThreeConfig: [{
|
||||
equipmentId: 'fan_01',//传感器id
|
||||
equipmentName: '01',//设备名称
|
||||
pointName: 'point_005_tl',//附着点名称(定位)
|
||||
equipmentType: 'fan',//设备类型(类型可根据后端
|
||||
equipmentValue: 23, //设备存的值
|
||||
}, {
|
||||
equipmentId: 'sensors_01',//传感器id
|
||||
equipmentName: '01',//设备名称
|
||||
pointName: 'point_009_bl',//附着点名称(定位)
|
||||
equipmentType: 'sensors',//设备类型(类型可根据后端
|
||||
equipmentValue: 67, //设备存的值
|
||||
}],
|
||||
},
|
||||
msg: "dda"
|
||||
}
|
||||
//取值方便操作
|
||||
// const tunnelConfigEquipment = ThreeConfig.data.tunnelThreeConfig
|
||||
|
||||
// function tunnelModeInit() {
|
||||
// for (const item of tunnelConfigEquipment) {
|
||||
// let pointmodel = demo.scene.getobjectByName(item.pointName)
|
||||
// console.log(pointmodel);
|
||||
// }
|
||||
// }
|
||||
// tunnelModeInit()
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user