Browse Source

修改济荷BUG

wangqin
王钦 9 months ago
parent
commit
aae11c5b8e
  1. 1
      ruoyi-ui/src/views/JiHeExpressway/components/Dialog/index.vue
  2. 2
      ruoyi-ui/src/views/JiHeExpressway/components/HeaderMenu/WarningList.vue
  3. 3
      ruoyi-ui/src/views/JiHeExpressway/components/VideoMulti/index.vue
  4. 3
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/ConditionStatistics/index.vue
  5. 46
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/RoadNetworkFacilities/data.js
  6. 27
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/RoadNetworkFacilities/index.vue
  7. 10
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/TrafficIncidents/index.vue
  8. 8
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/HomeFrame/index.vue
  9. 387
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/HomeFrameControl/index.vue
  10. 41
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/InfoBoard/InfoBoard.vue
  11. 18
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/map.js
  12. 47
      ruoyi-ui/src/views/JiHeExpressway/pages/control/device/strategy/components/AddNEditDialog.vue
  13. 60
      ruoyi-ui/src/views/JiHeExpressway/pages/control/device/strategy/components/TaskItem.vue
  14. 19
      ruoyi-ui/src/views/JiHeExpressway/pages/control/device/strategy/components/assets/editor.svg
  15. 50
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DeviceControl/components/ScopeTable.vue
  16. 281
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DeviceControl/index copy.vue
  17. 60
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DeviceControl/index.vue
  18. 0
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DispatchLiaison/StatsDialog/index.vue
  19. 7
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DispatchLiaison/index.vue
  20. 2
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DisposalProcess/index.vue
  21. 173
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/EventInformation/components/EditEventInformationDialog/index.vue
  22. 1
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/EventInformation/index.vue
  23. 4
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/RealTimeVideo/index.vue
  24. 16
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/ReleaseInformation/index.vue
  25. 58
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/TrafficControl/components/AddControlEventInfoDialog/index.vue
  26. 6
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/TrafficControl/index.vue
  27. 5
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/index.vue
  28. 1
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/EventDetailDialog/eventPlanDialog/index.vue
  29. 138
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/EventDetailDialog/index.vue
  30. 22
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/FormEvent/data.js
  31. 131
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/FormEvent/index.vue
  32. 7
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/index.vue
  33. 74
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/addAndEditDialog/ScopeTable.vue
  34. 472
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/addAndEditDialog/index copy.vue
  35. 102
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/addAndEditDialog/index.vue
  36. 4
      ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/smart/analysis/charts.js
  37. 6
      ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/smart/analysis/index.vue
  38. 3
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/statistics/index.vue
  39. 1228
      ruoyi-ui/src/views/JiHeExpressway/utils/enum_event/PresetFormItems.js
  40. 2411
      ruoyi-ui/src/views/JiHeExpressway/utils/enum_event/data.js

1
ruoyi-ui/src/views/JiHeExpressway/components/Dialog/index.vue

@ -105,6 +105,7 @@ export default {
},
methods: {
close() {
this.$emit('update:close')
this.modelVisible = false;
},
updateDialogVisible(bool) {

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

@ -121,7 +121,7 @@ export default {
.then((result) => {
if (result.code != 200) return;
result.rows.forEach(item => {
item.remark = (item.occurrenceTime || '') + " " + (item.stakeMark || '') + " " + (item.direction || '') + " 发生" + (item.stringEventType || '') + "( " + (item.eventSubclass || '') + ")事件"
item.remark = (item.occurrenceTime || '') + " " + (item.stakeMark || '') + " " + (item.direction || '') + " 发生" + (item.stringEventType || '') + "( " + (item.eventSubclassName || '') + ")事件"
// item.remark = item.stakeMark + " " + item.direction + " " + item.stringEventType + "( " + item.eventSubclass + ")"
})
this.tableData = result.rows;

3
ruoyi-ui/src/views/JiHeExpressway/components/VideoMulti/index.vue

@ -64,6 +64,9 @@ export default {
this.$once("hook:beforeDestroy", () => this.player?.destroy());
},
methods: {
closeContrl(){
this.controlDialogVisible =false
},
cameraChange() {
const changeItem = find(this.urls, { iotDeviceId: this.cameraId });
this.dialogData = { ...changeItem, parseOtherConfig: changeItem.otherConfig && JSON.parse(changeItem.otherConfig) };

3
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/ConditionStatistics/index.vue

@ -134,15 +134,12 @@ export default {
this.$nextTick(() => {
const myChart1 = echarts.init(this.$refs.carStatisticsEchartBox);
myChart1.setOption(carStatistics);
console.log("charts", carStatistics);
const myChart2 = echarts.init(this.$refs.focusStatisticsEchartBox);
myChart2.setOption(focusStatistics);
console.log("charts", focusStatistics);
const myChart3 = echarts.init(this.$refs.otherStatisticsEchartBox);
myChart3.setOption(otherStatistics);
console.log("charts", otherStatistics);
});
});
}

46
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/RoadNetworkFacilities/data.js

@ -356,7 +356,51 @@ export const tabList = {
],
},
],
7: [],
7: [
{
name: "基本信息",
key: "first",
labelWidth: "70px",
list: [
{
label:"名称",
key: "facilityName",
gridColumn: "3"
},
{
label: "方向",
key: "direction",
gridColumn: "3",
},
{
label: "所属",
key: "districtName",
gridColumn: "3",
},
{
label: "桩号",
key: "stakeMark",
gridColumn: "3",
},
{
label: "经度",
key: "longitude",
gridColumn: "3",
},
{
label: "纬度",
key: "latitude",
gridColumn: "3",
},
{
label: "介绍",
key: "introduction",
gridColumn: "6",
},
],
}
],
8: [
{
name: "基本信息",

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

@ -1,8 +1,12 @@
<template>
<Dialog v-model="obverseVisible" :title="dialogData._itemData && dialogData._itemData.title" width="500px" top="10%">
<Dialog
v-model="obverseVisible"
:title="dialogData._itemData && dialogData._itemData.title"
@update:close="camClose"
width="500px" top="10%">
<div class="RoadNetworkFacilities">
<div class="header">
<Video class="video-stream" :pileNum="dialogData.stakeMark" rangeIndex="upCamera" :showHeader="false" />
<Video ref="refVideo" class="video-stream" :pileNum="dialogData.stakeMark" rangeIndex="upCamera" :showHeader="false" />
</div>
<div class="SolarEnergy">
<ElTabs v-model="activeName" class="tabs">
@ -74,11 +78,20 @@ export default {
};
},
watch: {
obverseVisible:{
handler(val){
if(val === false){
this.$refs.refVideo.closeContrl()
}
}
},
daterangeChangeTime: {
handler(val) {
this.dateRange = [moment(val[0]).valueOf(), moment(val[1]).valueOf()];
this.bindListAsync();
if(this.dialogData.facilityType === 9){
this.dateRange = [moment(val[0]).valueOf(), moment(val[1]).valueOf()];
this.bindListAsync();
}
},
},
activeName:{
@ -120,6 +133,9 @@ export default {
console.log('this.data', this.data)
},
methods: {
camClose(){
this.$refs.refVideo.closeContrl()
},
bindUPS(id){
request({
url: `business/device/properties/latest/${id}`,
@ -142,6 +158,7 @@ export default {
})
},
async bindListAsync() {
console.log('3333333333333')
let res = await request({
url: `sideSlope/GetPointDataListAsync`,
method: "get",

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

@ -1,9 +1,9 @@
<template>
<Dialog v-model="obverseVisible" :title="dialogData._itemData && dialogData._itemData.title" width="650px">
<Dialog v-model="obverseVisible" :title="dialogData._itemData && dialogData._itemData.title" width="650px" @update:close="camClose">
<div class="TrafficIncidents">
<div class="header">
<Video class="video-stream" :pileNum="dialogData.stakeMark" rangeIndex="upCamera" :showHeader="false" />
<Video class="video-stream" :pileNum="dialogData.stakeMark" rangeIndex="downCamera" :showHeader="false" />
<Video ref="refVideo1" class="video-stream" :pileNum="dialogData.stakeMark" rangeIndex="upCamera" :showHeader="false" />
<Video ref="refVideo2" class="video-stream" :pileNum="dialogData.stakeMark" rangeIndex="downCamera" :showHeader="false" />
</div>
<Descriptions labelWidth="72px" :list="list" :data="data" style="gap: 18px" column="7" />
</div>
@ -137,6 +137,10 @@ export default {
.catch((err) => { });
},
methods: {
camClose(){
this.$refs.refVideo1.closeContrl()
this.$refs.refVideo2.closeContrl()
},
handleClickTabs() { },
goDispatch() {
request({

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

@ -16,7 +16,7 @@
<span class="close" @click="() => { this.activeIcon = null; }">
<i class="el-icon-close" />
</span>
<div style="width:800px; ">
<div style="width:1000px; ">
<!-- <Form labelWidth="90px" column="1" class="form" ref="FormConfigRef" :formList="formList" /> -->
<img class="image" src="@screen/images/home-Frame/logoMean.png" />
</div>
@ -67,7 +67,7 @@ div.el-popper.global-input-search-popover {
// margin-top: 6vh;
.body3 {
width: 800px;
width: 1000px;
.title {
background: linear-gradient(90deg,
#237e9b 0%,
@ -93,8 +93,8 @@ div.el-popper.global-input-search-popover {
</style>
<style lang="scss" scoped>
.image {
width: 800px;
height: 500px;
width: 1000px;
height: 700px;
}
.HomeFrame {

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

@ -2,17 +2,16 @@
<div class="HomeFrameControl">
<ElPopover trigger="manual" :value="activeIcon === 'FrameControl'" :visibleArrow="false" placement="left"
popper-class="global-input-search-popover" @hide="onHide()">
<el-tooltip slot="reference" effect="light" content="批量控制" placement="left">
<Button :class="['btn', { 'btn-active': activeIcon }]"
@click.native="handleClick('FrameControl')">
<img src="@screen/images/home-FrameControl/FrameControl.svg" />
</Button>
</el-tooltip>
<el-tooltip slot="reference" effect="light" content="批量控制" placement="left">
<Button :class="['btn', { 'btn-active': activeIcon }]" @click.native="handleClick('FrameControl')">
<img src="@screen/images/home-FrameControl/FrameControl.svg" />
</Button>
</el-tooltip>
<el-tabs v-model="tabAction" @tab-click="tabClick">
<el-tab-pane label="批量管控" name="1">{{ }}</el-tab-pane>
<el-tab-pane label="批量管控" name="1">{{ }}</el-tab-pane>
<el-tab-pane label="定时管控" name="2"></el-tab-pane>
<el-tab-pane label="管控记录" name="3"></el-tab-pane>
</el-tabs>
@ -23,11 +22,20 @@
</span>
<!-- 批量管控 -->
<div v-if="tabAction === '1'" style="width:800px; min-height: 350px;">
<!-- 通用表单 -->
<Form v-model="data" labelWidth="90px" column="2" class="form" ref="FormConfigRef" :formList="formList" />
<component ref="ControlComponent" :is="componentMap[DeviceTopics[data.deviceType]]" :isMultiControl="true"
:visible="true" :selectItems="data.childType" @update:activeIcon="(val) => { this.activeIcon = val }"
@update:submitting="(val) => { submitting = val }"></component>
<div v-if="hiddenDevices.indexOf(componentMap[DeviceTopics[data.deviceType]]) == -1" class="footer">
<!-- 设备管控表单 -->
<component ref="ControlComponent"
:is="componentMap[DeviceTopics[data.deviceType]]"
:isMultiControl="true"
:visible="true"
:selectItems="data.childType"
:selectedSizeMutl="data.screenSizeName"
@update:activeIcon="(val) => { this.activeIcon = val }"
@update:submitting="(val) => { submitting = val }"></component>
<!-- 部分设备手动确认 -->
<div v-if="hiddenDevices.indexOf(componentMap[DeviceTopics[data.deviceType]]) == -1" class="footer">
<Button @click.native="submitClick" :loading="submitting">
确认
</Button>
@ -37,50 +45,49 @@
<!-- 定时管控 -->
<div v-if="tabAction === '2'" style="width:800px; height: 350px; overflow-y:auto" class="cardPanel">
<Empty v-if="!data2.length" class="no-data" style="position: absolute">暂无数据</Empty>
<div v-else style="display: flex;flex-direction: column;">
<div style="height:300;width:100%;overflow-y: auto;display: flex;flex-wrap: wrap;">
<div class="cardBox" v-for="(item, index) in data2" :key="index">
<Card :buttonIcon="null" :keyMap="keyMap" :cardData="item" class="card" buttonText="详情">
<template #form-remark="{ data }">
<div class="remark">
{{ data.remark }}
</div>
</template>
<template #button>
<el-switch v-model="item.status" active-color="#0BD" inactive-color="#999" active-value="0"
inactive-value="1" @change="(value) => handleSwitcherChange(value, item) ">
</el-switch>
<Button @click.native="() => goStrategy(item)">
查看
</Button>
</template>
</Card>
<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 class="cardBox" v-for="(item, index) in data2" :key="index">
<Card :buttonIcon="null" :keyMap="keyMap" :cardData="item" class="card" buttonText="详情">
<template #form-remark="{ data }">
<div class="remark">
{{ data.remark }}
</div>
</template>
<template #button>
<el-switch v-model="item.status" active-color="#0BD" inactive-color="#999" active-value="0"
inactive-value="1" @change="(value) => handleSwitcherChange(value, item)">
</el-switch>
<Button @click.native="() => goStrategy(item)">
查看
</Button>
</template>
</Card>
</div>
</div>
</div>
<!-- 分页 -->
<div class="footer">
<ElPagination @current-change="bindTimeing" @size-change="onSizeChange2" width="'100%'" :page-sizes="[10, 20, 30, 40, 50]"
:page-size="searchData2.pageSize" :current-page.sync="searchData2.pageNum" layout="total, sizes, prev, pager, next"
:total="tableTotal2" class="Pagination">
<div class="footer2">
<ElPagination @current-change="bindTimeing" @size-change="onSizeChange2" width="'100%'"
:page-sizes="[10, 20, 30, 40, 50]" :page-size="searchData2.pageSize"
:current-page.sync="searchData2.pageNum" layout="total, sizes, prev, pager, next" :total="tableTotal2"
class="Pagination">
</ElPagination>
</div>
</div>
</div>
<!-- 管控记录 -->
<div v-if="tabAction === '3'" style="width:800px;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" :formList="formRecord" />
<div v-if="tabAction === '3'"
style="width:800px;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"
:formList="formRecord" />
<Table :data="tableData" height="500px" style="margin: 20px 20px 0px 20px;width:95%">
<ElTableColumn label="管控时间" prop="operTime" width="200"/>
<ElTableColumn label="设备名称" prop="dcDeviceName"/>
<ElTableColumn label="管控方式" prop="operType" width="100"/>
<ElTableColumn label="操作人" prop="operName" width="100"/>
<ElTableColumn label="执行结果" prop="remark" width="80" >
<ElTableColumn label="管控时间" prop="operTime" width="200" />
<ElTableColumn label="设备名称" prop="dcDeviceName" />
<ElTableColumn label="管控方式" prop="operType" width="100" />
<ElTableColumn label="操作人" prop="operName" width="100" />
<ElTableColumn label="执行结果" prop="remark" width="80">
<template slot-scope="scope">
<el-popover
placement="top-start"
width="120"
trigger="hover"
:content="scope.row.remark||'暂无结果'">
<el-popover placement="top-start" width="120" trigger="hover" :content="scope.row.remark || '暂无结果'">
<el-button slot="reference" class="btnResult">查看</el-button>
</el-popover>
</template>
@ -88,9 +95,10 @@
</Table>
<!-- 分页 -->
<div class="footer" style="width:100%">
<ElPagination @current-change="bindRecord" @size-change="onSizeChange" width="'100%'" :page-sizes="[10, 20, 30, 40, 50]"
:page-size="searchData.pageSize" :current-page.sync="searchData.pageNum" layout="total, sizes, prev, pager, next"
:total="tableTotal" class="Pagination">
<ElPagination @current-change="bindRecord" @size-change="onSizeChange" width="'100%'"
:page-sizes="[10, 20, 30, 40, 50]" :page-size="searchData.pageSize"
:current-page.sync="searchData.pageNum" layout="total, sizes, prev, pager, next" :total="tableTotal"
class="Pagination">
</ElPagination>
</div>
</div>
@ -120,15 +128,14 @@ import { DeviceForMap } from "@screen/pages/Home/components/RoadAndEvents/utils/
import { Message } from "element-ui";
import Table from '@screen/components/Table.vue';
import moment from "moment";
import { getDicts } from "@/api/system/dict/data";
import _ from "lodash";
import Pagination from '@screen/components/Pagination.vue';
import { deviceType } from "../../../maintenanceOperations/smart/statisticalAnalysis/query/data";
const componentMap = {
"设备箱": "SmartDeviceParams", "语音广播": "BroadcastParam", "疲劳唤醒": "FatigueWakesUpParam",
"行车诱导": "DrivingGuidanceParam", "情报板": "InfoBoardParam",
} //DeviceTopics[deviceType]
// , , "": undefined,
}
const hiddenDevices = ["SmartDeviceParams", "InfoBoardParam"];
const controlMulti = Object.keys(componentMap);//6
const DeviceTopics = {};//6 {key:label}
@ -137,24 +144,76 @@ Object.keys(DeviceForMap).forEach(DeviceLabel => {
controlMulti.indexOf(DeviceLabel) !== -1 && (DeviceTopics[DeviceForMap[DeviceLabel].deviceType] = DeviceLabel);
});
const deviceTypeDefault = Object.keys(DeviceTopics)[1];
function changeHandle(data, formList) {
if (data.deviceType !== "2") { //
const filterData = {};
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;
data.screenSizeName = '';
} else {
setBoardSize(formList,data);
}
}
function changeHandleScreenSize( data,formList){
const filterData = {};
data.direction && (filterData.direction = data.direction);
data.startStakeMark && (filterData.startStakeMark = data.startStakeMark);
data.endStakeMark && (filterData.endStakeMark = data.endStakeMark);
if(data.screenSize && data.screenSize !== ''){
var arySize = data.screenSize.split('_')
filterData.childType = arySize[0];
data.screenSizeName = arySize[1];
}
setDeviceOptions({ deviceType: data.deviceType }, filterData, formList);
data.childType = undefined;
}
async function setBoardSize(formList,data){
// if(formList[4].options.options.length === 0){
const res = await getDicts("iot_board_pixel");
let boardSizeArr = []
res.data.forEach((item) => {
let size = item.dictLabel.substr(item.dictLabel.search(/\d/))
boardSizeArr.push({
label: item.dictLabel,
value: item.dictValue+'_'+size
});
});
formList[4].options.options = boardSizeArr;
data.screenSize = boardSizeArr[0].value;
var arySize = boardSizeArr[0].value.split('_')
setTimeout(() => {
data.screenSizeName = arySize[1];
}, 600);
const filterData = {childType:arySize[0]};
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;
// }
}
async function setDeviceOptions(config, filterData, formList) {
console.log(config.deviceType, filterData,'33333')
const data = await getDeviceList(config.deviceType, filterData).then(async (data) => {
await delay(600);
return data;
});
formList[4].options.options = data.map(item => {
return { label: `${item.deviceName}`, value: JSON.stringify({ id: item.id, iotDeviceId: item.iotDeviceId, deviceType: item.deviceType, otherConfig: item.otherConfig }), disabled: item.deviceState != 1 }
formList[5].options.options = data.map(item => {
return {
label: `${item.deviceName}`,
value: JSON.stringify(
{
id: item.id,
iotDeviceId: item.iotDeviceId,
deviceType: item.deviceType,
otherConfig: item.otherConfig
}),
disabled: item.deviceState != 1
}
})
};
function changeHandle(data, formList) {
const filterData = {};
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;
}
export default {
name: "HomeFrameControl",//
components: {
@ -182,9 +241,12 @@ export default {
{ key: "3", label: "预案控制" }
],
activeIcon: null,
data: {},
data: {
screenSizeName:""
},
hiddenDevices,
submitting: false,
formList: [
{
label: "设备类型:",
@ -198,8 +260,11 @@ export default {
ons: { //on element
change(value, ...args) {
const { data, formList } = args.slice(-1)[0]; //data formList
if (data.deviceType) changeHandle(data, formList);
else data.childType = undefined;
if (data.deviceType) {
changeHandle(data, formList);
} else {
data.childType = undefined;
}
}
},
},
@ -217,8 +282,8 @@ export default {
ons: { //on element
change(value, ...args) {
const { data, formList } = args.slice(-1)[0]; //data formList
if(data.deviceType){
changeHandle(data, formList);
if (data.deviceType) {
changeHandle(data, formList);
}
}
},
@ -325,6 +390,26 @@ export default {
],
}
}),
{
label: "分辨率:",
key: "screenSize",
type: "select",
isAlone: true,
width: '100%',
options: {
clearable: true,
options: [],
["collapse-tags"]: true
},ons: { //on element
change(value, ...args) {
const { data, formList } = args.slice(-1)[0]; //data formList
changeHandleScreenSize( data, formList);
}
},
visible: data => {
return data.deviceType === '2';
},
},
{
label: "设备名称:",
key: "childType",
@ -355,26 +440,28 @@ export default {
label: "描述",
},
],
data2:[], //
tableTotal2:0,
data2: [], //
tableTotal2: 0,
searchData2: {
pageSize: 20,
pageNum: 1,
},
dataRecord:{
dataRecord: { //
operType: "0",
operTime:[]
operTime: []
},
formRecord:[
formRecord: [
{
label: "管控方式:",
key: "operType",
type: "select",
options: {
options: [
options: [
{ key: "0", label: "手动控制" },
{ key: "1", label: "定时控制" },
{ key: "2", label: "批量控制" },
@ -396,7 +483,7 @@ export default {
},
],
tableTotal: 0,
tableData:[],
tableData: [],
searchData: {
pageSize: 20,
pageNum: 1,
@ -404,31 +491,12 @@ export default {
digResultVisible: false
}
},
// inject: ["activeDeviceTypes"],
// watch: {
// activeDeviceTypes: {
// handler(val) {
// const activeTopicOptions = []
// this.activeDeviceTypes.filter(activeDeviceType => {
// const match = activeDeviceType.match(/_(\d+)/);
// if (match) {
// const deviceType = match[1];
// DeviceTopics[deviceType] && activeTopicOptions.push({ label: DeviceTopics[deviceType], value: deviceType });
// }
// });
// this.formList[0].options.options = activeTopicOptions;
// },
// immediate: true,
// deep: true
// }
// },
mounted() {
changeHandle(this.data, this.formList);
},
methods: {
onHide(){
onHide() {
// TODO
},
submitClick() {
@ -438,29 +506,30 @@ export default {
this.activeIcon = null;
},
tabClick() {
if(this.tabAction === '2'){
this.bindTimeing();
} else if(this.tabAction === '3'){
this.dataRecord.operTime = [moment().startOf('month').format('YYYY-MM-DD 00:00:00'),moment().endOf('month').format('YYYY-MM-DD 23:59:59'),]
if (this.tabAction === '2') {
this.bindTimeing();
} else if (this.tabAction === '3') {
this.dataRecord.operTime = [moment().startOf('month').format('YYYY-MM-DD 00:00:00'), moment().endOf('month').format('YYYY-MM-DD 23:59:59'),]
this.bindRecord();
} else if(this.tabAction === '1'){
// this.data['deviceType']=deviceTypeDefault;
// changeHandle(this.data, this.formList);
} else if (this.tabAction === '1') {
}
},
handleClick(type) {
this.activeIcon = this.activeIcon === type ? null : type;
if(this.activeIcon){
this.data['deviceType']=deviceTypeDefault;
if (this.activeIcon) {
this.data['deviceType'] = deviceTypeDefault;
changeHandle(this.data, this.formList);
}
},
//
filterEnd(data) {
this.activeIcon = null;
// this.filterData = data;
this.$parent.$refs.RoadAndEventsRef?.setFilterData?.(data);
},
goStrategy(item){
goStrategy(item) {
this.$router.push(`/control/device/strategy?id=${item.id}`);
},
async handleSwitcherChange(value, item) {
@ -468,8 +537,8 @@ export default {
url: `/business/dcBatchFunctionsJobGroup`,
method: "PUT",
data: {
id:item.id,
status:value
id: item.id,
status: value
},
})
.then((result) => {
@ -478,19 +547,19 @@ export default {
Message.success(`操作成功!`);
})
},
bindTimeing(){
bindTimeing() {
request({
url: `/business/dcBatchFunctionsJobGroup/list`,
method: "get",
params: {...this.searchData2},
url: `/business/dcBatchFunctionsJobGroup/list`,
method: "get",
params: { ...this.searchData2 },
})
.then((result) => {
if (result.code != 200) return;
this.tableTotal2 = result.total;
this.data2 = result.rows;
})
.then((result) => {
if (result.code != 200) return;
this.tableTotal2 = result.total;
this.data2 = result.rows;
})
.finally(() => {
});
.finally(() => {
});
},
onSizeChange2(pageSize) {
this.data2 = [];
@ -498,21 +567,22 @@ export default {
this.searchData2.pageNum = 1;
this.bindTimeing();
},
bindRecord(){
bindRecord() {
request({
url: `/business/dcOperLog/list`,
method: "get",
params: {
...this.searchData,
operType:this.dataRecord.operType,
startTime:this.dataRecord.operTime[0],
endTime:this.dataRecord.operTime[1]}
operType: this.dataRecord.operType,
startTime: this.dataRecord.operTime[0],
endTime: this.dataRecord.operTime[1]
}
})
.then((result) => {
if (result.code != 200) return;
result.rows.forEach(e => {
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
});
this.tableData = result.rows;
this.tableTotal = result.total;
@ -526,10 +596,30 @@ export default {
this.searchData.pageNum = 1;
this.bindRecord();
},
showResult(res){
showResult(res) {
this.digResultVisible = true
}
},
// inject: ["activeDeviceTypes"],
// watch: {
// activeDeviceTypes: {
// handler(val) {
// const activeTopicOptions = []
// this.activeDeviceTypes.filter(activeDeviceType => {
// const match = activeDeviceType.match(/_(\d+)/);
// if (match) {
// const deviceType = match[1];
// DeviceTopics[deviceType] && activeTopicOptions.push({ label: DeviceTopics[deviceType], value: deviceType });
// }
// });
// this.formList[0].options.options = activeTopicOptions;
// },
// immediate: true,
// deep: true
// }
// },
};
</script>
@ -543,7 +633,8 @@ div.el-popper.global-input-search-popover {
// margin-top: 6vh;
.body2 {
width: 800px;
width: 800px;
.title {
background: linear-gradient(90deg,
#237e9b 0%,
@ -588,23 +679,39 @@ div.el-popper.global-input-search-popover {
background: linear-gradient(180deg, #005c79 0%, #009bcc 100%);
}
}
.cardPanel{
.cardPanel {
display: flex;
flex-wrap: wrap;
align-content: flex-start;
}
.cardBox {
flex-basis: percentage(1/4);
padding-right: 10px;
padding-bottom: 10px;
overflow-y: auto;
.card{
width: 187px;
}
}
.footer2 {
width: 100%;
display: flex;
justify-content: center;
align-items: center;
}
.remark {
font-size: 14px; line-height: 20px; height: 40px; overflow: hidden;
font-size: 14px;
line-height: 20px;
height: 40px;
overflow: hidden;
color: #00b3cc;
}
.btnResult{
background-color:#00b3cc;
.btnResult {
background-color: #00b3cc;
color: white;
border: none;
padding: 5px 20px;
@ -616,20 +723,21 @@ div.el-popper.global-input-search-popover {
// color: #fff;
::v-deep {
> button,
> ul li {
>button,
>ul li {
background: #064258;
border-radius: 2px 2px 2px 2px;
opacity: 1;
color: #fff;
}
> button {
>button {
padding: 0 3px;
border: 1px solid #00b3cc;
}
> ul li {
>ul li {
background: linear-gradient(180deg, #004960 0%, #004b62 100%);
margin: 0 1.5px;
@ -687,6 +795,7 @@ div.el-popper.global-input-search-popover {
margin-right: 6px;
}
}
::v-deep .el-pagination__total {
margin-left: 10px;
}

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

@ -6,13 +6,13 @@
'margin-top': '15px', gap: '15px'
} : undefined),
}">
<div style="display: flex;width:100%;padding-right: 9px;" v-if="isMultiControl">
<!-- <div style="display: flex;width:100%;padding-right: 9px;" v-if="isMultiControl">
<label class="el-form-item__label" style="width: 90px;">分辨率:</label>
<el-select v-model="selectedSize" placeholder="请选择" @change="____initData">
<el-option v-for=" item in boardSizeArr " :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</div>
</div> -->
<transition>
<div v-if="visible" class="content">
<div class="mainDialog" :style="{ height: isMultiControl ? '370px' : undefined }">
@ -246,6 +246,9 @@ export default {
selectItems: {
type: Array,
default: () => []
},
selectedSizeMutl:{
type: String
}
},
watch: {
@ -255,7 +258,12 @@ export default {
this.____initData();
},
immediate: true,
},
},selectedSizeMutl:{
handler(v){
this.screenSize = v;
this.____initData();
}
}
},
components: {
LineChart,
@ -267,18 +275,16 @@ export default {
CameraShower,
},
created() {
// this.____getTemplateCategory();
// this.____getAllTemplate();
},
computed: {},
async mounted() {
if (this.isMultiControl) {
await this.____getBoardPixel();
console.log(this.boardSizeArr, "boardSizeArr");
this.selectedSize = this.boardSizeArr?.[0]?.value;
this.____initData();
}
// if (this.isMultiControl) {
// await this.____getBoardPixel();
// console.log(this.boardSizeArr, "boardSizeArr");
// this.selectedSize = this.boardSizeArr?.[0]?.value;
// this.____initData();
// }
},
methods: {
//
@ -306,9 +312,9 @@ export default {
},
//
____initData() {
this.selectedDevice?.otherConfig && (this.selectedSize = JSON.parse(
this.selectedDevice.otherConfig
).screenSize);
if(this.selectedDevice?.otherConfig){
this.selectedSize = JSON.parse(this.selectedDevice.otherConfig).screenSize;
}
if (this.tplCategory.length && this.templateAll.length) {
this.____setAvailableTemplate();
} else {
@ -320,8 +326,10 @@ export default {
});
}
if (!this.isMultiControl)
if (!this.isMultiControl){
this.____getDeviceInfo();
}
},
//
____getDeviceInfo() {
@ -343,6 +351,7 @@ export default {
____setAvailableTemplate() {
this.templateAvailable = [];
this.tplCategory.forEach((item, index) => {
let arr = this.templateAll["" + index];
if (arr.length > 0) {
let temp = [];

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

@ -64,16 +64,16 @@ export class MarkerCluster {
await this.setMarkerCluster();
}
console.log(
"%c [ data ]-227-「map.js」",
"font-size:15px; background:#641f14; color:#a86358;"
);
// console.log(
// "%c [ data ]-227-「map.js」",
// "font-size:15px; background:#641f14; color:#a86358;"
// );
this.markerCluster.addData(data);
console.log(
"%c [ this.markerCluster ]-234-「map.js」",
"font-size:15px; background:#fe94d3; color:#ffd8ff;",
this.markerCluster
);
// console.log(
// "%c [ this.markerCluster ]-234-「map.js」",
// "font-size:15px; background:#fe94d3; color:#ffd8ff;",
// this.markerCluster
// );
const map = this.getMap();
map.setZoom(10);

47
ruoyi-ui/src/views/JiHeExpressway/pages/control/device/strategy/components/AddNEditDialog.vue

@ -1,6 +1,7 @@
<template>
<Dialog
v-model="modelVisible"
top="10%"
:title="propData.id ? '修改' : '新增'"
width="1400px"
>
@ -31,7 +32,6 @@
<el-button
@click="(modelVisible = false), (submitting = false)"
type="info"
size="lg"
>
取消
</el-button>
@ -39,12 +39,12 @@
type="primary"
@click="onSaveTaskGroup('basicInfoForm')"
:loading="submitting"
size="lg"
>
提交
</el-button>
</div>
</el-form>
<div class="line"></div>
<template v-if="editData.id">
<!-- 如果是新增的还没有保存的任务组不能添加任务 -->
<div class="fl-around task_op">
@ -59,17 +59,11 @@
>
<div class="fl-around task_info">
<div class="time_show">
<el-input
placeholder="请输入内容"
v-model="taskGroup.time"
style="width: 180px"
disabled
>
</el-input>
<i
class="icon el-icon-edit-outline"
@click="onModifyTime(taskGroup)"
></i>
<div
class="time_label"
>{{ taskGroup.time }}</div>
<img src="./assets/editor.svg" @click="onModifyTime(taskGroup)" class="arrow" />
</div>
<div class="fl-around task_op">
<el-button
@ -429,16 +423,41 @@ export default {
font-size: 12px;
}
}
.line{
height:1px;
width: 100%;
border-bottom: 1px dashed #00B3CC;
}
.all_groups {
border: 1px solid #09b;
max-height: 500px;
overflow-y: scroll;
padding-right: 5px;
}
.task_group {
border: 1px solid #09b;
margin-bottom: 20px;
.task_info {
padding: 10px;
background: #004050;
.time_show {
display: flex;
justify-content: center;
align-items: center;
.time_label{
width: 160px;
border:1px solid #2B93A5;
border-radius: 5px;
color:#2ab8a9;
height: 22px;
line-height: 20px;
padding-left: 5px;
}
.arrow{
width:20px;
height: 20px;
margin-left: 10px;
cursor: pointer;
}
color: #0ac;
}
}

60
ruoyi-ui/src/views/JiHeExpressway/pages/control/device/strategy/components/TaskItem.vue

@ -2,14 +2,14 @@
<div class="task_editor_box" v-if="isCompReady">
<div class="flex main_ctt">
<div class="device_type">
<span v-if="editData.deviceType">{{ deviceTypeDic[editData.deviceType].label }}</span>
<span v-if="editData.deviceType">{{ deviceTypeDic[editData.deviceType].label }}</span>
</div>
<div class="devices">
<template v-if="editData.devices">
<span v-for="item,index in editData.devices" v-if="index<5" class="title">
<span v-for="item,index in editData.devices" v-if="index<1" class="title">
{{ deviceDic[item.id].deviceName }}
</span>
<span v-if="editData.devices.length >= 6" class="other">{{ editData.devices.length }}个设备</span>
<span v-if="editData.devices.length > 1" class="other">+{{ editData.devices.length-1 }}</span>
</template>
</div>
<div class="content">
@ -20,24 +20,21 @@
<template v-if="editData.deviceType == '5'">
<p class="text">内容{{ editData.params.text }}</p>
</template>
<template v-if="editData.deviceType == '10'">
<div class="center">
<p>{{ awakerWorkModeDic[editData.params.SETMD] }}</p>
<p>时长{{ editData.params.SETTM }}分钟</p>
<template v-if="editData.deviceType == '10' || editData.deviceType == '13'">
<div class="center mode10">
<div class="mode10_m"
><div :class="awakerWorkModeDic[editData.params.SETMD] !=='常亮模式'?'mode10_mc mode10_mc2':'mode10_mc mode10_mc1'"></div>{{ awakerWorkModeDic[editData.params.SETMD] }}</div>
<div>时长<span style="color:#15a5c0">{{ editData.params.SETTM }}分钟</span></div>
</div>
</template>
<template v-if="editData.deviceType == '12'">
<div class="center">
<p>{{ inducerModeDic[editData.params.mode] }}</p>
<p>上行{{ inducerWorkType[editData.params.onWorkStatus] }},
下行{{inducerWorkType[editData.params.inWorkStatus] }}</p>
<div class="center mode10">
<div class="mode10_m"><div :class="inducerModeDic[editData.params.mode] !=='常亮模式'?'mode10_mc mode10_mc2':'mode10_mc mode10_mc1'"></div>{{ inducerModeDic[editData.params.mode] }}</div>
<div>
<p>上行{{ inducerWorkType[editData.params.onWorkStatus] }}</p>
<p>下行{{inducerWorkType[editData.params.inWorkStatus] }}</p>
</div>
</template>
<template v-if="editData.deviceType == '13'">
<div class="center">
<p>{{ awakerWorkModeDic[editData.params.SETMD] }}</p>
<p>时长{{ editData.params.SETTM }}分钟</p>
</div>
</template>
@ -195,7 +192,12 @@ export default {
.devices{ flex: 1; display: flex; flex-wrap: wrap; align-items: center;
span{ font-size:14px; margin:0 4px 3px 0; border-radius: 3px; white-space: nowrap; word-break: break-all; float: left;}
.title{border: 1px solid #0AC; padding: 2px 8px;}
.other{padding: 3px 8px;}
.other{
padding: 3px 5px;
border: 1px solid #00b3cc;
color:#00b3cc;
border-radius: 3px;
}
}
.content{ width: 300px; display: flex; align-items: stretch;
.board{ flex: 1; }
@ -205,4 +207,28 @@ export default {
.button{ width:120px; margin-left: 10px; display: flex; align-items: center; justify-content: flex-end;}
}
}
.mode10{
display: flex;
flex-direction: row !important;
justify-content: flex-start !important;
.mode10_m{
margin-right: 30px;
display: flex;
align-items: center;
.mode10_mc{
width: 10px;
height: 10px;
border-radius: 50%;
margin-right: 10px;
}
.mode10_mc1{
background-color: #15a5c0;
}
.mode10_mc2{ width: 10px;
background-color: #eef54e;
}
}
}
</style>

19
ruoyi-ui/src/views/JiHeExpressway/pages/control/device/strategy/components/assets/editor.svg

@ -0,0 +1,19 @@
<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
<g id="Group 1321314660">
<g id="Group 1321314647">
<circle id="Ellipse 41" cx="9" cy="9" r="9" fill="url(#paint0_linear_1192_398)"/>
</g>
<g id="Frame" clip-path="url(#clip0_1192_398)">
<path id="Vector" d="M13.6582 13.8242H4.3418C4.16921 13.8242 4.0293 13.6843 4.0293 13.5117C4.0293 13.3391 4.16921 13.1992 4.3418 13.1992H13.6582C13.8308 13.1992 13.9707 13.3391 13.9707 13.5117C13.9707 13.6843 13.8308 13.8242 13.6582 13.8242ZM4.18555 13.2578L4.89844 11.1875L6.90039 13.2676L4.18555 13.2578ZM5.46484 10.4941L7.4375 12.5351L11.7734 8.20896L9.78125 6.207L5.46484 10.4941ZM10.4355 5.44529L12.4082 7.41794L12.9746 6.832C12.9746 6.832 13.1895 6.5195 13.1211 6.27536C13.0527 6.03122 11.8223 4.94724 11.6855 4.81052C11.5488 4.6738 11.2852 4.69333 10.9922 4.93747C10.6992 5.18161 10.4355 5.44529 10.4355 5.44529Z" fill="white"/>
</g>
</g>
<defs>
<linearGradient id="paint0_linear_1192_398" x1="8.67672" y1="3.43511" x2="8.67672" y2="17.5878" gradientUnits="userSpaceOnUse">
<stop stop-color="#39D5BF"/>
<stop offset="1" stop-color="#1FAED6"/>
</linearGradient>
<clipPath id="clip0_1192_398">
<rect width="10" height="10" fill="white" transform="translate(4 4)"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

50
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DeviceControl/components/ScopeTable.vue

@ -86,7 +86,7 @@
</el-col>
<!-- 疲劳唤醒 -->
<el-col v-if="tableInfo.deviceType == 10" :span="8">
<el-select v-model="tableInfo.zx_name" placeholder="工作模式">
<el-select v-model="tableInfo.zx_operationType" placeholder="工作模式" @change="gzmsOptions_zx_change">
<el-option v-for="item in gzmsOptions" :key="item.value" :label="item.label"
:value="item.value"></el-option>
</el-select>
@ -165,7 +165,7 @@
</el-col>
<!-- 疲劳唤醒 -->
<el-col v-if="tableInfo.deviceType == 10" :span="8">
<el-select v-model="tableInfo.hf_name" placeholder="工作模式">
<el-select v-model="tableInfo.hf_operationType" placeholder="工作模式" @change="gzmsOptions_hf_change">
<el-option v-for="item in gzmsOptions" :key="item.value" :label="item.label"
:value="item.value"></el-option>
</el-select>
@ -180,7 +180,7 @@
<!-- 行车诱导 -->
<el-col v-if="tableInfo.deviceType == 12" :span="6">
<el-select v-model="tableInfo.hf_controlModel" placeholder="请选择模式" transfer="true"
:popper-append-to-body="false">
>
<el-option label="手动模式" value="00"></el-option>
<el-option label="自动模式" value="01"></el-option>
<el-option label="万年历" value="02"></el-option>
@ -299,44 +299,44 @@ export default {
}
],
gzmsOptions: [
{
value: "激光关闭",
{
value: "0",
label: "激光关闭"
},
{
value: "常亮模式",
value: "1",
label: "常亮模式"
},
{
value: "间隔100ms闪烁模式",
value: "2",
label: "间隔100ms闪烁模式"
},
{
value: "间隔200ms闪烁模式",
value: "3",
label: "间隔200ms闪烁模式",
},
{
value: "间隔500ms闪烁模式",
value: "4",
label: "间隔500ms闪烁模式",
},
{
value: "2次闪烁模式",
value: "5",
label: "2次闪烁模式"
},
{
value: "SOS模式",
value: "6",
label: "SOS模式"
},
{
value: "自定义模式1",
value: "7",
label: "自定义模式1",
},
{
value: "自定义模式2",
value: "8",
label: "自定义模式2",
},
{
value: "自定义模式3",
value: "9",
label: "自定义模式3",
}
],
@ -377,11 +377,29 @@ export default {
}
},
async changeDeviceType(value) {
const defaultFields = ['deviceType','searchRule','number','deviceList']
this.deviceType = value;
console.log('value', value)
this.tableInfo.devList = [];
this.tableInfo.searchRule = 1;
this.tableInfo.deviceList = [];
for(let key in this.tableInfo){
if(defaultFields.indexOf(key) === -1){
delete this.tableInfo[key]
}
}
if(value === 2 || value === 5){
this.tableInfo["executeConfig"]= {operationType:2}
this.tableInfo["recoverConfig"]= {operationType:2}
}
this.loadData(value);
},
gzmsOptions_zx_change(e){
this.tableInfo['zx_name']=_.find(this.gzmsOptions,{value:e}).label
},
gzmsOptions_hf_change(e){
this.tableInfo['hf_name']=_.find(this.gzmsOptions,{value:e}).label
},
clickQbb(name) {
this.clickQbbName = name;
// this.qbbData = this.tableData[index].dcInfoBoardTemplate;

281
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DeviceControl/index copy.vue

@ -1,281 +0,0 @@
<template>
<Card class="DeviceControl" title="设备管控">
<div class="container">
<el-row v-for="(item, index) in tableData" :key="index" class="rowBlock">
<ScopeTable
:tableInfo="item"
:index="index"
@onAdd="onAdd"
@onDel="onDel"
@onConfirm="onConfirm"
@onContentEdit="onContentEdit"
></ScopeTable>
</el-row>
</div>
<div class="foot">
<ButtonGradient
class="special-button"
style="background: rgb(229, 68, 73)"
@click.native="handleSubmit(1)"
>
一键控制
</ButtonGradient>
<ButtonGradient
class="special-button"
style="background: rgb(250, 152, 56)"
@click.native="handleSubmit(2)"
>
一键恢复
</ButtonGradient>
</div>
</Card>
</template>
<script>
import Card from "@screen/components/Card2/Card.vue";
import ButtonGradient from "@screen/components/Buttons/ButtonGradient.vue";
import ScopeTable from "./components/ScopeTable.vue";
import { provideMixin } from "./../../mixin";
import { defaultTableInfo } from "./data";
import { Message } from "element-ui";
import request from "@/utils/request";
export default {
name: "DeviceControl",
mixins: [provideMixin],
components: {
Card,
ScopeTable,
ButtonGradient,
},
data() {
return {
planId: "",
tableData: [],
};
},
watch: {},
mounted() {},
methods: {
detailChange(eventId) {
this.initData(this.detailData);
},
initData(eventInfo) {
request({
url: `business/plans/list/event/type`,
method: "post",
data: { ...eventInfo },
})
.then((result) => {
if (result.code != 200) return Message.error(result?.msg);
let data = result.data;
if (data.length == 0) {
this.tableData = [{ ...defaultTableInfo }];
return Message.warning("该事件暂无处置预案");
}
let dcExecuteAction = data[0].dcExecuteAction || [];
this.planId = data[0].id;
let dcArr = [];
dcExecuteAction.forEach((it) => {
let action = { ...it };
if (it.executeConfig) {
let executeConfig = JSON.parse(it.executeConfig);
let execute = this.mapKeys(executeConfig, "zx_");
action = { ...action, ...execute };
}
if (it.recoverConfig) {
let recoverConfig = JSON.parse(it.recoverConfig);
let recover = this.mapKeys(recoverConfig, "hf_");
action = { ...action, ...recover };
}
if (it.deviceList) {
action.devList = it.deviceList.split(",").map((str) => str);
}
dcArr.push(action);
});
this.tableData =
dcArr.length == 0 ? [{ ...defaultTableInfo }] : dcArr;
})
.catch((err) => {
console.log(err);
Message.error("查询事件预案列表失败", err);
});
},
mapKeys(obj, prefix) {
return Object.keys(obj).reduce((result, key) => {
result[`${prefix}${key}`] = obj[key];
return result;
}, {});
},
onAdd() {
this.tableData.push({ ...defaultTableInfo });
},
onDel(index) {
if (this.tableData.length <= 1) {
return Message.warning("最后一项不可删除!");
}
this.tableData.splice(index, 1);
},
onConfirm(index){
const param = {
"dcEvent": {
"eventType": this.detailData.eventType,
"direction": this.detailData.direction,
"id": this.detailData.id,
"stakeMark": this.detailData.stakeMark,
"subclass": this.detailData.subclass
},
"dcExecuteAction": {
"id": "",
"emergencyPlansId": "",
"deviceType": this.tableData[index].deviceType,
"searchRule": this.tableData[index].searchRule,
"number": this.tableData[index].number,
"deviceList": this.tableData[index].devList.join(','),
"executeConfig": "{\"operationType\":2}",
"recoverConfig": "{\"operationType\":2}"
}
}
request({
url: `business/plans/list/event/emergencyPlans`,
method: "post",
data: param,
}).then(result=>{
if (result.code != 200) return Message.error(result?.msg);
console.log(param,result,'===============')
let data = result.data;
this.tableData[index].executeConfig = JSON.parse(data.executeConfig)
this.tableData[index].recoverConfig = JSON.parse(data.recoverConfig)
this.tableData[index].zx_operationType = this.tableData[index].executeConfig?.operationType;
this.tableData[index].hf_operationType = this.tableData[index].recoverConfig?.operationType;
this.tableData = _.cloneDeep(this.tableData)
})
},
onContentEdit({field,index,idx,type}){
if(type==='edit'){
this.tableData[index][field]['contentList'][idx]['isEditor'] = this.tableData[index][field]['contentList'][idx].content;
} else if(type === 'cancel'){
this.tableData[index][field]['contentList'][idx]['content'] = this.tableData[index][field]['contentList'][idx].isEditor;
delete this.tableData[index][field]['contentList'][idx].isEditor
} else if(type === 'confirm'){
delete this.tableData[index][field]['contentList'][idx].isEditor
}
this.tableData = _.cloneDeep(this.tableData)
},
handleSubmit(value = 1) {
let dcArr = [];
this.tableData.forEach((item) => {
let dcData = {
deviceType: item.deviceType,
searchRule: item.searchRule,
number: item.number,
};
if (item.devList && item.devList.length > 0) {
dcData.deviceList = item.devList.join(",");
}
let zxData = {},
hfData = {};
if(item.executeConfig){
zxData['executeConfig'] = item.executeConfig
}
if(item.recoverConfig){
zxData['recoverConfig'] = item.recoverConfig
}
Object.keys(item).forEach((key) => {
if (/^zx_/.test(key)) {
let keyName = key.substring(3);
zxData[keyName] = item[key];
}
if (/^hf_/.test(key)) {
let keyName = key.substring(3);
hfData[keyName] = item[key];
}
});
if (item.deviceType == 12) {
zxData = this.formatData(zxData);
hfData = this.formatData(hfData);
}
dcData.executeConfig = JSON.stringify(zxData);
dcData.recoverConfig = JSON.stringify(hfData);
dcArr.push(dcData);
});
let reqData = {
operationType: value, //1- 2-
dcEmergencyPlans: {
id: this.planId,
dcExecuteAction: dcArr,
},
dcEvent: {
id: this.detailData.id,
eventType: this.detailData.eventType,
stakeMark: this.detailData.stakeMark,
subclass: this.detailData.subclass,
direction: this.detailData.direction == "菏泽方向" ? "1" : "3",
},
};
console.log("reqData", reqData);
return;
request({
url: "/business/plans/event/confirm",
method: "post",
data: reqData,
})
.then((result) => {
if (result.code != 200) return Message.error(result?.msg);
Message.success("提交成功");
})
.catch(() => {
Message.error("提交失败");
});
},
},
};
</script>
<style lang="scss" scoped>
.DeviceControl {
::v-deep {
.content {
display: flex;
flex-direction: column;
}
}
.container {
flex: 1;
min-height: 300px;
overflow-y: auto;
.rowBlock {
background-color: #296887;
padding: 5px 10px;
margin-bottom: 10px;
}
}
.foot {
display: flex;
height: "100px";
justify-content: space-evenly;
margin-top: 10px;
.special-button {
width: 100px;
cursor: pointer;
.icon {
background-repeat: no-repeat;
background-size: 100% 100%;
width: 20px;
height: 20px;
transition: all 0.3s linear;
}
}
}
}
</style>

60
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DeviceControl/index.vue

@ -39,6 +39,10 @@ import { provideMixin } from "./../../mixin";
import { defaultTableInfo } from "./data";
import { Message } from "element-ui";
import request from "@/utils/request";
import {
inducerModeDic,
inducerWorkTypeDic,
} from "@screen/utils/enum.js";
export default {
name: "DeviceControl",
@ -48,6 +52,7 @@ export default {
ScopeTable,
ButtonGradient,
},
inject: ["provideData","reload"],
data() {
return {
planId: "",
@ -58,7 +63,9 @@ export default {
mounted() {},
methods: {
detailChange(eventId) {
this.initData(this.detailData);
if(this.tableData.length === 0){
this.initData(this.detailData);
}
},
initData(eventInfo) {
request({
@ -85,11 +92,17 @@ export default {
let execute = this.mapKeys(executeConfig, "zx_");
action = { ...action, ...execute,...{executeConfig} };
if(it.deviceType === 12 && executeConfig.startTime && executeConfig.endTime){
action['zx_time'] = [executeConfig.startTime,executeConfig.endTime]
}
}
if (it.recoverConfig) {
let recoverConfig = JSON.parse(it.recoverConfig);
let recover = this.mapKeys(recoverConfig, "hf_");
action = { ...action, ...recover,...{recoverConfig} };
if(it.deviceType === 12 && recoverConfig.startTime && recoverConfig.endTime){
action['hf_time'] = [recoverConfig.startTime,recoverConfig.endTime]
}
}
if (it.deviceList) {
action.devList = it.deviceList.split(",").map((str) => str);
@ -130,7 +143,7 @@ export default {
"deviceType": this.tableData[index].deviceType,
"searchRule": this.tableData[index].searchRule,
"number": this.tableData[index].number,
"deviceList": this.tableData[index].devList?.join(','),
"deviceList": this.tableData[index].devList?this.tableData[index].devList.join(','):'',
"executeConfig": "{\"operationType\":2}",
"recoverConfig": "{\"operationType\":2}"
}
@ -168,46 +181,22 @@ export default {
}
this.tableData = _.cloneDeep(this.tableData)
},
formatData(it, value = 1) {
let data = { ...it, actionType: value, emergencyPlansId: id };
if (
it.deviceList &&
typeof it.deviceList !== "string" &&
it.deviceList.length > 0
) {
data.deviceList = it.deviceList.join(",");
} else {
data.deviceList = "";
}
if (it.content) {
data.otherConfig = JSON.stringify({ content: it.content });
}
formatData(it) {
let data = {};
if (it.controlModel) {
let other = {
data = {
controlModel: it.controlModel,
controlModelName: inducerModeDic[it.controlModel],
state: it.state,
name: inducerWorkTypeDic[it.state],
};
if (it.time && it?.time[0]) {
other = {
controlModel: it.controlModel,
controlModelName: inducerModeDic[it.controlModel],
state: it.state,
name: inducerWorkTypeDic[it.state],
data = {
...data,
startTime: it.time[0],
endTime: it.time[1],
};
}
data.otherConfig = JSON.stringify(other);
}
if (it.gzms) {
data.otherConfig = JSON.stringify({
state: it.gzms,
name: gzmsMap[it.gzms],
operationDuration: it.operationDuration,
});
}
return data;
},
@ -222,7 +211,7 @@ export default {
if (item.devList && item.devList.length > 0) {
dcData.deviceList = item.devList.join(",");
}
if(item.deviceType === 2 || item.deviceType === 5){
if(item.deviceType === 2 || item.deviceType === 5){//广
dcData.executeConfig = JSON.stringify(item.executeConfig);
dcData.recoverConfig = JSON.stringify(item.recoverConfig);
} else {
@ -248,8 +237,6 @@ export default {
dcArr.push(dcData);
});
let reqData = {
operationType: value, //1- 2-
dcEmergencyPlans: {
@ -264,6 +251,9 @@ export default {
direction: this.detailData.direction == "菏泽方向" ? "1" : "3",
},
};
//
console.log(reqData)
return;
request({
url: "/business/plans/event/confirm",
method: "post",
@ -272,9 +262,11 @@ export default {
.then((result) => {
if (result.code != 200) return Message.error(result?.msg);
Message.success("提交成功");
this.reload();
})
.catch(() => {
Message.error("提交失败");
this.reload();
});
},
},

0
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DispatchLiaison/StatsDialogVisible/index.vue → ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DispatchLiaison/StatsDialog/index.vue

7
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DispatchLiaison/index.vue

@ -53,7 +53,7 @@
<div class="value" v-else>-</div>
</div>
</div>
<StatsDialogVisible
<StatsDialog
:visible="statsDialogVisible"
:data="dispatchList"
:employees="employeesChoice"
@ -71,7 +71,7 @@ import ButtonGradient from "@screen/components/Buttons/ButtonGradient.vue";
import Descriptions from "@screen/components/Descriptions.vue";
import { provideMixin } from "./../../mixin";
import { postCommandDispatch } from "@/api/commandDispatch";
import StatsDialogVisible from "./StatsDialogVisible/index.vue";
import StatsDialog from "./StatsDialog/index.vue";
import request from "@/utils/request";
export default {
@ -81,7 +81,7 @@ export default {
Card,
ButtonGradient,
Descriptions,
StatsDialogVisible,
StatsDialog,
},
inject: ["provideData","reload"],
data() {
@ -114,7 +114,6 @@ export default {
this.statsDialogVisible = false;
},
getCommandDispatch(type='init') {
console.log(type,'---------')
let data = {
stakeMark: this.provideDetail.stakeMark,
id: this.provideDetail.id,

2
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DisposalProcess/index.vue

@ -321,9 +321,7 @@ export default {
} else {
content = this.imageUrl;
}
console.log(this.imageUrl, this.fileType,'------------')
let type = this.containsArrayElement(this.imageUrl, this.fileType);
console.log(type,'$$$')
let data = {
eventId: this.eventId,
processId: this.processId,

173
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/EventInformation/components/EditEventInformationDialog/index.vue

@ -1,19 +1,11 @@
<template>
<Dialog v-model="modelVisible" title="修改事件信息" width="1100px" top="5%">
<div class="EditEventInformationDialog">
<Form
class="form"
ref="FormConfigRef"
:formList="formConfigList"
v-model="fData"
labelWidth="120px"
/>
<Form class="form" ref="FormConfigRef" :formList="formConfigList" v-model="fData" labelWidth="120px" />
<div class="footer">
<Button @click.native="onSubmit" :loading="submitting">保存</Button>
<Button style="background: #c9c9c9" @click.native="modelVisible = false"
>关闭</Button
>
<Button style="background: #c9c9c9" @click.native="modelVisible = false">关闭</Button>
</div>
</div>
</Dialog>
@ -24,7 +16,9 @@ import Dialog from "@screen/components/Dialog/index";
import Form from "@screen/components/FormConfig";
import Button from "@screen/components/Buttons/Button.vue";
import request from "@/utils/request";
import { configList } from "./data.js";
import { formatEvent, configList } from "@screen/utils/enum_event/data.js";
import { Message } from "element-ui";
import { provideMixin } from "./../../../../mixin";
@ -40,6 +34,7 @@ export default {
event: "close",
},
mixins: [provideMixin],
inject: ["provideData", "reload"],
props: {
visible: Boolean,
},
@ -68,7 +63,7 @@ export default {
},
},
},
mounted() {},
mounted() { },
methods: {
async initData() {
this.infoData = { ...this.detailData };
@ -80,114 +75,97 @@ export default {
if (typeof info.lang == "string") {
info.lang = info.lang.split(",");
}
if(info.eventSource){
info.eventSource = info.eventSource.toString()
}
if(info.dcEventVehicleAccident && info.dcEventVehicleAccident.weatherCondition){
info.dcEventVehicleAccident.weatherCondition = info.dcEventVehicleAccident.weatherCondition.toString()
for(let i in info){
if(typeof info[i] === 'object' && info[i]){
for(let j in info[i]){
if(j === 'rampId'){
let aryZd = info[i][j].split(',');
let numZd = []
aryZd.forEach(e => {
numZd.push(parseInt(e))
});
info[i][j] = numZd
}
}
}
}
this.fData = info;
this.formConfigList = configList[info.eventName];
await Promise.all([
// 1 2 3 4 5 6
request({
url: `/business/facility/query`,
method: "get",
//==================
let _confirgList = _.cloneDeep(configList[info.eventName]);
const facilityResult = await request({ url: `/business/facility/query`,method: "get"})
if (facilityResult.code != 200) return Message.error(facilityResult?.msg);
this.lwss = [];
facilityResult.data.forEach((it) =>
this.lwss.push({
key: it.id,
label: it.facilityName,
type: it.facilityType,
})
.then((result) => {
if (result.code != 200) return Message.error(result?.msg);
this.lwss = [];
result.data.forEach((it) =>
this.lwss.push({
key: it.id,
label: it.facilityName,
type: it.facilityType,
})
);
_confirgList.forEach(async (it) => {
if (it.label==='服务区:' && it.type==='select' ) { //
it.options.options = this.lwss.filter((x) => x.type == 6);
}
if (it.label==='立交桥:' && it.type==='select' ) { //
it.options.options = this.lwss.filter((x) => x.type == 4);
let aryKey = it.key.split('.')
const v = info[aryKey[0]][aryKey[1]]
if(v){
const zdResult = await request({ url: `/system/ramp/listAll?facilityId=${v}`,method: "get"})
if (zdResult.code != 200) return Message.error(zdResult?.msg);
console.log
let zd = [];
zdResult.rows.forEach((it) =>
zd.push({ key: it.id, label: it.rampName })
);
})
.catch((err) => {
console.log("err", err);
Message.error("查询失败6", err);
}),
]);
this.formConfigList.forEach((it) => {
if (it.key == "dcEventServiceArea.facilityId") {
it.options.options = this.lwss.filter((ss) => ss.type == 6);
_confirgList.filter(x=>x.label==='匝道:' && x.type==='select').forEach(f=>{
f.options.options = zd
})
}
}
if (it.label==='收费站:' && it.type==='select' ) { //
it.options.options = this.lwss.filter((x) => x.type == 1);
}
if (it.label==='停车区:' && it.type==='select' ) { //
it.options.options = this.lwss.filter((x) => x.type == 7);
}
});
this.formConfigList = _confirgList;
console.log(info,'---------------')
this.fData = info;
},
onSubmit() {
this.$refs.FormConfigRef.validate().then((formData) => {
this.submitting = true;
let eventType = this.infoData.eventType;
formData.eventType = eventType;
if (
(eventType == 1 || eventType == 2) &&
Array.isArray(formData.lang)
) {
formData.lang = formData.lang.join(",");
}
if(formData.direction){
formData.direction = formData.direction == '济南方向' ? '3' : '1'
}
formData.roadId = 1;
if (
eventType == 3 &&
formData.dcEventTrafficControl.facilityId instanceof Array
) {
let ids = formData.dcEventTrafficControl.facilityId;
formData.dcEventTrafficControl.facilityIds = ids;
formData.dcEventTrafficControl.facilityId = "";
}
if (formData.endStakeMark && formData.endStakeMark[0] != null) {
let endStakeMark = formData.endStakeMark;
let strMark =
endStakeMark && endStakeMark.length > 0
? "K" + endStakeMark[0].padStart(3,'0') + "+" + endStakeMark[1]
: "";
if (eventType == 4) {
formData.dcEventTrafficCongestion.endStakeMark = strMark;
}
if (eventType == 7) {
formData.dcEventConstruction.endStakeMark = strMark;
}
if (eventType == 10) {
formData.dcEventAbnormalWeather.endStakeMark = strMark;
}
formData.endStakeMark = "";
} else {
formData.endStakeMark = "";
}
let stakeMark = formData.stakeMark;
// console.log('formData', {
// ...formData,
// id: this.infoData.id,
// eventState: this.infoData.eventState,
// stakeMark: (stakeMark && stakeMark[0] != null) ? ((stakeMark && stakeMark.length > 0) ? ('K' + stakeMark[0].padStart(3,'0') + '+' + stakeMark[1]) : '') : '',
// })
// this.submitting = false;
let f = formatEvent(formData);
request({
url: `/dc/system/event`,
method: "put",
data: {
...formData,
...f,
id: this.infoData.id,
eventState: this.infoData.eventState,
stakeMark:
stakeMark && stakeMark[0] != null
? stakeMark && stakeMark.length > 0
? "K" + stakeMark[0] + "+" + stakeMark[1]
: ""
: "",
stakeMark: f.stakeMark || '',
},
})
.then((result) => {
if (result.code != 200) return Message.error(result?.msg);
Message.success("提交成功");
this.reload();
this.modelVisible = false;
})
.catch(() => {
@ -209,6 +187,7 @@ export default {
height: 700px;
display: flex;
flex-direction: column;
.form {
flex: 1;
overflow-y: auto;

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

@ -63,6 +63,7 @@ import { provideMixin } from "./../../mixin";
export default {
name: "EventInformation",
mixins: [provideMixin],
inject: ["provideData","reload"],
components: {
Card,
ButtonGradient,

4
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/RealTimeVideo/index.vue

@ -1,6 +1,6 @@
<template>
<Card class="RealTimeVideo" title="实时视频">
<!-- <div class="item">
<div class="item">
<Video
v-if="detailData.stakeMark"
class="item-video"
@ -19,7 +19,7 @@
:showHeader="false"
/>
<span>菏泽方向</span>
</div> -->
</div>
</Card>
</template>

16
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/ReleaseInformation/index.vue

@ -59,7 +59,17 @@ export default {
Form,
Descriptions,
},
inject: ["provideData"],
inject: ["provideData","reload"],
watch: {
async "provideData.detail"(newValue, oldValue) {
this.eventId = newValue.id;
this.bindChannels();
// console.log("", this.provideDetail);
},
},
data() {
return {
list: [
@ -100,7 +110,7 @@ export default {
},
mounted() {
//
this.bindChannels();
},
methods: {
bindChannels(){
@ -108,7 +118,7 @@ export default {
request({
url: `/business/channels/eventPublishChannels`,
method: "post",
data: {eventId: this.detailData.id},
data: {eventId: this.eventId },
})
.then((result) => {
// console.log(result,'eventPublishChannels')

58
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/TrafficControl/components/AddControlEventInfoDialog/index.vue

@ -2,6 +2,7 @@
<Dialog v-model="modelVisible" title="新增交通管制事件" width="1100px" top="10%">
<div class="AddControlEventInfoDialog">
<Form class="form" ref="FormConfigRef" :formList="formConfigList" v-model="fData" labelWidth="120px" />
<div class="footer">
<Button style="background: #c9c9c9" @click.native="modelVisible = false">关闭</Button>
<Button :loading="submitting" @click.native="onSubmit">保存</Button>
@ -15,10 +16,12 @@ import Dialog from "@screen/components/Dialog/index";
import Form from "@screen/components/FormConfig";
import Button from "@screen/components/Buttons/Button.vue";
import request from "@/utils/request";
import { configList } from "../../../EventInformation/components/EditEventInformationDialog/data.js";
import { Message } from 'element-ui'
import { formatEvent, configList, getFacilities } from "@screen/utils/enum_event/data.js";
export default {
name: "AddControlEventInfoDialog",
components: {
@ -39,10 +42,8 @@ export default {
data() {
return {
formConfigList: [],
fData: {dcEventTrafficControl:{}},
fData: { dcEventTrafficControl: {} },
submitting: false,
roads: [],
direction: [],
};
},
computed: {
@ -63,40 +64,39 @@ export default {
},
methods: {
async initData() {
this.formConfigList =configList['交通管制'];
this.fData.eventSubclass = this.eventSubclass;
this.fData.dcEventTrafficControl.controlType = this.controlType;
let config = _.cloneDeep(configList['交通管制']);
const value = this.eventSubclass;
config[0].default = value;
let facilityType = 1;
if (value == "3-2") {
facilityType = 1;
} else if (value == "3-3") {
facilityType = 4;
} else if (value == "3-4") {
facilityType = 6;
}
// 1 2 3 4 5 6
if (value && value != "3-1") {
getFacilities(facilityType, config)
}
console.log('eventSubclass', this.eventSubclass)
this.formConfigList = config;
},
onSubmit() {
this.$refs.FormConfigRef.validate().then((formData) => {
this.submitting = true;
if (formData.dcEventTrafficControl.facilityId instanceof Array) {
let ids = formData.dcEventTrafficControl.facilityId;
formData.dcEventTrafficControl.facilityIds = ids
formData.dcEventTrafficControl.facilityId = null
}
if (formData.dcEventTrafficControl.rampId instanceof Array) {
formData.dcEventTrafficControl.rampId = formData.dcEventTrafficControl.rampId.join(',')
}
if(formData.direction){
formData.direction = formData.direction == '济南方向' ? '3' : '1'
}
formData.roadId = 1;
let stakeMark = formData.stakeMark;
console.log(formData)
let f = formatEvent(formData)
f.id = this.eventId;
f.eventState = 1;
request({
url: `/dc/system/event`,
method: "post",
data: {
...formData,
id:this.eventId,
eventState:1,
...f,
id: this.eventId,
eventState: 1,
eventType: 3,
stakeMark: stakeMark && stakeMark[0] != null
? stakeMark && stakeMark.length > 0 ? "K" + stakeMark[0].padStart(3,'0') + "+" + stakeMark[1].padStart(3,'0') : "" : "",
stakeMark: f.stakeMark || ''
},
})
.then((result) => {

6
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/TrafficControl/index.vue

@ -22,6 +22,7 @@
</div>
<AddControlEventInfoDialog
v-if="addControlEventInfoDialogVisible"
v-model="addControlEventInfoDialogVisible"
:controlType="controlType"
:eventSubclass="eventSubclass"
@ -56,9 +57,8 @@ export default {
radioList: [
{ key: "3-1", label: "主线管制" },
{ key: "3-2", label: "收费站管制" },
{ key: "3-3", label: "服务区管制" },
{ key: "3-4", label: "枢纽立交管制" },
{ key: "3-5", label: "其他管制" },
{ key: "3-3", label: "枢纽立交管制" },
{ key: "3-4", label: "服务区管制" },
],
};
},

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

@ -45,7 +45,7 @@ export default {
provide() {
return {
provideData: this.provideData,
reload:this.test,
reload:this.getDetail,
};
},
data() {
@ -76,9 +76,6 @@ export default {
this.getDetail();
},
methods: {
test(){
console.log('-------------')
},
getDetail() {
// -
request({

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

@ -239,7 +239,6 @@ export default {
},
methods: {
initData(data) {
console.log("data", data);
if (!data) return;
// this.planId = data.id;
let dcExecuteAction = data.dcExecuteAction;

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

@ -37,10 +37,10 @@
}
" @close="onCloseAddNew" />
<template #footer >
<template #footer>
<Button v-if="activeName == '-1' || activeName == '0'" style="margin-top: 30px;padding: 0 24px"
@click.native="onDelete">误报</Button>
<Button :style="{marginTop: '30px', backgroundColor: '#C9C9C9', padding: '0 24px' }"
<Button :style="{ marginTop: '30px', backgroundColor: '#C9C9C9', padding: '0 24px' }"
@click.native="modelVisible = false">取消</Button>
<Button v-if="activeName == '-1' || activeName == '0'" style="margin-top: 30px;padding: 0 24px"
@click.native="onSubmit">确认</Button>
@ -54,7 +54,6 @@ import TimeLine1 from "@screen/components/TimeLine/TimeLine1/index";
import TimeLine2 from "@screen/components/TimeLine/TimeLine2/index";
import Form from "@screen/components/FormConfig";
import { _formList } from "./data";
// import { timeLine2List } from "@screen/pages/control/event/commandDispatch/Cards/DisposalProcess/data.js"
import Video from "@screen/components/Video";
import VideoMulti from "@screen/components/VideoMulti";
import Carousel from "./Carousel/index.vue";
@ -98,7 +97,7 @@ export default {
},
data() {
return {
formList:[..._formList],
formList: [..._formList],
isShowDialog: false,
info: [],
timeLine1List: [
@ -169,7 +168,7 @@ export default {
}
});
rows.forEach(item =>{
rows.forEach(item => {
this.timeLine2List.push({
id: item.processId,
time: item.operationTime
@ -221,72 +220,95 @@ export default {
this.isShowDialog = false;
},
onDelete() {
if(this.formList[this.formList.length-1].key !== 'relieveReason' ){
this.formList.push({
label: "解除类型:",
key: "relieveType",
type: "RadioGroup",
isAlone: true,
required: true,
options: {
activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)",
options: [
{
key: "1",
label: "误报解除",
if (this.formData.id) {
if (this.activeName == "-1") {
if (this.formList[this.formList.length - 1].key !== 'relieveReason') {
this.formList.push({
label: "解除类型:",
key: "relieveType",
type: "RadioGroup",
isAlone: true,
required: true,
options: {
activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)",
options: [
{
key: "1",
label: "误报解除",
},
{
key: "2",
label: "事件已结束",
},
{
key: "3",
label: "无需处理事件",
},
{
key: "4",
label: "其它",
}
],
},
{
key: "2",
label: "事件已结束",
},
{
key: "3",
label: "无需处理事件",
},
{
key: "4",
label: "其它",
})
this.formList.push({
label: "解除原因:", //
key: "relieveReason", //
isAlone: true, //
type: "input", //(el-input el-) input
options: { //elementformItem
type: "textarea",
autosize: true,
maxlength: 200,
autosize: { minRows: 3, maxRows: 3 },
showWordLimit: true,
}
],
},
})
this.formList.push({
label: "解除原因:", //
key: "relieveReason", //
isAlone: true, //
type: "input", //(el-input el-) input
options: { //elementformItem
type: "textarea",
autosize: true,
maxlength: 200,
autosize: { minRows: 3, maxRows: 3 },
showWordLimit: true,
})
} else {
this.$refs.FormConfigRef.validate()
.then((result) => {
request({
url: `/business/warning/falseAlarm`,
method: "post",
data: {
id: this.formData.id,
relieveType: result.relieveType,
relieveReason: result.relieveReason
},
}).then((result) => {
if (result.code == 200) Message.success("成功!");
else Message.error(result?.msg);
this.modelVisible = false;
this.$emit("queryData", true);
//
this.$root.$emit('refresh-event');
//
this.$root.$emit('delete-event');
});
})
.catch((err) => {
});
}
})
} else {
this.$refs.FormConfigRef.validate()
.then((result) => {
} else {
this.$confirm("确定误报吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
request({
url: `/business/warning/falseAlarm`,
method: "post",
data: {
id: this.formData.id,
relieveType: result.relieveType,
relieveReason: result.relieveReason
},
url: `dc/system/event/${this.formData.id}`,
method: "delete",
}).then((result) => {
if (result.code == 200) Message.success("成功!");
else Message.error(result?.msg);
this.modelVisible = false;
this.$emit("queryData", true);
//
this.$root.$emit('refresh-event');
//
this.$root.$emit('delete-event');
});
})
.catch((err) => {
});
}
}
// 2024-05-18

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

@ -4,47 +4,47 @@ import { Message } from "element-ui";
const locationSelect = [
{
value: "1",
value: 1,
label: "入口车道",
},
{
value: "2",
value: 2,
label: "入口匝道",
},
{
value: "3",
value: 3,
label: "入口",
},
{
value: "4",
value: 4,
label: "入口内广场",
},
{
value: "5",
value: 5,
label: "出口车道",
},
{
value: "6",
value: 6,
label: "出口匝道",
},
{
value: "7",
value: 7,
label: "外广场",
},
{
value: "8",
value: 8,
label: "出口",
},
{
value: "9",
value: 9,
label: "(站外)入口匝道",
},
{
value: "10",
value: 10,
label: "(站外)出口匝道",
},
{
value: "11",
value: 11,
label: "出口内广场",
},
];

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

@ -2,11 +2,11 @@
<Dialog v-model="modelVisible" title="交通事故录入" width="1100px" top="14%">
<div class="EventDetailDialog">
<ElTabs v-model="activeName" @tab-click="handleChange">
<ElTabPane v-for="(item, index) in tabConfigList" :key="index" :label="item.label" :name="item.key" />
<ElTabPane v-for="(item, index) in tabConfigList" :key="index" :name="item.label" :label="item.label" />
</ElTabs>
<div class="fader">
<Transition name="fade">
<Form class="form" ref="FormConfigRef" :formList="formConfig.list" v-bind="getFormOptions"
<Form class="form" ref="FormConfigRef" :formList="formConfig" v-bind="getFormOptions"
labelWidth="120px" />
</Transition>
</div>
@ -27,7 +27,8 @@ import Button from "@screen/components/Buttons/Button.vue";
import request from "@/utils/request";
import { Message } from "element-ui";
import { tabConfigList } from "./data.js";
import { formatEvent,configList } from "@screen/utils/enum_event/data.js";
export default {
name: "EventDetailDialog",
@ -45,10 +46,10 @@ export default {
},
data() {
return {
activeName: "TrafficAccident",
activeName: "交通事故",
submitting: false,
formConfig: {},
tabConfigList,
formConfig: [],
tabConfigList:[],
index: 1,
roads: [],
direction: [],
@ -56,7 +57,9 @@ export default {
};
},
created() {
// this.formConfig = tabConfigList[0].formConfig;
for(let i in configList){
this.tabConfigList.push({label:i});
}
this.initData().then(() => {
this.handleChange({ index: 0 });
});
@ -73,41 +76,13 @@ export default {
getFormOptions() {
return {
column: 3,
...this.formConfig.formOptions,
// ...this.formConfig.formOptions,
};
},
},
methods: {
initData() {
return Promise.all([
//
request({
url: `/business/road/query`,
method: "get",
})
.then((result) => {
if (result.code != 200) return Message.error(result?.msg);
result.data.forEach((it) => {
this.roads.push({ key: it.id, label: it.roadName });
});
})
.catch((err) => {
Message.error("查询失败4", err);
}),
//
request({
url: `/system/dict/data/type/iot_event_direction`,
method: "get",
})
.then((result) => {
if (result.code != 200) return Message.error(result?.msg);
result.data.forEach((it) => {
this.direction.push({ key: it.dictValue, label: it.dictLabel });
});
})
.catch((err) => {
Message.error("查询失败5", err);
}),
// 1 2 3 4 5 6
request({
url: `/business/facility/query`,
@ -125,92 +100,42 @@ export default {
})
.catch((err) => {
console.log("err", err);
Message.error("查询失败6", err);
Message.error("查询失败", err);
}),
]);
},
handleChange({ index }) {
// console.log('index',index)
this.index = index;
let formConfig = tabConfigList[index].formConfig;
console.log("formConfig", formConfig);
formConfig.list.forEach((it) => {
if (it.key == "direction") {
it.options.options = this.direction;
}
if (it.key == "roadId") {
it.options.options = this.roads;
}
if (index == 7 && it.key == "dcEventServiceArea.facilityId") {
it.options.options = this.lwss.filter((ss) => ss.type == 6);
}
// if (index == 0 || index == 1 || index == 7) {
// if (it.key === 'dcEventAccident.facilityId' || it.key === 'dcEventVehicleAccident.facilityId' || it.key === 'dcEventServiceArea.facilityId') {
// it.options.options = this.lwss.filter(ss => ss.type == 6);
// }
// }
});
let formConfig = configList[this.tabConfigList[index].label];
if(this.activeName === '服务器异常'){
formConfig.forEach((it) => {
if (it.key == "dcEventServiceArea.facilityId") {
it.options.options = this.lwss.filter((x) => x.type == 6);
}
});
}
this.formConfig = formConfig;
},
handleSubmit() {
// return
this.$refs.FormConfigRef.validate().then((formData) => {
this.submitting = true;
let f = formatEvent(formData)
if (this.index == 0 || this.index == 1) {
formData.lang = formData.lang.join(",");
} else {
formData.lang = "";
if(f.startTime){
f.occurrenceTime = f.startTime;
delete f.startTime
}
if (this.index == 2 && formData.dcEventTrafficControl.facilityId instanceof Array) {
let ids = formData.dcEventTrafficControl.facilityId;
formData.dcEventTrafficControl.facilityIds = ids
formData.dcEventTrafficControl.facilityId = ''
}
if (formData.endStakeMark && formData.endStakeMark[0] != null) {
let endStakeMark = formData.endStakeMark;
let strMark = endStakeMark && endStakeMark.length > 0 ? "K" + endStakeMark[0] + "+" + endStakeMark[1] : "";
if (this.index == 3) {
formData.dcEventTrafficCongestion.endStakeMark = strMark;
}
if (this.index == 6) {
formData.dcEventConstruction.endStakeMark = strMark;
}
if (this.index == 9) {
formData.dcEventAbnormalWeather.endStakeMark = strMark;
}
formData.endStakeMark = "";
} else {
formData.endStakeMark = "";
}
let stakeMark = formData.stakeMark;
// console.log('formData', {
// ...formData,
// eventType: Number(this.index) + 1,
// stakeMark: (stakeMark && stakeMark[0] != null) ? ((stakeMark && stakeMark.length > 0) ? ('K' + stakeMark[0] + '+' + stakeMark[1]) : '') : '',
// })
// this.modelVisible = false;
// this.submitting = false;
// this.$emit('queryData',true)
//
if(formData.dcEventTrafficControl && formData.dcEventTrafficControl.rampId){
formData.dcEventTrafficControl.rampId = formData.dcEventTrafficControl.rampId.join(',')
}
request({
url: `/dc/system/event`,
method: "post",
data: {
...formData,
...f,
eventType: Number(this.index) + 1,
eventState: 0,
stakeMark:
stakeMark && stakeMark[0] != null
? stakeMark && stakeMark.length > 0
? "K" + stakeMark[0] + "+" + stakeMark[1]
: ""
: "",
stakeMark: f.stakeMark || ''
},
})
.then((result) => {

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

@ -206,7 +206,7 @@ export default {
if (result.code != 200) return Message.error(result?.msg);
result.rows.forEach(it => {
it.stringDirection = gzDirectionMapping[it.direction] || it.direction;
it.stringEventType = it.stringEventType + (it.eventSubclass ? `(${it.eventSubclass})` : '');
it.stringEventType = it.stringEventType + (it.eventSubclass ? `(${it.eventSubclassName})` : '');
if (this.activeName == '0') {
it.startTime = it?.occurrenceTime || '';
@ -216,11 +216,8 @@ export default {
it.startTime = it?.endTime || '';
}
// if (it.otherConfig) {
// let otherConfig = JSON.parse(it.otherConfig);
// it.pictures = otherConfig.pictures || [];
// }
})
console.log(result.rows)
this.data = result.rows;
this.total = result.total;
});

74
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/addAndEditDialog/ScopeTable.vue

@ -56,7 +56,7 @@
</el-col>
<!-- 疲劳唤醒 -->
<el-col v-if="tableInfo.deviceType == 10" :span="4">
<el-select v-model="tableInfo.zx_name" placeholder="工作模式">
<el-select v-model="tableInfo.zx_operationType" placeholder="工作模式" @change="gzmsOptions_zx_change">
<el-option v-for="item in gzmsOptions" :key="item.value" :label="item.label"
:value="item.value"></el-option>
</el-select>
@ -65,7 +65,7 @@
<el-input-number placeholder="" v-model="tableInfo.zx_operationDuration" :min="0"
:max="999"></el-input-number>
</el-col>
<el-col v-if="tableInfo.deviceType == 10" :span="2">
<el-col v-if="tableInfo.deviceType == 10" :span="4">
<span>时长(分钟)</span>
</el-col>
<!-- 行车诱导 -->
@ -120,7 +120,7 @@
</el-col>
<!-- 疲劳唤醒 -->
<el-col v-if="tableInfo.deviceType == 10" :span="4">
<el-select v-model="tableInfo.hf_name" placeholder="工作模式">
<el-select v-model="tableInfo.hf_operationType" placeholder="工作模式" @change="gzmsOptions_hf_change">
<el-option v-for="item in gzmsOptions" :key="item.value" :label="item.label"
:value="item.value"></el-option>
</el-select>
@ -129,7 +129,7 @@
<el-input-number placeholder="" v-model="tableInfo.hf_operationDuration" :min="0"
:max="999"></el-input-number>
</el-col>
<el-col v-if="tableInfo.deviceType == 10" :span="2">
<el-col v-if="tableInfo.deviceType == 10" :span="4">
<span>时长(分钟)</span>
</el-col>
<!-- 行车诱导 -->
@ -152,13 +152,6 @@
:value="item.value"></el-option>
</el-select>
</el-col>
<!-- 语音广播 -->
<!-- <el-col v-if="tableInfo.deviceType == 5" :span="4">
<el-select v-model="tableInfo.hf_operationType" placeholder="请选择">
<el-option label="自定义发布" :value="1"></el-option>
<el-option label="智能发布" :value="2"></el-option>
</el-select>
</el-col> -->
<el-col v-if="tableInfo.deviceType == 5" :span="4">
<el-input v-model="tableInfo.hf_content" placeholder="请输入发布内容"></el-input>
</el-col>
@ -195,6 +188,7 @@ export default {
visible: Boolean,
eventType: Number,
type: Number,
index:Number,
tableInfo: {
type: Object,
default: () => ({ ...defaultTableInfo })
@ -238,43 +232,43 @@ export default {
],
gzmsOptions: [
{
value: "激光关闭",
value: "0",
label: "激光关闭"
},
{
value: "常亮模式",
value: "1",
label: "常亮模式"
},
{
value: "间隔100ms闪烁模式",
value: "2",
label: "间隔100ms闪烁模式"
},
{
value: "间隔200ms闪烁模式",
value: "3",
label: "间隔200ms闪烁模式",
},
{
value: "间隔500ms闪烁模式",
value: "4",
label: "间隔500ms闪烁模式",
},
{
value: "2次闪烁模式",
value: "5",
label: "2次闪烁模式"
},
{
value: "SOS模式",
value: "6",
label: "SOS模式"
},
{
value: "自定义模式1",
value: "7",
label: "自定义模式1",
},
{
value: "自定义模式2",
value: "8",
label: "自定义模式2",
},
{
value: "自定义模式3",
value: "9",
label: "自定义模式3",
}
],
@ -288,7 +282,6 @@ export default {
'tableInfo.deviceType': {
async handler(newValue) {
let loadData = await this.loadData(newValue);
// console.log('aa', loadData)
this.sbOptions = [];
loadData.forEach(it => {
this.sbOptions.push({ value: it.iotDeviceId, label: it.deviceName })
@ -298,40 +291,25 @@ export default {
}
},
async mounted() {
// if(this.type == )
// let loadData = await this.loadData(2);
// // console.log('aa', loadData)
// this.sbOptions = [];
// loadData.forEach(it => {
// this.sbOptions.push({ value: it.iotDeviceId, label: it.deviceName })
// })
},
methods: {
initData() {
},
async changeDeviceType(value) {
this.deviceType = value;
console.log('value', value)
let loadData = await this.loadData(value);
this.sbOptions = [];
loadData.forEach(it => {
this.sbOptions.push({ value: it.iotDeviceId, label: it.deviceName })
})
gzmsOptions_zx_change(e){
this.tableInfo['zx_name']=_.find(this.gzmsOptions,{value:e}).label
},
onAdd(id) {
this.tableData.push({
deviceType: 1,
searchRule: 1,
qbb: ''
})
gzmsOptions_hf_change(e){
this.tableInfo['hf_name']=_.find(this.gzmsOptions,{value:e}).label
},
onDel(index) {
if (this.tableData.length <= 1) {
return Message.warning('最后一项不可删除!');
}
this.tableData.splice(index, 1)
async changeDeviceType(value) {
this.$emit("onchange",this.index)
this.deviceType = value;
this.tableInfo.devList = [];
},
//
clickQbb(name) {
this.clickQbbName = name;
// this.qbbData = this.tableData[index].dcInfoBoardTemplate;

472
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/addAndEditDialog/index copy.vue

@ -1,472 +0,0 @@
<template>
<Dialog v-model="modelVisible" :title="title" width="1330px">
<div class="EventAddPlanDialog">
<ElForm :model="formData" inline :rules="rules" ref="ruleForm">
<div class="first">
<el-form-item prop="eventCategory">
<el-radio-group v-model="formData.eventCategory" @input="changeRadio">
<el-radio-button :label="1">交通事件</el-radio-button>
<el-radio-button :label="2">感知事件</el-radio-button>
</el-radio-group>
</el-form-item>
<el-form-item required label="预案名称:" prop="planName">
<el-input v-model="formData.planName" placeholder="请输入预案名称"></el-input>
</el-form-item>
<el-form-item required label="事件类型:" prop="eventType">
<el-select v-model="formData.eventType" placeholder="请选择事件类型" @change="changeEventType">
<el-option v-for="item in eventOptions" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="触发类型:" prop="triggerMechanism">
<el-select v-model="formData.triggerMechanism" placeholder="请选择触发类型">
<el-option v-for="item in mechanismOptions" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</el-form-item>
</div>
<div class="second">
<el-row>
<el-col :span="2">
<div class="text"><i style="color: red">*</i>执行操作:</div>
</el-col>
<el-col :span="22">
<FormTable ref="secondFormTable" :tableData="secondFormData" :type="1"></FormTable>
</el-col>
</el-row>
</div>
<div class="third">
<el-row>
<el-col :span="2">
<div class="text"><i style="color: red">*</i>恢复操作:</div>
</el-col>
<el-col :span="22">
<FormTable ref="thirdFormTable" :tableData="thirdFormData" :type="2"></FormTable>
</el-col>
</el-row>
</div>
</ElForm>
</div>
<template #footer>
<Button style="background: #c9c9c9; padding: 0 24px"
@click.native="(modelVisible = false), (submitting = false)">取消</Button>
<Button style="padding: 0 24px" @click.native="handleSubmit" :loading="submitting">保存</Button>
</template>
</Dialog>
</template>
<script>
import Dialog from "@screen/components/Dialog/index";
import Form from "@screen/components/FormConfig";
import FormTable from "../formTable/index";
import Button from "@screen/components/Buttons/Button.vue";
import request from "@/utils/request";
import { Message } from "element-ui";
import { throttle } from "lodash";
import {
inducerModeDic,
inducerWorkTypeDic,
gzmsMap,
eventSubClassMap,
trafficKV,
WarningTypeList as perceptionKV,
} from "@screen/utils/enum.js";
const typeMap = {
1: trafficKV,
2: perceptionKV,
};
export default {
name: "addAndEditDialog",
components: {
Dialog,
Form,
Button,
FormTable,
},
model: {
prop: "visible",
event: "close",
},
provide() {
return {
// loadData: throttle(this.loadData, 100)
loadData: this.loadData,
};
},
props: {
visible: Boolean,
detail: {
type: Object,
default: () => { },
},
},
data() {
return {
title: "新增预案",
dialogType: 1,
planId: 0,
submitting: false,
formData: {
eventCategory: 1,
eventType: 1,
triggerMechanism: "",
},
secondFormData: [
{
deviceType: 1,
searchRule: 1,
qbb: "",
},
],
thirdFormData: [
{
deviceType: 1,
searchRule: 1,
qbb: "",
},
],
deviceData: [],
eventOptions: trafficKV,
mechanismOptions: [
{
value: "1-1",
label: "追尾",
},
{
value: "1-2",
label: "侧翻",
},
{
value: "1-3",
label: "撞护栏",
},
{
value: "1-4",
label: "自然",
},
{
value: "1-5",
label: "其他事故",
},
],
rules: {
planName: [{ required: true, message: "请输入预案名称" }],
eventType: [
{ required: true, message: "请选择事件类型", trigger: "change" },
],
},
};
},
mounted() { },
computed: {
modelVisible: {
get() {
if (this.visible) {
if (Object.keys(this.detail).length > 0) {
this.title = "修改预案";
this.dialogType = 2;
this.eventOptions = typeMap[this.detail.eventCategory];
this.mechanismOptions =
eventSubClassMap[this.detail.eventCategory || 1][
this.detail.eventType
];
this.initData(this.detail.id);
} else {
this.title = "新增预案";
this.dialogType = 1;
this.formData = {
eventCategory: 1,
eventType: 1,
triggerMechanism: "",
};
this.secondFormData = [
{
deviceType: 1,
searchRule: 1,
qbb: "",
},
];
this.thirdFormData = [
{
deviceType: 1,
searchRule: 1,
qbb: "",
},
];
}
}
return this.visible;
},
set(val) {
this.$emit("close", val);
},
},
},
methods: {
initData(id = 1) {
request({
url: `/business/plans/list/${id}`,
method: "get",
})
.then((result) => {
if (result.code != 200) return Message.error(result?.msg);
let data = result.data;
let dcExecuteAction = result.data.dcExecuteAction;
this.planId = data.id;
this.formData = {
eventCategory: data.eventCategory,
planName: data.planName,
eventType: data.eventType,
triggerMechanism: data.triggerMechanism,
};
this.secondFormData = [];
this.thirdFormData = [];
dcExecuteAction.forEach((it) => {
let action = {};
if (it.otherConfig) {
let config = JSON.parse(it.otherConfig);
let qbb = "";
if (config.id) {
qbb = config.content;
config = { dcInfoBoardTemplate: config };
}
// if (config.state) {
// config.gzms = config.state
// }
action = { ...it, ...config, qbb: qbb };
}
if (it.deviceList) {
action.deviceList = it.deviceList
.split(",")
.map((str) => Number(str));
}
if (it.actionType == 1) {
this.secondFormData.push(action);
} else if (it.actionType == 2) {
this.thirdFormData.push(action);
}
});
console.log("secondFormData", this.secondFormData);
})
// console.log('secondFormData', this.secondFormData)
// }).catch((err) => {
// console.log(err)
// Message.error("", err);
// })
.catch((err) => {
console.log(err);
Message.error("查询事件预案列表失败", err);
});
},
async loadData(deviceType = 1) {
this.deviceData = [];
let result = await request({
url: `business/device/query?deviceType=${deviceType}`,
method: "get",
});
if (result.code != 200) return Message.error(result?.msg);
if (deviceType == 1) {
this.deviceData = result.data.filter((it) => it.childType !== "1-1");
} else {
this.deviceData = result.data;
}
return this.deviceData;
},
changeEventType(value = 1) {
this.mechanismOptions =
eventSubClassMap[this.formData.eventCategory || 1][value];
},
changeRadio(value = 1) {
this.formData.triggerMechanism = "";
this.eventOptions = typeMap[value];
this.changeEventType(1);
},
handleChange() { },
formatData(it, value = 1, id = "") {
let data = { ...it, actionType: value, emergencyPlansId: id };
if (
it.deviceList &&
typeof it.deviceList !== "string" &&
it.deviceList.length > 0
) {
data.deviceList = it.deviceList.join(",");
} else {
data.deviceList = "";
}
if (it.content) {
data.otherConfig = JSON.stringify({ content: it.content });
}
if (it.controlModel) {
let other = {
controlModel: it.controlModel,
controlModelName: inducerModeDic[it.controlModel],
state: it.state,
name: inducerWorkTypeDic[it.state],
};
if (it.time && it?.time[0]) {
other = {
controlModel: it.controlModel,
controlModelName: inducerModeDic[it.controlModel],
state: it.state,
name: inducerWorkTypeDic[it.state],
startTime: it.time[0],
endTime: it.time[1],
};
}
data.otherConfig = JSON.stringify(other);
}
if (it.gzms) {
data.otherConfig = JSON.stringify({
state: it.gzms,
name: gzmsMap[it.gzms],
operationDuration: it.operationDuration,
});
}
return data;
},
handleSubmit() {
this.$refs["ruleForm"].validate((valid) => {
if (valid) {
// this.submitting = false;
let secondFormTable = this.$refs["secondFormTable"].tableData || [];
let thirdFormTable = this.$refs["thirdFormTable"].tableData || [];
// let flg = false;
// for (let item of secondFormTable) {
// if (this.areAllValuesEmpty(item)) { flg = true; break };
// }
// if (flg) return Message.warning('');
// for (let item of thirdFormTable) {
// if (this.areAllValuesEmpty(item)) { flg = true; break };
// }
// if (flg) return Message.warning('');
// console.log('12', secondFormTable);
// console.log('34', thirdFormTable);
let dcArr = [];
let id = "";
if (this.dialogType == 2) id = this.planId;
secondFormTable.forEach((it) => {
dcArr.push(this.formatData(it, 1, id));
});
thirdFormTable.forEach((it) => {
dcArr.push(this.formatData(it, 2, id));
});
console.log({
...this.formData,
dcExecuteAction: dcArr,
});
// return;
if (this.dialogType == 1) {
//
request({
url: `/business/plans`,
method: "post",
data: {
...this.formData,
dcExecuteAction: dcArr,
},
})
.then((result) => {
if (result.code != 200) return Message.error(result?.msg);
Message.success("提交成功");
this.modelVisible = false;
})
.catch(() => {
Message.error("提交失败");
})
.finally(() => {
this.submitting = false;
this.$emit("reInitData", true);
});
} else if (this.dialogType == 2) {
//
request({
url: `/business/plans`,
method: "put",
data: {
...this.formData,
id: this.planId,
dcExecuteAction: dcArr,
},
})
.then((result) => {
if (result.code != 200) return Message.error(result?.msg);
Message.success("提交成功");
this.modelVisible = false;
})
.catch(() => {
Message.error("提交失败");
})
.finally(() => {
this.submitting = false;
this.$emit("reInitData", true);
});
}
}
});
},
areAllValuesEmpty(obj) {
console.log("ass", obj);
return Object.keys(obj).every(function (key) {
const value = obj[key];
return (
value == null ||
value === "" ||
(Array.isArray(value) && value.length === 0) ||
(value instanceof Object && Object.keys(value).length === 0)
);
});
},
},
};
</script>
<style lang="scss" scoped>
.fade-enter-active,
.fade-leave-active {
transition: opacity 0.24s;
}
.fade-enter,
.fade-leave-to {
opacity: 0;
}
.EventAddPlanDialog {
gap: 9px;
width: 1280px;
height: 310px;
display: flex;
flex-direction: column;
.first,
.second,
.third {
padding: 5px 10px 8px;
background-color: #296887;
margin-bottom: 15px;
.text {
margin-top: 12px;
}
}
.form {
flex: 1;
overflow-y: auto;
}
.footer {
display: flex;
justify-content: end;
gap: 15px;
}
}
</style>

102
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/addAndEditDialog/index.vue

@ -23,7 +23,7 @@
<div>
<div v-for="(item, index) in tableData" :key="item.id" class="rowBlock">
<div style="flex:1">
<ScopeTable :tableInfo="item"></ScopeTable>
<ScopeTable :tableInfo="item" @onchange="onChange" :index="index"></ScopeTable>
</div>
<div style="width:100px">
<ElButton class="elButton" icon="el-icon-plus" plain size="mini" @click.native="onAdd()" />
@ -56,7 +56,6 @@ import Table from '@screen/components/Table.vue';
import {
inducerModeDic,
inducerWorkTypeDic,
gzmsMap,
eventSubClassMap,
trafficKV
} from "@screen/utils/enum.js";
@ -96,7 +95,7 @@ export default {
submitting: false,
formData: {
eventType: 1,
triggerMechanism: "",
triggerMechanism: "1-1",
},
tableData: [],
deviceData: [],
@ -146,7 +145,7 @@ export default {
this.dialogType = 1;
this.formData = {
eventType: 1,
triggerMechanism: "",
triggerMechanism: "1-1",
};
console.log('defaultTableInfo', { ...defaultTableInfo })
this.tableData = [{ ...defaultTableInfo }]
@ -183,11 +182,17 @@ export default {
let executeConfig = JSON.parse(it.executeConfig);
let execute = this.mapKeys(executeConfig, 'zx_');
action = { ...action, ...execute };
if(it.deviceType === 12 && executeConfig.startTime && executeConfig.endTime){
action['zx_time'] = [executeConfig.startTime,executeConfig.endTime]
}
}
if (it.recoverConfig) {
let recoverConfig = JSON.parse(it.recoverConfig);
let recover = this.mapKeys(recoverConfig, 'hf_');
action = { ...action, ...recover };
if(it.deviceType === 12 && recoverConfig.startTime && recoverConfig.endTime){
action['hf_time'] = [recoverConfig.startTime,recoverConfig.endTime]
}
}
if (it.deviceList) {
action.devList = it.deviceList
@ -197,6 +202,7 @@ export default {
dcArr.push(action);
});
console.log(dcArr,'---------')
this.tableData = dcArr;
})
// console.log('secondFormData', this.secondFormData)
@ -247,10 +253,12 @@ export default {
return Message.warning('最后一项不可删除!');
}
this.tableData.splice(index, 1)
},
onChange(index){
},
formatData(it) {
let data = {};
if (it.controlModel) {
data = {
controlModel: it.controlModel,
@ -297,7 +305,7 @@ export default {
hfData[keyName] = item[key];
}
})
if (item.deviceType == 12) {
if (item.deviceType == 12) { //
zxData = this.formatData(zxData);
hfData = this.formatData(hfData);
}
@ -310,35 +318,73 @@ export default {
let errorNumber = -1;
let errorMessage = '';
for(let i = 0; i < dcArr.length; i++){
if(dcArr[i].searchRule === 1 && ( !dcArr[i].deviceList || dcArr[i].deviceList==='')){
errorNumber = i;
errorMessage = '指定设备资源未选择设备'
break;
}
let zx = JSON.parse(dcArr[i].executeConfig);
if(!zx.operationType){
errorNumber = i;
errorMessage = '未选择执行操作'
break;
}
if(zx.operationType === 1 && !zx.dcInfoBoardTemplate){
errorNumber = i;
errorMessage = '执行操作-自定义发布未选择模版'
break;
}
let hf = JSON.parse(dcArr[i].recoverConfig);
if(!hf.operationType){
errorNumber = i;
errorMessage = '未选择恢复操作'
break;
}
if(hf.operationType === 1 && !hf.dcInfoBoardTemplate){
errorNumber = i;
errorMessage = '恢复操作-自定义发布未选择模版'
break;
if(dcArr[i].deviceType === 2){
let zx = JSON.parse(dcArr[i].executeConfig);
if(!zx.operationType){
errorNumber = i;
errorMessage = '未选择执行操作'
break;
}
if(zx.operationType === 1 && !zx.dcInfoBoardTemplate){
errorNumber = i;
errorMessage = '执行操作-自定义发布未选择模版'
break;
}
let hf = JSON.parse(dcArr[i].recoverConfig);
if(!hf.operationType){
errorNumber = i;
errorMessage = '未选择恢复操作'
break;
}
if(hf.operationType === 1 && !hf.dcInfoBoardTemplate){
errorNumber = i;
errorMessage = '恢复操作-自定义发布未选择模版'
break;
}
} else if (dcArr[i].deviceType === 5){
let zx = JSON.parse(dcArr[i].executeConfig);
if(!zx.operationType){
errorNumber = i;
errorMessage = '未选择执行操作'
break;
}
if(zx.operationType === 1 && !zx.content){
errorNumber = i;
errorMessage = '执行操作-自定义发布未选择模版'
break;
}
} else if (dcArr[i].deviceType === 10){
let zx = JSON.parse(dcArr[i].executeConfig);
if(!zx.operationType){
errorNumber = i;
errorMessage = '未选择执行工作模式'
break;
}
if(!zx.operationDuration){
errorNumber = i;
errorMessage = '执行操作-时长未选择'
break;
}
let hf = JSON.parse(dcArr[i].recoverConfig);
if(!hf.operationType){
errorNumber = i;
errorMessage = '未选择恢复工作模式'
break;
}
if(!hf.operationDuration){
errorNumber = i;
errorMessage = '恢复操作-时长未选择'
break;
}
}
}
console.log(dcArr)
if(errorNumber !== -1){
this.$message.error(`${errorNumber+1}条事件异常:${errorMessage}`)
return;

4
ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/smart/analysis/charts.js

@ -31,8 +31,8 @@ var options = {
},
grid: {
top: "25%", //上边距
right: "0%", //右边距
left: "0%", //左边距
right: "1%", //右边距
left: "1%", //左边距
bottom: "10%", //下边距
containLabel: true,
},

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

@ -3,7 +3,7 @@
<div class="left">
<WgtTitle :title="'设备列表'"></WgtTitle>
<el-form :model="form" class="formSearch keep-ratio" size="mini">
<el-form :model="form" class="formSearch " size="mini">
<el-form-item>
<el-col :span="11">
<el-input v-model="form.deviceName" size="medium" placeholder="设备名称" class="direction"></el-input>
@ -22,7 +22,7 @@
</el-form>
<div class="body">
<vuescroll :ops="scrollOptions">
<div :class="'device keep-ratio ' + (listIndex===index?'deviceSel':'')" v-for="(item, index) of list" @click="devClick(item,index)">
<div :class="'device ' + (listIndex===index?'deviceSel':'')" v-for="(item, index) of list" @click="devClick(item,index)">
<div>{{ item.deviceName }}</div>
<el-tooltip :content="(item.deviceState == 0 || item.deviceState == null) ? '异常' : '在线'" placement="top">
<img src="@/assets/jihe/images/offline.svg" class="state"
@ -252,7 +252,7 @@ export default {
padding: 20px;
.left {
width: 380px;
width: 400px;
background-color: #112533;
height: 100%;
display: flex;

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

@ -142,10 +142,11 @@ export default {
text: "文件正在下载...",
});
// request.post(url, {}, { headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, responseType: 'blob' })
request({
url: url,//
method: "post",
data: { ...this.searchData, warningState: 1 },
data: { ...this.searchData },
responseType: 'blob'
})
.then((res) => {

1228
ruoyi-ui/src/views/JiHeExpressway/utils/enum_event/PresetFormItems.js

File diff suppressed because it is too large

2411
ruoyi-ui/src/views/JiHeExpressway/utils/enum_event/data.js

File diff suppressed because it is too large
Loading…
Cancel
Save