{"remainingRequest":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\bzzgj-fvue\\src\\views\\Mobile\\Device\\AlarmData.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\src\\views\\Mobile\\Device\\AlarmData.vue","mtime":1695626572392},{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/web.dom.iterable\";\nimport \"core-js/modules/es6.function.name\";\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nimport dictUtils from '@/components/dict/DictSelectUtils.js';\nimport equipmentManage from '@/api/device/equipmentManage.js';\nimport req from '@/request.js';\nimport navBar from \"../components/navBar.vue\";\nexport default {\n name: 'RealtimeData',\n components: {\n navBar: navBar\n },\n data: function data() {\n return {\n value: '',\n handleStatusList: [],\n finished: true,\n title: '告警数据',\n protal: window.context.portal,\n deviceId: '',\n deviceData: {},\n queryParam: {\n pageBean: {\n page: 1,\n pageSize: -1,\n showTotal: true\n },\n querys: [{\n group: 'main',\n operation: 'EQUAL',\n parentGroup: '',\n property: 'warn.DEVICE_CODE_',\n relation: 'AND',\n value: this.$route.query.item.code\n }],\n sorter: [{\n direction: 'DESC',\n property: 'createTime'\n }]\n },\n loading: false,\n type: '',\n realtimeData: [],\n // hazard: [\n // // 危险源监测\n // {\n // value: '',\n // name: '采集时间'\n // },\n // {\n // value: '',\n // name: '气体浓度'\n // }\n // ],\n // barricade: [\n // // 升降路障\n // {\n // value: '',\n // name: '操作人'\n // },\n // {\n // value: '',\n // name: '动作标识'\n // },\n // {\n // value: '',\n // name: '动作状态'\n // }\n // ],\n // water: [\n // // 低洼积水监测\n // {\n // value: '',\n // name: '采集时间'\n // },\n // {\n // value: '',\n // name: '水位高度'\n // }\n // ],\n // signboaerd: [\n // // 标志牌监测\n // {\n // value: '',\n // name: '电池电量',\n // unit: '%'\n // },\n // {\n // value: '',\n // name: '数据类型'\n // },\n // {\n // value: '',\n // name: 'X轴角度',\n // unit: '°'\n // },\n // {\n // value: '',\n // name: 'Y轴角度',\n // unit: '°'\n // },\n // {\n // value: '',\n // name: 'Z轴角度',\n // unit: '°'\n // },\n // {\n // value: '',\n // name: '设备电压',\n // unit: 'v'\n // }\n // ],\n dataTypeList: [],\n actionList: [],\n statusList: [],\n hasData: true\n };\n },\n created: function created() {\n this.handleStatusList = dictUtils.getDictItemsFromCache('clzt');\n this.handleStatusList = this.handleStatusList.map(function (item) {\n return {\n text: item.name,\n value: item.value\n };\n });\n },\n mounted: function mounted() {\n this.dataTypeList = dictUtils.getDictItemsFromCache('sjlx');\n this.actionList = dictUtils.getDictItemsFromCache('dzbs');\n this.statusList = dictUtils.getDictItemsFromCache('cgzt');\n this.deviceId = this.$route.query.item;\n this.getRealtimeData();\n this.getDevice(this.deviceId.id);\n },\n methods: {\n onClickLeft: function onClickLeft() {\n this.$router.go(-1);\n },\n getDevice: function getDevice(id) {\n var _this = this;\n\n equipmentManage.deviceDetailsInfo(id, function (res) {\n _this.deviceData = res; // 设备详情\n\n console.log(_this.deviceData, '设备详情');\n });\n },\n getRealtimeData: function getRealtimeData() {\n var _this2 = this;\n\n this.finished = false;\n var params = {\n url: \"\".concat(this.protal, \"/device/warnInfo/query\"),\n data: this.queryParam,\n method: 'post'\n };\n req.request(params).then(function (res) {\n if (res.data.rows.length != 0) {\n _this2.finished = true;\n res.data.rows.forEach(function (item) {\n _this2.handleStatusList.forEach(function (val) {\n if (item.handleStatus == val.value) {\n item['handleStatus'] = val.text;\n }\n });\n });\n _this2.realtimeData = res.data.rows; // this.type = res.data.value.productType\n // this.formatData()\n } else {\n _this2.hasData = false;\n }\n });\n } // formatData() {\n // if (this.type == 'hazard') {\n // for (let key in this.realtimeData) {\n // if (key == 'collTime') {\n // this.hazard[0].value = this.realtimeData[key]\n // } else if (key == 'sdata') {\n // this.hazard[1].value = this.realtimeData[key]\n // }\n // }\n // this.realtimeData = this.hazard\n // } else if (this.type == 'barricade') {\n // for (let key in this.realtimeData) {\n // if (key == 'createBy') {\n // this.barricade[0].value = this.realtimeData[key]\n // } else if (key == 'action') {\n // this.actionList.forEach(type => {\n // if (this.realtimeData[key] == type.value) {\n // this.barricade[1].value = type.name\n // }\n // })\n // } else if (key == 'status') {\n // this.statusList.forEach(type => {\n // if (this.realtimeData[key] == type.value) {\n // this.barricade[2].value = type.name\n // }\n // })\n // }\n // }\n // this.realtimeData = this.barricade\n // } else if (this.type == 'water') {\n // for (let key in this.realtimeData) {\n // if (key == 'collTime') {\n // this.water[0].value = this.realtimeData[key]\n // } else if (key == 'sdata') {\n // this.water[1].value = this.realtimeData[key]\n // }\n // }\n // this.realtimeData = this.water\n // } else if (this.type == 'signboaerd') {\n // for (let key in this.realtimeData) {\n // if (key == 'batteryValue') {\n // this.signboaerd[0].value = this.realtimeData[key]\n // } else if (key == 'dataType') {\n // this.dataTypeList.forEach(type => {\n // if (this.realtimeData[key] == type.value) {\n // this.signboaerd[1].value = type.name\n // }\n // })\n // } else if (key == 'angleX') {\n // this.signboaerd[2].value = this.realtimeData[key]\n // } else if (key == 'angleY') {\n // this.signboaerd[3].value = this.realtimeData[key]\n // } else if (key == 'angleZ') {\n // this.signboaerd[4].value = this.realtimeData[key]\n // } else if (key == 'batteryVoltage') {\n // this.signboaerd[5].value = this.realtimeData[key]\n // }\n // }\n // this.realtimeData = this.signboaerd\n // }\n // }\n\n }\n};",null]}