diff --git a/public/images/alarm_tips.mp3 b/public/images/alarm_tips.mp3 index 085d7fca..83e4b140 100644 Binary files a/public/images/alarm_tips.mp3 and b/public/images/alarm_tips.mp3 differ diff --git a/src/api/iot/project_new.js b/src/api/iot/project_new.js index f363c2dd..09393d91 100644 --- a/src/api/iot/project_new.js +++ b/src/api/iot/project_new.js @@ -117,3 +117,31 @@ export function projectEneElectricityTable(query) { params: query }); } + +// 查询 负载 图表 +export function projectElectricityStatChart(query) { + return request({ + url: "/iot/project/monitor/electricityStatChart", + method: "get", + params: query + }); +} + + +// 查询 负载 图表 年 +export function projectElectricityStatChartYear(query) { + return request({ + url: "/iot/project/monitor/electricityStatChartYear", + method: "get", + params: query + }); +} + +// 查询 电能 列表 +export function projectElectricityTable(query) { + return request({ + url: "/iot/project/monitor/electricityStatLst", + method: "get", + params: query + }); +} diff --git a/src/config/env.js b/src/config/env.js index 8e15503a..ec52a770 100644 --- a/src/config/env.js +++ b/src/config/env.js @@ -12,6 +12,7 @@ let iotWebSocketAlarmBaseUrl = '' let bigWebSocketUrl = '' let port = '8899' let webSocketProjectGatewayUrl = '' +let hrefHostUrl = ''; // window.dasConfig = { // ip: 'http://192.168.10.241:32024' @@ -41,8 +42,10 @@ if (env.NODE_ENV == 'development') { port = window.dasConfig.port } else if(env.NODE_ENV == 'test') { } -iotWebSocketAlarmBaseUrl = sysWebSocket + hrefHost + ':8899/ws/alarm/live' sysWebSocket = sysWebSocket + hrefHost + ( port ? ':'+ port :''); +hrefHostUrl = + +iotWebSocketAlarmBaseUrl = sysWebSocket + '/ws/alarm/live'; bigWebSocketUrl = sysWebSocket + '/ws/dev/readData' webSocketProjectGatewayUrl = sysWebSocket + '/ws/dev/projectDeviceLive' iotWebSocketBaseUrl = sysWebSocket + '/ws/dev/up/' diff --git a/src/utils/hciot.js b/src/utils/hciot.js index 745e5435..2c1a7d42 100644 --- a/src/utils/hciot.js +++ b/src/utils/hciot.js @@ -4,6 +4,8 @@ */ import { Loading } from 'element-ui'; +const baseHref = process.env.NODE_ENV === "production" ? `${window.dasConfig.protocol}${window.dasConfig.ip}${window.dasConfig.port ? ':'+window.dasConfig.port : ''}` : process.env.VUE_APP_BASE_API + const baseURL = process.env.VUE_APP_BASE_API const targetURL = process.env.target @@ -162,8 +164,8 @@ export function getIotFileUrl(importUrl) { if (importUrl.indexOf('http') === 0 || importUrl.indexOf('https') === 0) { return importUrl; } else if (importUrl.indexOf('/profile/upload/') === 0 || importUrl.indexOf('/profile/avatar/') === 0) { - console.log('baseUrl:', baseURL + importUrl); - return baseURL + importUrl; + console.log('baseUrl:', baseHref + baseURL + importUrl); + return baseHref + baseURL + importUrl; } else if (importUrl.indexOf('data:image/') === 0 || importUrl.indexOf('/static/') === 0) { return importUrl; } diff --git a/src/views/bigScreen/v3/index.vue b/src/views/bigScreen/v3/index.vue index f844eebe..2124d32c 100644 --- a/src/views/bigScreen/v3/index.vue +++ b/src/views/bigScreen/v3/index.vue @@ -262,7 +262,7 @@ export default { return; } this.stompClient = new WebSocket( - `${bigWebSocketUrl}/${this.getGuid()}/${this.projectId || -1}` + `${bigWebSocketUrl}/${this.getGuid()}/${this.$store.getters.userId}/${this.projectId || -1}` ); this.stompClient.onmessage = this.socket_onmsg; this.stompClient.onclose = this.socket_onclose; diff --git a/src/views/bigScreen/v3/profile/ETrendCensus.vue b/src/views/bigScreen/v3/profile/ETrendCensus.vue index cbcabdd9..29644ba2 100644 --- a/src/views/bigScreen/v3/profile/ETrendCensus.vue +++ b/src/views/bigScreen/v3/profile/ETrendCensus.vue @@ -57,7 +57,7 @@ export default { left: "20", right: "20", bottom: "5", - top: 30, + top: 70, containLabel: true, }, xAxis: { @@ -162,12 +162,11 @@ export default { }, watch: { result: { - handler: function (val, oldVal) { - console.log('result---:', val) + handler: function (val) { this.resultOption.xAxis.data = val["name"]; - this.resultOption.series[0].data = val["ELECTRICITY_METER"]; - this.resultOption.series[1].data = val["WATER_METER"]; - this.resultOption.series[2].data = val["GAS_METER"]; + this.resultOption.series[0].data = val["electricityMeter"]; + this.resultOption.series[1].data = val["waterMeter"]; + this.resultOption.series[2].data = val["gasMeter"]; this.updateEcharts(); }, deep: true, diff --git a/src/views/bigScreen/v3/profile/NotificationAlarm.vue b/src/views/bigScreen/v3/profile/NotificationAlarm.vue index c5cf547e..01203b7e 100644 --- a/src/views/bigScreen/v3/profile/NotificationAlarm.vue +++ b/src/views/bigScreen/v3/profile/NotificationAlarm.vue @@ -41,7 +41,7 @@ width="100%" > - {{ alarmInfo['address'] }} + {{ alarmInfo['projectAddress'] }} @@ -49,7 +49,7 @@
{{ alarmInfo['alarmContent'] }}{{ alarmInfo['alarmContent'] || '--' }}
@@ -59,7 +59,7 @@ + diff --git a/src/views/iot/project/profileV2/SafetyTemplate/index.vue b/src/views/iot/project/profileV2/SafetyTemplate/index.vue index 96adcadf..3468a763 100644 --- a/src/views/iot/project/profileV2/SafetyTemplate/index.vue +++ b/src/views/iot/project/profileV2/SafetyTemplate/index.vue @@ -273,7 +273,7 @@ export default { watch: { sourceId(val) { if (val !== null && val !== undefined) { - this.init(); + this.handleQuery(); } }, tempType(val) { @@ -288,6 +288,7 @@ export default { }, methods: { init() { + this.queryParams.timeType = 'day' this.time = this.queryParams.timeType === "day" ? this.parseTime(new Date(), "{y}-{m}-{d} 00:00:00") diff --git a/src/views/iot/project/profileV2/details.vue b/src/views/iot/project/profileV2/details.vue index e094ff9c..0df5d222 100644 --- a/src/views/iot/project/profileV2/details.vue +++ b/src/views/iot/project/profileV2/details.vue @@ -120,6 +120,7 @@ import ELeakageCurrent from './SafetyTemplate/ELeakageCurrent' import EDebuff from './SafetyTemplate/EDebuff' import EDeviceSwitchWarning from './SafetyTemplate/EDeviceSwitchWarning' import EElectricity from './EnergyManage/EElectricity' +import EEnergyLoad from './EnergyManage/EEnergyLoad' export default { name: "projectDetailV2", @@ -140,7 +141,8 @@ export default { ELeakageCurrent, EDebuff, EDeviceSwitchWarning, - EElectricity + EElectricity, + EEnergyLoad }, props: { sourceId: { @@ -232,14 +234,19 @@ export default { ] }, { - label: "综合管理", - key: "energy", + label: "能源管理", + key: "energyManage", children: [ { label: "电量", key: "electricity", template: "EElectricity", }, + { + label: "负载", + key: "energyLoad", + template: "EEnergyLoad", + }, ], }, ],