diff --git a/ruoyi-ui/src/api/manualWarning/index.js b/ruoyi-ui/src/api/manualWarning/index.js new file mode 100644 index 00000000..89af92ca --- /dev/null +++ b/ruoyi-ui/src/api/manualWarning/index.js @@ -0,0 +1,10 @@ +import request from "@/utils/request"; + +// 查询非机预警列表 +export function perceivedEventsList(data) { + return request({ + url: "/perceivedEvents/warning/perceivedEventsList", + method: "post", + data, + }); +} diff --git a/ruoyi-ui/src/views/JiHeExpressway/components/ManualWarningCard/data.js b/ruoyi-ui/src/views/JiHeExpressway/components/ManualWarningCard/data.js new file mode 100644 index 00000000..d094e48e --- /dev/null +++ b/ruoyi-ui/src/views/JiHeExpressway/components/ManualWarningCard/data.js @@ -0,0 +1,13 @@ +// 关系 对照的 图片 +export const statusMap = { + // 已确认 + 1: "confirmed", + // 误报 + 2: "falsePositives", + // 已处理 + 3: "processed", + // 处理中 + 4: "processing", + // 待确认 + 5: "toBeConfirmed", +}; diff --git a/ruoyi-ui/src/views/JiHeExpressway/components/ManualWarningCard/images/confirmed.svg b/ruoyi-ui/src/views/JiHeExpressway/components/ManualWarningCard/images/confirmed.svg new file mode 100644 index 00000000..a30b4c34 --- /dev/null +++ b/ruoyi-ui/src/views/JiHeExpressway/components/ManualWarningCard/images/confirmed.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/ruoyi-ui/src/views/JiHeExpressway/components/ManualWarningCard/images/falsePositives.svg b/ruoyi-ui/src/views/JiHeExpressway/components/ManualWarningCard/images/falsePositives.svg new file mode 100644 index 00000000..67201ca7 --- /dev/null +++ b/ruoyi-ui/src/views/JiHeExpressway/components/ManualWarningCard/images/falsePositives.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/ruoyi-ui/src/views/JiHeExpressway/components/ManualWarningCard/images/processed.svg b/ruoyi-ui/src/views/JiHeExpressway/components/ManualWarningCard/images/processed.svg new file mode 100644 index 00000000..694c5571 --- /dev/null +++ b/ruoyi-ui/src/views/JiHeExpressway/components/ManualWarningCard/images/processed.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/ruoyi-ui/src/views/JiHeExpressway/components/ManualWarningCard/images/processing.svg b/ruoyi-ui/src/views/JiHeExpressway/components/ManualWarningCard/images/processing.svg new file mode 100644 index 00000000..f488f63b --- /dev/null +++ b/ruoyi-ui/src/views/JiHeExpressway/components/ManualWarningCard/images/processing.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/ruoyi-ui/src/views/JiHeExpressway/components/ManualWarningCard/images/toBeConfirmed.svg b/ruoyi-ui/src/views/JiHeExpressway/components/ManualWarningCard/images/toBeConfirmed.svg new file mode 100644 index 00000000..dd559d58 --- /dev/null +++ b/ruoyi-ui/src/views/JiHeExpressway/components/ManualWarningCard/images/toBeConfirmed.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/ruoyi-ui/src/views/JiHeExpressway/components/ManualWarningCard/index.vue b/ruoyi-ui/src/views/JiHeExpressway/components/ManualWarningCard/index.vue new file mode 100644 index 00000000..009ce1ed --- /dev/null +++ b/ruoyi-ui/src/views/JiHeExpressway/components/ManualWarningCard/index.vue @@ -0,0 +1,240 @@ + + + + + diff --git a/ruoyi-ui/src/views/JiHeExpressway/components/ManualWarningCard/test.png b/ruoyi-ui/src/views/JiHeExpressway/components/ManualWarningCard/test.png new file mode 100644 index 00000000..7b6b795c Binary files /dev/null and b/ruoyi-ui/src/views/JiHeExpressway/components/ManualWarningCard/test.png differ 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 77a6cb8a..d735a855 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 @@ -225,12 +225,18 @@ export default { this.isShowAddNew = true; }, onExport() { + let url = ''; + if (this.activeName == '-1') { + url = '/business/warning/export' + } else { + url = '/dc/system/event/export'; + } let loadingInstance = Loading.service({ fullscreen: true, background: "#00000052", text: "文件正在下载...", }); - request.post('/dc/system/event/export', {}, { headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, responseType: 'blob' }) + request.post(url, {}, { headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, responseType: 'blob' }) .then((res) => { console.log(res); const url = window.URL.createObjectURL(new Blob([res])); diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/control/manual/events/data.js b/ruoyi-ui/src/views/JiHeExpressway/pages/control/manual/events/data.js new file mode 100644 index 00000000..b558a4ca --- /dev/null +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/control/manual/events/data.js @@ -0,0 +1,81 @@ +import * as PresetFormItems from "@screen/pages/control/event/event/FormEvent/PresetFormItems.js"; +import { merge, cloneDeep } from "lodash"; + +export const searchFormList = [ + { + label: "事件状态:", + key: "eventState", + type: "RadioGroup", + default: "0", + options: { + options: [ + { + key: "0", + label: "未解决", + }, + { + key: "1", + label: "已解决", + }, + { + key: "2", + label: "已关闭", + }, + ], + }, + }, + PresetFormItems.eventSources, + PresetFormItems.eventType, + { + label: "方向:", + key: "direction", + type: "RadioGroup", + default: "1", + options: { + options: [ + { + key: "1", + label: "菏泽方向", + }, + { + key: "2", + label: "双向", + }, + { + key: "3", + label: "济南方向", + }, + ], + }, + }, + { + label: "时间范围:", + key: "warningTime", + 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, + }), +]; diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/control/manual/events/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/control/manual/events/index.vue index 82eeb7df..6c7c7e3f 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/control/manual/events/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/control/manual/events/index.vue @@ -2,12 +2,20 @@
- - - 刷新 - +
+ + + 导出 + + + + 刷新 + +
-
@@ -49,10 +55,10 @@ import ButtonGradient from "@screen/components/Buttons/ButtonGradient.vue"; import Pagination from "@screen/components/Pagination.vue"; import InputSearch from "@screen/components/InputSearch/index.vue"; -import RoadStateCard from "@screen/components/RoadStateCard/index.vue"; -// import EventDetailDialog from "./EventDetailDialog/index"; +import ManualWarningCard from "@screen/components/ManualWarningCard/index.vue"; +import { perceivedEventsList } from "@/api/manualWarning/index.js"; // import EventDispatchDialog from "./EventDispatchDialog/index"; -// import { searchFormList } from "./data"; +import { searchFormList } from "./data"; import request from "@/utils/request"; const directionMapping = { @@ -65,14 +71,14 @@ export default { name: "RoadNetworkMonitoring", components: { Pagination, - RoadStateCard, + ManualWarningCard, InputSearch, Pagination, ButtonGradient, }, data() { return { - searchFormList: {}, + searchFormList, detailDialogFormData: {}, total: 0, data: [], @@ -80,7 +86,7 @@ export default { searchData: { pageSize: 16, pageNum: 1, - eventState: "0", + warningSource: "6", }, }; }, @@ -88,24 +94,40 @@ export default { this.initData(); }, methods: { + // 导出 + handleExport() { + this.$message.warning("待开发"); + }, + // 刷新 + onRefresh() {}, initData() { - request({ - // url: `/dc/system/event/dispatchEventList`, - url: "/dc/system/event/list", - method: "get", - params: this.searchData, - }).then((result) => { - if (result.code != 200) return Message.error(result?.msg); - this.total = result.total; - result.rows.forEach((it) => { + perceivedEventsList(this.searchData).then((res) => { + console.log("res", res); + if (res.code != 200) return Message.error(res?.msg); + this.total = res.total; + res.rows.forEach((it) => { + it.source = "非机预警"; it.stringDirection = directionMapping[it.direction] || it.direction; }); - this.data = result.rows; + this.data = res.rows; }); + // request({ + // // url: `/dc/system/event/dispatchEventList`, + // url: "/dc/system/event/list", + // method: "get", + // params: this.searchData, + // }).then((result) => { + // if (result.code != 200) return Message.error(result?.msg); + // this.total = result.total; + // result.rows.forEach((it) => { + // it.stringDirection = directionMapping[it.direction] || it.direction; + // }); + // this.data = result.rows; + // }); }, onSizeChange(pageSize) {}, getStateCardBind(item) {}, - onRefresh() {}, + firstBtnClick(id) {}, handleSearch(data) {}, }, @@ -126,7 +148,10 @@ export default { display: flex; // justify-content: flex-end; justify-content: space-between; - .refresh-btn { + .filter-btn { + width: 150px; + justify-content: space-between; + display: flex; } } diff --git a/ruoyi-ui/vue.config.js b/ruoyi-ui/vue.config.js index fc456c2c..3ec84b6f 100644 --- a/ruoyi-ui/vue.config.js +++ b/ruoyi-ui/vue.config.js @@ -53,10 +53,10 @@ module.exports = { // target: `http://10.168.69.255:8087`, //正晨后台 连现场物联 刘文阁 // target: `http://10.168.78.135:8087`, //王钦 // target: `http://10.168.66.196:8087`, //正晨后台 连现场物联 刘文阁2 - // target: `http://10.168.68.42:8087`, //王思祥 - target: `http://10.168.65.194:8087`, //赵祥龙 + target: `http://10.168.68.42:8087`, //王思祥 + // target: `http://10.168.65.194:8087`, //赵祥龙 // target: `http://10.168.65.156:8097`, //孟 - target: `http://10.168.56.165:8087`, //王家宝 + // target: `http://10.168.56.165:8087`, //王家宝 // target: `http://10.168.65.103:8097`, changeOrigin: true,