Browse Source

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

wangqin
zhangzhang 11 months ago
parent
commit
414fdb1e31
  1. 7
      ruoyi-ui/src/common/menuData.js
  2. 244
      ruoyi-ui/src/views/JiHeExpressway/components/CameraShower/index.vue
  3. BIN
      ruoyi-ui/src/views/JiHeExpressway/images/digital/digitalTollStation.jpg
  4. 7
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Camera/components/CameraControlDialog.vue
  5. 7
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Camera/index.vue
  6. 366
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/FatigueWakesUp/components/DeviceControlDialog.vue
  7. 24
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/FatigueWakesUp/index.vue
  8. 2
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/GuardrailCollision/index.vue
  9. 11
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Intermodulation/components/LineChartForTraffic/index.vue
  10. 18
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/HomeFilter/index.vue
  11. 27
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/index.vue
  12. 27
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/httpList.js
  13. 42
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/map.js
  14. 6
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/dutyOfficer/components/ModifyDutyInformationTable.vue
  15. 33
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/EventDetailDialog/eventPlanDialog/index.vue
  16. 16
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/EventDetailDialog/formTable/index.vue
  17. 4
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/EventDetailDialog/index.vue
  18. 22
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/EventDetailDialog/qbbDialog/index.vue
  19. 60
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/data.js
  20. 13
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/index.vue
  21. 51
      ruoyi-ui/src/views/JiHeExpressway/pages/datav/roadNet/index.vue
  22. 5
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/dailyDisposal/index.vue
  23. 5
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventQuery/assets/charts2.js
  24. 381
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventQuery/index.vue
  25. 6
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventSource/index.vue
  26. 25
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/typeAnalysis/index.vue
  27. 2
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/index.vue
  28. 10
      ruoyi-ui/src/views/JiHeExpressway/pages/service/PublishingChannelManagement/components/Switcher.vue
  29. 4
      ruoyi-ui/src/views/JiHeExpressway/utils/enum.js
  30. 4
      ruoyi-ui/vue.config.js

7
ruoyi-ui/src/common/menuData.js

@ -156,6 +156,11 @@ export default [
component: "maintenanceOperations/statisticalAnalysis/index.vue",
}
]
}, {
title: "边坡光伏",
name: "photovoltaic",
path: "/maintain/photovoltaic",
component: "developing.vue"
}
]
},
@ -239,7 +244,7 @@ export default [
],
},
{
title: "配置中心",
title: "安全生产",
name: "config",
position: "right",
path: "/config",

244
ruoyi-ui/src/views/JiHeExpressway/components/CameraShower/index.vue

@ -1,38 +1,54 @@
<template>
<div v-if="visible" class="compBox">
<div class="head" style="height:4vh;">
<div class="tit">附近相机</div>
<img class="btnCls" src="@/assets/jihe/images/dialog/ibCls.png" alt="" @click="onClose">
<img class="deco" src="@/assets/jihe/images/dialog/ibHeadDeco.png" alt="">
<div class="head" style="height:4vh;">
<div class="tit">附近相机</div>
<img class="btnCls" src="@/assets/jihe/images/dialog/ibCls.png" alt="" @click="onClose">
<img class="deco" src="@/assets/jihe/images/dialog/ibHeadDeco.png" alt="">
</div>
<template v-if="list.length > 0">
<!-- <p>{{ list }}</p> -->
<div class="videoPlayer">
<!-- <videoView :url="slectedVideo" /> -->
<Video class="video-stream" :camId="selectedCamera.camId" />
</div>
<template v-if="list.length>0">
<!-- <p>{{ list }}</p> -->
<div class="videoPlayer">
<!-- <videoView :url="slectedVideo" /> -->
<Video class="video-stream" :camId="selectedCamera.camId" />
</div>
<div class="operation">
<div class="selectCam">
<div class="label">选择相机: </div>
<div class="val">
<el-select v-model="selectedCameraIndex" placeholder="请选择" size="mini" @change="onChangeCamera">
<el-option v-for="item,index in list" :key="index" :label="item.camName" :value="index">
</el-option>
</el-select>
</div>
</div>
<el-button type="primary" icon="el-icon-s-operation" class="controlCam" v-if="selectedCamera.ptzCtrl == 0" @click="controlDialogVisible=!controlDialogVisible"></el-button>
<CameraController :visible.sync="controlDialogVisible" v-if="controlDialogVisible" :deviceId="selectedCamera.camId" class="cameraControl"/>
</div>
<div class="flex1 txtInfo">
<p v-for="item in cameraInfo" :key="item.value" class="txtItem">
<span class="label">{{ item.title }}: </span>
<span class="val">{{ item.value }}</span>
</p>
</div>
<!-- <div class="camera_bom_right">
<div class="operation">
<div class="selectCam">
<div class="label">选择相机: </div>
<div class="val">
<el-select v-model="selectedCameraIndex" placeholder="请选择" size="mini" @change="onChangeCamera">
<el-option v-for="item, index in list" :key="index" :label="item.camName" :value="index">
</el-option>
</el-select>
</div>
</div>
<el-button type="primary" icon="el-icon-s-operation" class="controlCam" v-if="selectedCamera.ptzCtrl == 0"
@click="controlDialogVisible = !controlDialogVisible"></el-button>
<CameraController :visible.sync="controlDialogVisible" v-if="controlDialogVisible"
:deviceId="selectedCamera.camId" class="cameraControl" />
</div>
<div class="flex1 txtInfo">
<p v-for="item in cameraInfo" :key="item.value" class="txtItem">
<span class="label">{{ item.title }}: </span>
<span class="val">{{ item.value }}</span>
</p>
<div v-if="PanoramicCameraTypes.indexOf(selectedCamera.childType) == -1" style="width: 50%; display: flex;">
<span style="
color: #3de8ff;
font-size: 15px;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
line-height: 18px;
">
雨刷:
</span>
<Button style="margin-left: 5px" @click.native="controlClick(49)"></Button>
<Button style="margin-left: 5px" @click.native="controlClick(48)"></Button>
</div>
</div>
<!-- <div class="camera_bom_right">
<div class="camera_bom_right_t">
<div class="camera_bom_right_t_box"></div>
<div class="camera_bom_right_t_h_po" v-for="item in cameraBtnList" :key="item.id"
@ -58,11 +74,16 @@
import Video from "@screen/components/Video"
import CameraController from "./CameraController.vue";
import { controlCamera, getDeviceInfo } from "@screen/pages/Home/components/RoadAndEvents/utils/httpList.js";
import { PanoramicCameraTypes, CameraChildTypes } from "@screen/utils/enum.js";
import { throttle } from "lodash";
import Button from "@screen/components/Buttons/Button.vue";
export default {
name: '',
components: {
Video,
Button,
CameraController
},
props: {
@ -70,78 +91,94 @@ export default {
type: Array,
default: () => []
},
visible:{
type:Boolean,
default:false
visible: {
type: Boolean,
default: false
}
},
data() {
return {
booooooool:true,
selectedCameraIndex:null,
selectedCamera:{},
cameraInfo:[],
controlDialogVisible:false
booooooool: true,
selectedCameraIndex: null,
selectedCamera: {},
PanoramicCameraTypes,
cameraInfo: [],
controlDialogVisible: false
}
},
watch:{
list:{
handler(){
watch: {
list: {
handler() {
this.selectCamera();
},
deep:true,
deep: true,
}
},
mounted(){
mounted() {
},
methods:{
onClose (){
this.$emit("update:visible" , false)
},
onChangeCamera(val){
methods: {
controlClick: throttle(function (type) {
if (this.selectedCamera.deviceState != "0")
controlCamera(this.selectedCamera.camId, type, false);
else this.$message.info("设备离线, 无法操作")
}, 150),
onClose() {
this.$emit("update:visible", false)
},
onChangeCamera(val) {
this.selectCamera();
},
selectCamera(){
if(this.list.length <= 0){
async selectCamera() {
if (this.list.length <= 0) {
return
}
if(this.selectedCameraIndex == null){
if (this.selectedCameraIndex == null) {
this.selectedCameraIndex = 0;
}
this.selectedCamera = this.list[this.selectedCameraIndex];
const deviceInfo = (await getDeviceInfo(this.selectedCamera.camId))?.[0] || {};
const childType = deviceInfo.childType;
this.$set(this.selectedCamera, 'childType', childType);
this.$set(this.selectedCamera, 'deviceState', deviceInfo.deviceState);
let cmr = this.selectedCamera;
this.cameraInfo = [
{title:"道路名称", value:cmr.deptName },
{title:"道路编号", value:cmr.road },
{title:"设备名称", value:cmr.camName },
{title:"设备编号", value:cmr.camId },
{title:"设备桩号", value:cmr.pileNum },
{title:"相机类型", value:["球机","枪机"][+cmr.ptzCtrl] },
{ title: "道路名称", value: cmr.deptName },
{ title: "道路编号", value: cmr.road },
{ title: "设备名称", value: cmr.camName },
{ title: "设备编号", value: cmr.camId },
{ title: "设备桩号", value: cmr.pileNum },
{ title: "相机类型", value: childType ? CameraChildTypes[childType] : ["球机", "枪机"][+cmr.ptzCtrl] },
// {title:"", value:cmr.camStatus }
];
},
onControlCamera(val){
console.log(val , "vallllllllll")
}
onControlCamera(val) {
console.log(val, "vallllllllll")
}
}
}
</script>
<style lang='scss' scoped>
@mixin fontClass{
fontSize:14px; color:#FFF;
@mixin fontClass {
fontSize: 14px;
color: #FFF;
}
$colorLabel: #3DE8FF;
.compBox{
.compBox {
display: flex;
flex-direction: column;
position: relative;
.cameraControl{
.cameraControl {
position: absolute;
right: -2px;
top:-2px;
top: -2px;
transform: translateX(100%);
}
.head {
height: 48px;
padding: 0 10px;
@ -153,18 +190,18 @@ $colorLabel: #3DE8FF;
display: flex;
justify-content: space-between;
align-items: center;
.tit {
color: #3de8ff;
font-size: 18px;
}
.btnCls {
width: 13px;
height: 13px;
cursor: pointer;
}
.deco {
width: 55%;
height: 5px;
@ -173,39 +210,74 @@ $colorLabel: #3DE8FF;
top: 0;
}
}
.flex1{
flex: 1; height:0;
.flex1 {
flex: 1;
height: 0;
}
.videoPlayer { height: 246px;
.video-stream{ width: 100%; height: 100%;}
.videoPlayer {
height: 246px;
.video-stream {
width: 100%;
height: 100%;
}
}
.operation{
display: flex; flex-direction: row; height: 36px; justify-content: space-between; align-items: center; padding: 0 20px; border-bottom:1px solid #3DE8FF; position: relative;
.selectCam{ display: flex; flex-direction: row;
.label{
.operation {
display: flex;
flex-direction: row;
height: 36px;
justify-content: space-between;
align-items: center;
padding: 0 20px;
border-bottom: 1px solid #3DE8FF;
position: relative;
.selectCam {
display: flex;
flex-direction: row;
.label {
margin-right: 6px;
@include fontClass;
color: $colorLabel;
}
.val{ width: 220px; }
.val {
width: 220px;
}
}
.controlCam{
.controlCam {
padding: 3px;
font-size: 20px;
background: linear-gradient(180deg, #005C79 0%, #009BCC 100%);
border: none;
box-shadow: 0 0 4px rgba(0,0,0,0.3);
box-shadow: 0 0 4px rgba(0, 0, 0, 0.3);
}
}
.txtInfo{
flex: 1; overflow-y: scroll; padding: 20px 20px 10px; display: flex; flex-wrap: wrap; align-content:flex-start;
.txtItem{
width: 0; flex-basis: 50%; height: 34px;
.label{
.txtInfo {
flex: 1;
overflow-y: scroll;
padding: 20px 20px 10px;
display: flex;
flex-wrap: wrap;
align-content: flex-start;
.txtItem {
width: 0;
flex-basis: 50%;
height: 34px;
.label {
@include fontClass;
color: $colorLabel;
}
.val{
.val {
@include fontClass;
}
}

BIN
ruoyi-ui/src/views/JiHeExpressway/images/digital/digitalTollStation.jpg

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 MiB

After

Width:  |  Height:  |  Size: 9.5 MiB

7
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Camera/components/CameraControlDialog.vue

@ -54,7 +54,8 @@ export default {
},
props: {
visible: Boolean,
deviceId: String
deviceId: String,
dialogData: Object
},
data() {
return {
@ -103,7 +104,9 @@ export default {
},
methods: {
controlClick: throttle(function (type) {
controlCamera(this.deviceId, type)
if (this.dialogData.deviceState != "0")
controlCamera(this.deviceId, type)
else this.$message.info("设备离线, 无法操作")
}, 150),
async handleSwitcherChange(value, data) {
let str = data.state ? "关闭" : "开启";

7
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Camera/index.vue

@ -40,7 +40,7 @@
</div> -->
</div>
<CameraControlDialog :deviceId="dialogData.iotDeviceId" v-model="controlDialogVisible" />
<CameraControlDialog :deviceId="dialogData.iotDeviceId" :dialogData="dialogData" v-model="controlDialogVisible" />
</Dialog>
</template>
@ -140,7 +140,10 @@ export default {
},
methods: {
controlClick: throttle(function (type) {
controlCamera(this.dialogData.iotDeviceId, type, false);
// console.log(this.dialogData, "dialogData")
if (this.dialogData.deviceState != "0")
controlCamera(this.dialogData.iotDeviceId, type, false);
else this.$message.info("设备离线, 无法操作")
}, 150),
visibleClose(bool) {
if (bool) return;

366
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/FatigueWakesUp/components/DeviceControlDialog.vue

@ -2,13 +2,80 @@
<Dialog v-model="modelVisible" title="设备操作">
<div class='DeviceControlDialog'>
<ElTabs v-model="activeName" class="tabs">
<ElTabs v-model="activeName" class="tabs" @tab-click="tabClick">
<ElTabPane label="一般模式" name="first">
<Form v-model="formData" class="form" ref="FormConfigRef" :formList="formList1" column="1"
labelWidth="120px" />
</ElTabPane>
<ElTabPane label="自定义模式" name="second">
<Form class="form" ref="FormConfigRef" :formList="formList2" column="1" labelWidth="120px" />
<div style="display: flex; margin: 20px 0;">
<p style="width: 115px;">工作时长():</p>
<el-input-number v-model="onWorkStatus2" :min="0" :max="999" label="工作时长(s分):"></el-input-number>
</div>
<Table :data="tableData">
<ElTableColumn prop="ds" label="段数"></ElTableColumn>
<ElTableColumn prop="time" width="120" label="时间">
<template slot-scope="scope">
<div style="display: flex;">
<el-input-number style="width: 80px;" v-model="scope.row.time" :min="0" :max="999"></el-input-number>
<p></p>
</div>
</template>
</ElTableColumn>
<ElTableColumn prop="A" label="线路A">
<template slot-scope="scope">
<el-switch v-model="scope.row.A" active-color="#13ce66" inactive-color="#C9C9C9">
</el-switch>
</template>
</ElTableColumn>
<ElTableColumn prop="B" label="线路B">
<template slot-scope="scope">
<el-switch v-model="scope.row.B" active-color="#13ce66" inactive-color="#C9C9C9">
</el-switch>
</template>
</ElTableColumn>
<ElTableColumn prop="C" label="线路C">
<template slot-scope="scope">
<el-switch v-model="scope.row.C" active-color="#13ce66" inactive-color="#C9C9C9">
</el-switch>
</template>
</ElTableColumn>
<ElTableColumn prop="D" label="线路D">
<template slot-scope="scope">
<el-switch v-model="scope.row.D" active-color="#13ce66" inactive-color="#C9C9C9">
</el-switch>
</template>
</ElTableColumn>
<ElTableColumn prop="E" label="线路E">
<template slot-scope="scope">
<el-switch v-model="scope.row.E" active-color="#13ce66" inactive-color="#C9C9C9">
</el-switch>
</template>
</ElTableColumn>
<ElTableColumn prop="F" label="线路F">
<template slot-scope="scope">
<el-switch v-model="scope.row.F" active-color="#13ce66" inactive-color="#C9C9C9">
</el-switch>
</template>
</ElTableColumn>
<ElTableColumn prop="G" label="线路G">
<template slot-scope="scope">
<el-switch v-model="scope.row.G" active-color="#13ce66" inactive-color="#C9C9C9">
</el-switch>
</template>
</ElTableColumn>
<ElTableColumn prop="H" label="线路H">
<template slot-scope="scope">
<el-switch v-model="scope.row.H" active-color="#13ce66" inactive-color="#C9C9C9">
</el-switch>
</template>
</ElTableColumn>
</Table>
</ElTabPane>
</ElTabs>
</div>
@ -25,13 +92,11 @@
</template>
<script>
import Table from '@screen/components/Table.vue';
import Dialog from "@screen/components/Dialog/index.vue";
import Button from "@screen/components/Buttons/Button.vue"
import Form from '@screen/components/FormConfig';
import { delay } from "@screen/utils/common.js"
import request from "@/utils/request";
import { Message } from "element-ui";
@ -40,7 +105,8 @@ export default {
components: {
Dialog,
Button,
Form
Form,
Table
},
model: {
prop: 'visible',
@ -54,40 +120,77 @@ export default {
return {
submitting: false,
activeName: "first",
onWorkStatus2: 0,
formData: {},
duan: ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T'],
tableData: [
// {
// ds: 'A',
// time: 0,
// A: false,
// B: false,
// C: false,
// D: false,
// E: false,
// F: false,
// G: false,
// H: false,
// }
],
formList1: [
{
label: "设备模式:",
label: "工作模式:",
key: "controlType",
type: "RadioGroup",
default: "00",
type: "select",
default: "1",
options: {
type: 'circle',
options: [
{
key: "00",
label: "常量",
value: "0",
label: "激光关闭"
},
{
key: "01",
label: "闪烁",
}
value: "1",
label: "常亮模式"
},
{
value: "2",
label: "间隔100ms闪烁模式"
},
{
value: "3",
label: "间隔200ms闪烁模式",
},
{
value: "4",
label: "间隔500ms闪烁模式",
},
{
value: "5",
label: "2次闪烁模式"
},
{
value: "6",
label: "SOS模式"
},
],
},
},
{
label: "操作时长:",
label: "工作时长(分):",
key: "onWorkStatus",
required: true,
type: "select",
default: 0,
type: "inputNumber",
options: {
placeholder: "请选择",
min: 0,
max: 999
}
},
],
formList2: [
{
label: "设备模式:",
label: "工作模式:",
key: "controlType",
type: "RadioGroup",
default: "00",
@ -115,7 +218,7 @@ export default {
}
},
{
label: "作时长:",
label: "作时长:",
key: "onWorkStatus",
required: true,
type: "select",
@ -123,12 +226,21 @@ export default {
placeholder: "请选择",
}
},
]
],
rules: {
onWorkStatus: [
{ required: true, message: '工作时长不能为空', trigger: 'blur' },
],
}
}
},
computed: {
modelVisible: {
get() {
if (this.visible) {
// this.deviceId = 'K82+285';
this.initData();
}
return this.visible
},
set(val) {
@ -136,138 +248,128 @@ export default {
}
}
},
watch: {
modelVisible: {
immediate: true,
handler(bool) {
if (!bool) return;
// watch: {
// modelVisible: {
// immediate: true,
// handler(bool) {
// if (!bool) return;
// this.reDisplay();
}
}
},
// // this.requestURL();
// }
// }
// },
methods: {
requestURL(functionId, options = {}) {
return new Promise((resolve, reject) => {
request.post(`business/device/functions/${this.deviceId}/${functionId}`, options)
.then((result) => {
if (result.code != 200) return reject();
resolve(result.data[0]);
})
.catch((err) => {
reject();
});
async initData() {
//
let result = await this.requestURL('ASKMD');
if (result.data == 7) {
this.activeName = 'second';
this.tabClick();
} else {
this.formData.controlType = result.data + "" || '1';
//
let resultTime = await this.requestURL('ASKTM');
this.formData.onWorkStatus = resultTime.data || 0;
this.activeName = 'first';
}
},
async requestURL(functionId, options = {}) {
let result = await request({
url: `/business/device/functions/${this.deviceId}/${functionId}`,
method: "post",
data: options,
});
if (result.code != 200) return Message.error(result?.msg);
//SETMDASKMDSETTMASKTMSETDFASKDF
console.log('aaaa', result);
return result;
},
reDisplay() {
this.requestURL(52)
.then(async (data) => {
await delay(0);
const formData = this.$refs.FormConfigRef?.formData;
async tabClick() {
if (this.activeName == 'second') {
//
let result = await request({
url: `/business/device/properties/latest/${this.deviceId}`,
method: "get",
});
if (result.code != 200) return Message.error(result?.msg);
formData.controlType = data.mode;
switch (data.mode) {
case "00":
formData.onWorkStatus = data.onWorkStatus;
formData.inWorkStatus = data.inWorkStatus;
break;
case "01":
case "02":
await this.requestURL("3C")
.then((data2) => {
formData.onWorkStatus = data2.onWorkStatus;
formData.inWorkStatus = data2.inWorkStatus;
if (data.mode === '01')
formData.displayTime = [data.startDisplay, data.endDisplay];
})
.catch(() => { });
break;
this.tableData = [];
let tData = [];
result.data.forEach(item => {
if (item.property == 'TM') {
this.onWorkStatus2 = item.value;
} else if (item.property == 'MD') {
} else {
let data = JSON.parse(item.value || {});
tData.push({ ...data, ds: item.property })
}
this.oldFormData = { ...formData };
})
this.tableData = tData;
}
},
handleSubmit() {
const result = {}, formData = this.$refs.FormConfigRef?.formData;
result.mode = formData.controlType;
delete result.controlType;
async handleSubmit() {
if (this.activeName == 'first') {//
this.$refs.FormConfigRef.validate().then(async (formData) => {
console.log('formData', formData);
//
await this.requestURL('SETMD', { SET: formData.controlType })
//
let res = await this.requestURL('SETTM', { SET: formData.onWorkStatus })
console.log('res', res)
if (res.code == 200) {
Message.success('设置成功!');
this.$emit('update:value', false)
}
});
} else if (this.activeName == 'second') {//
let rData = [];
if (result.mode === '01') {
if (!formData.displayTime?.length) return Message.error(`时间不能为空!`);
}
this.tableData.forEach((it, index) => {
rData.push({
order: 7,
time: it.time,
numberOfSegments: this.duan[index],
A: Number(it.A),
B: Number(it.B),
C: Number(it.C),
D: Number(it.D),
E: Number(it.E),
F: Number(it.F),
G: Number(it.G),
H: Number(it.H),
})
})
if (!formData.onWorkStatus || !formData.inWorkStatus) return Message.error(`工作状态不能为空!`);
//
await request({
url: `/business/device/batchLaserFatigueInvokedFunction`,
method: "post",
data: {
deviceId: this.deviceId,
functionId: 'SETDF',
params: rData
}
});
//
let res = await this.requestURL('SETTM', { SET: this.onWorkStatus2 });
if (res.code == 200) {
Message.success('设置成功!')
this.$emit('update:value', false)
}
if (["01", "02"].includes(result.mode)) {
if (["04", "00"].includes(formData.onWorkStatus)) return Message.error(`上行工作状态不能选择当前类型!`);
if (["04", "00"].includes(formData.inWorkStatus)) return Message.error(`下行工作状态不能选择当前类型!`);
}
result.onWorkStatus = formData.onWorkStatus;
result.inWorkStatus = formData.inWorkStatus;
this.submitting = true;
// this.submitting = false;
// return;
/**
* 接口 地址
*
* https://www.showdoc.com.cn/2450725213006196/10877717880262686
*/
let promise = [];
switch (result.mode) {
case "00":
promise.push(this.requestURL("51", result))
break;
case "01":
case "02":
const options = { mode: result.mode };
if (result.mode === '01') {
options.startDisplayTime = formData.displayTime[0];
options.endDisplayTime = formData.displayTime[1];
}
},
promise.push(
this.requestURL("30", {
onWorkStatus: result.onWorkStatus,
inWorkStatus: result.inWorkStatus,
}),
this.requestURL("51", options),
)
break;
}
Promise.all(promise)
.then(() => {
this.modelVisible = false;
})
.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>
.DeviceControlDialog {
width: 450px;
height: 210px;
width: 850px;
min-height: 410px;
display: flex;
flex-direction: column;
gap: 15px;

24
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/FatigueWakesUp/index.vue

@ -4,20 +4,11 @@
<Video class="video-stream" :pileNum="dialogData.stakeMark" />
<ElTabs v-model="activeName" @tab-click="handleClickTabs" class="tabs">
<ElTabPane label="基本信息" name="first">
<Descriptions
labelWidth="72px"
:list="list"
:data="data"
style="gap: 18px"
/>
<Descriptions labelWidth="72px" :list="list" :data="data" style="gap: 18px" />
</ElTabPane>
<ElTabPane label="设备参数" name="second">设备参数</ElTabPane>
<ElTabPane label="在线率统计" name="third">
<LineChart
v-if="activeName === 'third'"
:productId="dialogData.id"
style="height: 180px"
/>
<LineChart v-if="activeName === 'third'" :productId="dialogData.id" style="height: 180px" />
</ElTabPane>
</ElTabs>
</div>
@ -25,11 +16,8 @@
<template #footer>
<Button @click.native="deviceControlVisible = true">设备操作</Button>
</template>
<DeviceControlDialog
v-model="deviceControlVisible"
:deviceId="dialogData.iotDeviceId"
/>
<!-- 设备操作弹窗 -->
<DeviceControlDialog v-model="deviceControlVisible" :deviceId="dialogData.iotDeviceId" />
</Dialog>
</template>
@ -114,7 +102,7 @@ export default {
if (roadInfo) this.$set(this.data, "roadName", roadInfo.roadName);
},
methods: {
handleClickTabs() {},
handleClickTabs() { },
},
};
</script>
@ -155,7 +143,7 @@ export default {
align-items: center;
justify-content: end;
> div {
>div {
font-size: 16px;
padding: 6px 12px;
}

2
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/GuardrailCollision/index.vue

@ -179,7 +179,7 @@ div.switcher {
align-items: center;
justify-content: end;
> div {
>div {
font-size: 16px;
padding: 6px 12px;
}

11
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Intermodulation/components/LineChartForTraffic/index.vue

@ -5,7 +5,7 @@
<script>
import * as echarts from "echarts";
import { lineChartOption } from "./chart"
import { cloneDeep } from "lodash";
export default {
name: 'LineChart',
props: {
@ -20,10 +20,11 @@ export default {
},
mounted() {
const chartIns = echarts.init(this.$refs.LineChartRef);
console.log('lineChartOption', lineChartOption)
lineChartOption.xAxis.data = this.xData;
lineChartOption.series[0].data = this.yData;
chartIns.setOption(lineChartOption);
const options = cloneDeep(lineChartOption);
options.yAxis.axisLabel.fontSize = 11;
options.xAxis.data = this.xData;
options.series[0].data = this.yData;
chartIns.setOption(options);
},
}
</script>

18
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/HomeFilter/index.vue

@ -13,7 +13,7 @@
<div class="body">
<div class="title">设备筛选</div>
<Form labelWidth="90px" column="1" class="form" ref="FormConfigRef" :formList="formList" />
<Form v-model="data" labelWidth="90px" column="1" class="form" ref="FormConfigRef" :formList="formList" />
<div class="footer">
<Button style="background-color: rgba(0, 179, 204, 0.3)" @click.native="handleResetForm">
重置
@ -82,12 +82,14 @@ export default {
return true;
},
},
]
],
data: {}
}
},
watch: {
activeDeviceTypes: {
handler(val) {
console.log(val, this.activeDeviceTypes, 'xxx')
const options = []
for (let id of DeviceTypeIds) {
if (this.activeDeviceTypes.indexOf(`路测设备_${id}`) >= 0) {
@ -96,6 +98,15 @@ export default {
}
// if (this.activeDeviceTypes.indexOf("_2") >= 0) options.push(...Object.keys(BoardChildTypes).map(key => { return { label: BoardChildTypes[key], value: key } }));
}
const isChildTypeClear = !options.length;
if (isChildTypeClear)
this.$set(this.data, 'childType', undefined);
const isDeviceStateClear = !find(this.activeDeviceTypes, (type => type.match("路测设备_")));
if (isDeviceStateClear)
this.$set(this.data, 'deviceState', undefined);
if (isChildTypeClear || isDeviceStateClear) {
this.setFilterDataNoAction(this.data);
}
this.formList[2].options.options = options;
},
immediate: true,
@ -111,6 +122,9 @@ export default {
filterEnd(data) {
this.$parent.$refs.RoadAndEventsRef?.setFilterData?.(data);
},
setFilterDataNoAction(data) {
this.$parent.$refs.RoadAndEventsRef?.setFilterDataNoAction?.(data);
},
async handleResetForm() {
this.$refs.FormConfigRef?.reset();
this.activeIcon = "filter";

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

@ -177,7 +177,10 @@ export default {
getMinMapLayers();
},
methods: {
async setFilterData(data) {
setFilterDataNoAction(data) { //data
this.filterData = data;
},
async setFilterData(data) {//
this.filterData = data;
const tabContentData = [];
this.layerData.forEach((layerDataItem => {
@ -193,20 +196,24 @@ export default {
const status = item.status;
// if (!eventMap[`${key}${status ? "_close" : ""}`]) return this.$emit("onClickItem", item);
// console.log(`${key}${status ? "" : "_close"}`, this.filterData, 'xxx');
await eventMap[`${key}${status ? "" : "_close"}`]?.call(this, item, this.filterData, isDefault);
await eventMap[`${key}${status ? "" : "_close"}`]?.call(this, item, this.filterData, isDefault, this.cb);
}
await Promise.allSettled(tabContentData.map(item => eventMapCall(item, true)))
Object.keys(lngLatMap).forEach(key => {
addInGraphHandle(lngLatMap[key]);
});
},
handleClick(item) {
this.active = item.title;
this.tabContentData = item.children;
},
cb(item, config) {
const deviceType = config.deviceType;
const activeDeviceTypes = this.activeDeviceTypes;
const findIndex = activeDeviceTypes.indexOf(deviceType);
if (item.status) findIndex === -1 && activeDeviceTypes.push(deviceType);
else findIndex !== -1 && activeDeviceTypes.splice(findIndex, 1);
},
async handleDeviceImmediate(item, isDefault) {
const key = getHandleDeviceType(item) || `${this.active}/${item.title}`;
@ -218,14 +225,8 @@ export default {
if (!eventMap[`${key}${status ? "_close" : ""}`]) return this.$emit("onClickItem", item);
console.log(`${key}${status ? "_close" : ""}`, this.filterData, isDefault)
const cb = (item, config) => {
const deviceType = config.deviceType;
const activeDeviceTypes = this.activeDeviceTypes;
const findIndex = activeDeviceTypes.indexOf(deviceType);
if (item.status) findIndex === -1 && activeDeviceTypes.push(deviceType);
else findIndex !== -1 && activeDeviceTypes.splice(findIndex, 1);
}
await eventMap[`${key}${status ? "_close" : ""}`]?.call(this, item, this.filterData, isDefault, cb);
await eventMap[`${key}${status ? "_close" : ""}`]?.call(this, item, this.filterData, isDefault, this.cb);
},
handleDevice: debounce(function (item) {
this.handleDeviceImmediate(item);

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

@ -237,6 +237,33 @@ export function getDeviceList(deviceType, options) {
});
}
export function getDeviceInfo(iotDeviceId, options) {
return new Promise((resolve, reject) => {
const data = {
iotDeviceId,
...options,
};
request({
url: "/business/device/query",
method: "GET",
params: data,
})
.then(({ code, data }) => {
if (code != 200) {
reject();
// return Message.error(`${DeviceTypeMap[deviceType]}设备加载失败!`);
}
resolve(data);
})
.catch(() => {
// Message.error(`${DeviceTypeMap[deviceType]}设备加载失败!`);
reject();
});
});
}
/**
* 获取 所属机构
* @param {*} iotDeviceId 设备ID iotDeviceId

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

@ -106,8 +106,9 @@ export class MarkerCluster {
const pageSize = 6;
let page = 1;
const totalPages = Math.ceil(data.length / pageSize);
const dataFirstPage =
const currentPageData =
totalPages > 1 ? data.slice((page - 1) * pageSize, pageSize) : data;
window.currentPageData = currentPageData;
window.pageSize = pageSize;
window.page = page;
window.totalPages = totalPages;
@ -127,7 +128,7 @@ export class MarkerCluster {
// 截取当前页的数据
const currentPageData = data.slice(startIndex, endIndex);
window.currentPageData = currentPageData;
const itemsTpl = currentPageData
.map(
(item) => `
@ -144,15 +145,7 @@ 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
);
});
bindItemClick();
}
window.renderData = renderData;
@ -173,7 +166,7 @@ export class MarkerCluster {
<img class="info-close" style="width: 12px;cursor: pointer;" src="${require("@screen/images/dialog/icon-close.svg")}" />
</div>
<div id="dataContainer" style="padding: 15px 9px;flex: 1; overflow: auto;" class="info-window-content">
${dataFirstPage
${currentPageData
.map(
(item) => `
<div style="cursor: pointer; padding: 3px 6px;display: flex;align-items: center; gap: 6px;" class="info-window-item">
@ -199,7 +192,7 @@ export class MarkerCluster {
}
</div>`);
window.infoWindow = this.infoWindow;
this.infoWindow.open(map, data[0].lnglat);
this.infoWindow.open(map, currentPageData[0].lnglat);
this.infoWindow.dom.querySelector(".info-close").onclick = () =>
this.infoWindow.close();
@ -211,15 +204,20 @@ export class MarkerCluster {
this.infoWindow.dom.querySelector(".info-window-content").onwheel = (e) =>
e.stopPropagation();
this.infoWindow.dom
.querySelectorAll(".info-window-item")
.forEach((item, index) => {
item.onclick = () =>
data[index].config.markerClick?.(
data[index].extData,
data[index].config?.item
);
});
function bindItemClick() {
window.infoWindow.dom
.querySelectorAll(".info-window-item")
.forEach((item, index) => {
item.onclick = () => {
const currentPageData = window.currentPageData;
currentPageData[index].config.markerClick?.(
currentPageData[index].extData,
currentPageData[index].config?.item
);
};
});
}
bindItemClick();
}
async setMarkerCluster() {

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

@ -189,7 +189,7 @@ export default {
const closeMessage = loadingMessage({ message: "人员获取中..." });
request({
url: `/business/employees/list`,
url: `/business/employees/listAll`,
method: "GET",
params: {
organizationId: stationId,
@ -197,11 +197,11 @@ export default {
})
.then((result) => {
if (result.code != 200) return Message.error("人员获取失败");
if (!result.rows?.length) return Message.warning("该驻点下暂无人员");
if (!result.data?.length) return Message.warning("该驻点下暂无人员");
// Message.success("")
this.peopleList = result.rows;
this.peopleList = result.data;
})
.catch((err) => {
Message.error("人员获取失败");

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

@ -96,6 +96,7 @@ export default {
qbb: ''
}],
planName: '',
automaticInfo: {},
dcExecuteAction: [],
deviceData: [],
eventOptions: [
@ -252,16 +253,32 @@ export default {
return this.deviceData;
},
async getTemplateAutomatic() {
request({
url: `/business/plans/event/automatic`,
let url = '';
let data = {};
let plan = this.info.find(it => it.planName == this.planName);
if (this.activeName == '-1') {//
url = '/business/plans/warning/confirm';
data = {
dcEmergencyPlans: plan,
dcWarning: this.eventFormData
}
} else {//
url = '/business/plans/event/automatic';
data = {
dcEmergencyPlans: plan,
dcEvent: this.eventFormData
}
}
const result = await request({
url: url,
method: "post",
}).then((result) => {
if (result.code != 200) return Message.error(result?.msg);
this.sbOptions = result.data;
}).catch(() => {
Message.error("查询可变信息标识失败");
data: data
})
if (result.code != 200) {
Message.error(result?.msg);
return {};
}
return result.data;
},
changeRadio(value) {
let plan = this.info.find(it => it.planName == value);

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

@ -87,7 +87,8 @@
</Table>
<!-- 情报板弹窗 -->
<QbbDialog :visible="isShowDialog" :info="qbbData" :type="type" @close="onCloseDialog" @dialogSubmit="dialogSubmit" />
<!-- <QbbDialog :visible="isShowDialog" :info="qbbData" :type="type" @close="onCloseDialog"
@dialogSubmit="dialogSubmit" /> -->
</div>
</template>
@ -95,7 +96,7 @@
import Table from '@screen/components/Table.vue';
import Button from '@screen/components/Buttons/Button.vue';
import request from "@/utils/request";
import QbbDialog from "../qbbDialog/index.vue";
// import QbbDialog from "../qbbDialog/index.vue";
import { Message } from 'element-ui'
import { planDeviceOptions } from "@screen/utils/enum.js";
@ -105,15 +106,14 @@ export default {
components: {
Button,
Table,
QbbDialog
},
model: {
prop: 'visible',
event: 'update:value'
// QbbDialog
},
// model: {
// prop: 'visible',
// event: 'update:value'
// },
inject: ['loadData'],
props: {
visible: Boolean,
eventType: Number,
type: Number,
tableData: {

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

@ -4,9 +4,9 @@
<Form :formList="formList" :dFormData="formData" label-width="100px" />
<div class="video-pic">
<Video style="height: 100%; width: 380px;" :showHeader="activeName != '-1'"
<Video style="height: 100%; width: 380px;" :showHeader="false"
:url="(formData.videoList && formData.videoList.length > 0) ? formData.videoList[0] : ''" videoType="mp4" />
<Video v-if="activeName != '-1'" style="height: 100%; width: 380px;"
<Video v-if="activeName != '-1'" style="height: 100%; width: 380px;" :showHeader="false"
:url="(formData.videoList && formData.videoList.length > 0) ? formData.videoList[1] : ''" videoType="mp4" />
<Carousel v-else style="flex: 1" :pictures="formData.pictures" />

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

@ -1,11 +1,11 @@
<template>
<Dialog v-model="modelVisible" title="情报板确认">
<div class="EventAddPlanDialog">
<div v-if="type == 1" class="EventAddPlanDialog">
<h4>预案内容</h4>
<dev class="listBox disPid">
<div class="tplItem">
<!-- 模板内容 -->
<BoardTplPreview class="boardPreview" boardWH="1400*200" :tpl="{}"></BoardTplPreview>
<!-- <BoardTplPreview class="boardPreview" boardWH="1400*200" :tpl="{}"></BoardTplPreview> -->
<!-- 操作按钮 -->
<div class="infoBtnBox infoBtnBoxSm">
<p class="btn">
@ -18,7 +18,7 @@
<dev class="listBox disPid">
<div class="tplItem">
<!-- 模板内容 -->
<BoardTplPreview class="boardPreview" boardWH="1400*200" :tpl="{}"></BoardTplPreview>
<!-- <BoardTplPreview class="boardPreview" boardWH="1400*200" :tpl="{}"></BoardTplPreview> -->
<!-- 操作按钮 -->
<div class="infoBtnBox infoBtnBoxSm">
<p class="btn">
@ -28,14 +28,11 @@
</div>
</dev>
<h4>情报板模版</h4>
<vuescroll :ops="scrollOptions" class="listBox">
<!-- <vuescroll :ops="scrollOptions" class="listBox">
<div v-for="(item) in templateAvailable" :key="item.dictValue">
<!-- 原来是<el-collapse v-model="activeNames"> -->
<h5>{{ item.dictLabel }}</h5>
<div v-for="(itm, indx) in item.list" :key="indx" class="tplItem">
<!-- 模板内容 -->
<BoardTplPreview class="boardPreview" boardWH="1400*200" :tpl="itm"></BoardTplPreview>
<!-- 操作按钮 -->
<div class="infoBtnBox infoBtnBoxSm">
<p class="btn">
<el-radio v-model="radio1" :label="itm.id" @input="changeRadio(itm)" />
@ -43,7 +40,7 @@
</div>
</div>
</div>
</vuescroll>
</vuescroll> -->
</div>
<template #footer>
<Button style="background: #C9C9C9;padding:0 24px;"
@ -75,9 +72,13 @@ export default {
prop: 'visible',
event: 'close'
},
// inject: ['getTemplateAutomatic'],
props: {
visible: Boolean,
type: Number,
type: {
type: Number,
default: 1
},
info: {
type: Object,
default: () => { }
@ -102,11 +103,12 @@ export default {
},
computed: {
modelVisible: {
get() {
async get() {
if (this.visible) {
if (this.info && this.info.id) {
this.radio1 = Number(this.info.id);
}
// console.log('123', this.getTemplateAutomatic());
}
return this.visible;
},

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

@ -108,13 +108,71 @@ export const gjSearchFormList = [
],
},
},
{
label: "事件主类:",
key: "warningType",
type: "select",
options: {
clearable: true,
options: [
{
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: "车辆故障",
},
{
value: 99,
label: "其他事件",
},
],
},
},
{
label: "时间范围:",
key: "daterange",
required: false,
type: "datePicker",
options: {
style: 'width: auto',
style: "width: auto",
type: "datetimerange",
format: "yyyy-MM-dd HH:mm:ss",
valueFormat: "yyyy-MM-dd HH:mm:ss",

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

@ -65,7 +65,7 @@ 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"
import { getNearCameraNew } from "@screen/pages/Home/components/RoadAndEvents/utils/httpList.js"
const warningSourceMapping = {
1: '视频AI',
@ -261,7 +261,7 @@ export default {
},
firstBtnClick(id) {
console.log("id", id);
if (this.activeName == '-1') { //
if (this.activeName == '-1') {
request({
url: `/perceivedEvents/warning/getWarningById`,//
method: "post",
@ -297,7 +297,7 @@ export default {
});
} else {
request({
url: `/dc/system/event/${id}`,
url: `/dc/system/event/${id}`,//
method: "get",
}).then((result) => {
if (result.code != 200) return Message.error(result?.msg);
@ -305,11 +305,15 @@ export default {
data.stringDirection = gzDirectionMapping[data.direction] || data.direction;
data.startTime = data?.occurrenceTime || '';
data.videoList = [];
// const cameraData = (await getNearCameraNew(data.stakeMark));//
// console.log("cameraData", cameraData)
if (data.otherConfig) {
let otherConfig = JSON.parse(data.otherConfig);
// data.pictures = otherConfig.pictures || [];
data.videoList = otherConfig.videoList || []
data.videoList = otherConfig.videoList || [];
//data.videoList = otherConfig.videoList || ['https://sf1-cdn-tos.huoshanstatic.com/obj/media-fe/xgplayer_doc_video/mp4/xgplayer-demo-480p.mp4']
}
@ -339,6 +343,7 @@ export default {
this.searchData = {
...this.searchData,
eventType: data.eventType,
warningType: data.warningType,
eventSource: data.eventSource,
warningSource: data?.warningSource || '',
direction: data.direction,

51
ruoyi-ui/src/views/JiHeExpressway/pages/datav/roadNet/index.vue

@ -3,7 +3,11 @@
<div class="summary">
<div class="summaryUnit" v-for="item in summary" :style="{'flex-basis' : item.width + 'px'}">
<div class="info info_01 keep-ratio" origin="left">
<p v-if="item.dataAll"><span class="em">{{ item.dataAll.title }}:</span><em class="blue">{{ item.dataAll.value }}</em><i v-if="item.dataAll.unit">{{ item.dataAll.unit }}</i></p>
<p v-if="item.dataAll">
<span class="em">{{ item.dataAll.title }}:</span>
<em class="blue">{{ item.dataAll.value }}<template v-if="item.dataAll.total">/{{ item.dataAll.total }}</template></em>
<i v-if="item.dataAll.unit">{{ item.dataAll.unit }}</i>
</p>
</div>
<div class="info info_02 keep-ratio" origin="left">
<p v-if="item.dataGreen"><span>{{ item.dataGreen.title }}:</span><em class="green">{{ item.dataGreen.value }}</em><i v-if="item.dataGreen.unit">{{ item.dataGreen.unit }}</i></p>
@ -144,8 +148,37 @@ export default {
},
mounted(){
this.initData();
this.mockData();
},
methods: {
mockData(){
const mock = ()=>{
let num1 = this.summary[1].dataAll.value + Math.floor(Math.random()*200);
this.summary[1].dataAll.value = num1;
this.summary[1].dataRed.value = (num1/this.summary[1].dataGreen.value*100).toFixed(2);
let num2 = +this.summary[2].dataAll.value + Math.random()*0.01;
this.summary[2].dataAll.value = num2.toFixed(2);
this.summary[2].dataRed.value = (num2/this.summary[2].dataGreen.value*100).toFixed(2);
let num3 = this.summary[3].dataAll.value + Math.floor(Math.random()*20);
this.summary[3].dataAll.value = num3;
this.summary[3].dataRed.value = (num3/this.summary[3].dataGreen.value*100).toFixed(2);
let num4 = 1154 + Math.random()*120;
this.summary[4].dataAll.value = num4.toFixed(2);
this.summary[4].dataGreen.value = (num4/this.summary[4].dataAll.total*100).toFixed(2);
let num5 = 81 + Math.random()*20;
this.summary[5].dataAll.value = num5.toFixed(2);
this.summary[5].dataGreen.value = (num5/this.summary[5].dataAll.total*100).toFixed(2);
}
mock();
let interval = setInterval(()=>{
mock();
}, 1500);
this.$once("hook:beforeDestroy", () => this.clearInterval(interval));
},
initData() {
this.summary = [
{
@ -156,31 +189,31 @@ export default {
},
{
width:376,
dataAll: { title: "接入数据总数", value: 1213213447, unit: "条" },
dataAll: { title: "接入数据总数", value: 1251446, unit: "条" },
dataGreen: { title: "昨日接入数", value: 20624577, unit: "条" },
dataRed: { title: "环比", value: 0.04, unit: "%" }
},
{
width: 287,
dataAll: { title: "存储占用量", value: 86059, unit: "GB" },
dataAll: { title: "存储占用量", value: 32, unit: "GB" },
dataGreen: { title: "昨日新增", value: 55, unit: "GB" },
dataRed: { title: "环比", value: 20.5, unit: "%" }
},
{
width: 376,
dataAll: { title: "服务调用总数", value: 43392688, unit: "次" },
dataGreen: { title: "昨日服务数", value: 1210345, unit: "次" },
dataAll: { title: "服务调用总数", value: 752524, unit: "次" },
dataGreen: { title: "昨日服务数", value: 21034145, unit: "次" },
dataRed: { title: "环比", value: 0.04, unit: "%" }
},
{
width:226,
dataAll: { title: "内存", value: "1274G/1800G", unit: "" },
dataAll: { title: "内存", value: 0, total:1800, unit: "G" },
dataGreen: { title: "使用率", value: 70.73, unit: "%" }
},
{
width: 226,
dataAll: { title: "CPU", value: "71/126", unit: "" },
dataGreen: { title: "使用率", value: 56.35, unit: "" }
dataAll: { title: "CPU", value: 0, total:126, unit: "" },
dataGreen: { title: "使用率", value: 56.35, unit: "%" }
}
];
this.manage = [
@ -224,7 +257,7 @@ export default {
<style lang='scss' scoped>
h4, p, ul,li{ margin: 0; padding:0;}
.roadNet{ padding: 20px; display: flex; flex-direction: column;
.roadNet{ padding: 20px; width:100%; height:100%; display: flex; flex-direction: column;
.summary{
display: flex; justify-content: space-between; height: 87px; align-items: stretch;
.summaryUnit{ border-left: 2px solid #00D1FF; background: linear-gradient( -90deg, rgba(6,66,88,0) 0%, #064258 93%); box-sizing: border-box; padding: 0 20px; display: flex; flex-direction: column; justify-content: center; align-items: stretch;

5
ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/dailyDisposal/index.vue

@ -156,7 +156,6 @@ export default {
.congestion {
.board {
padding: 0px 20px;
background: linear-gradient(180deg, rgba(6, 66, 88, 0.2) 0%, #064258 100%);
border-radius: 5px 5px 5px 5px;
opacity: 1;
@ -168,13 +167,13 @@ export default {
)
1 1;
display: flex;
justify-content: space-between;
justify-content: center;
align-items: center;
}
}
.charts {
height: 180px;
width: 100%;
width: 430px;
}
</style>

5
ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventQuery/assets/charts2.js

@ -132,7 +132,7 @@ var options = {
},
color: colorList,
legend: {
top: 100,
top: "middle",
right: 20,
orient: "vertical", //改变排列方式
icon: "circle", //改变legend小图标形状
@ -146,12 +146,13 @@ var options = {
rich: {
a: {
align: "left",
width: 45,
width: 60,
fontSize: 12,
},
b: {
align: "left",
fontSize: 12,
width: 50,
color: "#37E7FF",
marginLeft: 0,
},

381
ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventQuery/index.vue

@ -1,87 +1,35 @@
<template>
<div class="congestion">
<div class="condition">
<ProgressBar
class="keep-ratio"
@selectItem="selectProgress"
:dataList="dataList"
:selectIndex="selectIndex"
:reset="reset"
/>
<ProgressBar class="keep-ratio" @selectItem="selectProgress" :dataList="dataList" :selectIndex="selectIndex"
:reset="reset" />
<div class="searchPanel">
<RadioGroup
:options="[
{ key: '1', label: '菏泽' },
{ key: '3', label: '济南' },
]"
v-model="direction"
type="button"
/>
<el-select
v-model="type"
size="mini"
class="selectRoad"
placeholder="请选择"
@change="changeType"
>
<el-option
v-for="item in typeOptions"
:key="item.value"
:label="item.label"
:value="item.value"
>
<RadioGroup :options="[
{ key: '1', label: '菏泽' },
{ key: '3', label: '济南' },
]" v-model="direction" type="button" />
<el-select v-model="type" size="mini" class="selectRoad" placeholder="请选择" @change="changeType">
<el-option v-for="item in typeOptions" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
<el-select
v-model="quarter"
size="medium"
v-if="type == 'quarter'"
class="selectRoad-medium"
placeholder="请选择"
>
<el-option
v-for="item in quarterOptions"
:key="item.value"
:label="item.label"
:value="item.value"
style="width: 140px"
>
<el-select v-model="quarter" size="medium" v-if="type == 'quarter'" class="selectRoad-medium" placeholder="请选择">
<el-option v-for="item in quarterOptions" :key="item.value" :label="item.label" :value="item.value"
style="width: 140px">
</el-option>
</el-select>
<el-date-picker
size="mini"
v-if="type != 'quarter'"
class="selectRoad"
v-model="dateTime"
style="width: 140px"
:type="
type == 'date'
? 'date'
: type == 'month'
? 'month'
: type == 'year'
? 'year'
: ''
"
placeholder="请选择"
:clearable="false"
/>
<el-button
type="primary"
size="mini"
class="btnSearch"
@click="searchQuery"
icon="el-icon-search"
>查询</el-button
>
<el-button
class="btnReset"
size="mini"
icon="el-icon-refresh-left"
@click="onReset"
>重置</el-button
>
<el-date-picker size="mini" v-if="type != 'quarter'" class="selectRoad" v-model="dateTime" style="width: 140px"
:type="type == 'date'
? 'date'
: type == 'month'
? 'month'
: type == 'year'
? 'year'
: ''
" placeholder="请选择" :clearable="false" />
<el-button type="primary" size="mini" class="btnSearch" @click="searchQuery"
icon="el-icon-search">查询</el-button>
<el-button class="btnReset" size="mini" icon="el-icon-refresh-left" @click="onReset">重置</el-button>
</div>
</div>
@ -90,15 +38,15 @@
<WgtTitle :title="'感知事件趋势分析'"></WgtTitle>
<div class="unit_con">
<Empty v-if="!chart1List || chart1List.length <= 0" text="暂无数据..." class="empty"></Empty>
<div v-else id="chart1" class="chart_div" ></div>
<div v-else id="chart1" class="chart_div"></div>
</div>
</div>
<div>
<WgtTitle :title="'感知事件类型分析'"></WgtTitle>
<div class="unit_con">
<div class="unit_con unit_con_02">
<Empty v-show="!chart2List || chart2List.length <= 0" text="暂无数据..." class="empty"></Empty>
<div id="chart2" class="chart_div" ></div>
<div ref="chart2" class="chart_div" style="width: 540px; height: 270px;" ></div>
</div>
</div>
@ -106,7 +54,7 @@
<WgtTitle :title="'桩号范围内事件分析趋势'"></WgtTitle>
<div class="unit_con">
<Empty v-show="!chart3List || chart3List.length <= 0" text="暂无数据..." class="empty"></Empty>
<div id="chart3" class="chart_div" ></div>
<div id="chart3" class="chart_div"></div>
</div>
</div>
</div>
@ -123,6 +71,7 @@ import chart2 from "./assets/charts2";
import chart3 from "./assets/charts3";
import ElQuarterPicker from "./ElQuarterPicker";
import moment from "moment";
import { WarningType } from "@screen/utils/enum.js";
import {
getWarningTrend,
getWarningSectionType,
@ -168,6 +117,7 @@ export default {
},
data() {
return {
canvas:null,
typeOptions: [
{
value: "year",
@ -261,7 +211,7 @@ export default {
],
};
},
created() {},
created() { },
methods: {
selectProgress(item, index) {
this.selectIndex = index;
@ -409,12 +359,12 @@ export default {
chart1.series[0].data = numbers;
}
}
this.$nextTick(()=>{
this.$nextTick(() => {
this.initChart1();
})
});
//
//
getWarningSectionType({
type: qType,
sectionId: this.selectId,
@ -423,35 +373,15 @@ export default {
quarter: this.quarter,
}).then((res) => {
chart2.series[0].data = [];
let types = [];
if (res.code == 200) {
let types = [];
let numbers = [];
this.chart2List = res.data;
let data = res.data.warningTypeList;
let data = res.data.warningTypeList ;
let total = res.data.total;
data.forEach((it) => {
if (it.warningType == 1) {
types.push("交通拥堵");
} else if (it.warningType == 2) {
types.push("行人");
} else if (it.warningType == 3) {
types.push("非机动车");
} else if (it.warningType == 4) {
types.push("停车");
} else if (it.warningType == 5) {
types.push("倒车/逆行");
} else if (it.warningType == 6) {
types.push("烟火");
} else if (it.warningType == 7) {
types.push("撒落物");
} else if (it.warningType == 8) {
types.push("异常天气");
} else if (it.warningType == 9) {
types.push("护栏碰撞");
} else {
types.push("其他");
}
types.push(WarningType[it.warningType]);
numbers.push({
name: types[types.length - 1],
@ -498,8 +428,8 @@ export default {
// this.myChart2.setOption(chart2);
// })
}
this.$nextTick(()=>{
this.initChart2();
this.$nextTick(() => {
this.initChart2(types);
})
});
//
@ -570,8 +500,8 @@ export default {
chart3.series[0].data = values1;
chart3.series[1].data = values2;
}
this.$nextTick(()=>{
this.initChart3();
this.$nextTick(() => {
this.initChart3();
})
});
// if (this.type == "day")
@ -590,101 +520,63 @@ export default {
this.myChart3 = echarts.init(document.getElementById("chart3"));
this.myChart3.setOption(chart3);
},
generateChart2(){
let ele = this.$refs["chart2"];
this.myChart2 = echarts.init(ele);
let parentDiv = ele.firstChild;
this.canvasChart2 = document.createElement("canvas");
this.canvasChart2.width = parentDiv.offsetWidth;
this.canvasChart2.height = parentDiv.offsetHeight;
parentDiv.appendChild(this.canvasChart2);
},
initChart2(){
this.myChart2 = echarts.init(document.getElementById("chart2"));
if(!this.myChart2){
this.generateChart2();
}
let ele = this.$refs["chart2"];
this.myChart2.setOption(chart2);
const domMap = document.getElementById("chart2");
let parentDiv = domMap.firstChild;
// canvas
let canvas = document.createElement("canvas");
canvas.width = parentDiv.offsetWidth;
canvas.height = parentDiv.offsetHeight;
parentDiv.appendChild(canvas);
const context = canvas.getContext("2d");
const context = this.canvasChart2.getContext('2d')
context.clearRect(0, 0, this.canvasChart2.width, this.canvasChart2.height); //
context.lineWidth = 1; // 线
//
//
var gr = context.createLinearGradient(247, 63, 450, 0);
gr.addColorStop(1, "rgba(92,197,255,0)");
gr.addColorStop(0, "rgba(92,197,255,0.5)");
drawRoundRect(context, 357, 98, 140, 24, 12, gr);
// //
var gr = context.createLinearGradient(247, 63, 450, 0);
gr.addColorStop(1, "rgba(92,197,255,0)");
gr.addColorStop(0, "rgba(92,197,255,0.5)");
drawRoundRect(context, 357, 130, 140, 24, 12, gr);
// //
var gr = context.createLinearGradient(240, 63, 450, 0);
gr.addColorStop(1, "rgba(92,197,255,0)");
gr.addColorStop(0, "rgba(92,197,255,0.5)");
drawRoundRect(context, 357, 162, 140, 24, 12, gr);
// //
var gr = context.createLinearGradient(240, 63, 450, 0);
gr.addColorStop(1, "rgba(92,197,255,0)");
gr.addColorStop(0, "rgba(92,197,255,0.5)");
drawRoundRect(context, 357, 194, 140, 24, 12, gr);
// //
// var gr = context.createLinearGradient(240, 63, 450, 0);
// gr.addColorStop(1, 'rgba(92,197,255,0)');
// gr.addColorStop(0, 'rgba(92,197,255,0.5)');
// drawRoundRect(context, 267, 258, 140, 24, 12, gr)
// //
// var gr = context.createLinearGradient(400, 63, 450, 0);
// gr.addColorStop(1, 'rgba(92,197,255,0)');
// gr.addColorStop(0, 'rgba(92,197,255,0.5)');
// drawRoundRect(context, 416, 57, 140, 24, 12, gr)
// //
// var gr = context.createLinearGradient(350, 63, 450, 0);
// gr.addColorStop(1, 'rgba(92,197,255,0)');
// gr.addColorStop(0, 'rgba(92,197,255,0.5)');
// drawRoundRect(context, 416, 108, 140, 24, 12, gr)
// //
// var gr = context.createLinearGradient(300, 63, 450, 0);
// gr.addColorStop(1, 'rgba(92,197,255,0)');
// gr.addColorStop(0, 'rgba(92,197,255,0.5)');
// drawRoundRect(context, 416, 157, 140, 24, 12, gr)
// //
// var gr = context.createLinearGradient(300, 63, 450, 0);
// gr.addColorStop(1, 'rgba(92,197,255,0)');
// gr.addColorStop(0, 'rgba(92,197,255,0.5)');
// drawRoundRect(context, 416, 208, 140, 24, 12, gr);
let total = chart2.legend.data.length;
for(let i=0; i<total; i++){
let unitH = 32;
let h = ele.offsetHeight;
let x = 330;
let y = (h - total*unitH)/2 + 3 + i*unitH;
var gr = context.createLinearGradient(330, 0, 500, 0);
gr.addColorStop(0, "rgba(92,197,255,0.6)");
gr.addColorStop(1, "rgba(92,197,255,0)");
drawRoundRect(context, x, y, 220, 24, 12, gr);
}
},
},
mounted() {
getRoadSectionList().then((res) => {
console.log(res);
if (res.code == 200) {
let rows = res.data;
this.dataList = [];
rows.forEach((it) => {
this.dataList.push({
title: it.sectionName.split("-")[0],
id: it.id,
});
});
//
if (rows.length > 1) {
this.dataList.push({
title: rows[rows.length - 1].sectionName.split("-")[1],
id: rows[rows.length - 1].id,
});
}
console.log("dataList", this.dataList);
}
this.searchQuery();
getRoadSectionList().then((res) => {
console.log(res);
if (res.code == 200) {
let rows = res.data;
this.dataList = [];
rows.forEach((it) => {
this.dataList.push({
title: it.sectionName.split("-")[0],
id: it.id,
});
});
//
if (rows.length > 1) {
this.dataList.push({
title: rows[rows.length - 1].sectionName.split("-")[1],
id: rows[rows.length - 1].id,
});
}
console.log("dataList", this.dataList);
}
this.searchQuery();
});
}
};
</script>
@ -694,37 +586,44 @@ export default {
position: relative;
.comp_body {
width: 100%; height: 100%;
width: 100%;
height: 100%;
display: flex;
align-items: stretch;
font-size: 14px;
> div {
>div {
flex: 1;
background: linear-gradient(
180deg,
rgba(6, 66, 88, 0.2) 0%,
#064258 100%
);
background: linear-gradient(180deg,
rgba(6, 66, 88, 0.2) 0%,
#064258 100%);
border: 1px solid;
border-image: linear-gradient(
360deg,
border-image: linear-gradient(360deg,
rgba(55, 231, 255, 0.3),
rgba(55, 231, 255, 0)
)
1 1;
display: flex; flex-direction: column; align-items: stretch;
rgba(55, 231, 255, 0)) 1 1;
display: flex;
flex-direction: column;
align-items: stretch;
margin-right: 14px;
&:last-child{ margin-right: 0;}
&:last-child {
margin-right: 0;
}
}
.unit_con {
flex: 1;
margin: 95px 20px 30px; position: relative;
// &.unit_con_02{ margin: 105px 0px 20px; }
}
.empty {
position: absolute;
}
.empty{ position: absolute;}
.chart_div{
width: 100%; height: 100%;
.chart_div {
width: 100%;
height: 100%;
}
}
@ -816,54 +715,12 @@ export default {
</style>
<style lang="scss">
div.el-popover:has(> .el-date-picker)
div
.el-picker-panel__body
.el-picker-panel__content
table
tr
td.today
span,
div.el-popover:has(> .el-date-picker)
div
.el-picker-panel__body
.el-picker-panel__content
table
tr
td.today
.cell,
div.el-picker-panel.el-date-picker.el-popper
div
.el-picker-panel__body
.el-picker-panel__content
table
tr
td.today
span,
div.el-picker-panel.el-date-picker.el-popper
div
.el-picker-panel__body
.el-picker-panel__content
table
tr
td.today
.cell,
div.el-picker-panel.el-date-range-picker.el-popper
div
.el-picker-panel__body
.el-picker-panel__content
table
tr
td.today
span,
div.el-picker-panel.el-date-range-picker.el-popper
div
.el-picker-panel__body
.el-picker-panel__content
table
tr
td.today
.cell {
div.el-popover:has(> .el-date-picker) div .el-picker-panel__body .el-picker-panel__content table tr td.today span,
div.el-popover:has(> .el-date-picker) div .el-picker-panel__body .el-picker-panel__content table tr td.today .cell,
div.el-picker-panel.el-date-picker.el-popper div .el-picker-panel__body .el-picker-panel__content table tr td.today span,
div.el-picker-panel.el-date-picker.el-popper div .el-picker-panel__body .el-picker-panel__content table tr td.today .cell,
div.el-picker-panel.el-date-range-picker.el-popper div .el-picker-panel__body .el-picker-panel__content table tr td.today span,
div.el-picker-panel.el-date-range-picker.el-popper div .el-picker-panel__body .el-picker-panel__content table tr td.today .cell {
color: #fff;
}
</style>

6
ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventSource/index.vue

@ -246,13 +246,13 @@ export default {
)
1 1;
display: flex;
justify-content: space-between;
justify-content: center;
align-items: center;
}
}
.charts {
height: 180px;
width: 100%;
height: 170px;
width: 380px;
}
</style>

25
ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/typeAnalysis/index.vue

@ -49,7 +49,7 @@ export default {
data() {
return {};
},
created() {},
created() { },
methods: {},
mounted() {
setTimeout(() => {
@ -83,17 +83,17 @@ export default {
value: 0,
},
{
name: "倒车/逆行",
name: "违规驾驶",
warningType: 5,
value: 0,
},
{
name: "烟火",
name: "路障",
warningType: 6,
value: 0,
},
{
name: "撒落物",
name: "道路施工",
warningType: 7,
value: 0,
},
@ -191,22 +191,17 @@ export default {
.congestion {
.board {
padding: 0px 20px;
background: linear-gradient(
180deg,
rgba(6, 66, 88, 0.2) 0%,
#06425888 100%
);
background: linear-gradient(180deg,
rgba(6, 66, 88, 0.2) 0%,
#06425888 100%);
border-radius: 5px 5px 5px 5px;
opacity: 1;
border: 1px solid;
border-image: linear-gradient(
360deg,
border-image: linear-gradient(360deg,
rgba(55, 231, 255, 0.1),
rgba(55, 231, 255, 0)
)
1 1;
rgba(55, 231, 255, 0)) 1 1;
display: flex;
justify-content: space-between;
justify-content: center;
align-items: center;
}
}

2
ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/index.vue

@ -27,7 +27,7 @@ import EventSource from "./components/eventSource/index.vue";
import DailyDisposal from "./components/dailyDisposal/index.vue";
import TypeAnalysis from "./components/typeAnalysis/index.vue";
import MonthStatistice from "./components/monthStatistics/index.vue";
import EventQuery from "./components/eventQuery";
import EventQuery from "./components/eventQuery/index.vue";
export default {
name: "EventDetection",

10
ruoyi-ui/src/views/JiHeExpressway/pages/service/PublishingChannelManagement/components/Switcher.vue

@ -9,7 +9,7 @@
<span :style="{ opacity: +active }">{{ getActiveOptions.unActive.text }}</span>
<div class="active" :style="{ left: active ? '0%' : '50%' }">{{ getActiveOptions[active ? 'active' :
'unActive'].text }}</div>
'unActive'].text }}</div>
</div>
</template>
@ -38,14 +38,14 @@ export default {
return {
active: {
text: "启用",
color: "#fff",
textColor: "#00B3CC",
color: "#00B3CC",
textColor: "#fff",
...this.activeOption?.active
},
unActive: {
text: "停用",
color: "#00B3CC",
textColor: "#fff",
color: "#fff",
textColor: "#00B3CC",
...this.activeOption?.unActive
}
}

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

@ -981,7 +981,7 @@ export const SchedulingEnum = {
},
};
const CameraChildTypes = {
export const CameraChildTypes = {
"1-1": "高清网络枪型固定摄像机",
"1-2": "高清网络球形摄像机",
"1-3": "桥下高清网络球形摄像机",
@ -989,7 +989,7 @@ const CameraChildTypes = {
"1-5": "180°全景摄像机",
};
const BoardChildTypes = {
export const BoardChildTypes = {
"2-1": "门架式可变信息标志",
"2-2": "大学城入口站前板",
"2-3": "雨棚可变信息标志",

4
ruoyi-ui/vue.config.js

@ -53,8 +53,8 @@ module.exports = {
// target: `http://10.168.69.255:8087`, //正晨后台 连现场物联 刘文阁
// target: `http://10.168.78.135:8087`, //王钦
// target: `http://10.168.66.196:8087`, //正晨后台 连现场物联 刘文阁2
target: `http://10.168.65.156:8087`, //王思祥
// target: `http://10.168.65.194:8087`, //赵祥龙
// target: `http://10.168.65.156: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