Browse Source

合并

wangqin
hui 11 months ago
parent
commit
7ea25c3722
  1. 2
      ruoyi-ui/src/assets/styles/JiHeExpressway.scss
  2. 20
      ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/components/ElCheckboxGroup.vue
  3. 51
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/PerceiveEvent/index.vue
  4. 51
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/TrafficIncidents/index.vue
  5. 5
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/HomeVectorControl/index.vue
  6. 17
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/httpList.js
  7. 24
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/map.js
  8. 308
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/dutyOfficer/components/ModifyDutyInformationTable.vue
  9. 64
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/dutyOfficer/components/OperateRecord.vue
  10. 173
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/jurisdictionalManagement/components/AddNEditDialog.vue
  11. 23
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/jurisdictionalManagement/data.js
  12. 56
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/dispatch/EventDetailDialog/data.js
  13. 26
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/EventDetailDialog/Carousel/index.vue
  14. 8
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/EventDetailDialog/data.js
  15. 29
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/EventDetailDialog/eventPlanDialog/index.vue
  16. 14
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/EventDetailDialog/index.vue
  17. 8
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/data.js
  18. 86
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/index.vue
  19. 239
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/addAndEditDialog/index.vue
  20. 34
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/formTable/index.vue
  21. 33
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/index.vue
  22. 7
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/qbbDialog/index.vue
  23. 64
      ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/statisticalAnalysis/assets/charts.js
  24. 105
      ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/statisticalAnalysis/index.vue
  25. 50
      ruoyi-ui/src/views/JiHeExpressway/utils/enum.js
  26. 3
      ruoyi-ui/vue.config.js

2
ruoyi-ui/src/assets/styles/JiHeExpressway.scss

@ -98,7 +98,7 @@
color: #fff;
&.is-disabled {
color: #096d8c;
color: #fff;
}
}

20
ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/components/ElCheckboxGroup.vue

@ -1,19 +1,10 @@
<template>
<ElCheckboxGroup
v-bind="$attrs"
v-on="$listeners"
class="ElCheckboxGroup"
:style="{ gap }"
>
<ElCheckbox
v-for="item in options"
:disabled="item.disabled"
:label="item[id] || item[label]"
:key="item[id] || item[label]"
>
<ElCheckboxGroup v-bind="$attrs" v-on="$listeners" class="ElCheckboxGroup" :style="{ gap }">
<ElCheckbox v-for="item in options" :disabled="item.disabled" :label="item[id] || item[label]"
:key="item[id] || item[label]">
<slot :name="item[id] || item[label]" :data="item">{{
item[label]
}}</slot>
item[label]
}}</slot>
</ElCheckbox>
</ElCheckboxGroup>
</template>
@ -58,7 +49,6 @@ export default {
display: flex;
align-items: center;
gap: 6px;
width: 100px;
.el-checkbox__input {
line-height: 0;

51
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/PerceiveEvent/index.vue

@ -3,7 +3,7 @@
<div class="PerceiveEvent">
<!-- <Video class="item-video" /> -->
<div class="video-pic">
<Video style="height: 100%;flex:1" :showHeader="activeName != '-1'" :url="dialogData.formData.videoList[0]"
<Video style="height: 100%;flex:1" :showHeader="false" :url="dialogData.formData.videoList[0]"
videoType="mp4" />
<Carousel style="flex: 1;height: 100%;" :pictures="dialogData.formData.pictures" />
</div>
@ -33,10 +33,32 @@ import Carousel from "@screen/pages/control/event/event/EventDetailDialog/Carous
import { WarningTypeList, WarningSubclassList } from "@screen/utils/enum.js"
// import { getRoadInfoByStakeMark, getProduct } from "@screen/pages/Home/components/RoadAndEvents/utils/httpList.js"
import { dialogDelayVisible } from "./../mixin"
import { LaneOccupancyList } from "@screen/utils/enum.js"
import { LaneOccupancyList, DirectionTypes } from "@screen/utils/enum.js"
let vehicleTypeList = [];
function getDuration(warningTime) {
const currentTime = moment();
const specifiedTime = moment(warningTime);
const duration = moment.duration(currentTime.diff(specifiedTime));
const hours = Math.floor(duration.asHours());
const minutes = Math.floor(duration.asMinutes()) % 60;
const seconds = Math.floor(duration.asSeconds()) % 60;
return `${padZero(hours)}:${padZero(minutes)}:${padZero(seconds)}`;
}
function padZero(num) {
num = num.toString();
while (num.length < 2) {
num = "0" + num;
}
return num;
}
//
export default {
name: 'PerceiveEvent',
@ -52,6 +74,7 @@ export default {
},
data() {
return {
interval: null,
loading: true,
activeName: 'first',
deviceControlVisible: false,
@ -76,6 +99,12 @@ export default {
key: "stakeMark",
type: "text",
},
{
label: "路段方向:",
key: "direction",
type: "text",
isAlone: true
},
{
label: "事件来源:",
key: "warningSource",
@ -138,11 +167,11 @@ export default {
key: "duration",
type: "text",
},
{
label: "天气情况:",
key: "weather",
type: "text",
},
// {
// label: ":",
// key: "weather",
// type: "text",
// },
]
}
},
@ -150,6 +179,11 @@ export default {
this.getDetails();
this.getVehicleTypeList();
},
async mounted() {
},
beforeDestroy() {
clearInterval(this.interval);
},
methods: {
getVehicleTypeList() {
if (vehicleTypeList.length) return;
@ -227,6 +261,9 @@ export default {
setTimeout(() => {
this.$refs.FormConfigRef.reset(true);
});
this.data.direction = DirectionTypes[this.data.direction];
this.data.duration = getDuration(this.data.warningTime);
this.interval = setInterval(() => { this.data.duration = getDuration(this.data.warningTime); }, 1000)
})
.catch((e) => {
Message.error("详情获取失败" + e);

51
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/TrafficIncidents/index.vue

@ -1,25 +1,12 @@
<template>
<Dialog
v-model="obverseVisible"
:title="dialogData._itemData && dialogData._itemData.title"
>
<Dialog v-model="obverseVisible" :title="dialogData._itemData && dialogData._itemData.title">
<div class="TrafficIncidents">
<div class="header">
<Video class="video-stream" :pileNum="dialogData.stakeMark" />
<Video
class="video-stream"
:pileNum="dialogData.stakeMark"
:rangeIndex="1"
/>
<Video class="video-stream" :pileNum="dialogData.stakeMark" :rangeIndex="1" />
</div>
<Descriptions
labelWidth="72px"
:list="list"
:data="data"
style="gap: 18px"
column="7"
/>
<Descriptions labelWidth="72px" :list="list" :data="data" style="gap: 18px" column="7" />
</div>
</Dialog>
</template>
@ -55,11 +42,11 @@ export default {
deviceVendors: "XXX厂家",
},
list: [
{
label: "机构",
key: "organizationName",
gridColumn: "3",
},
// {
// label: "",
// key: "organizationName",
// gridColumn: "3",
// },
{
label: "高速名称",
key: "roadName",
@ -82,7 +69,7 @@ export default {
gridColumn: "3",
},
{
label: "车道列表",
label: "影响车道",
key: "lang",
enum: "LaneOccupancy",
gridColumn: "3",
@ -109,11 +96,11 @@ export default {
enum: "CameraDirectionEnum",
gridColumn: "3",
},
{
label: "完结时间",
key: "endTime",
gridColumn: "3",
},
// {
// label: "",
// key: "endTime",
// gridColumn: "3",
// },
{
label: "事件描述",
key: "description",
@ -132,12 +119,12 @@ export default {
if (code != 200) return;
this.data = { ...data, ...this.data };
console.log('trafficIncidents',data);
console.log('trafficIncidents', data);
})
.catch((err) => {});
.catch((err) => { });
},
methods: {
handleClickTabs() {},
handleClickTabs() { },
},
};
</script>
@ -158,7 +145,7 @@ export default {
display: flex;
gap: 9px;
> div.video-stream {
>div.video-stream {
height: 210px;
}
}
@ -186,7 +173,7 @@ export default {
align-items: center;
justify-content: end;
> div {
>div {
font-size: 16px;
padding: 6px 12px;
}

5
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/HomeVectorControl/index.vue

@ -27,9 +27,8 @@ export default {
methods: {
handleClick(type) {
this.activeIcon = this.activeIcon === type ? null : type;
if (this.activeIcon) window.showStakeText = true;
else window.showStakeText = false;
markerClusterIns.setData();
// markerClusterIns.setData();
},
filterEnd(data) {
this.activeIcon = null;

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

@ -41,6 +41,13 @@ export function getNearCamera(pileNum) {
});
}
function padZero(num) {
num = num.toString();
while (num.length < 3) {
num = "0" + num;
}
return num;
}
/**
* 球机进行控制
* @param {string} camId 相机 ID
@ -269,13 +276,7 @@ export function getProduct(productId) {
});
});
}
function padZero(num) {
num = num.toString();
while (num.length < 3) {
num = "0" + num;
}
return num;
}
/**
* 交通事件 列表 根据类型获取
* @param {number} eventType
@ -327,7 +328,7 @@ export function getEventTopicList(eventType, options = {}) {
export function getPerceiveEventList(data = {}, options = {}) {
return new Promise((resolve, reject) => {
const completeTime = moment().add(1, "d").format("YYYY-MM-DD");
const startTime = moment().add(-30, "d").format("YYYY-MM-DD");
const startTime = moment().add(-7, "d").format("YYYY-MM-DD");
data.startTime = startTime;
data.completeTime = completeTime;

24
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/map.js

@ -119,7 +119,7 @@ export class MarkerCluster {
const dataContainer = document.getElementById("dataContainer");
// 清空数据容器
dataContainer.innerHTML = "";
// dataContainer.innerHTML = "";
// 计算当前页起始索引和结束索引
const startIndex = (page - 1) * pageSize;
@ -144,6 +144,15 @@ export class MarkerCluster {
.join("");
// 渲染当前页数据
dataContainer.innerHTML = itemsTpl;
window.infoWindow.dom
.querySelectorAll(".info-window-item")
.forEach((item, index) => {
item.onclick = () =>
data[index].config.markerClick?.(
data[index].extData,
data[index].config?.item
);
});
}
window.renderData = renderData;
@ -179,12 +188,17 @@ export class MarkerCluster {
)
.join("")}
</div>
${
totalPages > 1
? `
<div id="paginationContainer" style="text-align:center;margin-bottom:5px;">
<button style="cursor: pointer; background: #00B3CC;border-radius: 8px;border: 0px;" onclick="renderData(window.page-1)">上一页</button>
<button style="cursor: pointer; background: #00B3CC;border-radius: 8px;border: 0px;" onclick="renderData(window.page+1)">下一页</button>
</div>
<button style="padding: 0 15px;background: #00B3CC;border-radius: 48px;cursor: pointer;opacity: 1;gap: 6px;font-size: 14px;font-weight: 500;color: #FFFFFF;border: 1px solid rgba(42, 217, 253, 0.6);" onclick="renderData(window.page-1)">上一页</button>
<button style="padding: 0 15px;background: #00B3CC;border-radius: 48px;cursor: pointer;opacity: 1;gap: 6px;font-size: 14px;font-weight: 500;color: #FFFFFF;border: 1px solid rgba(42, 217, 253, 0.6);" onclick="renderData(window.page+1)">下一页</button>
</div>`
: ""
}
</div>`);
window.infoWindow = this.infoWindow;
this.infoWindow.open(map, data[0].lnglat);
this.infoWindow.dom.querySelector(".info-close").onclick = () =>

308
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/dutyOfficer/components/ModifyDutyInformationTable.vue

@ -5,22 +5,30 @@
<Form v-if="!data" :formList="formList" column="2" ref="FormRef" />
<div v-if="peopleList.length" class="people">
<div v-for=" item in peopleList" :class="{ active: getActive(item) }" :key="item.id"
@click="chooseDutyPerson(item)">
<span>{{ item.name || '-' }}</span>
<span>{{ item.contactNumber || '-' }}</span>
<div
v-for="item in peopleList"
:class="{ active: getActive(item) }"
:key="item.id"
@click="chooseDutyPerson(item)"
>
<span>{{ item.name || "-" }}</span>
<span>{{ item.contactNumber || "-" }}</span>
</div>
</div>
<div v-else class="people no-data">暂无人员</div>
<img src="./../images/Line.svg">
<img src="./../images/Line.svg" />
<div class="dutyPeople">
<div :class="['line', { active: active == 'dayShift' }]">
<p @click="active = 'dayShift'">白天值班:</p>
<div>
<p v-for="(item, index) in dayShift" :key="`${item.id}_${index}`" @click="removeDutyPerson(item)">
<p
v-for="(item, index) in dayShift"
:key="`${item.id}_${index}`"
@click="removeDutyPerson(item)"
>
{{ item.name }}
</p>
<div class="no-data" v-if="!dayShift.length">未添加人员</div>
@ -30,17 +38,28 @@
<div :class="['line', { active: active == 'graveyardShift' }]">
<p @click="active = 'graveyardShift'">晚上值班:</p>
<div>
<p v-for="(item, index) in graveyardShift" :key="`${index}_${item.id}`" @click="removeDutyPerson(item)">
<p
v-for="(item, index) in graveyardShift"
:key="`${index}_${item.id}`"
@click="removeDutyPerson(item)"
>
{{ item.name }}
</p>
<div class="no-data" v-if="!graveyardShift.length">未添加人员</div>
<div class="no-data" v-if="!graveyardShift.length">
未添加人员
</div>
</div>
</div>
</div>
</div>
</div>
<template #footer>
<Button :style="{ backgroundColor: '#C9C9C9' }" @click.native="$emit('close')"> 取消</Button>
<Button
:style="{ backgroundColor: '#0E708B' }"
@click.native="$emit('close')"
>
取消</Button
>
<Button @click.native="submit">确认</Button>
</template>
</Dialog>
@ -48,34 +67,34 @@
<script>
import Dialog from "@screen/components/Dialog/index.vue";
import Button from "@screen/components/Buttons/Button.vue"
import InputSearch from '@screen/components/InputSearch/index.vue';
import Form from '@screen/components/FormConfig';
import Button from "@screen/components/Buttons/Button.vue";
import InputSearch from "@screen/components/InputSearch/index.vue";
import Form from "@screen/components/FormConfig";
import { loadingMessage } from '@screen/utils/common';
import { loadingMessage } from "@screen/utils/common";
import { getSelectOptionsStation } from "@screen/pages/control/event/businessDataManagement/utils.js";
import request from "@/utils/request";
import { Message } from "element-ui";
export default {
name: 'ModifyDutyInformationTable',
name: "ModifyDutyInformationTable",
components: {
Dialog,
Button,
InputSearch,
Form
Form,
},
props: {
visible: {
type: Boolean,
default: false
default: false,
},
data: {
type: Object,
default: null
}
default: null,
},
},
emit: ['close'],
emit: ["close"],
data() {
return {
formList: [
@ -85,11 +104,11 @@ export default {
type: "select",
required: true,
options: {
options: []
options: [],
},
ons: {
change: (id) => this.getPeopleList(id)
}
change: (id) => this.getPeopleList(id),
},
},
{
label: "日期:",
@ -97,29 +116,30 @@ export default {
required: true,
type: "datePicker",
options: {
valueFormat: "yyyy-MM-dd"
}
valueFormat: "yyyy-MM-dd",
},
},
],
value2: null,
dayShift: [],
graveyardShift: [],
peopleList: [],
active: 'dayShift'
}
active: "dayShift",
};
},
computed: {
visibleModel: {
get() {
return this.visible
return this.visible;
},
set(bool) {
this.$emit('close', bool);
}
this.$emit("close", bool);
},
},
getActive() {
return data => this[this.active].findIndex(item => item.id === data.id) != -1;
}
return (data) =>
this[this.active].findIndex((item) => item.id === data.id) != -1;
},
},
watch: {
visible: {
@ -127,33 +147,36 @@ export default {
async handler(bool) {
if (!bool) return;
this.dayShift = [...this.data?.dayShift || []];
this.graveyardShift = [...this.data?.graveyardShift || []];
this.dayShift = [...(this.data?.dayShift || [])];
this.graveyardShift = [...(this.data?.graveyardShift || [])];
if (!this.data) {
const result = await getSelectOptionsStation(2);
this.formList[0].options.options = (result || []);
this.formList[0].options.options = result || [];
return;
}
this.getPeopleList(this.data.station);
}
}
},
},
},
methods: {
chooseDutyPerson(item) {
const hasInserted = this[this.active].find(_item => _item.employeesId === item.id || _item.id === item.id);
const hasInserted = this[this.active].find(
(_item) => _item.employeesId === item.id || _item.id === item.id
);
if (hasInserted) return Message.warning("人员已存在");
this[this.active].push(item)
this[this.active].push(item);
},
removeDutyPerson(item) {
const index = this[this.active].findIndex(_item => _item.id === item.id);
const index = this[this.active].findIndex(
(_item) => _item.id === item.id
);
if (index === -1) return;//Message.warning("");
if (index === -1) return; //Message.warning("");
this[this.active].splice(index, 1);
},
@ -169,20 +192,23 @@ export default {
url: `/business/employees/list`,
method: "GET",
params: {
organizationId: stationId
}
}).then((result) => {
if (result.code != 200) return Message.error("人员获取失败");
if (!result.rows?.length) return Message.warning("该驻点下暂无人员");
organizationId: stationId,
},
})
.then((result) => {
if (result.code != 200) return Message.error("人员获取失败");
if (!result.rows?.length) return Message.warning("该驻点下暂无人员");
// Message.success("")
// Message.success("")
this.peopleList = result.rows;
}).catch((err) => {
Message.error("人员获取失败")
}).finally(() => {
closeMessage();
})
this.peopleList = result.rows;
})
.catch((err) => {
Message.error("人员获取失败");
})
.finally(() => {
closeMessage();
});
//,
if (this.data) {
@ -192,17 +218,24 @@ export default {
data: {
station: this.data.station,
date: this.data.date,
}
}).then((result) => {
console.log("result.data:", result.data);
this.dayShift = result.data.filter(item => item.scheduling === "1");
console.log("this.dayShift11:", this.dayShift);
this.graveyardShift = result.data.filter(item => item.scheduling === "2");
}).catch((err) => {
Message.error("人员获取失败")
}).finally(() => {
closeMessage();
},
})
.then((result) => {
console.log("result.data:", result.data);
this.dayShift = result.data.filter(
(item) => item.scheduling === "1"
);
console.log("this.dayShift11:", this.dayShift);
this.graveyardShift = result.data.filter(
(item) => item.scheduling === "2"
);
})
.catch((err) => {
Message.error("人员获取失败");
})
.finally(() => {
closeMessage();
});
}
},
updateData(data) {
@ -216,16 +249,16 @@ export default {
//,id
employeesId: item.employeesId ? item.employeesId : item.id,
scheduling: 1,
station: data.station
station: data.station,
})),
...this.graveyardShift.map((item) => ({
employeesId: item.employeesId ? item.employeesId : item.id,
scheduling: 2,
station: data.station
station: data.station,
})),
]
}
})
],
},
});
},
async submit() {
let data = this.data;
@ -235,38 +268,44 @@ export default {
}
// console.log("%c [ data ]-202-ModifyDutyInformationTable.vue", "font-size:15px; background:#9afce6; color:#deffff;", data, this.value2);
const closeMessage = loadingMessage({ message: "正在保存值班信息111..." });
const closeMessage = loadingMessage({
message: "正在保存值班信息111...",
});
if (!this.data) {
this.updateData(data).then((result) => {
this.updateData(data)
.then((result) => {
// console.log("%c [ result ]-217-ModifyDutyInformationTable.vue", "font-size:15px; background:#335cf6; color:#77a0ff;", result);
if (result.code != 200) return Message.error("保存失败");
Message.success("保存成功");
this.$emit('close')
}).catch((err) => {
Message.error("保存失败")
}).finally(() => {
closeMessage();
this.$emit("close");
})
.catch((err) => {
Message.error("保存失败");
})
.finally(() => {
closeMessage();
});
return;
} else {
const deleteIds = [];
(this.data.dayShift || []).forEach(item => {
const findIndex = this.dayShift.findIndex(_item => _item.id === item.id);
(this.data.dayShift || []).forEach((item) => {
const findIndex = this.dayShift.findIndex(
(_item) => _item.id === item.id
);
if (findIndex === -1) deleteIds.push(item.id)
if (findIndex === -1) deleteIds.push(item.id);
});
(this.data.graveyardShift || []).forEach(item => {
const findIndex = this.graveyardShift.findIndex(_item => _item.id === item.id);
if (findIndex === -1) deleteIds.push(item.id)
})
(this.data.graveyardShift || []).forEach((item) => {
const findIndex = this.graveyardShift.findIndex(
(_item) => _item.id === item.id
);
if (findIndex === -1) deleteIds.push(item.id);
});
// Promise.allSettled([
// deleteIds?.length ? request({
@ -285,51 +324,59 @@ export default {
// })
//,,
if(deleteIds?.length){
if (deleteIds?.length) {
request({
url: `/business/shifts/${deleteIds.join()}`,
method: "DELETE",
data: {}
}).then((result) => {
if (result.code != 200) return Message.error("修改失败");
this.updateData(this.data).then((result) => {
data: {},
})
.then((result) => {
if (result.code != 200) return Message.error("修改失败");
Message.success("修改成功");
this.updateData(this.data)
.then((result) => {
if (result.code != 200) return Message.error("修改失败");
this.$emit('close')
}).catch((err) => {
Message.error("修改失败")
}).finally(() => {
closeMessage();
Message.success("修改成功");
this.$emit("close");
})
.catch((err) => {
Message.error("修改失败");
})
.finally(() => {
closeMessage();
});
})
}).catch((err) => {
Message.error("删除失败")
}).finally(() => {
closeMessage();
})
}else{
this.updateData(this.data).then((result) => {
if (result.code != 200) return Message.error("修改失败");
.catch((err) => {
Message.error("删除失败");
})
.finally(() => {
closeMessage();
});
} else {
this.updateData(this.data)
.then((result) => {
if (result.code != 200) return Message.error("修改失败");
Message.success("修改成功");
Message.success("修改成功");
this.$emit('close')
}).catch((err) => {
Message.error("修改失败")
}).finally(() => {
closeMessage();
})
this.$emit("close");
})
.catch((err) => {
Message.error("修改失败");
})
.finally(() => {
closeMessage();
});
}
}
}
}
}
},
},
};
</script>
<style lang='scss' scoped>
<style lang="scss" scoped>
.ModifyDutyInformationTable {
width: 947px;
height: 658px;
@ -343,7 +390,6 @@ export default {
gap: 24px;
align-items: center;
justify-content: space-between;
}
.body {
@ -363,14 +409,14 @@ export default {
flex: 1;
overflow-y: auto;
>div {
background: #0D5F79;
> div {
background: #0d5f79;
height: 65px;
border-radius: 2px;
font-size: 16px;
font-family: PingFang SC, PingFang SC;
font-weight: 500;
color: #FFFFFF;
color: #ffffff;
letter-spacing: 1px;
display: flex;
@ -382,7 +428,7 @@ export default {
}
.active {
background: linear-gradient(180deg, #00AEE5 0%, #0086B1 100%);
background: linear-gradient(180deg, #00aee5 0%, #0086b1 100%);
}
}
@ -393,11 +439,15 @@ export default {
.active {
p {
background: linear-gradient(180deg, rgba(1, 167, 220, 0) 0%, #01A7DC 100%);
background: linear-gradient(
180deg,
rgba(1, 167, 220, 0) 0%,
#01a7dc 100%
);
}
}
>div {
> div {
display: flex;
gap: 9px;
border-radius: 2px;
@ -405,7 +455,11 @@ export default {
overflow: hidden;
p {
background: linear-gradient(180deg, rgba(0, 148, 255, 0) 0%, rgba(37, 124, 255, .15) 100%);
background: linear-gradient(
180deg,
rgba(0, 148, 255, 0) 0%,
rgba(37, 124, 255, 0.15) 100%
);
height: 42px;
display: flex;
align-items: center;
@ -414,14 +468,14 @@ export default {
font-size: 16px;
font-family: PingFang SC, PingFang SC;
font-weight: 500;
color: #FFFFFF;
color: #ffffff;
border-radius: 2px;
cursor: pointer;
}
>div {
> div {
flex: 1;
display: flex;
gap: 9px;

64
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/dutyOfficer/components/OperateRecord.vue

@ -1,13 +1,21 @@
<template>
<Dialog v-model="visibleModel" title="操作记录">
<div class="OperateRecord">
<TimeLine v-if="timeLine2List.length" :data="timeLine2List" direction="right" />
<TimeLine
v-if="timeLine2List.length"
:data="timeLine2List"
direction="right"
/>
<div class="no-data" v-else>暂无操作记录</div>
<div class="bottom">
<Button @click.native="$emit('close')">确认</Button>
<Button :style="{ backgroundColor: '#C9C9C9' }" @click.native="$emit('close')"> 取消</Button>
<Button
:style="{ backgroundColor: '#0E708B' }"
@click.native="$emit('close')"
>
取消</Button
><Button @click.native="$emit('close')">确认</Button>
</div>
</div>
</Dialog>
@ -16,28 +24,28 @@
<script>
import Dialog from "@screen/components/Dialog/index.vue";
import TimeLine from "@screen/components/TimeLine/TimeLine2/index.vue";
import Button from "@screen/components/Buttons/Button.vue"
import Button from "@screen/components/Buttons/Button.vue";
import request from "@/utils/request";
export default {
name: 'OperateRecord',
name: "OperateRecord",
components: {
Dialog,
Button,
TimeLine
TimeLine,
},
props: {
visible: {
type: Boolean,
default: false
default: false,
},
data: {
type: Object,
default: null
}
default: null,
},
},
emit: ['close'],
emit: ["close"],
data() {
return {
// timeLine2List: Array.from({ length: 6 }).map(() => ({
@ -47,19 +55,19 @@ export default {
// desc: "",
// posts: ''
// })),
timeLine2List: []
}
timeLine2List: [],
};
},
computed: {
visibleModel: {
get() {
if (this.visible) this.getData();
return this.visible
return this.visible;
},
set(bool) {
this.$emit('close', bool);
}
}
this.$emit("close", bool);
},
},
},
methods: {
getData() {
@ -69,26 +77,26 @@ export default {
data: {
date: this.data.date,
station: this.data.station,
}
},
})
.then(result => {
.then((result) => {
if (result.code != 200) return Message.error("获取失败");
this.timeLine2List = result.rows.map(item => ({
this.timeLine2List = result.rows.map((item) => ({
time: item.operationTime,
name: item.nickName,
desc: item.modifyContent,
posts: "操作员"
}))
posts: "操作员",
}));
})
.catch(() => {
Message.error("获取失败")
})
}
}
}
Message.error("获取失败");
});
},
},
};
</script>
<style lang='scss' scoped>
<style lang="scss" scoped>
.OperateRecord {
width: 540px;
height: 518px;
@ -102,7 +110,7 @@ export default {
gap: 15px;
justify-content: end;
>div {
> div {
width: 96px;
}
}

173
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/jurisdictionalManagement/components/AddNEditDialog.vue

@ -1,62 +1,70 @@
<template>
<Dialog v-model="modelVisible" :title="data ? '修改' : '新增'">
<div class='AddNEditDialog'>
<Form :value="formData" class="form" ref="FormConfigRef" :formList="formList" column="1" labelWidth="120px" />
<Dialog v-model="modelVisible" :title="data ? '修改' : '新增11'">
<div class="AddNEditDialog">
<Form
:value="formData"
class="form"
ref="FormConfigRef"
:formList="formList"
column="1"
labelWidth="120px"
/>
</div>
<template #footer>
<Button style="background-color: rgba(0, 179, 204, .3);" @click.native="modelVisible = false, submitting = false">
<Button
style="background-color: rgba(0, 179, 204, 0.3)"
@click.native="(modelVisible = false), (submitting = false)"
>
取消
</Button>
<Button @click.native="handleSubmit" :loading="submitting">
确定
</Button>
<Button @click.native="handleSubmit" :loading="submitting"> 确定 </Button>
</template>
</Dialog>
</template>
<script>
import Dialog from "@screen/components/Dialog/index.vue";
import Button from "@screen/components/Buttons/Button.vue"
import Form from '@screen/components/FormConfig';
import Button from "@screen/components/Buttons/Button.vue";
import Form from "@screen/components/FormConfig";
import request from "@/utils/request";
import { Message } from "element-ui";
import { addEditFormList } from "./../data"
import { stakeMarkToArray, findPathIdByTreeId } from "@screen/utils/index.js"
import { addEditFormList } from "./../data";
import { stakeMarkToArray, findPathIdByTreeId } from "@screen/utils/index.js";
export default {
name: 'AddNEditDialog',
name: "AddNEditDialog",
components: {
Dialog,
Button,
Form
Form,
},
model: {
prop: 'visible',
event: "update:value"
prop: "visible",
event: "update:value",
},
props: {
visible: Boolean,
data: Object
data: Object,
},
inject: ['setCurrentPage'],
inject: ["setCurrentPage"],
data() {
return {
submitting: false,
formData: {},
formList: addEditFormList
}
formList: addEditFormList,
};
},
computed: {
modelVisible: {
get() {
return this.visible
return this.visible;
},
set(val) {
this.$emit('update:value', val)
}
}
this.$emit("update:value", val);
},
},
},
watch: {
modelVisible: {
@ -64,16 +72,18 @@ export default {
handler(bool) {
if (!bool) return;
this.formData = !this.data ? {} : {
...this.data,
deptId: [],
endStakeMark: stakeMarkToArray(this.data.endStakeMark),
startStakeMark: stakeMarkToArray(this.data.startStakeMark),
}
this.formData = !this.data
? {}
: {
...this.data,
deptId: [],
endStakeMark: stakeMarkToArray(this.data.endStakeMark),
startStakeMark: stakeMarkToArray(this.data.startStakeMark),
};
this.getSelectOptions();
}
}
},
},
},
methods: {
getSelectOptions() {
@ -85,62 +95,73 @@ export default {
request({
url: `/business/roadSection/roadList`,
method: "POST",
data: {}
data: {},
}),
])
.then(([departmentData, roadData]) => {
if (departmentData.status != 'rejected' && departmentData.value.code == 200) {
this.formList[0].options.options = departmentData.value.data;
if (this.data?.deptId) this.formData.deptId = findPathIdByTreeId(departmentData.value.data, this.data.deptId);
this.$refs.FormConfigRef.reset(true)
}
if (roadData.status != 'rejected' && roadData.value.code == 200) {
this.formList[1].options.options = roadData.value.data.map(item => ({ key: item.id, label: item.roadName }));
}
});
]).then(([departmentData, roadData]) => {
if (
departmentData.status != "rejected" &&
departmentData.value.code == 200
) {
this.formList[0].options.options = departmentData.value.data;
if (this.data?.deptId)
this.formData.deptId = findPathIdByTreeId(
departmentData.value.data,
this.data.deptId
);
this.$refs.FormConfigRef.reset(true);
}
if (roadData.status != "rejected" && roadData.value.code == 200) {
this.formList[1].options.options = roadData.value.data.map(
(item) => ({ key: item.id, label: item.roadName })
);
}
});
},
handleSubmit() {
this.$refs.FormConfigRef.validate()
.then((data) => {
this.submitting = true;
this.$refs.FormConfigRef.validate().then((data) => {
this.submitting = true;
if (data.startStakeMark?.[0]) data.startStakeMark = `K${data.startStakeMark[0]}+${data.startStakeMark[1]}`;
if (data.endStakeMark?.[0]) data.endStakeMark = `K${data.endStakeMark[0]}+${data.endStakeMark[1]}`;
if (data.deptId) data.deptId = data.deptId.slice(-1)[0];
if (this.data) data.id = this.data.id;
if (data.startStakeMark?.[0])
data.startStakeMark = `K${data.startStakeMark[0]}+${data.startStakeMark[1]}`;
if (data.endStakeMark?.[0])
data.endStakeMark = `K${data.endStakeMark[0]}+${data.endStakeMark[1]}`;
if (data.deptId) data.deptId = data.deptId.slice(-1)[0];
if (this.data) data.id = this.data.id;
request({
url: `/business/roadSection`,
method: this.data ? 'PUT' : 'POST',
data
})
.then(result => {
if (result.code != 200) return Message.error(`提交失败!`);
request({
url: `/business/roadSection`,
method: this.data ? "PUT" : "POST",
data,
})
.then((result) => {
if (result.code != 200) return Message.error(`提交失败!`);
Message.success(`提交成功!`);
Message.success(`提交成功!`);
this.modelVisible = false;
this.modelVisible = false;
this.setCurrentPage(1)
})
.catch((err) => {
console.log("%c [ err ]-110-「DeviceControlDialog.vue」", "font-size:15px; background:#547bf2; color:#98bfff;", err);
Message.error(`提交失败!`);
})
.finally(() => {
this.submitting = false;
})
})
}
this.setCurrentPage(1);
})
.catch((err) => {
console.log(
"%c [ err ]-110-「DeviceControlDialog.vue」",
"font-size:15px; background:#547bf2; color:#98bfff;",
err
);
Message.error(`提交失败!`);
})
.finally(() => {
this.submitting = false;
});
});
},
},
}
};
</script>
<style lang='scss' scoped>
<style lang="scss" scoped>
.AddNEditDialog {
width: 450px;
display: flex;

23
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/jurisdictionalManagement/data.js

@ -4,7 +4,7 @@ import { formList } from "../../../dispatch/EventDetailDialog/data";
export const searchFormList = [
PresetFormItems.startStation,
PresetFormItems.endStation
PresetFormItems.endStation,
];
//里程计算
@ -13,7 +13,7 @@ const mileCal = (data) => {
const start = startStakeMark[0] + "." + Number(startStakeMark[1]);
const end = endStakeMark[0] + "." + Number(endStakeMark[1]);
data.mileage = (Number(end) - Number(start)).toFixed(3);
}
};
export const addEditFormList = [
{
@ -54,7 +54,7 @@ export const addEditFormList = [
input(value, ...args) {
const { data, formList } = args.slice(-1)[0];
mileCal(data);
}
},
},
},
{
@ -62,11 +62,11 @@ export const addEditFormList = [
input(value, ...args) {
const { data, formList } = args.slice(-1)[0];
mileCal(data);
}
},
},
},
]
}
],
},
}),
merge(cloneDeep(PresetFormItems.endStation), {
required: true,
@ -77,7 +77,7 @@ export const addEditFormList = [
input(value, ...args) {
const { data, formList } = args.slice(-1)[0];
mileCal(data);
}
},
},
},
{
@ -85,11 +85,11 @@ export const addEditFormList = [
input(value, ...args) {
const { data, formList } = args.slice(-1)[0];
mileCal(data);
}
},
},
},
]
}
],
},
}),
{
@ -110,6 +110,9 @@ export const addEditFormList = [
},
type: "InputNumber",
key: "mileage",
options: {
min: 0,
},
},
],
},

56
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/dispatch/EventDetailDialog/data.js

@ -5,8 +5,8 @@ export const formList = [
type: "input",
options: {
disabled: true,
placeholder: ''
}
placeholder: "",
},
},
{
label: "桩号:",
@ -14,8 +14,8 @@ export const formList = [
type: "input",
options: {
disabled: true,
placeholder: ''
}
placeholder: "",
},
},
{
label: "行驶方向:",
@ -23,8 +23,8 @@ export const formList = [
type: "input",
options: {
disabled: true,
placeholder: ''
}
placeholder: "",
},
},
{
label: "事件类型:",
@ -32,8 +32,8 @@ export const formList = [
type: "input",
options: {
disabled: true,
placeholder: ''
}
placeholder: "",
},
},
{
label: "事件原因:",
@ -41,8 +41,8 @@ export const formList = [
type: "input",
options: {
disabled: true,
placeholder: ''
}
placeholder: "",
},
},
{
label: "事件状态:",
@ -50,8 +50,8 @@ export const formList = [
type: "input",
options: {
disabled: true,
placeholder: ''
}
placeholder: "",
},
},
{
label: "操作员:",
@ -59,8 +59,8 @@ export const formList = [
type: "input",
options: {
disabled: true,
placeholder: ''
}
placeholder: "",
},
},
{
label: "发生时间:",
@ -68,18 +68,18 @@ export const formList = [
type: "input",
options: {
disabled: true,
placeholder: ''
}
},
{
label: "完结时间:",
key: "endTime",
type: "input",
options: {
disabled: true,
placeholder: ''
}
},
placeholder: "",
},
},
// {
// label: "完结时间:",
// key: "endTime",
// type: "input",
// options: {
// disabled: true,
// placeholder: ''
// }
// },
{
label: "事件描述:",
key: "direction",
@ -87,8 +87,8 @@ export const formList = [
gridColumn: 3,
options: {
disabled: true,
placeholder: ''
}
placeholder: "",
},
},
];

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

@ -2,11 +2,12 @@
<div class="Carousel">
<img src="./images/arrow.svg" @click="prevSlide" class="arrow" />
<VueSlickCarousel v-if="pictures.length > 0" v-bind="settings" ref="CarouselRef" class="vueSlickCarousel">
<VueSlickCarousel style="width: 100%" v-if="pictures.length > 0" v-bind="settings" ref="CarouselRef"
class="vueSlickCarousel">
<div v-for="(item, index) in pictures" :key="index" class="item">
<!-- <img :src="require(`@screen/images/${item}`)" style="height: 100%"> -->
<!-- <img :src="item" style="height: 100%"> -->
<el-image style="height: 100%" :src="item" :preview-src-list="pictures">
<el-image style="height: 100%;width:100%" :src="item" :preview-src-list="pictures">
</el-image>
</div>
</VueSlickCarousel>
@ -76,20 +77,37 @@ export default {
.vueSlickCarousel {
flex: 1;
overflow: hidden;
width: 100%;
::v-deep {
.slick-list {
height: 100%;
width: 100%;
.slick-track {
width: 100% !important;
height: 100% !important;
.slick-slide {
width: 100% !important;
div {
width: 100%;
height: 100%;
}
}
div {
height: 100%;
}
}
}
.item {
img {
height: 100%;
width: 100%;
}
}
}

8
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/EventDetailDialog/data.js

@ -36,8 +36,8 @@ export const formList = [
},
},
{
label: "事件原因:",
key: "eventCause",
label: "高速名称:",
key: "roadName",
type: "input",
options: {
disabled: true,
@ -72,8 +72,8 @@ export const formList = [
},
},
{
label: "完结时间:",
key: "endTime",
label: "预计结束时间:",
key: "estimatedEndTime",
type: "input",
options: {
disabled: true,

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

@ -4,8 +4,7 @@
<ElForm :model="formData" inline :rules="rules" ref="ruleForm">
<div class="first">
<el-radio-group v-model="planName">
<el-radio-button label="名称1"></el-radio-button>
<el-radio-button label="名称2"></el-radio-button>
<el-radio-button v-for="item in info" :key="item.id" :label="item.planName"></el-radio-button>
</el-radio-group>
</div>
@ -68,9 +67,9 @@ export default {
},
props: {
visible: Boolean,
detail: {
type: Object,
default: () => { }
info: {
type: Array,
default: () => []
}
},
data() {
@ -95,6 +94,7 @@ export default {
qbb: ''
}],
planName: '',
dcExecuteAction: [],
deviceData: [],
eventOptions: [
{
@ -198,6 +198,8 @@ export default {
modelVisible: {
get() {
if (this.visible) {
this.planName = this.info[0]?.planName || '';
this.dcExecuteAction = this.info[0]?.dcExecuteAction || [];
}
return this.visible;
},
@ -207,16 +209,8 @@ export default {
},
},
methods: {
initData(id = 1) {
request({
url: `/business/plans/list/${id}`,
method: "get",
}).then((result) => {
if (result.code != 200) return Message.error(result?.msg);
let data = result.data;
let dcExecuteAction = result.data.dcExecuteAction;
this.planId = data.id;
initData(data) {
this.planId = data.id;
this.formData = {
eventCategory: data.eventCategory,
planName: data.planName,
@ -236,11 +230,6 @@ export default {
}
})
}).catch((err) => {
console.log(err)
Message.error("查询事件预案列表失败", err);
})
},
async loadData() {
if (this.deviceData.length <= 0) {

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

@ -4,10 +4,10 @@
<Form :formList="formList" :dFormData="formData" label-width="100px" />
<div class="video-pic">
<Video style="height: 100%; width: 380px;" :showHeader="activeName != '-1'" :url="formData.videoList[0]"
videoType="mp4" />
<Video v-if="activeName != '-1'" style="height: 100%; width: 380px;" :url="formData.videoList[1]"
videoType="mp4" />
<Video style="height: 100%; width: 380px;" :showHeader="activeName != '-1'"
:url="(formData.videoList && formData.videoList.length > 0) ? formData.videoList[0] : ''" videoType="mp4" />
<Video v-if="activeName != '-1'" style="height: 100%; width: 380px;"
:url="(formData.videoList && formData.videoList.length > 0) ? formData.videoList[1] : ''" videoType="mp4" />
<Carousel v-else style="flex: 1" :pictures="formData.pictures" />
</div>
@ -18,7 +18,7 @@
</div>
<!-- 确认弹窗 -->
<EventPlanDialog :visible="isShowDialog" @close="onCloseAddNew" />
<EventPlanDialog :visible="isShowDialog" :info="info" @close="onCloseAddNew" />
<template #footer>
<Button style="padding: 0 24px;" @click.native="onDelete">误报</Button>
@ -73,6 +73,7 @@ export default {
return {
formList,
isShowDialog: false,
info: [],
timeLine1List: [{
time: "",
label: "",
@ -188,7 +189,6 @@ export default {
onSubmit() {
this.isShowDialog = true;
let url = '/business/plans/list/warning/type'
let data = {}
if (this.activeName == '-1') {
url = '/business/plans/list/warning/type'
} else {
@ -200,7 +200,7 @@ export default {
data: this.formData
}).then(result => {
if (result.code != 200) return Message.error(result?.msg);
console.log('result', result)
this.info = result.data;
})
}

8
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/data.js

@ -84,10 +84,10 @@ export const gjSearchFormList = [
key: "6",
label: "非机预警",
},
{
key: "7",
label: "气象监测器",
},
// {
// key: "7",
// label: "气象监测器",
// },
],
},
},

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

@ -64,19 +64,8 @@ import { tabMap, gjSearchFormList, gzSearchFormList } from "./data";
import request from "@/utils/request";
import { Message } from "element-ui";
import { Loading } from 'element-ui';
import { WarningType as warningTypeMapping, WarningSubclass as warningSubclassTypeMapping } from "@screen/utils/enum.js"
function getRandomData(min = 1, max = 15) {
return Math.floor(Math.random() * (max - min + 1)) + min;
}
function getMockData() {
return Array.from({ length: getRandomData(9, 24) }).map(() => ({
time: "2023.12.22 13:00:00",
source: "视频智能识别",
location: "k100+000",
direction: "济南方向",
}));
}
const warningSourceMapping = {
1: '视频AI',
@ -85,7 +74,7 @@ const warningSourceMapping = {
4: '护栏碰撞',
5: '扫码报警',
6: '非机预警',
7: '气象监测器'
// 7: ''
}
const gzDirectionMapping = {
'1': '菏泽方向',
@ -98,77 +87,6 @@ const warningStateMapping = {
3: '已终止',
4: '自动结束'
}
const warningTypeMapping = {
1: '交通拥堵',
2: '行人',
3: '非机动车',
4: '停车',
5: '倒车/逆行',
6: '烟火',
7: '撒落物',
8: '异常天气',
9: '护栏碰撞',
10: '交通事故',
11: '车辆故障',
99: '其它',
}
const warningSubclassTypeMapping = {
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": "碰撞后倾斜",
},
10: {},
11: {},
99: {
"99-1": "其他",
},
}
export default {
name: "RoadNetworkMonitoring2",

239
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/addAndEditDialog/index.vue

@ -27,25 +27,6 @@
:value="item.value">
</el-option>
</el-select>
<!-- <el-select v-if="formData.eventCategory == 1 && formData.eventType == 6"
v-model="formData.triggerMechanism" placeholder="请选择触发类型">
<el-option-group label="主线">
<el-option label="主线封闭" value="1"></el-option>
<el-option label="主线限行" value="2"></el-option>
</el-option-group>
<el-option-group label="收费站">
<el-option label="收费站封闭" value="3"></el-option>
<el-option label="收费站限行" value="4"></el-option>
</el-option-group>
<el-option-group label="匝道立交">
<el-option label="匝道立交封闭" value="5"></el-option>
<el-option label="匝道立交限行" value="6"></el-option>
</el-option-group>
<el-option-group label="服务区">
<el-option label="服务区封闭" value="7"></el-option>
<el-option label="服务区限行" value="8"></el-option>
</el-option-group>
</el-select> -->
</el-form-item>
</div>
@ -355,7 +336,105 @@ const optionsMap = {
7: [],
}
};
const typeMap = {
1: [{
value: 1,
label: '交通事故'
},
{
value: 2,
label: '车辆故障'
},
{
value: 3,
label: '交通管制'
},
{
value: 4,
label: '交通拥堵'
},
{
value: 5,
label: '非法上路'
},
{
value: 6,
label: '路障清除'
},
{
value: 7,
label: '施工建设'
},
{
value: 8,
label: '服务区异常'
},
{
value: 9,
label: '设施设备隐患'
},
{
value: 10,
label: '异常天气'
},
{
value: 11,
label: '其他事件'
}],
2: [{
value: 1,
label: '异常天气'
},
{
value: 2,
label: '拥堵'
},
{
value: 3,
label: '非机动车'
},
{
value: 4,
label: '行人'
},
{
value: 5,
label: '烟火'
},
{
value: 6,
label: '抛洒物'
},
{
value: 7,
label: '逆行'
},
]
}
const gzztMap = {
"01": '常亮',
"02": '流水',
"03": '闪烁',
"04": '关闭',
}
const gzmsMap = {
"SETMD0": "激光关闭",
"SETMD1": "常亮模式",
"SETMD2": "间隔100ms闪烁模式",
"SETMD3": "间隔200ms闪烁模式",
"SETMD4": "间隔500ms闪烁模式",
"SETMD5": "2次闪烁模式",
"SETMD6": "SOS模式",
"SETMD7": "自定义模式1",
"SETMD8": "自定义模式2",
"SETMD9": "自定义模式3",
}
const controlModelMap = {
"00": '手动模式',
"01": '自动模式',
"02": '万年历',
}
export default {
name: 'addAndEditDialog',
components: {
@ -389,7 +468,7 @@ export default {
formData: {
eventCategory: 1,
eventType: 1,
triggerMechanism: '1-1'
triggerMechanism: ''
},
secondFormData: [{
deviceType: 1,
@ -490,6 +569,8 @@ export default {
if (Object.keys(this.detail).length > 0) {
this.title = '修改预案';
this.dialogType = 2;
this.eventOptions = typeMap[this.detail.eventCategory];
this.mechanismOptions = optionsMap[this.detail.eventCategory || 1][this.detail.eventType];
this.initData(this.detail.id);
} else {
this.title = '新增预案';
@ -497,7 +578,7 @@ export default {
this.formData = {
eventCategory: 1,
eventType: 1,
triggerMechanism: '1-1'
triggerMechanism: ''
}
this.secondFormData = [{
deviceType: 1,
@ -538,16 +619,29 @@ export default {
this.secondFormData = [];
this.thirdFormData = [];
dcExecuteAction.forEach(it => {
let action = {};
if (it.otherConfig) {
let config = JSON.parse(it.otherConfig);
let qbb = ''
if (config.id) {
qbb = config.content;
config = { dcInfoBoardTemplate: config };
}
// if (config.state) {
// config.gzms = config.state
// }
action = { ...it, ...config, qbb: qbb };
}
if (it.deviceList) {
it.deviceList = it.deviceList.split(',');
action.deviceList = it.deviceList.split(',').map(str => Number(str));
}
if (it.actionType == 1) {
this.secondFormData.push(it);
this.secondFormData.push(action);
} else if (it.actionType == 2) {
this.thirdFormData.push(it);
this.thirdFormData.push(action);
}
})
console.log('secondFormData', this.secondFormData)
}).catch((err) => {
console.log(err)
Message.error("查询事件预案列表失败", err);
@ -561,7 +655,6 @@ export default {
method: "get",
})
if (result.code != 200) return Message.error(result?.msg);
console.log('123');
this.deviceData = result.data;
// return result.data;
}
@ -571,81 +664,15 @@ export default {
this.mechanismOptions = optionsMap[this.formData.eventCategory || 1][value];
},
changeRadio(value = 1) {
const optionsMap = {
1: [{
value: 1,
label: '异常天气'
},
{
value: 2,
label: '交通事故'
},
{
value: 3,
label: '非法上路'
},
{
value: 4,
label: '车辆故障'
},
{
value: 5,
label: '交通拥堵'
},
{
value: 6,
label: '交通管制'
},
{
value: 7,
label: '服务区异常'
},
{
value: 8,
label: '施工建设'
},
{
value: 9,
label: '路障清除'
}],
2: [{
value: 1,
label: '异常天气'
},
{
value: 2,
label: '拥堵'
},
{
value: 3,
label: '非机动车'
},
{
value: 4,
label: '行人'
},
{
value: 5,
label: '烟火'
},
{
value: 6,
label: '抛洒物'
},
{
value: 7,
label: '逆行'
},
]
}
this.eventOptions = optionsMap[value];
this.formData.triggerMechanism = '';
this.eventOptions = typeMap[value];
this.changeEventType();
},
handleChange() {
},
formatData(it, value = 1) {
let data = { ...it, actionType: value }
formatData(it, value = 1, id = '') {
let data = { ...it, actionType: value, emergencyPlansId: id }
if (it.deviceList && typeof it.deviceList !== 'string' && it.deviceList.length > 0) {
data.deviceList = it.deviceList.join(',');
} else {
@ -657,12 +684,16 @@ export default {
if (it.controlModel) {
let other = {
controlModel: it.controlModel,
controlModelName: controlModelMap[it.controlModel],
state: it.state,
name: gzztMap[it.state]
}
if (it.time && it?.time[0]) {
other = {
controlModel: it.controlModel,
controlModelName: controlModelMap[it.controlModel],
state: it.state,
name: gzztMap[it.state],
startTime: it.time[0],
endTime: it.time[1]
}
@ -672,6 +703,7 @@ export default {
if (it.gzms) {
data.otherConfig = JSON.stringify({
state: it.gzms,
name: gzmsMap[it.gzms],
operationDuration: it.operationDuration,
})
}
@ -683,18 +715,21 @@ export default {
// this.submitting = false;
let secondFormTable = this.$refs['secondFormTable'].tableData || [];
let thirdFormTable = this.$refs['thirdFormTable'].tableData || [];
console.log('12', thirdFormTable);
let dcArr = [];
let id = '';
if (this.dialogType == 2) id = this.planId;
secondFormTable.forEach(it => {
dcArr.push(this.formatData(it, 1));
dcArr.push(this.formatData(it, 1, id));
})
thirdFormTable.forEach(it => {
dcArr.push(this.formatData(it, 2));
dcArr.push(this.formatData(it, 2, id));
})
console.log({
...this.formData,
dcExecuteAction: dcArr
})
// console.log({
// ...this.formData,
// dcExecuteAction: dcArr
// })
// return;
if (this.dialogType == 1) {//
request({

34
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/formTable/index.vue

@ -20,13 +20,13 @@
</el-option>
</el-select>
<el-input-number v-if="scope.row.searchRule == 2" v-model="scope.row.number" :min="0"
:max="9999" style="width: 130px;"></el-input-number>
<p v-if="scope.row.searchRule == 2"></p>
<el-input-number v-if="scope.row.searchRule == 2 || scope.row.searchRule == 3"
v-model="scope.row.number" :min="0" :max="9999" style="width: 130px;"></el-input-number>
<p v-if="scope.row.searchRule == 2 || scope.row.searchRule == 3"></p>
<el-input-number v-if="scope.row.searchRule == 3" v-model="scope.row.number" :min="0"
<el-input-number v-if="scope.row.searchRule == 4" v-model="scope.row.number" :min="0"
:max="9999" style="width: 130px;"></el-input-number>
<p v-if="scope.row.searchRule == 3" style="width: 56px;">公里</p>
<p v-if="scope.row.searchRule == 4" style="width: 56px;">公里</p>
</div>
</template>
@ -41,25 +41,25 @@
:value="item.id">
</el-option>
</el-select>
<el-input @click.native="clickQbb(scope.$index)" v-if="scope.row.deviceType == 1"
<el-input @click.native="clickQbb(scope.$index)" v-if="scope.row.deviceType == 2"
placeholder="请选择" v-model="scope.row.qbb" readonly>
<i slot="suffix" class="el-input__icon el-icon-search"></i>
</el-input>
<el-select v-if="scope.row.deviceType == 2" v-model="scope.row.gzms" placeholder="工作模式">
<el-select v-if="scope.row.deviceType == 10" v-model="scope.row.gzms" placeholder="工作模式">
<el-option v-for="item in gzmsOptions" :key="item.value" :label="item.label"
:value="item.value"></el-option>
</el-select>
<el-input-number v-if="scope.row.deviceType == 2" placeholder="操作时长(分钟)"
<el-input-number v-if="scope.row.deviceType == 10" placeholder="操作时长(分钟)"
v-model="scope.row.operationDuration" :min="0" :max="999"></el-input-number>
<div v-if="scope.row.deviceType == 3" class="mjs">
<div v-if="scope.row.deviceType == 12" class="mjs">
<el-select v-model="scope.row.controlModel" placeholder="请选择控制模式">
<el-option label="手动模式" :value="1"></el-option>
<el-option label="自动模式" :value="2"></el-option>
<el-option label="万年历" :value="3"></el-option>
<el-option label="手动模式" value="00"></el-option>
<el-option label="自动模式" value="01"></el-option>
<el-option label="万年历" value="02"></el-option>
</el-select>
<el-time-picker v-if="scope.row.controlModel == 2" v-model="scope.row.time" is-range
<el-time-picker v-if="scope.row.controlModel == '01'" v-model="scope.row.time" is-range
style="" range-separator="-" placeholder="选择时间" value-format="HH:mm" format="HH:mm">
</el-time-picker>
<el-select v-model="scope.row.state" placeholder="工作状态">
@ -68,7 +68,7 @@
</el-select>
</div>
<el-input v-if="scope.row.deviceType == 4" v-model="scope.row.content"
<el-input v-if="scope.row.deviceType == 5" v-model="scope.row.content"
placeholder="请输入发布内容"></el-input>
</div>
@ -87,7 +87,7 @@
</Table>
<!-- 情报板弹窗 -->
<QbbDialog :visible="isShowDialog" @close="onCloseDialog" @dialogSubmit="dialogSubmit" />
<QbbDialog :visible="isShowDialog" :info="qbbData" @close="onCloseDialog" @dialogSubmit="dialogSubmit" />
</div>
</template>
@ -269,6 +269,7 @@ export default {
label: "自定义模式3",
}
],
qbbData: {},
sbOptions: [],
deviceType: 1,
index: 1
@ -320,6 +321,7 @@ export default {
},
clickQbb(index) {
this.index = index;
this.qbbData = this.tableData[index].dcInfoBoardTemplate;
this.isShowDialog = true;
},
onCloseDialog() {
@ -327,7 +329,7 @@ export default {
},
dialogSubmit(data) {
this.tableData[this.index].qbb = data.content;
this.tableData[this.index].otherConfig = JSON.stringify({ dcInfoBoardTemplate: data });
this.tableData[this.index].otherConfig = JSON.stringify(data);
}
}
}

33
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/index.vue

@ -28,8 +28,8 @@
<ElTableColumn prop="strEventType" label="事件类型" width="100" align="center" />
<ElTableColumn prop="planName" label="预案名称" width="140" align="center" />
<ElTableColumn prop="triggeringCondition" label="检索条件" width="140" />
<ElTableColumn prop="deviceType" label="设备类型" width="140" />
<ElTableColumn prop="controllableDevice" label="可控设备" width="200" />
<ElTableColumn prop="deviceType" label="设备类型" />
<ElTableColumn prop="controllableDeviceName" label="可控设备"/>
<ElTableColumn prop="controlCommand" label="控制指令" />
<ElTableColumn label="操作" width="210" align="center">
<template slot-scope="scope">
@ -65,7 +65,8 @@ import { Message } from 'element-ui'
import { searchFormList } from './data';
const eventTypeMap = {
0: {
0: {},
1: {
1: '交通事故',
2: '车辆故障',
3: '交通管制',
@ -78,7 +79,7 @@ const eventTypeMap = {
10: '异常天气',
11: '其他事件',
},
1: {
2: {
1: '异常天气',
2: '拥堵',
3: '非机动车',
@ -87,10 +88,25 @@ const eventTypeMap = {
6: '抛洒物',
7: '逆行',
},
2: {}
3: {}
}
const deviceMap = {
1: '摄像机',
2: '可变信息标志',
3: '气象监测器',
4: '出口诱导灯',
5: '路段语音广播',
6: '护栏碰撞',
7: '毫米波雷达',
8: '合流区预警',
9: '智慧锥桶',
10: '激光疲劳唤醒',
11: '类交通量调查站',
12: '行车诱导',
13: '智能设备箱',
14: '光线在线监测',
}
export default {
name: 'controlEventPlan',
@ -128,8 +144,9 @@ export default {
}).then((result) => {
if (result.code != 200) return Message.error(result?.msg);
result.rows.forEach(it => {
it.strEventCategory = it.eventCategory == 0 ? '交通事件' : '感知事件';
it.strEventCategory = it.eventCategory == 1 ? '交通事件' : '感知事件';
it.strEventType = eventTypeMap[it.eventCategory || 0][it.eventType];
// it.strDeviceType = deviceMap[it.deviceType];
})
this.tableData = result.rows;
this.total = result.total;
@ -154,7 +171,7 @@ export default {
this.isShowDialog = true;
},
handleSearch(data) {
console.log(data);
// console.log(data);
this.searchData = { ...this.searchData, ...data }
this.initData();
},

7
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/qbbDialog/index.vue

@ -49,7 +49,7 @@ export default {
},
props: {
visible: Boolean,
detail: {
info: {
type: Object,
default: () => { }
}
@ -72,6 +72,11 @@ export default {
computed: {
modelVisible: {
get() {
if (this.visible) {
if (this.info && this.info.id) {
this.radio1 = Number(this.info.id);
}
}
return this.visible;
},
set(val) {

64
ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/statisticalAnalysis/assets/charts.js

@ -6,15 +6,6 @@ let options = {
valueFormatter: (value) => {
return value + "%";
},
// backgroundColor: "rgba(17,95,182,0.5)",
// textStyle: {
// color: "#fff",
// },
// formatter: function (params) {
// return (
// params[0].name + params[0].seriesName + ": " + params[0].value + "%"
// );
// },
},
grid: {
left: "2%",
@ -36,12 +27,8 @@ let options = {
opacity: 1,
},
},
// lineStyle: {
// show: true,
// type: 'solid'
// },
axisLabel: {
interval: 0,
interval: "auto",
textStyle: {
color: "rgba(255,255,255,0.8)",
fontSize: 14,
@ -51,9 +38,7 @@ let options = {
},
yAxis: [
{
type: "category",
minInterval: 20,
maxInterval: 20,
// type: "category",
name: "",
nameTextStyle: {
align: "left",
@ -84,59 +69,23 @@ let options = {
fontSize: 14,
},
},
data: ["0", "3", "6", "9", "12", "15", "18"],
},
],
legend: {
top: "5%",
right: "5%",
icon: "rect",
itemWidth: 25,
itemHeight: 10,
right: "0",
textStyle: {
color: "#fff",
fontSize: 14,
},
lineStyle: {
show: false,
color: "#00E4BB",
itemStyle: {
color: "#00D6B2",
},
data: [
{
name: "高清网络球型摄像机",
itemStyle: {
color: new echarts.graphic.LinearGradient(
0,
0,
0,
1,
[
{
offset: 0,
color: "#00E4BB", // 0% 处的颜色
},
{
offset: 1,
color: "#003B4E", // 100% 处的颜色
},
],
false
),
},
},
{
name: "增涨率",
itemStyle: {
color: "#755400",
},
},
],
itemGap: 12, // 设置间距
},
series: [
// 下半截柱状图
{
name: "在线率",
name: "高清网络枪型固定摄像机",
type: "bar",
barWidth: 12,
barGap: "-100%",
@ -165,7 +114,6 @@ let options = {
);
},
},
data: [],
},
{

105
ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/statisticalAnalysis/index.vue

@ -75,10 +75,10 @@
<template slot-scope="scope">
<span>{{
scope.row.direction == "1"
? "上行"
? "菏泽"
: scope.row.direction == "2"
? "中间"
: "下行"
? "双向"
: "济南"
}}</span>
</template>
</el-table-column>
@ -347,45 +347,56 @@ export default {
},
initQueryChart() {
this.setStatus("01", "doing");
let data = this.searchFormList[1].options.options;
let typeLabel = "";
console.log("data", data);
data.forEach((item) => {
if (item.value == this.typeQuery) {
typeLabel = item.label;
}
});
getSystemStatusList({
startTime: this.startTime,
time: this.time,
type: this.typeQuery,
}).then((res) => {
if (res.code == 200) {
if (res.data && Object.keys(res.data).length > 0) {
this.setStatus("01", "finish");
let origin = res.data;
let startStamp = +moment(this.startTime).startOf("day").format("x");
let endStamp = +moment(this.time).endOf("day").format("x");
let oneDay = 86400000;
let daysTotal = Math.ceil((endStamp - startStamp) / oneDay);
let queryChartData = [];
let dataX = [];
let data0 = [];
let data1 = [];
for (let i = 0; i < daysTotal; i++) {
let ts = startStamp + i * oneDay;
let date = moment(ts).format("YYYY-M-D");
let val = origin[date] ? +origin[date].replace("%", "") : 0;
dataX.push(moment(ts).format("MM-DD"));
data0.push(val);
data1.push(100);
}
chartsStatistics.xAxis.data = dataX;
chartsStatistics.series[0].data = data0;
chartsStatistics.series[1].data = data1;
chartsStatistics.yAxis[0].name = "在线率(%)";
this.$nextTick(() => {
this.queryChart.setOption(chartsStatistics);
});
} else {
this.setStatus("01", "empty");
console.log("res.data", res.data);
// if (res.data && Object.keys(res.data).length > 0) {
console.log("res.data", res.data);
this.setStatus("01", "finish");
let origin = res.data;
let startStamp = +moment(this.startTime).startOf("day").format("x");
let endStamp = +moment(this.time).endOf("day").format("x");
let oneDay = 86400000;
let daysTotal = Math.ceil((endStamp - startStamp) / oneDay);
let queryChartData = [];
let dataX = [];
let data0 = [];
let data1 = [];
for (let i = 0; i < daysTotal; i++) {
let ts = startStamp + i * oneDay;
let date = moment(ts).format("YYYY-M-D");
let val = origin[date] ? +origin[date].replace("%", "") : 0;
dataX.push(moment(ts).format("MM-DD"));
data0.push(val);
data1.push(100);
}
chartsStatistics.xAxis.data = dataX;
chartsStatistics.series[0].data = data0;
chartsStatistics.series[0].name = typeLabel;
chartsStatistics.series[1].data = data1;
chartsStatistics.yAxis[0].name = "在线率(%)";
chartsStatistics.legend = {
show: true,
};
this.$nextTick(() => {
this.queryChart.setOption(chartsStatistics);
});
// } else {
// this.setStatus("01", "empty");
// }
}
});
},
@ -400,18 +411,18 @@ export default {
pageSize: pageSize,
}).then((res) => {
if (res.code == 200) {
if (res.rows && res.rows.length > 0) {
this.setStatus("02", "finish");
this.pageIndex = pageIndex;
this.pageSize = pageSize;
this.pageTotal = res.total;
this.tableData = res.rows;
this.tableData.forEach((it, index) => {
it.order = (pageIndex - 1) * pageSize + index + 1;
});
} else {
this.setStatus("02", "empty");
}
// if (res.rows && res.rows.length > 0) {
this.setStatus("02", "finish");
this.pageIndex = pageIndex;
this.pageSize = pageSize;
this.pageTotal = res.total;
this.tableData = res.rows;
this.tableData.forEach((it, index) => {
it.order = (pageIndex - 1) * pageSize + index + 1;
});
// } else {
// this.setStatus("02", "empty");
// }
}
});
},

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

@ -82,6 +82,7 @@ export const CameraControlTypeEnum = {
},
};
//交通事件类型
export const EventTopics = {
交通事故: 1,
车辆故障: 2,
@ -134,20 +135,20 @@ export const InfoWarningSource = {
},
};
// 事件主类 warningType
// 感知事件主类 warningType
export const WarningType = {
1: "交通拥堵",
2: "行人",
3: "非机动车",
4: "停车",
5: "倒车/逆行",
6: "烟火",
7: "撒落物",
5: "违规驾驶",
6: "路障",
7: "道路施工",
8: "异常天气",
9: "护栏碰撞",
10: "交通事故",
11: "车辆故障",
99: "其他",
99: "其他事件",
};
export const WarningTypeList = Object.keys(WarningType).map((key) => {
@ -157,7 +158,7 @@ export const WarningTypeList = Object.keys(WarningType).map((key) => {
};
});
// 事件主类的子类(上方) warningSubclass
// 感知事件主类的子类(上方) warningSubclass
export const WarningSubclass = {
1: {
"1-1": "拥堵",
@ -177,20 +178,29 @@ export const WarningSubclass = {
"4-2": "工程车",
"4-3": "主路有车",
"4-4": "匝道有车",
"4-5": "车辆故障",
"4-6": "交通事故",
// "4-5": "车辆故障",
// "4-6": "交通事故",
"4-7": "应急车道被占用",
"4-8": "车离开应急车道",
"4-9": "其他",
},
5: {
"5-1": "倒车/逆行",
"5-2": "压线",
"5-3": "掉头",
"5-4": "超速",
"5-5": "低速",
"5-6": "违规变道",
"5-7": "未保持安全距离",
},
6: {
"6-1": "烟火",
"6-1": "烟雾",
"6-2": "火灾",
"6-3": "障碍物",
"6-4": "抛洒物",
},
7: {
"7-1": "撒落物",
"7-1": "道路施工",
},
8: {
"8-1": "雨",
@ -209,8 +219,18 @@ export const WarningSubclass = {
"9-2": "只倾斜无碰撞",
"9-3": "碰撞后倾斜",
},
10: {
"10-1": "未知",
"10-2": "单车事故",
"10-3": "多车事故",
},
11: {
"11-1": "车辆抛锚",
"11-2": "车辆炸胎(有备胎)",
"11-3": "车辆炸胎(无备胎)",
},
99: {
"99-1": "其他",
"99-1": "其他事件",
},
};
@ -230,7 +250,7 @@ export const WarningSubclassList = Object.keys(WarningSubclass).reduce(
export const LaneOccupancy = {
0: {
text: "应急车道",
text: "应急",
},
1: {
text: "行1",
@ -283,3 +303,9 @@ export const ChildTypes = {
1: CameraChildTypes,
2: BoardChildTypes,
};
export const DirectionTypes = {
1: "菏泽方向",
3: "济南方向",
2: "双向",
};

3
ruoyi-ui/vue.config.js

@ -52,10 +52,11 @@ 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.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.65.103:8097`,
changeOrigin: true,
pathRewrite: {
["^" + process.env.VUE_APP_BASE_API]: "",

Loading…
Cancel
Save