Browse Source

更新

wangqin
hui 11 months ago
parent
commit
296919dbcf
  1. 7
      ruoyi-ui/src/common/menuData.js
  2. BIN
      ruoyi-ui/src/views/JiHeExpressway/images/digital/digitalTollStation.jpg
  3. 51
      ruoyi-ui/src/views/JiHeExpressway/pages/datav/roadNet/index.vue
  4. 5
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/dailyDisposal/index.vue
  5. 5
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventQuery/assets/charts2.js
  6. 125
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventQuery/index.vue
  7. 6
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventSource/index.vue
  8. 2
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/typeAnalysis/index.vue
  9. 2
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/index.vue
  10. 4
      ruoyi-ui/vue.config.js

7
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",

BIN
ruoyi-ui/src/views/JiHeExpressway/images/digital/digitalTollStation.jpg

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 MiB

After

Width:  |  Height:  |  Size: 9.5 MiB

51
ruoyi-ui/src/views/JiHeExpressway/pages/datav/roadNet/index.vue

@ -3,7 +3,11 @@
<div class="summary">
<div class="summaryUnit" v-for="item in summary" :style="{'flex-basis' : item.width + 'px'}">
<div class="info info_01 keep-ratio" origin="left">
<p v-if="item.dataAll"><span class="em">{{ item.dataAll.title }}:</span><em class="blue">{{ item.dataAll.value }}</em><i v-if="item.dataAll.unit">{{ item.dataAll.unit }}</i></p>
<p v-if="item.dataAll">
<span class="em">{{ item.dataAll.title }}:</span>
<em class="blue">{{ item.dataAll.value }}<template v-if="item.dataAll.total">/{{ item.dataAll.total }}</template></em>
<i v-if="item.dataAll.unit">{{ item.dataAll.unit }}</i>
</p>
</div>
<div class="info info_02 keep-ratio" origin="left">
<p v-if="item.dataGreen"><span>{{ item.dataGreen.title }}:</span><em class="green">{{ item.dataGreen.value }}</em><i v-if="item.dataGreen.unit">{{ item.dataGreen.unit }}</i></p>
@ -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 {
<style lang='scss' scoped>
h4, p, ul,li{ margin: 0; padding:0;}
.roadNet{ padding: 20px; display: flex; flex-direction: column;
.roadNet{ padding: 20px; width:100%; height:100%; display: flex; flex-direction: column;
.summary{
display: flex; justify-content: space-between; height: 87px; align-items: stretch;
.summaryUnit{ border-left: 2px solid #00D1FF; background: linear-gradient( -90deg, rgba(6,66,88,0) 0%, #064258 93%); box-sizing: border-box; padding: 0 20px; display: flex; flex-direction: column; justify-content: center; align-items: stretch;

5
ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/dailyDisposal/index.vue

@ -156,7 +156,6 @@ export default {
.congestion {
.board {
padding: 0px 20px;
background: linear-gradient(180deg, rgba(6, 66, 88, 0.2) 0%, #064258 100%);
border-radius: 5px 5px 5px 5px;
opacity: 1;
@ -168,13 +167,13 @@ export default {
)
1 1;
display: flex;
justify-content: space-between;
justify-content: center;
align-items: center;
}
}
.charts {
height: 180px;
width: 100%;
width: 430px;
}
</style>

5
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,
},

125
ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventQuery/index.vue

@ -96,9 +96,9 @@
<div>
<WgtTitle :title="'感知事件类型分析'"></WgtTitle>
<div class="unit_con">
<div class="unit_con unit_con_02">
<Empty v-show="!chart2List || chart2List.length <= 0" text="暂无数据..." class="empty"></Empty>
<div id="chart2" class="chart_div" ></div>
<div ref="chart2" class="chart_div" style="width: 540px; height: 270px;" ></div>
</div>
</div>
@ -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<total; i++){
let unitH = 32;
let h = ele.offsetHeight;
let x = 330;
let y = (h - total*unitH)/2 + 3 + i*unitH;
var gr = context.createLinearGradient(330, 0, 500, 0);
gr.addColorStop(0, "rgba(92,197,255,0.6)");
gr.addColorStop(1, "rgba(92,197,255,0)");
drawRoundRect(context, x, y, 220, 24, 12, gr);
}
},
},
mounted() {
@ -721,6 +665,7 @@ export default {
.unit_con {
flex: 1;
margin: 95px 20px 30px; position: relative;
// &.unit_con_02{ margin: 105px 0px 20px; }
}
.empty{ position: absolute;}
.chart_div{

6
ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventSource/index.vue

@ -246,13 +246,13 @@ export default {
)
1 1;
display: flex;
justify-content: space-between;
justify-content: center;
align-items: center;
}
}
.charts {
height: 180px;
width: 100%;
height: 170px;
width: 380px;
}
</style>

2
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;
}
}

2
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",

4
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`, //王家宝

Loading…
Cancel
Save