Browse Source

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

wangqin
zhoule 11 months ago
parent
commit
541c035ef5
  1. 129
      ruoyi-ui/src/api/equipment/type/api.js
  2. 311
      ruoyi-ui/src/api/event/perceiveEvent.js
  3. 21
      ruoyi-ui/src/components/eventDialogTable/video.vue
  4. 2
      ruoyi-ui/src/views/JiHeExpressway/components/Descriptions.vue
  5. 10
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Broadcast/index.vue
  6. 43
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Camera/components/CameraControlDialog.vue
  7. 35
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Camera/index.vue
  8. 47
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/DrivingGuidance/index.vue
  9. 12
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/FatigueWakesUp/index.vue
  10. 7
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Intermodulation/index.vue
  11. 1
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SmartDevice/components/DeviceControlDialog.vue
  12. 24
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SmartDevice/components/DeviceParams.vue
  13. 23
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SmartDevice/components/LineChart/index.vue
  14. 53
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SmartDevice/index.vue
  15. 16
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/InfoBoard/index.vue
  16. 21
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/LineChart/chart.js
  17. 53
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/LineChart/index.vue
  18. 3
      ruoyi-ui/src/views/JiHeExpressway/utils/enum.js
  19. 13
      ruoyi-ui/src/views/workbench/config/components/board.vue
  20. 10
      ruoyi-ui/src/views/workbench/config/components/video.vue
  21. 4
      ruoyi-ui/vue.config.js

129
ruoyi-ui/src/api/equipment/type/api.js

@ -6,141 +6,146 @@
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \TunnelPlatform-V3\src\api\equipment\type\api.js
*/
import request from '@/utils/request'
import request from "@/utils/request";
// 查询设备类型列表
export function listType(query) {
return request({
url: '/type/list',
method: 'get',
params: query
})
url: "/type/list",
method: "get",
params: query,
});
}
// 查询存在设备的设备类型列表
export function listHasType(tunnelId) {
return request({
url: '/type/hasList?tunnelId=' + tunnelId,
method: 'get',
})
url: "/type/hasList?tunnelId=" + tunnelId,
method: "get",
});
}
export function hasListByBigType(bigType) {
return request({
url: '/type/hasListByBigType?bigType=' + bigType,
method: 'get',
})
url: "/type/hasListByBigType?bigType=" + bigType,
method: "get",
});
}
// 查询存在设备的设备类型列表
export function groupByBigType(tunnelId) {
return request({
url: '/type/hasListGroupByBigType',
method: 'get',
})
url: "/type/hasListGroupByBigType",
method: "get",
});
}
// 查询设备类型列表
export function eqTypeList(data) {
return request({
url: '/type/eqTypeList',
method: 'get',
params: data
})
url: "/type/eqTypeList",
method: "get",
params: data,
});
}
// 查询设备类型详细
export function getType(typeId) {
return request({
url: '/type/' + typeId,
method: 'get'
})
url: "/type/" + typeId,
method: "get",
});
}
// 新增设备类型
export function addType(data) {
return request({
url: '/type',///addEquipmentType
method: 'post',
data: data
})
url: "/type", ///addEquipmentType
method: "post",
data: data,
});
}
// 修改设备类型
export function updateType(data) {
return request({
url: '/type',
method: 'put',
data: data
})
url: "/type",
method: "put",
data: data,
});
}
// 删除设备类型
export function delType(typeId) {
return request({
url: '/type/' + typeId,
method: 'delete'
})
url: "/type/" + typeId,
method: "delete",
});
}
//加载图片
export function loadPicture(data) {
return request({
url: '/type/loadPicture',
method: 'post',
params: data
})
url: "/type/loadPicture",
method: "post",
params: data,
});
}
// 查询自动触发设备类型列表
export function autoEqTypeList(data) {
return request({
url: '/type/getHasItemEqTypeList',
method: 'get',
params: data
})
url: "/type/getHasItemEqTypeList",
method: "get",
params: data,
});
}
// 查询设备需要执行的操作
export function getStateTypeId(data) {
return request({
url: '/eqTypeState/getDataTypeList',
method: 'get',
params: data
})
url: "/eqTypeState/getDataTypeList",
method: "get",
params: data,
});
}
// 回显自动触发的接口
export function getTriggersByRelateId(data) {
return request({
url: '/strategy/trigger/getTriggersByRelateId',
method: 'get',
params: data
})
url: "/strategy/trigger/getTriggersByRelateId",
method: "get",
params: data,
});
}
// 相关策略查询
export function getTypeAndStrategy(data) {
return request({
url: '/type/getTypeAndStrategy',
method: 'get',
params: data
})
url: "/type/getTypeAndStrategy",
method: "get",
params: data,
});
}
// 导出设备图标
export function exportDeviceIcon(query) {
return request({
url: '/type/export',
method: 'get',
params: query
})
url: "/type/export",
method: "get",
params: query,
});
}
export function listDevicesType() {
return request({
url: '/type/list',
method: 'get',
})
url: "/type/list",
method: "get",
});
}
// 设备在线率统计
export function deviceStatusList(id) {
return request({
url: "/system/status/deviceStatusList?deviceld=" + id,
method: "get",
});
}

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

@ -1,174 +1,171 @@
import request from '@/utils/request'
import { download } from '../../utils/request'
import request from "@/utils/request";
import { download } from "../../utils/request";
// 全景数据 - 运行环境接口
//查询预警表与历史表所有感知事件的数量
export function geTwarningTotal(query) {
return request({
url: '/perceivedEvents/warning/warningTotal',
method: 'post',
params: {
...query,
}
})
}
return request({
url: "/perceivedEvents/warning/warningTotal",
method: "post",
params: {
...query,
},
});
}
//查询全部的感知事件类型
export function getSystemStatusTabList(query) {
//system/status/tablist
return request({
url: '/system/status/tablist',
method: 'post',
params: {
...query,
}
})
}
//查询全部的感知事件类型
export function getSystemStatusTabList(query) {
//system/status/tablist
return request({
url: "/system/status/tablist",
method: "post",
params: {
...query,
},
});
}
//根据事件主子类查询事件列表
export function getPerceivedEventsList(query) {
//system/status/tablist
return request({
url: '/perceivedEvents/warning/perceivedEventsList',
method: 'post',
params: {
...query,
}
})
}
//根据事件主子类查询事件列表
export function getPerceivedEventsList(query) {
//system/status/tablist
return request({
url: "/perceivedEvents/warning/perceivedEventsList",
method: "post",
params: {
...query,
},
});
}
//路段感知事件排名
export function getSectionPerceivedList(query) {
//system/status/tablist
return request({
url: '/perceivedEvents/warning/sectionPerceivedList',
method: 'post',
params: {
...query,
}
})
}
//路段感知事件排名
export function getSectionPerceivedList(query) {
//system/status/tablist
return request({
url: "/perceivedEvents/warning/sectionPerceivedList",
method: "post",
params: {
...query,
},
});
}
//路段日感知事件
export function getSectionPerceivedNumber(query) {
//system/status/tablist
return request({
url: '/perceivedEvents/warning/sectionPerceivedNumber',
method: 'post',
params: {
...query,
}
})
}
//路段日感知事件
export function getSectionPerceivedNumber(query) {
//system/status/tablist
return request({
url: "/perceivedEvents/warning/sectionPerceivedNumber",
method: "post",
params: {
...query,
},
});
}
//日累计感知事件
export function getDailyCumulative(query) {
//system/status/tablist
return request({
url: '/perceivedEvents/warning/dailyCumulative',
method: 'post',
params: {
...query,
}
})
}
//日累计感知事件
export function getDailyCumulative(query) {
//system/status/tablist
return request({
url: "/perceivedEvents/warning/dailyCumulative",
method: "post",
params: {
...query,
},
});
}
//感知事件源分析
export function getWarningSourceGroup(query) {
return request({
url: '/perceivedEvents/warning/warningSourceGroup',
method: 'post',
// url: '/business/warning/list',
// method: 'get',
params: {
...query,
}
})
}
//感知事件源分析
export function getWarningSourceGroup(query) {
return request({
url: "/perceivedEvents/warning/warningSourceGroup",
method: "post",
// url: '/business/warning/list',
// method: 'get',
params: {
...query,
},
});
}
//日事件处置情况占比
export function getWarningStateDay(query) {
//system/status/tablist
return request({
url: '/perceivedEvents/warning/warningStateDay',
method: 'post',
params: {
...query,
}
})
}
//日事件处置情况占比
export function getWarningStateDay(query) {
//system/status/tablist
return request({
url: "/perceivedEvents/warning/warningStateDay",
method: "post",
params: {
...query,
},
});
}
//近一月感知事件时段分布统计
export function getDailyCumulativeMonth(query) {
//system/status/tablist
return request({
url: '/perceivedEvents/warning/dailyCumulativeMonth',
method: 'post',
params: {
...query,
}
})
}
//近一月感知事件时段分布统计
export function getDailyCumulativeMonth(query) {
//system/status/tablist
return request({
url: "/perceivedEvents/warning/dailyCumulativeMonth",
method: "post",
params: {
...query,
},
});
}
//感知事件类型分析
export function getWarningTypeDay(query) {
//system/status/tablist
return request({
url: '/perceivedEvents/warning/warningTypeDay',
method: 'post',
params: {
...query,
}
})
}
//感知事件类型分析
export function getWarningTypeDay(query) {
//system/status/tablist
return request({
url: "/perceivedEvents/warning/warningTypeDay",
method: "post",
params: {
...query,
},
});
}
//感知事件查询-感知事件趋势
export function getWarningTrend(query) {
//system/status/tablist
return request({
url: '/perceivedEvents/warning/warningTrend',
method: 'post',
data: {
...query,
}
})
}
//感知事件查询-感知事件趋势
export function getWarningTrend(query) {
//system/status/tablist
return request({
url: "/perceivedEvents/warning/warningTrend",
method: "post",
data: {
...query,
},
});
}
//感知事件查询-类型占比
export function getWarningSectionType(query) {
//system/status/tablist
return request({
url: '/perceivedEvents/warning/warningSectionType',
method: 'post',
data: {
...query,
}
})
}
//感知事件查询-类型占比
export function getWarningSectionType(query) {
//system/status/tablist
return request({
url: "/perceivedEvents/warning/warningSectionType",
method: "post",
data: {
...query,
},
});
}
//感知事件查询-路段范围内桩号分布
export function getSectionMarkNumber(query) {
//system/status/tablist
return request({
url: '/perceivedEvents/warning/sectionMarkNumber',
method: 'post',
data: {
...query,
}
})
}
//感知事件查询-路段范围内桩号分布
export function getSectionMarkNumber(query) {
//system/status/tablist
return request({
url: "/perceivedEvents/warning/sectionMarkNumber",
method: "post",
data: {
...query,
},
});
}
///
//查询辖区路段列表
export function getRoadSectionList(query) {
//system/status/tablist
return request({
url: '/business/roadSection/listAll',
method: 'get',
params: {
...query,
}
})
}
//查询辖区路段列表
export function getRoadSectionList(query) {
//system/status/tablist
return request({
url: "/business/roadSection/listAll",
method: "get",
params: {
...query,
},
});
}

21
ruoyi-ui/src/components/eventDialogTable/video.vue

@ -46,7 +46,7 @@
size="mini"
style="padding: 0 15px 15px 15px"
>
<el-tabs class="videoTabs" v-model="videoActive">
<el-tabs class="videoTabs" v-model="videoActive" @tab-click="handleClick">
<el-tab-pane label="详细信息" name="information">
<el-row>
<el-col :span="13">
@ -142,7 +142,13 @@
</el-col>
</el-row>
</el-tab-pane>
<el-tab-pane label="在线率统计" name="third">在线率统计</el-tab-pane>
<el-tab-pane label="在线率统计" name="third">
<!-- <LineChart
v-if="activeName === 'third'"
:productId="dialogData.productId"
style="height: 222px"
/> -->
</el-tab-pane>
</el-tabs>
</el-form>
<div slot="footer">
@ -372,9 +378,11 @@
<script>
import { displayH5sVideoAll } from "@/api/icyH5stream";
import { getDeviceById,videoStreaming } from "@/api/equipment/eqlist/api.js"; //
import {deviceStatusList} from "@/api/equipment/type/api.js"
import { getInfo } from "@/api/equipment/tunnel/api.js"; //
import bus from "@/utils/bus";
import videoPlayer from "@/views/event/vedioRecord/myVideo.vue";
// import LineChart from "../";
export default {
// props: ["eqInfo", "brandList", "directionList", "eqTypeDialogList"],
@ -523,6 +531,15 @@ export default {
displayH5sVideoAll(res.data.secureKey);
});
},
handleClick(){
console.log("qiehuantab",this.videoActive)
},
// id线
getDeviceStatusList(){
deviceStatusList().then((res)=>{
console.log("线率统计数据",res)
})
},
getDirection(num) {
for (var item of this.directionList) {
if (item.dictValue == num) {

2
ruoyi-ui/src/views/JiHeExpressway/components/Descriptions.vue

@ -1,7 +1,7 @@
<template>
<div class="Descriptions keep-ratio" origin="left" :style="getStyle()">
<div class="item" v-for="(item, index) in getResolveList" :key="`${item.key || item.label}${index}`"
:style="[gridStyle(item, index), transformStyle(itemStyle)]">
:style="[gridStyle(item, index), transformStyle(itemStyle)]" v-if="item.visible != false">
<div class="text title" :style="{...transformStyle(titleStyle), width: labelWidth }">
<p>
<slot :name="`title-${item.key || item.label}`" :data="item">

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

@ -9,7 +9,13 @@
</Descriptions>
</ElTabPane>
<ElTabPane label="设备参数" name="second">设备参数</ElTabPane>
<ElTabPane label="在线率统计" name="third">在线率统计</ElTabPane>
<ElTabPane label="在线率统计" name="third">
<LineChart
v-if="activeName === 'third'"
:productId="dialogData.productId"
style="height: 150px"
/>
</ElTabPane>
</ElTabs>
<div class="bottom">
@ -33,6 +39,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 LineChart from "../../LineChart/index.vue";
import { DeviceTypeEnum } from "@screen/utils/enum.js";
@ -53,6 +60,7 @@ export default {
Descriptions,
BroadcastReleases,
Video,
LineChart,
},
data() {
return {

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

@ -27,6 +27,11 @@
<span>{{ item.label }}</span>
<img src="../images/add.svg" @click="controlClick(item.add)">
</div>
<div>雨刷
<Button .native="controlClick(49)"></Button>
<Button @click.native="controlClick(48)"></Button>
</div>
</div>
</div>
</Dialog>
@ -36,11 +41,15 @@
import Dialog from "@screen/components/Dialog/index.vue";
import { controlCamera } from "@screen/pages/Home/components/RoadAndEvents/utils/httpList.js"
import { throttle } from "lodash"
import Switcher from '@screen/pages/service/PublishingChannelManagement/components/Switcher.vue';
import Button from "@screen/components/Buttons/Button.vue";
// 49 48
export default {
name: 'CameraControlDialog',
components: {
Dialog
Dialog,
Button
},
model: {
prop: 'visible',
@ -71,7 +80,18 @@ export default {
add: "13",
sub: "14"
},
]
],
activeOption: {
active: {
text: "开"
},
unActive: {
text: "关"
}
},
data: {
state: 0
}
}
},
computed: {
@ -87,7 +107,21 @@ export default {
methods: {
controlClick: throttle(function (type) {
controlCamera(this.deviceId, type)
}, 150)
}, 150),
async handleSwitcherChange(value, data) {
let str = data.state ? "关闭" : "开启";
data.state = value;
const isContinue = await confirm({ message: `${str}` })
.catch(() => {
console.log(data.state, value, 333)
data.state = !value;
});
if (!isContinue) return;
},
},
}
</script>
@ -180,12 +214,13 @@ export default {
.options {
display: flex;
flex-direction: column;
justify-content: center;
gap: 18px;
>div {
display: flex;
align-items: center;
justify-content: center;
gap: 9px;
img {

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

@ -7,16 +7,30 @@
<Descriptions :list="list" :data="data" style="gap: 18px">
<template #content-deviceName>
<span>{{ dialogData.deviceName || "-" }}</span>
<img @click="controlDialogVisible = true" v-if="[0, '0'].includes(
dialogData.parseOtherConfig &&
dialogData.parseOtherConfig.ptzCtrl
)
" src="@screen/images/camera-control-icon.svg" width="18px" height="18px" style="cursor: pointer" />
<img
@click="controlDialogVisible = true"
v-if="
[0, '0'].includes(
dialogData.parseOtherConfig &&
dialogData.parseOtherConfig.ptzCtrl
)
"
src="@screen/images/camera-control-icon.svg"
width="18px"
height="18px"
style="cursor: pointer"
/>
</template>
</Descriptions>
</ElTabPane>
<ElTabPane label="摄相机参数" name="second">摄相机参数</ElTabPane>
<ElTabPane label="在线率统计" name="third">在线率统计</ElTabPane>
<ElTabPane label="在线率统计" name="third">
<LineChart
v-if="activeName === 'third'"
:productId="dialogData.productId"
style="height: 180px"
/>
</ElTabPane>
</ElTabs>
<div class="bottom">
@ -25,7 +39,10 @@
</div>
</div>
<CameraControlDialog :deviceId="dialogData.iotDeviceId" v-model="controlDialogVisible" />
<CameraControlDialog
:deviceId="dialogData.iotDeviceId"
v-model="controlDialogVisible"
/>
</Dialog>
</template>
@ -35,6 +52,7 @@ import Button from "@screen/components/Buttons/Button.vue";
import Video from "@screen/components/Video";
import Descriptions from "@screen/components/Descriptions.vue";
import CameraControlDialog from "./components/CameraControlDialog.vue";
import LineChart from "../../LineChart/index.vue";
import {
getRoadInfoByStakeMark,
@ -53,6 +71,7 @@ export default {
Descriptions,
Video,
CameraControlDialog,
LineChart,
},
data() {
return {
@ -180,7 +199,7 @@ export default {
align-items: center;
justify-content: end;
>div {
> div {
font-size: 16px;
padding: 6px 12px;
}

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

@ -8,7 +8,13 @@
<Descriptions :list="list" :data="data" style="gap: 18px" />
</ElTabPane>
<ElTabPane label="设备参数" name="second">设备参数</ElTabPane>
<ElTabPane label="在线率统计" name="third">在线率统计</ElTabPane>
<ElTabPane label="在线率统计" name="third">
<LineChart
v-if="activeName === 'third'"
:productId="dialogData.productId"
style="height: 180px"
/>
</ElTabPane>
</ElTabs>
<div class="bottom">
@ -17,7 +23,10 @@
</div>
<!-- <DeviceControlDialog v-model="deviceControlVisible" :deviceId="dialogData.iotDeviceId || '8697-1'" /> -->
<DeviceControlDialog v-model="deviceControlVisible" :deviceId="dialogData.iotDeviceId" />
<DeviceControlDialog
v-model="deviceControlVisible"
:deviceId="dialogData.iotDeviceId"
/>
</Dialog>
</template>
@ -32,11 +41,12 @@ import {
} from "@screen/pages/Home/components/RoadAndEvents/utils/httpList.js";
import Video from "@screen/components/Video";
import request from "@/utils/request";
import { delay } from "@screen/utils/common.js"
import { handle3CResult } from "@screen/utils/deviceControl.js"
import { delay } from "@screen/utils/common.js";
import { handle3CResult } from "@screen/utils/deviceControl.js";
import { controlModelMap, gzztMap } from "@screen/utils/enum.js";
import { find } from "lodash";
import { dialogDelayVisible } from "./../mixin";
import LineChart from "../../LineChart/index.vue";
//
export default {
@ -53,6 +63,7 @@ export default {
Descriptions,
DeviceControlDialog,
Video,
LineChart,
},
data() {
return {
@ -116,7 +127,7 @@ export default {
.then((data) => {
this.dialogData.brand = data.brand;
})
.catch((err) => { });
.catch((err) => {});
// this.requestURL(52)
// .then((result) => {
@ -129,17 +140,19 @@ export default {
// this.data.inWorkStatus = result.inWorkStatus;
// })
// .catch((err) => { });
this.requestURL()
.then(async (data) => {
await delay(0);
const formData = {};
formData.controlType = data.mode;
await handle3CResult(data, formData, this.requestURL);
formData.controlType && (this.$set(this.data, "workMode", controlModelMap[formData.controlType]))//(this.data.workMode = controlModelMap[formData.controlType]);
formData.inWorkStatus && (this.$set(this.data, "inWorkStatus", gzztMap[formData.inWorkStatus]))//(this.data.inWorkStatus = gzztMap[formData.inWorkStatus]);
formData.onWorkStatus && (this.$set(this.data, "onWorkStatus", gzztMap[formData.onWorkStatus]))//(this.data.onWorkStatus = gzztMap[formData.onWorkStatus]);
});
this.requestURL().then(async (data) => {
await delay(0);
const formData = {};
formData.controlType = data.mode;
await handle3CResult(data, formData, this.requestURL);
formData.controlType &&
this.$set(this.data, "workMode", controlModelMap[formData.controlType]); //(this.data.workMode = controlModelMap[formData.controlType]);
formData.inWorkStatus &&
this.$set(this.data, "inWorkStatus", gzztMap[formData.inWorkStatus]); //(this.data.inWorkStatus = gzztMap[formData.inWorkStatus]);
formData.onWorkStatus &&
this.$set(this.data, "onWorkStatus", gzztMap[formData.onWorkStatus]); //(this.data.onWorkStatus = gzztMap[formData.onWorkStatus]);
});
const roadInfo = await getRoadInfoByStakeMark(this.dialogData.stakeMark);
console.log(
@ -206,7 +219,7 @@ export default {
align-items: center;
justify-content: end;
>div {
> div {
font-size: 16px;
padding: 6px 12px;
}

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

@ -12,7 +12,13 @@
/>
</ElTabPane>
<ElTabPane label="设备参数" name="second">设备参数</ElTabPane>
<ElTabPane label="在线率统计" name="third">在线率统计</ElTabPane>
<ElTabPane label="在线率统计" name="third">
<LineChart
v-if="activeName === 'third'"
:productId="dialogData.productId"
style="height: 180px"
/>
</ElTabPane>
</ElTabs>
</div>
@ -37,6 +43,7 @@ import DeviceControlDialog from "./components/DeviceControlDialog.vue";
import request from "@/utils/request";
import { dialogDelayVisible } from "./../mixin";
import LineChart from "../../LineChart/index.vue";
//
export default {
@ -48,6 +55,7 @@ export default {
Video,
DeviceControlDialog,
Button,
LineChart,
},
data() {
return {
@ -115,7 +123,7 @@ export default {
display: flex;
flex-direction: column;
gap: 12px;
padding-bottom: 24px;
// padding-bottom: 24px;
.camera-video {
flex: 1.5;

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

@ -16,7 +16,10 @@
</div>
</ElTabPane>
<ElTabPane label="在线率统计" name="third">
<LineChart v-if="activeName === 'third'" />
<LineChart
v-if="activeName === 'third'"
:productId="dialogData.productId"
/>
</ElTabPane>
</ElTabs>
</div>
@ -28,7 +31,7 @@ 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 LineChart from "../../LineChart/index.vue";
import LineChartForTraffic from "./components/LineChartForTraffic/index.vue";
import Switcher from "@screen/pages/service/PublishingChannelManagement/components/Switcher.vue";

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

@ -2,7 +2,6 @@
<Dialog v-model="modelVisible" title="设备操作">
<div class='DeviceControlDialog'>
<DeviceParams :dialogData="dialogData" />
</div>
</Dialog>
</template>

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

@ -6,7 +6,7 @@
<span>{{ data.text }}</span>
<Switcher v-if="!disabled" class="switcher" :activeOption="activeOption" :value="data.state"
@change="(value) => handleSwitcherChange(value, data)" />
<ElTag style="margin-left: 20px;" v-else :effect="data.state?'dark':''" :type="data.state?'':'info'">{{ data.state?'开':'关' }}</ElTag>
<ElTag style="margin-left: 20px;" v-else effect="dark" :type="data.state?'':'info'">{{ data.state?'开':'关' }}</ElTag>
</template>
</Descriptions>
</div>
@ -51,34 +51,16 @@ export default {
// https://www.yuque.com/dayuanzhong-ovjwn/gkht0m/ww776d5kzs72ilzh?singleDoc=
//
request({
url: `/business/device/properties/latest/${this.dialogData.iotDeviceId || '10.0.36.143-1883'}`,
url: `/business/device/properties/latest/${this.dialogData.iotDeviceId || '10.0.36.143-1883'}/1`,
method: "get",
params: {}
}).then(result => {
if (result.code != 200) return;
const [deviceInfo] = result.data;
const deviceInfo = result.data;
const typeMap = {
ac: '220v',
dc: '12v',
}
// {
// ac_out_electricity_1 :"0.07A"
// ac_out_electricity_2 :"4.69A"
// ac_out_voltage_1 :"217.26V"
// ac_out_voltage_2 :"217.30V"
// dc_out_electricity_1 :"0.00A"
// dc_out_electricity_2 :"0.00A"
// dc_out_voltage_1 :"11.44V"
// dc_out_voltage_2 :"11.45V"
// door_status :"1"
// fan_status :"0"
// humidity :"20.3"
// power_status :"1"
// temperature :"18.4"
// }
for (const key in deviceInfo.formatValue) {
// electricity
// voltage

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

@ -1,23 +0,0 @@
<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>

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

@ -5,24 +5,24 @@
<div class="SmartDevice">
<ElTabs v-model="activeName" class="tabs">
<ElTabPane label="基本信息" name="first">
<!-- {{ dialogData }} -->
<Descriptions :list="list" :data="data" style="gap: 18px" />
</ElTabPane>
<ElTabPane label="设备参数" name="second">
<DeviceParams disabled :dialogData="dialogData" />
</ElTabPane>
<ElTabPane label="在线率统计" name="third">
<LineChart v-if="activeName === 'third'" style="height: 222px" />
<LineChart
v-if="activeName === 'third'"
:productId="dialogData.productId"
style="height: 180px"
/>
</ElTabPane>
</ElTabs>
</div>
<template #footer>
<Button
v-if="data.deviceState == '1'"
@click.native="deviceControlVisible = true"
>
设备操作
</Button>
<Button v-else style="background-color: #bbb"> 设备离线 </Button>
<Button v-if="activeName != 'first' && data.deviceState == '1'" @click.native="deviceControlVisible = true"> 设备操作 </Button>
<Button v-else-if="activeName != 'first'" style="background-color: #bbb;"> 设备离线 </Button>
</template>
<DeviceControlDialog
@ -37,15 +37,18 @@ 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 LineChart from "../../LineChart/index.vue";
import DeviceParams from "./components/DeviceParams.vue";
import DeviceControlDialog from "./components/DeviceControlDialog.vue";
import request from "@/utils/request";
import {
getRoadInfoByStakeMark,
getProduct,
} from "@screen/pages/Home/components/RoadAndEvents/utils/httpList.js";
import { dialogDelayVisible } from "./../mixin";
import { resolve } from "@antv/x6/lib/registry/node-anchor/util";
// 广
export default {
@ -95,7 +98,13 @@ export default {
{
label: "设备状态",
key: "deviceState",
enum: "DeviceTypeEnum",
// enum: "DeviceTypeEnum",
visible: false
},
{
label: "设备状态",
key: "deviceStateLiteral",
// enum: "DeviceTypeEnum",
},
{
label: "设备厂商",
@ -107,14 +116,15 @@ export default {
async created() {
// if (!this.dialogData.iotDeviceId) this.dialogData.iotDeviceId = '10.0.36.146-1883';
this.data = { ...this.dialogData, roadName: null };
let deviceInfo = await this.getDeviceInfo();
this.data = { ...this.dialogData, roadName: null, deviceStateLiteral : deviceInfo.data.formatValue.deviceState };
console.log(
"%c [ dialogData ]-103-「index.vue」",
"font-size:15px; background:#36347c; color:#7a78c0;",
this.dialogData,
"+++========"
);
// 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;
@ -124,6 +134,15 @@ export default {
if (roadInfo) this.data.roadName = roadInfo.roadName;
},
methods:{
async getDeviceInfo() {
return request({
url: `/business/device/properties/latest/${this.dialogData.iotDeviceId || '10.0.36.143-1883'}/3`,
method: "get",
params: {}
});
}
}
};
</script>

16
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/InfoBoard/index.vue

@ -91,9 +91,13 @@
<el-tab-pane label="设备参数" name="second"
>设备参数</el-tab-pane
>
<el-tab-pane label="在线率统计" name="third"
>在线率统计</el-tab-pane
>
<el-tab-pane label="在线率统计" name="third">
<LineChart
v-if="activeTab === 'third'"
:productId="selectedDevice.productId"
style="height: 160px"
/>
</el-tab-pane>
</el-tabs>
</div>
<div class="dialogContent_bottom_btn">
@ -235,6 +239,8 @@ import testDeviceInfo from "@screen/testData/infoBoard.js";
import CameraShower from "@screen/components/CameraShower";
import InfoBoard from "@screen/mixins/InfoBoard";
import LineChart from "../LineChart/index.vue";
export default {
name: "InfoBoard",
mixins: [InfoBoard],
@ -303,6 +309,7 @@ export default {
},
},
components: {
LineChart,
BoardPreview,
BoardTplPreview,
BoardInfoEditor,
@ -751,7 +758,8 @@ export default {
.dialogContent_bottom {
width: 105%;
height: 16.52vh;
margin-bottom: 2vh;
// height: 16.52vh;
}
.deviceInfo {

21
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SmartDevice/components/LineChart/chart.js → ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/LineChart/chart.js

@ -35,26 +35,9 @@ export const lineChartOption = {
},
tooltip: {
trigger: "axis",
backgroundColor: "rgba(0,0,0,0.36)",
borderWidth: 0,
textStyle: {
color: "#fff",
valueFormatter: (value) => {
return value + "%";
},
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,

53
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/LineChart/index.vue

@ -0,0 +1,53 @@
<template>
<div class="chart LineChart">
<div
v-if="datalength.length > 0"
class="chart LineChart"
ref="LineChartRef"
/>
<Empty v-else text="暂无数据..."></Empty>
</div>
</template>
<script>
import * as echarts from "echarts";
import { lineChartOption } from "./chart";
import { deviceStatusList } from "@/api/equipment/type/api.js";
import { months } from "moment/moment";
export default {
name: "LineChart",
props: {
productId: {
type: Number,
},
},
data() {
return {
datalength: {},
};
},
methods: {
// id线
getDeviceStatusList() {
return deviceStatusList(this.productId).then((res) => {
this.datalength = Object.keys(res.data);
lineChartOption.xAxis.data = Object.keys(res.data);
lineChartOption.series[0].data = Object.values(res.data);
});
},
},
async mounted() {
await this.getDeviceStatusList();
const chartIns = echarts.init(this.$refs.LineChartRef);
chartIns.setOption(lineChartOption);
},
};
</script>
<style lang="scss" scoped>
.LineChart {
flex: 1;
height: 100%;
}
</style>

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

@ -208,8 +208,9 @@ export const WarningSubclass = {
// "4-5": "车辆故障",
// "4-6": "交通事故",
"4-7": "应急车道被占用",
"4-8": "车离开应急车道",
// "4-8": "车离开应急车道",
"4-9": "其他",
"4-10": "未知车辆",
},
5: {
"5-1": "倒车/逆行",

13
ruoyi-ui/src/views/workbench/config/components/board.vue

@ -168,9 +168,13 @@
</el-col>
</el-row>
</el-tab-pane>
<el-tab-pane label="在线率统计" name="third"
>在线率统计</el-tab-pane
>
<el-tab-pane label="在线率统计" name="third">
<!-- <LineChart
v-if="activeName === 'third'"
:productId="dialogData.productId"
style="height: 160px"
/> -->
</el-tab-pane>
</el-tabs>
</el-form>
<div
@ -289,6 +293,8 @@ import {
import boardData from "@/views/information/board/boardData.json";
import editInfo from "@/views/information/board/editInfo";
import addinfo from "@/views/information/board//addinfo";
// import LineChart from "../../LineChart/index.vue";
import Sortable from "sortablejs";
import {
getBoardEditInfo,
@ -321,6 +327,7 @@ export const deepClone = (data) => {
export default {
// props: ["eqInfo", "brandList", "directionList", "eqTypeDialogList"],
components: {
// LineChart,
editInfo,
addinfo,
},

10
ruoyi-ui/src/views/workbench/config/components/video.vue

@ -156,7 +156,13 @@
</el-col>
</el-row>
</el-tab-pane>
<el-tab-pane label="在线率统计" name="third">在线率统计</el-tab-pane>
<el-tab-pane label="在线率统计" name="third">
<!-- <LineChart
v-if="activeName === 'third'"
:productId="dialogData.productId"
style="height: 160px"
/> -->
</el-tab-pane>
</el-tabs>
</el-form>
<div slot="footer" class="dialog-footer">
@ -406,6 +412,7 @@ import { getInfo } from "@/api/equipment/tunnel/api.js"; //查询设备当前状
import flvjs from "flv.js";
import videoPlayer from "@/views/event/vedioRecord/myVideo.vue";
import { PTZContro, getCamera } from "@/api/workbench/config.js"; //
// import LineChart from "../../LineChart/index.vue";
// import { getLocalIP } from "@/api/event/vedioRecord";
@ -413,6 +420,7 @@ export default {
// props: ["eqInfo", "brandList", "directionList", "eqTypeDialogList"],
components: {
videoPlayer,
// LineChart,
},
data() {
return {

4
ruoyi-ui/vue.config.js

@ -54,9 +54,9 @@ module.exports = {
// target: `http://10.168.78.135:8087`, //王钦
// target: `http://10.168.66.196:8087`, //正晨后台 连现场物联 刘文阁2
// target: `http://10.168.68.42:8087`, //王思祥
// target: `http://10.168.65.194:8087`, //赵祥龙
target: `http://10.168.65.194:8087`, //赵祥龙
// target: `http://10.168.65.156:8097`, //孟
target: `http://10.168.76.181:8087`, //王家宝
// target: `http://10.168.76.181:8087`, //王家宝
// target: `http://10.168.65.103:8097`,
changeOrigin: true,
pathRewrite: {

Loading…
Cancel
Save