Browse Source

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

wangqin
hui 1 year ago
parent
commit
b3707d1f30
  1. 13
      ruoyi-ui/src/api/event/perceiveEvent.js
  2. 3
      ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/components/ElCheckboxGroup.vue
  3. 6
      ruoyi-ui/src/views/JiHeExpressway/components/Video/Video.vue
  4. 7
      ruoyi-ui/src/views/JiHeExpressway/components/Video/index.vue
  5. 4
      ruoyi-ui/src/views/JiHeExpressway/components/Video/videoStream.js
  6. 4
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Broadcast/components/BroadcastReleases.vue
  7. BIN
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Broadcast/images/offline.jpg
  8. BIN
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Broadcast/images/online.jpg
  9. 9
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Broadcast/index.vue
  10. 16
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/DrivingGuidance/components/DeviceControlDialog.vue
  11. 32
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/DrivingGuidance/index.vue
  12. 278
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/FatigueWakesUp/components/DeviceControlDialog.vue
  13. 139
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/FatigueWakesUp/index.vue
  14. 102
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Intermodulation/components/LineChart/chart.js
  15. 23
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Intermodulation/components/LineChart/index.vue
  16. 110
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Intermodulation/components/LineChartForTraffic/chart.js
  17. 23
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Intermodulation/components/LineChartForTraffic/index.vue
  18. 187
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Intermodulation/index.vue
  19. 20
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/PerceiveEvent/index.vue
  20. 56
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SmartDevice/components/DeviceControlDialog.vue
  21. 174
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SmartDevice/components/DeviceParams.vue
  22. 128
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SmartDevice/index.vue
  23. 17
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/TrafficIncidents/index.vue
  24. 8
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/index.vue
  25. 24
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/buttonEvent.js
  26. 18
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/map.js
  27. 2
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/dailyDisposal/assets/charts.js
  28. 6
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/dailyDisposal/index.vue
  29. 3
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/dayTotal/index.vue
  30. 2
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventQuery/assets/charts2.js
  31. 174
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventSource/assets/charts.js
  32. 100
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventSource/index.vue
  33. 2
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/railway/assets/charts.js
  34. 2
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/typeAnalysis/index.vue
  35. 3
      ruoyi-ui/src/views/JiHeExpressway/pages/service/PublishingChannelManagement/components/Switcher.vue
  36. 2
      ruoyi-ui/src/views/JiHeExpressway/utils/common.js

13
ruoyi-ui/src/api/event/perceiveEvent.js

@ -77,13 +77,14 @@ export function geTwarningTotal(query) {
//感知事件源分析
export function getWarningSourceGroup(query) {
//system/status/tablist
return request({
url: '/perceivedEvents/warning/warningSourceGroup',
method: 'post',
params: {
...query,
}
// url: '/perceivedEvents/warning/warningSourceGroup',
// method: 'post',
url: '/business/warning/list',
method: 'get',
// params: {
// ...query,
// }
})
}

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

@ -1,6 +1,7 @@
<template>
<ElCheckboxGroup v-bind="$attrs" v-on="$listeners" class='ElCheckboxGroup' :style="{ gap }">
<ElCheckbox v-for="item in options" :label="item[id] || item[label]" :key="item[id] || item[label]">
<ElCheckbox v-for="item in options" :disabled="item.disabled" :label="item[id] || item[label]"
:key="item[id] || item[label]">
<slot :name="item[id] || item[label]" :data="item">{{ item[label] }}</slot>
</ElCheckbox>
</ElCheckboxGroup>

6
ruoyi-ui/src/views/JiHeExpressway/components/Video/Video.vue

@ -19,11 +19,15 @@ export default {
url: {
type: String,
default: null
},
rangeIndex: {
type: Number,
default: 0
}
},
async mounted() {
// const player = await openLiveVideo(this.$refs.videoContainerRef, { camId: this.camId, url: this.url, pileNum: this.pileNum })
const player = new HttpLivePlayer(this.$refs.videoContainerRef, { camId: this.camId, url: this.url, pileNum: this.pileNum });
const player = new HttpLivePlayer(this.$refs.videoContainerRef, { camId: this.camId, url: this.url, pileNum: this.pileNum, rangeIndex: this.rangeIndex });
this.$once("hook:beforeDestroy", () => player?.destroy());
}

7
ruoyi-ui/src/views/JiHeExpressway/components/Video/index.vue

@ -13,7 +13,8 @@
</div>
</div>
<Transition name="fade" mode="out-in">
<Video v-if="active === 'video'" class="video-stream" :pileNum="pileNum" :camId="camId" :url="url" />
<Video :rangeIndex="rangeIndex" v-if="active === 'video'" class="video-stream" :pileNum="pileNum" :camId="camId"
:url="url" />
<img v-else src="./view.png" />
</Transition>
</div>
@ -41,6 +42,10 @@ export default {
url: {
type: String,
default: null
},
rangeIndex: {
type: Number,
default: 0
}
},
data() {

4
ruoyi-ui/src/views/JiHeExpressway/components/Video/videoStream.js

@ -58,7 +58,7 @@ export async function openVideoStream(container, { camId, url } = {}) {
return player;
}
async function getUrl({ camId, url, pileNum } = {}) {
async function getUrl({ camId, url, pileNum, rangeIndex } = {}) {
// return testFlvUrl;
if (url) return url;
@ -69,7 +69,7 @@ async function getUrl({ camId, url, pileNum } = {}) {
return;
}
camId = data[0].camId;
camId = data[rangeIndex || 0]?.camId;
}
if (camId) {

4
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Broadcast/components/BroadcastReleases.vue

@ -4,7 +4,7 @@
<div class="body">
<div class="left">
<div class="title">路测广播列表</div>
<CheckboxGroup class="checkbox-group" v-model="checkList" :options="musicList" id="otherConfig"
<CheckboxGroup class="checkbox-group" gap="9px" v-model="checkList" :options="musicList" id="otherConfig"
label="deviceName">
<template #[otherConfig]="{ data }">
<span style="color: #6EE5FE;">
@ -88,7 +88,7 @@ export default {
created() {
getDeviceList(5)
.then(data => {
if (Array.isArray(data)) this.musicList = data;
if (Array.isArray(data)) this.musicList = data.map((item) => ({ ...item, disabled: item.deviceState != 1 }));
})
},
methods: {

BIN
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Broadcast/images/offline.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

BIN
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Broadcast/images/online.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

9
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Broadcast/index.vue

@ -5,7 +5,12 @@
<div class="Broadcast">
<ElTabs v-model="activeName" @tab-click="handleClickTabs" class="tabs">
<ElTabPane label="基本信息" name="first">
<Descriptions :list="list" :data="data" style="gap: 18px" />
<Descriptions :list="list" :data="data" style="gap: 18px">
<template #content-deviceState>
<img :src="require(`./images/${data.deviceState == 1 ? 'online' : 'offline'}.jpg`)" width="18">
{{ DeviceTypeEnum[data.deviceState] || "" }}
</template>
</Descriptions>
</ElTabPane>
<ElTabPane label="设备参数" name="second">设备参数</ElTabPane>
</ElTabs>
@ -26,6 +31,7 @@ import Button from "@screen/components/Buttons/Button.vue"
import Descriptions from '@screen/components/Descriptions.vue';
import BroadcastReleases from "./components/BroadcastReleases.vue"
import Video from "@screen/components/Video"
import { DeviceTypeEnum } from "@screen/utils/enum.js";
import { getRoadInfoByStakeMark, getOrganizationName, getProduct } from "@screen/pages/Home/components/RoadAndEvents/utils/httpList.js"
import { dialogDelayVisible } from "./../mixin"
@ -54,6 +60,7 @@ export default {
brand: "XXX厂家",
deviceState: "0",
},
DeviceTypeEnum,
list: [
{
label: '设备名称',

16
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/DrivingGuidance/components/DeviceControlDialog.vue

@ -76,6 +76,7 @@ export default {
visible: Boolean,
deviceId: String
},
inject: ['requestURL'],
data() {
return {
submitting: false,
@ -188,21 +189,8 @@ export default {
}
},
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();
});
});
},
reDisplay() {
this.requestURL(52)
this.requestURL()
.then(async (data) => {
await delay(0);

32
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/DrivingGuidance/index.vue

@ -27,6 +27,7 @@ import Descriptions from '@screen/components/Descriptions.vue';
import DeviceControlDialog from "./components/DeviceControlDialog.vue"
import { getRoadInfoByStakeMark, getProduct } from "@screen/pages/Home/components/RoadAndEvents/utils/httpList.js"
import Video from "@screen/components/Video"
import request from "@/utils/request";
import { dialogDelayVisible } from "./../mixin"
@ -34,6 +35,11 @@ import { dialogDelayVisible } from "./../mixin"
export default {
name: 'DrivingGuidance',
mixins: [dialogDelayVisible],
provide() {
return {
requestURL: this.requestURL
}
},
components: {
Dialog,
Button,
@ -80,6 +86,10 @@ export default {
label: '设备厂商',
key: "brand",
},
{
label: '工作模式',
key: "workMode",
},
]
}
},
@ -94,13 +104,33 @@ export default {
});
this.requestURL(52)
.then((result) => {
this.data.workMode = { "00": "手动控制", "01": "自动控制", "02": "万年历" }[result.mode];
})
.catch((err) => {
});
const roadInfo = await getRoadInfoByStakeMark(this.dialogData.stakeMark);
console.log("%c [ roadInfo ]-103-「index.vue」", "font-size:15px; background:#36347c; color:#7a78c0;", roadInfo.roadName);
if (roadInfo) this.data.roadName = roadInfo.roadName;
},
methods: {
handleClickTabs() { }
requestURL(functionId = 52, options = {}) {
return new Promise((resolve, reject) => {
request.post(`business/device/functions/${this.dialogData.iotDeviceId}/${functionId}`, options)
.then((result) => {
if (result.code != 200) return reject();
resolve(result.data[0]);
})
.catch((err) => {
reject();
});
})
}
}
}
</script>

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

@ -0,0 +1,278 @@
<template>
<Dialog v-model="modelVisible" title="设备操作">
<div class='DeviceControlDialog'>
<ElTabs v-model="activeName" class="tabs">
<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" />
</ElTabPane>
</ElTabs>
</div>
<template #footer>
<Button style="background-color: rgba(0, 179, 204, .3);" @click.native="modelVisible = false, submitting = false">
取消
</Button>
<Button @click.native="handleSubmit" :loading="submitting">
确定
</Button>
</template>
</Dialog>
</template>
<script>
import Dialog from "@screen/components/Dialog/index.vue";
import Button from "@screen/components/Buttons/Button.vue"
import Form from '@screen/components/FormConfig';
import { delay } from "@screen/utils/common.js"
import request from "@/utils/request";
import { Message } from "element-ui";
export default {
name: 'DeviceControlDialog',
components: {
Dialog,
Button,
Form
},
model: {
prop: 'visible',
event: "update:value"
},
props: {
visible: Boolean,
deviceId: String
},
data() {
return {
submitting: false,
activeName: "first",
formData: {},
formList1: [
{
label: "设备模式:",
key: "controlType",
type: "RadioGroup",
default: "00",
options: {
type: 'circle',
options: [
{
key: "00",
label: "常量",
},
{
key: "01",
label: "闪烁",
}
],
},
},
{
label: "操作时长:",
key: "onWorkStatus",
required: true,
type: "select",
options: {
placeholder: "请选择",
}
},
],
formList2: [
{
label: "设备模式:",
key: "controlType",
type: "RadioGroup",
default: "00",
options: {
type: 'circle',
options: [
{
key: "00",
label: "常量",
},
{
key: "01",
label: "闪烁",
}
],
},
},
{
label: "线路选择:",
key: "onWorkStatus2",
required: true,
type: "select",
options: {
placeholder: "请选择",
}
},
{
label: "操作时长:",
key: "onWorkStatus",
required: true,
type: "select",
options: {
placeholder: "请选择",
}
},
]
}
},
computed: {
modelVisible: {
get() {
return this.visible
},
set(val) {
this.$emit('update:value', val)
}
}
},
watch: {
modelVisible: {
immediate: true,
handler(bool) {
if (!bool) return;
this.reDisplay();
}
}
},
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();
});
});
},
reDisplay() {
this.requestURL(52)
.then(async (data) => {
await delay(0);
const formData = this.$refs.FormConfigRef?.formData;
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.oldFormData = { ...formData };
})
},
handleSubmit() {
const result = {}, formData = this.$refs.FormConfigRef?.formData;
result.mode = formData.controlType;
delete result.controlType;
if (result.mode === '01') {
if (!formData.displayTime?.length) return Message.error(`时间不能为空!`);
}
if (!formData.onWorkStatus || !formData.inWorkStatus) return Message.error(`工作状态不能为空!`);
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;
display: flex;
flex-direction: column;
gap: 15px;
.tips {
font-size: 12px;
}
}
</style>

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

@ -0,0 +1,139 @@
<template>
<Dialog v-model="obverseVisible" title="疲劳唤醒弹窗">
<div class="FatigueWakesUp">
<Video class="video-stream" :pileNum="dialogData.stakeMark" />
<Descriptions labelWidth="72px" :list="list" :data="data" style="gap: 18px" />
</div>
<template #footer>
<Button @click.native="deviceControlVisible = true">设备操作</Button>
</template>
<DeviceControlDialog v-model="deviceControlVisible" :deviceId="dialogData.iotDeviceId" />
</Dialog>
</template>
<script>
import Dialog from "@screen/components/Dialog/index.vue";
import Descriptions from '@screen/components/Descriptions.vue';
import Button from "@screen/components/Buttons/Button.vue"
// import { getRoadInfoByStakeMark, getProduct } from "@screen/pages/Home/components/RoadAndEvents/utils/httpList.js"
import Video from "@screen/components/Video"
import DeviceControlDialog from "./components/DeviceControlDialog.vue"
import request from "@/utils/request";
import { dialogDelayVisible } from "./../mixin"
//
export default {
name: 'FatigueWakesUp',
mixins: [dialogDelayVisible],
components: {
Dialog,
Descriptions,
Video,
DeviceControlDialog,
Button
},
data() {
return {
deviceControlVisible: false,
data: {
deviceType: "行车诱导",
deviceStation: "k094+079",
roadName: "G35济泽高速",
direction: "1",
deviceState: "0",
deviceVendors: "XXX厂家",
},
list: [
{
label: '设备名称',
key: "deviceName",
},
{
label: '设备桩号',
key: "stakeMark",
},
{
label: '道路名称',
key: "roadName",
},
{
label: '设备方向',
key: "direction",
enum: "CameraDirectionEnum"
},
{
label: '设备状态',
key: "deviceState",
enum: "DeviceTypeEnum"
},
{
label: '设备厂商',
key: "brand",
},
]
}
},
async created() {
this.data = { ...this.dialogData };
getProduct(this.dialogData.productId)
.then(data => {
this.dialogData.brand = data.brand;
})
const roadInfo = await getRoadInfoByStakeMark(this.dialogData.stakeMark);
if (roadInfo) this.data.roadName = roadInfo.roadName;
},
methods: {
}
}
</script>
<style lang='scss' scoped>
.FatigueWakesUp {
width: 420px;
color: #fff;
display: flex;
flex-direction: column;
gap: 12px;
padding-bottom: 24px;
.camera-video {
flex: 1.5;
}
.tabs {
flex: 1;
display: flex;
flex-direction: column;
::v-deep {
.el-tabs__content {
flex: 1;
.el-tab-pane {
height: 100%;
}
}
}
}
.bottom {
margin-top: 12px;
display: flex;
gap: 9px;
align-items: center;
justify-content: end;
>div {
font-size: 16px;
padding: 6px 12px;
}
}
}
</style>

102
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Intermodulation/components/LineChart/chart.js

@ -0,0 +1,102 @@
import * as echarts from "echarts";
export const lineChartOption = {
color: ["#2AD9FD"],
xAxis: {
name: "日",
type: "category",
// boundaryGap: ["15%", "15%"],
nameTextStyle: {
color: "#2AD9FD",
align: "right",
fontSize: 15,
padding: [0, -15, 0, 0],
},
boundaryGap: false,
data: ["1", "5", "10", "15", "20", "25", "30"],
axisTick: {
show: false,
},
axisLabel: {
color: "#fff",
fontSize: 12,
},
axisLine: {
lineStyle: {
color: "#668598",
},
},
},
grid: {
left: 51,
top: 15,
bottom: 24,
right: 36,
},
tooltip: {
trigger: "axis",
backgroundColor: "rgba(0,0,0,0.36)",
borderWidth: 0,
textStyle: {
color: "#fff",
},
formatter: "{b}:{c}",
// formatter: function([axisData]) {
// console.log(axisData)
// let str = axisData.name + ' ' + axisData.data + '辆</br>';
// // params.forEach(item => {
// // if (item.seriesName === '供温' || item.seriesName === '回温') {
// // str += item.marker + item.seriesName + ' : ' + item.data.value + ' ℃' + '</br>';
// // } else if (item.seriesName === '压力值(Mpa)') {
// // // 柱状图渐变时设置marker
// // item.marker = '<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:#6C50F3;"></span>';
// // str += item.marker + item.seriesName + ' : ' + item.data.value + ' m';
// // }
// // });
// return str;
// }
},
yAxis: {
max: 100,
type: "value",
// nameGap: 24,
splitLine: {
lineStyle: {
type: [6, 9],
color: "rgba(255,255,255, .3)",
// dashOffset: [10, 10],
// cap: 21,
// width: 2
},
},
axisLabel: {
color: "#fff",
fontSize: 12,
formatter: "{value} %",
},
},
series: [
{
data: [0, 90, 65, 90, 45, 36, 27],
type: "line",
showSymbol: false,
smooth: true,
lineStyle: {
color: "#2AD9FD",
},
areaStyle: {
opacity: 0.8,
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{
offset: 0,
color: "rgb(90, 227, 255, .9)",
},
{
offset: 1,
color: "rgba(42,217,253,0)",
},
]),
},
},
],
};

23
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Intermodulation/components/LineChart/index.vue

@ -0,0 +1,23 @@
<template>
<div class='chart LineChart' ref="LineChartRef" />
</template>
<script>
import * as echarts from "echarts";
import { lineChartOption } from "./chart"
export default {
name: 'LineChart',
mounted() {
const chartIns = echarts.init(this.$refs.LineChartRef);
chartIns.setOption(lineChartOption);
},
}
</script>
<style lang='scss' scoped>
.LineChart {
flex: 1;
height: 100%;
}
</style>

110
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Intermodulation/components/LineChartForTraffic/chart.js

@ -0,0 +1,110 @@
import * as echarts from "echarts";
export const lineChartOption = {
color: ["#2AD9FD"],
xAxis: {
name: "时",
type: "category",
// boundaryGap: ["15%", "15%"],
nameTextStyle: {
color: "#2AD9FD",
align: "right",
fontSize: 15,
padding: [0, -15, 0, 0],
},
boundaryGap: false,
data: ["0", "2", "4", "6", "8", "10", "12", "14", "16", "18", "20", "22"],
axisTick: {
show: false,
},
axisLabel: {
color: "#fff",
fontSize: 12,
},
axisLine: {
lineStyle: {
color: "#668598",
},
},
},
yAxis: {
max: 1,
name: "辆",
type: "value",
nameTextStyle: {
color: "#2AD9FD",
// align: "right",
fontSize: 15,
// padding: [0, -15, 0, 0],
},
// nameGap: 24,
splitLine: {
lineStyle: {
type: [6, 9],
color: "rgba(255,255,255, .3)",
// dashOffset: [10, 10],
// cap: 21,
// width: 2
},
},
axisLabel: {
color: "#fff",
fontSize: 12,
formatter: "{value}",
},
},
grid: {
left: 33,
top: 33,
bottom: 24,
right: 36,
},
tooltip: {
trigger: "axis",
backgroundColor: "rgba(0,0,0,0.36)",
borderWidth: 0,
textStyle: {
color: "#fff",
},
formatter: "{b}:{c}",
// formatter: function([axisData]) {
// console.log(axisData)
// let str = axisData.name + ' ' + axisData.data + '辆</br>';
// // params.forEach(item => {
// // if (item.seriesName === '供温' || item.seriesName === '回温') {
// // str += item.marker + item.seriesName + ' : ' + item.data.value + ' ℃' + '</br>';
// // } else if (item.seriesName === '压力值(Mpa)') {
// // // 柱状图渐变时设置marker
// // item.marker = '<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:#6C50F3;"></span>';
// // str += item.marker + item.seriesName + ' : ' + item.data.value + ' m';
// // }
// // });
// return str;
// }
},
series: [
{
data: [0, 0.3, 0.6, 0.24, 0.15, 0.66, 0.9, 0, 0.36, 0.51, 0.72, 0.6, 0.3],
type: "line",
showSymbol: false,
smooth: true,
lineStyle: {
color: "#2AD9FD",
},
areaStyle: {
opacity: 0.8,
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{
offset: 0,
color: "rgb(90, 227, 255, .9)",
},
{
offset: 1,
color: "rgba(42,217,253,0)",
},
]),
},
},
],
};

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

@ -0,0 +1,23 @@
<template>
<div class='chart LineChart' ref="LineChartRef" />
</template>
<script>
import * as echarts from "echarts";
import { lineChartOption } from "./chart"
export default {
name: 'LineChart',
mounted() {
const chartIns = echarts.init(this.$refs.LineChartRef);
chartIns.setOption(lineChartOption);
},
}
</script>
<style lang='scss' scoped>
.LineChart {
flex: 1;
height: 100%;
}
</style>

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

@ -0,0 +1,187 @@
<template>
<Dialog v-model="obverseVisible" title="一类交调站弹窗">
<Video class="video-stream" :pileNum="dialogData.stakeMark" />
<div class="Intermodulation">
<ElTabs v-model="activeName" class="tabs">
<ElTabPane label="基本信息" name="first">
<Descriptions :list="list" :data="data" style="gap: 18px" />
</ElTabPane>
<ElTabPane label="设备参数" name="second">
<div class="content-second" style="height: 185px;">
<RadioGroup v-model="roadType" :options="roadTypeList" />
<span>当前车流量: 999</span>
<LineChartForTraffic style="flex: 1;" v-if="activeName === 'second'" />
</div>
</ElTabPane>
<ElTabPane label="在线统计率" name="third">
<LineChart v-if="activeName === 'third'" />
</ElTabPane>
</ElTabs>
</div>
</Dialog>
</template>
<script>
import Dialog from "@screen/components/Dialog/index.vue";
import Button from "@screen/components/Buttons/Button.vue"
import Descriptions from '@screen/components/Descriptions.vue';
import Video from "@screen/components/Video"
import LineChart from './components/LineChart/index.vue';
import LineChartForTraffic from './components/LineChartForTraffic/index.vue';
import Switcher from '@screen/pages/service/PublishingChannelManagement/components/Switcher.vue';
import { getRoadInfoByStakeMark, getProduct } from "@screen/pages/Home/components/RoadAndEvents/utils/httpList.js"
import { dialogDelayVisible } from "./../mixin"
import request from "@/utils/request";
import { Message } from 'element-ui';
import RadioGroup from '@screen/components/FormConfig/components/RadioGroup/index.vue';
// 广
export default {
name: 'Intermodulation',
mixins: [dialogDelayVisible],
components: {
Dialog,
Button,
Descriptions,
LineChart,
LineChartForTraffic,
Video,
Switcher,
RadioGroup
},
data() {
return {
activeName: 'first',
releaseVisible: false,
secondLoading: true,
data: {
deviceName: "LH24",
roadName: "G35济泽高速",
stakeMark: "k094+079",
direction: "1",
organizationName: "山东高速济南发展公司",
brand: "XXX厂家",
deviceState: "0",
},
roadTypeList: [
{ key: '1', label: '济南方向' },
{ key: '3', label: '菏泽方向' },
],
roadType: '1',
list: [
{
label: '设备名称',
key: "deviceName",
},
{
label: '设备桩号',
key: "stakeMark",
},
{
label: '道路名称',
key: "roadName",
},
{
label: '设备方向',
key: "direction",
enum: "CameraDirectionEnum"
},
{
label: '设备状态',
key: "deviceState",
enum: "DeviceTypeEnum"
},
// {
// label: '',
// key: "brand",
// },
],
activeOption: {
active: {
text: "开"
},
unActive: {
text: "关"
}
},
devicesList: []
}
},
async created() {
// if (!this.dialogData.iotDeviceId) this.dialogData.iotDeviceId = '10.0.36.146-1883';
this.data = { ...this.dialogData, roadName: null }
console.log("%c [ dialogData ]-103-「index.vue」", "font-size:15px; background:#36347c; color:#7a78c0;", this.dialogData);
// getProduct(this.dialogData.productId)
// .then(data => {
// this.dialogData.brand = data.brand;
// })
const roadInfo = await getRoadInfoByStakeMark(this.dialogData.stakeMark);
if (roadInfo) this.data.roadName = roadInfo.roadName;
}
}
</script>
<style lang='scss'>
div.switcher {
font-size: 12px;
padding: 2px;
}
</style>
<style lang='scss' scoped>
.Intermodulation {
width: 510px;
height: 240px;
color: #fff;
display: flex;
flex-direction: column;
.camera-video {
flex: 1.5;
}
.tabs {
flex: 1;
display: flex;
flex-direction: column;
::v-deep {
.el-tabs__content {
flex: 1;
.el-tab-pane {
height: 100%;
}
}
}
}
.content-second {
display: flex;
flex-direction: column;
height: 100%;
overflow: hidden;
gap: 9px;
}
.bottom {
margin-top: 12px;
display: flex;
gap: 9px;
align-items: center;
justify-content: end;
>div {
font-size: 16px;
padding: 6px 12px;
}
}
}
</style>

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

@ -80,6 +80,7 @@ export default {
key: "warningType",
type: "select",
options: {
disabled: true,
options: WarningTypeList
},
ons: {
@ -97,15 +98,14 @@ export default {
options: []
},
},
{
label: "车辆类型:",
key: "vehicleType",
type: "select",
options: {
options: vehicleTypeList
},
},
// {
// label: ":",
// key: "vehicleType",
// type: "select",
// options: {
// options: vehicleTypeList
// },
// },
{
label: "事件描述:",
key: "remark",
@ -239,7 +239,7 @@ export default {
id: this.dialogData.id,
warningType: this.data.warningType,
warningSubclass: this.data.warningSubclass,
vehicleType: this.data.vehicleType,
// vehicleType: this.data.vehicleType,
remark: this.data.remark,
lane: this.data.lane.join(",")
}

56
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SmartDevice/components/DeviceControlDialog.vue

@ -0,0 +1,56 @@
<template>
<Dialog v-model="modelVisible" title="设备操作">
<div class='DeviceControlDialog'>
<DeviceParams :dialogData="dialogData" />
</div>
</Dialog>
</template>
<script>
import Dialog from "@screen/components/Dialog/index.vue";
import DeviceParams from "./DeviceParams.vue"
export default {
name: 'DeviceControlDialog',
components: {
Dialog,
DeviceParams
},
model: {
prop: 'visible',
event: "update:value"
},
props: {
visible: Boolean,
dialogData: {
type: Object,
default: () => ({})
},
},
computed: {
modelVisible: {
get() {
return this.visible
},
set(val) {
this.$emit('update:value', val)
}
}
}
}
</script>
<style lang='scss' scoped>
.DeviceControlDialog {
width: 510px;
display: flex;
flex-direction: column;
gap: 15px;
min-height: 360px;
.tips {
font-size: 12px;
}
}
</style>

174
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SmartDevice/components/DeviceParams.vue

@ -0,0 +1,174 @@
<template>
<div class='DeviceParams'>
<div class="no-data" v-if="!devicesList.length" v-loading="secondLoading">暂无设备参数</div>
<Descriptions :list="devicesList" style="gap: 18px;" column="5">
<template v-for="item in devicesList.slice(0, -1)" #[`content-${getSlotKey(item.key)}`]="{ data }">
<span>{{ data.text }}</span>
<Switcher class="switcher" :disabled="disabled" :activeOption="activeOption" :value="data.state"
@change="(value) => handleSwitcherChange(value, data)" />
</template>
</Descriptions>
</div>
</template>
<script>
import Descriptions from '@screen/components/Descriptions.vue';
import Switcher from '@screen/pages/service/PublishingChannelManagement/components/Switcher.vue';
import request from "@/utils/request";
import { Message } from 'element-ui';
import { confirm } from "@screen/utils/common";
export default {
name: 'DeviceParams',
components: {
Descriptions,
Switcher
},
props: {
dialogData: {
type: Object,
default: () => ({})
},
disabled: Boolean
},
data() {
return {
secondLoading: true,
devicesList: [],
activeOption: {
active: {
text: "开"
},
unActive: {
text: "关"
}
}
}
},
created() {
// https://www.yuque.com/dayuanzhong-ovjwn/gkht0m/ww776d5kzs72ilzh?singleDoc=
//
request({
url: `/business/device/properties/latest/${this.dialogData.iotDeviceId || '10.0.36.143-1883'}`,
method: "get",
params: {}
})
.then(result => {
if (result.code != 200) return;
const [deviceInfo] = result.data;
const typeMap = {
ac: '220v',
dc: '12v',
}
for (const key in deviceInfo.formatValue) {
// electricity
// voltage
if (key.includes('electricity')) {
const args = key.match(/[a-z]+|[0-9]+$/g);
const type = args[0], num = args.slice(-1)[0], prefix = args.slice(0, 2).join('_');
this.devicesList.push(
{
label: `支路${num}${typeMap[type]}) 电压`,
key: `${prefix}_voltage_${num}`,
text: deviceInfo.formatValue[`${prefix}_voltage_${num}`],
gridColumn: 3
},
{
label: '电流',
key: `${prefix}_electricity_${num}`,
text: deviceInfo.formatValue[key],
gridColumn: 2,
state: deviceInfo.value[key] > 0
}
);
}
}
this.devicesList.push(
{
label: '风扇',
key: `fan_status`,
text: { 0: '正常', 1: '开' }[deviceInfo.formatValue['fan_status']] || '-',
gridColumn: 1
},
{
label: '箱门',
key: `door_status`,
text: { 0: '关闭', 1: '打开' }[deviceInfo.formatValue['door_status']] || '-',
gridColumn: 1
},
{
label: '温度',
key: `temperature`,
text: deviceInfo.formatValue['temperature'] ? `${deviceInfo.formatValue['temperature']} °C` : '-',
gridColumn: 1
},
{
label: '湿度',
key: `humidity`,
text: deviceInfo.formatValue['humidity'] || '-',
gridColumn: 1
},
{
label: '市电掉电',
key: `power_status`,
text: { 0: '正常', 1: '掉电' }[deviceInfo.formatValue['power_status']] || '-',
gridColumn: 2
},
)
// this.data = result.rows;
// this.total = result.total;
})
.finally(() => {
this.secondLoading = false
})
},
methods: {
async handleSwitcherChange(value, data) {
data.state = value;
const isContinue = await confirm({ message: "是否要删除该辖段信息?" })
.catch(() => {
data.state = !value;
});
if (!isContinue) return;
// https://www.yuque.com/dayuanzhong-ovjwn/gkht0m/ww776d5kzs72ilzh?singleDoc=
request({
url: `/business/device/functions/${this.dialogData.iotDeviceId}/${102}`,
method: "POST",
data: {
deviceName: data.key.match(/^[a-z]+_out|[0-9]+/g).join("_") + "_en",
// 1=0=
value: value ? 1 : 0
}
})
.then(result => {
if (result.code != 200) {
Message.error("操作失败");
data.state = !value;
return;
};
Message.success("操作成功");
})
.catch(() => {
data.state = !value;
Message.error("操作失败");
})
},
getSlotKey(key) {
return key.includes('electricity') ? key : ''
}
}
}
</script>
<style lang='scss' scoped>
.DeviceParams {
height: 100%;
}
</style>

128
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SmartDevice/index.vue

@ -8,20 +8,21 @@
<Descriptions :list="list" :data="data" style="gap: 18px" />
</ElTabPane>
<ElTabPane label="设备参数" name="second">
<div class="no-data" v-if="!devicesList.length" v-loading="secondLoading">暂无设备参数</div>
<Descriptions :list="devicesList" style="gap: 18px;" column="5">
<template v-for="item in devicesList.slice(0, -1)" #[`content-${getSlotKey(item.key)}`]="{ data }">
<span>{{ data.text }}</span>
<Switcher class="switcher" :activeOption="activeOption" :value="data.state"
@change="(value) => handleSwitcherChange(value, data)" />
</template>
</Descriptions>
<DeviceParams disabled :dialogData="dialogData" />
</ElTabPane>
<ElTabPane label="在线统计率" name="third">
<LineChart v-if="activeName === 'third'" />
<LineChart v-if="activeName === 'third'" style="height: 222px" />
</ElTabPane>
</ElTabs>
</div>
<template #footer>
<Button @click.native="deviceControlVisible = true">
设备操作
</Button>
</template>
<DeviceControlDialog v-model="deviceControlVisible" :dialogData="dialogData" />
</Dialog>
</template>
@ -31,12 +32,11 @@ import Button from "@screen/components/Buttons/Button.vue"
import Descriptions from '@screen/components/Descriptions.vue';
import Video from "@screen/components/Video"
import LineChart from './components/LineChart/index.vue';
import Switcher from '@screen/pages/service/PublishingChannelManagement/components/Switcher.vue';
import DeviceParams from "./components/DeviceParams.vue"
import DeviceControlDialog from "./components/DeviceControlDialog.vue"
import { getRoadInfoByStakeMark, getProduct } from "@screen/pages/Home/components/RoadAndEvents/utils/httpList.js"
import { dialogDelayVisible } from "./../mixin"
import request from "@/utils/request";
import { Message } from 'element-ui';
// 广
export default {
@ -44,17 +44,18 @@ export default {
mixins: [dialogDelayVisible],
components: {
Dialog,
Button,
Descriptions,
LineChart,
Video,
Switcher
Button,
DeviceParams,
DeviceControlDialog
},
data() {
return {
activeName: 'first',
releaseVisible: false,
secondLoading: true,
deviceControlVisible: false,
data: {
deviceName: "LH24",
roadName: "G35济泽高速",
@ -91,16 +92,7 @@ export default {
label: '设备厂商',
key: "brand",
},
],
activeOption: {
active: {
text: "开"
},
unActive: {
text: "关"
}
},
devicesList: []
]
}
},
async created() {
@ -118,90 +110,6 @@ export default {
const roadInfo = await getRoadInfoByStakeMark(this.dialogData.stakeMark);
if (roadInfo) this.data.roadName = roadInfo.roadName;
// https://www.yuque.com/dayuanzhong-ovjwn/gkht0m/ww776d5kzs72ilzh?singleDoc=
//
request({
url: `/business/device/properties/latest/${this.dialogData.iotDeviceId}`,
method: "get",
params: {}
})
.then(result => {
if (result.code != 200) return;
const [deviceInfo] = result.data;
const typeMap = {
ac: '220v',
dc: '12v',
}
for (const key in deviceInfo.formatValue) {
// electricity
// voltage
if (key.includes('electricity')) {
const args = key.match(/[a-z]+|[0-9]+$/g);
const type = args[0], num = args.slice(-1)[0], prefix = args.slice(0, 2).join('_');
this.devicesList.push(
{
label: `支路${num}${typeMap[type]}) 电压`,
key: `${prefix}_voltage_${num}`,
text: deviceInfo.formatValue[`${prefix}_voltage_${num}`],
gridColumn: 3
},
{
label: '电流',
key: `${prefix}_electricity_${num}`,
text: deviceInfo.formatValue[key],
gridColumn: 2,
state: deviceInfo.value[key] > 0
}
);
}
}
this.devicesList.push({
label: '风扇',
key: `fan_status`,
text: { 0: '正常', 1: '开' }[deviceInfo.formatValue['fan_status']] || '-',
gridColumn: 5
})
// this.data = result.rows;
// this.total = result.total;
})
.finally(() => {
this.secondLoading = false
})
},
methods: {
handleSwitcherChange(value, data) {
data.state = value;
// https://www.yuque.com/dayuanzhong-ovjwn/gkht0m/ww776d5kzs72ilzh?singleDoc=
request({
url: `/business/device/functions/${this.dialogData.iotDeviceId}/${102}`,
method: "POST",
data: {
deviceName: data.key.match(/^[a-z]+_out|[0-9]+/g).join("_") + "_en",
// 1=0=
value: value ? 1 : 0
}
})
.then(result => {
if (result.code != 200) {
Message.error("操作失败");
data.state = !value;
return;
};
Message.success("操作成功");
})
.catch(() => {
data.state = !value;
Message.error("操作失败");
})
},
getSlotKey(key) {
return key.includes('electricity') ? key : ''
}
}
}
</script>
@ -215,7 +123,7 @@ div.switcher {
<style lang='scss' scoped>
.SmartDevice {
width: 510px;
height: 240px;
// height: 240px;
color: #fff;
display: flex;
flex-direction: column;

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

@ -1,6 +1,11 @@
<template>
<Dialog v-model="obverseVisible" :title="dialogData._itemData && dialogData._itemData.title">
<div class="TrafficIncidents">
<div class="header">
<Video class="video-stream" :pileNum="dialogData.stakeMark" />
<Video class="video-stream" :pileNum="dialogData.stakeMark" :rangeIndex="1" />
</div>
<Descriptions labelWidth="72px" :list="list" :data="data" style="gap: 18px" column="7" />
</div>
</Dialog>
@ -10,6 +15,7 @@
import Dialog from "@screen/components/Dialog/index.vue";
import Descriptions from '@screen/components/Descriptions.vue';
// import { getRoadInfoByStakeMark, getProduct } from "@screen/pages/Home/components/RoadAndEvents/utils/httpList.js"
import Video from "@screen/components/Video"
import request from "@/utils/request";
import { dialogDelayVisible } from "./../mixin"
@ -21,6 +27,7 @@ export default {
components: {
Dialog,
Descriptions,
Video
},
data() {
return {
@ -129,11 +136,21 @@ export default {
color: #fff;
display: flex;
flex-direction: column;
gap: 12px;
.camera-video {
flex: 1.5;
}
.header {
display: flex;
gap: 9px;
>div.video-stream {
height: 210px;
}
}
.tabs {
flex: 1;
display: flex;

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

@ -9,8 +9,8 @@
<!-- group -->
<div name="fade-group" tag="div" class="tabs-content">
<div class="device-item" v-for="(item, index) in tabContentData" :key="item.id" @click="handleDevice(item)"
:style="getStart(index)">
<div class="device-item keep-ratio" v-for="(item, index) in tabContentData" :key="item.id"
@click="handleDevice(item)" :style="getStart(index)">
<div class="device-icon"
:style="{ backgroundImage: `url(${require(`@screen/images/layer/${active}/${item.title}${item.status}.svg`)})`, '--bgColor': `rgba(0, 209, 255, ${item.status ? 0.3 : 0})` }" />
<span>{{ item.title }}</span>
@ -46,6 +46,8 @@ import Broadcast from "./../Dialogs/Broadcast/index.vue";
import TrafficIncidents from "./../Dialogs/TrafficIncidents/index.vue";
import PerceiveEvent from "./../Dialogs/PerceiveEvent/index.vue";
import SmartDevice from "./../Dialogs/SmartDevice/index.vue";
import Intermodulation from "./../Dialogs/Intermodulation/index.vue";
import FatigueWakesUp from "./../Dialogs/FatigueWakesUp/index.vue";
export default {
name: 'RoadAndEvents',
@ -59,6 +61,8 @@ export default {
TrafficIncidents,
PerceiveEvent,
SmartDevice,
Intermodulation,
FatigueWakesUp
},
data() {
return {

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

@ -29,6 +29,7 @@ export const DeviceForMap = {
* 1 枪机 不可控
*/
const type = JSON.parse(item.otherConfig || "{}")?.ptzCtrl || 1;
return cameraIcon[`${type}${+!bool}`];
},
},
@ -49,6 +50,29 @@ export const DeviceForMap = {
deviceType: "13",
dialog: "SmartDevice",
},
交调: {
deviceType: "11",
dialog: "Intermodulation",
},
合流区: {
deviceType: "8",
},
护栏碰撞: {
deviceType: "6",
},
智慧锥桶: {
deviceType: "9",
},
毫米波雷达: {
deviceType: "7",
},
气象检测器: {
deviceType: "3",
},
疲劳唤醒: {
deviceType: "10",
dialog: "FatigueWakesUp",
},
};
export function getHandleDeviceType(item) {

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

@ -39,8 +39,6 @@ export class MarkerCluster {
constructor() {}
getMap() {
if (this.map) return this.map;
return (this.map = Vue.prototype.mapIns);
}
@ -52,7 +50,11 @@ export class MarkerCluster {
this.data.push(...data);
if (!this.markerCluster) await this.setMarkerCluster();
if (
!this.markerCluster ||
this.markerCluster.getMap() !== Vue.prototype.mapIns
)
await this.setMarkerCluster();
const map = this.getMap();
@ -97,7 +99,7 @@ export class MarkerCluster {
const deviceIcon =
typeof config.iconCallback === "function" &&
config.iconCallback(currentState, config.item);
config.iconCallback(currentState, extData, config.item);
return deviceIcon ? deviceIcon : currentState ? normal : fault;
}
@ -179,7 +181,7 @@ export class MarkerCluster {
border: 1px solid rgba(42,217,253,0.6);
">
<div style="height: 26px; width: 100%; display: flex;align-items: center; justify-content: space-between; padding: 0 15px; background: linear-gradient(90deg, #237E9B 0%, rgba(23,145,184,0) 100%);">
<span></span>
<span></span>
<img class="info-close" style="width: 12px;cursor: pointer;" src="${require("@screen/images/dialog/icon-close.svg")}" />
</div>
<div style="padding: 15px 9px;flex: 1; overflow: auto;" class="info-window-content">
@ -296,6 +298,12 @@ export class MarkerCluster {
return;
}
console.log(
"%c [ 点击地图坐标 ]-302-「map.js」",
"font-size:15px; background:#8f8c0b; color:#d3d04f;",
data[0]
);
data[0].config.markerClick?.(data[0].extData, data[0].config?.item);
});
},

2
ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/dailyDisposal/assets/charts.js

@ -22,7 +22,7 @@ var options = {
orient: 'vertical',
top: "center",
icon: "circle",
right: 30,
right: 15,
itemGap: 16,
itemWidth: 8,
itemHeight: 8,

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

@ -140,9 +140,9 @@ export default {
context.lineWidth = 1; // 线
//
drawRoundRect(context, 260, 50, 120, 24, 12, gr)
drawRoundRect(context, 260, 78, 120, 24, 12, gr)
drawRoundRect(context, 260, 106, 120, 24, 12, gr)
drawRoundRect(context, 272, 50, 120, 24, 12, gr)
drawRoundRect(context, 272, 78, 120, 24, 12, gr)
drawRoundRect(context, 272, 106, 120, 24, 12, gr)
});
});

3
ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/dayTotal/index.vue

@ -13,6 +13,7 @@ import WgtTitle from '../../../widgets/title'
import * as echarts from "echarts";
import chartsStatistics from "./assets/charts";
import { getDailyCumulative } from '../../../../../../../api/event/perceiveEvent';
import moment from "moment";
export default {
name: 'RailWayDay',
@ -88,7 +89,7 @@ export default {
}
data.forEach((it) => {
timer.push(it.time);
timer.push(moment(it.time).format('HH:mm'));
number.push(it.number);
});

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

@ -107,7 +107,7 @@ var options = {
//圆环中间内容
text: "{zb|12}",
subtext: "类型分析",
left: "19%",
left: "17.5%",
top: "40%",
textStyle: {
rich: {

174
ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventSource/assets/charts.js

@ -1,41 +1,55 @@
let data = [{
average: 30,
name: '视频识别',
percent: 0.2
}, {
average: 25,
name: '雷达识别',
percent: 0.25
}, {
average: 15,
name: '锥桶',
percent: 0.08
}, {
average: 30,
name: '护栏碰撞',
percent: 0.14
}]
let data = [
{
average: 30,
name: "视频识别",
percent: 0.2,
},
{
average: 25,
name: "雷达识别",
percent: 0.25,
},
{
average: 15,
name: "锥桶",
percent: 0.3,
},
{
average: 30,
name: "护栏碰撞",
percent: 0.25,
},
];
window.mainData = data;
let chartData = [], lengData = [], colorList = ['#006EDF', '#00FF00', '#FFC30D', '#FF8400', '#1DA7FF', '#2967EA'];
let chartData = [],
lengData = [],
colorList = [
"#006EDF",
"#00FF00",
"#FFC30D",
"#FF8400",
"#1DA7FF",
"#2967EA",
];
for (let i = 0; i < data.length; i++) {
chartData.push({
value: data[i].average,
name: data[i].name,
percent: data[i].percent,
color: colorList[i]
})
// percent: data[i].percent,
color: colorList[i],
});
lengData.push({
name: data[i].name,
color: colorList[i]
})
color: colorList[i],
});
}
let a = chartData.map(t => {
t.value = parseInt(t.value)
return t
})
let a = chartData.map((t) => {
t.value = parseInt(t.value);
return t;
});
const sum = a.reduce((per, cur) => per + cur.value, 0);
const gap = (1 * sum) / 100;
const pieData1 = [];
@ -64,14 +78,15 @@ var options = {
confine: true,
textStyle: {
fontSize: 10, // 字体大小
color: '#333',
color: "#333",
},
color: '#333',
color: "#333",
backgroundColor: "#ffffff",
},
title: { //圆环中间内容
text: '{tb|100}',
subtext: '{zb|总数}',
title: {
//圆环中间内容
text: "{tb|100}",
subtext: "{zb|总数}",
left: "22%",
top: "40%",
textStyle: {
@ -80,24 +95,24 @@ var options = {
width: 45,
color: "#fff",
fontSize: 21,
align: 'center'
}
}
align: "center",
},
},
},
subtextStyle: {
rich: {
zb: {
width: 45,
color: '#fff',
color: "#fff",
fontSize: 13,
align: 'center'
}
}
align: "center",
},
},
},
},
color: ['#5973FF', '#14d8b4', '#FFC30D', '#61D8FF', '#1DA7FF', '#2967EA'],
color: ["#5973FF", "#14d8b4", "#FFC30D", "#61D8FF", "#1DA7FF", "#2967EA"],
legend: {
top: '20%',
top: "8%",
right: 0,
orient: "vertical", //改变排列方式
icon: "circle", //改变legend小图标形状
@ -116,7 +131,7 @@ var options = {
padding: 5,
marginLeft: 5,
color: "#37E7FF",
}
},
},
},
itemStyle: {
@ -124,32 +139,27 @@ var options = {
},
data: lengData,
formatter: function (name) {
let total = 0
let target = 0
let target = 0;
if (!mainData) return "";
for (let i = 0; i < data.length; i++) {
if (window.mainData[i]) {
total += window.mainData[i].percent
if (window.mainData[i].name === name) {
target = window.mainData[i].percent
}
for (let i = 0; i < window.mainData.length; i++) {
if (window.mainData[i].name === name) {
target = window.mainData[i].percent;
}
}
var arr = [
'{a|' + name + (name.length == 4 ? '}' : '} '),
'{b|' + ((target / total) * 100).toFixed(2) + '%}',
]
return arr.join(' ')
"{a|" + name + (name.trim().length == 4 ? "}" : "} "),
"{b|" + (target * 100).toFixed(0) + "%}",
];
return arr.join(" ");
},
},
series: [
{
name: '',
avoidLabelOverlap: true,//防止标签重叠
type: 'pie',
radius: ['63%', '73%'], //大小
center: ['30%', '50%'], //位置
name: "",
avoidLabelOverlap: true, //防止标签重叠
type: "pie",
radius: ["63%", "73%"], //大小
center: ["30%", "50%"], //位置
hoverAnimation: true,
itemStyle: {
normal: {
@ -165,37 +175,37 @@ var options = {
},
normal: {
length: 30, // 指示线长度
length2: 80
length2: 80,
},
},
data: pieData1,
label: {
show: false,
formatter: function (params) { },
formatter: function (params) {},
textStyle: {
fontSize: '18',
fontWeight: 'bold',
color: '#fff'
fontSize: "18",
fontWeight: "bold",
color: "#fff",
},
rich: {
color0: {
color: '#D56383',
color: "#D56383",
},
color1: {
color: '#00FF95',
color: "#00FF95",
},
color3: {
color: '#FFE900',
color: "#FFE900",
},
color2: {
color: '#F5B157',
color: "#F5B157",
},
color4: {
color: '#1DA7FF',
color: "#1DA7FF",
},
color5: {
color: '#2967EA'
}
color: "#2967EA",
},
},
},
emphasis: {
@ -203,11 +213,11 @@ var options = {
},
},
{
type: 'gauge',
type: "gauge",
zlevel: 0,
splitNumber: 360,
radius: '50%',
center: ['30%', '50%'],
radius: "50%",
center: ["30%", "50%"],
startAngle: 90,
endAngle: -269.9999,
axisLine: {
@ -224,7 +234,7 @@ var options = {
length: 68,
lineStyle: {
width: 2,
color: '#277DCA',
color: "#277DCA",
},
},
pointer: {
@ -235,11 +245,11 @@ var options = {
},
},
{
type: 'gauge',
type: "gauge",
zlevel: 2,
splitNumber: 185,
radius: '80%',
center: ['30%', '50%'],
radius: "80%",
center: ["30%", "50%"],
startAngle: 90,
endAngle: -269.9999,
axisLine: {
@ -256,7 +266,7 @@ var options = {
length: 2,
lineStyle: {
width: 1,
color: '#017383',
color: "#017383",
},
},
pointer: {
@ -266,7 +276,7 @@ var options = {
show: 0,
},
},
]
],
};
export default options
export default options;

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

@ -56,66 +56,81 @@ export default {
getWarningSourceGroup().then((res) => {
if (res.code == 200) {
let data = res.data.warningSourceList;
let total = res.data.total;
let data = res.rows;
let total = 0;
if (data.length > 0) {
let warningTypes = [];
let number = [];
data.forEach((it, index )=> {
let chartData = [
{
average: 0,
name: '视频AI ',
percent: 0.3
},
{
average: 0,
name: '雷达识别',
percent: 0.2
}, {
average: 0,
name: '锥桶',
percent: 0.1
}, {
average: 0,
name: '护栏碰撞',
percent: 0.2
}, {
average: 0,
name: '扫码报警',
percent: 0.1
}, {
average: 0,
name: '非机预警',
percent: 0.1
},
]
data.forEach(it => {
if (it.warningSource == 1) {
warningTypes.push('交通拥堵');
chartData[0].average++;
}
if (it.warningSource == 2) {
warningTypes.push('行人');
chartData[1].average++;
}
if (it.warningSource == 3) {
warningTypes.push('非机动车');
chartData[2].average++;
}
if (it.warningSource == 4) {
warningTypes.push('停车');
chartData[3].average++;
}
if (it.warningSource == 5) {
warningTypes.push('倒车/逆行');
chartData[4].average++;
}
if (it.warningSource == 6) {
warningTypes.push('烟火');
}
if (it.warningSource == 7) {
warningTypes.push('撒落物');
}
if (it.warningSource == 8) {
warningTypes.push('异常天气');
chartData[5].average ++;
}
if (it.warningSource == 9) {
warningTypes.push('护栏碰撞');
}
number.push(it.number);
drawRoundRect(context, 231, 37 + (index * 27), 138, 20, 12, gr);
total ++;
// drawRoundRect(context, 231, 37 + (index * 27), 138, 20, 12, gr);
})
// console.log('data',chartData)
let colorList = ['#006EDF', '#00FF00', '#FFC30D', '#FF8400', '#1DA7FF', '#2967EA'];
let lengData = [];
let mainData = [];
let mainCount = 0;
for (let j = 0; j < number.length; j++) {
mainCount += number[j];
}
for (let i = 0; i < warningTypes.length; i++) {
let it = warningTypes[i];
for (let i = 0; i < chartData.length; i++) {
let it = chartData[i];
lengData.push({
name: it,
name: it.name,
color: colorList[i],
value: number[i],
value: it.average,
});
mainData.push({
name: it,
name: it.name,
color: colorList[i],
value: number[i],
percent: number[i] / mainCount
value: it.average,
percent: it.average / total
})
}
window.mainData = mainData;
console.log('mainData',mainData)
// console.log('mainData', mainData)
chartsStatistics.title.text = `{tb|${total}}`;
chartsStatistics.title.subtext = "{zb|总数}";
@ -123,11 +138,12 @@ export default {
chartsStatistics.series[0].data = mainData;
myChart.on('mouseover', (params) => {
// console.log('params',params)
if (params.componentType == 'graphic') {
return
}
chartsStatistics.title.text = `{tb|${params.percent}%}`;
chartsStatistics.title.subtext = `{zb|${params.data.name}}`;
chartsStatistics.title.subtext = `{zb|${params.data.name}}`;
// chartsStatistics.title.left = "22%";
myChart.setOption(chartsStatistics);
})
@ -140,7 +156,9 @@ export default {
myChart.setOption(chartsStatistics);
})
}
}
myChart.setOption(chartsStatistics);
})
@ -157,10 +175,12 @@ export default {
let gr = context.createLinearGradient(230, 0, 360, 0);
gr.addColorStop(1, 'rgba(92,197,255,0)');
gr.addColorStop(0, 'rgba(92,197,255,0.3)');
// drawRoundRect(context, 241, 37, 134, 20, 12, gr);
// drawRoundRect(context, 241, 64, 134, 20, 12, gr);
// drawRoundRect(context, 241, 91, 134, 20, 12, gr);
// drawRoundRect(context, 241, 118, 134, 20, 12, gr);
drawRoundRect(context, 248, 15, 134, 21, 12, gr);
drawRoundRect(context, 248, 42, 134, 21, 12, gr);
drawRoundRect(context, 248, 69, 134, 21, 12, gr);
drawRoundRect(context, 248, 96, 134, 21, 12, gr);
drawRoundRect(context, 248, 123, 134, 21, 12, gr);
drawRoundRect(context, 248, 150, 134, 21, 12, gr);
context.lineWidth = 1; // 线

2
ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/railway/assets/charts.js

@ -102,7 +102,7 @@ var options = {
data: sdata,
color: '#fff',
formatter: (c) => {
return `{a|}{b|${c.value}}`
return `{a|}{b|${c.value}}`
},
rich: {
a: {

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

@ -117,7 +117,7 @@ export default {
});
}
drawRoundRect(context, 254, 8 + i * 28, 120, 24, 12, gr)
drawRoundRect(context, 250, 8 + i * 28, 120, 24, 12, gr)
}
chartsStatistics.legend.data = typeAnalysisData?.map(x => x.name);

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

@ -25,6 +25,7 @@ export default {
type: Boolean,
default: false
},
disabled: Boolean
},
emit: ['change'],
data() {
@ -60,6 +61,8 @@ export default {
},
methods: {
toggle() {
if (this.disabled) return;
this.$emit("change", this.active = !this.active)
}
},

2
ruoyi-ui/src/views/JiHeExpressway/utils/common.js

@ -87,7 +87,7 @@ export function confirm({
...args,
})
.then(() => {
resolve();
resolve(true);
})
.catch(() => {
reject("取消 Confirm");

Loading…
Cancel
Save