diff --git a/ruoyi-ui/src/views/JiHeExpressway/components/HeaderMenu/WarningList.vue b/ruoyi-ui/src/views/JiHeExpressway/components/HeaderMenu/WarningList.vue index 9dc62be7..30e07b75 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/components/HeaderMenu/WarningList.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/components/HeaderMenu/WarningList.vue @@ -201,7 +201,7 @@ export default { }) } else if(this.activeTab === 'fifth'){ request({ - url: `/deviceOfflineRecord/list?pageSize=${this.searchData.pageSize}&pageNum=${this.searchData.pageNum}`, + url: `/deviceOfflineRecord/list?status=0&orderByColumn=createTime&isAsc=desc&pageSize=${this.searchData.pageSize}&pageNum=${this.searchData.pageNum}`, method: "GET", }) .then((result) => { diff --git a/ruoyi-ui/src/views/JiHeExpressway/components/VideoMulti/index.vue b/ruoyi-ui/src/views/JiHeExpressway/components/VideoMulti/index.vue index 87a6227d..7aa8d3c7 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/components/VideoMulti/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/components/VideoMulti/index.vue @@ -69,6 +69,7 @@ export default { methods: { handleClose() { this.controlDialogVisible = false; + this.player?.destroy(); }, cameraChange() { console.log('chanage.======') diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/solar/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/solar/index.vue index 480cd0fe..429ae61f 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/solar/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/solar/index.vue @@ -147,21 +147,24 @@ // }) }, initTotal(){ - // request({ - // url: 'business/device/properties/deviceAnalysis', - // method: 'post', - // data:{ - // dateTime: this.date, - // deviceType: item.deviceType, - // deviceId: item.deviceId - // } - // }).then(result => {}) - this.titles[0].value='22.4512'; - this.titles[1].value='22.4512'; - this.titles[2].value='88.88'; - this.titles[3].value='8888'; - this.titles[4].value='8888'; - this.titles[5].value='1'; + request({ + url: 'business/device/properties/latestOne', + method: 'get' + }).then(result => { + if (result.code != 200) return; + this.titles[0].value= result.data.theAccumulatedChargeOfTheYear; + this.titles[1].value= result.data.cumulativeElectricityConsumptionInTheYear; + this.titles[2].value= result.data.carbonEmissionReduction; + this.titles[3].value= result.data.equivalentTree; + this.titles[4].value= result.data.standardCoal; + }) + request({ + url: 'business/device/properties/solarDeviceStatistics', + method: 'get' + }).then(result => { + if (result.code != 200) return; + this.titles[5].value= result.data.count; + }) }, initChart(){ const _chartsOptions = { @@ -181,7 +184,8 @@ }, xAxis: { type: 'category', - data: ['0点', '2点', '4点', '6点', '8点', '10点', '12点', '14点', '16点', '18点', '20点', '22点'], + data: ['0点', '1点', '2点','3点', '4点','5点','6点','7点','8点', '9点','10点','11点', + '12点','13点','14点','15点','16点','17点','18点','19点','20点','21点','22点','23点'], axisLine:{ show:true, lineStyle:{ @@ -235,24 +239,64 @@ if(!this.chart1){ this.chart1 = echarts.init(document.getElementById("charts1")); let option1 = JSON.parse(JSON.stringify(_chartsOptions)); - this.chart1Total1 = 1212; - option1.series[0].data=[820, 932, 901, 934, 1290, 1330, 1320,820, 932, 901, 934,832] - this.chart1.setOption(option1)//{..._chartsOptions,...{title:{text:'今日发电统计'}}}); - this.chart1.resize(); - + request({ + url: 'business/device/properties/history/oneDay/dailyAccumulatedCharge', + method: 'get' + }).then(result => { + if (result.code != 200) return; + const data = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] + const total = 0; + for(let i in result.data){ + total += result.data[i] + const idx = parseInt(i.substr(11,2)); + data[idx] = result.data[i]; + } + this.chart1Total1 = total; + option1.series[0].data = data; + this.chart1.setOption(option1); + this.chart1.resize(); + }) + this.chart2 = echarts.init(document.getElementById("charts2")); let option2 = JSON.parse(JSON.stringify(_chartsOptions)); - this.chart1Total2 = 1212; - option2.series[0].data=[820, 932, 901, 934, 1290, 1330, 1320,820, 932, 901, 934,832] - this.chart2.setOption(option2)//{..._chartsOptions,...{title:{text:'今日发电统计'}}}); - this.chart2.resize(); - + request({ + url: 'business/device/properties/history/oneDay/cumulativeElectricityConsumptionOnTheDay', + method: 'get' + }).then(result => { + if (result.code != 200) return; + const data = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] + const total = 0; + for(let i in result.data){ + total += result.data[i] + const idx = parseInt(i.substr(11,2)); + data[idx] = result.data[i]; + } + this.chart1Total2 = total; + option2.series[0].data = data; + this.chart2.setOption(option2); + this.chart2.resize(); + }) + // 发电功率 this.chart3 = echarts.init(document.getElementById("charts3")); let option3 = JSON.parse(JSON.stringify(_chartsOptions)); - this.chart1Total3 = 1212; - option3.series[0].data=[820, 932, 901, 934, 1290, 1330, 1320,820, 932, 901, 934,832] - this.chart3.setOption(option3)//{..._chartsOptions,...{title:{text:'今日发电统计'}}}); - this.chart3.resize() + request({ + url: 'business/device/properties/history/oneDay/generatingPower', + method: 'get' + }).then(result => { + if (result.code != 200) return; + const data = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] + const total = 0; + for(let i in result.data){ + total += result.data[i] + const idx = parseInt(i.substr(11,2)); + data[idx] = result.data[i]; + } + this.chart1Total3 = total; + option3.series[0].data = data; + this.chart3.setOption(option3); + this.chart3.resize() + }) + } window.addEventListener("resize", () => { if(this.chart1){