diff --git a/ruoyi-ui/src/api/event/perceiveEvent.js b/ruoyi-ui/src/api/event/perceiveEvent.js index fb81f30e..159329f1 100644 --- a/ruoyi-ui/src/api/event/perceiveEvent.js +++ b/ruoyi-ui/src/api/event/perceiveEvent.js @@ -19,7 +19,7 @@ export function geTwarningTotal(query) { //system/status/tablist return request({ url: '/system/status/tablist', - method: 'get', + method: 'post', params: { ...query, } @@ -31,7 +31,7 @@ export function geTwarningTotal(query) { //system/status/tablist return request({ url: '/perceivedEvents/warning/perceivedEventsList', - method: 'get', + method: 'post', params: { ...query, } @@ -43,7 +43,7 @@ export function geTwarningTotal(query) { //system/status/tablist return request({ url: '/perceivedEvents/warning/sectionPerceivedList', - method: 'get', + method: 'post', params: { ...query, } @@ -56,7 +56,7 @@ export function geTwarningTotal(query) { //system/status/tablist return request({ url: '/perceivedEvents/warning/sectionPerceivedNumber', - method: 'get', + method: 'post', params: { ...query, } @@ -68,7 +68,7 @@ export function geTwarningTotal(query) { //system/status/tablist return request({ url: '/perceivedEvents/warning/dailyCumulative', - method: 'get', + method: 'post', params: { ...query, } @@ -80,7 +80,7 @@ export function geTwarningTotal(query) { //system/status/tablist return request({ url: '/perceivedEvents/warning/warningSourceGroup', - method: 'get', + method: 'post', params: { ...query, } @@ -92,7 +92,7 @@ export function geTwarningTotal(query) { //system/status/tablist return request({ url: '/perceivedEvents/warning/warningStateDay', - method: 'get', + method: 'post', params: { ...query, } @@ -104,7 +104,7 @@ export function geTwarningTotal(query) { //system/status/tablist return request({ url: '/perceivedEvents/warning/dailyCumulativeMonth', - method: 'get', + method: 'post', params: { ...query, } @@ -116,7 +116,7 @@ export function geTwarningTotal(query) { //system/status/tablist return request({ url: '/perceivedEvents/warning/warningTypeDay', - method: 'get', + method: 'post', params: { ...query, } @@ -128,8 +128,8 @@ export function geTwarningTotal(query) { //system/status/tablist return request({ url: '/perceivedEvents/warning/warningTrend', - method: 'get', - params: { + method: 'post', + data: { ...query, } }) @@ -140,8 +140,8 @@ export function geTwarningTotal(query) { //system/status/tablist return request({ url: '/perceivedEvents/warning/warningSectionType', - method: 'get', - params: { + method: 'post', + data: { ...query, } }) @@ -152,9 +152,22 @@ export function geTwarningTotal(query) { //system/status/tablist return request({ url: '/perceivedEvents/warning/sectionMarkNumber', - method: 'get', - params: { + method: 'post', + data: { ...query, } }) - } \ No newline at end of file + } + +/// + //查询辖区路段列表 + export function getRoadSectionList(query) { + //system/status/tablist + return request({ + url: '/business/roadSection/list', + method: 'get', + params: { + ...query, + } + }) + } \ No newline at end of file diff --git a/ruoyi-ui/src/views/JiHeExpressway/components/Descriptions.vue b/ruoyi-ui/src/views/JiHeExpressway/components/Descriptions.vue index 54957f65..1e683c3b 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/components/Descriptions.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/components/Descriptions.vue @@ -1,29 +1,37 @@ @@ -126,17 +125,23 @@ export default { font-weight: 400; color: #FFF; line-height: 18px; - display: flex; - align-items: center; gap: 3px; + display: flex; } .item { display: flex; + align-items: center; gap: 6px; .title { color: #3DE8FF; + + p { + width: 100%; + text-align: justify; + text-align-last: justify; + } } .content { diff --git a/ruoyi-ui/src/views/JiHeExpressway/components/Dialog/utils.js b/ruoyi-ui/src/views/JiHeExpressway/components/Dialog/utils.js index b5948243..c5140130 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/components/Dialog/utils.js +++ b/ruoyi-ui/src/views/JiHeExpressway/components/Dialog/utils.js @@ -19,8 +19,6 @@ export function moveable(container, { target } = {}) { const move = (e) => { const { clientX, clientY } = e; - console.log(clientX, clientY, "move"); - container.style.transform = `translate3d(${ clientX - x + lastPosition.clientX }px, ${clientY - y + lastPosition.clientY}px, 0)`; diff --git a/ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/Proxy.vue b/ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/Proxy.vue new file mode 100644 index 00000000..ee9b6fbd --- /dev/null +++ b/ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/Proxy.vue @@ -0,0 +1,39 @@ + + + diff --git a/ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/components/ElCheckboxGroup.vue b/ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/components/ElCheckboxGroup.vue index 40e1a797..9d5820cb 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/components/ElCheckboxGroup.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/components/ElCheckboxGroup.vue @@ -1,7 +1,7 @@ @@ -19,7 +19,15 @@ export default { options: { type: Array, default: () => [] - } + }, + id: { + type: String, + default: 'key' + }, + label: { + type: String, + default: 'label' + }, } } diff --git a/ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/components/Text.vue b/ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/components/Text.vue new file mode 100644 index 00000000..a8a86879 --- /dev/null +++ b/ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/components/Text.vue @@ -0,0 +1,56 @@ + + + + + diff --git a/ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/index.vue b/ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/index.vue index 66ea1700..ce5d5824 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/index.vue @@ -4,8 +4,9 @@ - + + @@ -13,8 +14,11 @@ - diff --git a/ruoyi-ui/src/views/JiHeExpressway/images/deviceType/ball_active.svg b/ruoyi-ui/src/views/JiHeExpressway/images/deviceType/ball_active.svg new file mode 100644 index 00000000..697a6c11 --- /dev/null +++ b/ruoyi-ui/src/views/JiHeExpressway/images/deviceType/ball_active.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/ruoyi-ui/src/views/JiHeExpressway/images/layer/事件专题/感知事件.svg b/ruoyi-ui/src/views/JiHeExpressway/images/layer/事件专题/感知事件.svg new file mode 100644 index 00000000..b66b19ed --- /dev/null +++ b/ruoyi-ui/src/views/JiHeExpressway/images/layer/事件专题/感知事件.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/ruoyi-ui/src/views/JiHeExpressway/images/layer/事件专题/感知事件_active.svg b/ruoyi-ui/src/views/JiHeExpressway/images/layer/事件专题/感知事件_active.svg new file mode 100644 index 00000000..525ae2cc --- /dev/null +++ b/ruoyi-ui/src/views/JiHeExpressway/images/layer/事件专题/感知事件_active.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/ruoyi-ui/src/views/JiHeExpressway/images/layer/事件专题/感知事件_fault.svg b/ruoyi-ui/src/views/JiHeExpressway/images/layer/事件专题/感知事件_fault.svg new file mode 100644 index 00000000..ad86a2c2 --- /dev/null +++ b/ruoyi-ui/src/views/JiHeExpressway/images/layer/事件专题/感知事件_fault.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/ruoyi-ui/src/views/JiHeExpressway/images/layer/事件专题/服务区异常.svg b/ruoyi-ui/src/views/JiHeExpressway/images/layer/事件专题/服务区异常.svg new file mode 100644 index 00000000..c10bb9f1 --- /dev/null +++ b/ruoyi-ui/src/views/JiHeExpressway/images/layer/事件专题/服务区异常.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/ruoyi-ui/src/views/JiHeExpressway/images/layer/事件专题/服务区异常_active.svg b/ruoyi-ui/src/views/JiHeExpressway/images/layer/事件专题/服务区异常_active.svg new file mode 100644 index 00000000..84955a68 --- /dev/null +++ b/ruoyi-ui/src/views/JiHeExpressway/images/layer/事件专题/服务区异常_active.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/ruoyi-ui/src/views/JiHeExpressway/images/layer/事件专题/服务区异常_fault.svg b/ruoyi-ui/src/views/JiHeExpressway/images/layer/事件专题/服务区异常_fault.svg new file mode 100644 index 00000000..de60a14c --- /dev/null +++ b/ruoyi-ui/src/views/JiHeExpressway/images/layer/事件专题/服务区异常_fault.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/AMapContainer/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/AMapContainer/index.vue index 0fb1db4d..757cdf9e 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/AMapContainer/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/AMapContainer/index.vue @@ -199,8 +199,8 @@ export default { }, }, // unmounted() { - destroyed(){ - if (!this.aMapIns) return; + beforeDestroy() { + if (!this.aMapIns || !this.aMapIns.destroyed) return; this.aMapIns.destroyed(); }, }; diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Broadcast/components/BroadcastReleases.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Broadcast/components/BroadcastReleases.vue index cc8d5262..f4d8a74c 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Broadcast/components/BroadcastReleases.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Broadcast/components/BroadcastReleases.vue @@ -4,14 +4,22 @@
路测广播列表
- + + +
-
- - @@ -38,11 +44,10 @@ import Form from '@screen/components/FormConfig'; import Video from "@screen/components/Video" import CheckboxGroup from "@screen/components/FormConfig/components/ElCheckboxGroup.vue" -import { delay } from "@screen/utils/common.js" import request from "@/utils/request"; +import { getDeviceList } from "@screen/pages/Home/components/RoadAndEvents/utils/httpList.js"; import { Message } from "element-ui"; -// import { axiosIns } from "@screen/utils/axios/auth.js"; export default { name: 'BroadcastReleases', @@ -59,15 +64,17 @@ export default { }, props: { visible: Boolean, - deviceId: String + deviceId: String, + pileNum: String, + currentId: [String, Number], + otherConfig: Object }, data() { return { submitting: false, - options: Array.from({ length: 24 }).map((_, index) => ({ - key: index, - label: "阿发" - })) + checkList: [], + releaseMessage: null, + musicList: [] } }, computed: { @@ -80,44 +87,44 @@ export default { } } }, - watch: { - modelVisible: { - immediate: true, - handler(bool) { - if (!bool) return; - - this.reDisplay(); - } - } + created() { + getDeviceList(5) + .then(data => { + if (Array.isArray(data)) this.musicList = data; + }) }, methods: { - reDisplay() { - }, handleSubmit() { - const result = {}, formData = this.$refs.FormConfigRef?.formData; - - let functionId = 51; - - result.mode = formData.controlType === 'manual' ? "00" : "01"; - - delete result.controlType; - - if (result.mode === '01') { - if (!formData.displayTime?.length) return Message.error(`时间不能为空!`); - result.startDisplayTime = formData.displayTime[0]; - result.endDisplayTime = formData.displayTime[1]; - delete result.displayTime; - } else { - if (!formData.onWorkStatus || !formData.inWorkStatus) return Message.error(`工作状态不能为空!`); - - result.onWorkStatus = formData.onWorkStatus - result.inWorkStatus = formData.inWorkStatus - } + if (!this.releaseMessage?.trim()) return Message.error("发布内容不能为空!"); + if (!this.checkList.length) return Message.error("请至少选择一个广播设备!"); this.submitting = true; - // this.submitting = false; - // return; + request({ + url: `/broadcast/broadcastFunctionCall`, + method: "post", + data: { + "name": "task-3", + "outVol": "6", + "priority": "1", + "text": this.releaseMessage.trim(), + "repeatTimes": "3", + "termList": this.checkList.map(str => JSON.parse(str)), + "functionType": "startPaTts" + } + }) + .then(data => { + console.log(data); + if (data.code == '200') { + Message.success("广播设置成功!"); + this.modelVisible = false; + } else { + Message.error("广播设置失败!"); + } + }) + .finally(() => { + this.submitting = false; + }) } }, } @@ -126,7 +133,7 @@ export default { diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/TrafficIncidents/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/TrafficIncidents/index.vue new file mode 100644 index 00000000..d868493e --- /dev/null +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/TrafficIncidents/index.vue @@ -0,0 +1,165 @@ + + + + + diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/ViewDetails/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/ViewDetails/index.vue deleted file mode 100644 index cd90a964..00000000 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/ViewDetails/index.vue +++ /dev/null @@ -1,131 +0,0 @@ - - - - - diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/HomeFilter/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/HomeFilter/index.vue new file mode 100644 index 00000000..439acab8 --- /dev/null +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/HomeFilter/index.vue @@ -0,0 +1,112 @@ + + + + + + diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/index.vue index ab2c2002..5a0d5255 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/index.vue @@ -43,6 +43,8 @@ import Bg1 from "@screen/components/Decorations/bg-1.vue" import DrivingGuidance from "./../Dialogs/DrivingGuidance/index.vue" import Camera from "./../Dialogs/Camera/index.vue"; import Broadcast from "./../Dialogs/Broadcast/index.vue"; +import TrafficIncidents from "./../Dialogs/TrafficIncidents/index.vue"; +import PerceiveEvent from "./../Dialogs/PerceiveEvent/index.vue"; import InfoBoard from "./../InfoBoard" export default { @@ -53,6 +55,8 @@ export default { DrivingGuidance, InfoBoard, Broadcast, + TrafficIncidents, + PerceiveEvent, Bg1 }, data() { @@ -214,7 +218,7 @@ export default { margin-bottom: 6px; display: grid; grid-template-columns: repeat(5, 1fr); - // grid-template-rows: repeat(3, 1fr); + grid-auto-rows: 78px; flex: 1; max-height: 100%; overflow: auto; diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/buttonEvent.js b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/buttonEvent.js index 5709241e..465400fa 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/buttonEvent.js +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/buttonEvent.js @@ -1,10 +1,17 @@ -import { getDeviceList } from "./httpList"; +import { + getDeviceList, + getEventTopicList, + getPerceiveEventList, +} from "./httpList"; +import { delay } from "@screen/utils/common"; +import { Message } from "element-ui"; +import { EventTopics } from "@screen/utils/enum.js"; import { setMarkToMap } from "./map"; const cameraIcon = { // 球机 - "00": require("@screen/images/deviceType/ball.svg"), + "00": require("@screen/images/deviceType/ball_active.svg"), "01": require("@screen/images/deviceType/ball_fault.svg"), }; @@ -41,21 +48,36 @@ export const DeviceForMap = { }; export function getHandleDeviceType(item) { - if (DeviceForMap[item.title]) return "地图设备/map"; + if (DeviceForMap[item.title]) return "地图路测设备/map"; + if (EventTopics[item.title]) return "地图事件专题/map"; } export const eventMap = { - // 需要在地图显示的 - async "地图设备/map"(item) { + // 设备 需要在地图显示的 + async "地图路测设备/map"(item) { const config = DeviceForMap[item.title]; - const data = await getDeviceList(config.deviceType); + const loadingMessage = Message.info({ + message: `${item.title}设备加载中...`, + duration: 0, + customClass: "loading-message", + iconClass: "el-icon-loading", + }); + + const data = await getDeviceList(config.deviceType) + .then(async (data) => { + await delay(600); + return data; + }) + .catch(() => {}) + .finally(() => loadingMessage.close()); if (!data) return; + if (!data.length) return Message.warning(`没有${item.title}事件数据!`); - eventMap[`地图设备/map_close`](item); + eventMap[`地图路测设备/map_close`](item); - cacheRemoveFunc[`地图设备/${item.title}`] = await setMarkToMap.call( + cacheRemoveFunc[`地图路测设备/${item.title}`] = await setMarkToMap.call( this, item, data, @@ -71,234 +93,100 @@ export const eventMap = { config.options ); }, - "地图设备/map_close"(item) { - cacheRemoveFunc[`地图设备/${item.title}`]?.(); + "地图路测设备/map_close"(item) { + cacheRemoveFunc[`地图路测设备/${item.title}`]?.(); }, - // async "路测设备/摄像机"(item) { - // // https://lbs.amap.com/demo/javascript-api-v2/example/mass-markers/labelmarker-mass + // 事件 需要在地图显示的 + async "地图事件专题/map"(item) { + const 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); + return data; + }) + .catch(() => {}) + .finally(() => loadingMessage.close()); - // // { - // // camId: "57937", - // // camLat: "0", - // // camLong: "0", - // // camName: "G35 K055+565 (可控)", - // // camOrientation: "2", - // // camStatus: "0", - // // camType: "1", - // // deptId: "1751", - // // deptName: "G35济菏改扩建", - // // firmType: "2", - // // pileNum: "K055+565", - // // ptzCtrl: "0", - // // road: "G35", - // // status: "0", - // // }; - - // const ballFault = require("@screen/images/deviceType/ball_fault.svg"); - // const ball = require("@screen/images/deviceType/ball.svg"); - - // const data = await getDeviceList(1); - // // const data = [ - // // { - // // longitude: 116.268564, - // // latitude: 35.73115, - // // otherConfig: '{"ptzCtrl":0}', - // // }, - // // { - // // longitude: 116.258178, - // // latitude: 35.720996, - // // }, - // // { - // // longitude: 116.255542, - // // latitude: 35.717335, - // // }, - // // { - // // longitude: 116.252883, - // // latitude: 35.713114, - // // }, - // // { - // // longitude: 116.249416, - // // latitude: 35.707627, - // // }, - // // ]; - - // if (!data) return; - - // cacheRemoveFunc.DriveTestEquipment_Camera_Remove?.(); - - // cacheRemoveFunc.DriveTestEquipment_Camera_Remove = await setMarkToMap.call( - // this, - // item, - // data, - // (extData) => { - // try { - // this.dialogConfig = { - // // 0 有(球机) 1 ⽆(枪机) - // component: cameraCtrlMap[JSON.parse(extData.otherConfig)?.ptzCtrl], - // data: extData, - // }; - // } catch (error) {} - // }, - // null, - // { - // iconCallback(bool, item) { - // const type = JSON.parse(item.otherConfig)?.ptzCtrl; - - // switch (type) { - // case "0": - // case 0: - // return bool ? ball : ballFault; - // } - // }, - // } - // ); - // }, - // async "路测设备/摄像机_close"() { - // cacheRemoveFunc.DriveTestEquipment_Camera_Remove?.(); - // }, - // async "路测设备/行车诱导_close"() { - // cacheRemoveFunc.Driving_Guidance_Remove?.(); - // }, - // async "路测设备/行车诱导"(item) { - // const data = await getDeviceList(12); - - // // const data = [ - // // { - // // longitude: 116.268564, - // // latitude: 35.73115, - // // otherConfig: '{"ptzCtrl":0}', - // // }, - // // { - // // longitude: 116.258178, - // // latitude: 35.720996, - // // }, - // // { - // // longitude: 116.255542, - // // latitude: 35.717335, - // // }, - // // { - // // longitude: 116.252883, - // // latitude: 35.713114, - // // }, - // // { - // // longitude: 116.249416, - // // latitude: 35.707627, - // // }, - // // ]; - - // if (!data) return; - - // cacheRemoveFunc.Driving_Guidance_Remove?.(); - - // cacheRemoveFunc.Driving_Guidance_Remove = await setMarkToMap.call( - // this, - // item, - // data, - // (extData) => { - // this.dialogConfig = { - // component: "DrivingGuidance", - // data: extData, - // }; - // } - // ); - // }, - // async "路测设备/情报板_close"() { - // cacheRemoveFunc.Info_Board_Remove?.(); - // }, - // async "路测设备/情报板"(item) { - // const data = await getDeviceList(2); + if (!data) return; - // // const data = [ - // // { - // // longitude: 116.268564, - // // latitude: 35.73115, - // // otherConfig: '{"ptzCtrl":0}', - // // }, - // // { - // // longitude: 116.258178, - // // latitude: 35.720996, - // // }, - // // { - // // longitude: 116.255542, - // // latitude: 35.717335, - // // }, - // // { - // // longitude: 116.252883, - // // latitude: 35.713114, - // // }, - // // { - // // longitude: 116.249416, - // // latitude: 35.707627, - // // }, - // // ]; + if (!data.length) return Message.warning(`没有${item.title}事件数据!`); - // if (!data) return; + eventMap[`地图事件专题/map_close`](item); - // cacheRemoveFunc.Info_Board_Remove?.(); + cacheRemoveFunc[`地图事件专题/${item.title}`] = await setMarkToMap.call( + this, + item, + data, + (extData) => { + this.dialogConfig = { + component: "TrafficIncidents", + data: { + ...extData, + parseOtherConfig: JSON.parse(extData.otherConfig || "{}"), + _itemData: item, + }, + }; + }, + { + stateCallback: () => true, + } + // config.options + ); + }, + "地图事件专题/map_close"(item) { + cacheRemoveFunc[`地图事件专题/${item.title}`]?.(); + }, - // cacheRemoveFunc.Info_Board_Remove = await setMarkToMap.call( - // this, - // item, - // data, - // (extData) => { - // this.dialogConfig = { - // component: "InfoBoard", - // data: extData, - // }; - // } - // ); - // }, - // async "路测设备/语音广播_close"() { - // // cacheRemoveFunc.Info_Board_Remove?.(); - // }, - // async "路测设备/语音广播"(item) { - // console.log( - // "%c [ item ]-194-「buttonEvent.js」", - // "font-size:15px; background:#31100b; color:#75544f;", - // item - // ); - // return; - // const data = await getDeviceList(2); + // 感知事件 + async "事件专题/感知事件"(item) { + const 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); + return data; + }) + .catch(() => {}) + .finally(() => loadingMessage.close()); - // // const data = [ - // // { - // // longitude: 116.268564, - // // latitude: 35.73115, - // // otherConfig: '{"ptzCtrl":0}', - // // }, - // // { - // // longitude: 116.258178, - // // latitude: 35.720996, - // // }, - // // { - // // longitude: 116.255542, - // // latitude: 35.717335, - // // }, - // // { - // // longitude: 116.252883, - // // latitude: 35.713114, - // // }, - // // { - // // longitude: 116.249416, - // // latitude: 35.707627, - // // }, - // // ]; + if (!data) return; - // if (!data) return; + if (!data?.length) return Message.warning(`没有${item.title}数据!`); - // // cacheRemoveFunc.Info_Board_Remove?.(); + eventMap[`事件专题/感知事件_close`](item); - // // cacheRemoveFunc.Info_Board_Remove = await setMarkToMap.call( - // // this, - // // item, - // // data, - // // (extData) => { - // // this.dialogConfig = { - // // component: "InfoBoard", - // // data: extData, - // // }; - // // } - // // ); - // }, + cacheRemoveFunc[`事件专题/${item.title}`] = await setMarkToMap.call( + this, + item, + data, + (extData) => { + this.dialogConfig = { + component: "PerceiveEvent", + data: { + ...extData, + parseOtherConfig: JSON.parse(extData.otherConfig || "{}"), + }, + }; + }, + { + stateCallback: () => true, + } + // config.options + ); + }, + "事件专题/感知事件_close"(item) { + cacheRemoveFunc[`事件专题/${item.title}`]?.(); + }, }; diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/httpList.js b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/httpList.js index 4a859583..84345360 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/httpList.js +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/httpList.js @@ -174,22 +174,32 @@ const DeviceTypeMap = { 14: "光线在线监测", */ export function getDeviceList(deviceType) { - return request({ - url: "/business/device/query", - method: "get", - params: { - deviceType, - }, - }) - .then(({ code, data }) => { - if (code != 200) - return Message.error(`${DeviceTypeMap[deviceType]}设备加载失败!`); + return new Promise((resolve, reject) => { + if (!deviceType) { + Message.error(`${DeviceTypeMap[deviceType]}设备加载失败!`); + return reject(); + } - return data; + request({ + url: "/business/device/query", + method: "get", + params: { + deviceType, + }, }) - .catch(() => { - Message.error(`${DeviceTypeMap[deviceType]}设备加载失败!`); - }); + .then(({ code, data }) => { + if (code != 200) { + reject(); + return Message.error(`${DeviceTypeMap[deviceType]}设备加载失败!`); + } + + resolve(data); + }) + .catch(() => { + Message.error(`${DeviceTypeMap[deviceType]}设备加载失败!`); + reject(); + }); + }); } /** @@ -241,3 +251,59 @@ export function getProduct(productId) { }); }); } + +/** + * 交通事件 列表 根据类型获取 + * @param {number} eventType + */ +export function getEventTopicList(eventType) { + return new Promise((resolve, reject) => { + if (!eventType) { + Message.error(`事件加载失败!`); + return reject(); + } + + request({ + url: `/business/trafficIncidents/getEventList/${eventType}`, + method: "get", + }) + .then(({ code, data }) => { + if (code != 200) { + reject(); + return Message.error(`事件加载失败!`); + } + + resolve(data); + }) + .catch(() => { + Message.error(`事件加载失败!`); + reject(); + }); + }); +} + +/** + * 感知事件根据类型获取 + * @param {number} eventType + */ +export function getPerceiveEventList() { + return new Promise((resolve, reject) => { + request({ + url: `/perceivedEvents/warning/perceivedEventsList`, + method: "POST", + data: {}, + }) + .then(({ code, rows }) => { + if (code != 200) { + reject(); + return Message.error(`事件加载失败!`); + } + + resolve(rows); + }) + .catch(() => { + Message.error(`事件加载失败!`); + reject(); + }); + }); +} diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/layerImages.js b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/layerImages.js index e3ccb3a2..7762a9bb 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/layerImages.js +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/layerImages.js @@ -1,3 +1,5 @@ +import { EventTopics } from "@screen/utils/enum.js"; + export function getLayerData() { const layerData = require.context( "@screen/images/layer", @@ -9,7 +11,17 @@ export function getLayerData() { const resultData = []; layerData.keys().forEach((item) => { - const [_, topic, title] = item.match(/[^/]+/g); + const [_, topic, file] = item.match(/[^/]+/g); + const fileName = file.match(/[^._]+/)[0]; + switch (topic) { + case "事件专题": + if ( + !EventTopics[fileName.match(/[^._]+/)[0]] && + !["感知事件"].includes(fileName) + ) + return; + break; + } if (!layerDatas[topic]) { resultData.push( (layerDatas[topic] = { @@ -19,9 +31,10 @@ export function getLayerData() { }) ); } + layerDatas[topic].children.push({ id: item, - title: title.replace(".svg", ""), + title: fileName, status: "", }); }); diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/map.js b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/map.js index dfb282be..e862ef7f 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/map.js +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/map.js @@ -25,7 +25,8 @@ export async function setMarkerCluster(map, points, markerFun) { let hasClick = false; - if (!points.length) Message.warning("未能匹配到对应坐标点"); + // if (!points.length) return Message.warning("未能匹配到对应坐标点"); + if (!points.length) return []; const markerCluster = new AMap.MarkerCluster(map, points, { // gridSize: 15, @@ -101,7 +102,7 @@ export async function setMarkToMap( item, data, _markerClick, - { iconCallback, content } = {} + { iconCallback, content, stateCallback } = {} ) { const { mapIns } = this.getMap(); @@ -111,18 +112,18 @@ export async function setMarkToMap( normal || require(`@screen/images/layer${item.id.replace( /^\.|[^/]+(?=.svg$)/g, - (data) => (data === "." ? "" : `${data}`) + (data) => (data === "." ? "" : `${data}_active`) )}`); const fault = fault || require(`@screen/images/layer${item.id.replace( /^\.|[^/]+(?=.svg$)/g, - (data) => (data === "." ? "" : `${data}_fault`) + (data) => (data === "." ? `` : `${data}_fault`) )}`); const faultBg = require(`@screen/images/mapBg/fault.svg`); - const normalBg = require(`@screen/images/mapBg/normal.svg`); + const normalBg = require(`@screen/images/mapBg/active.svg`); const markerClick = (e) => { const extData = e.target.getExtData(); @@ -133,9 +134,13 @@ export async function setMarkToMap( const markerCluster = await setMarkerCluster( mapIns, data.map((item) => { + const currentState = + typeof stateCallback === "function" + ? stateCallback(item) + : item.deviceState == 1; + const deviceIcon = - typeof iconCallback === "function" && - iconCallback(item.deviceState == 1, item); + typeof iconCallback === "function" && iconCallback(currentState, item); return { weight: 1, @@ -145,26 +150,21 @@ export async function setMarkToMap( content: content || `
`, }; @@ -172,7 +172,11 @@ export async function setMarkToMap( markerClick ); - mapIns.setFitView([...markerCluster.U], false, [0, 0, 0, 0], 10); + mapIns.setZoom(10); + + setTimeout(() => { + mapIns.setFitView([...markerCluster.U], false, [0, 0, 0, 0], 10); + }, 150); return () => markerCluster.setMap(null); } diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/index.vue index a1838491..34d1124a 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/index.vue @@ -13,13 +13,7 @@
-
- - - -
+
@@ -42,6 +36,7 @@ import Thumbnail from "./components/Thumbnail/index.vue"; import ConditionStatistics from "./components/ConditionStatistics/index.vue"; import RoadAndEvents from "./components/RoadAndEvents/index.vue"; import AMapContainer from "./components/AMapContainer/index.vue"; +import HomeFilter from "./components/HomeFilter/index.vue"; import Button from '@screen/components/Buttons/Button.vue'; // import InfoBoard from "./components/InfoBoard" @@ -54,7 +49,8 @@ export default { Thumbnail, RoadAndEvents, AMapContainer, - Button + Button, + HomeFilter // InfoBoard }, data() { @@ -142,19 +138,6 @@ export default { display: flex; gap: 9px; - .btn { - padding: 9px; - background: linear-gradient(180deg, #152E3C 0%, #163A45 100%); - border-radius: 4px; - overflow: hidden; - height: unset; - border: 1px solid rgba(40, 144, 167, 1); - } - - .btn-active { - background: linear-gradient(180deg, #005C79 0%, #009BCC 100%); - } - .filter { display: flex; flex-direction: column; diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/data.js b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/data.js index 840527ed..c8286350 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/data.js +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/data.js @@ -1,22 +1,22 @@ import * as PresetFormItems from "@screen/pages/control/event/event/FormEvent/PresetFormItems.js"; export const tabMap = { - AlarmEvents: { + "-1": { state: 5, textColor: "#007FF4", text: "去确认", }, - EventsConfirmed: { + 0: { state: 5, textColor: "#007FF4", text: "去确认", }, - DisposingEvents: { + 1: { state: 4, textColor: "#007FF4", text: "去处置", }, - IncidentDisposed: { + 2: { state: 3, textColor: "#007FF4", text: "处置记录", diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/index.vue index f2a6d796..36895163 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/index.vue @@ -29,7 +29,7 @@ -
+
@@ -56,6 +56,7 @@ import InputSearch from '@screen/components/InputSearch/index.vue'; import EventDetailDialog from "./EventDetailDialog/index"; import FormEvent from "./FormEvent/index"; import { tabMap, searchFormList } from "./data"; +import request from "@/utils/request"; function getRandomData(min = 1, max = 15) { return Math.floor(Math.random() * (max - min + 1)) + min @@ -83,45 +84,60 @@ export default { }, data() { return { - data: getMockData(), + data: [], searchFormList, - - activeName: "AlarmEvents", + activeName: "-1", panels: [ { label: "告警事件(20)", - key: "AlarmEvents" + key: "-1" }, { label: "待确认事件(125)", - key: "EventsConfirmed" + key: "0" }, { label: "处置中事件(230)", - key: "DisposingEvents" + key: "1" }, { label: "已处置事件(76)", - key: "IncidentDisposed" + key: "2" }, ], eventDetailDialogVisible: false, - isShowAddNew: false + isShowAddNew: false, + searchData: { + pageSize: 15, + pageNo: 1, + eventState: null + } } }, methods: { handleSelect(activeName) { this.activeName = activeName; - this.data = getMockData(); + + this.searchData.eventState = activeName == '-1' ? null : activeName; + + // this.data = getMockData(); }, getStateCardBind(item) { const { state, textColor, text } = tabMap[this.activeName] + return { cardData: { ...item, state }, lastBtnColor: textColor, lastBtnText: text } }, + getData() { + request({ + url: `/dc/system/event/list`, + method: "get", + // params: this.searchData + }) + }, onAddNew() { this.isShowAddNew = true; }, diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/dailyDisposal/assets/charts.js b/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/dailyDisposal/assets/charts.js index c7ca32c1..43114d0f 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/dailyDisposal/assets/charts.js +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/dailyDisposal/assets/charts.js @@ -1,15 +1,15 @@ -const echartsData = [ +window.echartsData = [ { value: 25, name: '处理中' }, { value: 32, name: '待处理' }, { value: 30, name: '已处理' },] - const colorList = [ +window.colorList = [ "#FFee0B", "#61D8FF", "#6AE0BC", ] -let count = 0; +window.count = 0; echartsData.forEach((it)=>{ count += it.value; @@ -33,6 +33,7 @@ let count = 0; ast: { align: "left", fontSize: 12, + width:35, }, bst: { align: "left", diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/dailyDisposal/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/dailyDisposal/index.vue index fc57e438..e0dcaaa4 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/dailyDisposal/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/dailyDisposal/index.vue @@ -12,6 +12,7 @@ import WgtTitle from '../../../widgets/title' import * as echarts from "echarts"; import chartsStatistics from "./assets/charts"; + import { getWarningStateDay } from '../../../../../../../api/event/perceiveEvent'; const drawRoundRect = ( ctx, x, y, width, height, radius ,gr) => { // ctx, 矩形距离x坐标位置, 矩形距离y坐标的位置, 矩形的宽, 矩形的长,圆角角度 @@ -50,7 +51,75 @@ setTimeout(() => { this.$nextTick(() => { var myChart = echarts.init(document.getElementById('dailyDisposal')); - myChart.setOption(chartsStatistics); + + getWarningStateDay().then(res=>{ + if ( res.code == 200 ) { + let data = res.data; + console.log(data); + window.echartsData = []; + for (let i = 0;i < data.length;i++){ + let it = data[i]; + if ( it.warningState == 1 ) { + echartsData.push({ + name:"上报", + value: it.number + }); + } + if (it.warningState == 2 ) { + echartsData.push({ + name:"已完成", + value: it.number + }); + + } + if (it.warningState == 3 ) { + echartsData.push({ + name:"已终止", + value: it.number + }); + + } + if (it.warningState == 4 ) { + echartsData.push({ + name:"自动结束", + value: it.number + }); + + } + + + } + count = 0; + + echartsData.forEach((it)=>{ + count += it.value; + }) + + console.log(echartsData); + + chartsStatistics.legend.data = window.echartsData?.map(x => x); + chartsStatistics.series[0].data = echartsData.map((item, index) => { + return { + ...item, + label: { + color: colorList[index] + } + } + }) + chartsStatistics.series[1].data = echartsData.map((item, index) => { + return { + ...item, + label: { + color: colorList[index] + } + } + }) + } + + myChart.setOption(chartsStatistics); + }); + + const domMap = document.getElementById("dailyDisposal"); diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/dayTotal/assets/charts.js b/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/dayTotal/assets/charts.js index bee2c385..bc60c727 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/dayTotal/assets/charts.js +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/dayTotal/assets/charts.js @@ -70,8 +70,6 @@ const sxnja = [ // return value.min*0.9; // }, type: 'value', - min: 0, - max:1000, // max: yAxisMax, axisLine: { show: false, diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/dayTotal/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/dayTotal/index.vue index 598de63b..9b3c13c2 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/dayTotal/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/dayTotal/index.vue @@ -12,6 +12,8 @@ import WgtTitle from '../../../widgets/title' import * as echarts from "echarts"; import chartsStatistics from "./assets/charts"; + import { getDailyCumulative } from '../../../../../../../api/event/perceiveEvent'; + export default { name: 'RailWayDay', components: { @@ -33,7 +35,26 @@ setTimeout(() => { this.$nextTick(() => { var myChart = echarts.init(document.getElementById('daytotal')); - myChart.setOption(chartsStatistics); + + getDailyCumulative().then(res=>{ + if ( res.code == 200) { + let data = res.data; + let timer = []; + let number = []; + + data.forEach((it)=>{ + timer.push(it.time); + number.push(it.number); + }); + + chartsStatistics.xAxis.data = timer; + chartsStatistics.series[0].data = number; + + myChart.setOption(chartsStatistics); + } + + }); + }); }); }, diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventQuery/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventQuery/index.vue index c5c6d5c4..9388eab4 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventQuery/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventQuery/index.vue @@ -2,6 +2,7 @@
+
- + - 查询 + 查询 重置
-
@@ -58,6 +58,7 @@ import chart2 from "./assets/charts2"; import chart3 from "./assets/charts3"; import ElQuarterPicker from './ElQuarterPicker' + import { getWarningTrend,getWarningSectionType,getSectionMarkNumber,getRoadSectionList } from '../../../../../../../api/event/perceiveEvent'; const drawRoundRect = ( ctx, x, y, width, height, radius ,gr) => { // ctx, 矩形距离x坐标位置, 矩形距离y坐标的位置, 矩形的宽, 矩形的长,圆角角度 @@ -93,7 +94,7 @@ label: '月' }, { - value: 'date', + value: 'day', label: '日' }, { @@ -101,14 +102,14 @@ label: '季' },], areaOptions: [{ - value: '济南', + value: '0531', label: '济南' }, { value: '菏泽', label: '菏泽' }], dateTime:"", - area: '济南', + area: '0531', dataList:[ { title:"殷家林枢纽" @@ -160,6 +161,7 @@ } ], quarter:"", + selectId:1, year:"year", list:[ {name:'大学城-长清', direction:'济南方向', state:"正常",speed:'108.14km/h', follow:'161'}, @@ -176,11 +178,77 @@ }, methods: { - + selectProgress(item){ + this.selectId = item.id; + }, + searchQuery(){ + let dateTime = this.dateTime; + if ( this.year == "year") { + dateTime = new Date(dateTime); + dateTime = dateTime.getFullYear(); + console.log(dateTime); + } + if ( this.year == "month") { + dateTime = new Date(dateTime); + let m = dateTime.getMonth()+1; + m = m < 10?"0"+m:m; + dateTime = dateTime.getFullYear() + "-" + m +"-00 00:00:00"; + console.log(dateTime); + } + //感知事件趋势 + getWarningTrend({ + "type": this.year, + "sectionId": this.selectId, + "createTime": dateTime, + }).then(res=>{ + console.log(res); + chart1.series[0].data = []; + this.myChart1.setOption(chart1); + }); + //类型占比 + getWarningSectionType({ + "type": this.year, + "sectionId": this.selectId, + "createTime": dateTime, + }).then(res=>{ + console.log(res); + chart2.series[0].data = []; + this.myChart2.setOption(chart2); + }) + //路段范围内桩号分布 + getSectionMarkNumber({ + "type": this.year, + "sectionId": this.selectId, + "createTime": dateTime, + }).then(res=>{ + console.log(res); + chart3.series[0].data = []; + chart3.series[1].data = []; + this.myChart3.setOption(chart3); + }) + }, }, mounted() { setTimeout(() => { this.$nextTick(() => { + + getRoadSectionList().then(res=>{ + console.log(res); + if ( res.code == 200 ) { + let rows = res.rows; + this.dataList = []; + rows.forEach(it=>{ + this.dataList.push({ + title:it.sectionName.split("-")[0], + id:it.id, + + }); + }) + } + + + }) + var myChart1 = echarts.init(document.getElementById('chart1')); myChart1.setOption(chart1); var myChart2 = echarts.init(document.getElementById('chart2')); @@ -188,6 +256,9 @@ var myChart3 = echarts.init(document.getElementById('chart3')); myChart3.setOption(chart3); + this.myChart1 = myChart1; + this.myChart2 = myChart2; + this.myChart3 = myChart3; const domMap = document.getElementById("chart2"); let parentDiv = domMap.firstChild; @@ -288,7 +359,7 @@ height: 40px; width:100%; font-size: 14px; - margin-bottom: 10px; + margin-top: 10px; div{ white-space: nowrap; margin-right: 4px; diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventQuery/progressBar.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventQuery/progressBar.vue index 7951fbe0..6a7c89d1 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventQuery/progressBar.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventQuery/progressBar.vue @@ -2,8 +2,8 @@
- - + +
{{ item.title }}
@@ -38,9 +38,11 @@ import { number } from 'echarts'; }, methods: { - selectItem(index,num){ + selectItem(index,num,item){ this.selectIndex = index; - this.selectLine = num + this.selectLine = num; + if ( item ) + this.$emit("selectItem",item); } }, mounted() { @@ -147,7 +149,7 @@ import { number } from 'echarts'; >.item { position: relative; - width: 180px; + width: 113px; height:35px; display: inline-flex; flex-direction: column; diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventSource/assets/charts.js b/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventSource/assets/charts.js index 7c16f575..2fdc8690 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventSource/assets/charts.js +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventSource/assets/charts.js @@ -15,6 +15,9 @@ let data = [{ typeName:'护栏碰撞', percent:0.14 }] + +window.mainData = data; + let chartData = [],lengData=[], colorList = ['#006EDF', '#00FF00', '#FFC30D', '#FF8400', '#1DA7FF','#2967EA']; for (let i = 0; i < data.length; i++) { chartData.push({ @@ -55,6 +58,8 @@ for (let i = 0; i < chartData.length; i++) { }); pieData1.push(gapData); } +console.log(pieData1); + var options = { tooltip: { confine: true, @@ -115,10 +120,13 @@ var options = { formatter: function(name){ let total = 0 let target + if ( !mainData ) return ""; for (let i = 0; i < data.length; i++) { - total += data[i].average - if (data[i].typeName === name) { - target = data[i].average + if ( window.mainData[i] ) { + total += window.mainData[i].value + if ( window.mainData[i].name === name) { + target = window.mainData[i].value + } } } var arr = [ diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventSource/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventSource/index.vue index 5f59fb55..b47d769d 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventSource/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventSource/index.vue @@ -12,6 +12,8 @@ import WgtTitle from '../../../widgets/title' import * as echarts from "echarts"; import chartsStatistics from "./assets/charts"; + import { getWarningSourceGroup } from '../../../../../../../api/event/perceiveEvent'; + export default { name: 'EventSource', components: { @@ -36,30 +38,74 @@ let currentIndex = -1; this.$nextTick(() => { var myChart = echarts.init(document.getElementById('eventSource')); - myChart.setOption(chartsStatistics); - this.myChart = myChart; - myChart.on('mouseover', (params) => { - // oldIndex = currentIndex; - currentIndex = params.dataIndex; - highlightPie(currentIndex,oldIndex); - }) + getWarningSourceGroup().then((res)=>{ + if ( res.code == 200 ) { + let data = res.data; + let warningTypes = []; + let number = []; + data.forEach(it=>{ + if ( it.warningSource == 1) { + warningTypes.push('交通拥堵'); + } + if ( it.warningSource == 2) { + warningTypes.push('行人'); + } + if ( it.warningSource == 3) { + warningTypes.push('非机动车'); + } + if ( it.warningSource == 4) { + warningTypes.push('停车'); + } + if ( it.warningSource == 5) { + warningTypes.push('倒车/逆行'); + } + if ( it.warningSource == 6) { + warningTypes.push('烟火'); + } + if ( it.warningSource == 7) { + warningTypes.push('撒落物'); + } + if ( it.warningSource == 8) { + warningTypes.push('异常天气'); + } + if ( it.warningSource == 9) { + warningTypes.push('护栏碰撞'); + } - function highlightPie(currentIndex,oldIndex) { - myChart.dispatchAction({ - type: 'downplay', - seriesIndex: 1, - dataIndex: oldIndex - }) - myChart.dispatchAction({ - type: 'highlight', - seriesIndex: 1, - dataIndex: currentIndex - }) + number.push(it.number); + }) + let colorList = ['#006EDF', '#00FF00', '#FFC30D', '#FF8400', '#1DA7FF','#2967EA']; + let lengData = []; + let mainData = []; + let mainCount = 0; + for (let j =0;j < number.length;j++){ + mainCount+= number[j]; + } + for (let i = 0;i < warningTypes.length;i++){ + let it = warningTypes[i]; + lengData.push({ + name:it, + color:colorList[i], + value:number[i], + }); + mainData.push({ + name:it, + color:colorList[i], + value:number[i], + percent: number[i]/mainCount + }) + } + window.mainData = mainData; + console.log("--------------",mainData); + chartsStatistics.legend.data = lengData; + chartsStatistics.series[0].data = mainData; } - setTimeout(()=>{ - - },50) + myChart.setOption(chartsStatistics); + }) + + this.myChart = myChart; + }); }); }, diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/monthStatistics/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/monthStatistics/index.vue index 797801a7..11f5fb6b 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/monthStatistics/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/monthStatistics/index.vue @@ -12,6 +12,8 @@ import WgtTitle from '../../../widgets/title' import * as echarts from "echarts"; import chartsStatistics from "./assets/charts"; + import { getDailyCumulativeMonth } from '../../../../../../../api/event/perceiveEvent'; + export default { name: 'MonthStatistics', components: { @@ -33,7 +35,34 @@ setTimeout(() => { this.$nextTick(() => { var myChart = echarts.init(document.getElementById('monthStatistics')); - myChart.setOption(chartsStatistics); + getDailyCumulativeMonth().then((res)=>{ + console.log(res); + if ( res.code == 200 ) { + let data = res.data; + let timeData = []; + let datasN = []; + for (var i = 0; i < 24;i++){ + let k = 0; + for (var j = 0;j < data.length;j++){ + let it = data[j]; + if ( it.time == i ) { + timeData.push( i +"点至"+ (i +1)+"点"); + datasN.push(it.number); + k++; + } + } + if ( k == 0 ) { + timeData.push( i +"点至"+ (i +1)+"点"); + datasN.push(0); + } + } + chartsStatistics.xAxis.data = timeData; + chartsStatistics.series[0].data = datasN; + + myChart.setOption(chartsStatistics); + } + + }); }); }); }, diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/railway/assets/charts.js b/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/railway/assets/charts.js index 2ef9faf8..d3b60046 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/railway/assets/charts.js +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/railway/assets/charts.js @@ -1,9 +1,9 @@ let chartIcon = `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAACXBIWXMAAC4jAAAuIwF4pT92AAAFw2lUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgOS4wLWMwMDAgNzkuMTcxYzI3ZmFiLCAyMDIyLzA4LzE2LTIyOjM1OjQxICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6cGhvdG9zaG9wPSJodHRwOi8vbnMuYWRvYmUuY29tL3Bob3Rvc2hvcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RFdnQ9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZUV2ZW50IyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgMjQuMCAoTWFjaW50b3NoKSIgeG1wOkNyZWF0ZURhdGU9IjIwMjMtMTItMjlUMTA6MTM6MTQrMDg6MDAiIHhtcDpNb2RpZnlEYXRlPSIyMDIzLTEyLTI5VDEwOjQ2OjE3KzA4OjAwIiB4bXA6TWV0YWRhdGFEYXRlPSIyMDIzLTEyLTI5VDEwOjQ2OjE3KzA4OjAwIiBkYzpmb3JtYXQ9ImltYWdlL3BuZyIgcGhvdG9zaG9wOkNvbG9yTW9kZT0iMyIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDplYzhkN2NkNS01ZjdjLTQ5Y2ItOTgyMy1lOTM4ODViNjRjMmIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6ZjE1ZWVkNDgtNDA3ZS00MDU0LTliNTMtYTllZmQ1ODE5YjVmIiB4bXBNTTpPcmlnaW5hbERvY3VtZW50SUQ9InhtcC5kaWQ6ZjE1ZWVkNDgtNDA3ZS00MDU0LTliNTMtYTllZmQ1ODE5YjVmIj4gPHhtcE1NOkhpc3Rvcnk+IDxyZGY6U2VxPiA8cmRmOmxpIHN0RXZ0OmFjdGlvbj0iY3JlYXRlZCIgc3RFdnQ6aW5zdGFuY2VJRD0ieG1wLmlpZDpmMTVlZWQ0OC00MDdlLTQwNTQtOWI1My1hOWVmZDU4MTliNWYiIHN0RXZ0OndoZW49IjIwMjMtMTItMjlUMTA6MTM6MTQrMDg6MDAiIHN0RXZ0OnNvZnR3YXJlQWdlbnQ9IkFkb2JlIFBob3Rvc2hvcCAyNC4wIChNYWNpbnRvc2gpIi8+IDxyZGY6bGkgc3RFdnQ6YWN0aW9uPSJzYXZlZCIgc3RFdnQ6aW5zdGFuY2VJRD0ieG1wLmlpZDplYzhkN2NkNS01ZjdjLTQ5Y2ItOTgyMy1lOTM4ODViNjRjMmIiIHN0RXZ0OndoZW49IjIwMjMtMTItMjlUMTA6NDY6MTcrMDg6MDAiIHN0RXZ0OnNvZnR3YXJlQWdlbnQ9IkFkb2JlIFBob3Rvc2hvcCAyNC4wIChNYWNpbnRvc2gpIiBzdEV2dDpjaGFuZ2VkPSIvIi8+IDwvcmRmOlNlcT4gPC94bXBNTTpIaXN0b3J5PiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PibZhN0AAAHBSURBVDiNfdTtThNREAbgZ5sCrRTaRaBqQDTR6AXaq9grJEaiKCJWaAv9ENDUH2fWLkU8yeTkZGbe885nNp/PVU9vIMMGNtHGo1BNMQoZF7k7jlkVqDewji72sI5VrIT6F64xwRecFbnJPaDeQBsv8RSdCpsS6BYzDENOcVTkLv8CBZPX2McOdrEVITYC6BpjnKOP7zjG+yI3yd5dzLNg8jbY7MW9g+2lHJUgpzgJOcRRPX7dj3C6eIaDAO+iGUCzYPERWSXU5+jXIxct5MFgN0AOsLaoi9Ul0HHkaoBOLZg0IoQNPMaTJZAqWDfytylVtol2LdishNFaKBv/AClPI3waISto1UKZoRZ39h8QFZus8laTqvEbNyEzqdQPnZ/hcyMl/BbTmpSsacg43v0wXD43+BE2V+FzjWFdmp1ZKAZheByUt91tyD4+S/00wGWAjerxOJYS2JSSngX4lrsNeREfnUg9dRG+o3JEWniDF1Lpd6U2KEdkHoyuwvkM36TmPCxy4+rQdvDKoss7FhugzM8kIjiPED8UuSH310jLYkRaUl9V18gswD7ha5Ebl77ZA4utLY1MOT4sRmKI0fJi+wM9v6Q1QC+Y6wAAAABJRU5ErkJggg==`; let xdata = { - value: ['平阴停车区', '孔村枢纽', '平阴南收费站', '东平湖枢纽', '沙河停车区', '梁山东收费站', '王官屯枢纽'] + value: ['平阴停车区'] }; let sdata = { - value: [32774, 30067, 28774, 30067, 30021, 30067, 32774] + value: [32774] } let dataZoomMove = { @@ -49,7 +49,7 @@ var options = { margin:-5, formatter: function (value) { let index = xdata.value.indexOf(value); - return `{a|Top${index+1}} {b|${value}}` + return `{a|Top${index + 2}} {b|${value}}` }, rich: { a: { diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/railway/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/railway/index.vue index 1e39f500..ec5339e9 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/railway/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/railway/index.vue @@ -16,6 +16,8 @@ import WgtTitle from '../../../widgets/title' import * as echarts from "echarts"; import chartsStatistics from "./assets/charts"; + import { getSectionPerceivedList } from '../../../../../../../api/event/perceiveEvent'; + export default { name: 'Situation', components: { @@ -31,7 +33,27 @@ setTimeout(() => { this.$nextTick(() => { var myChart = echarts.init(document.getElementById('situationEchartBox')); - myChart.setOption(chartsStatistics); + + getSectionPerceivedList({}).then((res)=>{ + console.log(res); + if ( res.code == 200 ) { + let data = res.data; + let texts = []; + let datas = []; + + data.forEach(it => { + texts.push(it.sectionName); + datas.push(it.number); + }); + + chartsStatistics.yAxis[0].data = texts; + chartsStatistics.series[0].data = datas; + + myChart.setOption(chartsStatistics); + } + }); + + }); }); }, diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/railwayDay/assets/charts.js b/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/railwayDay/assets/charts.js index d5ab305c..59186783 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/railwayDay/assets/charts.js +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/railwayDay/assets/charts.js @@ -68,9 +68,7 @@ var options = { yAxis: [{ type: 'value', name: "", - max: 1000, - min:0, - splitNumber:5, + nameTextStyle: { color: '#B6E6FF', fontSize: 13, diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/railwayDay/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/railwayDay/index.vue index b6e39c92..85b0f9a3 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/railwayDay/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/railwayDay/index.vue @@ -12,6 +12,8 @@ import WgtTitle from '../../../widgets/title' import * as echarts from "echarts"; import chartsStatistics from "./assets/charts"; +import { getSectionPerceivedNumber } from '../../../../../../../api/event/perceiveEvent'; + export default { name: 'RailWayDay', components: { @@ -33,7 +35,23 @@ export default { setTimeout(() => { this.$nextTick(() => { var myChart = echarts.init(document.getElementById('railwayDay')); - myChart.setOption(chartsStatistics); + getSectionPerceivedNumber().then((res)=>{ + if ( res.code == 200 ) { + let data = res.data; + let texts = []; + let datas = []; + + data.forEach(it => { + texts.push(it.sectionName); + datas.push(it.number); + }); + + chartsStatistics.xAxis.data = texts; + chartsStatistics.series[0].data = datas; + + myChart.setOption(chartsStatistics); + } + }) }); }); }, diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/typeAnalysis/assets/charts.js b/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/typeAnalysis/assets/charts.js index 4936251f..b6dfeb33 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/typeAnalysis/assets/charts.js +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/typeAnalysis/assets/charts.js @@ -1,4 +1,4 @@ -const echartsData = [ +window.typeAnalysisData = [ { value: 100, name: '行人' }, { value: 90, name: '非机动车' }, { value: 80, name: '拥堵' }, @@ -6,7 +6,7 @@ const echartsData = [ { value: 50, name: '抛洒物' }, { value: 45, name: '烟火' }] -const colorList = [ +window.colorList = [ "#019AFF", "#3CC3F0", "#51D5AD", @@ -14,14 +14,14 @@ const colorList = [ "#F6A73C", "#7390FD",] -const colorList1 = [ +window.colorList1 = [ "#61D8FF", "#FFB905", "#6AE0BC",] - let count = 0; +window.count = 0; - echartsData.forEach((it)=>{ +typeAnalysisData.forEach((it)=>{ count += it.value; }) @@ -30,9 +30,9 @@ var options = { color: colorList, legend: { orient: 'vertical', - top: "center", + top: "10", icon: "circle", - right: 30, + right: 40, itemGap: 16, itemWidth: 8, itemHeight: 8, @@ -54,11 +54,11 @@ var options = { } }, formatter: (params) => { - let obj = echartsData.filter(it=>{ return it.name == params}) + let obj = typeAnalysisData.filter(it=>{ return it.name == params}) console.log(obj); return `{ast|${obj[0].name}} {bst|${Math.round(obj[0].value/count* 100) }%}` }, - data: echartsData?.map(x => x.name), + data: typeAnalysisData?.map(x => x.name), }, tooltip: { trigger: 'item', @@ -96,7 +96,7 @@ var options = { length: 10, length2: 30, }, - data: echartsData.map((item, index) => { + data: typeAnalysisData.map((item, index) => { return { ...item, label: { @@ -139,7 +139,7 @@ var options = { length: 10, length2: 30, }, - data: echartsData.map((item, index) => { + data: typeAnalysisData.map((item, index) => { return { ...item, label: { diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/typeAnalysis/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/typeAnalysis/index.vue index b0af834d..6fc6e6f3 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/typeAnalysis/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/typeAnalysis/index.vue @@ -12,6 +12,7 @@ import WgtTitle from '../../../widgets/title' import * as echarts from "echarts"; import chartsStatistics from "./assets/charts"; + import { getWarningTypeDay } from '../../../../../../../api/event/perceiveEvent'; const drawRoundRect = ( ctx, x, y, width, height, radius ,gr) => { @@ -52,9 +53,95 @@ setTimeout(() => { this.$nextTick(() => { var myChart = echarts.init(document.getElementById('typeAnalysis')); - myChart.setOption(chartsStatistics); + + + getWarningTypeDay().then(res=>{ + console.log(res); + if ( res.code == 200 ) { + let data = res.data; + console.log("===================",data); + typeAnalysisData = []; + for (var i = 0;i < data.length;i++){ + var it = data[i]; + if ( it.warningType == 1) { + typeAnalysisData.push({ + name:'交通拥堵', + value:it.number + }); + } + if ( it.warningType == 2) { + typeAnalysisData.push({ + name:'行人', + value:it.number + }); + } + if ( it.warningType == 3) { + typeAnalysisData.push({ + name:'非机动车', + value:it.number + }); + } + if ( it.warningType == 4) { + typeAnalysisData.push({ + name:'停车', + value:it.number + }); + } + if ( it.warningType == 5) { + typeAnalysisData.push({ + name:'倒车/逆行', + value:it.number + }); + } + if ( it.warningType == 6) { + typeAnalysisData.push({ + name:'烟火', + value:it.number + }); + } + if ( it.warningType == 7) { + typeAnalysisData.push({ + name:'撒落物', + value:it.number + }); + } + if ( it.warningType == 8) { + typeAnalysisData.push({ + name:'异常天气', + value:it.number + }); + } + if ( it.warningType == 9) { + typeAnalysisData.push({ + name:'护栏碰撞', + value:it.number + }); + } + drawRoundRect(context, 260, 8 + i * 28, 120, 24, 12,gr) + } + chartsStatistics.legend.data = typeAnalysisData?.map(x => x.name); + chartsStatistics.series[0].data = typeAnalysisData.map((item, index) => { + return { + ...item, + label: { + color: colorList[index] + } + } + }) + chartsStatistics.series[1].data = typeAnalysisData.map((item, index) => { + return { + ...item, + label: { + color: colorList[index] + } + } + }) + } + + myChart.setOption(chartsStatistics); + }) const domMap = document.getElementById("typeAnalysis"); let parentDiv = domMap.firstChild; @@ -75,12 +162,12 @@ context.lineWidth = 1; // 设置线段宽度 // 绘制圆角矩形 - drawRoundRect(context, 260, 8, 120, 24, 12,gr) - drawRoundRect(context, 260, 36, 120, 24, 12,gr) - drawRoundRect(context, 260, 64, 120, 24, 12,gr) - drawRoundRect(context, 260, 92, 120, 24, 12,gr) - drawRoundRect(context, 260, 120, 120, 24, 12,gr) - drawRoundRect(context, 260, 148, 120, 24, 12,gr) + + // drawRoundRect(context, 260, 36, 120, 24, 12,gr) + // drawRoundRect(context, 260, 64, 120, 24, 12,gr) + // drawRoundRect(context, 260, 92, 120, 24, 12,gr) + // drawRoundRect(context, 260, 120, 120, 24, 12,gr) + // drawRoundRect(context, 260, 148, 120, 24, 12,gr) }); }); }, diff --git a/ruoyi-ui/src/views/JiHeExpressway/scss/el-reset.scss b/ruoyi-ui/src/views/JiHeExpressway/scss/el-reset.scss index c2eb91b6..81a27a5f 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/scss/el-reset.scss +++ b/ruoyi-ui/src/views/JiHeExpressway/scss/el-reset.scss @@ -1,3 +1,10 @@ +.loading-message { + background-color: #265a70; + border: 0; + > i { + margin-right: 9px; + } +} div.el-popper { background: linear-gradient(180deg, #005c79 0%, #009bcc 100%); color: #fff; @@ -475,3 +482,15 @@ body { } } } + +div.el-popper.global-input-search-popover { + background: #064258; + + .footer { + display: flex; + align-items: center; + justify-content: flex-end; + gap: 9px; + margin-top: 15px; + } +} diff --git a/ruoyi-ui/src/views/JiHeExpressway/utils/enum.js b/ruoyi-ui/src/views/JiHeExpressway/utils/enum.js index d1bcf687..b5c77361 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/utils/enum.js +++ b/ruoyi-ui/src/views/JiHeExpressway/utils/enum.js @@ -71,3 +71,113 @@ export const CameraControlTypeEnum = { text: "枪机", }, }; + +export const EventTopics = { + 交通事故: 1, + 车辆故障: 2, + 交通管制: 3, + 交通拥堵: 4, + 非法上路: 5, + 路障清除: 6, + 施工建设: 7, + 服务区异常: 8, + 设施设备隐患: 9, + 异常天气: 10, + 其他事件: 11, +}; + +// 事件类型 eventType +export const EventType = { + 0: "待确认", + 1: "处理中", + 2: "已完成", +}; + +// 信息来源 warningSource +export const InfoWarningSource = { + 1: { + text: "视频AI", + }, + 2: { + text: "雷达识别", + }, + 3: { + text: "锥桶", + }, + 4: { + text: "护栏碰撞", + }, + 5: { + text: "扫码报警", + }, + 6: { + text: "非机预警", + }, +}; + +// 事件主类 warningType +export const WarningType = { + 1: "交通拥堵", + 2: "行人", + 3: "非机动车", + 4: "停车", + 5: "倒车/逆行", + 6: "烟火", + 7: "撒落物", + 8: "异常天气", + 9: "护栏碰撞", +}; + +// 事件主类的子类(上方) warningSubclass +export const WarningSubclass = { + 1: { + "1-1": "拥堵", + "1-2": "缓行", + }, + 2: { + "2-1": "普通行人", + "2-2": "工作人员", + }, + 3: { + "3-1": "摩托车", + "3-2": "自行车", + "3-3": "三轮车", + }, + 4: { + "4-1": "非工程车", + "4-2": "工程车", + "4-3": "主路有车", + "4-4": "匝道有车", + "4-5": "车辆故障", + "4-6": "交通事故", + "4-7": "应急车道被占用", + "4-8": "车离开应急车道", + "4-9": "其他", + }, + 5: { + "5-1": "倒车_逆行", + }, + 6: { + "6-1": "烟火", + }, + 7: { + "7-1": "撒落物", + }, + 8: { + "8-1": "雨", + "8-2": "冰雹", + "8-3": "风", + "8-4": "雾", + "8-5": "高温", + "8-6": "积水", + "8-7": "路面湿滑", + "8-8": "路面结冰", + "8-9": "道路能见度低", + "8-10": "道路团雾", + }, + 9: { + "9-1": "只碰撞不倾斜", + "9-2": "只倾斜无碰撞", + "9-3": "碰撞后倾斜", + }, +};