diff --git a/ruoyi-ui/src/common/menuData.js b/ruoyi-ui/src/common/menuData.js index 9827e639..f58ac82d 100644 --- a/ruoyi-ui/src/common/menuData.js +++ b/ruoyi-ui/src/common/menuData.js @@ -156,6 +156,11 @@ export default [ component: "maintenanceOperations/statisticalAnalysis/index.vue", } ] + }, { + title: "边坡光伏", + name: "photovoltaic", + path: "/maintain/photovoltaic", + component: "developing.vue" } ] }, @@ -239,7 +244,7 @@ export default [ ], }, { - title: "配置中心", + title: "安全生产", name: "config", position: "right", path: "/config", diff --git a/ruoyi-ui/src/views/JiHeExpressway/images/digital/digitalTollStation.jpg b/ruoyi-ui/src/views/JiHeExpressway/images/digital/digitalTollStation.jpg index 3c5b99e5..da1a71bb 100644 Binary files a/ruoyi-ui/src/views/JiHeExpressway/images/digital/digitalTollStation.jpg and b/ruoyi-ui/src/views/JiHeExpressway/images/digital/digitalTollStation.jpg differ diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/datav/roadNet/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/datav/roadNet/index.vue index 0630a48a..477fc9f0 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/datav/roadNet/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/datav/roadNet/index.vue @@ -3,7 +3,11 @@
-

{{ item.dataAll.title }}:{{ item.dataAll.value }}{{ item.dataAll.unit }}

+

+ {{ item.dataAll.title }}: + {{ item.dataAll.value }} + {{ item.dataAll.unit }} +

{{ item.dataGreen.title }}:{{ item.dataGreen.value }}{{ item.dataGreen.unit }}

@@ -144,8 +148,37 @@ export default { }, mounted(){ this.initData(); + this.mockData(); }, methods: { + mockData(){ + const mock = ()=>{ + let num1 = this.summary[1].dataAll.value + Math.floor(Math.random()*200); + this.summary[1].dataAll.value = num1; + this.summary[1].dataRed.value = (num1/this.summary[1].dataGreen.value*100).toFixed(2); + + let num2 = +this.summary[2].dataAll.value + Math.random()*0.01; + this.summary[2].dataAll.value = num2.toFixed(2); + this.summary[2].dataRed.value = (num2/this.summary[2].dataGreen.value*100).toFixed(2); + + let num3 = this.summary[3].dataAll.value + Math.floor(Math.random()*20); + this.summary[3].dataAll.value = num3; + this.summary[3].dataRed.value = (num3/this.summary[3].dataGreen.value*100).toFixed(2); + + let num4 = 1154 + Math.random()*120; + this.summary[4].dataAll.value = num4.toFixed(2); + this.summary[4].dataGreen.value = (num4/this.summary[4].dataAll.total*100).toFixed(2); + + let num5 = 81 + Math.random()*20; + this.summary[5].dataAll.value = num5.toFixed(2); + this.summary[5].dataGreen.value = (num5/this.summary[5].dataAll.total*100).toFixed(2); + } + mock(); + let interval = setInterval(()=>{ + mock(); + }, 1500); + this.$once("hook:beforeDestroy", () => this.clearInterval(interval)); + }, initData() { this.summary = [ { @@ -156,31 +189,31 @@ export default { }, { width:376, - dataAll: { title: "接入数据总数", value: 1213213447, unit: "条" }, + dataAll: { title: "接入数据总数", value: 1251446, unit: "条" }, dataGreen: { title: "昨日接入数", value: 20624577, unit: "条" }, dataRed: { title: "环比", value: 0.04, unit: "%" } }, { width: 287, - dataAll: { title: "存储占用量", value: 86059, unit: "GB" }, + dataAll: { title: "存储占用量", value: 32, unit: "GB" }, dataGreen: { title: "昨日新增", value: 55, unit: "GB" }, dataRed: { title: "环比", value: 20.5, unit: "%" } }, { width: 376, - dataAll: { title: "服务调用总数", value: 43392688, unit: "次" }, - dataGreen: { title: "昨日服务数", value: 1210345, unit: "次" }, + dataAll: { title: "服务调用总数", value: 752524, unit: "次" }, + dataGreen: { title: "昨日服务数", value: 21034145, unit: "次" }, dataRed: { title: "环比", value: 0.04, unit: "%" } }, { width:226, - dataAll: { title: "内存", value: "1274G/1800G", unit: "" }, + dataAll: { title: "内存", value: 0, total:1800, unit: "G" }, dataGreen: { title: "使用率", value: 70.73, unit: "%" } }, { width: 226, - dataAll: { title: "CPU", value: "71/126", unit: "" }, - dataGreen: { title: "使用率", value: 56.35, unit: "类" } + dataAll: { title: "CPU", value: 0, total:126, unit: "" }, + dataGreen: { title: "使用率", value: 56.35, unit: "%" } } ]; this.manage = [ @@ -224,7 +257,7 @@ export default { diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventQuery/assets/charts2.js b/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventQuery/assets/charts2.js index 54813907..5f8879ce 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventQuery/assets/charts2.js +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventQuery/assets/charts2.js @@ -132,7 +132,7 @@ var options = { }, color: colorList, legend: { - top: 100, + top: "middle", right: 20, orient: "vertical", //改变排列方式 icon: "circle", //改变legend小图标形状 @@ -146,12 +146,13 @@ var options = { rich: { a: { align: "left", - width: 45, + width: 60, fontSize: 12, }, b: { align: "left", fontSize: 12, + width: 50, color: "#37E7FF", marginLeft: 0, }, diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventQuery/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventQuery/index.vue index 37c7c051..958655e5 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventQuery/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventQuery/index.vue @@ -96,9 +96,9 @@
-
+
-
+
@@ -123,6 +123,7 @@ import chart2 from "./assets/charts2"; import chart3 from "./assets/charts3"; import ElQuarterPicker from "./ElQuarterPicker"; import moment from "moment"; +import { WarningType } from "@screen/utils/enum.js"; import { getWarningTrend, getWarningSectionType, @@ -168,6 +169,7 @@ export default { }, data() { return { + canvas:null, typeOptions: [ { value: "year", @@ -414,7 +416,7 @@ export default { }) }); - //类型占比 + //感知事件类型分析 getWarningSectionType({ type: qType, sectionId: this.selectId, @@ -427,31 +429,11 @@ export default { let types = []; let numbers = []; this.chart2List = res.data; - let data = res.data.warningTypeList; + let data = res.data.warningTypeList ; let total = res.data.total; data.forEach((it) => { - if (it.warningType == 1) { - types.push("交通拥堵"); - } else if (it.warningType == 2) { - types.push("行人"); - } else if (it.warningType == 3) { - types.push("非机动车"); - } else if (it.warningType == 4) { - types.push("停车"); - } else if (it.warningType == 5) { - types.push("倒车/逆行"); - } else if (it.warningType == 6) { - types.push("烟火"); - } else if (it.warningType == 7) { - types.push("撒落物"); - } else if (it.warningType == 8) { - types.push("异常天气"); - } else if (it.warningType == 9) { - types.push("护栏碰撞"); - } else { - types.push("其他"); - } + types.push(WarningType[it.warningType]); numbers.push({ name: types[types.length - 1], @@ -590,75 +572,37 @@ export default { this.myChart3 = echarts.init(document.getElementById("chart3")); this.myChart3.setOption(chart3); }, + generateChart2(){ + let ele = this.$refs["chart2"]; + this.myChart2 = echarts.init(ele); + let parentDiv = ele.firstChild; + this.canvasChart2 = document.createElement("canvas"); + this.canvasChart2.width = parentDiv.offsetWidth; + this.canvasChart2.height = parentDiv.offsetHeight; + parentDiv.appendChild(this.canvasChart2); + }, initChart2(){ - - this.myChart2 = echarts.init(document.getElementById("chart2")); + if(!this.myChart2){ + this.generateChart2(); + } + let ele = this.$refs["chart2"]; this.myChart2.setOption(chart2); - const domMap = document.getElementById("chart2"); - let parentDiv = domMap.firstChild; - // 创建canvas - let canvas = document.createElement("canvas"); - canvas.width = parentDiv.offsetWidth; - canvas.height = parentDiv.offsetHeight; - parentDiv.appendChild(canvas); - const context = canvas.getContext("2d"); + const context = this.canvasChart2.getContext('2d') + context.clearRect(0, 0, this.canvasChart2.width, this.canvasChart2.height); // 清空画布 + context.lineWidth = 1; // 设置线段宽度 - - // 填充渐变颜色 - // 颜色断点 - var gr = context.createLinearGradient(247, 63, 450, 0); - gr.addColorStop(1, "rgba(92,197,255,0)"); - gr.addColorStop(0, "rgba(92,197,255,0.5)"); - drawRoundRect(context, 357, 98, 140, 24, 12, gr); - - // // 颜色断点 - var gr = context.createLinearGradient(247, 63, 450, 0); - gr.addColorStop(1, "rgba(92,197,255,0)"); - gr.addColorStop(0, "rgba(92,197,255,0.5)"); - drawRoundRect(context, 357, 130, 140, 24, 12, gr); - - // // 颜色断点 - var gr = context.createLinearGradient(240, 63, 450, 0); - gr.addColorStop(1, "rgba(92,197,255,0)"); - gr.addColorStop(0, "rgba(92,197,255,0.5)"); - drawRoundRect(context, 357, 162, 140, 24, 12, gr); - - // // 颜色断点 - var gr = context.createLinearGradient(240, 63, 450, 0); - gr.addColorStop(1, "rgba(92,197,255,0)"); - gr.addColorStop(0, "rgba(92,197,255,0.5)"); - drawRoundRect(context, 357, 194, 140, 24, 12, gr); - - // // 颜色断点 - // var gr = context.createLinearGradient(240, 63, 450, 0); - // gr.addColorStop(1, 'rgba(92,197,255,0)'); - // gr.addColorStop(0, 'rgba(92,197,255,0.5)'); - // drawRoundRect(context, 267, 258, 140, 24, 12, gr) - - // // 颜色断点 - // var gr = context.createLinearGradient(400, 63, 450, 0); - // gr.addColorStop(1, 'rgba(92,197,255,0)'); - // gr.addColorStop(0, 'rgba(92,197,255,0.5)'); - // drawRoundRect(context, 416, 57, 140, 24, 12, gr) - - // // 颜色断点 - // var gr = context.createLinearGradient(350, 63, 450, 0); - // gr.addColorStop(1, 'rgba(92,197,255,0)'); - // gr.addColorStop(0, 'rgba(92,197,255,0.5)'); - // drawRoundRect(context, 416, 108, 140, 24, 12, gr) - - // // 颜色断点 - // var gr = context.createLinearGradient(300, 63, 450, 0); - // gr.addColorStop(1, 'rgba(92,197,255,0)'); - // gr.addColorStop(0, 'rgba(92,197,255,0.5)'); - // drawRoundRect(context, 416, 157, 140, 24, 12, gr) - - // // 颜色断点 - // var gr = context.createLinearGradient(300, 63, 450, 0); - // gr.addColorStop(1, 'rgba(92,197,255,0)'); - // gr.addColorStop(0, 'rgba(92,197,255,0.5)'); - // drawRoundRect(context, 416, 208, 140, 24, 12, gr); + let total = chart2.legend.data.length; + for(let i=0; i diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/typeAnalysis/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/typeAnalysis/index.vue index 6f95dbd8..d99210f4 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/typeAnalysis/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/typeAnalysis/index.vue @@ -206,7 +206,7 @@ export default { ) 1 1; display: flex; - justify-content: space-between; + justify-content: center; align-items: center; } } diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/index.vue index 00b5ffd3..2695af1a 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/index.vue @@ -27,7 +27,7 @@ import EventSource from "./components/eventSource/index.vue"; import DailyDisposal from "./components/dailyDisposal/index.vue"; import TypeAnalysis from "./components/typeAnalysis/index.vue"; import MonthStatistice from "./components/monthStatistics/index.vue"; -import EventQuery from "./components/eventQuery"; +import EventQuery from "./components/eventQuery/index.vue"; export default { name: "EventDetection", diff --git a/ruoyi-ui/vue.config.js b/ruoyi-ui/vue.config.js index 9698abf8..c5e3daeb 100644 --- a/ruoyi-ui/vue.config.js +++ b/ruoyi-ui/vue.config.js @@ -53,8 +53,8 @@ module.exports = { // target: `http://10.168.69.255:8087`, //正晨后台 连现场物联 刘文阁 // target: `http://10.168.78.135:8087`, //王钦 // target: `http://10.168.66.196:8087`, //正晨后台 连现场物联 刘文阁2 - target: `http://10.168.65.156:8087`, //王思祥 - // target: `http://10.168.65.194:8087`, //赵祥龙 + // target: `http://10.168.65.156:8087`, //王思祥 + target: `http://10.168.65.194:8087`, //赵祥龙 // target: `http://10.168.65.156:8097`, //孟 // target: `http://10.168.56.165:8087`, //王家宝