Compare commits

...

4 Commits

  1. 18
      ruoyi-ui/codehelp_files.md
  2. 2
      ruoyi-ui/src/common/menuData.js
  3. 41
      ruoyi-ui/src/views/JiHeExpressway/components/CameraShower/index.vue
  4. 34
      ruoyi-ui/src/views/JiHeExpressway/components/Decorations/bg-2.vue
  5. 35
      ruoyi-ui/src/views/JiHeExpressway/components/HeaderMenu/WarningList.vue
  6. 0
      ruoyi-ui/src/views/JiHeExpressway/images/layer/路测设备/离网光伏供电.svg
  7. 0
      ruoyi-ui/src/views/JiHeExpressway/images/layer/路测设备/离网光伏供电_active.svg
  8. 0
      ruoyi-ui/src/views/JiHeExpressway/images/layer/路测设备/离网光伏供电_fault.svg
  9. 0
      ruoyi-ui/src/views/JiHeExpressway/images/layerb/路测设备/离网光伏供电_active.svg
  10. 0
      ruoyi-ui/src/views/JiHeExpressway/images/layerb/路测设备/离网光伏供电_fault.svg
  11. 185
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Broadcast/components/videoCamera.vue
  12. 6
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/ConfluenceArea/index.vue
  13. 6
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SolarEnergy/index.vue
  14. 433
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/HomeFrameControl/index.vue
  15. 8
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/buttonEvent.js
  16. 33
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/httpList.js
  17. 10
      ruoyi-ui/src/views/JiHeExpressway/pages/control/device/record/index.vue
  18. 34
      ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/smart/analysis/index.vue
  19. 4
      ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/smart/statisticalAnalysis/analysis/components/deviceSummary/index.vue
  20. 10
      ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/smart/statisticalAnalysis/query/data.js
  21. 39
      ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/solar/index.vue
  22. 35
      ruoyi-ui/src/views/JiHeExpressway/pages/service/board/index.vue
  23. 76
      ruoyi-ui/src/views/JiHeExpressway/pages/service/broadcast/index.vue
  24. 2
      ruoyi-ui/src/views/JiHeExpressway/utils/enum.js

18
ruoyi-ui/codehelp_files.md

@ -269,7 +269,7 @@
│ │ UPS.png │ │ UPS.png
│ │ view.png │ │ view.png
│ │ 一类交通量.png │ │ 一类交通量.png
│ │ 太阳能板.png │ │ 离网光伏供电.png
│ │ 扫码报警B.png │ │ 扫码报警B.png
│ │ 护栏碰撞预警系统.png │ │ 护栏碰撞预警系统.png
│ │ 护栏碰撞预警系统B.png │ │ 护栏碰撞预警系统B.png
@ -453,9 +453,9 @@
│ │ │ 合流区.svg │ │ │ 合流区.svg
│ │ │ 合流区_active.svg │ │ │ 合流区_active.svg
│ │ │ 合流区_fault.svg │ │ │ 合流区_fault.svg
│ │ │ 太阳能板.svg │ │ │ 离网光伏供电.svg
│ │ │ 太阳能板_active.svg │ │ │ 离网光伏供电_active.svg
│ │ │ 太阳能板_fault.svg │ │ │ 离网光伏供电_fault.svg
│ │ │ 情报板.svg │ │ │ 情报板.svg
│ │ │ 情报板_active.svg │ │ │ 情报板_active.svg
│ │ │ 情报板_fault.svg │ │ │ 情报板_fault.svg
@ -545,8 +545,8 @@
│ │ │ 交调_fault.svg │ │ │ 交调_fault.svg
│ │ │ 合流区_active.svg │ │ │ 合流区_active.svg
│ │ │ 合流区_fault.svg │ │ │ 合流区_fault.svg
│ │ │ 太阳能板_active.svg │ │ │ 离网光伏供电_active.svg
│ │ │ 太阳能板_fault.svg │ │ │ 离网光伏供电_fault.svg
│ │ │ 情报板_active.svg │ │ │ 情报板_active.svg
│ │ │ 情报板_fault.svg │ │ │ 情报板_fault.svg
│ │ │ 护栏碰撞_active.svg │ │ │ 护栏碰撞_active.svg
@ -639,7 +639,7 @@
│ │ 大学城收费站.jpg │ │ 大学城收费站.jpg
│ │ 孝里收费站.jpg │ │ 孝里收费站.jpg
│ │ │ │
│ ├─solar //太阳能板报表图 │ ├─solar //离网光伏供电报表图
│ │ CO2.png │ │ CO2.png
│ │ coal.png │ │ coal.png
│ │ error.png │ │ error.png
@ -1289,7 +1289,7 @@
│ │ │ │ DeviceParams.vue │ │ │ │ DeviceParams.vue
│ │ │ │ DeviceParamsMulti.vue │ │ │ │ DeviceParamsMulti.vue
│ │ │ │ │ │ │ │
│ │ │ ├─SolarEnergy // 太阳能板 │ │ │ ├─SolarEnergy // 离网光伏供电
│ │ │ │ │ data.js │ │ │ │ │ data.js
│ │ │ │ │ index.vue │ │ │ │ │ index.vue
│ │ │ │ │ │ │ │ │ │
@ -1526,7 +1526,7 @@
│ │ │ t17.svg │ │ │ t17.svg
│ │ │ t18.svg │ │ │ t18.svg
│ │ │ │ │ │
│ │ └─solar // 太阳能板管理 │ │ └─solar // 离网光伏供电管理
│ │ index.vue │ │ index.vue
│ │ index_v1.vue │ │ index_v1.vue
│ │ │ │

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

@ -195,7 +195,7 @@ export default [
component: "maintenanceOperations/smart/abnormal/index.vue", component: "maintenanceOperations/smart/abnormal/index.vue",
}, },
{ {
title: "太阳能板", title: "离网光伏供电",
name: "solar", name: "solar",
path: "/maintain/solar", path: "/maintain/solar",
component: "maintenanceOperations/solar/index.vue", component: "maintenanceOperations/solar/index.vue",

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

@ -2,19 +2,19 @@
<div v-if="visible" class="compBox"> <div v-if="visible" class="compBox">
<div class="head" style="height:4vh;"> <div class="head" style="height:4vh;">
<div class="tit">附近相机</div> <div class="tit">附近相机</div>
<img class="btnCls" src="@/assets/jihe/images/dialog/ibCls.png" alt="" @click="onClose"> <img alt="" class="btnCls" src="@/assets/jihe/images/dialog/ibCls.png" @click="onClose">
<img class="deco" src="@/assets/jihe/images/dialog/ibHeadDeco.png" alt=""> <img alt="" class="deco" src="@/assets/jihe/images/dialog/ibHeadDeco.png">
</div> </div>
<template v-if="list.length > 0"> <template v-if="list.length > 0">
<!-- <p>{{ list }}</p> --> <!-- <p>{{ list }}</p> -->
<div class="videoPlayer"> <div class="videoPlayer">
<!-- <videoView :url="slectedVideo" /> --> <!-- <videoView :url="slectedVideo" /> -->
<Video class="video-stream" :camId="selectedCamera.camId" /> <Video :camId="selectedCamera.camId" class="video-stream"/>
</div> </div>
<div class="operation"> <div class="operation">
<div class="selectCam"> <div class="selectCam">
<div class="label">选择相机: </div> <div class="label">选择相机:</div>
<div class="val"> <div class="val">
<el-select v-model="selectedCameraIndex" placeholder="请选择" size="mini" @change="onChangeCamera"> <el-select v-model="selectedCameraIndex" placeholder="请选择" size="mini" @change="onChangeCamera">
<el-option v-for="item, index in list" :key="index" :label="item.camName" :value="index"> <el-option v-for="item, index in list" :key="index" :label="item.camName" :value="index">
@ -22,10 +22,10 @@
</el-select> </el-select>
</div> </div>
</div> </div>
<el-button type="primary" icon="el-icon-s-operation" class="controlCam" v-if="selectedCamera.ptzCtrl == 0" <el-button v-if="selectedCamera.ptzCtrl == 0" class="controlCam" icon="el-icon-s-operation" type="primary"
@click="controlDialogVisible = !controlDialogVisible"></el-button> @click="controlDialogVisible = !controlDialogVisible"></el-button>
<CameraController :visible.sync="controlDialogVisible" v-if="controlDialogVisible" <CameraController v-if="controlDialogVisible" :deviceId="selectedCamera.camId"
:deviceId="selectedCamera.camId" class="cameraControl" /> :visible.sync="controlDialogVisible" class="cameraControl"/>
</div> </div>
<div class="flex1 txtInfo"> <div class="flex1 txtInfo">
@ -39,10 +39,7 @@
font-size: 15px; font-size: 15px;
font-family: PingFang SC, PingFang SC; font-family: PingFang SC, PingFang SC;
font-weight: 400; font-weight: 400;
line-height: 18px; line-height: 18px;">雨刷:</span>
">
雨刷:
</span>
<Button style="margin-left: 5px" @click.native="controlClick(49)"></Button> <Button style="margin-left: 5px" @click.native="controlClick(49)"></Button>
<Button style="margin-left: 5px" @click.native="controlClick(48)"></Button> <Button style="margin-left: 5px" @click.native="controlClick(48)"></Button>
</div> </div>
@ -65,7 +62,7 @@
</div> --> </div> -->
</template> </template>
<Empty v-else text="没有查询到附近的相机..." class="flex1"> <Empty v-else class="flex1" text="没有查询到附近的相机...">
</Empty> </Empty>
</div> </div>
</template> </template>
@ -74,9 +71,9 @@
import Video from "@screen/components/Video" import Video from "@screen/components/Video"
import CameraController from "./CameraController.vue"; import CameraController from "./CameraController.vue";
import { controlCamera, getDeviceInfo } from "@screen/pages/Home/components/RoadAndEvents/utils/httpList.js"; import {controlCamera, getDeviceInfo} from "@screen/pages/Home/components/RoadAndEvents/utils/httpList.js";
import { PanoramicCameraTypes, CameraChildTypes } from "@screen/utils/enum.js"; import {CameraChildTypes, PanoramicCameraTypes} from "@screen/utils/enum.js";
import { throttle } from "lodash"; import {throttle} from "lodash";
import Button from "@screen/components/Buttons/Button.vue"; import Button from "@screen/components/Buttons/Button.vue";
export default { export default {
@ -143,12 +140,12 @@ export default {
this.$set(this.selectedCamera, 'deviceState', deviceInfo.deviceState); this.$set(this.selectedCamera, 'deviceState', deviceInfo.deviceState);
let cmr = this.selectedCamera; let cmr = this.selectedCamera;
this.cameraInfo = [ this.cameraInfo = [
{ title: "道路名称", value: cmr.deptName }, {title: "道路名称", value: cmr.deptName},
{ title: "道路编号", value: cmr.road }, {title: "道路编号", value: cmr.road},
{ title: "设备名称", value: cmr.camName }, {title: "设备名称", value: cmr.camName},
{ title: "设备编号", value: cmr.camId }, {title: "设备编号", value: cmr.camId},
{ title: "设备桩号", value: cmr.pileNum }, {title: "设备桩号", value: cmr.pileNum},
{ title: "相机类型", value: childType ? CameraChildTypes[childType] : ["球机", "枪机"][+cmr.ptzCtrl] }, {title: "相机类型", value: childType ? CameraChildTypes[childType] : ["球机", "枪机"][+cmr.ptzCtrl]},
// {title:"", value:cmr.camStatus } // {title:"", value:cmr.camStatus }
]; ];
}, },

34
ruoyi-ui/src/views/JiHeExpressway/components/Decorations/bg-2.vue

@ -1,6 +1,6 @@
<template> <template>
<div class='BG-02' :style="{ '--width': width, '--lang-width': langWidth }"> <div class='BG-02' :style="{ '--width': width, '--lang-width': langWidth }">
<BackgroundClip ref="BackgroundClipRef" class="bg" :clipPath="getClipPath" <BackgroundClip ref="BackgroundClipRef" class="bg" :clipPath="getClipPath"
:borderPath="getBorderPath" :borderPath="getBorderPath"
bgColor="linear-gradient(180deg, #152E3CBB 0%, #163A45DD 100%)" bgColor="linear-gradient(180deg, #152E3CBB 0%, #163A45DD 100%)"
borderColor="linear-gradient(180deg, rgba(40, 144, 167, 1), rgba(40, 144, 167, 0.38), rgba(40, 144, 167, 1))"> borderColor="linear-gradient(180deg, rgba(40, 144, 167, 1), rgba(40, 144, 167, 0.38), rgba(40, 144, 167, 1))">
@ -43,14 +43,14 @@ export default {
computed: { computed: {
getClipPath() { getClipPath() {
return `polygon( return `polygon(
calc(100% - ${this.langWidth} - ${this.width} * 1.5) 0, calc(100% - ${this.langWidth} - ${this.width} * 1.5) 0,
calc(100% - ${this.langWidth}) calc(${this.width} * 1.5), calc(100% - ${this.langWidth}) calc(${this.width} * 1.5),
calc(100% - ${this.width}) calc(${this.width} * 1.5), calc(100% - ${this.width}) calc(${this.width} * 1.5),
100% calc(${this.width} * 2.5), 100% calc(${this.width} * 2.5),
100% calc(100% - ${this.width}), 100% calc(100% - ${this.width}),
calc(100% - ${this.width}) 100%, calc(100% - ${this.width}) 100%,
${this.width} 100%, 0 calc(100% - ${this.width}), ${this.width} 100%, 0 calc(100% - ${this.width}),
0 ${this.width}, 0 ${this.width},
${this.width} 0 ${this.width} 0
)` )`
}, },
@ -59,14 +59,14 @@ export default {
let deltaY = deltaX; let deltaY = deltaX;
return `polygon( return `polygon(
30% 0, 30% 0,
calc(100% - ${this.langWidth} - ${this.width} * 1.5) 0, calc(100% - ${this.langWidth} - ${this.width} * 1.5) 0,
calc(100% - ${this.langWidth}) calc(${this.width} * 1.5), calc(100% - ${this.langWidth}) calc(${this.width} * 1.5),
calc(100% - ${this.width}) calc(${this.width}), calc(100% - ${this.width}) calc(${this.width}),
100% calc(${this.width} * 2.5), 100% calc(${this.width} * 2.5),
100% calc(100% - ${this.width}), 100% calc(100% - ${this.width}),
calc(100% - ${this.width}) 100%, calc(100% - ${this.width}) 100%,
${this.width} 100%, 0 calc(100% - ${this.width}), ${this.width} 100%, 0 calc(100% - ${this.width}),
0 ${this.width}, 0 ${this.width},
${this.width} 0, ${this.width} 0,
31% 0, 31% 0,

35
ruoyi-ui/src/views/JiHeExpressway/components/HeaderMenu/WarningList.vue

@ -12,13 +12,13 @@
<ElTableColumn prop="remark" width="550"> <ElTableColumn prop="remark" width="550">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tooltip class="item" effect="dark" :content="scope.row.remark" placement="top-start"> <el-tooltip class="item" effect="dark" :content="scope.row.remark" placement="top-start">
<div class="markPanel"> <div class="markPanel">
<div class="leftColumn"> <div class="leftColumn">
<div class="device-icon" :style="{ backgroundImage: `url(${require(`@screen/images/event/${scope.row.icon? scope.row.icon : '交通拥堵'}.svg`)})` }" /> <div class="device-icon" :style="{ backgroundImage: `url(${require(`@screen/images/event/${scope.row.icon? scope.row.icon : '交通拥堵'}.svg`)})` }" />
<p>{{ activeTab == 'first' ? WarningType[scope.row.warningType] : scope.row.stringEventType }}</p> <p>{{ activeTab == 'first' ? WarningType[scope.row.warningType] : scope.row.stringEventType }}</p>
</div> </div>
<p class="rightRemark"> <p class="rightRemark">
{{ scope.row.remark }} {{ scope.row.remark }}
</p> </p>
</div> </div>
@ -77,7 +77,7 @@ export default {
pageSize: 10, pageSize: 10,
pageNum: 1, pageNum: 1,
}, },
dialogWarningVisible: false, dialogWarningVisible: false,
@ -93,11 +93,11 @@ export default {
if (checkPermi(["home:notice:event"])) { if (checkPermi(["home:notice:event"])) {
this.activeTab = "four"; this.activeTab = "four";
} else if(checkPermi(["home:notice:warningEvent"])){ } else if(checkPermi(["home:notice:warningEvent"])){
this.activeTab = "first"; this.activeTab = "first";
} else if(checkPermi(["home:notice:processingEvent"])){ } else if(checkPermi(["home:notice:processingEvent"])){
this.activeTab = "third"; this.activeTab = "third";
} else if(checkPermi(["home:notice:deviceOffline"])){ } else if(checkPermi(["home:notice:deviceOffline"])){
this.activeTab = "fifth"; this.activeTab = "fifth";
} }
// //
this.$root.$on('refresh-event', this.getMainData); this.$root.$on('refresh-event', this.getMainData);
@ -124,7 +124,7 @@ export default {
} }
if(this.activeTab === 'four'){ if(this.activeTab === 'four'){
if(row.warningType === '1'){ if(row.warningType === '1'){
this.dialogWarningVisible = true; this.dialogWarningVisible = true;
this.$refs.refDigWarn.bind(row.id,row.remark) this.$refs.refDigWarn.bind(row.id,row.remark)
} }
@ -133,7 +133,7 @@ export default {
// this.dialogWarningData = mokStakeWarning // this.dialogWarningData = mokStakeWarning
// }, 500); // }, 500);
// return; // return;
} else if (this.activeTab == 'first') { } else if (this.activeTab == 'first') {
this.activeName = '-1' this.activeName = '-1'
} else if(this.activeTab == 'third'){ } else if(this.activeTab == 'third'){
@ -191,7 +191,18 @@ export default {
if (result.code != 200) return; if (result.code != 200) return;
result.rows.forEach(item => { result.rows.forEach(item => {
item.remark = item.warningDescription item.remark = item.warningDescription
if (item.warningType === '1') {
item.stringEventType = '交通流预警';
} else if (item.warningType === '2') {
item.stringEventType = '气象预警';
} else if (item.warningType === '3') {
item.stringEventType = '交通流异常预警';
} else {
item.stringEventType = '未知预警类型'; // warningType
}
/*
item.stringEventType = item.warningType === '1'?'交通流预警':'气象预警'; item.stringEventType = item.warningType === '1'?'交通流预警':'气象预警';
*/
if(item.warningType === '2'){ if(item.warningType === '2'){
item.icon = '气象检测器' item.icon = '气象检测器'
} }
@ -210,7 +221,7 @@ export default {
item.icon = '设备' item.icon = '设备'
item.remark = item.createTime+ ' '+item.stakeMark +' ' +item.deviceName+'发生故障' item.remark = item.createTime+ ' '+item.stakeMark +' ' +item.deviceName+'发生故障'
item.stringEventType = _.find(deviceTypeOptions,{value:parseInt(item.deviceType)}).label item.stringEventType = _.find(deviceTypeOptions,{value:parseInt(item.deviceType)}).label
}) })
this.tableData = result.rows; this.tableData = result.rows;
this.total = result.total; this.total = result.total;
@ -300,7 +311,7 @@ export default {
} }
.rightRemark{ .rightRemark{
flex: 1; flex: 1;
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
@ -309,12 +320,12 @@ export default {
justify-content: center; justify-content: center;
align-items: center; align-items: center;
margin-right: 8px; margin-right: 8px;
border: 1px solid #FF5F5F; border: 1px solid #FF5F5F;
width: 120px; width: 120px;
height: 28px; height: 28px;
p { p {
color: #FF5F5F; color: #FF5F5F;
font-size: 15px; font-size: 13px;
margin-right: 3px; margin-right: 3px;
} }

0
ruoyi-ui/src/views/JiHeExpressway/images/layer/路测设备/太阳能板.svg → ruoyi-ui/src/views/JiHeExpressway/images/layer/路测设备/离网光伏供电.svg

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

0
ruoyi-ui/src/views/JiHeExpressway/images/layer/路测设备/太阳能板_active.svg → ruoyi-ui/src/views/JiHeExpressway/images/layer/路测设备/离网光伏供电_active.svg

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

0
ruoyi-ui/src/views/JiHeExpressway/images/layer/路测设备/太阳能板_fault.svg → ruoyi-ui/src/views/JiHeExpressway/images/layer/路测设备/离网光伏供电_fault.svg

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

0
ruoyi-ui/src/views/JiHeExpressway/images/layerb/路测设备/太阳能板_active.svg → ruoyi-ui/src/views/JiHeExpressway/images/layerb/路测设备/离网光伏供电_active.svg

Before

Width:  |  Height:  |  Size: 5.0 KiB

After

Width:  |  Height:  |  Size: 5.0 KiB

0
ruoyi-ui/src/views/JiHeExpressway/images/layerb/路测设备/太阳能板_fault.svg → ruoyi-ui/src/views/JiHeExpressway/images/layerb/路测设备/离网光伏供电_fault.svg

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 4.9 KiB

185
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Broadcast/components/videoCamera.vue

@ -0,0 +1,185 @@
<template>
<div class="body">
<div class="right" :style="{ width: isMultiControl ? '100%' : undefined }">
<div class="top-content">
<Video v-if="!isMultiControl" class="item-video" :pileNum="pileNum" />
<label style="width: 98px;">雨刷: </label>
<div style="margin-top: 20px">
<el-radio-group v-model="cmdType" size="medium">
<el-radio-button label="49" ></el-radio-button>
<el-radio-button label="48"></el-radio-button>
</el-radio-group>
</div>
<!-- <ElInput type="textarea" class="inputarea" v-model="releaseMessage" :autosize="{ minRows: 3, maxRows: 3 }" :maxlength="150"
showWordLimit placeholder="请输入发布内容" />-->
</div>
<!-- <div class="footer">
<Button @click.native="handleSubmit" :loading="submitting">
确定
</Button>
<Button style="background-color: rgba(0, 179, 204, 0.3)" @click.native="cancelClick">
取消
</Button>
</div> -->
</div>
</div>
</template>
<script>
import Dialog from "@screen/components/Dialog/index.vue";
import Button from "@screen/components/Buttons/Button.vue";
import Video from "@screen/components/Video";
import CheckboxGroup from "@screen/components/FormConfig/components/ElCheckboxGroup.vue";
import request from "@/utils/request";
import { batchFunctions } from "@screen/pages/Home/components/RoadAndEvents/utils/httpList.js";
import { multiResultShow } from "@screen/utils/common";
import { Message } from "element-ui";
export default {
name: "videoCamera",
components: {
Dialog,
Button,
Video,
CheckboxGroup,
},
model: {
prop: "visible",
event: "update:value",
},
props: {
visible: Boolean,
pileNum: String,
otherConfig: String,
isMultiControl: Boolean,
selectItems: {
type: Array,
default: () => []
}
},
data() {
return {
submitting: false,
checkList: [],
cmdType: null,
// musicList: [],
};
},
computed: {
modelVisible: {
get() {
return this.visible;
},
set(val) {
this.$emit("update:value", val);
},
},
},
created() {
// getDeviceList(5).then((data) => {
// if (Array.isArray(data))
// this.musicList = data.map((item) => ({
// ...item,
// disabled: item.deviceState != 1,
// }));
// });
},
methods: {
cancelClick() {
this.$emit("update:activeIcon", null);
this.$emit("update:submitting", false);
// this.submitting = false;
},
handleSubmit() {
const trimmedCmdType = this.cmdType?.trim();
const selectItems = this.selectItems.map(item => JSON.parse(item));
const checkList = selectItems.map(item => JSON.parse(item.otherConfig));
if (!trimmedCmdType) {
return Message.error("请选择命令类型!");
}
if (!selectItems.length)
return Message.error("请至少选择一个设备!");
// this.submitting = true;
this.$emit("update:submitting", true);
batchFunctions(
{
"devices": selectItems,
"functions": [
{
"functionId": "videoCamera",//便
"cmdType":trimmedCmdType,
}
]
})
.then((data) => {
multiResultShow(data.data, item => item.result.retCode == '0', "相机功能调用");
})
.finally(() => {
// this.submitting = false;
this.$emit("update:submitting", false);
});
},
},
};
</script>
<style lang="scss" scoped>
.body {
display: flex;
gap: 9px;
height: 100%;
padding-right: 9px;
margin-top: 15px;
.right {
display: flex;
flex-direction: column;
justify-content: space-between;
.top-content {
display: flex;
flex-direction: row;
// gap: 9px;
align-items: center;
.item-video {
width: 545px;
}
label {
font-size: 15px;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #3de8ff;
line-height: 19px;
vertical-align: middle;
text-align: right;
padding-right: 12px;
box-sizing: border-box;
}
}
}
}
.inputarea{
width: 100%;
::v-deep textarea{
border: 0px !important;
border-radius: 2px !important;
}
}
.footer {
display: flex;
align-items: center;
justify-content: flex-end;
gap: 9px;
}
</style>

6
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/ConfluenceArea/index.vue

@ -42,13 +42,13 @@ import {
import { dialogDelayVisible } from "./../mixin"; import { dialogDelayVisible } from "./../mixin";
import { resolve } from "@antv/x6/lib/registry/node-anchor/util"; import { resolve } from "@antv/x6/lib/registry/node-anchor/util";
// //
export default { export default {
name: "ConfluenceArea", name: "ConfluenceArea",
mixins: [dialogDelayVisible], mixins: [dialogDelayVisible],
components: { components: {
Dialog, Dialog,
Descriptions, Descriptions,
LineChart, LineChart,
Video, Video,
@ -126,7 +126,7 @@ export default {
methods: { methods: {
rebind(){ rebind(){
this.$refs.refParam.bind() this.$refs.refParam.bind()
}, },
async getDeviceInfo() { async getDeviceInfo() {
return request({ return 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"

6
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SolarEnergy/index.vue

@ -1,6 +1,6 @@
<template> <template>
<Dialog v-model="obverseVisible" title="太阳能板" width="550px"> <Dialog v-model="obverseVisible" title="离网光伏供电" width="550px">
<Video class="video-stream" :camId="camId" img="太阳能板" /> <Video class="video-stream" :camId="camId" img="离网光伏供电" />
<div class="SolarEnergy"> <div class="SolarEnergy">
<ElTabs v-model="activeName" class="tabs"> <ElTabs v-model="activeName" class="tabs">
@ -47,7 +47,7 @@ import {
import { dialogDelayVisible } from "./../mixin"; import { dialogDelayVisible } from "./../mixin";
import { resolve } from "@antv/x6/lib/registry/node-anchor/util"; import { resolve } from "@antv/x6/lib/registry/node-anchor/util";
// //
export default { export default {
name: "SolarEnergy", name: "SolarEnergy",
mixins: [dialogDelayVisible], mixins: [dialogDelayVisible],

433
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/HomeFrameControl/index.vue

@ -1,12 +1,12 @@
<template> <template>
<div class="HomeFrameControl"> <div class="HomeFrameControl">
<ElPopover trigger="manual" :value="activeIcon === 'FrameControl'" :visibleArrow="false" placement="left" <ElPopover :value="activeIcon === 'FrameControl'" :visibleArrow="false" placement="left" popper-class="global-input-search-popover"
popper-class="global-input-search-popover" @hide="onHide()"> trigger="manual" @hide="onHide()">
<el-tooltip slot="reference" effect="light" content="批量控制" placement="left"> <el-tooltip slot="reference" content="批量控制" effect="light" placement="left">
<Button :class="['btn', { 'btn-active': activeIcon }]" @click.native="handleClick('FrameControl')"> <Button :class="['btn', { 'btn-active': activeIcon }]" @click.native="handleClick('FrameControl')">
<img src="@screen/images/home-FrameControl/FrameControl.svg" /> <img src="@screen/images/home-FrameControl/FrameControl.svg"/>
</Button> </Button>
</el-tooltip> </el-tooltip>
@ -15,60 +15,60 @@
<el-tab-pane label="定时管控" name="2"></el-tab-pane> <el-tab-pane label="定时管控" name="2"></el-tab-pane>
<el-tab-pane label="管控记录" name="3"></el-tab-pane> <el-tab-pane label="管控记录" name="3"></el-tab-pane>
</el-tabs> </el-tabs>
<div class="body2" > <div class="body2">
<div class="title">批量控制</div> <div class="title">批量控制</div>
<span class="close" @click="() => { this.activeIcon = null; }"> <span class="close" @click="() => { this.activeIcon = null; }">
<i class="el-icon-close" /> <i class="el-icon-close"/>
</span> </span>
<!-- 批量管控 --> <!-- 批量管控 -->
<div v-if="tabAction === '1'" style="width:1000px; min-height: 350px;"> <div v-if="tabAction === '1'" style="width:1000px; min-height: 350px;">
<!-- 通用表单 --> <!-- 通用表单 -->
<Form v-model="data" labelWidth="90px" column="2" class="form" ref="FormConfigRef" :formList="formList" /> <Form ref="FormConfigRef" v-model="data" :formList="formList" class="form" column="2" labelWidth="90px"/>
<!-- 设备管控表单 --> <!-- 设备管控表单 -->
<component ref="ControlComponent" <component :is="componentMap[DeviceTopics[data.deviceType]]"
style="width: 100% !important;" ref="ControlComponent"
:is="componentMap[DeviceTopics[data.deviceType]]" :isMultiControl="true"
:isMultiControl="true" :selectItems="data.childType"
:visible="true" :selectedSizeMutl="data.screenSizeName"
:selectItems="data.childType" :visible="true"
:selectedSizeMutl="data.screenSizeName" style="width: 100% !important;"
@update:activeIcon="(val) => { this.activeIcon = val }" @update:activeIcon="(val) => { this.activeIcon = val }"
@update:submitting="(val) => { submitting = val }"></component> @update:submitting="(val) => { submitting = val }"></component>
<!-- 部分设备手动确认 --> <!-- 部分设备手动确认 -->
<div v-if="hiddenDevices.indexOf(componentMap[DeviceTopics[data.deviceType]]) == -1" class="footer"> <div v-if="hiddenDevices.indexOf(componentMap[DeviceTopics[data.deviceType]]) == -1" class="footer">
<Button @click.native="submitClick" :loading="submitting"> <Button :loading="submitting" @click.native="submitClick">
确认 确认
</Button> </Button>
<Button style="background-color: rgba(0, 179, 204, 0.3)" @click.native="cancelClick"> 取消 </Button> <Button style="background-color: rgba(0, 179, 204, 0.3)" @click.native="cancelClick"> 取消</Button>
</div> </div>
</div> </div>
<!-- 定时管控 --> <!-- 定时管控 -->
<div v-if="tabAction === '2'" style="width:1000px; height: 350px; overflow-y:auto" class="cardPanel"> <div v-if="tabAction === '2'" class="cardPanel" style="width:1000px; height: 350px; overflow-y:auto">
<Empty v-if="!data2.length" class="no-data" style="position: absolute">暂无数据</Empty> <Empty v-if="!data2.length" class="no-data" style="position: absolute">暂无数据</Empty>
<div v-else style="display: flex;width:100%;flex-direction: column;"> <div v-else style="display: flex;width:100%;flex-direction: column;">
<div style="height:300px;width:100%;overflow-y: auto;display: flex;flex-wrap: wrap;"> <div style="height:300px;width:100%;overflow-y: auto;display: flex;flex-wrap: wrap;">
<div class="cardBox" v-for="(item, index) in data2" :key="index"> <div v-for="(item, index) in data2" :key="index" class="cardBox">
<Card :buttonIcon="null" :keyMap="keyMap" :cardData="item" class="card" buttonText="详情"> <Card :buttonIcon="null" :cardData="item" :keyMap="keyMap" buttonText="详情" class="card">
<template #form-groupName="{ data }"> <template #form-groupName="{ data }">
<el-tooltip effect="dark" :content="data.groupName" placement="top-start"> <el-tooltip :content="data.groupName" effect="dark" placement="top-start">
<div class="groupName"> <div class="groupName">
{{ data.groupName }} {{ data.groupName }}
</div> </div>
</el-tooltip> </el-tooltip>
</template> </template>
<template #form-remark="{ data }"> <template #form-remark="{ data }">
<el-tooltip effect="dark" :content="data.remark" placement="top-start"> <el-tooltip :content="data.remark" effect="dark" placement="top-start">
<div class="remark"> <div class="remark">
{{ data.remark }} {{ data.remark }}
</div> </div>
</el-tooltip> </el-tooltip>
</template> </template>
<template #button> <template #button>
<el-switch v-model="item.status" active-color="#0BD" inactive-color="#999" active-value="0" <el-switch v-model="item.status" active-color="#0BD" active-value="0" inactive-color="#999"
inactive-value="1" @change="(value) => handleSwitcherChange(value, item)"> inactive-value="1" @change="(value) => handleSwitcherChange(value, item)">
</el-switch> </el-switch>
<Button @click.native="() => goStrategy(item)"> <Button @click.native="() => goStrategy(item)">
管理 管理
@ -79,24 +79,25 @@
</div> </div>
<!-- 分页 --> <!-- 分页 -->
<div class="footer2"> <div class="footer2">
<ElPagination @current-change="bindTimeing" @size-change="onSizeChange2" width="'100%'" <ElPagination :current-page.sync="searchData2.pageNum" :page-size="searchData2.pageSize" :page-sizes="[10, 20, 30, 40, 50]"
:page-sizes="[10, 20, 30, 40, 50]" :page-size="searchData2.pageSize" :total="tableTotal2" class="Pagination"
:current-page.sync="searchData2.pageNum" layout="total, sizes, prev, pager, next" :total="tableTotal2" layout="total, sizes, prev, pager, next" width="'100%'"
class="Pagination"> @current-change="bindTimeing"
@size-change="onSizeChange2">
</ElPagination> </ElPagination>
</div> </div>
</div> </div>
</div> </div>
<!-- 管控记录 --> <!-- 管控记录 -->
<div v-if="tabAction === '3'" <div v-if="tabAction === '3'"
style="width:1000px;height: 350px;display: flex;flex-direction: column; justify-content: center;align-items: flex-start;"> style="width:1000px;height: 350px;display: flex;flex-direction: column; justify-content: center;align-items: flex-start;">
<Form v-model="dataRecord" style="width:100%;" labelWidth="90px" column="2" class="form" ref="FormRecordRef" <Form ref="FormRecordRef" v-model="dataRecord" :formList="formRecord" class="form" column="2" labelWidth="90px"
:formList="formRecord" /> style="width:100%;"/>
<Table :data="tableData" height="500px" style="margin: 20px 20px 0px 20px;width:95%"> <Table :data="tableData" height="500px" style="margin: 20px 20px 0px 20px;width:95%">
<ElTableColumn label="管控时间" prop="operTime" width="120" /> <ElTableColumn label="管控时间" prop="operTime" width="120"/>
<ElTableColumn label="管控方式" prop="operType" width="80" /> <ElTableColumn label="管控方式" prop="operType" width="80"/>
<ElTableColumn label="操作人" prop="operName" width="80" /> <ElTableColumn label="操作人" prop="operName" width="80"/>
<ElTableColumn label="设备类型" width="120"> <ElTableColumn label="设备类型" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<div> <div>
<p v-for="item in scope.row.arydcDeviceType">{{ item }}</p> <p v-for="item in scope.row.arydcDeviceType">{{ item }}</p>
@ -110,19 +111,19 @@
</div> </div>
</template> </template>
</ElTableColumn> </ElTableColumn>
<ElTableColumn label="执行内容" width="250" prop="remark" :show-overflow-tooltip="true" > <ElTableColumn :show-overflow-tooltip="true" label="执行内容" prop="remark" width="250">
<template slot-scope="scope"> <template slot-scope="scope">
<div> <div>
<p v-for="item in scope.row.aryRemark">{{ item }}</p> <p v-for="item in scope.row.aryRemark">{{ item }}</p>
</div> </div>
</template> </template>
</ElTableColumn> </ElTableColumn>
<ElTableColumn label="结果" prop="status" width="80" align="center" header-align="center"> <ElTableColumn align="center" header-align="center" label="结果" prop="status" width="80">
<template slot-scope="scope"> <template slot-scope="scope">
<div> <div>
<p v-for="item in scope.row.aryState"> <p v-for="item in scope.row.aryState">
<i class="el-icon-success" style="font-size: 20px; color:#0c0;" v-if="item === 200"></i> <i v-if="item === 200" class="el-icon-success" style="font-size: 20px; color:#0c0;"></i>
<i class="el-icon-error" style="font-size: 20px; color:#BBB;" v-else></i> <i v-else class="el-icon-error" style="font-size: 20px; color:#BBB;"></i>
</p> </p>
</div> </div>
</template> </template>
@ -130,17 +131,18 @@
</Table> </Table>
<!-- 分页 --> <!-- 分页 -->
<div class="footer" style="width:100%"> <div class="footer" style="width:100%">
<ElPagination @current-change="bindRecord" @size-change="onSizeChange" width="'100%'" <ElPagination :current-page.sync="searchData.pageNum" :page-size="searchData.pageSize" :page-sizes="[10, 20, 30, 40, 50]"
:page-sizes="[10, 20, 30, 40, 50]" :page-size="searchData.pageSize" :total="tableTotal" class="Pagination"
:current-page.sync="searchData.pageNum" layout="total, sizes, prev, pager, next" :total="tableTotal" layout="total, sizes, prev, pager, next" width="'100%'"
class="Pagination"> @current-change="bindRecord"
@size-change="onSizeChange">
</ElPagination> </ElPagination>
</div> </div>
</div> </div>
</div> </div>
</ElPopover> </ElPopover>
<AddNEditDialog v-model="isShowDialog" :propData="dialogData" @onSuccess="onSizeChange2" /> <AddNEditDialog v-model="isShowDialog" :propData="dialogData" @onSuccess="onSizeChange2"/>
</div> </div>
</template> </template>
<script> <script>
@ -150,29 +152,27 @@ import Button from "@screen/components/Buttons/Button.vue";
import Form from "@screen/components/FormConfig"; import Form from "@screen/components/FormConfig";
import Card from "@screen/components/Card1/index.vue"; import Card from "@screen/components/Card1/index.vue";
import * as PresetFormItems from "@screen/common/PresetFormItems.js"; import * as PresetFormItems from "@screen/common/PresetFormItems.js";
import { merge, cloneDeep } from "lodash"; import _, {merge} from "lodash";
import { markerClusterIns } from "@screen/pages/Home/components/RoadAndEvents/utils/map.js" import {getDeviceList} from "@screen/pages/Home/components/RoadAndEvents/utils/httpList.js";
import { ChildTypes } from "@screen/utils/enum.js" import {delay} from "@screen/utils/common";
import { getDeviceList } from "@screen/pages/Home/components/RoadAndEvents/utils/httpList.js"; import {initSearch} from "@screen/utils/enum/common.js"
import { delay } from "@screen/utils/common";
import { initSearch } from "@screen/utils/enum/common.js"
import SmartDeviceParams from "@screen/pages/Home/components/Dialogs/SmartDevice/components/DeviceParamsMulti.vue"; import SmartDeviceParams from "@screen/pages/Home/components/Dialogs/SmartDevice/components/DeviceParamsMulti.vue";
import BroadcastParam from "@screen/pages/Home/components/Dialogs/Broadcast/components/BroadcastParamMulti.vue"; import BroadcastParam from "@screen/pages/Home/components/Dialogs/Broadcast/components/BroadcastParamMulti.vue";
import videoCamera from "@screen/pages/Home/components/Dialogs/Broadcast/components/videoCamera.vue";
import FatigueWakesUpParam from "@screen/pages/Home/components/Dialogs/FatigueWakesUp/components/DeviceParam.vue"; import FatigueWakesUpParam from "@screen/pages/Home/components/Dialogs/FatigueWakesUp/components/DeviceParam.vue";
import DrivingGuidanceParam from "@screen/pages/Home/components/Dialogs/DrivingGuidance/components/DeviceParam.vue"; import DrivingGuidanceParam from "@screen/pages/Home/components/Dialogs/DrivingGuidance/components/DeviceParam.vue";
import InfoBoardParam from "@screen/pages/Home/components/InfoBoard/InfoBoard.vue"; import InfoBoardParam from "@screen/pages/Home/components/InfoBoard/InfoBoard.vue";
import request from "@/utils/request"; import request from "@/utils/request";
import { DeviceForMap } from "@screen/pages/Home/components/RoadAndEvents/utils/buttonEvent"; import {DeviceForMap} from "@screen/pages/Home/components/RoadAndEvents/utils/buttonEvent";
import { Message } from "element-ui"; import {Message} from "element-ui";
import Table from '@screen/components/Table.vue'; import Table from '@screen/components/Table.vue';
import moment from "moment"; import moment from "moment";
import { getDicts } from "@/api/system/dict/data"; import {getDicts} from "@/api/system/dict/data";
import _ from "lodash";
// "": "SmartDeviceParams", 2024-07-03 // "": "SmartDeviceParams", 2024-07-03
const componentMap = { const componentMap = {
"语音广播": "BroadcastParam", "疲劳唤醒": "FatigueWakesUpParam", "语音广播": "BroadcastParam", "疲劳唤醒": "FatigueWakesUpParam",
"行车诱导": "DrivingGuidanceParam", "情报板": "InfoBoardParam", "行车诱导": "DrivingGuidanceParam", "情报板": "InfoBoardParam","摄像机":"videoCamera"
} }
const hiddenDevices = ["SmartDeviceParams", "InfoBoardParam"]; const hiddenDevices = ["SmartDeviceParams", "InfoBoardParam"];
@ -183,77 +183,101 @@ Object.keys(DeviceForMap).forEach(DeviceLabel => {
controlMulti.indexOf(DeviceLabel) !== -1 && (DeviceTopics[DeviceForMap[DeviceLabel].deviceType] = DeviceLabel); controlMulti.indexOf(DeviceLabel) !== -1 && (DeviceTopics[DeviceForMap[DeviceLabel].deviceType] = DeviceLabel);
}); });
const deviceTypeDefault = Object.keys(DeviceTopics)[1]; const deviceTypeDefault = Object.keys(DeviceTopics)[1];
function changeHandle(data, formList) { function changeHandle(data, formList) {
if (data.deviceType !== "2") { // const filterData = {};
const filterData = {}; data.direction && (filterData.direction = data.direction);
data.direction && (filterData.direction = data.direction); data.startStakeMark && (filterData.startStakeMark = data.startStakeMark);
data.startStakeMark && (filterData.startStakeMark = data.startStakeMark); data.endStakeMark && (filterData.endStakeMark = data.endStakeMark);
data.endStakeMark && (filterData.endStakeMark = data.endStakeMark);
setDeviceOptions({ deviceType: data.deviceType }, filterData, formList); if (data.deviceType !== "2" && data.deviceType !== "1") { //
setDeviceOptions({deviceType: data.deviceType}, filterData, formList);
data.childType = undefined; data.childType = undefined;
data.screenSizeName = ''; data.screenSizeName = '';
} else { } else if (data.deviceType === "2") {
setBoardSize(formList,data); setBoardSize(formList, data);
} else if (data.deviceType === "1") {
getCameraTypes(formList, data); // data
}
}
async function getCameraTypes(formList, data) {
const res = await getDicts("camera_classification");
let cameraTypeArr = res.data.map(item => ({
label: item.dictLabel,
value: item.dictValue
}));
//
const cameraTypeItem = formList.find(item => item.key === 'cameraType');
if (cameraTypeItem) {
cameraTypeItem.options.options = cameraTypeArr;
} }
} }
function changeHandleScreenSize( data,formList){ function changeHandleScreenSize(data, formList) {
const filterData = {}; const filterData = {};
data.direction && (filterData.direction = data.direction); data.direction && (filterData.direction = data.direction);
data.startStakeMark && (filterData.startStakeMark = data.startStakeMark); data.startStakeMark && (filterData.startStakeMark = data.startStakeMark);
data.endStakeMark && (filterData.endStakeMark = data.endStakeMark); data.endStakeMark && (filterData.endStakeMark = data.endStakeMark);
if(data.screenSize && data.screenSize !== ''){ if (data.screenSize && data.screenSize !== '') {
var arySize = data.screenSize.split('_') var arySize = data.screenSize.split('_')
filterData.childType = arySize[0]; filterData.childType = arySize[0];
data.screenSizeName = arySize[1]; data.screenSizeName = arySize[1];
} }
setDeviceOptions({ deviceType: data.deviceType }, filterData, formList); setDeviceOptions({deviceType: data.deviceType}, filterData, formList);
data.childType = undefined; data.childType = undefined;
} }
async function setBoardSize(formList,data){
async function setBoardSize(formList, data) {
// if(formList[4].options.options.length === 0){ // if(formList[4].options.options.length === 0){
const res = await getDicts("iot_board_pixel"); const res = await getDicts("iot_board_pixel");
let boardSizeArr = [] let boardSizeArr = []
res.data.forEach((item) => { res.data.forEach((item) => {
let size = item.dictLabel.substr(item.dictLabel.search(/\d/)) let size = item.dictLabel.substr(item.dictLabel.search(/\d/))
boardSizeArr.push({ boardSizeArr.push({
label: item.dictLabel, label: item.dictLabel,
value: item.dictValue+'_'+size value: item.dictValue + '_' + size
}); });
}); });
formList[4].options.options = boardSizeArr; formList[4].options.options = boardSizeArr;
data.screenSize = boardSizeArr[0].value; data.screenSize = boardSizeArr[0].value;
var arySize = boardSizeArr[0].value.split('_') var arySize = boardSizeArr[0].value.split('_')
setTimeout(() => { setTimeout(() => {
data.screenSizeName = arySize[1]; data.screenSizeName = arySize[1];
}, 600); }, 600);
const filterData = {childType:arySize[0]}; const filterData = {childType: arySize[0]};
data.direction && (filterData.direction = data.direction); data.direction && (filterData.direction = data.direction);
data.startStakeMark && (filterData.startStakeMark = data.startStakeMark); data.startStakeMark && (filterData.startStakeMark = data.startStakeMark);
data.endStakeMark && (filterData.endStakeMark = data.endStakeMark); data.endStakeMark && (filterData.endStakeMark = data.endStakeMark);
setDeviceOptions({ deviceType: data.deviceType }, filterData, formList); setDeviceOptions({deviceType: data.deviceType}, filterData, formList);
data.childType = undefined; data.childType = undefined;
// } // }
} }
async function setDeviceOptions(config, filterData, formList) { async function setDeviceOptions(config, filterData, formList) {
const data = await getDeviceList(config.deviceType, filterData).then(async (data) => { const data = await getDeviceList(config.deviceType, filterData).then(async (data) => {
await delay(600); await delay(600);
return data; return data;
}); });
formList[5].options.options = data.map(item => {
return { const options = [
label: `${item.deviceName}`, {label: '全选', value: 'selectAll'}
value: JSON.stringify( ];
{
id: item.id, options.push(...data.map(item => ({
iotDeviceId: item.iotDeviceId, label: `${item.deviceName}`,
deviceType: item.deviceType, value: JSON.stringify({
otherConfig: item.otherConfig id: item.id,
}), iotDeviceId: item.iotDeviceId,
disabled: item.deviceState != 1 deviceType: item.deviceType,
} otherConfig: item.otherConfig
}) }),
}; disabled: item.deviceState !== '1' // 使 '1'
export default { })));
formList.find(item => item.key === 'childType').options.options = options;
//
}export default {
name: "HomeFrameControl",// name: "HomeFrameControl",//
components: { components: {
Button, Button,
@ -262,6 +286,7 @@ export default {
Table, Table,
SmartDeviceParams, SmartDeviceParams,
BroadcastParam, BroadcastParam,
videoCamera,
FatigueWakesUpParam, FatigueWakesUpParam,
DrivingGuidanceParam, DrivingGuidanceParam,
InfoBoardParam, InfoBoardParam,
@ -271,18 +296,19 @@ export default {
dataRecord(e) { dataRecord(e) {
this.bindRecord() this.bindRecord()
}, },
}, },
data() { data() {
return { return {
Enum_ControlType: [ Enum_ControlType: [
{ key: "0", label: "手动控制" }, {key: "0", label: "手动控制"},
{ key: "1", label: "定时控制" }, {key: "1", label: "定时控制"},
{ key: "2", label: "批量控制" }, {key: "2", label: "批量控制"},
{ key: "3", label: "预案控制" } {key: "3", label: "预案控制"}
], ],
activeIcon: null, activeIcon: null,
data: { data: {
screenSizeName:"" screenSizeName: ""
}, },
hiddenDevices, hiddenDevices,
submitting: false, submitting: false,
@ -295,11 +321,13 @@ export default {
default: deviceTypeDefault, default: deviceTypeDefault,
options: { options: {
clearable: true, clearable: true,
options: Object.keys(DeviceTopics).map(key => { return { label: DeviceTopics[key], value: key } }), options: Object.keys(DeviceTopics).map(key => {
return {label: DeviceTopics[key], value: key}
}),
}, },
ons: { //on element ons: { //on element
change(value, ...args) { change(value, ...args) {
const { data, formList } = args.slice(-1)[0]; //data formList const {data, formList} = args.slice(-1)[0]; //data formList
if (data.deviceType) { if (data.deviceType) {
changeHandle(data, formList); changeHandle(data, formList);
} else { } else {
@ -314,14 +342,14 @@ export default {
type: "select", type: "select",
options: { options: {
options: [ options: [
{ key: "1", label: "菏泽方向" }, {key: "1", label: "菏泽方向"},
{ key: "3", label: "济南方向" }, {key: "3", label: "济南方向"},
{ key: "2", label: "双向" }, {key: "2", label: "双向"},
], ],
}, },
ons: { //on element ons: { //on element
change(value, ...args) { change(value, ...args) {
const { data, formList } = args.slice(-1)[0]; //data formList const {data, formList} = args.slice(-1)[0]; //data formList
if (data.deviceType) { if (data.deviceType) {
changeHandle(data, formList); changeHandle(data, formList);
} }
@ -356,7 +384,7 @@ export default {
], ],
ons: { //on element ons: { //on element
change(value, ...args) { change(value, ...args) {
const { data, formList } = args.slice(-1)[0]; //data formList const {data, formList} = args.slice(-1)[0]; //data formList
data.deviceType && changeHandle(data, formList); data.deviceType && changeHandle(data, formList);
} }
}, },
@ -372,7 +400,7 @@ export default {
key: "startStakeMark[1]", key: "startStakeMark[1]",
ons: { //on element ons: { //on element
change(value, ...args) { change(value, ...args) {
const { data, formList } = args.slice(-1)[0]; //data formList const {data, formList} = args.slice(-1)[0]; //data formList
data.deviceType && changeHandle(data, formList); data.deviceType && changeHandle(data, formList);
} }
}, },
@ -406,7 +434,7 @@ export default {
], ],
ons: { //on element ons: { //on element
change(value, ...args) { change(value, ...args) {
const { data, formList } = args.slice(-1)[0]; //data formList const {data, formList} = args.slice(-1)[0]; //data formList
data.deviceType && changeHandle(data, formList); data.deviceType && changeHandle(data, formList);
} }
}, },
@ -422,7 +450,7 @@ export default {
key: "endStakeMark[1]", key: "endStakeMark[1]",
ons: { //on element ons: { //on element
change(value, ...args) { change(value, ...args) {
const { data, formList } = args.slice(-1)[0]; //data formList const {data, formList} = args.slice(-1)[0]; //data formList
data.deviceType && changeHandle(data, formList); data.deviceType && changeHandle(data, formList);
} }
}, },
@ -440,16 +468,42 @@ export default {
clearable: true, clearable: true,
options: [], options: [],
["collapse-tags"]: true ["collapse-tags"]: true
},ons: { //on element }, ons: { //on element
change(value, ...args) { change(value, ...args) {
const { data, formList } = args.slice(-1)[0]; //data formList const {data, formList} = args.slice(-1)[0]; //data formList
changeHandleScreenSize( data, formList); changeHandleScreenSize(data, formList);
} }
}, },
visible: data => { visible: data => {
return data.deviceType === '2'; return data.deviceType === '2';
}, },
}, },
{
label: "摄像机类型类型:",
key: "cameraType",
type: "select",
isAlone: true,
width: '100%',
options: {
clearable: true,
options: [],
["collapse-tags"]: true
},
visible: data => {
return data.deviceType === '1';
},
ons: {
change(value, ...args) {
const {data, formList} = args.slice(-1)[0]; // data , formList
const filterData = {childType: value,facilitiesType:1};
data.direction && (filterData.direction = data.direction);
data.startStakeMark && (filterData.startStakeMark = data.startStakeMark);
data.endStakeMark && (filterData.endStakeMark = data.endStakeMark);
setDeviceOptions({deviceType: data.deviceType}, filterData, formList);
data.childType = undefined;
}
},
},
{ {
label: "设备名称:", label: "设备名称:",
key: "childType", key: "childType",
@ -465,7 +519,38 @@ export default {
visible: data => { visible: data => {
return true; return true;
}, },
}, ons: {
change(value, ...args) {
const { data, formList } = args.slice(-1)[0];
const options = formList.find(item => item.key === 'childType' ).options.options;
//
const availableOptions = options
.filter(option => !option.disabled && option.value !== 'selectAll') //
.map(option => option.value);
//
if (data.childType.includes('selectAll')) {
data.childType = data.childType.filter(val => val !== 'selectAll');
}
if (value.includes('selectAll')) {
if (data.childType.length === availableOptions.length){
data.childType =[]
}else {
//
data.childType = options
.filter(option => !option.disabled && option.value !== 'selectAll') //
.map(option => option.value); }
} else {
//
data.childType = value;
}
//
if (data.childType.includes('selectAll')) {
data.childType = data.childType.filter(val => val !== 'selectAll');
}
}
}
},
], ],
DeviceTopics, DeviceTopics,
componentMap, componentMap,
@ -482,7 +567,6 @@ export default {
], ],
data2: [], // data2: [], //
tableTotal2: 0, tableTotal2: 0,
searchData2: { searchData2: {
@ -502,10 +586,10 @@ export default {
type: "select", type: "select",
options: { options: {
options: [ options: [
{ key: "0", label: "手动控制" }, {key: "0", label: "手动控制"},
{ key: "1", label: "定时控制" }, {key: "1", label: "定时控制"},
{ key: "2", label: "批量控制" }, {key: "2", label: "批量控制"},
{ key: "3", label: "预案控制" } {key: "3", label: "预案控制"}
], ],
}, },
}, },
@ -539,9 +623,9 @@ export default {
mounted() { mounted() {
const self = this; const self = this;
setTimeout(() => { setTimeout(() => {
changeHandle(self.data, self.formList); changeHandle(self.data, self.formList);
}, 500); }, 500);
}, },
methods: { methods: {
onHide() { onHide() {
@ -569,13 +653,13 @@ export default {
this.data['deviceType'] = deviceTypeDefault; this.data['deviceType'] = deviceTypeDefault;
changeHandle(this.data, this.formList); changeHandle(this.data, this.formList);
this.tabAction = '1'; this.tabAction = '1';
// //
setTimeout(() => { setTimeout(() => {
let pop = document.getElementsByClassName('el-popover') let pop = document.getElementsByClassName('el-popover')
for(let i of pop){ for (let i of pop) {
if(i.getAttribute('aria-hidden') === 'false'){ if (i.getAttribute('aria-hidden') === 'false') {
i.style['z-index'] = '1000' i.style['z-index'] = '1000'
} }
} }
}, 100); }, 100);
@ -616,7 +700,7 @@ export default {
request({ request({
url: `/business/dcBatchFunctionsJobGroup/list`, url: `/business/dcBatchFunctionsJobGroup/list`,
method: "get", method: "get",
params: { ...this.searchData2 }, params: {...this.searchData2},
}) })
.then((result) => { .then((result) => {
if (result.code != 200) return; if (result.code != 200) return;
@ -657,8 +741,8 @@ export default {
const resJson = JSON.parse(e.jsonResult) const resJson = JSON.parse(e.jsonResult)
const resCodes = []; const resCodes = [];
const resCodesDeivce = []; const resCodesDeivce = [];
for(let i of resJson){ for (let i of resJson) {
if(resCodesDeivce.indexOf(i.device) === -1){ if (resCodesDeivce.indexOf(i.device) === -1) {
resCodesDeivce.push(i.device) resCodesDeivce.push(i.device)
resCodes.push(i.result.code) resCodes.push(i.result.code)
} }
@ -666,17 +750,17 @@ export default {
const resParam = JSON.parse(e.operParam)[0].devices const resParam = JSON.parse(e.operParam)[0].devices
const aryRemark = []; const aryRemark = [];
e.remark.split(',').filter(x=>{ e.remark.split(',').filter(x => {
x.split('、').filter(y=>{ x.split('、').filter(y => {
aryRemark.push(y) aryRemark.push(y)
}) })
}) })
e.operTime= moment(e.operTime).format('YYYY-MM-DD HH:mm:ss') e.operTime = moment(e.operTime).format('YYYY-MM-DD HH:mm:ss')
e.operType= _.find(this.Enum_ControlType, { key: e.operType }).label e.operType = _.find(this.Enum_ControlType, {key: e.operType}).label
e.arydcDeviceName = e.dcDeviceName.replace(/[\[\]]/g,'').split(','); e.arydcDeviceName = e.dcDeviceName.replace(/[\[\]]/g, '').split(',');
e.aryRemark = aryRemark; e.aryRemark = aryRemark;
e.aryState = resCodes e.aryState = resCodes
e.arydcDeviceType = resParam.map(x=>enum_deviceType[x.deviceType]) e.arydcDeviceType = resParam.map(x => enum_deviceType[x.deviceType])
}); });
this.tableData = result.rows; this.tableData = result.rows;
this.tableTotal = result.total; this.tableTotal = result.total;
@ -718,9 +802,9 @@ export default {
</script> </script>
<style lang='scss' scoped> <style lang='scss' scoped>
::v-deep .el-table .cell { ::v-deep .el-table .cell {
text-overflow: clip !important; text-overflow: clip !important;
-webkit-line-clamp: 100; -webkit-line-clamp: 100;
} }
</style> </style>
<style lang="scss"> <style lang="scss">
div.el-popper.global-input-search-popover { div.el-popper.global-input-search-popover {
@ -735,8 +819,8 @@ div.el-popper.global-input-search-popover {
.title { .title {
background: linear-gradient(90deg, background: linear-gradient(90deg,
#237e9b 0%, #237e9b 0%,
rgba(23, 145, 184, 0) 100%); rgba(23, 145, 184, 0) 100%);
padding: 3px 9px; padding: 3px 9px;
position: absolute; position: absolute;
top: 0; top: 0;
@ -788,7 +872,8 @@ div.el-popper.global-input-search-popover {
padding-right: 10px; padding-right: 10px;
padding-bottom: 10px; padding-bottom: 10px;
overflow-y: auto; overflow-y: auto;
.card{
.card {
width: 187px; width: 187px;
} }
} }
@ -799,12 +884,14 @@ div.el-popper.global-input-search-popover {
justify-content: center; justify-content: center;
align-items: center; align-items: center;
} }
.groupName{
.groupName {
width: 100px; width: 100px;
white-space: nowrap; /* 确保文本在一行内显示 */ white-space: nowrap; /* 确保文本在一行内显示 */
overflow: hidden; /* 超出容器部分的文本隐藏 */ overflow: hidden; /* 超出容器部分的文本隐藏 */
text-overflow: ellipsis; /* 使用省略符号表示超出的文本 */ text-overflow: ellipsis; /* 使用省略符号表示超出的文本 */
} }
.remark { .remark {
width: 100px; width: 100px;
font-size: 14px; font-size: 14px;
@ -828,20 +915,20 @@ div.el-popper.global-input-search-popover {
::v-deep { ::v-deep {
>button, > button,
>ul li { > ul li {
background: #064258; background: #064258;
border-radius: 2px 2px 2px 2px; border-radius: 2px 2px 2px 2px;
opacity: 1; opacity: 1;
color: #fff; color: #fff;
} }
>button { > button {
padding: 0 3px; padding: 0 3px;
border: 1px solid #00b3cc; border: 1px solid #00b3cc;
} }
>ul li { > ul li {
background: linear-gradient(180deg, #004960 0%, #004b62 100%); background: linear-gradient(180deg, #004960 0%, #004b62 100%);
margin: 0 1.5px; margin: 0 1.5px;
@ -904,4 +991,4 @@ div.el-popper.global-input-search-popover {
margin-left: 10px; margin-left: 10px;
} }
} }
</style> </style>

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

@ -73,7 +73,7 @@ export const DeviceForMap = {
type = 'b' type = 'b'
} else if(ctype && (ctype === '2-4'||ctype === '2-2')){ } else if(ctype && (ctype === '2-4'||ctype === '2-2')){
type = 'c' type = 'c'
} }
return boardIcon[`${type}${+!bool}`]; return boardIcon[`${type}${+!bool}`];
}, },
}, },
@ -113,7 +113,7 @@ export const DeviceForMap = {
deviceType: "10", deviceType: "10",
dialog: "FatigueWakesUp", dialog: "FatigueWakesUp",
}, },
太阳能板: { 离网光伏供电: {
deviceType: "15", deviceType: "15",
dialog: "SolarEnergy", dialog: "SolarEnergy",
}, },
@ -282,7 +282,7 @@ export const eventMap = {
); );
addDataPreHandle(removeData); addDataPreHandle(removeData);
markerClusterIns.addData(removeData, isDefault); markerClusterIns.addData(removeData, isDefault);
this.emitter.emit("selectedCompleted", item); this.emitter.emit("selectedCompleted", item);
cacheRemoveFunc[`地图事件专题/${item.title}`] = () => { cacheRemoveFunc[`地图事件专题/${item.title}`] = () => {
@ -468,4 +468,4 @@ function removeDataPreHandle(markers) {
}; };
lngLatMapHandle(markers, cb); lngLatMapHandle(markers, cb);
window.renderData?.(window.page); //移除后,重新渲染弹出框更新数据 window.renderData?.(window.page); //移除后,重新渲染弹出框更新数据
} }

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

@ -214,21 +214,21 @@ const DeviceTypeMap = {
14: "光线在线监测", 14: "光线在线监测",
*/ */
export function getDeviceList(deviceType, options) { export function getDeviceList(deviceType, options) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
if (!deviceType) { if (!deviceType) {
// Message.error(`${DeviceTypeMap[deviceType]}设备加载失败`); // Message.error(`${DeviceTypeMap[deviceType]}设备加载失败`);
return reject(); return reject();
} }
let newEndStakeMark = []; let newEndStakeMark = [];
let newStartStakeMark = []; let newStartStakeMark = [];
if(options && options.endStakeMark){ if(options && options.endStakeMark){
options.endStakeMark.forEach((item) => { options.endStakeMark.forEach((item) => {
newEndStakeMark.push(String(item)); newEndStakeMark.push(String(item));
}); });
} }
if(options && options.startStakeMark){ if(options && options.startStakeMark){
options.startStakeMark.forEach((item) => { options.startStakeMark.forEach((item) => {
newStartStakeMark.push(String(item)); newStartStakeMark.push(String(item));
}); });
} }
let data = { let data = {
@ -245,6 +245,9 @@ export function getDeviceList(deviceType, options) {
if (options && options.direction && options.direction !== "") { if (options && options.direction && options.direction !== "") {
data["direction"] = options.direction; data["direction"] = options.direction;
} }
if (options && options.facilitiesType && options.facilitiesType !== "") {
data["facilitiesType"] = options.facilitiesType;
}
request( request(
Object.keys(options || {}).length Object.keys(options || {}).length
? { ? {

10
ruoyi-ui/src/views/JiHeExpressway/pages/control/device/record/index.vue

@ -10,12 +10,12 @@
刷新 刷新
</ButtonGradient> </ButtonGradient>
</div> </div>
<InputSearch ref="searchComp" style="width: 400px" :formList="searchFormList" @handleSearch="handleSearch" /> <InputSearch ref="searchComp" style="width: 400px" :formList="searchFormList" @handleSearch="handleSearch" />
</div> </div>
<!-- 内容--> <!-- 内容-->
<div class="body"> <div class="body">
<Table :data="tableData" height="75vh" > <Table :data="tableData" height="75vh" >
<el-table-column label="序号" type="index" :index="indexMethod" width="100" align="center" <el-table-column label="序号" type="index" :index="indexMethod" width="100" align="center"
header-align="center" /> header-align="center" />
@ -53,7 +53,7 @@
<div> <div>
<p v-for="item in scope.row.aryState"> <p v-for="item in scope.row.aryState">
<i class="el-icon-success" style="font-size: 20px; color:#0c0;" v-if="item === 200"></i> <i class="el-icon-success" style="font-size: 20px; color:#0c0;" v-if="item === 200"></i>
<i class="el-icon-error" style="font-size: 20px; color:#BBB;" v-else></i> <i class="el-icon-error" style="font-size: 20px; color:#BBB;" v-else></i>
</p> </p>
</div> </div>
</template> </template>
@ -165,11 +165,11 @@ export default {
10: "疲劳唤醒", 10: "疲劳唤醒",
12: "行车诱导", 12: "行车诱导",
13: "设备箱", 13: "设备箱",
15: "太阳能板", 15: "离网光伏供电",
16: "远端机" 16: "远端机"
} }
if (result.code != 200) return; if (result.code != 200) return;
result.rows.forEach(e => { result.rows.forEach(e => {
console.log('e.jsonResult',e.jsonResult) console.log('e.jsonResult',e.jsonResult)
const resJson = JSON.parse(e.jsonResult) const resJson = JSON.parse(e.jsonResult)

34
ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/smart/analysis/index.vue

@ -11,7 +11,7 @@
placeholder="请选择设备类型" placeholder="请选择设备类型"
> >
<el-option <el-option
v-for="item in [{label:'智能设备箱',value:13},{label:'太阳能板',value:15},{label:'远端机',value:16},{label:'气象检测器',value:3},{label:'一体机柜',value:17}]" v-for="item in [{label:'智能设备箱',value:13},{label:'离网光伏供电',value:15},{label:'远端机',value:16},{label:'气象检测器',value:3},{label:'一体机柜',value:17}]"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value" :value="item.value"
@ -65,7 +65,7 @@
placeholder="请选择" placeholder="请选择"
:clearable="false" :clearable="false"
/> />
<Button style="margin-left: 25px" @click.native="bindData()">查询</Button> <Button style="margin-left: 25px" @click.native="bindData()">查询</Button>
</div> </div>
</div> </div>
@ -150,7 +150,7 @@ export default {
}, },
mounted() { mounted() {
this.date = moment().format('YYYY-MM-DD') this.date = moment().format('YYYY-MM-DD')
this.bindList(); this.bindList();
}, },
methods: { methods: {
bindData(){ bindData(){
@ -180,7 +180,7 @@ export default {
rows.push({ rows.push({
name:item.deviceName, name:item.deviceName,
timestamp: el.timestamp.substr(11) timestamp: el.timestamp.substr(11)
}) })
}); });
} }
@ -199,8 +199,8 @@ export default {
value.push(0) value.push(0)
} }
}) })
const chartOptions = _.cloneDeep(chart1); const chartOptions = _.cloneDeep(chart1);
chartOptions.title.text = e.name +' / ' + this.date + ' / ' + item.deviceName; chartOptions.title.text = e.name +' / ' + this.date + ' / ' + item.deviceName;
chartOptions.xAxis.data = xname; chartOptions.xAxis.data = xname;
@ -210,7 +210,7 @@ export default {
chartOptions.tooltip['valueFormatter'] = function (value) { chartOptions.tooltip['valueFormatter'] = function (value) {
return value + " "+unit; return value + " "+unit;
} }
this.aryChartList.push({ this.aryChartList.push({
...item, ...item,
pname: e.name, pname: e.name,
@ -257,7 +257,7 @@ export default {
const id = x.deviceId + x.pname const id = x.deviceId + x.pname
const myChart1 = echarts.init(document.getElementById(id)); const myChart1 = echarts.init(document.getElementById(id));
myChart1.setOption(x.options); myChart1.setOption(x.options);
}) })
}, 500); }, 500);
}, },
devClick(item,index){ devClick(item,index){
@ -296,12 +296,12 @@ export default {
if(this.init){ if(this.init){
this.init = false; this.init = false;
setTimeout(() => { setTimeout(() => {
this.devClick( this.list[0],0) this.devClick( this.list[0],0)
}, 400); }, 400);
} }
}) })
}, },
onResetSearch() { onResetSearch() {
@ -351,7 +351,7 @@ export default {
} }
.right { .right {
margin-left: 20px; margin-left: 20px;
flex: 1; flex: 1;
display: flex; display: flex;
@ -427,7 +427,7 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.Pagination { .Pagination {
::v-deep { ::v-deep {
>button, >button,
@ -509,18 +509,18 @@ export default {
.devparam{ .devparam{
width: 200px; width: 200px;
margin-left: 20px; margin-left: 20px;
} }
.selectDate { .selectDate {
width: 89px; width: 89px;
border: 1px solid #00b3cc; border: 1px solid #00b3cc;
::v-deep { ::v-deep {
.el-input__prefix{ .el-input__prefix{
top:-4px; top:-4px;
} }
.el-input__inner { .el-input__inner {
background-color: #064258 !important; background-color: #064258 !important;
border-width: 0px !important; border-width: 0px !important;
} }

4
ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/smart/statisticalAnalysis/analysis/components/deviceSummary/index.vue

@ -91,8 +91,8 @@
v-if="item.title.includes('疲劳唤醒')" v-if="item.title.includes('疲劳唤醒')"
/> />
<img <img
src="@screen/images/layer/路测设备/太阳能板.svg" src="@screen/images/layer/路测设备/离网光伏供电.svg"
v-if="item.title.includes('太阳能板')" v-if="item.title.includes('离网光伏供电')"
/> />
<img <img
src="@screen/images/layer/路测设备/远端机.svg" src="@screen/images/layer/路测设备/远端机.svg"

10
ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/smart/statisticalAnalysis/query/data.js

@ -93,7 +93,7 @@ export const deviceType = [
}, },
{ {
value: "15", value: "15",
label: "太阳能板", label: "离网光伏供电",
color: "#4e5417", color: "#4e5417",
}, },
{ {
@ -126,7 +126,7 @@ export const tabMap = {
}; };
export const searchFormList = [ export const searchFormList = [
{ {
label: "时间范围:", label: "时间范围:",
key: "time", key: "time",
@ -145,7 +145,7 @@ export const searchFormList = [
}, },
} }
}, },
}, },
// { // {
// label: "方向:", // label: "方向:",
// key: "direction", // key: "direction",
@ -164,7 +164,7 @@ export const searchFormList2 = [
{ {
label: "桩号:", label: "桩号:",
key: "stakeMark", key: "stakeMark",
}, },
{ {
label: "使用状态:", label: "使用状态:",
@ -288,4 +288,4 @@ export const testDeviceData = {
"lostRate": "32.56%" "lostRate": "32.56%"
} }
} }
} }

39
ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/solar/index.vue

@ -1,5 +1,6 @@
<template> <template>
<div class="solar"> <div class="solar">
<gisMap2d ref="gisMap2dsolar" style="width:100vw;height:100vh" <gisMap2d ref="gisMap2dsolar" style="width:100vw;height:100vh"
:mapZoom = "mapZoom" :mapZoom = "mapZoom"
:mapCenter="mapCenter" :mapCenter="mapCenter"
@ -8,6 +9,7 @@
radarSliderRight="14%" radarSliderRight="14%"
mapBoxHeight="100vh" @clickPointEvent="clickPointEvent" widgetBoxDisplay="none"></gisMap2d> mapBoxHeight="100vh" @clickPointEvent="clickPointEvent" widgetBoxDisplay="none"></gisMap2d>
<div class="solar_left"> <div class="solar_left">
<div> <div>
<Bg2 class="content-l-t"> <Bg2 class="content-l-t">
<div class="focuse-header"> <div class="focuse-header">
@ -65,6 +67,7 @@
</div> </div>
</Bg2> </Bg2>
</div> </div>
<div> <div>
<Bg2 class="content-l-t"> <Bg2 class="content-l-t">
<div class="focuse-header"> <div class="focuse-header">
@ -124,7 +127,7 @@
</template> </template>
<script> <script>
import homeLeftIcons from "./../../Home/components/homeLeftIcons/index.vue";
import Vue from "vue"; import Vue from "vue";
import { gisMap2d } from 'gis-map-universal' import { gisMap2d } from 'gis-map-universal'
import Bg2 from "@screen/components/Decorations/bg-2.vue" import Bg2 from "@screen/components/Decorations/bg-2.vue"
@ -135,6 +138,7 @@ import SolarEnergy from "./../../Home/components/Dialogs/SolarEnergy/index.vue";
const lnglat = [117.16515148266497,35.2797674572588] const lnglat = [117.16515148266497,35.2797674572588]
export default { export default {
components: { components: {
homeLeftIcons,
Bg2, Bg2,
gisMap2d, gisMap2d,
SolarEnergy, SolarEnergy,
@ -145,7 +149,7 @@ export default {
mapBoxHeight: '100vh', mapBoxHeight: '100vh',
mapZoom: '7.5', // '7.5' String mapZoom: '7.5', // '7.5' String
mapCenter: lnglat, //[118.75, 36.46] Array mapCenter: lnglat, //[118.75, 36.46] Array
dialogConfig:{ dialogConfig:{
component: void 0, component: void 0,
data: void 0, data: void 0,
@ -187,21 +191,21 @@ export default {
url: 'business/device/pileNumberQuery', url: 'business/device/pileNumberQuery',
method: 'post', method: 'post',
data: { data: {
deviceType: "15", deviceType: "15",
} }
}).then(result => { }).then(result => {
const aryPoints = []; const aryPoints = [];
const sa = require(`@screen/images/layerb/路测设备/太阳能板_active.svg`) const sa = require(`@screen/images/layerb/路测设备/离网光伏供电_active.svg`)
const sb = require(`@screen/images/layerb/路测设备/太阳能板_fault.svg`) const sb = require(`@screen/images/layerb/路测设备/离网光伏供电_fault.svg`)
for(let i of result.data){ for(let i of result.data){
aryPoints.push({ aryPoints.push({
type: 'event', // type: 'event', //
longitude: parseFloat(i.longitude), // longitude: parseFloat(i.longitude), //
latitude: parseFloat(i.latitude), // latitude: parseFloat(i.latitude), //
iconUrl: i.deviceState==='1'?sa:sb, // iconUrl: i.deviceState==='1'?sa:sb, //
offset: [0,-48], offset: [0,-48],
size: [42,100], size: [42,100],
GGoffsetX: 0, GGoffsetX: 0,
GGoffsetY: -5, GGoffsetY: -5,
GGimgOffset:[0,0], GGimgOffset:[0,0],
GGimgsize:[42,103], GGimgsize:[42,103],
@ -329,7 +333,7 @@ export default {
xAxis: { xAxis: {
type: 'category', type: 'category',
data: ['0点', '1点', '2点','3点', '4点','5点','6点','7点','8点', '9点','10点','11点', data: ['0点', '1点', '2点','3点', '4点','5点','6点','7点','8点', '9点','10点','11点',
'12点','13点','14点','15点','16点','17点','18点','19点','20点','21点','22点','23点'], '12点','13点','14点','15点','16点','17点','18点','19点','20点','21点','22点','23点'],
axisLine:{ axisLine:{
show:true, show:true,
lineStyle:{ lineStyle:{
@ -401,7 +405,7 @@ export default {
this.chart1.setOption(option1); this.chart1.setOption(option1);
this.chart1.resize(); this.chart1.resize();
}) })
this.chart2 = echarts.init(document.getElementById("charts2")); this.chart2 = echarts.init(document.getElementById("charts2"));
let option2 = JSON.parse(JSON.stringify(_chartsOptions)); let option2 = JSON.parse(JSON.stringify(_chartsOptions));
request({ request({
@ -441,7 +445,7 @@ export default {
this.chart3.setOption(option3); this.chart3.setOption(option3);
this.chart3.resize() this.chart3.resize()
}) })
} }
window.addEventListener("resize", () => { window.addEventListener("resize", () => {
if(this.chart1){ if(this.chart1){
@ -451,7 +455,7 @@ export default {
} }
}); });
} }
}, },
}; };
</script> </script>
@ -475,7 +479,16 @@ export default {
height: 100%; height: 100%;
gap: 10px; gap: 10px;
} }
.home-left-icons {
display: flex;
gap: 50px; /* 项之间的间距为10px*/
flex-direction: row;
z-index: 0;
margin-left: 20px;
.item {
padding-top: 35px;
}
}
.solar_right { .solar_right {
position: absolute; position: absolute;
right: 20px; right: 20px;

35
ruoyi-ui/src/views/JiHeExpressway/pages/service/board/index.vue

@ -63,6 +63,15 @@
<el-collapse-item v-for="(item, key) in boardSizeDic" :key="key" :title="item.label" :name="key"> <el-collapse-item v-for="(item, key) in boardSizeDic" :key="key" :title="item.label" :name="key">
<div v-if="item.list.length > 0"> <div v-if="item.list.length > 0">
<el-checkbox-group class="deviceList" v-model="checkedDeviceIds" @change="____onSelectDevices"> <el-checkbox-group class="deviceList" v-model="checkedDeviceIds" @change="____onSelectDevices">
<!-- 全选按钮 -->
<el-checkbox
:indeterminate="isIndeterminate"
v-model="checkAll"
@change="handleCheckAllChange"
>
全选
</el-checkbox>
<el-checkbox v-for="(itm, index) in item.list" :label="itm.iotDeviceId" :key="index" <el-checkbox v-for="(itm, index) in item.list" :label="itm.iotDeviceId" :key="index"
:disabled="!itm.iotDeviceId || itm.iotDeviceId.includes('null') || deviceStateLatest[itm.iotDeviceId]===false || (itm.deviceState == 0 || itm.deviceState == null)"> :disabled="!itm.iotDeviceId || itm.iotDeviceId.includes('null') || deviceStateLatest[itm.iotDeviceId]===false || (itm.deviceState == 0 || itm.deviceState == null)">
<el-tooltip content="设备未接入" placement="top" <el-tooltip content="设备未接入" placement="top"
@ -174,7 +183,7 @@
{{ item.dictLabel }} {{ item.dictLabel }}
<span :class="item.fold?'el-icon-arrow-down':'el-icon-arrow-up'"></span> <span :class="item.fold?'el-icon-arrow-down':'el-icon-arrow-up'"></span>
</div> </div>
<div v-if="item.fold" v-for="(itm, indx) in item.list" :key="indx" class="tplItem"> <div v-if="item.fold" v-for="(itm, indx) in item.list" :key="indx" class="tplItem">
<!-- 模板内容 --> <!-- 模板内容 -->
<BoardTplPreview class="boardPreview" :boardWH="selectedSize" :tpl="itm"></BoardTplPreview> <BoardTplPreview class="boardPreview" :boardWH="selectedSize" :tpl="itm"></BoardTplPreview>
@ -197,7 +206,7 @@
</el-tooltip> </el-tooltip>
</div> </div>
</div> </div>
</div> </div>
</draggable> </draggable>
</vuescroll> </vuescroll>
@ -331,6 +340,7 @@ export default {
this.editDialog.tpl = null; this.editDialog.tpl = null;
} }
}, },
// boardSizeDic: function (newVal, oldVal) { // boardSizeDic: function (newVal, oldVal) {
// console.log(newVal, 'selectedSize') // console.log(newVal, 'selectedSize')
// if (newVal.length == 0) { // if (newVal.length == 0) {
@ -398,6 +408,25 @@ export default {
}, },
}, },
methods: { methods: {
handleCheckAllChange(val) {
this.checkedDeviceIds = val ? this.getAllDeviceIds() : [];
this.isIndeterminate = false;
},
getAllDeviceIds() {
// 使 Object.values
return Object.values(this.boardSizeDic).reduce((acc, item) => {
acc.push(...item.list.filter(itm => itm.iotDeviceId && !itm.iotDeviceId.includes('null') && !(itm.deviceState === 0 || itm.deviceState === null)).map(itm => itm.iotDeviceId));
return acc;
}, []);
},
updateCheckAllStatus() {
const allDeviceIds = this.getAllDeviceIds();
const checkedCount = this.checkedDeviceIds.length;
this.checkAll = checkedCount === allDeviceIds.length;
this.isIndeterminate = checkedCount > 0 && checkedCount < allDeviceIds.length;
},
____boardTxtStyle() { ____boardTxtStyle() {
return { return {
color: "#F00", color: "#F00",
@ -1304,7 +1333,7 @@ export default {
// } // }
::v-deep .sortable-chosen:not(th) { ::v-deep .sortable-chosen:not(th) {
//background-color: rgba(5, 175, 227, 0.1) !important; //background-color: rgba(5, 175, 227, 0.1) !important;
} }

76
ruoyi-ui/src/views/JiHeExpressway/pages/service/broadcast/index.vue

@ -60,7 +60,16 @@
<div style="flex:1; height: 0; padding:0 10px 10px"> <div style="flex:1; height: 0; padding:0 10px 10px">
<vuescroll :ops="scrollOptions"> <vuescroll :ops="scrollOptions">
<template v-if="deviceList.length> 0"> <template v-if="deviceList.length> 0">
<el-checkbox-group class="deviceList" v-model="checkedDeviceIds" @change="____onSelectDevices"> <el-checkbox-group class="deviceList" v-model="checkedDeviceIds" @change="____onSelectDevices">
<!-- 全选按钮 -->
<el-checkbox
:indeterminate="isIndeterminate"
v-model="checkAll"
@change="handleCheckAllChange"
>
全选
</el-checkbox>
<el-checkbox v-for="(itm, index) in deviceList" :label="itm.iotDeviceId" :key="index" <el-checkbox v-for="(itm, index) in deviceList" :label="itm.iotDeviceId" :key="index"
:disabled="!itm.iotDeviceId || itm.iotDeviceId.includes('null') || itm.deviceState == 0 || itm.deviceState == null"> :disabled="!itm.iotDeviceId || itm.iotDeviceId.includes('null') || itm.deviceState == 0 || itm.deviceState == null">
<el-tooltip content="设备未接入" placement="top" <el-tooltip content="设备未接入" placement="top"
@ -261,6 +270,18 @@ export default {
this.editDialog.tpl = null; this.editDialog.tpl = null;
} }
}, },
checkedDeviceIds: {
handler(val) {
const allDeviceIds = this.deviceList
.filter(itm => !(!itm.iotDeviceId || itm.iotDeviceId.includes('null') || itm.deviceState == 0 || itm.deviceState == null))
.map(itm => itm.iotDeviceId);
const checkedCount = val.length;
this.checkAll = checkedCount === allDeviceIds.length;
this.isIndeterminate = checkedCount > 0 && checkedCount < allDeviceIds.length;
},
deep: true
},
// boardSizeDic: function (newVal, oldVal) { // boardSizeDic: function (newVal, oldVal) {
// console.log(newVal, 'selectedSize') // console.log(newVal, 'selectedSize')
// if (newVal.length == 0) { // if (newVal.length == 0) {
@ -290,6 +311,14 @@ export default {
...mapState(["menu"]), ...mapState(["menu"]),
}, },
methods: { methods: {
handleCheckAllChange(val) {
const allDeviceIds = this.deviceList
.filter(itm => !(!itm.iotDeviceId || itm.iotDeviceId.includes('null') || itm.deviceState == 0 || itm.deviceState == null))
.map(itm => itm.iotDeviceId);
this.checkedDeviceIds = val ? allDeviceIds : [];
this.isIndeterminate = false;
},
____boardTxtStyle() { ____boardTxtStyle() {
return { return {
color: "#F00", color: "#F00",
@ -372,7 +401,7 @@ export default {
// } // }
}); });
}); });
}, },
____forkDeviceInfo(deviceFrom) { ____forkDeviceInfo(deviceFrom) {
// //
@ -530,7 +559,7 @@ export default {
type: "warning", type: "warning",
}) })
.then(() => { .then(() => {
const param = { const param = {
"devices": deviceList, "devices": deviceList,
"functions": [ "functions": [
@ -614,7 +643,7 @@ export default {
// message: ""+cbMsg[res.retCode], // message: ""+cbMsg[res.retCode],
// }); // });
// } // }
// // !isMultiControl && this.____getDeviceInfo(); // // !isMultiControl && this.____getDeviceInfo();
// }) // })
// .catch((err) => {}) // .catch((err) => {})
@ -635,6 +664,7 @@ export default {
// //
____onSelectDevices(arr) { ____onSelectDevices(arr) {
this.updateCheckAllStatus();
this.selectedDevices = []; this.selectedDevices = [];
if (this.checkedDeviceIds.length == 0) { if (this.checkedDeviceIds.length == 0) {
@ -905,26 +935,26 @@ export default {
transition: all linear 0.3s; transition: all linear 0.3s;
opacity: 1; opacity: 1;
transform: translateX(0); transform: translateX(0);
&.hide { &.hide {
transform: translateX(20px); transform: translateX(20px);
opacity: 0; opacity: 0;
transition: all linear 0.3s; transition: all linear 0.3s;
} }
.tplItem { .tplItem {
margin-right: 14px; margin-right: 14px;
display: flex; display: flex;
align-items: stretch; align-items: stretch;
padding-bottom: 10px; padding-bottom: 10px;
.boardPreview { .boardPreview {
border: 2px solid #004c64; border: 2px solid #004c64;
// width: 560px; // width: 560px;
// height:80px; // height:80px;
flex: 1; flex: 1;
} }
.infoBtnBox { .infoBtnBox {
width: 160px; width: 160px;
height: 50px; height: 50px;
@ -936,26 +966,26 @@ export default {
display: flex; display: flex;
justify-content: space-around; justify-content: space-around;
align-items: center; align-items: center;
.btn { .btn {
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
width: 40px; width: 40px;
height: 40px; height: 40px;
&.btnApply { &.btnApply {
background-image: url(~@/assets/jihe/images/button/toLeft.svg); background-image: url(~@/assets/jihe/images/button/toLeft.svg);
} }
&.btnEdit { &.btnEdit {
background-image: url(~@/assets/jihe/images/button/edit.svg); background-image: url(~@/assets/jihe/images/button/edit.svg);
} }
&.btnDelete { &.btnDelete {
background-image: url(~@/assets/jihe/images/button/delete.svg); background-image: url(~@/assets/jihe/images/button/delete.svg);
} }
} }
i { i {
font-size: 24px; font-size: 24px;
color: #666; color: #666;
@ -964,11 +994,11 @@ export default {
caret-color: rgba(0, 0, 0, 0); caret-color: rgba(0, 0, 0, 0);
user-select: none; user-select: none;
} }
i:hover { i:hover {
color: #05afe3; color: #05afe3;
} }
.disabledClass { .disabledClass {
pointer-events: none; pointer-events: none;
cursor: auto !important; cursor: auto !important;
@ -976,31 +1006,31 @@ export default {
} }
} }
} }
.tplItem.ghost_class { .tplItem.ghost_class {
.boardPreview, .boardPreview,
.infoBtnBox { .infoBtnBox {
border-color: #F00; border-color: #F00;
} }
} }
.tplItem.chosen_class { .tplItem.chosen_class {
.boardPreview, .boardPreview,
.infoBtnBox { .infoBtnBox {
border-color: #0A0; border-color: #0A0;
} }
} }
.tplItem.drag_class { .tplItem.drag_class {
.boardPreview, .boardPreview,
.infoBtnBox { .infoBtnBox {
border-color: #FF0; border-color: #FF0;
} }
} }
.el-collapse { .el-collapse {
max-height: 100% !important; max-height: 100% !important;
overflow: auto; overflow: auto;
@ -1015,10 +1045,10 @@ export default {
.tpl_box { .tpl_box {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
.tpl_title { .tpl_title {
} }
.tpl_list { .tpl_list {
flex: 1; flex: 1;
height: 0; height: 0;

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

@ -993,7 +993,7 @@ export const deviceTypeOptions = [
}, },
{ {
value: 15, value: 15,
label: "太阳能板", label: "离网光伏供电",
}, },
{ {
value: 16, value: 16,

Loading…
Cancel
Save