Browse Source

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

wangqin
qingzhengli 11 months ago
parent
commit
9c110b4418
  1. 7
      ruoyi-ui/src/common/menuData.js
  2. BIN
      ruoyi-ui/src/views/JiHeExpressway/images/digital/digitalTollStation.jpg
  3. 366
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/FatigueWakesUp/components/DeviceControlDialog.vue
  4. 24
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/FatigueWakesUp/index.vue
  5. 6
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/dutyOfficer/components/ModifyDutyInformationTable.vue
  6. 33
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/EventDetailDialog/eventPlanDialog/index.vue
  7. 16
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/EventDetailDialog/formTable/index.vue
  8. 22
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/EventDetailDialog/qbbDialog/index.vue
  9. 60
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/data.js
  10. 1
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/index.vue
  11. 51
      ruoyi-ui/src/views/JiHeExpressway/pages/datav/roadNet/index.vue
  12. 5
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/dailyDisposal/index.vue
  13. 5
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventQuery/assets/charts2.js
  14. 381
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventQuery/index.vue
  15. 6
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventSource/index.vue
  16. 25
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/typeAnalysis/index.vue
  17. 2
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/index.vue
  18. 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",

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

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;
}

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: {

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",

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

@ -343,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",

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