1
0
Fork 0
management/front/dkha-web-sz-main/node_modules/.cache/babel-loader/f11e6da5a5bd8efb8086ea73065...

1 line
18 KiB
JSON
Raw Normal View History

2023-12-18 13:12:25 +08:00
{"remainingRequest":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\src\\websocket\\system.js","dependencies":[{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\src\\websocket\\system.js","mtime":1614735254000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\babel-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/es7.object.get-own-property-descriptors\";\nimport \"core-js/modules/web.dom.iterable\";\nimport \"core-js/modules/es6.object.keys\";\nimport \"core-js/modules/es6.regexp.split\";\nimport _defineProperty from \"C:\\\\Users\\\\27446\\\\Desktop\\\\up\\\\front\\\\dkha-web-sz-main\\\\node_modules\\\\@babel\\\\runtime-corejs2/helpers/esm/defineProperty\";\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nexport default {\n data: function data() {\n return {\n systemCount: 0,\n electricData: {},\n electricArr: [],\n // 电流预警\n thermaArr: [],\n // 管道预警\n temp: {\n pm: 0,\n temperature: 0,\n humidity: 0\n }\n };\n },\n created: function created() {\n this.systemCount = 0;\n this.initSystemWebsocket();\n },\n methods: {\n initSystemWebsocket: function initSystemWebsocket() {\n var _this2 = this;\n\n var _this = this; // 尝试建立websocket连接\n\n\n try {\n var environment_websockt = new WebSocket(window.GLOBAL_CONFIG['socketURL']); // 监听socket连接\n\n environment_websockt.onopen = function () {\n console.log(\"websocket连接成功\");\n };\n\n environment_websockt.onclose = function () {\n console.log(\"websocket连接已关闭\");\n };\n\n environment_websockt.onerror = function () {\n console.log(\"websocket连接失败\");\n };\n\n environment_websockt.onmessage = function (res) {\n var data = JSON.parse(res.data); // 环境传感器数据\n\n if (data.type == 1) {\n // 提交到Vuex\n _this.$store.commit('system/UPDATE_ENVIRONMENT_LIST', data.data.map(function (item) {\n if (item.mbdDevicesn == '20103') {\n _this2.temp = {\n pm: item.pm,\n temperature: item.temperature,\n humidity: item.humidity\n };\n }\n\n return _objectSpread({}, item, {\n coordinate: item.coordinate.split(\",\"),\n floorAddr: item.floorAddr.split(\",\")\n });\n })); // 存储到本地 避免刷新页面的时候 报警数据 消失\n // localStorage.setItem(\"shenzhen_school_environment_wangring\", JSON.stringify(data.data))\n\n } // 宿舍用电报警数据和宿舍管道预警数据\n else if (data.type == 2 || data.type == 4 && data.data.tfDevicetype < 4) {\n console.log(data.type);\n data.data.tfaEcurrent = (data.data.tfaEcurrent * 1).t