Browse Source

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

wangqin
qingzhengli 1 year ago
parent
commit
a7e6a917b1
  1. 9
      ruoyi-ui/src/api/commandDispatch/index.js
  2. 48
      ruoyi-ui/src/router/routerCreater.js
  3. 5
      ruoyi-ui/src/views/JiHeExpressway/components/TimeLine/TimeLine1/index.vue
  4. 27
      ruoyi-ui/src/views/JiHeExpressway/components/TimeLine/TimeLine2/DescCard.vue
  5. 57
      ruoyi-ui/src/views/JiHeExpressway/components/TimeLine/TimeLine2/index.vue
  6. 183
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/RoadNetworkFacilities/index.vue
  7. 4
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/index.vue
  8. 73
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/buttonEvent.js
  9. 38
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/httpList.js
  10. 38
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DispatchLiaison/StatsDialogVisible/index.vue
  11. 139
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DispatchLiaison/index.vue
  12. 356
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DisposalProcess/DialogVisible/index.vue
  13. 54
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DisposalProcess/index.vue
  14. 4
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/EventInformation/components/EditEventInformationDialog/data.js
  15. 219
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/EventInformation/components/EditEventInformationDialog/index.vue
  16. 644
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/TrafficControl/components/AddControlEventInfoDialog/data.js
  17. 178
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/TrafficControl/components/AddControlEventInfoDialog/index.vue
  18. 36
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/TrafficControl/index.vue
  19. 2
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/mixin.js
  20. 125
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/EventDetailDialog/index.vue
  21. 9
      ruoyi-ui/src/views/JiHeExpressway/utils/enum.js
  22. 4
      ruoyi-ui/vue.config.js

9
ruoyi-ui/src/api/commandDispatch/index.js

@ -21,6 +21,15 @@ export function postCommandDispatch(data) {
});
}
// 提交智能调度
export function postUpdateSource(data) {
return request({
url: "/business/warning/updateSource",
method: "post",
data,
});
}
// 处置过程节点
export function getProcessNode(eventId) {
return request({

48
ruoyi-ui/src/router/routerCreater.js

@ -9,32 +9,31 @@ Vue.use(Router);
import menuData from "@/common/menuData";
// 公共路由
import {constantRoutes} from "./index.js";
import { constantRoutes } from "./index.js";
let ids = []; //层级id列表,每级菜单记录一个id,供菜单回显使用
let ids = []; //层级id列表,每级菜单记录一个id,供菜单回显使用
let prev = ""; //前缀,用来区分左右侧菜单
let level = 0; //当前正在处理的菜单层级
let deltaLvl = 1; //已递归进入的菜单层级,用于编辑完当前菜单后返回时使用
let counter = {} //记录左右侧菜单的下一个可用索引
let counter = {}; //记录左右侧菜单的下一个可用索引
function processNode(node) {
let arr = [];
node.forEach((item, index) => {
if(level == 0 ){ //处理顶级菜单,加前缀、按照前缀分别计算下一个可用索引记录到counter中
if (level == 0) {
//处理顶级菜单,加前缀、按照前缀分别计算下一个可用索引记录到counter中
prev = item.position.substring(0, 1); //取到前缀
counter[prev] == undefined ? counter[prev] = 0 : "";
counter[prev] == undefined ? (counter[prev] = 0) : "";
ids = [counter[prev]];
counter[prev] ++;
}else{
ids[level] = index; //如果不是顶级菜单,直接将“下一个可用索引”存到ids列表里
counter[prev]++;
} else {
ids[level] = index; //如果不是顶级菜单,直接将“下一个可用索引”存到ids列表里
}
let temp = {
path: item.path || "",
title: item.title,
name: item.name,
meta: { menuId : prev + "_" + ids.join("-"), title : item.title}
meta: { menuId: prev + "_" + ids.join("-"), title: item.title },
};
if (item.redirect) {
@ -45,20 +44,23 @@ function processNode(node) {
if (!item.component) {
temp.component = compX;
} else {
console.log(item.component);
temp.component = (resolve) =>
require(["@/views/JiHeExpressway/pages/" + item.component], resolve); //views/visualization/pages/${item.component}
}
if (item.children && item.children.length > 0) {
level ++;
if (index == (node.length - 1)){ //处理最后一项菜单还有children、无法返回上一层的情况
deltaLvl ++; //记录的是“最后一项有children”的层级的累计数量
level++;
if (index == node.length - 1) {
//处理最后一项菜单还有children、无法返回上一层的情况
deltaLvl++; //记录的是“最后一项有children”的层级的累计数量
}
temp.children = processNode(item.children);
} else if (index == (node.length - 1)) { //当前层级已处理到最后一项、且最后一项无children时返回
} else if (index == node.length - 1) {
//当前层级已处理到最后一项、且最后一项无children时返回
level -= deltaLvl;
ids.splice(deltaLvl*-1, deltaLvl); //返回后,摘出ids里对应数量的层级数
deltaLvl = 1
ids.splice(deltaLvl * -1, deltaLvl); //返回后,摘出ids里对应数量的层级数
deltaLvl = 1;
}
arr.push(temp);
});
@ -70,8 +72,8 @@ let routes = [
{
path: "/index",
name: "index",
redirect:{
path:"/home"
redirect: {
path: "/home",
},
component: () => import("@/views/JiHeExpressway/index"),
// children: childrenRoutes
@ -80,11 +82,11 @@ let routes = [
{
path: "/",
name: "root",
redirect:{
path:"/home"
}
redirect: {
path: "/home",
},
},
...constantRoutes
...constantRoutes,
];
export default new Router({
base: "/",

5
ruoyi-ui/src/views/JiHeExpressway/components/TimeLine/TimeLine1/index.vue

@ -230,7 +230,8 @@ div.auto-size {
.top-label {
line-height: 12px;
height: 20px;
height: 35px;
font-size: 12px;
text-align: center;
}
@ -240,7 +241,7 @@ div.auto-size {
justify-content: center;
gap: 6px;
position: relative;
margin-top: 5px;
// margin-top: 5px;
.circle {
border: 1px solid var(--active-color, #39d5bf);

27
ruoyi-ui/src/views/JiHeExpressway/components/TimeLine/TimeLine2/DescCard.vue

@ -1,5 +1,5 @@
<template>
<div class='DescCard'>
<div class="DescCard">
<span class="time">{{ data.time }}</span>
<div class="info">
<img src="./images/avatar.svg" />
@ -13,23 +13,22 @@
<script>
export default {
name: 'DescCard',
name: "DescCard",
props: {
data: {
type: Object,
default: () => ({})
}
}
}
default: () => ({}),
},
},
};
</script>
<style lang='scss' scoped>
<style lang="scss" scoped>
.DescCard {
font-size: 14px;
// font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #FFFFFF;
color: #ffffff;
line-height: 16px;
// -webkit-background-clip: text;
// -webkit-text-fill-color: transparent;
@ -37,14 +36,15 @@ export default {
display: flex;
flex-direction: column;
gap: 6px;
background: #0D5F79;
background: #0d5f79;
border-radius: 6px 6px 6px 6px;
opacity: 1;
border: 1px solid #00B3CC;
border: 1px solid #00b3cc;
padding: 9px 15px;
.time {}
.time {
}
.info {
display: flex;
@ -57,7 +57,8 @@ export default {
line-height: 19px;
}
.posts {}
.posts {
}
}
.desc {

57
ruoyi-ui/src/views/JiHeExpressway/components/TimeLine/TimeLine2/index.vue

@ -1,9 +1,10 @@
<template>
<div class='TimeLine2'>
<div class="TimeLine2">
<!-- { "time": "2024/4/16 11:30:07", "name": "1", "desc": "111", "source": 1 } -->
<div class="node" v-for="(item, index) in data" :key="index">
<div class="content" v-if="direction != 'right'">
<!-- <template v-if="direction === 'auto' ? !!((index + 1) & 1) : true"> -->
<template v-if="getDirection(item, index, 'left')">
<div class="content">
<template v-if="item.source == 2">
<!-- <template v-if="direction === 'auto' ? !!((index + 1) & 1) : true"> -->
<span class="title" v-if="item.title">{{ item.title }}</span>
<DescCard :data="item" />
</template>
@ -12,13 +13,15 @@
<div class="circle"></div>
<div class="line"></div>
</div>
<div class="content" v-if="direction != 'left'">
<!-- <template v-if="direction === 'auto' ? !((index + 1) & 1) : true"> -->
<template v-if="getDirection(item, index, 'right')">
<div class="content">
<template v-if="item.source == 1">
<!-- <template v-if="direction === 'auto' ? !((index + 1) & 1) : true"> -->
<!-- <template v-if="getDirection(item, index, 'right')"> -->
<span class="title" v-if="item.title">{{ item.title }}</span>
<slot name="content" :data="item">
<DescCard :data="item" />
</slot>
<!-- </template> -->
</template>
</div>
</div>
@ -26,12 +29,12 @@
</template>
<script>
import DescCard from "./DescCard.vue"
import DescCard from "./DescCard.vue";
export default {
name: 'TimeLine2',
name: "TimeLine2",
components: {
DescCard
DescCard,
},
props: {
/**
@ -46,7 +49,7 @@ export default {
*/
data: {
type: Array,
default: () => []
default: () => [],
},
/**
* auto 左右 显示
@ -55,26 +58,26 @@ export default {
*/
direction: {
type: String,
default: "auto"
}
default: "auto",
},
},
methods: {
getDirection(item, index, position) {
if (this.direction != 'auto') return this.direction === position;
if (this.direction != "auto") return this.direction === position;
if (item.direction) return item.direction === position;
switch (position) {
case 'left':
return !!((index + 1) & 1)
case 'right':
return !((index + 1) & 1)
case "left":
return !!((index + 1) & 1);
case "right":
return !((index + 1) & 1);
}
}
}
}
},
},
};
</script>
<style lang='scss' scoped>
<style lang="scss" scoped>
.TimeLine2 {
color: #fff;
overflow-y: auto;
@ -90,7 +93,7 @@ export default {
margin-top: 24px;
}
>.content {
> .content {
flex: 1;
display: flex;
flex-direction: column;
@ -105,7 +108,7 @@ export default {
.title {
font-size: 16px;
font-weight: 500;
color: #FFC368;
color: #ffc368;
line-height: 19px;
}
}
@ -123,7 +126,7 @@ export default {
border-radius: 50%;
opacity: 1;
border: 1px solid var(--active-color, #39D5BF);
border: 1px solid var(--active-color, #39d5bf);
position: relative;
&::before {
@ -135,14 +138,14 @@ export default {
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
background-color: var(--active-color, #39D5BF);
background-color: var(--active-color, #39d5bf);
}
}
.line {
width: 2px;
min-height: 100%;
background: #00B3CC;
background: #00b3cc;
border-radius: 0px 0px 0px 0px;
opacity: 1;
}

183
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/RoadNetworkFacilities/index.vue

@ -0,0 +1,183 @@
<template>
<Dialog v-model="obverseVisible" :title="dialogData._itemData && dialogData._itemData.title" width="650px">
<div class="RoadNetworkFacilities">
<div class="header">
<Video class="video-stream" :pileNum="dialogData.stakeMark" rangeIndex="upCamera" :showHeader="false" />
<Video class="video-stream" :pileNum="dialogData.stakeMark" rangeIndex="downCamera" :showHeader="false" />
</div>
<Descriptions labelWidth="72px" :list="list" :data="data" style="gap: 18px" column="7" />
</div>
</Dialog>
</template>
<script>
import Dialog from "@screen/components/Dialog/index.vue";
import Descriptions from "@screen/components/Descriptions.vue";
// import { getRoadInfoByStakeMark, getProduct } from "@screen/pages/Home/components/RoadAndEvents/utils/httpList.js"
import Video from "@screen/components/VideoMulti";
import request from "@/utils/request";
import { dialogDelayVisible } from "./../mixin";
//
export default {
name: "RoadNetworkFacilities",
mixins: [dialogDelayVisible],
components: {
Dialog,
Descriptions,
Video,
},
data() {
return {
activeName: "first",
deviceControlVisible: false,
data: {
deviceType: "行车诱导",
deviceStation: "k094+079",
roadName: "G35济泽高速",
direction: "1",
deviceState: "0",
deviceVendors: "XXX厂家",
},
list: [
// {
// label: "",
// key: "organizationName",
// gridColumn: "3",
// },
{
label: "高速名称",
key: "roadName",
gridColumn: "3",
},
{
label: "感知时间",
key: "occurrenceTime",
gridColumn: "3",
visible: () => this.isPerceived,
},
{
label: "桩号",
key: "stakeMark",
gridColumn: "3",
},
{
label: "事件源",
key: "stringEventSource",
gridColumn: "3",
},
{
label: "影响车道",
key: "lang",
enum: "LaneOccupancy",
gridColumn: "3",
},
{
label: "事件状态",
key: "eventState",
enum: "EventType",
gridColumn: "3",
},
{
label: "经/纬度",
key: "${longitude} / ${latitude}",
gridColumn: "5",
},
{
label: "发生时间",
key: "occurrenceTime",
gridColumn: "3",
},
{
label: "行驶方向",
key: "direction",
enum: "CameraDirectionEnum",
gridColumn: "3",
},
// {
// label: "",
// key: "endTime",
// gridColumn: "3",
// },
{
label: "事件描述",
key: "description",
gridColumn: "5",
},
],
};
},
async created() {
this.data = { ...this.dialogData };
// request({
// url: `/business/RoadNetworkFacilities/getEventInfo/${this.dialogData.id}`,
// method: "get",
// })
// .then(({ code, data }) => {
// if (code != 200) return;
// this.data = { ...data, ...this.data };
// console.log("RoadNetworkFacilities", data);
// })
// .catch((err) => { });
},
methods: {
handleClickTabs() { },
},
};
</script>
<style lang="scss" scoped>
.RoadNetworkFacilities {
width: 600px;
color: #fff;
display: flex;
flex-direction: column;
gap: 12px;
.camera-video {
flex: 1.5;
}
.header {
display: flex;
gap: 9px;
>div.video-stream {
height: 210px;
}
}
.tabs {
flex: 1;
display: flex;
flex-direction: column;
::v-deep {
.el-tabs__content {
flex: 1;
.el-tab-pane {
height: 100%;
}
}
}
}
.bottom {
margin-top: 12px;
display: flex;
gap: 9px;
align-items: center;
justify-content: end;
>div {
font-size: 16px;
padding: 6px 12px;
}
}
}
</style>

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

@ -45,6 +45,7 @@ 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 RoadNetworkFacilities from "./../Dialogs/RoadNetworkFacilities/index.vue";
import SmartDevice from "./../Dialogs/SmartDevice/index.vue";
import SolarEnergy from "./../Dialogs/SolarEnergy/index.vue";
import Intermodulation from "./../Dialogs/Intermodulation/index.vue";
@ -69,7 +70,8 @@ export default {
SolarEnergy,
Intermodulation,
GuardrailCollision,
FatigueWakesUp
FatigueWakesUp,
RoadNetworkFacilities
},
data() {
return {

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

@ -2,10 +2,11 @@ import {
getDeviceList,
getEventTopicList,
getPerceiveEventList,
getRoadNetworkFacilitiesList,
} from "./httpList";
import { delay } from "@screen/utils/common";
import { Message } from "element-ui";
import { EventTopics } from "@screen/utils/enum.js";
import { EventTopics, RoadNFTopics } from "@screen/utils/enum.js";
import { debounce, cloneDeep, find } from "lodash";
import Vue from "vue";
@ -84,6 +85,7 @@ export const lngLatMap = {}; //优化 缩略图 + 地图 复用lngLatmap
export function getHandleDeviceType(item) {
if (DeviceForMap[item.title]) return "地图路测设备/map";
if (EventTopics[item.title]) return "地图事件专题/map";
if (RoadNFTopics[item.title]) return "路网设施/map";
}
let debounceNoneLngLatMessage = debounce(() => {
@ -245,6 +247,75 @@ export const eventMap = {
cacheRemoveFunc[`地图事件专题/${item.title}`]?.();
},
// 路网设施 需要在地图显示的
async "路网设施/map"(item, filterData, isDefault, cb) {
const deviceType = RoadNFTopics[item.title];
let loadingMessage;
if (!isDefault) {
loadingMessage = Message.info({
message: `${item.title}路网设施位置加载中...`,
duration: 0,
customClass: "loading-message",
iconClass: "el-icon-loading",
});
}
console.log("deviceType", deviceType);
const data = await getRoadNetworkFacilitiesList(deviceType, filterData)
.then(async (data) => {
await delay(600);
data.forEach((item) => {
if (item.otherConfig) {
let otherConfig = JSON.parse(item.otherConfig);
item.latitude = otherConfig.dimension
item.longitude = otherConfig.longitude
}
});
return data;
})
.catch(() => {});
loadingMessage?.close();
if (!data) return this.emitter.emit("selectedCompleted", item);
if (!data.length && !isDefault) {
this.emitter.emit("selectedCompleted", item);
return Message.warning(`没有${item.title}路网设施数据!`);
}
eventMap[`路网设施/map_close`](item);
const cbCall = () => cb?.(item, { deviceType: `路网设施_${deviceType}` });
cbCall();
const options = {
stateCallback: () => true,
item,
};
let removeData = data.map((item) =>
resolveDataOptions.call(
this,
item,
options,
"RoadNetworkFacilities",
isDefault
)
);
addDataPreHandle(removeData);
markerClusterIns.addData(removeData, isDefault);
this.emitter.emit("selectedCompleted", item);
cacheRemoveFunc[`路网设施/${item.title}`] = () => {
cbCall();
removeDataPreHandle(removeData);
markerClusterIns.removeData(removeData);
};
},
"路网设施/map_close"(item) {
cacheRemoveFunc[`路网设施/${item.title}`]?.();
},
// 感知事件
async "事件专题/感知事件"(item, filterData, isDefault, cb) {
let loadingMessage;

38
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/httpList.js

@ -409,3 +409,41 @@ export function getPerceiveEventList(data = {}, options = {}) {
});
});
}
/**
* 路网设施 列表 根据类型获取
* @param {number} facilityType
*/
export function getRoadNetworkFacilitiesList(facilityType, options = {}) {
return new Promise((resolve, reject) => {
if (!facilityType) {
Message.error(`事件加载失败!`);
return reject();
}
const { stakeMark } = options;
let url = `/business/facility/query?facilityType=${facilityType}`;
if (stakeMark) {
let formatStartStakeMark = `K${padZero(stakeMark[0])}%2B${padZero(
stakeMark[1]
)}`;
url += `&stakeMark=${formatStartStakeMark}`;
}
request({
url: url,
method: "get",
})
.then(({ code, data }) => {
if (code != 200) {
reject();
return Message.error(`事件加载失败!`);
}
resolve(data);
})
.catch(() => {
Message.error(`事件加载失败!`);
reject();
});
});
}

38
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DispatchLiaison/StatsDialogVisible/index.vue

@ -22,11 +22,13 @@
</el-table-column>
<el-table-column label="人员" align="center">
<template slot-scope="scope">
<el-checkbox-group v-model="form.personnel">
<el-checkbox-group v-model="form.employees">
<el-checkbox
v-for="item in scope.row.shiftsMap"
:label="item.shiftsName"
></el-checkbox>
v-for="item in scope.row.employeesMap"
:key="item.id"
:label="item.id"
>{{ item.name }}</el-checkbox
>
</el-checkbox-group>
<!-- <span v-for="item in scope.row.shiftsMap">
{{ item.shiftsName }}</span
@ -38,8 +40,10 @@
<el-checkbox-group v-model="form.vehicle">
<el-checkbox
v-for="item in scope.row.vehiclesMap"
:label="item.vehiclePlate + ' -' + item.vehicleText"
></el-checkbox>
:key="item.id"
:label="item.id"
>{{ item.vehiclePlate + item.vehicleText }}</el-checkbox
>
</el-checkbox-group>
<!-- <span v-for="item in scope.row.vehiclesMap">
{{ item.vehiclePlate }}</span
@ -57,7 +61,7 @@
>
取消
</Button>
<Button @click.native="handleSubmit" :loading="submitting"> 确定 </Button>
<Button @click.native="handleSubmit" :loading="submitting"> 确定</Button>
</template>
</Dialog>
</template>
@ -66,9 +70,8 @@
import Dialog from "@screen/components/Dialog/index";
import InputSearch from "@screen/components/InputSearch/index.vue";
import Table from "@screen/components/Table.vue";
import { selectTollStation } from "@/api/event/governanceAnalysis";
import request from "@/utils/request";
import Button from "@screen/components/Buttons/Button.vue";
import { postUpdateSource } from "@/api/commandDispatch";
export default {
name: "StatsDetail",
components: {
@ -84,10 +87,18 @@ export default {
props: {
visible: Boolean,
data: Array,
employees: Array,
vehicle: Array,
id: Number,
},
data() {
return {
form: { personnel: [], vehicle: [] },
form: {
dispatchId: this.id,
employees: this.employees,
vehicle: this.vehicle,
},
submitting: false,
};
},
computed: {
@ -102,7 +113,12 @@ export default {
},
methods: {
handleSubmit() {},
handleSubmit() {
this.form.dispatchId = this.id;
postUpdateSource(this.form).then((res) => {
this.$emit("handleRefresh");
});
},
},
mounted() {},
};

139
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DispatchLiaison/index.vue

@ -8,58 +8,49 @@
<div class="dispatch-content">
<div class="dispatch-item">
<span class="label">业务单位</span>
<span class="value">{{
dispatchData.deptName ? dispatchData.deptName : "-"
}}</span>
<div class="value">
{{ dispatchData.deptName ? dispatchData.deptName : "-" }}
</div>
</div>
<div class="dispatch-item">
<span class="label">值班领导</span>
<span class="value" v-for="item in dispatchData.shifts">
姓名{{ item.shiftsName ? item.shiftsName : "-" }} 电话{{
item.shiftsNumber ? item.shiftsNumber : "-"
}}</span
>
<!-- <div>
<span class="label">手机号</span>
<span class="value">{{
dispatchData.shiftsNumber ? dispatchData.shiftsNumber : "-"
}}</span>
</div> -->
</div>
<div class="dispatch-item">
<span class="label">调度人员</span>
<span class="value" v-for="item in dispatchData.shiftsMap">{{
dispatchData.shiftsMap.length > 0 ? item.shiftsName : "-"
}}</span>
<div class="value">
<div v-for="item in dispatchData.shifts" class="value-item">
<span class="shiftsName">{{ item.shiftsName }}</span>
<span class="shiftsNumber">{{ item.shiftsNumber }}</span>
<span class="scheduling">
{{ item.scheduling == 1 ? "白班" : "夜班" }}</span
>
</div>
</div>
</div>
<div class="dispatch-item">
<div>
<span class="label">路管人员</span>
<span class="value">{{
dispatchData.name ? dispatchData.name : "-"
}}</span>
</div>
<div>
<span class="label">手机号</span>
<span class="value">{{
dispatchData.contactNumber ? dispatchData.contactNumber : "-"
}}</span>
<span class="label">路管人员</span>
<div class="value">
<div v-for="item in staff" class="value-item">
<span class="shiftsName">{{ item.resourceName }}</span>
<span class="shiftsNumber">{{ item.resourceValue }}</span>
</div>
</div>
</div>
<div class="dispatch-item">
<span class="label">救援车辆 </span>
<span class="value" v-for="item in dispatchData.vehiclesMap">{{
dispatchData.vehiclesMap.length > 0
? item.vehiclePlate + item.vehicleText
: "-"
}}</span>
<span class="label">救援车辆</span>
<div class="value">
<div v-for="item in vehicle" class="value-item">
<span class="shiftsName">{{ item.resourceValue }}</span>
<span class="shiftsNumber">{{ item.vehicleText }}</span>
</div>
</div>
</div>
</div>
<StatsDialogVisible
:visible="statsDialogVisible"
:data="dispatchList"
:employees="employeesChoice"
:vehicle="vehiclesChoice"
:id="dispatchData.id"
@update:value="handleClose"
@handleRefresh="getCommandDispatch"
/>
</Card>
</template>
@ -87,12 +78,15 @@ export default {
dispatchData: [],
dispatchList: [],
vehicleTypeList: [],
staff: [],
vehicle: [],
statsDialogVisible: false,
employeesChoice: [],
vehiclesChoice: [],
};
},
methods: {
handleClick() {
console.log("-------");
this.statsDialogVisible = true;
},
handleClose() {
@ -104,20 +98,39 @@ export default {
id: "96b9918efc01488cb22fa1d9d3236dfd",
};
postCommandDispatch(data).then((res) => {
// res.data.forEach((element) => {
// if (element.vehiclesMap.length > 0) {
// element.vehiclesMap.forEach((item) => {
// this.vehicleTypeList.forEach((i) => {
// if (item.vehicleType == i.dictValue) {
// item.vehicleText = "" + i.dictLabel + "";
// }
// });
// });
// }
// });
// this.dispatchList = res.data;
res.data.listData?.forEach((element) => {
if (element.vehiclesMap.length > 0) {
element.vehiclesMap.forEach((item) => {
this.vehicleTypeList.forEach((i) => {
if (item.vehicleType == i.dictValue) {
item.vehicleText = "(" + i.dictLabel + ")";
}
});
});
}
});
this.dispatchList = res.data.listData;
this.dispatchData = res.data.resource;
console.log(" this.dispatchData", this.dispatchData);
res.data.resource.resource.forEach((element) => {
if (element.dispatchType == 1) {
this.staff.push(element);
} else {
this.vehicle.push(element);
}
});
this.vehicleTypeList.forEach((i) => {
this.vehicle.forEach((item) => {
if (item.resourceName == i.dictValue) {
item.vehicleText = "(" + i.dictLabel + ")";
}
});
});
res.data.employeesChoice.forEach((element) => {
this.employeesChoice.push(element.id);
});
res.data.vehiclesChoice.forEach((element) => {
this.vehiclesChoice.push(element.id);
});
});
},
getVehicleTypeList() {
@ -157,16 +170,28 @@ export default {
width: 100%;
align-items: flex-start;
margin: 15px 0;
div {
width: 50%;
}
.label {
font-size: 14px;
font-size: 13px;
color: #38d2e7;
}
.value {
font-size: 14px;
width: 85%;
font-size: 13px;
color: #fff;
display: flex;
flex-wrap: wrap;
.value-item {
width: 50%;
margin-bottom: 5px;
.scheduling {
margin-left: 5px;
}
// display: flex;
// .name {
// width: 50px;
// }
}
}
}
}

356
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DisposalProcess/DialogVisible/index.vue

@ -1,356 +0,0 @@
<template>
<Dialog v-model="modelVisible" title="收费站管制统计" style="width: 100%">
</Dialog>
</template>
<script>
import Dialog from "@screen/components/Dialog/index";
import InputSearch from "@screen/components/InputSearch/index.vue";
import Table from "@screen/components/Table.vue";
import { selectTollStation } from "@/api/event/governanceAnalysis";
import request from "@/utils/request";
export default {
name: "StatsDetail",
components: {
Dialog,
InputSearch,
Table,
},
model: {
prop: "visible",
event: "update:value",
},
props: {
visible: Boolean,
},
data() {
return {
num: 0,
tableData: [],
weatherNum: [],
startTime: "",
endTime: "",
pickerOptions: {
disabledDate(time) {
return time.getTime() > Date.now();
},
},
searchType: 1,
controlType: 1,
facilityIds: [],
facilityTableData: [],
searchFormList: [
{
label: "查询条件:",
key: "searchType",
required: true,
isAlone: true,
type: "RadioGroup",
default: 1,
options: {
type: "circle",
options: [
{
key: 1,
label: "站点",
},
{
key: 2,
label: "原因",
},
],
},
},
{
label: "事件类型:",
key: "controlType",
required: true,
isAlone: true,
type: "RadioGroup",
visible: (data) => {
if (data.searchType == 2) {
return true;
}
},
default: 1,
options: {
type: "circle",
options: [
{
key: 1,
label: "收费站封闭",
},
{
key: 2,
label: "收费站限行",
},
],
},
},
{
label: "选择站点:",
key: "facilityId",
required: true,
type: "Select",
options: {
multiple: true,
options: [],
},
default: [],
visible: (data) => {
if (data.searchType == 1) {
return true;
}
},
},
{
label: "日期:",
key: "date",
required: true,
type: "datePicker",
default: "",
options: {
pickerOptions: {
disabledDate(time) {
return time.getTime() > Date.now();
},
},
valueFormat: "yyyy-MM-dd",
type: "daterange",
},
},
],
queryParams: {},
};
},
computed: {
modelVisible: {
get() {
return this.visible;
},
set(val) {
this.$emit("update:value", val);
},
},
},
methods: {
getFacilityList() {
Promise.allSettled([
//
request({
url: `/business/facility/query`,
method: "get",
}),
]).then((res) => {
if (res[0].status === "fulfilled" && res[0].value.code == 200) {
// this.searchFormList[2].options.options = res[0].value.data.map(
// (item) => ({
// key: item.id,
// label: item.facilityName,
// })
// );
let dataList = [];
res[0].value.data.forEach((item) => {
if (item.facilityType == 1) {
dataList.push({
key: item.id,
label: item.facilityName,
});
}
});
this.searchFormList[2].options.options = dataList;
this.facilityIds = res[0].value.data.map((item) => item.id);
this.searchFormList[2].default = dataList.map((item) => item.key);
console.log(56, this.searchFormList[2].default);
let currentMonth = moment().format("YYYY-MM");
let currentDate = moment().format("YYYY-MM-DD");
this.queryParams = {
searchType: 1,
facilityId: this.facilityIds,
date: [currentMonth + "-01", currentDate],
};
this.searchFormList[3].default = [currentMonth + "-01", currentDate];
this.getSelectTollStation(this.queryParams);
}
});
},
// handleResetForm(data) {
// this.getSelectTollStation(data);
// },
handleSearch(data, value) {
console.log(888, data, value);
if (value == "reset") {
data = this.queryParams;
}
this.getSelectTollStation(data);
},
arraySpanMethod({ row, column, rowIndex, columnIndex }) {
if (this.searchType == 2) {
if (!row.causeTypeName) {
if (columnIndex === 0) {
return [1, 2];
} else if (columnIndex === 1) {
return [0, 0];
}
}
if (row.controlCauseName === "恶劣天气") {
if (columnIndex === 0) {
console.log(this.weatherNum.length);
if (rowIndex === 0) {
return [this.weatherNum.length, 1];
} else if (rowIndex <= this.weatherNum.length) {
return [0, 0];
}
// if (rowIndex === 2) {
// return [7, 1];
// }
// else if (rowIndex === 3) {
// return [0, 0];
// } else if (rowIndex === 4) {
// return [0, 0];
// }
// else if (rowIndex === 5) {
// return [0, 0];
// }
// else if (rowIndex === 6) {
// return [0, 0];
// }
// else if (rowIndex === 7) {
// return [0, 0];
// }
// else if (rowIndex === 8) {
// return [0, 0];
// }
}
// this.weatherNum = 0
}
}
},
getSelectTollStation(data) {
let startTime = "";
let endTime = "";
if (data) {
startTime = data.date[0] + " 00:00:00";
endTime = data.date[1] + " 23:59:59";
} else {
startTime = new Date("2024-01-01 11:12:21");
startTime = new Date("2024-01-26 11:12:36");
}
var formData = new FormData();
this.searchType = data.searchType;
this.controlType = data.controlType;
if (data.searchType == 1) {
formData.append("facilityId", data.facilityId);
} else {
formData.append("controlType", data.controlType);
}
formData.append("searchType", data.searchType);
formData.append("startTime", startTime);
formData.append("endTime", endTime);
let weatherData = [];
let otherData = [];
selectTollStation(formData).then((res) => {
if (data.searchType == 2) {
this.weatherNum = [];
res.data.forEach((item) => {
if (item.causeTypeName) {
this.weatherNum.push(item.causeTypeName);
weatherData.push(item);
} else {
otherData.push(item);
}
});
this.tableData = weatherData.concat(otherData);
} else {
res.data.forEach((item) => {
item.total =
item.facilityClose +
item.facilityRestriction +
item.facilityInterval;
});
this.facilityTableData = res.data;
}
});
},
},
mounted() {
this.getFacilityList();
},
};
</script>
<style lang="scss" scoped>
.dialog {
min-height: 800px;
}
.search {
display: flex;
flex-direction: row-reverse;
}
::v-deep .is-scrolling-none {
background: #0b6581;
}
::v-deep .el-table__empty-text {
color: #3ae0f8;
}
.StatsDetail {
// height: 770px;
margin: 20px 0;
width: 100%;
display: flex;
gap: 5px;
}
.el-table {
border: 1px solid #07aec6;
background: #0b6581;
}
::v-deep .el-table .el-table__header-wrapper th,
.el-table .el-table__fixed-header-wrapper th {
background: #0b6581;
border: 1px solid #07aec6;
}
::v-deep .el-table th.el-table__cell > .cell {
color: #3de8ff;
}
::v-deep .el-table thead.is-group th.el-table__cell {
background: #0b6581;
border: 1px solid #07aec6;
}
// ::v-deep .el-table th.el-table__cell.is-leaf,
::v-deep .el-table td.el-table__cell {
border: 1px solid #07aec6;
background: #1b586d;
color: #fff;
}
::v-deep .el-table tr {
border: 1px solid #07aec6;
background-color: #0b6581;
}
::v-deep
.el-table--enable-row-hover
.el-table__body
tr:hover
> td.el-table__cell {
background: #1b586d;
border: 1px solid #07aec6;
}
::v-deep .el-table::before,
.el-table--group::after,
.el-table--border::after {
background: none;
}
</style>

54
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DisposalProcess/index.vue

@ -1,5 +1,4 @@
<template>
<div>
<Card class="DisposalProcess" title="处置过程">
<template #title-suffix>
<ButtonGradient class="title-button" @click="handleEventRelieve">
@ -32,7 +31,7 @@
<TimeLine2 :data="timeLine2List" style="flex: 1" />
<div v-if="!timeLine2List.length" class="no-data">暂无数据</div>
<div class="bottom">
<ElSelect v-model="processId" placeholder="请选择关键点">
<ElSelect v-model="processId" clearable placeholder="请选择关键点">
<ElOption
v-for="item in options"
:key="item.nodeNode"
@ -68,6 +67,15 @@
>
<el-button class="input">点击上传</el-button>
</el-upload>
<ElSelect v-model="context" clearable placeholder="请选择常用语">
<ElOption
v-for="item in phrasesOptions"
:key="item"
:label="item"
:value="item"
>
</ElOption>
</ElSelect>
<ButtonGradient class="title-button special-button" @click="onSubmit">
发送
</ButtonGradient>
@ -76,12 +84,11 @@
</ButtonGradient> -->
</div>
</Card>
<DialogVisible
<!-- <DialogVisible
:visible="dialogVisible"
:data="dispatchList"
@update:value="handleClose"
/>
</div>
/> -->
</template>
<script>
@ -91,7 +98,7 @@ import RadioGroup from "@screen/components/FormConfig/components/RadioGroup/inde
import { getToken } from "@/utils/auth";
import TimeLine1 from "@screen/components/TimeLine/TimeLine1/index";
import TimeLine2 from "@screen/components/TimeLine/TimeLine2/index";
import DialogVisible from "./DialogVisible/index.vue";
// import DialogVisible from "./DialogVisible/index.vue";
import {
getProcessNode,
getProcessList,
@ -100,21 +107,21 @@ import {
postNoSkipClear,
} from "@/api/commandDispatch";
import { provideMixin } from "./../../mixin";
// import { provideMixin } from "./../../mixin";
import { timeLine2List } from "./data";
import request from "@/utils/request";
export default {
name: "DisposalProcess",
inject: ["adpScale"],
mixins: [provideMixin],
// mixins: [provideMixin],
components: {
Card,
ButtonGradient,
TimeLine1,
TimeLine2,
RadioGroup,
DialogVisible,
// DialogVisible,
},
emit: ["fullHeight"],
data() {
@ -129,6 +136,7 @@ export default {
options: [],
processId: "",
context: "",
phrasesOptions: [],
headers: {
Authorization: "Bearer " + getToken(),
},
@ -138,6 +146,17 @@ export default {
imageUrl: "",
};
},
watch: {
processId(newVlaue, oldValue) {
this.options.forEach((element) => {
if (newVlaue == element.nodeNode) {
if (element.commonPhrases) {
this.phrasesOptions = element.commonPhrase.split(",");
}
}
});
},
},
methods: {
filterDistance(distance) {
return (1 / this.adpScale.scaleX) * distance;
@ -160,15 +179,15 @@ export default {
isActive: item.status == 1 ? true : false,
};
});
this.options = result.data.filter((item) => {
item.status == 0;
return item;
});
let index = result.data.findLastIndex((item) => item.status == 1);
this.options = result.data.slice(index + 1);
});
},
//
async detailChange(id) {
async disposalRecords(id) {
let processIdMap = {};
getProcessList(id).then((result) => {
console.log("处置过程记录", result);
@ -184,6 +203,7 @@ export default {
: null,
name: item.operator,
desc: item.context,
source: item.source,
// posts: ''
};
});
@ -219,7 +239,7 @@ export default {
postProcess(data).then((result) => {
if (result.code != 200) return [];
this.getProcess();
this.detailChange(this.eventId);
this.disposalRecords(this.eventId);
});
} else {
this.$message.warning("调度指令不能为空");
@ -254,7 +274,7 @@ export default {
},
async mounted() {
this.getProcess();
await this.detailChange(this.eventId);
await this.disposalRecords(this.eventId);
},
};
</script>
@ -281,7 +301,7 @@ export default {
.bottom {
display: grid;
grid-template-columns: 0.5fr auto 1fr 90px;
grid-template-columns: 0.5fr auto 1fr 130px 90px;
width: 100%;
gap: 6px;
}

4
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/EventInformation/components/EditEventInformationDialog/data.js

@ -945,7 +945,7 @@ export const tabConfigList = [
},
{
label: "限制类型:",
key: "dcEventAccident.limitedType",
key: "dcEventTrafficControl.limitedType",
required: true,
type: "select",
options: {
@ -963,7 +963,7 @@ export const tabConfigList = [
},
{
label: "车辆类型:",
key: "dcEventAccident.vehicleType",
key: "dcEventTrafficControl.vehicleType",
required: true,
type: "select",
options: {

219
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/EventInformation/components/EditEventInformationDialog/index.vue

@ -1,10 +1,10 @@
<template>
<Dialog v-model="modelVisible" title="修改事件信息" width="1100px" top="10%">
<div class="EditEventInformationDialog">
<Form class="form" :formList="formConfigList" v-model="fData" labelWidth="120px" />
<Form class="form" ref="FormConfigRef" :formList="formConfigList" v-model="fData" labelWidth="120px" />
<div class="footer">
<Button @click.native="onSubmit">保存</Button>
<Button @click.native="onSubmit" :loading="submitting">保存</Button>
<Button style="background: #c9c9c9" @click.native="modelVisible = false">关闭</Button>
</div>
</div>
@ -17,6 +17,7 @@ import Form from "@screen/components/FormConfig";
import Button from "@screen/components/Buttons/Button.vue";
import request from "@/utils/request";
import { tabConfigList } from "./data.js";
import { Message } from "element-ui";
const eventInfo = {
id: "60f022d95a7c4b6cada2d780246543d8",
@ -132,9 +133,10 @@ export default {
},
data() {
return {
formConfigList: {},
// tabConfigList,
formConfigList: [],
submitting: false,
fData: {},
resultEventData: {},
eventId: '1a91d65cc31f4a9d90122888edb31043',
roads: [],
direction: [],
@ -159,78 +161,161 @@ export default {
},
methods: {
initData() {
let configList = tabConfigList.find(item => item.label == '交通事故')
this.formConfigList = configList.formConfig.list
let info = eventInfo;
if (info.stakeMark instanceof Array) {
async initData() {
let infoData = await request({
url: `/dc/system/event/eventSubclass/1/60f022d95a7c4b6cada2d780246543d8`,//
method: "get",
})
if (infoData.code != 200) return Message.error(infoData?.msg);
this.resultEventData = { ...infoData.data };
let info = infoData.data;
if (typeof info.stakeMark == 'string') {
let numbers = info.stakeMark.match(/\d+/g).map(Number);
// console.log('numbers', numbers);
info.stakeMark = numbers;
}
this.fData = info;
let configList = tabConfigList.find(item => item.label == this.fData.eventName)
this.formConfigList = configList.formConfig.list
this.fData = info;
// Promise.all([
// //
// request({
// url: `/business/road/query`,
// method: "get",
// })
// .then((result) => {
// if (result.code != 200) return Message.error(result?.msg);
// result.data.forEach((it) => {
// this.roads.push({ key: it.id, label: it.roadName });
// });
// })
// .catch((err) => {
// Message.error("4", err);
// }),
// //
// request({
// url: `/system/dict/data/type/iot_event_direction`,
// method: "get",
// })
// .then((result) => {
// if (result.code != 200) return Message.error(result?.msg);
// result.data.forEach((it) => {
// this.direction.push({ key: it.dictValue, label: it.dictLabel });
// });
// })
// .catch((err) => {
// Message.error("5", 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: it.facilityType,
// })
// );
// })
// .catch((err) => {
// console.log("err", err);
// Message.error("6", err);
// }),
// ]);
// request({
// url: `/dc/system/event/eventSubclass/1/60f022d95a7c4b6cada2d780246543d8`,//
// method: "get",
// }).then(async (result) => {
// if (result.code != 200) return Message.error(result?.msg);
// // this.formData = result.data;
// })
await Promise.all([
//
request({
url: `/business/road/query`,
method: "get",
})
.then((result) => {
if (result.code != 200) return Message.error(result?.msg);
this.roads = [];
result.data.forEach((it) => {
this.roads.push({ key: it.id, label: it.roadName });
});
})
.catch((err) => {
Message.error("查询失败4", err);
}),
//
request({
url: `/system/dict/data/type/iot_event_direction`,
method: "get",
})
.then((result) => {
if (result.code != 200) return Message.error(result?.msg);
this.direction = []
result.data.forEach((it) => {
this.direction.push({ key: it.dictValue, label: it.dictLabel });
});
})
.catch((err) => {
Message.error("查询失败5", 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);
this.lwss = [];
result.data.forEach((it) =>
this.lwss.push({
key: it.id,
label: it.facilityName,
type: it.facilityType,
})
);
})
.catch((err) => {
console.log("err", err);
Message.error("查询失败6", err);
}),
])
this.formConfigList.forEach((it) => {
if (it.key == "direction") {
it.options.options = this.direction;
}
if (it.key == "roadId") {
it.options.options = this.roads;
}
if (it.key == "dcEventServiceArea.facilityId") {
it.options.options = this.lwss.filter((ss) => ss.type == 6);
}
});
},
onSubmit() {
this.modelVisible = false;
this.$refs.FormConfigRef.validate().then((formData) => {
this.submitting = true;
let eventType = this.resultEventData.eventType;
formData.eventType == eventType;
if ((eventType == 1 || eventType == 2) && Array.isArray(formData.lang)) {
formData.lang = formData.lang.join(",");
}
if (eventType == 3 && formData.dcEventTrafficControl.facilityId instanceof Array) {
let ids = formData.dcEventTrafficControl.facilityId;
formData.dcEventTrafficControl.facilityIds = ids
formData.dcEventTrafficControl.facilityId = ''
}
if (formData.endStakeMark && formData.endStakeMark[0] != null) {
let endStakeMark = formData.endStakeMark;
let strMark = endStakeMark && endStakeMark.length > 0 ? "K" + endStakeMark[0] + "+" + endStakeMark[1] : "";
if (eventType == 4) {
formData.dcEventTrafficCongestion.endStakeMark = strMark;
}
if (eventType == 7) {
formData.dcEventConstruction.endStakeMark = strMark;
}
if (eventType == 10) {
formData.dcEventAbnormalWeather.endStakeMark = strMark;
}
formData.endStakeMark = "";
} else {
formData.endStakeMark = "";
}
let stakeMark = formData.stakeMark;
// console.log('formData', {
// ...formData,
// id: this.resultEventData.id,
// eventState: this.resultEventData.eventState,
// stakeMark: (stakeMark && stakeMark[0] != null) ? ((stakeMark && stakeMark.length > 0) ? ('K' + stakeMark[0] + '+' + stakeMark[1]) : '') : '',
// })
// this.submitting = false;
// return;
request({
url: `/dc/system/event`,
method: "put",
data: {
...formData,
id: this.resultEventData.id,
eventState: this.resultEventData.eventState,
stakeMark:
stakeMark && stakeMark[0] != null
? stakeMark && stakeMark.length > 0
? "K" + stakeMark[0] + "+" + stakeMark[1]
: ""
: "",
},
})
.then((result) => {
if (result.code != 200) return Message.error(result?.msg);
Message.success("提交成功");
this.modelVisible = false;
})
.catch(() => {
Message.error("提交失败");
})
.finally(() => {
this.submitting = false;
});
});
}
}
};

644
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/TrafficControl/components/AddControlEventInfoDialog/data.js

@ -0,0 +1,644 @@
import * as PresetFormItems from "@screen/pages/control/event/event/FormEvent/PresetFormItems.js";
import request from "@/utils/request";
import { Message } from "element-ui";
export const tabConfigList = [
{
key: "TrafficControl",
label: "交通管制",
formConfig: {
formOptions: {
column: 2,
},
list: [
{
label: "管制设施:",
key: "eventSubclass",
type: "RadioGroup",
isAlone: true,
required: true,
default: "3-1",
options: {
activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)",
options: [
{
key: "3-1",
label: "主线",
},
{
key: "3-2",
label: "收费站",
},
{
key: "3-3",
label: "立交",
},
{
key: "3-4",
label: "服务区",
},
{
key: "3-5",
label: "其他",
},
],
},
ons: {
input(value, ...args) {
const { data, formList } = args.slice(-1)[0];
const classify = formList.find(
(it) => it.key == "dcEventTrafficControl.classify"
);
let ss = {
"3-1": "主线",
"3-2": "收费站",
"3-3": "立交",
"3-4": "服务区",
};
let ad = {
1: [
{
key: "1",
label: `${ss[value]}关闭`,
},
],
2: [
{
key: "2",
label: "主线限行",
},
{
key: "3",
label: "主线间隔放行",
},
{
key: "4",
label: "主线并道",
},
{
key: "5",
label: "主线限速",
},
],
};
classify.options.options =
ad[data.dcEventTrafficControl.controlType];
if (data.dcEventTrafficControl) {
data.dcEventTrafficControl.facilityId = null;
}
let facilityType = 1;
if (value == "3-2") {
facilityType = 1;
} else if (value == "3-3") {
facilityType = 3;
} else if (value == "3-4") {
facilityType = 6;
}
if (value && value != "3-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 == "dcEventTrafficControl.facilityId") {
it.options.options = lwss;
}
});
})
.catch((err) => {
console.log("err", err);
Message.error("查询失败1", err);
});
}
},
},
},
{
label: "管制分类:",
key: "dcEventTrafficControl.controlType",
type: "RadioGroup",
isAlone: true,
required: true,
default: "1",
options: {
activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)",
options: [
{
key: 1,
label: "封闭",
},
{
key: 2,
label: "限行",
},
],
},
ons: {
input(value, ...args) {
const { data, formList } = args.slice(-1)[0];
const classify = formList.find(
(it) => it.key == "dcEventTrafficControl.classify"
);
const measure = formList.find(
(it) => it.key == "dcEventTrafficControl.measure"
);
let ss = {
"3-1": "主线",
"3-2": "收费站",
"3-3": "立交",
"3-4": "服务区",
"3-5": "其他",
};
let ad = {
1: [
{
key: "1",
label: `${ss[data.eventSubclass]}关闭`,
},
],
2: [
{
key: "2",
label: "主线限行",
},
{
key: "3",
label: "主线间隔放行",
},
{
key: "4",
label: "主线并道",
},
{
key: "5",
label: "主线限速",
},
],
};
let cs = {
1: [
{
value: "1",
label: "临时关闭",
},
],
2: [
{
value: "2",
label: "限行车辆",
},
{
value: "3",
label: "限行车道",
},
{
value: "4",
label: "限行车道且限行车辆",
},
{
value: "5",
label: "间隔放行",
},
{
value: "6",
label: "并道行驶",
},
{
value: "7",
label: "限速",
},
],
};
measure.options.options = cs[value];
classify.options.options = ad[value];
},
},
},
{
label: "分类:",
key: "dcEventTrafficControl.classify",
type: "RadioGroup",
isAlone: true,
required: true,
default: "1",
options: {
activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)",
options: [
{
key: "1",
label: "主线关闭",
},
],
},
},
{
label: "分类原因:",
key: "dcEventTrafficControl.controlCause",
type: "RadioGroup",
isAlone: true,
required: true,
default: "1",
options: {
activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)",
options: [
{
key: "1",
label: "车流量大",
},
{
key: "2",
label: "交通事故",
},
{
key: "3",
label: "恶劣天气",
},
{
key: "4",
label: "施工",
},
{
key: "5",
label: "警备任务",
},
{
key: "6",
label: "其他",
},
],
},
ons: {
input(value, ...args) {
const { formList } = args.slice(-1)[0];
const config = formList.find(
(it) => it.key == "dcEventTrafficControl.causeType"
);
let ad = {
3: [
{
value: "3-1",
label: "雨",
},
{
value: "3-2",
label: "雪",
},
{
value: "3-3",
label: "雾",
},
{
value: "3-4",
label: "道路积水",
},
{
value: "3-5",
label: "道路湿滑",
},
{
value: "3-6",
label: "道路结冰",
},
{
value: "3-7",
label: "沙尘暴",
},
],
4: [
{
value: "4-1",
label: "专项工程施工",
},
{
value: "4-2",
label: "改扩建工程施工",
},
{
value: "4-3",
label: "其他施工",
},
],
};
config.options.options = ad[value];
},
},
},
PresetFormItems.isInTunnel,
{
label: "原因类型:",
key: "dcEventTrafficControl.causeType",
type: "select",
options: {
options: [],
},
visible: (data) => {
if (
data?.dcEventTrafficControl.controlCause == "3" ||
data?.dcEventTrafficControl.controlCause == "4"
) {
return true;
}
return false;
},
},
PresetFormItems.freeway,
PresetFormItems.direction,
PresetFormItems.emptyLine,
{
label: "出入口:",
key: "dcEventTrafficControl.exitsInlets",
type: "RadioGroup",
isAlone: true,
required: true,
default: "2",
options: {
activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)",
options: [
{
key: "1",
label: "出口",
},
{
key: "2",
label: "入口",
},
],
},
visible: (data) => {
if (data?.eventSubclass == "3-2" || data?.eventSubclass == "3-4") {
return true;
}
return false;
},
},
{
label: "收费站:",
key: "dcEventTrafficControl.facilityId",
type: "select",
isAlone: false,
required: true,
options: {
options: [],
multiple: true,
},
visible: (data) => {
if (data?.eventSubclass == "3-2") {
return true;
}
return false;
},
},
{
label: "立交桥:",
key: "dcEventTrafficControl.facilityId",
type: "select",
isAlone: false,
required: true,
options: {
options: [],
multiple: true,
},
visible: (data) => {
if (data?.eventSubclass == "3-3") {
return true;
}
return false;
},
ons: {
change(value, ...args) {
const { formList } = args.slice(-1)[0];
//匝道
request({
url: `/system/ramp/listAll?facilityId=${value}`,
method: "get",
})
.then((result) => {
if (result.code != 200) return Message.error(result?.msg);
let zd = [];
result.rows.forEach((it) =>
zd.push({ key: it.id, label: it.rampName })
);
// console.log("zd", zd);
formList.forEach((it) => {
if (it.key == "dcEventTrafficControl.rampId") {
console.log("it", it);
it.options.options = zd;
}
});
})
.catch((err) => {
console.log("err", err);
Message.error("查询失败3", err);
});
},
},
},
{
label: "匝道:",
key: "dcEventTrafficControl.rampId",
type: "select",
isAlone: false,
required: true,
options: {
options: [],
},
visible: (data) => {
if (data?.eventSubclass == "3-3") {
return true;
}
return false;
},
},
{
label: "服务区:",
key: "dcEventTrafficControl.facilityId",
type: "select",
isAlone: false,
required: true,
options: {
options: [],
},
visible: (data) => {
if (data?.eventSubclass == "3-4") {
return true;
}
return false;
},
},
{
label: "措施:",
required: true,
key: "dcEventTrafficControl.measure",
type: "select",
options: {
options: [
{
value: "1",
label: "临时关闭",
},
],
},
},
{
label: "限制类型:",
key: "dcEventTrafficControl.limitedType",
required: true,
type: "select",
options: {
options: [
{ key: "1", label: "只允许" },
{ key: "2", label: "禁止" },
],
},
visible: (data) => {
if (data?.dcEventTrafficControl.controlType == "2") {
return true;
}
return false;
},
},
{
label: "车辆类型:",
key: "dcEventTrafficControl.vehicleType",
required: true,
type: "select",
options: {
options: [
{ key: "1", label: "10座以下客车" },
{ key: "2", label: "10座以下客车(间隔放行)" },
{ key: "3", label: "19座以上客车" },
{ key: "4", label: "一型客车(不含面包车)" },
{ key: "5", label: "两客一危" },
{ key: "6", label: "三类以上班线客车" },
{
key: "7",
label: "四轴及四轴以上货车(运送生鲜果蔬、抗疫物资车辆除外)",
},
{ key: "8", label: "三轴及以上(含三轴)货车" },
{ key: "9", label: "3轴以上货车(不含危险品运输车)" },
{ key: "10", label: "3轴以上货车" },
{ key: "11", label: "四轴及以上(含四轴)货车" },
{ key: "12", label: "4轴以上货车(不含危险品运输车)" },
{ key: "13", label: "4轴以上货车" },
{ key: "14", label: "4轴以下货车" },
{ key: "15", label: "57座以上客车" },
{ key: "16", label: "五轴及以上货车" },
{ key: "17", label: "5轴以上货车" },
{ key: "18", label: "5轴以上货车(不含危险品运输车)" },
{ key: "19", label: "5轴以下货车" },
{ key: "20", label: "6座以上客车" },
{ key: "21", label: "6座以上面包车" },
{ key: "22", label: "7座以上客车" },
{ key: "23", label: "7座以下客车" },
{ key: "24", label: "8座以上客车" },
// 25- 8座以下客车
// 26- 8座以下客车(间隔放行)
// 27- 9座以上客车
// 28- 半挂货车
// 29- 车辆(不含10座以下客车)
// 30- 车辆(不含8座以下客车)
// 31- 车辆(不含小轿车)
// 32- 不可解体物品超限运输车
// 33- 不可解体物品运输车
// 34- 超长超宽超高车辆
// 35- 车辆运输车
// 36- 超限运输车
// 37- 大型货车(不含危险品运输车)
// 38- 大型货车
// 39- 大型客车
// 40- 大中型货车
// 41- 已安装ETC的客车
// 42- 已安装ETC的小型客车
// 43- 罐车
// 44- 货车
// 45- 黄牌货车
// 46- 黄牌货车(不含危险品运输车)
// 47- 黄牌货车(运送民生物资车辆除外)
// 48- 核载总质量4.5吨以上货车(运送民生物资车辆除外)
// 49- 客车(包括小轿车)
// 50- 客运车辆
// 51- 蓝牌货车
// 52- 旅游包车
// 53- 面包车
// 54- 皮卡
// 55- 全部车型
// 56- (未安装ETC)车辆
// 57- 外埠号牌车辆
// 58- 危化品运输车
// 59- 危险物品运输车
// 60- 武装押运车辆
// 61- 小轿车
// 62- 厢式货车
// 63- 小型车辆
// 64- (已安装ETC)车辆
// 65- 已安装ETC的货车
// 66- 押款车辆
// 67- 疫情防控物资运输车辆
// 68- 运输剧毒、放射性物品车辆
// 69- 运输枪支弹药、爆炸、剧毒、放射性物品车辆
// 70- 营运客车
// 71- 重型货车
// 72- 核载总质量1.8吨以上货车
// 73- 中型货车
// 74- 小型车辆限速80公里/小时、大型车辆限速70
],
},
visible: (data) => {
if (data?.dcEventTrafficControl.controlType == "2") {
return true;
}
return false;
},
},
{
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]",
},
],
},
visible: (data) => {
if (data?.eventSubclass == "3-1") {
return true;
}
return false;
},
},
PresetFormItems.startTime,
PresetFormItems.expectedEndTime,
PresetFormItems.remark,
PresetFormItems.source,
],
},
},
];

178
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/TrafficControl/components/AddControlEventInfoDialog/index.vue

@ -0,0 +1,178 @@
<template>
<Dialog v-model="modelVisible" title="新增交通管制事件" width="1100px" top="10%">
<div class="AddControlEventInfoDialog">
<Form class="form" ref="FormConfigRef" :formList="formConfigList" v-model="fData" labelWidth="120px" />
<div class="footer">
<Button style="background: #c9c9c9" @click.native="modelVisible = false">关闭</Button>
<Button :loading="submitting" @click.native="onSubmit">保存</Button>
</div>
</div>
</Dialog>
</template>
<script>
import Dialog from "@screen/components/Dialog/index";
import Form from "@screen/components/FormConfig";
import Button from "@screen/components/Buttons/Button.vue";
import request from "@/utils/request";
import { tabConfigList } from "./data.js";
export default {
name: "AddControlEventInfoDialog",
components: {
Dialog,
Form,
Button,
},
model: {
prop: "visible",
event: "close",
},
props: {
visible: Boolean,
eventSubclass: String,
controlType: Number
},
data() {
return {
formConfigList: [],
fData: {},
eventId: '',
submitting: false,
roads: [],
direction: [],
};
},
computed: {
modelVisible: {
get() {
if (this.visible) {
this.initData()
}
return this.visible;
},
set(val) {
this.$emit("close", val);
},
},
},
mounted() {
},
methods: {
async initData() {
this.formConfigList = tabConfigList[0].formConfig.list
await Promise.all([
//
request({
url: `/business/road/query`,
method: "get",
})
.then((result) => {
if (result.code != 200) return Message.error(result?.msg);
this.roads = []
result.data.forEach((it) => {
this.roads.push({ key: it.id, label: it.roadName });
});
})
.catch((err) => {
Message.error("查询失败4", err);
}),
//
request({
url: `/system/dict/data/type/iot_event_direction`,
method: "get",
})
.then((result) => {
if (result.code != 200) return Message.error(result?.msg);
this.direction = []
result.data.forEach((it) => {
this.direction.push({ key: it.dictValue, label: it.dictLabel });
});
})
.catch((err) => {
Message.error("查询失败5", err);
}),
]);
this.formConfigList.forEach((it) => {
if (it.key == "direction") {
it.options.options = this.direction;
}
if (it.key == "roadId") {
it.options.options = this.roads;
}
});
// console.log('eventSubclass',this.eventSubclass,this.controlType)
this.fData.eventSubclass = this.eventSubclass;
this.fData.dcEventTrafficControl.controlType = this.controlType;
},
onSubmit() {
this.$refs.FormConfigRef.validate().then((formData) => {
this.submitting = true;
if (formData.dcEventTrafficControl.facilityId instanceof Array) {
let ids = formData.dcEventTrafficControl.facilityId;
formData.dcEventTrafficControl.facilityIds = ids
formData.dcEventTrafficControl.facilityId = ''
}
let stakeMark = formData.stakeMark;
// console.log('formData', {
// ...formData,
// eventType: 3,
// stakeMark: (stakeMark && stakeMark[0] != null) ? ((stakeMark && stakeMark.length > 0) ? ('K' + stakeMark[0] + '+' + stakeMark[1]) : '') : '',
// })
// this.submitting = false;
// return;
request({
url: `/dc/system/event`,
method: "post",
data: {
...formData,
eventType: 3,
eventState: 0,
stakeMark: stakeMark && stakeMark[0] != null
? stakeMark && stakeMark.length > 0 ? "K" + stakeMark[0] + "+" + stakeMark[1] : "" : "",
},
})
.then((result) => {
if (result.code != 200) return Message.error(result?.msg);
Message.success("提交成功");
this.modelVisible = false;
})
.catch(() => {
Message.error("提交失败");
})
.finally(() => {
this.submitting = false;
});
});
}
}
};
</script>
<style lang="scss" scoped>
.AddControlEventInfoDialog {
gap: 9px;
width: 1050px;
height: 560px;
max-height: 900px;
display: flex;
flex-direction: column;
.form {
flex: 1;
overflow-y: auto;
}
.footer {
display: flex;
justify-content: end;
gap: 15px;
}
}
</style>

36
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/TrafficControl/index.vue

@ -1,17 +1,20 @@
<template>
<Card class='TrafficControl' title="交通管制">
<RadioGroup v-model="radioValue" :options="radioList" />
<RadioGroup v-model="eventSubclass" :options="radioList" />
<div class="bottom">
<ButtonGradient class="title-button special-button"
<ButtonGradient class="title-button special-button" @click.native="onSubmit(1)"
style="background: linear-gradient(180deg, #E94D4E 0%, #FF195E 100%);">
封闭
</ButtonGradient>
<ButtonGradient class="title-button special-button"
<ButtonGradient class="title-button special-button" @click.native="onSubmit(2)"
style="background: linear-gradient(82deg, #FFCD48 0%, #FE861E 100%);">
限行
</ButtonGradient>
</div>
<AddControlEventInfoDialog v-model="addControlEventInfoDialogVisible" :controlType="controlType"
:eventSubclass="eventSubclass" @close="closeDialog" />
</Card>
</template>
@ -20,6 +23,7 @@ import Card from "@screen/components/Card2/Card.vue";
import RadioGroup from '@screen/components/FormConfig/components/RadioGroup/index.vue';
import ButtonGradient from '@screen/components/Buttons/ButtonGradient.vue';
import { provideMixin } from "./../../mixin"
import AddControlEventInfoDialog from "./components/AddControlEventInfoDialog/index.vue"
export default {
name: 'TrafficControl',
@ -27,19 +31,31 @@ export default {
components: {
Card,
RadioGroup,
ButtonGradient
ButtonGradient,
AddControlEventInfoDialog
},
data() {
return {
radioValue: "mainlineControl",
eventSubclass: '3-1',
addControlEventInfoDialogVisible: false,
controlType: 1,
radioList: [
{ key: 'mainlineControl', label: '主线管制' },
{ key: 'tollboothControl', label: '收费站管制' },
{ key: 'serviceAreaControl', label: '服务区管制' },
{ key: 'hubInterchangeControl', label: '枢纽立交管制' },
{ key: 'otherControls', label: '其他管制' },
{ key: '3-1', label: '主线管制' },
{ key: '3-2', label: '收费站管制' },
{ key: '3-3', label: '服务区管制' },
{ key: '3-4', label: '枢纽立交管制' },
{ key: '3-5', label: '其他管制' },
]
}
},
methods: {
onSubmit(value) {
this.controlType = value
this.addControlEventInfoDialogVisible = true
},
closeDialog() {
this.addControlEventInfoDialogVisible = false
}
}
}
</script>

2
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/mixin.js

@ -11,7 +11,7 @@ export const provideMixin = {
if (!data) return;
this.detailData = data;
this.detailChange?.(data);
this.detailChange?.(data.eventId);
},
immediate: true,
},

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

@ -1,46 +1,109 @@
<template>
<Dialog v-model="modelVisible" title="事件详情" width="890px" top="11%">
<div class="EventDetail" :style="{
height: activeName == '-1' || activeName == '0' ? '380px' : '598px',
}">
<div
class="EventDetail"
:style="{
height: activeName == '-1' || activeName == '0' ? '380px' : '598px',
}"
>
<Form :formList="formList" :dFormData="formData" label-width="100px" />
<div class="video-pic" :style="{ height: formData.component === 'VideoMulti' ? '220px' : undefined }">
<div
class="video-pic"
:style="{
height: formData.component === 'VideoMulti' ? '220px' : undefined,
}"
>
<component
:is="formData.component"
v-if="activeName != '-1'"
style="height: 100%; width: 380px"
:showHeader="false"
:url="
formData.videoList && formData.videoList.length > 0
? formData.videoList[0]
: ''
"
:camId="formData.upCamId"
:pileNum="formData.stakeMark"
rangeIndex="upCamera"
:videoType="formData.videoType"
/>
<component :is="formData.component" v-if="activeName != '-1'" style="height: 100%; width: 380px"
:showHeader="false" :url="formData.videoList && formData.videoList.length > 0
? formData.videoList[0] : ''" :camId="formData.upCamId" :pileNum="formData.stakeMark" rangeIndex="upCamera"
:videoType="formData.videoType" />
<component :is="formData.component" v-if="activeName != '-1'" style="height: 100%; width: 380px"
:showHeader="false" :url="formData.videoList && formData.videoList.length > 0
? formData.videoList[1] : ''" :camId="formData.downCamId" :pileNum="formData.stakeMark" rangeIndex="downCamera"
:videoType="formData.videoType" />
<Carousel v-if="activeName == '-1'" style="flex: 1" :videos="formData.videoList" :pictures="[]" />
<Carousel v-if="activeName == '-1'" style="flex: 1" :pictures="formData.pictures" :videos="[]" />
<component
:is="formData.component"
v-if="activeName != '-1'"
style="height: 100%; width: 380px"
:showHeader="false"
:url="
formData.videoList && formData.videoList.length > 0
? formData.videoList[1]
: ''
"
:camId="formData.downCamId"
:pileNum="formData.stakeMark"
rangeIndex="downCamera"
:videoType="formData.videoType"
/>
<Carousel
v-if="activeName == '-1'"
style="flex: 1"
:videos="formData.videoList"
:pictures="[]"
/>
<Carousel
v-if="activeName == '-1'"
style="flex: 1"
:pictures="formData.pictures"
:videos="[]"
/>
</div>
<!-- <div>{{ formData.videoList[0] }}</div> -->
<TimeLine1 v-if="activeName == '1' || activeName == '2'" :data="timeLine1List" />
<TimeLine2 v-if="activeName == '1' || activeName == '2'" :data="timeLine2List" style="flex: 1" />
<TimeLine1
v-if="activeName == '1' || activeName == '2'"
:data="timeLine1List"
/>
<TimeLine2
v-if="activeName == '1' || activeName == '2'"
:data="timeLine2List"
style="flex: 1"
/>
</div>
<!-- 确认弹窗 -->
<EventPlanDialog :visible="isShowDialog" :info="info" :eventFormData="formData" :activeName="activeName"
@reInitData="() => {
this.$emit('update:value', false);
this.$emit('queryData', true);
}
" @close="onCloseAddNew" />
<EventPlanDialog
:visible="isShowDialog"
:info="info"
:eventFormData="formData"
:activeName="activeName"
@reInitData="
() => {
this.$emit('update:value', false);
this.$emit('queryData', true);
}
"
@close="onCloseAddNew"
/>
<template #footer>
<Button v-if="activeName == '-1' || activeName == '0'" style="padding: 0 24px"
@click.native="onDelete">误报</Button>
<Button :style="{ backgroundColor: '#C9C9C9', padding: '0 24px' }"
@click.native="modelVisible = false">取消</Button>
<Button v-if="activeName == '-1' || activeName == '0'" style="padding: 0 24px"
@click.native="onSubmit">确认</Button>
<Button
v-if="activeName == '-1' || activeName == '0'"
style="padding: 0 24px"
@click.native="onDelete"
>误报</Button
>
<Button
:style="{ backgroundColor: '#C9C9C9', padding: '0 24px' }"
@click.native="modelVisible = false"
>取消</Button
>
<Button
v-if="activeName == '-1' || activeName == '0'"
style="padding: 0 24px"
@click.native="onSubmit"
>确认</Button
>
</template>
</Dialog>
</template>
@ -83,7 +146,7 @@ export default {
activeName: String,
formData: {
type: Object,
default: () => { },
default: () => {},
},
},
data() {

9
ruoyi-ui/src/views/JiHeExpressway/utils/enum.js

@ -109,6 +109,15 @@ export const EventTopics = {
其他事件: 11,
};
//路网设施类型
export const RoadNFTopics = {
收费站: 1,
枢纽立交: 4,
桥梁: 5,
服务区: 6,
停车区: 7,
};
// 事件类型 eventType
export const EventType = {
0: {

4
ruoyi-ui/vue.config.js

@ -52,8 +52,8 @@ module.exports = {
// target: `http://10.0.81.204:8087`, //现场后台 刘文阁
// 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.66.196:8087`, //正晨后台 连现场物联 刘文阁2
// 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`, //王家宝

Loading…
Cancel
Save