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 index a98f55f5..bcfc8867 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/HomeFilter/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/HomeFilter/index.vue @@ -47,6 +47,7 @@ export default { key: "childType", type: "select", options: { + clearable: true, options: [], }, visible: data => { @@ -62,15 +63,13 @@ export default { type: "select", default: null, options: { + clearable: true, options: [{ - label: "所有", - value: null - }, { label: "在线", - value: 1 + value: "1" }, { label: "离线", - value: 0 + value: "0" }] }, visible: data => { 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 4792f829..34e40695 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 @@ -269,7 +269,13 @@ export function getProduct(productId) { }); }); } - +function padZero(num) { + num = num.toString(); + while (num.length < 3) { + num = "0" + num; + } + return num; +} /** * 交通事件 列表 根据类型获取 * @param {number} eventType @@ -280,9 +286,24 @@ export function getEventTopicList(eventType, options) { Message.error(`事件加载失败!`); return reject(); } - // console.log(options, "options xxxx"); + console.log(options, "options xxxx"); + const { endStakeMark, startStakeMark } = options; + let url = `/business/trafficIncidents/getEventList?eventType=${eventType}`; + if (endStakeMark) { + let formatEndStakeMark = `K${padZero(endStakeMark[0])}+${padZero( + endStakeMark[1] + )}`; + url += `&endStakeMark=${formatEndStakeMark}`; + } + if (startStakeMark) { + let formatStartStakeMark = `K${padZero(startStakeMark[0])}+${padZero( + startStakeMark[1] + )}`; + url += `&startStakeMark=${formatStartStakeMark}`; + } + request({ - url: `/business/trafficIncidents/getEventList?eventType=${eventType}`, + url: url, method: "post", }) .then(({ code, data }) => { @@ -304,9 +325,9 @@ export function getEventTopicList(eventType, options) { * 感知事件根据类型获取 * @param {number} eventType */ -export function getPerceiveEventList(data = {}) { +export function getPerceiveEventList(data = {}, options) { return new Promise((resolve, reject) => { - const completeTime = moment().format("YYYY-MM-DD"); + const completeTime = moment().add(1, "d").format("YYYY-MM-DD"); const startTime = moment().add(-30, "d").format("YYYY-MM-DD"); data.startTime = startTime; data.completeTime = completeTime; diff --git a/ruoyi-ui/src/views/JiHeExpressway/utils/enum.js b/ruoyi-ui/src/views/JiHeExpressway/utils/enum.js index 7b015c34..787457b8 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/utils/enum.js +++ b/ruoyi-ui/src/views/JiHeExpressway/utils/enum.js @@ -265,18 +265,18 @@ export const SchedulingEnum = { }; const CameraChildTypes = { - 11: "高清网络枪型固定摄像机", - 12: "高清网络球形摄像机", - 13: "桥下高清网络球形摄像机", - 14: "360°全景摄像机", - 15: "180°全景摄像机", + "1-1": "高清网络枪型固定摄像机", + "1-2": "高清网络球形摄像机", + "1-3": "桥下高清网络球形摄像机", + "1-4": "360°全景摄像机", + "1-5": "180°全景摄像机", }; const BoardChildTypes = { - 21: "门架式可变信息标志", - 22: "大学城入口站前板", - 23: "雨棚可变信息标志", - 24: "站前悬臂式可变信息标志", + "2-1": "门架式可变信息标志", + "2-2": "大学城入口站前板", + "2-3": "雨棚可变信息标志", + "2-4": "站前悬臂式可变信息标志", }; export const ChildTypes = {