From 1944027e97cf2d71aa6dc4fee7aa3df243a62024 Mon Sep 17 00:00:00 2001 From: zhoule Date: Wed, 21 Feb 2024 16:49:30 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/FormConfig/Proxy.vue | 3 +- .../event/event/FormEvent/PresetFormItems.js | 47 ++++++++++++-- .../control/event/event/FormEvent/data.js | 38 +++++++++++- .../control/event/event/FormEvent/index.vue | 61 +++++++++---------- .../pages/control/event/event/data.js | 35 ++++++++++- .../monthlyAnalysis/assets/charts.js | 5 ++ .../components/IndicatorQuery/index.vue | 6 +- 7 files changed, 150 insertions(+), 45 deletions(-) diff --git a/ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/Proxy.vue b/ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/Proxy.vue index 53202380..6a223d83 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/Proxy.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/Proxy.vue @@ -31,7 +31,8 @@ export default { for (const key in callbacks) { result[key] = (...args) => callbacks[key](...args, { data: this.getFormData(), - formList: this.parent.formList + formList: this.parent.formList, + self: this }) } diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/FormEvent/PresetFormItems.js b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/FormEvent/PresetFormItems.js index 80c6e030..1fcdedac 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/FormEvent/PresetFormItems.js +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/FormEvent/PresetFormItems.js @@ -1,4 +1,5 @@ -import { options } from "runjs"; +import request from '@/utils/request' +import { Message } from "element-ui"; export const source = { label: "来源:", @@ -713,6 +714,42 @@ export const locationMode = { { key: "4", label: "收费站" }, ], }, + ons: { + change(value, ...args) { + const { formList } = args.slice(-1)[0]; + + let facilityType = 1; + if (value == 2) { + facilityType = 6; + } else if (value == 3) { + facilityType = 3; + } else if (value == 4) { + facilityType = 1; + } + if(value && value != 1){ + //路网设施 1 收费站 2 桥梁 3 互通立交 4 枢纽立交 5 隧道 6 服务区 + request({ + url: `/business/facility/query?facilityType=${facilityType}`, + method: "get" + }).then((result) => { + if (result.code != 200) return Message.error(result?.msg); + let lwss = []; + result.data.forEach(it => lwss.push({ key: it.id, label: it.facilityName})) + + formList.forEach((it) => { + if(it.key == "dcEventAccident.facilityId" || it.key == "dcEventVehicleAccident.facilityId"){ + it.options.options = lwss; + } + }); + + }).catch((err) => { + console.log('err',err) + Message.error("查询失败", err); + }) + } + + }, + }, }; export const route = { @@ -1130,7 +1167,7 @@ export const congestionCause = { label: "备注项添加", }, ], - 2 : [ + 2: [ { key: "1", label: "主线车流量大", @@ -1139,9 +1176,9 @@ export const congestionCause = { key: "2", label: "收费站出口车流量大导致主线压车", }, - ] - } - config.options.options = (value != 1 ? ad[1] : ad[2]); + ], + }; + config.options.options = value != 1 ? ad[1] : ad[2]; }, }, }; diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/FormEvent/data.js b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/FormEvent/data.js index 9cfe7f00..6d4420b0 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/FormEvent/data.js +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/FormEvent/data.js @@ -67,7 +67,43 @@ export const tabConfigList = [ return true; } return false; - } + }, + ons: { + change(value, ...args) { + const { formList } = args.slice(-1)[0]; + + let facilityType = 1; + if (value == 2) { + facilityType = 6; + } else if (value == 3) { + facilityType = 3; + } else if (value == 4) { + facilityType = 1; + } + if(value && value != 1){ + //路网设施 1 收费站 2 桥梁 3 互通立交 4 枢纽立交 5 隧道 6 服务区 + // request({ + // url: `/business/facility/query?facilityType=${facilityType}`, + // method: "get" + // }).then((result) => { + // if (result.code != 200) return Message.error(result?.msg); + // let lwss = []; + // result.data.forEach(it => lwss.push({ key: it.id, label: it.facilityName})) + + // formList.forEach((it) => { + // if(it.key == "dcEventAccident.facilityId" || it.key == "dcEventVehicleAccident.facilityId"){ + // it.options.options = lwss; + // } + // }); + + // }).catch((err) => { + // console.log('err',err) + // Message.error("查询失败", err); + // }) + } + + }, + }, }, { label: "匝道:", diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/FormEvent/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/FormEvent/index.vue index 8176fa4f..9c94e6d4 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/FormEvent/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/FormEvent/index.vue @@ -49,7 +49,8 @@ export default { tabConfigList, index: 1, roads: [], - direction: [] + direction: [], + lwss: [] } }, created() { @@ -77,6 +78,7 @@ export default { methods: { initData() { return Promise.all([ + //道路 request({ url: `/business/road/query`, method: "get", @@ -85,10 +87,10 @@ export default { result.data.forEach(it => { this.roads.push({ key: it.id, label: it.roadName }) }) - }) - .catch((err) => { - Message.error("查询失败", err); - }), + }).catch((err) => { + Message.error("查询失败", err); + }), + //方向字典 request({ url: `/system/dict/data/type/iot_event_direction`, method: "get", @@ -97,10 +99,20 @@ export default { result.data.forEach(it => { this.direction.push({ key: it.dictValue, label: it.dictLabel }) }) + }).catch((err) => { + Message.error("查询失败", err); + }), + //路网设施 1 收费站 2 桥梁 3 互通立交 4 枢纽立交 5 隧道 6 服务区 + request({ + url: `/business/facility/query`, + method: "get" + }).then((result) => { + if (result.code != 200) return Message.error(result?.msg); + result.data.forEach(it => this.lwss.push({ key: it.id, label: it.facilityName, type: facilityType })) + }).catch((err) => { + Message.error("查询失败", err); }) - .catch((err) => { - Message.error("查询失败", err); - }) + ]) }, handleChange({ index }) { @@ -108,30 +120,6 @@ export default { this.index = index; let formConfig = tabConfigList[index].formConfig; - if (index == 0 || index == 1 || index == 7) { - let fwq = []; - - request({ - url: `/business/facility/query?facilityType=6`, - method: "get" - }).then((result) => { - if (result.code != 200) return Message.error(result?.msg); - result.data.forEach(it => { - fwq.push({ key: it.id, label: it.facilityName }) - }) - }) - .catch((err) => { - Message.error("查询失败", err); - }); - - formConfig.list.forEach(it => { - if (it.key === 'dcEventServiceArea.facilityId' || it.key === 'dcEventAccident.facilityId') { - it.options.options = fwq; - } - }) - - } - formConfig.list.forEach(it => { if (it.key == 'direction') { it.options.options = this.direction; @@ -139,6 +127,15 @@ export default { if (it.key == 'roadId') { it.options.options = this.roads; } + if (index == 7 || it.key === 'dcEventServiceArea.facilityId') { + it.options.options = this.lwss.filter(ss => ss.type == 6); + } + // if (index == 0 || index == 1 || index == 7) { + // if (it.key === 'dcEventAccident.facilityId' || it.key === 'dcEventVehicleAccident.facilityId' || it.key === 'dcEventServiceArea.facilityId') { + // it.options.options = this.lwss.filter(ss => ss.type == 6); + // } + // } + }) this.formConfig = formConfig; 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 d4e18d36..f958b6f8 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,6 +1,35 @@ import * as PresetFormItems from "@screen/pages/control/event/event/FormEvent/PresetFormItems.js"; import { merge, cloneDeep } from "lodash"; +const station = { + label: "桩号:", + key: "stakeMark", + required: true, + type: "MultipleLabelItem", + options: { + options: [ + { + prefix: { + text: "K", + style: { + color: "#3DE8FF", + }, + }, + key: "stakeMark[0]", + }, + { + prefix: { + text: "+", + style: { + color: "#3DE8FF", + }, + }, + key: "stakeMark[1]", + }, + ], + }, +}; + export const tabMap = { "-1": { state: 5, @@ -86,7 +115,7 @@ export const gjSearchFormList = [ }, }, { - ...PresetFormItems.station, + ...station, label: "桩号:", required: false, }, @@ -142,11 +171,11 @@ export const gzSearchFormList = [ }, }, { - ...PresetFormItems.station, + ...station, label: "开始桩号:", required: false, }, - merge(cloneDeep(PresetFormItems.station), { + merge(cloneDeep(station), { options: { options: [ { diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/chargeableOperations/components/monthlyAnalysis/assets/charts.js b/ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/chargeableOperations/components/monthlyAnalysis/assets/charts.js index 2b30e267..09d1e5cc 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/chargeableOperations/components/monthlyAnalysis/assets/charts.js +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/chargeableOperations/components/monthlyAnalysis/assets/charts.js @@ -4,6 +4,7 @@ var data1 = [5, 12, 4, 6, 7, 9, 10, 15, 3, 5, 6, 15]; var data2 = [5, 12, 4, 6, 7, 9, 10, 15, 3, 5, 6, 15]; var options = { tooltip: { + show:true // trigger: "axis", // backgroundColor: 'rgba(17,95,182,0.5)', // textStyle: { @@ -238,6 +239,8 @@ var options = { }, symbolPosition: "end", data: data1, + tooltip: { + show:false} }, { name: "增涨率", @@ -269,6 +272,8 @@ var options = { opacity: 0.7, }, data: [18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18], + tooltip: { + show:false} }, ], }; diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/perception/trafficSituation/components/IndicatorQuery/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/perception/trafficSituation/components/IndicatorQuery/index.vue index a74e198f..b974fb6f 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/perception/trafficSituation/components/IndicatorQuery/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/perception/trafficSituation/components/IndicatorQuery/index.vue @@ -14,14 +14,14 @@ - + - + - + From 98dca2b9fb2298448fc62fdbac5a046c2f4908cc Mon Sep 17 00:00:00 2001 From: lau572 <1010031226@qq.com> Date: Thu, 22 Feb 2024 15:26:14 +0800 Subject: [PATCH 2/4] =?UTF-8?q?websocket=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/views/websocket.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ruoyi-ui/src/views/websocket.vue b/ruoyi-ui/src/views/websocket.vue index 4166759c..ac7d4437 100644 --- a/ruoyi-ui/src/views/websocket.vue +++ b/ruoyi-ui/src/views/websocket.vue @@ -30,8 +30,8 @@ export default { // console.log(location.hostname ) // 建立 websocket 连接 this.socket.initialize({ - // url: 'ws://' + location.hostname + ':' + port + path, - url: "ws://10.7.179.15" + ":" + port + path, + url: 'ws://' + location.hostname + ':' + port + path, + // url: "ws://10.7.179.15" + ":" + port + path, // url: "ws://10.168.64.171" + ":" + port + path, // url: 'ws://10.168.78.127'+ ':' + port + path, From 15425971c97fbd3947893f870e16e1ffb798ee5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=9C=8B?= Date: Thu, 22 Feb 2024 16:33:47 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E8=BE=96=E6=AE=B5=E7=AE=A1=E7=90=86?= =?UTF-8?q?=EF=BC=8C=E6=90=9C=E7=B4=A2=E5=BC=B9=E7=AA=97=E5=86=85=E5=AE=B9?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/JiHeExpressway/common/PresetFormItems.js | 2 +- .../views/jurisdictionalManagement/data.js | 12 +++--------- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/ruoyi-ui/src/views/JiHeExpressway/common/PresetFormItems.js b/ruoyi-ui/src/views/JiHeExpressway/common/PresetFormItems.js index 16ae2971..f40baffe 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/common/PresetFormItems.js +++ b/ruoyi-ui/src/views/JiHeExpressway/common/PresetFormItems.js @@ -100,7 +100,7 @@ export const station = { }; export const startStation = { - label: "开始桩号:", + label: "起始桩号:", key: "startStakeMark", required: false, type: "MultipleLabelItem", diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/jurisdictionalManagement/data.js b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/jurisdictionalManagement/data.js index 074e1715..d4413bf8 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/jurisdictionalManagement/data.js +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/jurisdictionalManagement/data.js @@ -1,15 +1,9 @@ import { cloneDeep, merge } from "lodash"; -import * as PresetFormItems from "@screen/pages/control/event/event/FormEvent/PresetFormItems.js"; +import * as PresetFormItems from "@screen/common/PresetFormItems.js"; export const searchFormList = [ - { - label: "开始桩号:", - key: "startStakeMark", - }, - { - label: "结束桩号:", - key: "endStakeMark", - }, + PresetFormItems.startStation, + PresetFormItems.endStation ]; export const addEditFormList = [ From 79b16965ece6d64af4307df9adcbadef5e0a04b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=9C=8B?= Date: Thu, 22 Feb 2024 17:03:21 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20=E5=8D=8F=E8=B0=83?= =?UTF-8?q?=E8=B0=83=E5=BA=A6=E8=AE=B0=E5=BD=95=20=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=E5=BC=B9=E7=AA=97=E6=97=A0=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../JiHeExpressway/common/PresetFormItems.js | 26 +++++++++++++++---- .../event/coordinateSchedulingRecords/data.js | 22 ++++++++++++++++ 2 files changed, 43 insertions(+), 5 deletions(-) create mode 100644 ruoyi-ui/src/views/JiHeExpressway/pages/control/event/coordinateSchedulingRecords/data.js diff --git a/ruoyi-ui/src/views/JiHeExpressway/common/PresetFormItems.js b/ruoyi-ui/src/views/JiHeExpressway/common/PresetFormItems.js index f40baffe..09ec829d 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/common/PresetFormItems.js +++ b/ruoyi-ui/src/views/JiHeExpressway/common/PresetFormItems.js @@ -205,15 +205,30 @@ export const startEndStation = { }, }; +// export const direction = { +// label: "方向:", +// key: "direction", +// required: true, +// type: "select", +// options: { +// options: [ +// // { key: "济南方向", label: "济南方向" }, +// // { key: "菏泽方向", label: "菏泽方向" }, +// ], +// }, +// }; + export const direction = { - label: "方向:", + label: "路段方向:", key: "direction", - required: true, - type: "select", + type: "CheckboxGroup", + isAlone: true, + default: [], options: { options: [ - // { key: "济南方向", label: "济南方向" }, - // { key: "菏泽方向", label: "菏泽方向" }, + { key: "1", label: "济南方向" }, + { key: "3", label: "菏泽方向" }, + { key: "2", label: "双向" }, ], }, }; @@ -290,6 +305,7 @@ export const eventLevel = { }, }; + export const laneOccupancy = { label: "车道占用:", key: "lang", diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/coordinateSchedulingRecords/data.js b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/coordinateSchedulingRecords/data.js new file mode 100644 index 00000000..48d4cbc1 --- /dev/null +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/coordinateSchedulingRecords/data.js @@ -0,0 +1,22 @@ +import * as PresetFormItems from "@screen/common/PresetFormItems.js"; +import { merge, cloneDeep } from "lodash"; + +export const searchFormList = [ + PresetFormItems.eventType, + PresetFormItems.direction, + { + 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.startStation, + PresetFormItems.endStation + + +];