Browse Source

Merge branch 'develop' of http://39.106.31.193:9211/mengff/jihe-hs into develop

wangqin
刘朋 8 months ago
parent
commit
e2481c3094
  1. 8
      ruoyi-ui/src/api/manualWarning/index.js
  2. 7
      ruoyi-ui/src/common/menuData.js
  3. 2
      ruoyi-ui/src/views/JiHeExpressway/components/ManualWarningCard/index.vue
  4. BIN
      ruoyi-ui/src/views/JiHeExpressway/images/digital/digitalTollStation.jpg
  5. 4
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/FatigueWakesUp/components/DeviceControlDialog.vue
  6. 18
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/HomeFilter/index.vue
  7. 27
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/index.vue
  8. 103
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/FormEvent/PresetFormItems.js
  9. 60
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/data.js
  10. 1
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/index.vue
  11. 6
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/governanceAnalysis/components/eventTypeAnalysis/index.vue
  12. 109
      ruoyi-ui/src/views/JiHeExpressway/pages/control/manual/events/data.js
  13. 59
      ruoyi-ui/src/views/JiHeExpressway/pages/control/manual/events/index.vue
  14. 94
      ruoyi-ui/src/views/JiHeExpressway/pages/control/manual/statistic/components/Eventfiltering/index.vue
  15. 2
      ruoyi-ui/src/views/JiHeExpressway/pages/control/manual/statistic/components/Eventfiltering/trafficIncidentsCharts.js
  16. 40
      ruoyi-ui/src/views/JiHeExpressway/pages/control/manual/statistic/components/Eventfiltering/trafficIncidentsChartsPie.js
  17. 288
      ruoyi-ui/src/views/JiHeExpressway/pages/control/manual/statistic/components/Sitefiltering/index.vue
  18. 95
      ruoyi-ui/src/views/JiHeExpressway/pages/control/manual/statistic/components/Sitefiltering/trafficIncidentsCharts.js
  19. 232
      ruoyi-ui/src/views/JiHeExpressway/pages/control/manual/statistic/components/Sitefiltering/trafficIncidentsChartsPie.js
  20. 221
      ruoyi-ui/src/views/JiHeExpressway/pages/control/manual/statistic/components/Timefiltering/index.vue
  21. 95
      ruoyi-ui/src/views/JiHeExpressway/pages/control/manual/statistic/components/Timefiltering/trafficIncidentsCharts.js
  22. 15
      ruoyi-ui/src/views/JiHeExpressway/pages/control/manual/statistic/index.vue
  23. 51
      ruoyi-ui/src/views/JiHeExpressway/pages/datav/roadNet/index.vue
  24. 5
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/dailyDisposal/index.vue
  25. 5
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventQuery/assets/charts2.js
  26. 163
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventQuery/index.vue
  27. 6
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventSource/index.vue
  28. 2
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/typeAnalysis/index.vue
  29. 2
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/index.vue
  30. 59
      ruoyi-ui/src/views/JiHeExpressway/utils/enum.js
  31. 4
      ruoyi-ui/vue.config.js

8
ruoyi-ui/src/api/manualWarning/index.js

@ -1,9 +1,13 @@
import request from "@/utils/request"; import request from "@/utils/request";
// 查询非机预警列表 // 查询非机预警列表
export function perceivedEventsList(data) { export function perceivedEventsList(data, pageNum, pageSize) {
return request({ return request({
url: "/perceivedEvents/warning/perceivedEventsList", url:
"/perceivedEvents/warning/nonAutomaticWarningList?pageNum=" +
pageNum +
"&pageSize=" +
pageSize,
method: "post", method: "post",
data, data,
}); });

7
ruoyi-ui/src/common/menuData.js

@ -156,6 +156,11 @@ export default [
component: "maintenanceOperations/statisticalAnalysis/index.vue", component: "maintenanceOperations/statisticalAnalysis/index.vue",
} }
] ]
}, {
title: "边坡光伏",
name: "photovoltaic",
path: "/maintain/photovoltaic",
component: "developing.vue"
} }
] ]
}, },
@ -239,7 +244,7 @@ export default [
], ],
}, },
{ {
title: "配置中心", title: "安全生产",
name: "config", name: "config",
position: "right", position: "right",
path: "/config", path: "/config",

2
ruoyi-ui/src/views/JiHeExpressway/components/ManualWarningCard/index.vue

@ -89,7 +89,7 @@ export default {
type: Array, type: Array,
default: () => [ default: () => [
{ {
key: "warningType", key: "warningTypeName",
label: "类型", label: "类型",
}, },
// { // {

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

4
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/FatigueWakesUp/components/DeviceControlDialog.vue

@ -238,7 +238,7 @@ export default {
modelVisible: { modelVisible: {
get() { get() {
if (this.visible) { if (this.visible) {
this.deviceId = 'K82+285'; // this.deviceId = 'K82+285';
this.initData(); this.initData();
} }
return this.visible return this.visible
@ -360,7 +360,7 @@ export default {
} }
} },
}, },
} }

18
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/HomeFilter/index.vue

@ -13,7 +13,7 @@
<div class="body"> <div class="body">
<div class="title">设备筛选</div> <div class="title">设备筛选</div>
<Form labelWidth="90px" column="1" class="form" ref="FormConfigRef" :formList="formList" /> <Form v-model="data" labelWidth="90px" column="1" class="form" ref="FormConfigRef" :formList="formList" />
<div class="footer"> <div class="footer">
<Button style="background-color: rgba(0, 179, 204, 0.3)" @click.native="handleResetForm"> <Button style="background-color: rgba(0, 179, 204, 0.3)" @click.native="handleResetForm">
重置 重置
@ -82,12 +82,14 @@ export default {
return true; return true;
}, },
}, },
] ],
data: {}
} }
}, },
watch: { watch: {
activeDeviceTypes: { activeDeviceTypes: {
handler(val) { handler(val) {
console.log(val, this.activeDeviceTypes, 'xxx')
const options = [] const options = []
for (let id of DeviceTypeIds) { for (let id of DeviceTypeIds) {
if (this.activeDeviceTypes.indexOf(`路测设备_${id}`) >= 0) { if (this.activeDeviceTypes.indexOf(`路测设备_${id}`) >= 0) {
@ -96,6 +98,15 @@ export default {
} }
// if (this.activeDeviceTypes.indexOf("_2") >= 0) options.push(...Object.keys(BoardChildTypes).map(key => { return { label: BoardChildTypes[key], value: key } })); // if (this.activeDeviceTypes.indexOf("_2") >= 0) options.push(...Object.keys(BoardChildTypes).map(key => { return { label: BoardChildTypes[key], value: key } }));
} }
const isChildTypeClear = !options.length;
if (isChildTypeClear)
this.$set(this.data, 'childType', undefined);
const isDeviceStateClear = !find(this.activeDeviceTypes, (type => type.match("路测设备_")));
if (isDeviceStateClear)
this.$set(this.data, 'deviceState', undefined);
if (isChildTypeClear || isDeviceStateClear) {
this.setFilterDataNoAction(this.data);
}
this.formList[2].options.options = options; this.formList[2].options.options = options;
}, },
immediate: true, immediate: true,
@ -111,6 +122,9 @@ export default {
filterEnd(data) { filterEnd(data) {
this.$parent.$refs.RoadAndEventsRef?.setFilterData?.(data); this.$parent.$refs.RoadAndEventsRef?.setFilterData?.(data);
}, },
setFilterDataNoAction(data) {
this.$parent.$refs.RoadAndEventsRef?.setFilterDataNoAction?.(data);
},
async handleResetForm() { async handleResetForm() {
this.$refs.FormConfigRef?.reset(); this.$refs.FormConfigRef?.reset();
this.activeIcon = "filter"; this.activeIcon = "filter";

27
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/index.vue

@ -177,7 +177,10 @@ export default {
getMinMapLayers(); getMinMapLayers();
}, },
methods: { methods: {
async setFilterData(data) { setFilterDataNoAction(data) { //data
this.filterData = data;
},
async setFilterData(data) {//
this.filterData = data; this.filterData = data;
const tabContentData = []; const tabContentData = [];
this.layerData.forEach((layerDataItem => { this.layerData.forEach((layerDataItem => {
@ -193,20 +196,24 @@ export default {
const status = item.status; const status = item.status;
// if (!eventMap[`${key}${status ? "_close" : ""}`]) return this.$emit("onClickItem", item); // if (!eventMap[`${key}${status ? "_close" : ""}`]) return this.$emit("onClickItem", item);
// console.log(`${key}${status ? "" : "_close"}`, this.filterData, 'xxx'); // console.log(`${key}${status ? "" : "_close"}`, this.filterData, 'xxx');
await eventMap[`${key}${status ? "" : "_close"}`]?.call(this, item, this.filterData, isDefault); await eventMap[`${key}${status ? "" : "_close"}`]?.call(this, item, this.filterData, isDefault, this.cb);
} }
await Promise.allSettled(tabContentData.map(item => eventMapCall(item, true))) await Promise.allSettled(tabContentData.map(item => eventMapCall(item, true)))
Object.keys(lngLatMap).forEach(key => { Object.keys(lngLatMap).forEach(key => {
addInGraphHandle(lngLatMap[key]); addInGraphHandle(lngLatMap[key]);
}); });
}, },
handleClick(item) { handleClick(item) {
this.active = item.title; this.active = item.title;
this.tabContentData = item.children; this.tabContentData = item.children;
}, },
cb(item, config) {
const deviceType = config.deviceType;
const activeDeviceTypes = this.activeDeviceTypes;
const findIndex = activeDeviceTypes.indexOf(deviceType);
if (item.status) findIndex === -1 && activeDeviceTypes.push(deviceType);
else findIndex !== -1 && activeDeviceTypes.splice(findIndex, 1);
},
async handleDeviceImmediate(item, isDefault) { async handleDeviceImmediate(item, isDefault) {
const key = getHandleDeviceType(item) || `${this.active}/${item.title}`; const key = getHandleDeviceType(item) || `${this.active}/${item.title}`;
@ -218,14 +225,8 @@ export default {
if (!eventMap[`${key}${status ? "_close" : ""}`]) return this.$emit("onClickItem", item); if (!eventMap[`${key}${status ? "_close" : ""}`]) return this.$emit("onClickItem", item);
console.log(`${key}${status ? "_close" : ""}`, this.filterData, isDefault) console.log(`${key}${status ? "_close" : ""}`, this.filterData, isDefault)
const cb = (item, config) => {
const deviceType = config.deviceType; await eventMap[`${key}${status ? "_close" : ""}`]?.call(this, item, this.filterData, isDefault, this.cb);
const activeDeviceTypes = this.activeDeviceTypes;
const findIndex = activeDeviceTypes.indexOf(deviceType);
if (item.status) findIndex === -1 && activeDeviceTypes.push(deviceType);
else findIndex !== -1 && activeDeviceTypes.splice(findIndex, 1);
}
await eventMap[`${key}${status ? "_close" : ""}`]?.call(this, item, this.filterData, isDefault, cb);
}, },
handleDevice: debounce(function (item) { handleDevice: debounce(function (item) {
this.handleDeviceImmediate(item); this.handleDeviceImmediate(item);

103
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/FormEvent/PresetFormItems.js

@ -1,4 +1,4 @@
import request from '@/utils/request' import request from "@/utils/request";
import { Message } from "element-ui"; import { Message } from "element-ui";
import moment from "moment"; import moment from "moment";
@ -8,7 +8,7 @@ export const source = {
type: "RadioGroup", type: "RadioGroup",
isAlone: true, isAlone: true,
required: true, required: true,
default: '1', default: "1",
options: { options: {
activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)", activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)",
options: [ options: [
@ -50,7 +50,7 @@ export const illegalTriggeringType = {
type: "RadioGroup", type: "RadioGroup",
isAlone: true, isAlone: true,
required: true, required: true,
default: '5-1', default: "5-1",
options: { options: {
activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)", activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)",
options: [ options: [
@ -299,6 +299,45 @@ export const eventSources = {
}, },
}; };
export const warningType = {
label: "事件源:",
key: "warningType",
type: "select",
options: {
clearable: true,
options: [
{
key: "1",
label: "交通拥堵",
},
{
key: "2",
label: "行人",
},
{
key: "4",
label: "停车",
},
{
key: "5",
label: "违规驾驶",
},
{
key: "6",
label: "路障",
},
{
key: "7",
label: "道路施工",
},
{
key: "99",
label: "其他",
},
],
},
};
export const eventType = { export const eventType = {
label: "事件类型:", label: "事件类型:",
key: "eventType", key: "eventType",
@ -495,7 +534,7 @@ export const isInTunnel = {
key: "inTunnel", key: "inTunnel",
// isAlone: true, // isAlone: true,
required: true, required: true,
default: '0', default: "0",
type: "RadioGroup", type: "RadioGroup",
options: { options: {
activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)", activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)",
@ -596,12 +635,15 @@ export const weatherSituation = {
], ],
}, },
visible: (data) => { visible: (data) => {
if (data?.eventSubclass == '10-1' || data?.eventSubclass == '10-2' || data?.eventSubclass == '10-3') { if (
data?.eventSubclass == "10-1" ||
data?.eventSubclass == "10-2" ||
data?.eventSubclass == "10-3"
) {
return true; return true;
} }
return false; return false;
}, },
}; };
export const additionalNotes = { export const additionalNotes = {
@ -698,10 +740,10 @@ export const locationMode = {
ons: { ons: {
change(value, ...args) { change(value, ...args) {
const { data, formList } = args.slice(-1)[0]; const { data, formList } = args.slice(-1)[0];
if(data.dcEventAccident) { if (data.dcEventAccident) {
data.dcEventAccident.facilityId = null; data.dcEventAccident.facilityId = null;
} }
if(data.dcEventVehicleAccident) { if (data.dcEventVehicleAccident) {
data.dcEventVehicleAccident.facilityId = null; data.dcEventVehicleAccident.facilityId = null;
} }
@ -713,28 +755,33 @@ export const locationMode = {
} else if (value == 4) { } else if (value == 4) {
facilityType = 1; facilityType = 1;
} }
if(value && value != 1){ if (value && value != 1) {
//路网设施 1 收费站 2 桥梁 3 互通立交 4 枢纽立交 5 隧道 6 服务区 //路网设施 1 收费站 2 桥梁 3 互通立交 4 枢纽立交 5 隧道 6 服务区
request({ request({
url: `/business/facility/query?facilityType=${facilityType}`, url: `/business/facility/query?facilityType=${facilityType}`,
method: "get" method: "get",
}).then((result) => { })
if (result.code != 200) return Message.error(result?.msg); .then((result) => {
let lwss = []; if (result.code != 200) return Message.error(result?.msg);
result.data.forEach(it => lwss.push({ key: it.id, label: it.facilityName})) let lwss = [];
result.data.forEach((it) =>
lwss.push({ key: it.id, label: it.facilityName })
);
formList.forEach((it) => { formList.forEach((it) => {
if(it.key == "dcEventAccident.facilityId" || it.key == "dcEventVehicleAccident.facilityId"){ if (
it.options.options = lwss; it.key == "dcEventAccident.facilityId" ||
} it.key == "dcEventVehicleAccident.facilityId"
) {
it.options.options = lwss;
}
});
})
.catch((err) => {
console.log("err", err);
Message.error("查询失败1", err);
}); });
}).catch((err) => {
console.log('err',err)
Message.error("查询失败1", err);
})
} }
}, },
}, },
}; };
@ -953,7 +1000,7 @@ export const constructionMeasurement = {
type: "RadioGroup", type: "RadioGroup",
isAlone: true, isAlone: true,
required: true, required: true,
default:'0', default: "0",
options: { options: {
activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)", activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)",
options: [ options: [
@ -983,7 +1030,7 @@ export const locationType = {
type: "RadioGroup", type: "RadioGroup",
isAlone: true, isAlone: true,
required: true, required: true,
default: '1', default: "1",
options: { options: {
activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)", activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)",
options: [ options: [
@ -1005,7 +1052,7 @@ export const specialConstruction = {
type: "RadioGroup", type: "RadioGroup",
isAlone: true, isAlone: true,
required: true, required: true,
default: '1', default: "1",
options: { options: {
activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)", activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)",
options: [ options: [
@ -1173,7 +1220,7 @@ export const congestionCause = {
}, },
}, },
visible: (data) => { visible: (data) => {
if (data?.eventSubclass != '4-1') { if (data?.eventSubclass != "4-1") {
return false; return false;
} }
return true; return true;

60
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/data.js

@ -108,13 +108,71 @@ export const gjSearchFormList = [
], ],
}, },
}, },
{
label: "事件主类:",
key: "warningType",
type: "select",
options: {
clearable: true,
options: [
{
value: 1,
label: "交通拥堵",
},
{
value: 2,
label: "行人",
},
{
value: 3,
label: "非机动车",
},
{
value: 4,
label: "停车",
},
{
value: 5,
label: "违规驾驶",
},
{
value: 6,
label: "路障",
},
{
value: 7,
label: "道路施工",
},
{
value: 8,
label: "异常天气",
},
{
value: 9,
label: "护栏碰撞",
},
{
value: 10,
label: "交通事故",
},
{
value: 11,
label: "车辆故障",
},
{
value: 99,
label: "其他事件",
},
],
},
},
{ {
label: "时间范围:", label: "时间范围:",
key: "daterange", key: "daterange",
required: false, required: false,
type: "datePicker", type: "datePicker",
options: { options: {
style: 'width: auto', style: "width: auto",
type: "datetimerange", type: "datetimerange",
format: "yyyy-MM-dd HH:mm:ss", format: "yyyy-MM-dd HH:mm:ss",
valueFormat: "yyyy-MM-dd HH:mm:ss", valueFormat: "yyyy-MM-dd HH:mm:ss",

1
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/index.vue

@ -343,6 +343,7 @@ export default {
this.searchData = { this.searchData = {
...this.searchData, ...this.searchData,
eventType: data.eventType, eventType: data.eventType,
warningType: data.warningType,
eventSource: data.eventSource, eventSource: data.eventSource,
warningSource: data?.warningSource || '', warningSource: data?.warningSource || '',
direction: data.direction, direction: data.direction,

6
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/governanceAnalysis/components/eventTypeAnalysis/index.vue

@ -25,7 +25,6 @@ export default {
methods: { methods: {
getAllEventNum() { getAllEventNum() {
return allEventNum().then((response) => { return allEventNum().then((response) => {
console.log("response", response);
let data = []; let data = [];
let total = null; let total = null;
let nameData = []; let nameData = [];
@ -37,7 +36,6 @@ export default {
}); });
total += response.data[i].num; total += response.data[i].num;
} }
console.log("total88", total);
for (let i = 0; i < data.length; i++) { for (let i = 0; i < data.length; i++) {
// if (i % 2 === 0) { // if (i % 2 === 0) {
// data.splice(i + 1, 0, newObj) // data.splice(i + 1, 0, newObj)
@ -47,6 +45,10 @@ export default {
} }
} }
chartsStatistics.legend.data = nameData; chartsStatistics.legend.data = nameData;
console.log(
"chartsStatistics.legend.data",
chartsStatistics.legend.data
);
chartsStatistics.legend.formatter = function (name) { chartsStatistics.legend.formatter = function (name) {
let tarValue = 0; let tarValue = 0;
for (let i = 0; i < response.data.length; i++) { for (let i = 0; i < response.data.length; i++) {

109
ruoyi-ui/src/views/JiHeExpressway/pages/control/manual/events/data.js

@ -1,53 +1,30 @@
import * as PresetFormItems from "@screen/pages/control/event/event/FormEvent/PresetFormItems.js"; import * as PresetFormItems from "@screen/pages/control/event/event/FormEvent/PresetFormItems.js";
import { merge, cloneDeep } from "lodash"; import { warningType } from "@screen/utils/enum.js";
export const searchFormList = [ export const searchFormList = [
{ PresetFormItems.warningType,
label: "事件状态:", // {
key: "eventState", // label: "方向:",
type: "RadioGroup", // key: "direction",
default: "0", // type: "RadioGroup",
options: { // default: "1",
options: [ // options: {
{ // options: [
key: "0", // {
label: "未解决", // key: "1",
}, // label: "菏泽方向",
{ // },
key: "1", // {
label: "已解决", // key: "2",
}, // label: "双向",
{ // },
key: "2", // {
label: "已关闭", // key: "3",
}, // label: "济南方向",
], // },
}, // ],
}, // },
PresetFormItems.eventSources, // },
PresetFormItems.eventType,
{
label: "方向:",
key: "direction",
type: "RadioGroup",
default: "1",
options: {
options: [
{
key: "1",
label: "菏泽方向",
},
{
key: "2",
label: "双向",
},
{
key: "3",
label: "济南方向",
},
],
},
},
{ {
label: "时间范围:", label: "时间范围:",
key: "warningTime", key: "warningTime",
@ -59,23 +36,23 @@ export const searchFormList = [
valueFormat: "yyyy-MM-dd HH:mm:ss", valueFormat: "yyyy-MM-dd HH:mm:ss",
}, },
}, },
{ // {
...PresetFormItems.station, // ...PresetFormItems.station,
label: "开始桩号:", // label: "开始桩号:",
required: false, // required: false,
}, // },
merge(cloneDeep(PresetFormItems.station), { // merge(cloneDeep(PresetFormItems.station), {
options: { // options: {
options: [ // options: [
{ // {
key: "endStakeMark[0]", // key: "endStakeMark[0]",
}, // },
{ // {
key: "endStakeMark[1]", // key: "endStakeMark[1]",
}, // },
], // ],
}, // },
label: "结束桩号:", // label: "结束桩号:",
required: false, // required: false,
}), // }),
]; ];

59
ruoyi-ui/src/views/JiHeExpressway/pages/control/manual/events/index.vue

@ -41,8 +41,8 @@
@size-change="onSizeChange" @size-change="onSizeChange"
width="'100%'" width="'100%'"
:page-sizes="[12, 16, 20, 30, 50]" :page-sizes="[12, 16, 20, 30, 50]"
:page-size="searchData.pageSize" :page-size="pageSize"
:current-page.sync="searchData.pageNum" :current-page.sync="pageNum"
layout="total, sizes, prev, pager, next" layout="total, sizes, prev, pager, next"
:total="total" :total="total"
> >
@ -60,6 +60,7 @@ import { perceivedEventsList } from "@/api/manualWarning/index.js";
// import EventDispatchDialog from "./EventDispatchDialog/index"; // import EventDispatchDialog from "./EventDispatchDialog/index";
import { searchFormList } from "./data"; import { searchFormList } from "./data";
import request from "@/utils/request"; import request from "@/utils/request";
import { WarningType, WarningSubclass } from "@screen/utils/enum.js";
const directionMapping = { const directionMapping = {
1: "菏泽方向", 1: "菏泽方向",
@ -78,14 +79,15 @@ export default {
}, },
data() { data() {
return { return {
WarningSubclass,
searchFormList, searchFormList,
detailDialogFormData: {}, detailDialogFormData: {},
total: 0, total: 0,
data: [], data: [],
eventId: "0", eventId: "0",
pageSize: 16,
pageNum: 1,
searchData: { searchData: {
pageSize: 16,
pageNum: 1,
warningSource: "6", warningSource: "6",
}, },
}; };
@ -101,17 +103,28 @@ export default {
// //
onRefresh() {}, onRefresh() {},
initData() { initData() {
perceivedEventsList(this.searchData).then((res) => { perceivedEventsList(this.searchData, this.pageNum, this.pageSize).then(
if (res.code != 200) return Message.error(res?.msg); (res) => {
this.total = res.total; if (res.code != 200) return Message.error(res?.msg);
res.rows.forEach((it) => { this.total = res.total;
it.source = "非机预警"; res.rows.forEach((it) => {
it.stringDirection = directionMapping[it.direction] || it.direction; it.source = "非机预警";
it.otherConfig = JSON.parse(it.otherConfig); it.stringDirection = directionMapping[it.direction] || it.direction;
}); it.otherConfig = JSON.parse(it.otherConfig);
this.data = res.rows; if (it.warningSubclass) {
console.log("darta", this.data); let i = it.warningType;
}); let r = it.warningSubclass;
it.warningTypeName =
WarningType[i] +
(WarningSubclass[i][r]
? "(" + WarningSubclass[i][r] + ")"
: "");
}
});
this.data = res.rows;
console.log("darta", this.data);
}
);
// request({ // request({
// // url: `/dc/system/event/dispatchEventList`, // // url: `/dc/system/event/dispatchEventList`,
// url: "/dc/system/event/list", // url: "/dc/system/event/list",
@ -126,11 +139,23 @@ export default {
// this.data = result.rows; // this.data = result.rows;
// }); // });
}, },
onSizeChange(pageSize) {}, onSizeChange(pageSize) {
this.pageSize = pageSize;
this.initData();
},
getStateCardBind(item) {}, getStateCardBind(item) {},
firstBtnClick(id) {}, firstBtnClick(id) {},
handleSearch(data) {}, handleSearch(data) {
console.log("data", data);
this.searchData = {
...this.searchData,
warningType: data.warningType,
startTime: data.warningTime[0],
completeTime: data.warningTime[1],
};
this.initData();
},
}, },
}; };
</script> </script>

94
ruoyi-ui/src/views/JiHeExpressway/pages/control/manual/statistic/components/Eventfiltering/index.vue

@ -6,8 +6,8 @@
@handleSearch="handleSearch" @handleSearch="handleSearch"
/> />
<div class="Eventfiltering-content"> <div class="Eventfiltering-content">
<div class="Eventfiltering-left" id="trafficIncidents"></div> <div class="Eventfiltering-left" ref="trafficIncidents"></div>
<div class="Eventfiltering-right" id="trafficIncidentsPie"></div> <div class="Eventfiltering-right" ref="trafficIncidentsPie"></div>
</div> </div>
</div> </div>
</template> </template>
@ -58,6 +58,8 @@ export default {
type: "day", type: "day",
warningTime: "", warningTime: "",
}, },
trafficIncidents: null,
trafficIncidentsPie: null,
searchFormList: [ searchFormList: [
{ {
label: "事件类型:", label: "事件类型:",
@ -130,27 +132,54 @@ export default {
}; };
}, },
async mounted() { async mounted() {
(this.formData.warningTime = setTimeout(() => {
moment(new Date()).format("YYYY-MM-DD") + " 00:00:01"), this.$nextTick(async () => {
await this.getNonAutomaticWarningType(this.formData); (this.formData.warningTime =
var trafficIncidents = echarts.init( moment(new Date()).format("YYYY-MM-DD") + " 00:00:01"),
document.getElementById("trafficIncidents") (this.trafficIncidents = echarts.init(this.$refs.trafficIncidents));
); this.trafficIncidents.setOption(trafficIncidentsCharts);
trafficIncidents.setOption(trafficIncidentsCharts); this.trafficIncidentsPie = echarts.init(this.$refs.trafficIncidentsPie);
var trafficIncidentsPie = echarts.init( this.trafficIncidentsPie.setOption(trafficIncidentsChartsPie);
document.getElementById("trafficIncidentsPie")
); const domMap = this.$refs.trafficIncidentsPie;
trafficIncidentsPie.setOption(trafficIncidentsChartsPie); let parentDiv = domMap.firstElementChild;
// // canvas;
let canvas = document.createElement("canvas");
canvas.width = parentDiv.offsetWidth;
canvas.height = parentDiv.offsetHeight;
parentDiv.appendChild(canvas);
const context = canvas.getContext("2d");
// //
let gr = context.createLinearGradient(280, 0, 580, 0);
gr.addColorStop(1, "rgba(92,197,255,0)");
gr.addColorStop(0, "rgba(92,197,255,0.5)");
context.lineWidth = 1; // 线
drawRoundRect(context, 430, 134, 280, 24, 12, gr);
drawRoundRect(context, 430, 168, 280, 24, 10, gr);
drawRoundRect(context, 430, 202, 280, 24, 10, gr);
drawRoundRect(context, 430, 236, 280, 24, 10, gr);
drawRoundRect(context, 430, 270, 280, 24, 10, gr);
drawRoundRect(context, 430, 304, 280, 24, 10, gr);
drawRoundRect(context, 430, 338, 280, 24, 10, gr);
drawRoundRect(context, 430, 372, 280, 24, 10, gr);
drawRoundRect(context, 430, 406, 280, 24, 10, gr);
drawRoundRect(context, 430, 440, 280, 24, 10, gr);
drawRoundRect(context, 430, 474, 280, 24, 10, gr);
await this.getNonAutomaticWarningType(this.formData);
// drawRoundRect(context, 430, 508, 280, 24, 10, gr);
});
});
}, },
methods: { methods: {
getNonAutomaticWarningType(data) { getNonAutomaticWarningType(data) {
let that = this;
return nonAutomaticWarningType(data).then((res) => { return nonAutomaticWarningType(data).then((res) => {
let newData = res.data; let newData = res.data;
let seriesData = []; let seriesData = [];
let xData = []; let xData = [];
let pieData = []; let pieData = [];
let total = null; let total = null;
console.log("++++++++++++", newData);
newData.forEach((item) => { newData.forEach((item) => {
seriesData.push(item.number); seriesData.push(item.number);
xData.push(item.subclass); xData.push(item.subclass);
@ -162,7 +191,7 @@ export default {
}); });
trafficIncidentsCharts.series[0].data = seriesData; trafficIncidentsCharts.series[0].data = seriesData;
trafficIncidentsCharts.xAxis.data = xData; trafficIncidentsCharts.xAxis.data = xData;
trafficIncidentsChartsPie.legend.data = xData;
trafficIncidentsChartsPie.legend.formatter = function (name) { trafficIncidentsChartsPie.legend.formatter = function (name) {
let tarValue = 0; let tarValue = 0;
for (let i = 0; i < newData.length; i++) { for (let i = 0; i < newData.length; i++) {
@ -173,34 +202,10 @@ export default {
var percert = total == 0 ? 0 : ((tarValue / total) * 100).toFixed(2); var percert = total == 0 ? 0 : ((tarValue / total) * 100).toFixed(2);
return `{text|${name}} {number|${tarValue} 起 } {number|${percert}%}`; return `{text|${name}} {number|${tarValue} 起 } {number|${percert}%}`;
}; };
trafficIncidentsChartsPie.legend.data = xData;
trafficIncidentsChartsPie.title[0].text = total; trafficIncidentsChartsPie.title[0].text = total;
trafficIncidentsChartsPie.series[2].data = seriesData; trafficIncidentsChartsPie.series[2].data = pieData;
that.trafficIncidents.setOption(trafficIncidentsCharts);
// const domMap = document.getElementById("trafficIncidentsPie"); that.trafficIncidentsPie.setOption(trafficIncidentsChartsPie);
// let parentDiv = domMap.firstChild;
// console.log("parentDiv", parentDiv);
// // canvas;
// let canvas = document.createElement("canvas");
// canvas.width = parentDiv.offsetWidth;
// canvas.height = parentDiv.offsetHeight;
// parentDiv.appendChild(canvas);
// const context = canvas.getContext("2d");
// //
// let gr = context.createLinearGradient(240, 0, 450, 0);
// gr.addColorStop(1, "rgba(92,197,255,0)");
// gr.addColorStop(0, "rgba(92,197,255,0.5)");
// context.lineWidth = 1; // 线
// drawRoundRect(context, 100, 8, 280, 50, 12, gr);
// drawRoundRect(context, 202, 32, 280, 20, 10, gr);
// drawRoundRect(context, 202, 56, 280, 20, 10, gr);
// drawRoundRect(context, 202, 80, 280, 20, 10, gr);
// drawRoundRect(context, 202, 104, 280, 20, 10, gr);
// drawRoundRect(context, 202, 128, 280, 20, 10, gr);
// drawRoundRect(context, 202, 152, 280, 20, 10, gr);
// this.myChart = myChart;
}); });
}, },
handleSearch(value) { handleSearch(value) {
@ -221,6 +226,7 @@ export default {
.search-box { .search-box {
width: 402px !important; width: 402px !important;
float: right; float: right;
overflow: hidden;
} }
.Eventfiltering-content { .Eventfiltering-content {
@ -230,12 +236,12 @@ export default {
justify-content: space-between; justify-content: space-between;
.Eventfiltering-left { .Eventfiltering-left {
width: 65%; width: 63%;
height: 100%; height: 100%;
} }
.Eventfiltering-right { .Eventfiltering-right {
width: 32%; width: 34%;
height: 100%; height: 100%;
} }
} }

2
ruoyi-ui/src/views/JiHeExpressway/pages/control/manual/statistic/components/Eventfiltering/trafficIncidentsCharts.js

@ -16,7 +16,7 @@ var options = {
}, },
}, },
grid: { grid: {
left: "30px", left: "50px",
right: "0%", right: "0%",
top: "50px", top: "50px",
bottom: "5%", bottom: "5%",

40
ruoyi-ui/src/views/JiHeExpressway/pages/control/manual/statistic/components/Eventfiltering/trafficIncidentsChartsPie.js

@ -18,9 +18,9 @@ var options = {
title: [ title: [
{ {
text: "999", text: "999",
top: "25%", top: "36%",
textAlign: "center", textAlign: "center",
left: "48%", left: "29%",
textStyle: { textStyle: {
color: "#ffffff", color: "#ffffff",
fontSize: 30, fontSize: 30,
@ -29,9 +29,9 @@ var options = {
}, },
{ {
text: "总数", text: "总数",
top: "38%", top: "32%",
textAlign: "center", textAlign: "center",
left: "48%", left: "29%",
textStyle: { textStyle: {
color: "rgba(242, 252, 253, 0.84)", color: "rgba(242, 252, 253, 0.84)",
fontSize: 16, fontSize: 16,
@ -53,20 +53,22 @@ var options = {
}, },
}, },
legend: { legend: {
show: true,
width: "300px", width: "300px",
height: "120px", height: "520px",
orient: "vertical", orient: "vertical",
icon: "circle", icon: "circle",
top: "60%", top: "15%",
left: "70%",
itemWidth: 10, itemWidth: 10,
itemHeight: 10, itemHeight: 10,
textStyle: { textStyle: {
color: "#ffffff", color: "#ffffff",
fontSize: 14, fontSize: 14,
lineHeight: 22, lineHeight: 24,
rich: { rich: {
text: { text: {
width: 100, width: 50,
marginLeft: 32, marginLeft: 32,
fontSize: 14, fontSize: 14,
}, },
@ -82,20 +84,20 @@ var options = {
}, },
}, },
data: legendData, data: legendData,
pageIconColor: "#fff", // pageIconColor: "#fff",
pageIconSize: 10, // pageIconSize: 10,
pageTextStyle: { // pageTextStyle: {
color: "#fff", // color: "#fff",
}, // },
type: "scroll", // type: "scroll",
pageButtonPosition: "end", // pageButtonPosition: "end",
}, },
series: [ series: [
/** 饼图上刻度 */ /** 饼图上刻度 */
{ {
type: "gauge", type: "gauge",
center: ["50%", "35%"], center: ["30%", "35%"],
radius: "46%", // 错位调整此处 radius: "43%", // 错位调整此处
startAngle: 0, startAngle: 0,
endAngle: 360, endAngle: 360,
splitNumber: 52, splitNumber: 52,
@ -116,7 +118,7 @@ var options = {
tooltip: false, tooltip: false,
type: "gauge", type: "gauge",
radius: "30%", radius: "30%",
center: ["50%", "35%"], center: ["30%", "35%"],
startAngle: 0, startAngle: 0,
endAngle: 360, endAngle: 360,
axisLine: { axisLine: {
@ -183,7 +185,7 @@ var options = {
{ {
type: "pie", type: "pie",
radius: ["40%", "50%"], radius: ["40%", "50%"],
center: ["50%", "35%"], center: ["30%", "35%"],
z: 10, z: 10,
label: { label: {
show: false, show: false,

288
ruoyi-ui/src/views/JiHeExpressway/pages/control/manual/statistic/components/Sitefiltering/index.vue

@ -1,46 +1,270 @@
<template> <template>
<div class="Eventfiltering"> <div class="Eventfiltering">
<div class="Eventfiltering-left" id="trafficIncidentsCharts"></div> <InputSearch
<div class="Eventfiltering-right"></div> class="search-box"
:formList="searchFormList"
@handleSearch="handleSearch"
/>
<div class="Eventfiltering-content">
<div class="Eventfiltering-left" ref="trafficIncidents"></div>
<div class="Eventfiltering-right" ref="trafficIncidentsPie"></div>
</div>
</div> </div>
</template> </template>
<script> <script>
// import trafficIncidentsCharts from "./trafficIncidentsCharts.js"; import InputSearch from "@screen/components/InputSearch/index.vue";
// import * as echarts from "echarts"; import trafficIncidentsCharts1 from "./trafficIncidentsCharts.js";
import trafficIncidentsChartsPie1 from "./trafficIncidentsChartsPie.js";
// export default { import { nonAutomaticWarningFacility } from "@/api/manualWarning/index.js";
// name: "Eventfiltering", import * as echarts from "echarts";
// components: { trafficIncidentsCharts }, import moment from "moment";
// data() { const drawRoundRect = (ctx, x, y, width, height, radius, gr) => {
// return {}; // ctx, x, y, , ,
// }, ctx.beginPath();
// mounted() { ctx.fillStyle = gr;
// var trafficIncidentsCharts = echarts.init( ctx.arc(x + radius, y + radius, radius, Math.PI, (Math.PI * 3) / 2);
// document.getElementById("trafficIncidentsCharts") ctx.lineTo(width - radius + x, y);
// ); ctx.arc(
// trafficIncidentsCharts.setOption(trafficIncidentsCharts); width - radius + x,
// }, radius + y,
// methods: {}, radius,
// }; (Math.PI * 3) / 2,
Math.PI * 2
);
ctx.lineTo(width + x, height + y - radius);
ctx.arc(
width - radius + x,
height - radius + y,
radius,
0,
(Math.PI * 1) / 2
);
ctx.lineTo(radius + x, height + y);
ctx.arc(radius + x, height - radius + y, radius, (Math.PI * 1) / 2, Math.PI);
ctx.closePath();
//ctx.stroke();
ctx.fill();
};
export default {
name: "Sitefiltering",
components: {
InputSearch,
},
props: {
name: {
type: String,
},
},
data() {
return {
// loading: false,
trafficIncidents: null,
trafficIncidentsPie: null,
formData: {
type: "day",
warningTime: "",
},
searchFormList: [
{
label: "事件类型:",
key: "type",
type: "select",
default: "day",
options: {
clearable: true,
options: [
{
key: "day",
label: "天",
},
{
key: "month",
label: "月",
},
{
key: "year",
label: "年",
},
],
},
},
{
label: "日期:",
key: "warningTime",
required: true,
type: "datePicker",
options: {
valueFormat: "yyyy-MM-dd",
},
visible: (data) => {
if (data.type == "day") {
return true;
}
},
},
{
label: "日期:",
key: "warningTime",
required: true,
type: "datePicker",
options: {
type: "month",
valueFormat: "yyyy-MM-dd",
},
visible: (data) => {
if (data.type == "month") {
return true;
}
},
},
{
label: "日期:",
key: "warningTime",
required: true,
type: "datePicker",
options: {
type: "year",
valueFormat: "yyyy-MM-dd",
},
visible: (data) => {
if (data.type == "year") {
return true;
}
},
},
],
};
},
watch: {
name: {
handler(newValue, oldValue) {
console.log("newValue", newValue);
if (newValue == "second") {
this.getWarningCharts();
}
},
deep: true,
},
},
mounted() {},
methods: {
getWarningCharts() {
setTimeout(() => {
this.$nextTick(async () => {
(this.formData.warningTime =
moment(new Date()).format("YYYY-MM-DD") + " 00:00:01"),
(this.trafficIncidents = echarts.init(this.$refs.trafficIncidents));
this.trafficIncidents.setOption(trafficIncidentsCharts1);
this.trafficIncidentsPie = echarts.init(
this.$refs.trafficIncidentsPie
);
this.trafficIncidentsPie.setOption(trafficIncidentsChartsPie1);
const domMap = this.$refs.trafficIncidentsPie;
let parentDiv = domMap.firstElementChild;
// // canvas;
let canvas = document.createElement("canvas");
canvas.width = parentDiv.offsetWidth;
canvas.height = parentDiv.offsetHeight;
parentDiv.appendChild(canvas);
const context = canvas.getContext("2d");
// //
let gr = context.createLinearGradient(280, 0, 580, 0);
gr.addColorStop(1, "rgba(92,197,255,0)");
gr.addColorStop(0, "rgba(92,197,255,0.5)");
context.lineWidth = 1; // 线
drawRoundRect(context, 430, 134, 280, 24, 12, gr);
drawRoundRect(context, 430, 168, 280, 24, 10, gr);
drawRoundRect(context, 430, 202, 280, 24, 10, gr);
drawRoundRect(context, 430, 236, 280, 24, 10, gr);
drawRoundRect(context, 430, 270, 280, 24, 10, gr);
drawRoundRect(context, 430, 304, 280, 24, 10, gr);
drawRoundRect(context, 430, 338, 280, 24, 10, gr);
drawRoundRect(context, 430, 372, 280, 24, 10, gr);
drawRoundRect(context, 430, 406, 280, 24, 10, gr);
drawRoundRect(context, 430, 440, 280, 24, 10, gr);
// drawRoundRect(context, 430, 474, 280, 24, 10, gr);
await this.getNonAutomaticWarningFacility(this.formData);
});
});
},
getNonAutomaticWarningFacility(data) {
return nonAutomaticWarningFacility(data).then((res) => {
let newData = res.data;
let seriesData = [];
let xData = [];
let pieData = [];
let total = null;
newData.forEach((item) => {
seriesData.push(item.number);
xData.push(item.facilityName);
pieData.push({
value: item.number,
name: item.facilityName,
});
total += item.number;
});
trafficIncidentsCharts1.series[0].data = seriesData;
trafficIncidentsCharts1.xAxis.data = xData;
trafficIncidentsChartsPie1.legend.formatter = function (name) {
let tarValue = 0;
for (let i = 0; i < newData.length; i++) {
if (newData[i].facilityName === name) {
tarValue = newData[i].number;
}
}
var percert = total == 0 ? 0 : ((tarValue / total) * 100).toFixed(2);
return `{text|${name}} {number|${tarValue} 起 } {number|${percert}%}`;
};
trafficIncidentsChartsPie1.title[0].text = total;
trafficIncidentsChartsPie1.series[2].data = pieData;
trafficIncidentsChartsPie1.legend.data = xData;
this.trafficIncidents.setOption(trafficIncidentsCharts1);
this.trafficIncidentsPie.setOption(trafficIncidentsChartsPie1);
});
},
handleSearch(value) {
value.warningTime = value.warningTime + " 00:00:01";
this.formData = { ...value };
this.getNonAutomaticWarningFacility(this.formData);
},
},
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.Eventfiltering { .Eventfiltering {
width: 99%; width: 99%;
height: 100%; height: 94%;
margin: auto; margin: auto;
display: flex;
justify-content: space-between; .search-box {
} width: 402px !important;
.Eventfiltering-left { float: right;
width: 60%; }
height: 100%;
background-color: #fff; .Eventfiltering-content {
} width: 100%;
.Eventfiltering-right { height: 96%;
width: 40%; display: flex;
height: 100%; justify-content: space-between;
background-color: #fff;
.Eventfiltering-left {
width: 63%;
height: 100%;
}
.Eventfiltering-right {
width: 34%;
height: 100%;
}
}
} }
</style> </style>

95
ruoyi-ui/src/views/JiHeExpressway/pages/control/manual/statistic/components/Sitefiltering/trafficIncidentsCharts.js

@ -0,0 +1,95 @@
var options = {
title: {
// text: '单位/%',
top: "0%",
left: "0%",
textStyle: {
fontSize: "10px",
fontWeight: 300,
color: "#B5C5D4",
opacity: 0.8,
},
},
tooltip: {
valueFormatter: function (value) {
return value + " 起";
},
},
grid: {
left: "50px",
right: "0%",
top: "50px",
bottom: "5%",
containLabel: true,
},
xAxis: {
type: "category",
data: [],
axisLine: {
lineStyle: {
color: "rgba(49, 217, 255, 0.8)",
},
},
axisTick: {
show: false,
},
axisLabel: {
color: "#fff",
fontSize: "18px",
},
},
yAxis: [
{
// type: 'value',
// min: function (value) {
// return value.min*0.9;
// },
name: "交通事件(起)",
nameTextStyle: {
color: "#fff",
fontSize: 18,
align: "center",
},
type: "value",
axisLine: {
show: false,
lineStyle: {
width: 1,
color: "#545454",
},
},
splitLine: {
lineStyle: {
color: "rgba(49, 217, 255, 0.5)",
},
},
axisTick: {
show: false,
},
axisLabel: {
color: "#fff",
fontSize: "18px",
formatter: (value) => {
return value;
},
},
},
],
series: [
{
// name: '审限内结案率',
data: [5, 10, 20, 30],
type: "pictorialBar",
symbol: "roundRect",
symbolRepeat: true,
symbolSize: [13, 4],
// symbolOffset: symbolOffset,
// barWidth:'40%',
itemStyle: {
color: "#20E7FF",
},
},
],
};
export default options;

232
ruoyi-ui/src/views/JiHeExpressway/pages/control/manual/statistic/components/Sitefiltering/trafficIncidentsChartsPie.js

@ -0,0 +1,232 @@
let colors = [
"#4278F8",
"#5372C4",
"#0046FF",
"#FB9434",
"#854101",
"#05E599",
"#219F73",
"#7CEDD5",
"#854101",
"#05E599",
"#219F73",
"#7CEDD5",
];
var legendData = [];
var options = {
title: [
{
text: "999",
top: "36%",
textAlign: "center",
left: "29%",
textStyle: {
color: "#ffffff",
fontSize: 30,
fontFamily: "SourceHanSansCN",
},
},
{
text: "总数",
top: "32%",
textAlign: "center",
left: "29%",
textStyle: {
color: "rgba(242, 252, 253, 0.84)",
fontSize: 16,
fontFamily: "SourceHanSansCN",
},
},
],
grid: {
top: "38%",
left: "6%",
right: "6%",
bottom: "3%",
containLabel: true,
},
tooltip: {
show: true,
valueFormatter: function (value) {
return value + " 起";
},
},
legend: {
show: true,
width: "300px",
height: "520px",
orient: "vertical",
icon: "circle",
top: "15%",
left: "70%",
itemWidth: 10,
itemHeight: 10,
textStyle: {
color: "#ffffff",
fontSize: 14,
lineHeight: 24,
rich: {
text: {
width: 100,
marginLeft: 32,
fontSize: 14,
},
number: {
fontSize: 14,
color: "#37E7FF",
marginLeft: 32,
fontWeight: "bold",
},
unit: {
fontSize: 14,
},
},
},
data: legendData,
// pageIconColor: "#fff",
// pageIconSize: 10,
// pageTextStyle: {
// color: "#fff",
// },
// type: "scroll",
// pageButtonPosition: "end",
},
series: [
/** 饼图上刻度 */
{
type: "gauge",
center: ["30%", "35%"],
radius: "43%", // 错位调整此处
startAngle: 0,
endAngle: 360,
splitNumber: 52,
axisLine: { show: false },
splitLine: {
// length: 39,
length: "2",
lineStyle: {
width: 5,
color: "#5CC5FF",
},
},
axisTick: { show: false },
axisLabel: { show: false },
},
{
name: "总数",
tooltip: false,
type: "gauge",
radius: "30%",
center: ["30%", "35%"],
startAngle: 0,
endAngle: 360,
axisLine: {
lineStyle: {
color: [[1, "#0AFFE950"]],
width: 1,
},
},
axisTick: {
show: false,
},
splitLine: {
show: false,
},
axisLabel: {
show: false,
},
detail: {
show: false,
},
pointer: {
show: false,
},
progress: {
show: true,
width: 80,
itemStyle: {
color: {
type: "radial",
x: 0.5,
y: 0.5,
r: 0.5,
colorStops: [
{
offset: 0,
color: "rgb(0, 224, 205, 0)",
},
{
offset: 0.7,
color: "rgba(0, 224, 205, 0)",
},
{
offset: 1,
color: "rgba(10, 255, 233, 0.5)",
},
],
},
},
},
data: [
{
value: 100,
},
],
tooltip: {
backgroundColor: "rgba(50,50,50,0)",
formatter: " ",
borderWidth: 0,
textStyle: {
textShadowColor: "rgba(50,50,50,0)",
},
},
},
{
type: "pie",
radius: ["40%", "50%"],
center: ["30%", "35%"],
z: 10,
label: {
show: false,
},
data: [],
labelLine: {
show: false,
},
itemStyle: {
normal: {
borderRadius: "5",
borderWidth: 2,
borderType: "solid",
borderCap: "round",
borderJoin: "round",
borderColor: "#064258",
borderMiterLimit: "20",
color: function (params) {
return {
type: "linear",
x: 0,
y: 0,
x2: 1,
y2: 1,
colorStops: [
{
offset: 0,
color: colors[params.dataIndex], // 0% 处的颜色
},
{
offset: 1,
color: colors[params.dataIndex], // 100% 处的颜色
},
],
globalCoord: false, // 缺省为 false
};
},
},
},
},
],
};
export default options;

221
ruoyi-ui/src/views/JiHeExpressway/pages/control/manual/statistic/components/Timefiltering/index.vue

@ -1,46 +1,203 @@
<template> <template>
<div class="Eventfiltering"> <div class="Eventfiltering">
<div class="Eventfiltering-left" id="trafficIncidentsCharts"></div> <InputSearch
<div class="Eventfiltering-right"></div> class="search-box"
:formList="searchFormList"
@handleSearch="handleSearch"
/>
<div class="Eventfiltering-content">
<div class="Eventfiltering-left" ref="trafficIncidents"></div>
</div>
</div> </div>
</template> </template>
<script> <script>
// import trafficIncidentsCharts from "./trafficIncidentsCharts.js"; import InputSearch from "@screen/components/InputSearch/index.vue";
// import * as echarts from "echarts"; import trafficIncidentsCharts2 from "./trafficIncidentsCharts.js";
import { nonAutomaticWarningTimeType } from "@/api/manualWarning/index.js";
// export default { import * as echarts from "echarts";
// name: "Eventfiltering", import moment from "moment";
// components: { trafficIncidentsCharts },
// data() { export default {
// return {}; name: "Sitefiltering",
// }, components: {
// mounted() { InputSearch,
// var trafficIncidentsCharts = echarts.init( },
// document.getElementById("trafficIncidentsCharts") props: {
// ); name: {
// trafficIncidentsCharts.setOption(trafficIncidentsCharts); type: String,
// }, },
// methods: {}, },
// }; data() {
return {
trafficIncidents: null,
formData: {
type: "day",
warningTime: "",
},
searchFormList: [
{
label: "事件类型:",
key: "type",
type: "select",
default: "day",
options: {
clearable: true,
options: [
{
key: "day",
label: "天",
},
{
key: "month",
label: "月",
},
{
key: "year",
label: "年",
},
],
},
},
{
label: "日期:",
key: "warningTime",
required: true,
type: "datePicker",
options: {
valueFormat: "yyyy-MM-dd",
},
visible: (data) => {
if (data.type == "day") {
return true;
}
},
},
{
label: "日期:",
key: "warningTime",
required: true,
type: "datePicker",
options: {
type: "month",
valueFormat: "yyyy-MM-dd",
},
visible: (data) => {
if (data.type == "month") {
return true;
}
},
},
{
label: "日期:",
key: "warningTime",
required: true,
type: "datePicker",
options: {
type: "year",
valueFormat: "yyyy-MM-dd",
},
visible: (data) => {
if (data.type == "year") {
return true;
}
},
},
],
};
},
watch: {
name: {
handler(newValue, oldValue) {
console.log("newValue", newValue);
if (newValue == "third") {
this.getWarningCharts();
}
},
deep: true,
},
},
mounted() {},
methods: {
getWarningCharts() {
setTimeout(() => {
this.$nextTick(async () => {
(this.formData.warningTime =
moment(new Date()).format("YYYY-MM-DD") + " 00:00:01"),
(this.trafficIncidents = echarts.init(this.$refs.trafficIncidents));
this.trafficIncidents.setOption(trafficIncidentsCharts2);
await this.getNonAutomaticWarningTimeType(this.formData);
});
});
},
getNonAutomaticWarningTimeType(data) {
console.log("data", data);
return nonAutomaticWarningTimeType(data).then((res) => {
let newData = res.data;
let seriesData = [];
let xData = [];
let pieData = [];
let total = null;
newData.forEach((item) => {
seriesData.push(item.number);
total += item.number;
if (data.type === "day") {
xData.push(item.time);
pieData.push({
value: item.number,
name: item.time,
});
} else if (data.type === "month") {
xData.push(item.day);
pieData.push({
value: item.number,
name: item.day,
});
} else {
xData.push(item.month);
pieData.push({
value: item.number,
name: item.month,
});
}
});
trafficIncidentsCharts2.series[0].data = pieData;
trafficIncidentsCharts2.xAxis.data = xData;
this.trafficIncidents.setOption(trafficIncidentsCharts2);
});
},
handleSearch(value) {
value.warningTime = value.warningTime + " 00:00:01";
this.formData = { ...value };
this.getNonAutomaticWarningTimeType(this.formData);
},
},
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.Eventfiltering { .Eventfiltering {
width: 99%; width: 99%;
height: 100%; height: 94%;
margin: auto; margin: auto;
display: flex;
justify-content: space-between; .search-box {
} width: 402px !important;
.Eventfiltering-left { float: right;
width: 60%; }
height: 100%;
background-color: #fff; .Eventfiltering-content {
} width: 100%;
.Eventfiltering-right { height: 96%;
width: 40%; display: flex;
height: 100%; justify-content: space-between;
background-color: #fff;
.Eventfiltering-left {
width: 100%;
height: 100%;
}
}
} }
</style> </style>

95
ruoyi-ui/src/views/JiHeExpressway/pages/control/manual/statistic/components/Timefiltering/trafficIncidentsCharts.js

@ -0,0 +1,95 @@
var options = {
title: {
// text: '单位/%',
top: "0%",
left: "0%",
textStyle: {
fontSize: "10px",
fontWeight: 300,
color: "#B5C5D4",
opacity: 0.8,
},
},
tooltip: {
valueFormatter: function (value) {
return value + " 起";
},
},
grid: {
left: "50px",
right: "0%",
top: "50px",
bottom: "5%",
containLabel: true,
},
xAxis: {
type: "category",
data: [],
axisLine: {
lineStyle: {
color: "rgba(49, 217, 255, 0.8)",
},
},
axisTick: {
show: false,
},
axisLabel: {
color: "#fff",
fontSize: "18px",
},
},
yAxis: [
{
// type: 'value',
// min: function (value) {
// return value.min*0.9;
// },
name: "交通事件(起)",
nameTextStyle: {
color: "#fff",
fontSize: 18,
align: "center",
},
type: "value",
axisLine: {
show: false,
lineStyle: {
width: 1,
color: "#545454",
},
},
splitLine: {
lineStyle: {
color: "rgba(49, 217, 255, 0.5)",
},
},
axisTick: {
show: false,
},
axisLabel: {
color: "#fff",
fontSize: "18px",
formatter: (value) => {
return value;
},
},
},
],
series: [
{
// name: '审限内结案率',
data: [5, 10, 20, 30],
type: "pictorialBar",
symbol: "roundRect",
symbolRepeat: true,
symbolSize: [13, 4],
// symbolOffset: symbolOffset,
// barWidth:'40%',
itemStyle: {
color: "#20E7FF",
},
},
],
};
export default options;

15
ruoyi-ui/src/views/JiHeExpressway/pages/control/manual/statistic/index.vue

@ -1,14 +1,14 @@
<template> <template>
<div class="comp_box"> <div class="comp_box">
<el-tabs class="footTabs" v-model="activeName"> <el-tabs class="footTabs" v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="按事件分类" name="first"> <el-tab-pane label="按事件分类" name="first">
<Eventfiltering /> <Eventfiltering name="first" />
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="按卡口" name="second"> <el-tab-pane label="按卡口" name="second">
<Sitefiltering /> <Sitefiltering :name="activeName" />
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="按日期" name="third"> <el-tab-pane label="按日期" name="third">
<Timefiltering /> <Timefiltering :name="activeName" />
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</div> </div>
@ -38,10 +38,9 @@ export default {
}, },
}, },
methods: { methods: {
// changeTabs(tab, event) { handleClick(value) {
// console.log(tab, event); this.activeName = value.name;
// // this.activeName = value; },
// },
}, },
mounted() {}, mounted() {},
}; };

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

@ -3,7 +3,11 @@
<div class="summary"> <div class="summary">
<div class="summaryUnit" v-for="item in summary" :style="{'flex-basis' : item.width + 'px'}"> <div class="summaryUnit" v-for="item in summary" :style="{'flex-basis' : item.width + 'px'}">
<div class="info info_01 keep-ratio" origin="left"> <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>
<div class="info info_02 keep-ratio" origin="left"> <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> <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(){ mounted(){
this.initData(); this.initData();
this.mockData();
}, },
methods: { 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() { initData() {
this.summary = [ this.summary = [
{ {
@ -156,31 +189,31 @@ export default {
}, },
{ {
width:376, width:376,
dataAll: { title: "接入数据总数", value: 1213213447, unit: "条" }, dataAll: { title: "接入数据总数", value: 1251446, unit: "条" },
dataGreen: { title: "昨日接入数", value: 20624577, unit: "条" }, dataGreen: { title: "昨日接入数", value: 20624577, unit: "条" },
dataRed: { title: "环比", value: 0.04, unit: "%" } dataRed: { title: "环比", value: 0.04, unit: "%" }
}, },
{ {
width: 287, width: 287,
dataAll: { title: "存储占用量", value: 86059, unit: "GB" }, dataAll: { title: "存储占用量", value: 32, unit: "GB" },
dataGreen: { title: "昨日新增", value: 55, unit: "GB" }, dataGreen: { title: "昨日新增", value: 55, unit: "GB" },
dataRed: { title: "环比", value: 20.5, unit: "%" } dataRed: { title: "环比", value: 20.5, unit: "%" }
}, },
{ {
width: 376, width: 376,
dataAll: { title: "服务调用总数", value: 43392688, unit: "次" }, dataAll: { title: "服务调用总数", value: 752524, unit: "次" },
dataGreen: { title: "昨日服务数", value: 1210345, unit: "次" }, dataGreen: { title: "昨日服务数", value: 21034145, unit: "次" },
dataRed: { title: "环比", value: 0.04, unit: "%" } dataRed: { title: "环比", value: 0.04, unit: "%" }
}, },
{ {
width:226, width:226,
dataAll: { title: "内存", value: "1274G/1800G", unit: "" }, dataAll: { title: "内存", value: 0, total:1800, unit: "G" },
dataGreen: { title: "使用率", value: 70.73, unit: "%" } dataGreen: { title: "使用率", value: 70.73, unit: "%" }
}, },
{ {
width: 226, width: 226,
dataAll: { title: "CPU", value: "71/126", unit: "" }, dataAll: { title: "CPU", value: 0, total:126, unit: "" },
dataGreen: { title: "使用率", value: 56.35, unit: "" } dataGreen: { title: "使用率", value: 56.35, unit: "%" }
} }
]; ];
this.manage = [ this.manage = [
@ -224,7 +257,7 @@ export default {
<style lang='scss' scoped> <style lang='scss' scoped>
h4, p, ul,li{ margin: 0; padding:0;} 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{ .summary{
display: flex; justify-content: space-between; height: 87px; align-items: stretch; 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; .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 { .congestion {
.board { .board {
padding: 0px 20px;
background: linear-gradient(180deg, rgba(6, 66, 88, 0.2) 0%, #064258 100%); background: linear-gradient(180deg, rgba(6, 66, 88, 0.2) 0%, #064258 100%);
border-radius: 5px 5px 5px 5px; border-radius: 5px 5px 5px 5px;
opacity: 1; opacity: 1;
@ -168,13 +167,13 @@ export default {
) )
1 1; 1 1;
display: flex; display: flex;
justify-content: space-between; justify-content: center;
align-items: center; align-items: center;
} }
} }
.charts { .charts {
height: 180px; height: 180px;
width: 100%; width: 430px;
} }
</style> </style>

5
ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventQuery/assets/charts2.js

@ -132,7 +132,7 @@ var options = {
}, },
color: colorList, color: colorList,
legend: { legend: {
top: 100, top: "middle",
right: 20, right: 20,
orient: "vertical", //改变排列方式 orient: "vertical", //改变排列方式
icon: "circle", //改变legend小图标形状 icon: "circle", //改变legend小图标形状
@ -146,12 +146,13 @@ var options = {
rich: { rich: {
a: { a: {
align: "left", align: "left",
width: 45, width: 60,
fontSize: 12, fontSize: 12,
}, },
b: { b: {
align: "left", align: "left",
fontSize: 12, fontSize: 12,
width: 50,
color: "#37E7FF", color: "#37E7FF",
marginLeft: 0, marginLeft: 0,
}, },

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

@ -44,9 +44,9 @@
<div> <div>
<WgtTitle :title="'感知事件类型分析'"></WgtTitle> <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> <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>
</div> </div>
@ -71,6 +71,7 @@ import chart2 from "./assets/charts2";
import chart3 from "./assets/charts3"; import chart3 from "./assets/charts3";
import ElQuarterPicker from "./ElQuarterPicker"; import ElQuarterPicker from "./ElQuarterPicker";
import moment from "moment"; import moment from "moment";
import { WarningType } from "@screen/utils/enum.js";
import { import {
getWarningTrend, getWarningTrend,
getWarningSectionType, getWarningSectionType,
@ -116,6 +117,7 @@ export default {
}, },
data() { data() {
return { return {
canvas:null,
typeOptions: [ typeOptions: [
{ {
value: "year", value: "year",
@ -362,7 +364,7 @@ export default {
}) })
}); });
// //
getWarningSectionType({ getWarningSectionType({
type: qType, type: qType,
sectionId: this.selectId, sectionId: this.selectId,
@ -375,35 +377,11 @@ export default {
if (res.code == 200) { if (res.code == 200) {
let numbers = []; let numbers = [];
this.chart2List = res.data; this.chart2List = res.data;
let data = res.data.warningTypeList; let data = res.data.warningTypeList ;
let total = res.data.total; let total = res.data.total;
data.forEach((it) => { data.forEach((it) => {
if (it.warningType == 1) { types.push(WarningType[it.warningType]);
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 if (it.warningType == 10) {
types.push("交通事故");
} else if (it.warningType == 11) {
types.push("车辆故障");
} else if (it.warningType == 99) {
types.push("其他");
}
numbers.push({ numbers.push({
name: types[types.length - 1], name: types[types.length - 1],
@ -534,89 +512,46 @@ export default {
this.dateTime = moment(new Date()).format("YYYY-MM-DD"); this.dateTime = moment(new Date()).format("YYYY-MM-DD");
} }
}, },
initChart1() { initChart1(){
this.myChart1 = echarts.init(document.getElementById("chart1")); this.myChart1 = echarts.init(document.getElementById("chart1"));
this.myChart1.setOption(chart1); this.myChart1.setOption(chart1);
}, },
initChart3() { initChart3(){
this.myChart3 = echarts.init(document.getElementById("chart3")); this.myChart3 = echarts.init(document.getElementById("chart3"));
this.myChart3.setOption(chart3); this.myChart3.setOption(chart3);
}, },
initChart2(types) { generateChart2(){
let ele = this.$refs["chart2"];
this.myChart2 = echarts.init(document.getElementById("chart2")); this.myChart2 = echarts.init(ele);
this.myChart2.setOption(chart2); let parentDiv = ele.firstChild;
this.canvasChart2 = document.createElement("canvas");
const domMap = document.getElementById("chart2"); this.canvasChart2.width = parentDiv.offsetWidth;
let parentDiv = domMap.firstChild; this.canvasChart2.height = parentDiv.offsetHeight;
// canvas parentDiv.appendChild(this.canvasChart2);
let canvas = document.createElement("canvas"); },
canvas.width = parentDiv.offsetWidth; initChart2(){
canvas.height = parentDiv.offsetHeight; if(!this.myChart2){
parentDiv.appendChild(canvas); this.generateChart2();
const context = canvas.getContext("2d"); }
context.lineWidth = 1; // 线 let ele = this.$refs["chart2"];
this.myChart2.setOption(chart2);
//
// const context = this.canvasChart2.getContext('2d')
var gr = context.createLinearGradient(247, 63, 450, 0); context.clearRect(0, 0, this.canvasChart2.width, this.canvasChart2.height); //
gr.addColorStop(1, "rgba(92,197,255,0)");
gr.addColorStop(0, "rgba(92,197,255,0.5)"); context.lineWidth = 1; // 线
let total = chart2.legend.data.length;
console.log('types', types) for(let i=0; i<total; i++){
types.forEach((it, index) => { let unitH = 32;
drawRoundRect(context, 357, (98 + index * 32), 140, 24, 12, gr); 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)");
// var gr = context.createLinearGradient(247, 63, 450, 0); gr.addColorStop(1, "rgba(92,197,255,0)");
// gr.addColorStop(1, "rgba(92,197,255,0)"); drawRoundRect(context, x, y, 220, 24, 12, gr);
// 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);
},
}, },
mounted() { mounted() {
getRoadSectionList().then((res) => { getRoadSectionList().then((res) => {
@ -678,8 +613,8 @@ export default {
.unit_con { .unit_con {
flex: 1; flex: 1;
margin: 95px 20px 30px; margin: 95px 20px 30px; position: relative;
position: relative; // &.unit_con_02{ margin: 105px 0px 20px; }
} }
.empty { .empty {

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

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

2
ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/typeAnalysis/index.vue

@ -201,7 +201,7 @@ export default {
rgba(55, 231, 255, 0.1), rgba(55, 231, 255, 0.1),
rgba(55, 231, 255, 0)) 1 1; rgba(55, 231, 255, 0)) 1 1;
display: flex; display: flex;
justify-content: space-between; justify-content: center;
align-items: 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 DailyDisposal from "./components/dailyDisposal/index.vue";
import TypeAnalysis from "./components/typeAnalysis/index.vue"; import TypeAnalysis from "./components/typeAnalysis/index.vue";
import MonthStatistice from "./components/monthStatistics/index.vue"; import MonthStatistice from "./components/monthStatistics/index.vue";
import EventQuery from "./components/eventQuery"; import EventQuery from "./components/eventQuery/index.vue";
export default { export default {
name: "EventDetection", name: "EventDetection",

59
ruoyi-ui/src/views/JiHeExpressway/utils/enum.js

@ -920,6 +920,17 @@ export const planDeviceOptions = [
}, },
]; ];
// 非机预警事件主类
export const warningType = {
1: "交通拥堵",
2: "行人",
4: "停车",
5: "违规驾驶",
6: "路障",
7: "道路施工",
99: "其他",
};
export const WarningSubclassList = Object.keys(WarningSubclass).reduce( export const WarningSubclassList = Object.keys(WarningSubclass).reduce(
(prev, key) => { (prev, key) => {
prev[key] = Object.keys(WarningSubclass[key]).map((subKey) => { prev[key] = Object.keys(WarningSubclass[key]).map((subKey) => {
@ -1012,3 +1023,51 @@ export const gzztMap = {
"03": "闪烁", "03": "闪烁",
"04": "关闭", "04": "关闭",
}; };
// 非机预警事件
export const manualEarlyWarning = [
{
value: "1",
label: "拥堵",
},
{
value: "2",
label: "行人",
},
{
value: "6",
label: "抛洒物",
},
{
value: "5",
label: "变道",
},
{
value: "99",
label: "机占非",
},
{
value: "6",
label: "路障",
},
{
value: "1",
label: "施工",
},
{
value: "2",
label: "停车",
},
{
value: "6",
label: "压线",
},
{
value: "1",
label: "掉头",
},
{
value: "2",
label: "逆行",
},
];

4
ruoyi-ui/vue.config.js

@ -53,8 +53,8 @@ module.exports = {
// target: `http://10.168.69.255:8087`, //正晨后台 连现场物联 刘文阁 // target: `http://10.168.69.255:8087`, //正晨后台 连现场物联 刘文阁
// target: `http://10.168.78.135:8087`, //王钦 // target: `http://10.168.78.135:8087`, //王钦
// target: `http://10.168.66.196:8087`, //正晨后台 连现场物联 刘文阁2 // target: `http://10.168.66.196:8087`, //正晨后台 连现场物联 刘文阁2
target: `http://10.168.68.42:8087`, //王思祥 // target: `http://10.168.65.156:8087`, //王思祥
// target: `http://10.168.65.194:8087`, //赵祥龙 target: `http://10.168.65.194:8087`, //赵祥龙
// target: `http://10.168.65.156:8097`, //孟 // target: `http://10.168.65.156:8097`, //孟
// target: `http://10.168.56.165:8087`, //王家宝 // target: `http://10.168.56.165:8087`, //王家宝

Loading…
Cancel
Save