Browse Source

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

wangqin
hui 9 months ago
parent
commit
03f8cac458
  1. 6
      ruoyi-ui/src/views/JiHeExpressway/components/InputSearch/index.vue
  2. 18
      ruoyi-ui/src/views/JiHeExpressway/components/RoadStateCard/index.vue
  3. 6
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/AMapContainer/index.vue
  4. 20
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/index.vue
  5. 57
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/buttonEvent.js
  6. 6
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/index.vue
  7. 2
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/EventDetailDialog/data.js
  8. 2
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/FormEvent/PresetFormItems.js
  9. 2
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/FormEvent/data.js
  10. 11
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/FormEvent/index.vue
  11. 91
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/data.js
  12. 61
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/index.vue
  13. 6
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/dailyDisposal/assets/charts.js
  14. 21
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/dailyDisposal/index.vue

6
ruoyi-ui/src/views/JiHeExpressway/components/InputSearch/index.vue

@ -54,7 +54,11 @@ export default {
data() {
return {
width: null,
popperOptions: {}
popperOptions: {
popHideCallBack: () => {
// console.log("---")
}
}
}
},
emit: [

18
ruoyi-ui/src/views/JiHeExpressway/components/RoadStateCard/index.vue

@ -2,7 +2,8 @@
<BorderRadiusImage class='RoadStateCard' borderRadius="2px"
borderColor="linear-gradient(360deg, rgba(55, 231, 255, 0.3), rgba(55, 231, 255, 0))" borderWidth="2px">
<div class="left">
<img src="./test.png">
<img :src="(cardData.pictures ? cardData.pictures[0] : null) || require(`./test.png` )">
<!-- <img :src="require(`./test.png`)"> -->
</div>
<div class="right">
<div class="info">
@ -12,10 +13,12 @@
</p>
</div>
<div class="controls">
<Button :style="{ background: firstBtnColor,width: '50%' }" @click.native="$emit('firstBtnClick', cardData.id)">{{
<Button :style="{ background: firstBtnColor, width: '50%' }"
@click.native="$emit('firstBtnClick', cardData.id)">{{
firstBtnText
}}</Button>
<Button v-if="cardData.state != 3" :style="{ background: lastBtnColor,width: '50%' }" @click.native="$emit('lastBtnClick', cardData.id)">{{ lastBtnText
<Button v-if="cardData.state != 3" :style="{ background: lastBtnColor, width: '50%' }"
@click.native="$emit('lastBtnClick', cardData.id)">{{ lastBtnText
}}</Button>
</div>
</div>
@ -69,7 +72,7 @@ export default {
label: "位置"
},
{
key: "direction",
key: "stringDirection",
label: "方向"
},
{
@ -79,6 +82,11 @@ export default {
])
}
},
data(){
return {
picUrl: './test.png'
}
},
emit: ['firstBtnClick', "lastBtnClick"],
components: {
Button,
@ -123,10 +131,12 @@ export default {
flex: 1;
display: flex;
flex-direction: column;
>p {
font-size: 14px;
color: #f4f4f4;
line-height: 24px;
&:first-child {
color: #37E7FF;
font-size: 18px;

6
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/AMapContainer/index.vue

@ -30,7 +30,7 @@ export default {
},
async mounted() {
// console.log(this.$refs.mapContainerRef);
this.AMap = await loadAMap();
this.AMap = await loadAMap();//map load
if (!this.AMap) return;
@ -53,9 +53,9 @@ export default {
Vue.prototype.mapIns = this.aMapIns;
this.aMapIns.on("complete", () => {
this.aMapIns.on("complete", () => { //map
this.loading = false;
this.$emit("update:isGisCompleted", true);
// var polyline1 = new this.AMap.Polyline({
// path: [],
// strokeColor: "#67EBF7",

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

@ -129,6 +129,22 @@ export default {
}
}
},
props: {
isGisCompleted: {
type: Boolean,
default: () => false
}
},
watch: {
isGisCompleted: {
handler(bool) {
if (!bool) return;
this.tabContentData.forEach(item => {
this.handleDeviceImmediate(item, true);
});
}
}
},
inject: ['getMap'],
created() {
const defaultActive = 0;
@ -169,7 +185,7 @@ export default {
this.active = item.title;
this.tabContentData = item.children;
},
handleDeviceImmediate(item) {
handleDeviceImmediate(item, isDefault) {
const key = getHandleDeviceType(item) || `${this.active}/${item.title}`;
const status = item.status;
@ -180,7 +196,7 @@ export default {
if (!eventMap[`${key}${status ? "_close" : ""}`]) return this.$emit("onClickItem", item);
eventMap[`${key}${status ? "_close" : ""}`]?.call(this, item, this.filterData);
eventMap[`${key}${status ? "_close" : ""}`]?.call(this, item, this.filterData, isDefault);
},
handleDevice: debounce(function (item) {
this.handleDeviceImmediate(item);

57
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/buttonEvent.js

@ -84,11 +84,11 @@ let debounceNoneLngLatMessage = debounce(() => {
Message.warning("部分设备经纬度为空");
});
function resolveDataOptions(data, config, component) {
function resolveDataOptions(data, config, component, isDefault) {
let lnglat =
data.longitude && data.latitude ? [data.longitude, data.latitude] : null;
if (!lnglat) debounceNoneLngLatMessage();
if (!lnglat && !isDefault) debounceNoneLngLatMessage();
return {
weight: 1,
@ -113,15 +113,17 @@ function resolveDataOptions(data, config, component) {
export const eventMap = {
// 设备 需要在地图显示的
async "地图路测设备/map"(item, filterData) {
async "地图路测设备/map"(item, filterData, isDefault) {
const config = DeviceForMap[item.title];
const loadingMessage = Message.info({
let loadingMessage;
if (!isDefault) {
loadingMessage = Message.info({
message: `${item.title}设备加载中...`,
duration: 0,
customClass: "loading-message",
iconClass: "el-icon-loading",
});
}
const data = await getDeviceList(config.deviceType, filterData)
.then(async (data) => {
@ -130,10 +132,11 @@ export const eventMap = {
})
.catch(() => {});
loadingMessage.close();
loadingMessage?.close();
if (!data) return;
if (!data.length) return Message.warning(`没有${item.title}事件数据!`);
if (!data.length && !isDefault)
return Message.warning(`没有${item.title}事件数据!`);
eventMap[`地图路测设备/map_close`](item);
@ -143,7 +146,7 @@ export const eventMap = {
};
let removeData = data.map((item) =>
resolveDataOptions.call(this, item, options, config.dialog)
resolveDataOptions.call(this, item, options, config.dialog, isDefault)
);
console.log(
"%c [ removeData ]-112-「buttonEvent.js」",
@ -161,14 +164,16 @@ export const eventMap = {
},
// 事件 需要在地图显示的
async "地图事件专题/map"(item) {
const loadingMessage = Message.info({
async "地图事件专题/map"(item, filterData, isDefault) {
let loadingMessage;
if (!isDefault) {
loadingMessage = Message.info({
message: `${item.title}事件位置加载中...`,
duration: 0,
customClass: "loading-message",
iconClass: "el-icon-loading",
});
}
const data = await getEventTopicList(EventTopics[item.title])
.then(async (data) => {
await delay(600);
@ -176,11 +181,12 @@ export const eventMap = {
})
.catch(() => {});
loadingMessage.close();
loadingMessage?.close();
if (!data) return;
if (!data.length) return Message.warning(`没有${item.title}事件数据!`);
if (!data.length && !isDefault)
return Message.warning(`没有${item.title}事件数据!`);
eventMap[`地图事件专题/map_close`](item);
@ -190,7 +196,13 @@ export const eventMap = {
};
let removeData = data.map((item) =>
resolveDataOptions.call(this, item, options, "TrafficIncidents")
resolveDataOptions.call(
this,
item,
options,
"TrafficIncidents",
isDefault
)
);
markerClusterIns.addData(removeData);
@ -203,14 +215,16 @@ export const eventMap = {
},
// 感知事件
async "事件专题/感知事件"(item) {
const loadingMessage = Message.info({
async "事件专题/感知事件"(item, filterData, isDefault) {
let loadingMessage;
if (!isDefault) {
loadingMessage = Message.info({
message: `${item.title}位置加载中...`,
duration: 0,
customClass: "loading-message",
iconClass: "el-icon-loading",
});
}
const data = await getPerceiveEventList()
.then(async (data) => {
await delay(600);
@ -218,11 +232,12 @@ export const eventMap = {
})
.catch(() => {});
loadingMessage.close();
loadingMessage?.close();
if (!data) return;
if (!data?.length) return Message.warning(`没有${item.title}数据!`);
if (!data?.length && !isDefault)
return Message.warning(`没有${item.title}数据!`);
eventMap[`事件专题/感知事件_close`](item);
@ -232,12 +247,12 @@ export const eventMap = {
};
let removeData = data.map((item) =>
resolveDataOptions.call(this, item, options, "PerceiveEvent")
resolveDataOptions.call(this, item, options, "PerceiveEvent", isDefault)
);
markerClusterIns.addData(removeData);
loadingMessage.close();
loadingMessage?.close();
cacheRemoveFunc[`事件专题/${item.title}`] = () =>
markerClusterIns.removeData(removeData);

6
ruoyi-ui/src/views/JiHeExpressway/pages/Home/index.vue

@ -1,6 +1,6 @@
<template>
<div class='Home'>
<AMapContainer ref="AMapContainerRef" />
<AMapContainer ref="AMapContainerRef" @update:isGisCompleted="(data) => { this.isGisCompleted = data; }" />
<section class="content">
<!-- 左侧 -->
<div class="content-l">
@ -8,7 +8,7 @@
<FocusedMonitoring class="card-menu" />
<!-- -->
<RoadAndEvents ref="RoadAndEventsRef" class="content-l-b card-menu" />
<RoadAndEvents ref="RoadAndEventsRef" :isGisCompleted="isGisCompleted" class="content-l-b card-menu" />
</div>
<!-- 右侧 -->
@ -57,7 +57,7 @@ export default {
return {
isShowInfoBoard: false,
selectedDevice: null,
isGisCompleted: false,
}
},
provide() {

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

@ -82,7 +82,7 @@ export const formList = [
},
{
label: "事件描述:",
key: "direction",
key: "remark",
type: "input",
gridColumn: 3,
options: {

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

@ -714,7 +714,7 @@ export const route = {
export const eventHappenTime = {
label: "事件发生时间:",
key: "startTime",
key: "occurrenceTime",
required: true,
type: "datePicker",
options:{

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

@ -8,7 +8,7 @@ export const tabConfigList = [
list: [
{ ...PresetFormItems.callPolicePersonName, key: 'dcEventAccident.reporterName' },
{ ...PresetFormItems.callPolicePersonPhone, key: 'dcEventAccident.reporterPhoneNumber' },
PresetFormItems.trafficAccidentType,
{ ...PresetFormItems.trafficAccidentType, key: 'dcEventAccident.accidentType' },
PresetFormItems.eventLevel,
{ ...PresetFormItems.locationMode, key: 'dcEventAccident.locationType' },
PresetFormItems.freeway,

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

@ -154,10 +154,14 @@ export default {
if (this.index == 1) {
formData.dcEventVehicleAccident.laneOccupancy = formData.dcEventVehicleAccident.laneOccupancy.join(',')
}
// console.log('formData',formData)
// return;
let stakeMark = formData.stakeMark;
if (this.index == 8) {
let endStakeMark = formData.endStakeMark;
formData.dcEventAbnormalWeather.endStakeMark = (endStakeMark && endStakeMark.length > 0) ? ('K' + endStakeMark[0] + '+' + endStakeMark[1]) : '';
}
console.log('formData',formData)
return;
let stakeMark = formData.stakeMark;
request({
url: `/dc/system/event`,
method: "post",
@ -165,7 +169,6 @@ export default {
...formData,
eventType: Number(this.index) + 1,
stakeMark: (stakeMark && stakeMark.length > 0) ? ('K' + stakeMark[0] + '+' + stakeMark[1]) : '',
endStakeMark: (endStakeMark && endStakeMark.length > 0) ? ('K' + endStakeMark[0] + '+' + endStakeMark[1]) : '',
}
})
.then((result) => {

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

@ -23,8 +23,90 @@ export const tabMap = {
text: "处置记录",
},
};
export const gjSearchFormList = [
{
label: "事件来源:",
key: "warningSource",
type: "select",
options: {
options: [
{
key: "1",
label: "视频AI",
},
{
key: "2",
label: "雷达识别",
},
{
key: "3",
label: "锥桶",
},
{
key: "4",
label: "护栏碰撞",
},
{
key: "5",
label: "扫码报警",
},
{
key: "6",
label: "非机预警",
},
],
},
},
{
label: "方向:",
key: "direction",
type: "RadioGroup",
options: {
options: [
{
key: "1",
label: "上行",
},
{
key: "3",
label: "下行",
},
],
},
},
{
label: "时间范围:",
key: "daterange",
required: false,
type: "datePicker",
options: {
type: "daterange",
format: "yyyy-MM-dd HH:mm:ss",
valueFormat: "yyyy-MM-dd HH:mm:ss",
},
},
{
...PresetFormItems.station,
label: "开始桩号:",
required: false,
},
merge(cloneDeep(PresetFormItems.station), {
options: {
options: [
{
key: "endStakeMark[0]",
},
{
key: "endStakeMark[1]",
},
],
},
label: "结束桩号:",
required: false,
}),
];
export const searchFormList = [
export const gzSearchFormList = [
PresetFormItems.eventSources,
PresetFormItems.eventType,
{
@ -55,8 +137,8 @@ export const searchFormList = [
type: "datePicker",
options: {
type: "daterange",
format: 'yyyy-MM-dd HH:mm:ss',
valueFormat: 'yyyy-MM-dd HH:mm:ss'
format: "yyyy-MM-dd HH:mm:ss",
valueFormat: "yyyy-MM-dd HH:mm:ss",
},
},
{
@ -77,6 +159,5 @@ export const searchFormList = [
},
label: "结束桩号:",
required: false,
}
)
}),
];

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

@ -57,7 +57,7 @@ import Pagination from "@screen/components/Pagination.vue";
import InputSearch from "@screen/components/InputSearch/index.vue";
import EventDetailDialog from "./EventDetailDialog/index";
import FormEvent from "./FormEvent/index";
import { tabMap, searchFormList } from "./data";
import { tabMap, gjSearchFormList, gzSearchFormList } from "./data";
import request from "@/utils/request";
import { Loading } from 'element-ui';
@ -82,6 +82,30 @@ const warningSourceMapping = {
5: '扫码报警',
6: '非机预警',
}
const directionMapping = {
'1': '上行',
'2': '中',
'3': '下行'
}
const warningStateMapping = {
1: '上报',
2: '已完成',
3: '已终止',
4: '自动结束'
}
const warningTypeMapping = {
1: '交通拥堵',
2: '行人',
3: '非机动车',
4: '停车',
5: '倒车/逆行',
6: '烟火',
7: '撒落物8异常天气',
9: '护栏碰撞',
10: '交通事故',
11: '车辆故障',
99: '其它',
}
export default {
name: "RoadNetworkMonitoring2",
@ -98,7 +122,7 @@ export default {
return {
data: [],
total: 0,
searchFormList,
searchFormList: [],
activeName: "-1",
panels: [
{
@ -129,6 +153,7 @@ export default {
};
},
created() {
this.searchFormList = gjSearchFormList;
this.getData();
},
methods: {
@ -136,6 +161,7 @@ export default {
this.activeName = activeName;
this.searchData.eventState = activeName == "-1" ? null : activeName;
this.searchFormList = activeName == "-1" ? gjSearchFormList : gzSearchFormList;
this.getData(activeName);
},
@ -149,8 +175,9 @@ export default {
};
},
getData() {
if (this.activeName == '-1') {
console.log('activeName', this.activeName)
if (this.activeName === '-1') {
console.log('activeName22', this.activeName)
request({
url: `/perceivedEvents/warning/perceivedEventsList`,
method: "post",
@ -160,6 +187,14 @@ export default {
if (result.code != 200) return Message.error(result?.msg);
result.rows.forEach(it => {
it.stringEventSource = warningSourceMapping[it.warningSource];
it.stringDirection = directionMapping[it.direction] || it.direction;
it.startTime = it.warningTime;
if (it.otherConfig) {
let otherConfig = JSON.parse(it.otherConfig);
it.pictures = otherConfig.pictures || [];
}
})
this.data = result.rows;
@ -255,18 +290,16 @@ export default {
data: { id }
}).then((result) => {
if (result.code != 200) return Message.error(result?.msg);
data = result.data;
const directionMapping = {
1: '上行',
2: '中',
3: '下行'
}
data.stringEventSource = warningSourceMapping[data.warningSource];
data.stringDirection = directionMapping[data.direction] || data.direction;
let data = result.data;
data.stringEventSource = warningSourceMapping[data.warningSource];
data.direction = directionMapping[data.direction] || data.direction;
data.startTime = data.warningTime;
data.stringEventState = warningStateMapping[data.warningState];
data.stringEventType = warningTypeMapping[data.warningType];
this.detailDialogFormData = data;
console.log('data', this.detailDialogFormData)
// console.log('data', this.detailDialogFormData)
this.eventDetailDialogVisible = true;
});
@ -303,6 +336,8 @@ export default {
...this.searchData,
eventType: data.eventType,
eventSources: data.eventSources,
warningSource: data.warningSource,
direction: data.direction,
startTime: daterange && daterange.length > 0 ? daterange[0] : "",
endTime: daterange && daterange.length > 0 ? daterange[1] : "",
stakeMark: stakeMark,

6
ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/dailyDisposal/assets/charts.js

@ -44,8 +44,12 @@ var options = {
}
},
formatter: (params) => {
let count = 0;
echartsData.forEach((it) => {
count += it.value;
})
let obj = echartsData.filter(it => { return it.name == params })
return `{ast|${obj[0].name}} {bst|${Math.round(obj[0].value)}%}`
return `{ast|${obj[0].name}} {bst|${Math.round(obj[0].value / count * 100)}%}`
},
data: echartsData?.map(x => x),
},

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

@ -55,8 +55,14 @@ export default {
getWarningStateDay().then(res => {
if (res.code == 200) {
let data = res.data;
if (data.lemgth > 0) {
if (data.length > 0) {
window.echartsData = [];
// let count = 0;
// data.forEach((it) => {
// count += it.number;
// })
for (let i = 0; i < data.length; i++) {
let it = data[i];
if (it.warningState == 1) {
@ -89,11 +95,6 @@ export default {
}
let count = 0;
echartsData.forEach((it) => {
count += it.value;
})
chartsStatistics.legend.data = window.echartsData?.map(x => x);
chartsStatistics.series[0].data = echartsData.map((item, index) => {
@ -140,10 +141,10 @@ export default {
context.lineWidth = 1; // 线
//
drawRoundRect(context, 272, 50, 120, 24, 12, gr)
drawRoundRect(context, 272, 78, 120, 24, 12, gr)
drawRoundRect(context, 272, 106, 120, 24, 12, gr)
drawRoundRect(context, 270, 36, 120, 24, 12, gr)
drawRoundRect(context, 270, 63, 120, 24, 12, gr)
drawRoundRect(context, 270, 90, 120, 24, 12, gr)
drawRoundRect(context, 270, 117, 120, 24, 12, gr)
});
});
},

Loading…
Cancel
Save