+ ">
是否确定删除该设备
@@ -108,7 +94,7 @@ function loadModel(path) {
(obj) => {
resolve(obj);
},
- (xhr) => {},
+ (xhr) => { },
(err) => {
reject(err);
}
@@ -174,6 +160,8 @@ function rClickCallback(demo) {
demo.addFunction("editDev", editDev);
}
+
+
// 添加设备
function handleAddEqu(formInfo) {
if (!formInfo.equipmentType) {
@@ -221,6 +209,53 @@ function handleCancel() {
demo._resetState();
demo.clearTagsObj();
}
+//现在首先有二种方案,是写在TunnelScene.vue中还是demo.js中呢?
+//我认为可能看数据在哪获取?到时候看在哪里导入,首先我们放在TunnelScene里面吧
+//因为没获取到接口,我们先写死!!!
+//需要参考接口的数据结构!!!,主要是传入函数的参数应该是什么结构???
+const ThreeConfig = {
+ code: 0,
+ data: {
+ tunnelThreeConfig: {
+ fan: ['point_005_tl', 'point_009_bl'],
+ sensors: ['point_018_br', 'point_021_bl'],
+ }
+ },
+ msg: "dda",
+}
+[{ type: 'fan', point: '' }, {}]
+// fan: ['point_005_tl', 'point_009_bl'],
+// sensors: ['point_018_br', 'point_021_bl'],
+// }
+const tunnelConfigEquipment = ThreeConfig.data.tunnelThreeConfig
+const tunnelKeys = Object.keys(tunnelConfigEquipment);
+console.log(tunnelKeys);
+
+function tunnelModeInit() {
+ for (let key in ThreeConfig.data.tunnelThreeConfig) {
+ if (ThreeConfig.data.tunnelThreeConfig.hasOwnProperty(key)) {
+ switch (key) {
+ case 'fan':
+ ThreeConfig.data.tunnelThreeConfig.fan.forEach(fan => {
+ // 对 fan 进行操作
+ console.log(fan);
+ });
+ break;
+ case 'sensors':
+ ThreeConfig.data.tunnelThreeConfig.sensors.forEach(sensor => {
+ // 对 sensor 进行操作
+ console.log(sensor);
+ });
+ break;
+ default:
+ // 处理其他键值对
+ console.log(key, ThreeConfig.data.tunnelThreeConfig[key]);
+ }
+ }
+ }
+}
+tunnelModeInit()
+