| 
					
				 | 
			
			
				@@ -455,3 +455,180 @@ function flash(objArray) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 }
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 function queryDeviceStatus(evt) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     objArray = evt.data;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    // objArray.forEach(function (deviceobj) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    //     obj = app.query("#" + deviceobj.ownerCode)[0];
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    //     obj.on('update', function () {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    //         obj.style.color = '#FF0000'
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    //         obj.style.opacity = 0.5 + 0.5 * Math.sin(2 * app.elapsedTime / 500);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    //     }, '每帧改变透明度');
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    // })
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    obj = app.query("#" + objArray)[0];
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    obj.on('update', function () {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        obj.style.color = '#FF0000'
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        obj.style.opacity = 0.5 + 0.5 * Math.sin(2 * app.elapsedTime / 500);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }, '每帧改变透明度');
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+}
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+function reset(objArray) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    objArray.forEach(function (obj) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        obj.style.opacity = 1.0;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        obj.style.color = null;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        obj.off('update', null, '每帧改变透明度');
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    })
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+}
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+var timer = null;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+function getTabledata(d) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    var ygArray = [];
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    d.forEach(function (d) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        var deviceInfo = {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            "设备编号": d.ownerCode,
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            "设备名称": d.ownerName,
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            "安装位置": d.unitinfo,
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        };
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        ygArray.push(deviceInfo)
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    })
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    // 表格数据//创建对象 book
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    var tableData = {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        // 列标题
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        props: ['设备编号', '设备名称', '安装位置'],
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        // 列数据
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        items: ygArray
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    };
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    return tableData;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+}
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+function createPerson(name, age, family) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    var o = new Object();
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    o.name = name;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    o.age = age;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    o.family = family;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    o.say = function () {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        alert(this.name);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    return o;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+}
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+function destroyPanel() {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    var mydiv = document.getElementById('mydiv')
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    mydiv.remove();
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+}
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+//====================
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+function updateData(obj) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    /** ******************* 以下为websoket数据对接 ********************/
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    // 对接自有websoket服务器
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    if (!webSocket) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        // 如果网站是 https 则对应 wss
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        // 如果网站是 http 则对应 ws 即可
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        webSocket = new WebSocket('ws://101.133.214.75:8080/Device_Manager/socket');
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        // 建立 websocket 连接成功触发事件
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        webSocket.onopen = function () {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        };
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        // 接收服务端数据时触发事件
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        webSocket.onmessage = function (evt) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            queryDeviceStatus(evt);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        };
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        webSocket.onclose = function (evt) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            webSocket = null;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        }
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+}
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+//接收父级页面数据
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+function userListener(data) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    buildingStore = data.data;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+}
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+// 监听用户页面传回的数据 并调用 ThingJS 页面方法
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+window.addEventListener('message', function (e) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    var _this=this;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    var array;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    var data = e.data;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    var funcName = data.funcName;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    var param = data.param;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    var company_code = e.data.param.company_code
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    // 调用 ThingJS 页面方法
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    window[funcName](param);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    //请求场景url的json文件
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    $.ajax({
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        type: "GET",
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        url:'/uploads/wechat/163607/file/杨浦16/park.json',
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        dataType: "json",
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        success: function (data) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            for(let i = 0; i < data.array.length; i++){
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if(company_code === data.array[i].id){
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    campusUrl = data.array[i]
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    _this.changeScene(campusUrl);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    _this.createWidgets();
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                }
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            }
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        }
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    });
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+});
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+//父级页面数据处理
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+function cleanObj(arr, key) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    var map = {},
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        dest = [];
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    for (var i = 0; i < arr.length; i++) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        var ai = arr[i];
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (!map[ai.min_level]) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            dest.push({
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                min_level: ai.min_level,
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                item: [ai]
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            });
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            map[ai.min_level] = ai;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } else {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            for (var j = 0; j < dest.length; j++) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                var dj = dest[j];
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (dj.min_level == ai.min_level) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    dj.item.push(ai);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    break;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                }
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            }
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        }
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    return dest;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+}
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+function uniq(array) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    var temp = []; //一个新的临时数组
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    for (var i = 0; i < array.length; i++) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (temp.indexOf(array[i]) == -1) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            temp.push(array[i]);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        }
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    return temp;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+}
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+//设备点位标识
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+// function createDeviceElement(deviceType, floorNum) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+//     removeMark();
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+//     let data = cleanObj(buildingStore);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+//     for (var i = 0; i < data.length; i++) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+//         if (data[i].min_level == floorNum) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+//             let arry = data[i].item;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+//             for (var q = 0; q < arry.length; q++) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+//                 if (arry[q].dwtype == deviceType) {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+//                     let devicename = arry[q].device_name;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+//                     let dwtype = arry[q].dwtype;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+//                     var ownercode = arry[q].owner_code
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+//                     var textAndPictureMarkerHtml =
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+//                         `<div  class="textAndPictureMarker" onclick="deviceIcon_click('${dwtype}','${floorNum}','${ownercode}')" style="position: absolute;">
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+// 			<div class="text" style="color: #FF0000;font-size: 12px;text-shadow: white  0px 2px, white  2px 0px, white  -2px 0px, white  0px -2px, white  -1.4px -1.4px, white  1.4px 1.4px, white  1.4px -1.4px, white  -1.4px 1.4px;margin-bottom: 5px;">
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+// 				`+ devicename + `
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+// 			</div>
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+// 			<div class="picture" style="height: 30px;width: 30px;margin: auto;">
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+// 				<img src="/guide/examples/images/navigation/pointer.png" style="height: 100%;width: 100%;">
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+// 			</div>
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+// 		</div>`;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+//                     $('#div3d').append($(textAndPictureMarkerHtml));
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+//                     createUIAnchor(floorNum);
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+//                 }
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+//             }
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+//         }
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+//     }
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+// }
 
			 |