Browse Source

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

wangqin
hui 11 months ago
parent
commit
111f993adf
  1. 77
      ruoyi-ui/src/common/menuData.js
  2. 16
      ruoyi-ui/src/router/index.js
  3. 11
      ruoyi-ui/src/store/modules/menu.js
  4. 1
      ruoyi-ui/src/views/JiHeExpressway/components/Dialog/index.vue
  5. 14
      ruoyi-ui/src/views/JiHeExpressway/components/HeaderMenu/CustomMenu.vue
  6. 31
      ruoyi-ui/src/views/JiHeExpressway/components/RecentPages/index.vue
  7. 35
      ruoyi-ui/src/views/JiHeExpressway/components/TimeLine/TimeLine2/DescCard.vue
  8. 40
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Broadcast/components/BroadcastReleases.vue
  9. 262
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/ConfluenceArea/components/DeviceControlDialog.vue
  10. 126
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/ConfluenceArea/components/DeviceParams.vue
  11. 44
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/ConfluenceArea/data.js
  12. 188
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/ConfluenceArea/index.vue
  13. 8
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/MeteorologicalDetection/components/DeviceControlDialog.vue
  14. 4
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/RemoteMachine/components/DeviceParams.vue
  15. 4
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SmartDevice/components/DeviceParams.vue
  16. 11
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/mixin.js
  17. 8
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/index.vue
  18. 1
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/buttonEvent.js
  19. 5
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DeviceControl/components/ScopeTable.vue
  20. 105
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DeviceControl/index.vue
  21. 9
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DispatchLiaison/StatsDialogVisible/index.vue
  22. 36
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DispatchLiaison/index.vue
  23. 11
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DisposalProcess/DialogVisible/index.vue
  24. 56
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DisposalProcess/index.vue
  25. 2
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/EventInformation/index.vue
  26. 2
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/ReleaseInformation/index.vue
  27. 23
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/index.vue
  28. 88
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/emergencyProcessManagement/index.vue
  29. 42
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/addAndEditDialog/ScopeTable.vue
  30. 27
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/addAndEditDialog/index.vue
  31. 28
      ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/smart/manage/data.js
  32. 22
      ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/smart/manage/images/refresh.svg
  33. 461
      ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/smart/manage/index.vue
  34. 49
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/meteorologyCheck/components/sortFaceForecast/index.vue
  35. 6
      ruoyi-ui/src/views/JiHeExpressway/pages/service/publicService/components/record/index.vue
  36. 6
      ruoyi-ui/src/views/JiHeExpressway/pages/service/publicService/index.vue
  37. 8
      ruoyi-ui/src/views/JiHeExpressway/scss/el-reset.scss

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

@ -36,7 +36,7 @@ export default [
path: "/perception/trafficSituation",
name: "perceptionTrafficSituation",
component: "perception/trafficSituation/index.vue",
}
},
],
},
{
@ -88,12 +88,12 @@ export default [
name: "emergencyProcessManagement",
component: "control/event/emergencyProcessManagement/index.vue",
},
{
title: "指挥调度",
path: "/control/event/commandDispatch",
name: "commandDispatch",
component: "control/event/commandDispatch/index.vue",
},
// {
// title: "指挥调度",
// path: "/control/event/commandDispatch",
// name: "commandDispatch",
// component: "control/event/commandDispatch/index.vue",
// },
{
title: "管控事件分析",
path: "/control/event/governanceAnalysis",
@ -113,14 +113,14 @@ export default [
path: "/control/device/strategy",
name: "controlDeviceStrategy",
component: "control/device/strategy/index.vue",
}
},
],
},
{
title: "扫码报警",
name: "controlQR",
path: "/control/qrCode",
component: "control/qrCode/index.vue"
component: "control/qrCode/index.vue",
},
{
title: "非机预警",
@ -137,9 +137,9 @@ export default [
name: "controlManualStatistic",
path: "/control/manual/statistic",
component: "control/manual/statistic/index.vue",
}
]
}
},
],
},
],
},
{
@ -149,40 +149,43 @@ export default [
path: "/maintain",
children: [
{
title:"收费运营",
name:"fee",
title: "收费运营",
name: "fee",
path: "/maintain/fee",
component: "maintenanceOperations/chargeableOperations/index.vue"
},{
title:"智能养护",
name:"smart",
children:[
component: "maintenanceOperations/chargeableOperations/index.vue",
},
{
title: "智能养护",
name: "smart",
children: [
{
title: "统计分析",
name: "smartStatistic",
path: "/maintain/smart/statistic",
component: "maintenanceOperations/smart/statisticalAnalysis/index.vue",
title: "统计分析",
name: "smartStatistic",
path: "/maintain/smart/statistic",
component:
"maintenanceOperations/smart/statisticalAnalysis/index.vue",
},
{
title: "网络拓扑",
name: "smartTopology",
path: "/maintain/smart/topology",
component: "maintenanceOperations/smart/topology/index.vue"
component: "maintenanceOperations/smart/topology/index.vue",
},
{
title: "设备管理",
name: "smartDeviceMange",
path: "/maintain/smart/manage",
component: "maintenanceOperations/smart/manage/index.vue"
}
]
}, {
component: "maintenanceOperations/smart/manage/index.vue",
},
],
},
{
title: "边坡光伏",
name: "photovoltaic",
path: "/maintain/photovoltaic",
component: "developing.vue"
}
]
component: "developing.vue",
},
],
},
{
title: "公众服务",
@ -225,10 +228,10 @@ export default [
title: "信息发布管理",
name: "InformationReleaseManagement",
path: "/service/InformationReleaseManagement",
component: "service/InformationReleaseManagement/index.vue"
},
{
title: "公众服务统计",
component: "service/InformationReleaseManagement/index.vue",
},
{
title: "公众服务统计",
name: "publicService",
path: "/service/publicService",
component: "service/publicService/index.vue",
@ -271,8 +274,8 @@ export default [
name: "roadNet",
path: "/datav/roadNet",
component: "datav/roadNet/index.vue",
hide:true
}
hide: true,
},
],
},
{

16
ruoyi-ui/src/router/index.js

@ -90,6 +90,20 @@ const constantRoutes = [
}
]
},
{
path: '/control//event',
component: Layout,
hidden: true,
redirect: 'noredirect',
children: [
{
path: 'commandDispatch',
component: () => import('@/views/JiHeExpressway/pages/control/event/commandDispatch/index'),
name: 'commandDispatch',
meta: { title: '指挥调度', icon: 'user' }
}
]
},
// {
// path: '/system/user-auth',
// component: Layout,
@ -223,4 +237,4 @@ const constantRoutes = [
]
export { constantRoutes };
export { constantRoutes };

11
ruoyi-ui/src/store/modules/menu.js

@ -3,7 +3,7 @@ const state = {
recentPages: [],
isRecentOpen:"",
}
const mutations = {
saveRecent(state){
localStorage.setItem("recentPages", JSON.stringify(state.recentPages));
@ -25,8 +25,11 @@ const state = {
if (!temp){
item.active = true;
state.recentPages.push(item);
} else {
let i = state.recentPages.findIndex(unit => unit.path == item.path);
item.isPinned = state.recentPages[i].isPinned
state.recentPages[i] = item;
}
mutations.saveRecent(state);
},
@ -65,7 +68,7 @@ const state = {
}
}
const getters = {
isRecentOpen(state){
if (state.isRecentOpen === ""){
@ -80,4 +83,4 @@ const getters = {
state,
getters,
mutations,
}
}

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

@ -105,7 +105,6 @@ export default {
},
methods: {
close() {
console.log("------");
this.modelVisible = false;
},
updateDialogVisible(bool) {

14
ruoyi-ui/src/views/JiHeExpressway/components/HeaderMenu/CustomMenu.vue

@ -1,32 +1,32 @@
<template>
<el-menu :default-active="activeIndex" mode="horizontal" @select="handleSelect" class="menuBox">
<template v-for="(item, index) in menuData">
<component :index="prefix + '_' + index" v-if="item.children" is="el-submenu" class="menuItem" :class="{ 'menuActive': activeIndex.includes(prefix + '_' + index) }">
<component :index="prefix + '_' + index" v-if="item.children" is="el-submenu" class="menuItem" :class="{ 'menuActive': activeIndex && activeIndex.includes(prefix + '_' + index) }">
<template slot="title">{{ item.title }}</template>
<!-- 第二层菜单 -->
<template v-for="(item1, index1) in item.children">
<component :index="prefix + '_' + index + '-' + index1" v-if="item1.children" is="el-submenu" :class="{ 'menuActive': activeIndex.includes(prefix + '_' + index + '-' + index1) }">
<component :index="prefix + '_' + index + '-' + index1" v-if="item1.children" is="el-submenu" :class="{ 'menuActive': activeIndex && activeIndex.includes(prefix + '_' + index + '-' + index1) }">
<template slot="title">
<p index="1">{{ item1.title }}</p>
</template>
<!-- 第三层菜单 -->
<template v-for="(item2, index2) in item1.children">
<component :index="prefix + '_' + index + '-' + index1 + '-' + index2" is="el-menu-item" :class="{ 'menuActive': activeIndex.includes(prefix + '_' + index + '-' + index1 + '-' + index2) }">{{
<component :index="prefix + '_' + index + '-' + index1 + '-' + index2" is="el-menu-item" :class="{ 'menuActive': activeIndex && activeIndex.includes(prefix + '_' + index + '-' + index1 + '-' + index2) }">{{
item2.title }}
</component>
</template>
</component>
<component :index="prefix + '_' + index + '-' + index1" v-else is="el-menu-item" :class="{ 'menuActive': activeIndex.includes(prefix + '_' + index + '-' + index1) }">{{ item1.title
<component :index="prefix + '_' + index + '-' + index1" v-else is="el-menu-item" :class="{ 'menuActive': activeIndex && activeIndex.includes(prefix + '_' + index + '-' + index1) }">{{ item1.title
}}
</component>
</template>
</component>
<component :index="prefix + '_' + index" v-else is="el-menu-item" class="menuItem"
:class="{ 'menuActive': activeIndex.includes(prefix + '_' + index) }">{{
:class="{ 'menuActive': activeIndex && activeIndex.includes(prefix + '_' + index) }">{{
item.title }}
</component>
</template>
@ -86,7 +86,7 @@ export default {
}
// this.$emit("onChange", node, key);
this.$route.path != node.path && this.$router.push(node.path);
}
}
@ -134,7 +134,7 @@ export default {
::v-deep .el-icon-arrow-down {
display: none !important;
}
::v-deep .el-submenu__title{
@include btnClass;
}

31
ruoyi-ui/src/views/JiHeExpressway/components/RecentPages/index.vue

@ -97,7 +97,8 @@ export default{
handler(newV){
this.addRecent({
title : newV.meta.title,
path : newV.path
path : newV.path,
query : newV.query
});
},
immediate : true
@ -108,7 +109,17 @@ export default{
methods:{
...mapMutations("menu", ["addRecent", "removeRecent","pinRecent"]),
onClickItem(item){
this.$route.path != item.path && this.$router.push(item.path);
if (this.$route.path != item.path){
if (Object.keys(item.query).length > 0){
this.$router.push({
path: item.path,
query: item.query
});
} else {
this.$router.push(item.path);
}
}
},
onPin(item){
this.pinRecent(item);
@ -117,7 +128,15 @@ export default{
this.removeRecent(item);
if(this.$route.path == item.path){
if(this.recentPages.length){
this.$router.push(this.recentPages[this.recentPages.length-1].path)
let route = this.recentPages[this.recentPages.length-1]
if (Object.keys(route.query).length > 0){
this.$router.push({
path: route.path,
query: route.query
});
} else {
this.$router.push(route.path);
}
}else{
this.$router.push("/")
}
@ -201,7 +220,7 @@ export default{
}
</script>
<style lang="scss" scoped>
.recent_pages{
.recent_pages{
display: flex; flex-direction: row; align-items:stretch; padding: 0 20px;
h4{ width: 110px; height: 32px; line-height: 32px; text-align: center; margin: 0; padding: 0; font-weight: bold; color: #3de8ff; display: flex; align-items: center; justify-content: center;
.iconfont{ margin-right: 3px;}
@ -222,7 +241,7 @@ export default{
position: relative;
height: 30px;
padding: 0 3px;
.btn_main {
cursor: pointer;
background-image: linear-gradient(180deg, #005c79 0%, #009bcc 100%);
@ -266,4 +285,4 @@ export default{
}
}
}
</style>
</style>

35
ruoyi-ui/src/views/JiHeExpressway/components/TimeLine/TimeLine2/DescCard.vue

@ -6,12 +6,30 @@
<span class="name">{{ data.name }}</span>
<span class="posts">{{ data.posts }}</span>
</div>
<div class="desc" v-if="data.processId">节点{{ data.processName }}</div>
<img
v-if="
data.type == 'bmp' ||
data.type == 'jpg' ||
data.type == 'jpeg' ||
data.type == 'png'
"
:src="data.url"
/>
{{ data.url }}
<video
v-if="data.type == 'mp4' || data.type == 'avi' || data.type == 'xmvb'"
:src="data.url"
>
<!-- <source :src="data.desc" /> -->
</video>
<!-- <div class="desc">{{ data.desc }}</div> -->
<div class="desc" v-html="data.desc" />
<div v-if="data.type == 'text'" class="desc" v-html="data.desc" />
</div>
</template>
<script>
import Video from "@screen/components/VideoMulti";
export default {
name: "DescCard",
props: {
@ -20,6 +38,21 @@ export default {
default: () => ({}),
},
},
watch: {
"data.type": {
handler(newValue, oldValue) {
if (newValue != "text") {
this.data.url = process.env.VUE_APP_BASE_API + this.data.desc;
console.log("this.data.url", this.data.url);
}
},
deep: true,
immediate: true,
},
},
components: {
Video,
},
};
</script>

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

@ -151,24 +151,46 @@ export default {
if (!this.checkList.length)
return Message.error("请至少选择一个广播设备!");
const devices = [];
const functions = [];
for(let i of this.checkList){
const d = _.find(this.musicList,{otherConfig:i})
devices.push({
"id": d.id,
"iotDeviceId": d.iotDeviceId,
"deviceType": d.deviceType
})
functions.push({
"functionId": "A1",
"params": {
"name": "task-3",
"outVol": "" + this.dataForm.outVol,
"priority": "" + this.dataForm.priority,
"text": this.dataForm.content.trim(),
"repeatTimes": "" + this.dataForm.repeatTimes,
"termList": [
{
...JSON.parse(i)
}
],
"functionType": "startPaTts"
}
})
}
this.submitting = true;
request({
url: `/broadcast/broadcastFunctionCall`,
url: `/business/device/batchFunctions`,
method: "post",
data: {
name: "task-3",
outVol: "" + this.dataForm.outVol,
priority: "" + this.dataForm.priority,
text: this.dataForm.content.trim(),
repeatTimes: "" + this.dataForm.repeatTimes,
termList: this.checkList.map((str) => JSON.parse(str)),
functionType: "startPaTts",
devices,functions
},
})
.then((data) => {
// console.log(data);
if (data.retCode == "0") {
if (data.code == "200") {
Message.success("广播设置成功!");
this.modelVisible = false;
} else {

262
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/ConfluenceArea/components/DeviceControlDialog.vue

@ -0,0 +1,262 @@
<template>
<Dialog v-model="modelVisible" title="设备操作" width="600px">
<div class="DeviceControlDialog">
<div style="height: 500px;overflow-y:auto;">
<Form
column="2"
v-if="formList && formList.length"
class="form"
ref="FormConfigRef"
label-width='150px'
:formList="formList"
:value="formData"
/>
</div>
</div>
<template #footer>
<Button @click.native="handleSubmit"> 发送 </Button>
</template>
</Dialog>
</template>
<script>
import Button from "@screen/components/Buttons/Button.vue";
import Dialog from "@screen/components/Dialog/index.vue";
import request from "@/utils/request";
import { Message } from 'element-ui'
import Form from "@screen/components/FormConfig";
export default {
name: "DeviceControlDialog",
components: {
Dialog,
Form,
Button
},
model: {
prop: "visible",
event: "update:value",
},
props: {
rebind: {
type: Function,
default: null
},
visible: Boolean,
dialogData: {
type: Object,
default: () => ({}),
},
},
computed: {
modelVisible: {
get() {
return this.visible;
},
set(val) {
this.$emit("update:value", val);
},
},
},
data(){
return {
enum_color:[
{label:"红色",value:"1"},
{label:"黄色",value:"2"},
{label:"绿色",value:"3"},
],
enum_normalTextSetting:[
{label:"常态文字持续显示",value:"0"},
{label:"触发显示常态文字",value:"1"},
],
enum_wordCycle:[
{label:"1:1常亮",value:"1"},
{label:"1:2",value:"2"},
{label:"1:3",value:"3"},
{label:"1:4",value:"4"},
{label:"2:4",value:"5"},
{label:"3:4",value:"6"},
{label:"4:5",value:"7"}
],
enum_wordFlicker:[
{label:"20次/min",value:"1"},
{label:"30次/min",value:"2"},
{label:"60次/min",value:"3"},
{label:"120次/min",value:"4"},
{label:"45次/min",value:"5"},
],
formList:[],
formData: {},
list: [
"activeDevice",
"screenLuminance",
"volume",
"colour",
"wordFlickerFrequency",
"wordDutyCycle",
"normalTextContent",
"triggerTextContent",
"triggerTextDuration",
"normalTextSetting",
"vehicleDetectionSensitivity",
"averageData",
"timeQuantum",
"firstTimePeriodStartTTime",
"firstTimePeriodEndTime",
"firstTimePeriodRedAndBlueFlash",
"firstTimePeriodScreenSwitch",
"firstTimePeriodWhetherToReport",
"firstTimePeriodHornSwitch",
"secondTimePeriodStartTTime",
"secondTimePeriodEndTime",
"secondTimePeriodRedAndBlueFlash",
"secondTimePeriodScreenSwitch",
"secondTimePeriodWhetherToReport",
"secondTimePeriodHornSwitch",
"thirdlyTimePeriodStartTTime",
"thirdlyTimePeriodEndTime",
"thirdlyTimePeriodRedAndBlueFlash",
"thirdlyTimePeriodScreenSwitch",
"thirdlyTimePeriodWhetherToReport",
"thirdlyTimePeriodHornSwitch"
]
}
},
methods:{
handleSubmit(){
const self = this;
this.$refs.FormConfigRef.validate().then((data) => {
data.numberOfDevices = this.dialogData.iotDeviceId.substr(this.dialogData.iotDeviceId.lastIndexOf('-')+1)
request({
url: `/business/device/functions/${self.dialogData.iotDeviceId}/0b`,
method: "POST",
data: data
})
.then(result => {
if (result.code != 200) {
Message.error("操作失败");
self.rebind()
self.modelVisible = false
return;
};
Message.success("操作成功");
})
.catch(() => {
Message.error("操作失败");
})
})
}
},
async created() {
request({
url: `/business/device/properties/latest/${this.dialogData.iotDeviceId}`,
method: "get",
}).then(result => {
if (result.code != 200) return Message.error("操作失败");
let pv = "";
result.data.forEach(x=>{
pv += `${x.propertyName},${x.type},${x.property}.`
})
let _formList = [];
this.list.forEach(e => {
const p = _.find(result.data,{property:e})
if(p) {
if(p.type === 'string' || p.type === 'long'){
_formList.push( {
label: p.propertyName+':',
key: p.property,
})
} else if(p.type === 'enum' ){
if(p.property.indexOf('PeriodHornSwitch') !== -1 ||
p.property.indexOf('PeriodRedAndBlueFlash') !== -1 ||
p.property.indexOf('PeriodWhetherToReport') !== -1 ||
p.property.indexOf('TimePeriodScreenSwitch') !== -1 ){ // |
_formList.push({
label: p.propertyName+':',
key: p.property,
type: "RadioGroup",
options: {
activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)",
options: [
{
key: "0",
label: "关闭",
},
{
key: "1",
label: "开启",
},
],
},
})
} else if(p.property === 'wordFlickerFrequency'){
_formList.push({
label: p.propertyName+':',
key: p.property,
type: "select",
default: null,
options: {
options: this.enum_wordFlicker
}
})
}else if(p.property==="colour"){
_formList.push({
label: p.propertyName+':',
key: p.property,
type: "select",
default: null,
options: {
options: this.enum_color
}
})
}else if(p.property==="wordDutyCycle"){
_formList.push({
label: p.propertyName+':',
key: p.property,
type: "select",
default: null,
options: {
options: this.enum_wordCycle
}
})
}else if(p.property==="normalTextSetting"){
_formList.push({
label: p.propertyName+':',
key: p.property,
type: "select",
default: null,
options: {
options: this.enum_normalTextSetting
}
})
}
}
this.formData[p.property] = p.value
}
})
this.formList = _formList;
})
}
};
</script>
<style lang="scss" scoped>
.DeviceControlDialog {
width: 550px;
display: flex;
flex-direction: column;
gap: 15px;
min-height: 360px;
.tips {
font-size: 12px;
}
}
</style>

126
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/ConfluenceArea/components/DeviceParams.vue

@ -0,0 +1,126 @@
<template>
<div class='DeviceParams'>
<div class="no-data" v-if="!devicesList.length" v-loading="secondLoading">暂无设备参数</div>
<Descriptions :list="devicesList" :data="devicesData" style="gap: 18px;" column="6">
<template v-for="item in devicesList.slice(0, -1)" #[`content-${getSlotKey(item.key)}`]="{ data }">
<span>{{ data.text }}</span>
</template>
</Descriptions>
</div>
</template>
<script>
import Descriptions from '@screen/components/Descriptions.vue';
import Switcher from '@screen/pages/service/PublishingChannelManagement/components/Switcher.vue';
import request from "@/utils/request";
import { Message } from 'element-ui';
import { confirm } from "@screen/utils/common";
import { devicesFormList } from '../data.js';
export default {
name: 'DeviceParams',
components: {
Descriptions,
Switcher
},
props: {
dialogData: {
type: Object,
default: () => ({})
},
disabled: Boolean
},
data() {
return {
secondLoading: true,
devicesList: [],
devicesData: {},
activeOption: {
active: {
text: "开"
},
unActive: {
text: "关"
}
}
}
},
async created() {
this.bind();
},
methods: {
bind(){
this.devicesList = [];
let devs = [];
request({
url: `/business/device/properties/latest/${this.dialogData.iotDeviceId}`,
method: "get",
}).then(result => {
if (result.code != 200) return Message.error("操作失败");
result.data.forEach(item => {
if (item.propertyName) {
devs.push({
label: item.propertyName,
key: item.property,
gridColumn: 3,
});
this.devicesData[item.property] = item.formatValue;
}
});
this.devicesList = devs;
})
},
async handleSwitcherChange(value, data) {
let str = data.state ? "关闭" : "开启";
let deviceName = "";
if (data.key.includes("fan")) {
str += "风扇?";
deviceName = "fan_out_en";
} else {
str += "该支路?"
deviceName = data.key.match(/^[a-z]+_out|[0-9]+/g).join("_") + "_en"; //dc_out_2_en ac_out_2_en;
}
data.state = value;
const isContinue = await confirm({ message: `${str}` })
.catch(() => {
console.log(data.state, value, 333)
data.state = !value;
});
if (!isContinue) return;
// https://www.yuque.com/dayuanzhong-ovjwn/gkht0m/ww776d5kzs72ilzh?singleDoc=
request({
url: `/business/device/functions/${this.dialogData.iotDeviceId}/${102}`,
method: "POST",
data: {
deviceName,
// 1=0=
value: value ? 1 : 0
}
})
.then(result => {
if (result.code != 200) {
Message.error("操作失败");
data.state = !value;
return;
};
Message.success("操作成功");
})
.catch(() => {
data.state = !value;
Message.error("操作失败");
})
},
getSlotKey(key) {
return key.includes('electricity') || key.includes('fan') ? key : ''
}
}
}
</script>
<style lang='scss' scoped>
.DeviceParams {
height: 100%;
}
</style>

44
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/ConfluenceArea/data.js

@ -0,0 +1,44 @@
export const devicesFormList = [
{
label: "设备内温度过高",
key: `theInternalTemperatureOfTheDeviceOverheats`,
// text: "-",
gridColumn: 2,
},
{
label: "阵列电压",
key: `arrayVoltage`,
// text: "-",
gridColumn: 2,
},
{
label: "阵列电流",
key: `arrayCurrent`,
// text: "-",
gridColumn: 2,
},
{
label: "发电功率L",
key: `generatingPowerL`,
text: "-",
gridColumn: 2,
},
{
label: "发电功率H",
key: `generatingPowerH`,
text: "-",
gridColumn: 2,
},
{
label: "负载电压",
key: `loadVoltage`,
text: "-",
gridColumn: 2,
},
{
label: "负载电流",
key: `loadCurrent`,
text: "-",
gridColumn: 2,
},
];

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

@ -0,0 +1,188 @@
<template>
<Dialog v-model="obverseVisible" title="合流区预警" width="550px">
<Video class="video-stream" :pileNum="dialogData.stakeMark" />
<div class="confluencearea">
<ElTabs v-model="activeName" class="tabs">
<ElTabPane label="基本信息" name="first">
<Descriptions :list="list" :data="data" style="gap: 18px" />
</ElTabPane>
<ElTabPane label="设备参数" name="second">
<DeviceParams ref="refParam" disabled :dialogData="dialogData" />
</ElTabPane>
<ElTabPane label="在线率统计" name="third">
<LineChart v-if="activeName === 'third'" :productId="dialogData.id" style="height: 180px" />
</ElTabPane>
</ElTabs>
</div>
<template #footer>
<Button v-if="activeName != 'first' && data.deviceState == '1'" @click.native="deviceControlVisible = true">
设备操作
</Button>
</template>
<DeviceControlDialog :rebind="rebind" v-model="deviceControlVisible" :dialogData="dialogData" />
</Dialog>
</template>
<script>
import Dialog from "@screen/components/Dialog/index.vue";
import Button from "@screen/components/Buttons/Button.vue";
import Descriptions from "@screen/components/Descriptions.vue";
import Video from "@screen/components/Video";
import LineChart from "../../LineChart/index.vue";
import DeviceParams from "./components/DeviceParams.vue";
import DeviceControlDialog from "./components/DeviceControlDialog.vue";
import request from "@/utils/request";
import {
getRoadInfoByStakeMark,
getProduct,
} from "@screen/pages/Home/components/RoadAndEvents/utils/httpList.js";
import { dialogDelayVisible } from "./../mixin";
import { resolve } from "@antv/x6/lib/registry/node-anchor/util";
//
export default {
name: "ConfluenceArea",
mixins: [dialogDelayVisible],
components: {
Dialog,
Descriptions,
LineChart,
Video,
Button,
DeviceParams,
DeviceControlDialog
},
data() {
return {
refParam:null,
activeName: "first",
releaseVisible: false,
deviceControlVisible: false,
data: {
deviceName: "LH24",
roadName: "G35济泽高速",
stakeMark: "k094+079",
direction: "1",
organizationName: "山东高速济南发展公司",
brand: "XXX厂家",
deviceState: "0",
},
list: [
{
label: "设备名称",
key: "deviceName",
},
{
label: "设备桩号",
key: "stakeMark",
},
{
label: "道路名称",
key: "roadName",
},
{
label: "设备方向",
key: "direction",
enum: "CameraDirectionEnum",
},
{
label: "设备状态",
key: "deviceState",
enum: "DeviceTypeEnum",
// visible: false,
},
{
label: "设备厂商",
key: "manufacturer",
},
],
};
},
async created() {
this.data = {
...this.dialogData,
roadName: null,
};
//
getProduct(this.dialogData.productId).then((data) => {
this.dialogData.brand = data.brand;
});
const roadInfo = await getRoadInfoByStakeMark(this.dialogData.stakeMark);
if (roadInfo) this.data.roadName = roadInfo.roadName;
},
methods: {
rebind(){
this.$refs.refParam.bind()
},
async getDeviceInfo() {
return request({
url: `/business/device/properties/latest/${this.dialogData.iotDeviceId || "10.0.36.143-1883"
}/3`,
method: "get",
params: {},
});
},
},
};
</script>
<style lang="scss">
div.switcher {
font-size: 12px;
padding: 2px;
}
</style>
<style lang="scss" scoped>
.confluencearea {
width: 508px;
// height: 248px;
color: #fff;
display: flex;
flex-direction: column;
::v-deep {
.el-tabs__content {
overflow-y: auto;
max-height: 220px;
}
}
.camera-video {
flex: 1.5;
}
.tabs {
flex: 1;
display: flex;
flex-direction: column;
::v-deep {
.el-tabs__content {
flex: 1;
.el-tab-pane {
height: 100%;
}
}
}
}
.bottom {
margin-top: 12px;
display: flex;
gap: 9px;
align-items: center;
justify-content: end;
>div {
font-size: 16px;
padding: 6px 12px;
}
}
}
</style>../mixin../mixin../mixin

8
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/MeteorologicalDetection/components/DeviceControlDialog.vue

@ -102,14 +102,14 @@ export default {
let times = [], datas = [];
qsData.rows.forEach(item => {
if (lastPath == 'deviceHour') {
times.push(item.timeSlot);
times.push(item.date);
} else if (lastPath == 'deviceDay') {
times.push(new Date(item.date).format('dd'));
} else if (lastPath == 'deviceYears') {
times.push(new Date(item.month).format('MM'));
}
datas.push(this.btnType == 1 ? item.avgTemperature : item.avgVisibility)
datas.push(this.btnType == 1 ? item.temperature : item.visibility)
})
// console.log('datas',datas)
@ -121,8 +121,8 @@ export default {
lineChartOption.xAxis.name = '月'
}
lineChartOption.xAxis.data = times;
lineChartOption.yAxis.name = this.btnType == 1 ? '℃' : '米';
lineChartOption.series[0].name = this.btnType == 1 ? '温度(℃)' : '能见度(米)'
lineChartOption.yAxis.name = this.btnType == 1 ? '℃' : '米';
lineChartOption.series[0].name = this.btnType == 1 ? '温度(℃)' : '能见度(米)'
lineChartOption.series[0].data = datas;
const chartIns = echarts.init(this.$refs.LineChartRef);

4
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/RemoteMachine/components/DeviceParams.vue

@ -65,7 +65,7 @@ export default {
for (const key in deviceInfo.formatValue) {
// electricity
// voltage
if (key.includes('electricity')) {
if (key.includes('voltage')) {
const args = key.match(/[a-z]+|[0-9]+$/g);
const type = args[0], num = args.slice(-1)[0], prefix = args.slice(0, 2).join('_');
@ -80,7 +80,7 @@ export default {
{
label: '电流',
key: `${prefix}_electricity_${num}`,
text: deviceInfo.formatValue[key],
text: deviceInfo.formatValue[`${prefix}_electricity_${num}`],
gridColumn: 2,
state: deviceInfo.value[key] > 0
}

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

@ -65,7 +65,7 @@ export default {
for (const key in deviceInfo.formatValue) {
// electricity
// voltage
if (key.includes('electricity')) {
if (key.includes('voltage')) {
const args = key.match(/[a-z]+|[0-9]+$/g);
const type = args[0], num = args.slice(-1)[0], prefix = args.slice(0, 2).join('_');
@ -80,7 +80,7 @@ export default {
{
label: '电流',
key: `${prefix}_electricity_${num}`,
text: deviceInfo.formatValue[key],
text: deviceInfo.formatValue[`${prefix}_electricity_${num}`],
gridColumn: 2,
state: deviceInfo.value[key] > 0
}

11
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/mixin.js

@ -25,10 +25,13 @@ export const dialogDelayVisible = {
computed: {
obverseVisible: {
set(bool) {
try {
typeof this.visibleClose === "function" && this.visibleClose?.(bool);
} catch (error) {}
if(this.visibleClose){
try {
typeof this.visibleClose === "function" && this.visibleClose?.(bool);
} catch (error) {}
}
setTimeout(() => {
this.$emit("change", bool);
}, 180);

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

@ -53,6 +53,7 @@ import RoadNetworkFacilities from "./../Dialogs/RoadNetworkFacilities/index.vue"
import SmartDevice from "./../Dialogs/SmartDevice/index.vue";
import RemoteMachine from "./../Dialogs/RemoteMachine/index.vue";
import SolarEnergy from "./../Dialogs/SolarEnergy/index.vue";
import ConfluenceArea from "./../Dialogs/ConfluenceArea/index.vue";
import Intermodulation from "./../Dialogs/Intermodulation/index.vue";
import GuardrailCollision from "./../Dialogs/GuardrailCollision/index.vue";
import MeteorologicalDetection from "./../Dialogs/MeteorologicalDetection/index.vue";
@ -79,7 +80,8 @@ export default {
FatigueWakesUp,
RoadNetworkFacilities,
RemoteMachine,
MeteorologicalDetection
MeteorologicalDetection,
ConfluenceArea
},
data() {
return {
@ -246,7 +248,7 @@ export default {
const key = getHandleDeviceType(item) || `${this.active}/${item.title}`;
const status = item.status;
console.log(item.status,'------------')
if (!status) { //
this.nowSelected = item.title;
this.nowSelectedCompleted = false;
@ -479,4 +481,4 @@ export default {
}
}
}
</style>
</style>../Dialogs/ConfluenceArea/index.vue

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

@ -57,6 +57,7 @@ export const DeviceForMap = {
},
合流区: {
deviceType: "8",
dialog:"ConfluenceArea",
},
护栏碰撞: {
deviceType: "6",

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

@ -4,10 +4,11 @@
<el-col :span="7">
<!-- 设备类型 -->
<el-select v-model="tableInfo.deviceType" placeholder="" @change="changeDeviceType" transfer="true"
:popper-append-to-body="false" style="width: 123px;">
style="width: 123px;">
<el-option v-for="item in deviceOptions" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</el-col>
<el-col :span="1">
</el-col>
@ -302,9 +303,7 @@ export default {
watch: {
'tableInfo.deviceType': {
async handler(newValue) {
console.log('aaaaaaaaaaaaaaaaaa', newValue)
await this.loadData(newValue);
console.log('bbbbbbbbbbb', this.sbOptions)
},
immediate: true,
}

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

@ -1,15 +1,28 @@
<template>
<Card class='DeviceControl' title="设备管控">
<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"></ScopeTable>
<ScopeTable
:tableInfo="item"
:index="index"
@onAdd="onAdd"
@onDel="onDel"
></ScopeTable>
</el-row>
</div>
<div class="foot">
<ButtonGradient class="special-button" style="background: rgb(229, 68, 73);" @click.native="handleSubmit(1)">
<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
class="special-button"
style="background: rgb(250, 152, 56)"
@click.native="handleSubmit(2)"
>
一键恢复
</ButtonGradient>
</div>
@ -17,50 +30,48 @@
</template>
<script>
import Card from "@screen/components/Card2/Card.vue";;
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 { provideMixin } from "./../../mixin";
import { defaultTableInfo } from "./data";
import { Message } from 'element-ui'
import { Message } from "element-ui";
import request from "@/utils/request";
export default {
name: 'DeviceControl',
name: "DeviceControl",
mixins: [provideMixin],
components: {
Card,
ScopeTable,
ButtonGradient
ButtonGradient,
},
data() {
return {
planId: '',
tableData: []
}
},
watch: {
},
mounted() {
planId: "",
tableData: [],
};
},
watch: {},
mounted() {},
methods: {
detailChange(eventId) {
this.initData(this.detailData);
},
initData(eventInfo) {
console.log('eventInfo', eventInfo)
console.log("eventInfo", eventInfo);
request({
url: `business/plans/list/event/type`,
method: "post",
data: { ...eventInfo }
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('该事件暂无处置预案')
};
return Message.warning("该事件暂无处置预案");
}
let dcExecuteAction = data[0].dcExecuteAction || [];
this.planId = data[0].id;
@ -70,23 +81,22 @@ export default {
let action = { ...it };
if (it.executeConfig) {
let executeConfig = JSON.parse(it.executeConfig);
let execute = this.mapKeys(executeConfig, 'zx_');
let execute = this.mapKeys(executeConfig, "zx_");
action = { ...action, ...execute };
}
if (it.recoverConfig) {
let recoverConfig = JSON.parse(it.recoverConfig);
let recover = this.mapKeys(recoverConfig, 'hf_');
let recover = this.mapKeys(recoverConfig, "hf_");
action = { ...action, ...recover };
}
if (it.deviceList) {
action.devList = it.deviceList
.split(",")
.map((str) => str);
action.devList = it.deviceList.split(",").map((str) => str);
}
dcArr.push(action);
});
this.tableData = dcArr.length == 0 ? [{ ...defaultTableInfo }] : dcArr;
this.tableData =
dcArr.length == 0 ? [{ ...defaultTableInfo }] : dcArr;
console.log("tableData", this.tableData);
})
@ -102,27 +112,28 @@ export default {
}, {});
},
onAdd() {
this.tableData.push({ ...defaultTableInfo })
this.tableData.push({ ...defaultTableInfo });
},
onDel(index) {
if (this.tableData.length <= 1) {
return Message.warning('最后一项不可删除!');
return Message.warning("最后一项不可删除!");
}
this.tableData.splice(index, 1)
this.tableData.splice(index, 1);
},
handleSubmit(value = 1) {
let dcArr = [];
this.tableData.forEach(item => {
this.tableData.forEach((item) => {
let dcData = {
deviceType: item.deviceType,
searchRule: item.searchRule,
number: item.number
}
number: item.number,
};
if (item.devList && item.devList.length > 0) {
dcData.deviceList = item.devList.join(",");
}
let zxData = {}, hfData = {};
Object.keys(item).forEach(key => {
let zxData = {},
hfData = {};
Object.keys(item).forEach((key) => {
if (/^zx_/.test(key)) {
let keyName = key.substring(3);
zxData[keyName] = item[key];
@ -131,7 +142,7 @@ export default {
let keyName = key.substring(3);
hfData[keyName] = item[key];
}
})
});
if (item.deviceType == 12) {
zxData = this.formatData(zxData);
hfData = this.formatData(hfData);
@ -140,19 +151,19 @@ export default {
dcData.recoverConfig = JSON.stringify(hfData);
dcArr.push(dcData);
})
});
let reqData = {
operationType: value, //1- 2-
dcEmergencyPlans: {
id: this.planId,
dcExecuteAction: dcArr
dcExecuteAction: dcArr,
},
dcEvent: {
id: this.detailData.id,
eventType: this.detailData.eventType,
stakeMark: this.detailData.stakeMark,
direction: this.detailData.direction == "菏泽方向" ? '1': '3',
direction: this.detailData.direction == "菏泽方向" ? "1" : "3",
},
};
console.log("reqData", reqData);
@ -169,14 +180,13 @@ export default {
})
.catch(() => {
Message.error("提交失败");
})
});
},
},
}
};
</script>
<style lang='scss' scoped>
<style lang="scss" scoped>
.DeviceControl {
::v-deep {
.content {
@ -186,7 +196,8 @@ export default {
}
.container {
height: 500px;
flex: 1;
min-height: 300px;
overflow-y: auto;
.rowBlock {
@ -194,18 +205,15 @@ export default {
padding: 5px 10px;
margin-bottom: 10px;
}
}
.foot {
display: flex;
height: "100px";
justify-content: space-evenly;
margin-top: 10px;
.special-button {
width: 100px;
.icon {
background-repeat: no-repeat;
background-size: 100% 100%;
@ -215,6 +223,5 @@ export default {
}
}
}
}
</style>
</style>

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

@ -222,6 +222,15 @@ export default {
background: #1b586d;
color: #fff;
}
::v-deep .el-table td.el-table__cell div {
line-height: 30px;
}
::v-deep .el-checkbox-group {
text-align: left;
.el-checkbox {
min-width: 70px;
}
}
::v-deep .el-table tr {
border: 1px solid #07aec6;

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

@ -18,7 +18,10 @@
</div>
<div class="dispatch-item">
<span class="label">值班领导</span>
<div class="value">
<div
class="value"
v-if="dispatchData.shifts && dispatchData.shifts.length > 0"
>
<div v-for="item in dispatchData.shifts" class="value-item">
<span class="shiftsName">{{ item.shiftsName }}</span>
<span class="shiftsNumber">{{ item.shiftsNumber }}</span>
@ -27,24 +30,27 @@
> -->
</div>
</div>
<div class="value" v-else>-</div>
</div>
<div class="dispatch-item">
<span class="label">路管人员</span>
<div class="value">
<div class="value" v-if="staff && staff.length > 0">
<div v-for="item in staff" class="value-item">
<span class="shiftsName">{{ item.resourceName }}</span>
<span class="shiftsNumber">{{ item.resourceValue }}</span>
</div>
</div>
<div class="value" v-else>-</div>
</div>
<div class="dispatch-item">
<span class="label">救援车辆</span>
<div class="value">
<div class="value" v-if="vehicle && vehicle.length > 0">
<div v-for="item in vehicle" class="value-item">
<span class="shiftsName">{{ item.resourceValue }}</span>
<span class="shiftsNumber">{{ item.vehicleText }}</span>
</div>
</div>
<div class="value" v-else>-</div>
</div>
</div>
<StatsDialogVisible
@ -81,7 +87,7 @@ export default {
data() {
return {
provideDetail: null,
dispatchData: [],
dispatchData: {},
dispatchList: [],
vehicleTypeList: [],
staff: [],
@ -124,16 +130,20 @@ export default {
}
});
this.dispatchList = res.data.listData;
this.dispatchData = res.data.resource;
console.log("调度联络返回============", res.data);
this.dispatchData = res.data.resource ? res.data.resource : {};
this.staff = [];
this.vehicle = [];
res.data.resource.resource.forEach((element) => {
if (element.dispatchType == 1) {
this.staff.push(element);
} else {
this.vehicle.push(element);
}
});
if (res.data && res.data.resource && res.data.resource.resource) {
res.data.resource.resource.forEach((element) => {
if (element.dispatchType == 1) {
this.staff.push(element);
} else {
this.vehicle.push(element);
}
});
}
this.vehicleTypeList.forEach((i) => {
this.vehicle.forEach((item) => {
if (item.resourceName == i.dictValue) {
@ -193,7 +203,7 @@ export default {
color: #38d2e7;
}
.value {
width: 85%;
width: 80%;
font-size: 13px;
color: #fff;
display: flex;

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

@ -226,7 +226,7 @@
<Button
v-if="type != 3"
style="background: #39d5bf"
@click.native="handleInitData(2)"
@click.native="handleInitData(2, 1)"
>重新生成</Button
>
<Button style="background: #3de8ff" @click.native="handlePreview"
@ -652,9 +652,10 @@ export default {
};
},
watch: {
async "provideData.detail"(newValue, oldValue) {
"provideData.detail"(newValue, oldValue) {
this.provideDetail = newValue;
this.eventId = newValue.id;
console.log("+++++++++++++++");
this.initData();
this.getReportData();
this.getImportantFileStatus();
@ -828,6 +829,7 @@ export default {
},
//
getImportantFileStatus() {
console.log("getImportantFileStatus");
importantFileStatus(this.eventId).then((res) => {
this.type = res.data;
this.$emit("update:type", this.type);
@ -840,6 +842,7 @@ export default {
deventImportantFileList(this.eventId, type).then((res) => {
if (res.length > 0) {
this.formFileData = res[0];
console.log(789, res);
if (type == "1" || type == "2") {
this.renewedList = res;
}
@ -849,13 +852,13 @@ export default {
});
},
//
handleInitData(type) {
handleInitData(type, source) {
let data = new FormData();
data.append("eventId", this.eventId);
data.append("type", type);
getEventImportantFile(data).then((res) => {
this.formFileData = res.data;
if (type == "2") {
if (type == "2" && source == "1") {
this.newType = 1;
this.renewedList.push(res.data);
this.pageNum = this.renewedList.length;

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

@ -13,7 +13,9 @@
<ButtonGradient
v-if="
detailData.eventState != 2 &&
(detailData.eventType == 2 || detailData.eventType == 6)
(detailData.eventType == 1 ||
detailData.eventType == 2 ||
detailData.eventType == 6)
"
class="title-button"
@click="handleNoWrecker"
@ -22,7 +24,10 @@
无需清障
</ButtonGradient>
<ButtonGradient
v-if="detailData.eventState != 2 && detailData.eventType == 4"
v-if="
detailData.eventState != 2 &&
(detailData.eventType == 1 || detailData.eventType == 4)
"
class="title-button"
@click="handleClick"
>
@ -99,7 +104,7 @@
:on-error="handleUploadError"
accept=".jpg,.jpeg,.png,.mp4"
>
<el-button class="input">点击上传</el-button>
<el-button class="input">{{ imageName }}</el-button>
</el-upload>
<ElSelect
:disabled="detailData.eventState == 2"
@ -185,6 +190,8 @@ export default {
isFullHeight: false,
options: [],
processId: "",
processName: "",
processType: "",
context: "",
text: "",
phrasesOptions: [],
@ -195,14 +202,22 @@ export default {
fileList: [],
fileType: ["bmp", "gif", "jpg", "jpeg", "png", "mp4", "avi", "xmvb"],
imageUrl: "",
imageName: "点击上传",
};
},
watch: {
processId(newVlaue, oldValue) {
this.options.forEach((element) => {
if (newVlaue == element.nodeNode) {
if (element.commonPhrases) {
this.phrasesOptions = element.commonPhrase.split(",");
if (element.commonPhrases != "undefined") {
console.log("element", element, element.commonPhrases);
this.phrasesOptions =
element?.commonPhrases.length > 0
? element?.commonPhrases.split(",")
: [];
console.log("this.phrasesOptions", this.phrasesOptions);
this.processName = element.processNode;
this.processType = 1;
}
}
});
@ -215,7 +230,9 @@ export default {
async "provideData.detail"(newValue, oldValue) {
this.provideDetail = newValue;
this.eventId = newValue.id;
this.getProcess();
await this.disposalRecords(this.eventId);
// console.log("", this.provideDetail);
},
},
@ -267,6 +284,9 @@ export default {
name: item.operatorName,
desc: item.context,
source: item.source,
processId: item.processId,
processName: item.processName,
type: item.type,
// posts: ''
};
});
@ -276,7 +296,8 @@ export default {
//
handleUploadSuccess(res, file) {
this.$message.success("上传成功");
this.imageUrl = res.url;
this.imageName = res.originalFilename;
this.imageUrl = res.fileName;
},
//
@ -290,19 +311,36 @@ export default {
//
onSubmit() {
if (this.context || this.imageUrl) {
let content = "";
if (this.testRadio == "input") {
content = this.context;
} else {
content = this.imageUrl;
}
let type = this.containsArrayElement(this.imageUrl, this.fileType);
let data = {
eventId: this.eventId,
processId: this.processId,
context: this.context,
file: this.imageUrl,
type: type.join(","),
processName: this.processName,
context: content,
// file: this.imageUrl,
type: type ? type.join(",") : "text",
source: 1,
processType: this.processType,
};
postProcess(data).then((result) => {
if (result.code != 200) return [];
this.getProcess();
this.disposalRecords(this.eventId);
this.processId = "";
this.processName = "";
this.testRadio = "input";
this.context = "";
this.imageUrl = "";
this.imageName = "点击上传";
this.fileType = [];
this.text = "";
this.$message.success("发送成功");
});
} else {
this.$message.warning("调度指令不能为空");

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

@ -38,7 +38,7 @@
{{
detailData.eventLevel
? `${
detailData.eventCause +
(detailData.eventCause||'') +
["", "一", "二", "三", "四", "五"][detailData.eventLevel]
}级事件`
: "暂无事件等级"

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

@ -111,7 +111,7 @@ export default {
data: {eventId: this.detailData.id},
})
.then((result) => {
console.log(result,'信息发布:eventPublishChannels')
// console.log(result,'eventPublishChannels')
})
}, 500);

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

@ -23,14 +23,14 @@ const components = files.keys().reduce((components, key) => {
}, {});
const originGridArea = {
EventInformation: "1 / 1 / span 12 / 1", // 1
DispatchLiaison: "13 / 1 / span 8 / 2", // 213 / 1 / span 11 / 2
TrafficControl: "21 / 1 / span 13 / 2", //324 / 1 / span 10 / 2
EventInformation: "1 / 1 / span 11 / 1", // 1
DispatchLiaison: "12 / 1 / span 7 / 2", // 213 / 1 / span 11 / 2
ReleaseInformation: "19 / 1/ span 9 / 2", //3
TrafficControl: "29 / 1 / span 5 / 2", //424 / 1 / span 10 / 2
CrowdnessIndicatorRankings: "1 / 2 / span 12 / 2", // / 1
DisposalProcess: "13 / 2 / span 21 / 2", //2
RealTimeVideo: "1 / 3 / span 9 / 3", //1
ReleaseInformation: "10 / 3 / span 7 / 3", //2
DeviceControl: "17 / 3 / span 17 / 3", //3
DeviceControl: "10 / 3 / span 24 / 3", //3
// DisposalPlan: "17 / 1 / span 9 / 2", //
};
@ -40,10 +40,7 @@ export default {
...components,
},
props: {
// detailId: {
// type: [String, Number],
// default: "162cb8824ea141f3a96a74ad81c22796",
// },
},
provide() {
return {
@ -90,11 +87,13 @@ export default {
) {
const gridArea = { ...originGridArea };
//
gridArea["DispatchLiaison"] = "13 / 1 / span 21 / 2";
delete gridArea.TrafficControl;
gridArea["DispatchLiaison"] = "12 / 1 / span 13 / 2";
gridArea["ReleaseInformation"] = "25 / 1 / span 9 / 2";
delete gridArea.TrafficControl; //424
if (["设备设施隐患", "非法上路"].includes(result.data.eventName)) {
//
gridArea["RealTimeVideo"] = "1 / 3 / span 16 / 3";
gridArea["DispatchLiaison"] = "12 / 1 / span 22 / 2";
delete gridArea.ReleaseInformation;
}

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

@ -1,6 +1,5 @@
<template>
<div class='emergencyProcessManagement'>
<div class="emergencyProcessManagement">
<!-- 搜索栏 -->
<div class="filter">
<div>
@ -16,7 +15,6 @@
</template>
新增
</ButtonGradient> -->
</div>
</div>
@ -28,48 +26,70 @@
<ElTableColumn prop="processConfig" label="处置流程" />
<ElTableColumn label="操作" width="210">
<template slot-scope="scope">
<ElButton type="text" style="color: #00D1FF;" @click="showDisposal(scope.row.eventType)">流程配置</ElButton>
<ElButton type="text" style="color: #00EBC1;" @click="showPhrases(scope.row)">常用语</ElButton>
<!--<ElButton type="text" style="color: #00D1FF;" @click="showDisposal(scope.row.eventType)">流程配置</ElButton>-->
<ElButton
type="text"
style="color: #00ebc1"
@click="showPhrases(scope.row)"
>常用语</ElButton
>
</template>
</ElTableColumn>
</Table>
</div>
<!-- 配置常用户弹窗 -->
<CommonPhrases :visible="isShowPhrases" :eventType="eventType" :process="process" @update:value="onClosePhrases"
@update:phrasesData="onUpdatePhrasesData" @reInitData="initData" />
<CommonPhrases
:visible="isShowPhrases"
:eventType="eventType"
:process="process"
@update:value="onClosePhrases"
@update:phrasesData="onUpdatePhrasesData"
@reInitData="initData"
/>
<!-- "流程配置"弹出框 -->
<DisposalProcess :visible="isShowDisposal" :eventType="eventType" :phrasesData="phrasesData"
@update:value="onCloseDisposal" @reInitData="initData" />
<DisposalProcess
:visible="isShowDisposal"
:eventType="eventType"
:phrasesData="phrasesData"
@update:value="onCloseDisposal"
@reInitData="initData"
/>
<!-- 分页 -->
<div class="footer">
<Pagination @current-change="initData" @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="total">
<Pagination
@current-change="initData"
@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="total"
>
</Pagination>
</div>
</div>
</template>
<script>
import ButtonGradient from '@screen/components/Buttons/ButtonGradient.vue';
import Pagination from '@screen/components/Pagination.vue';
import Table from '@screen/components/Table.vue';
import CommonPhrases from './commonPhrases';
import DisposalProcess from './disposalProcess';
import ButtonGradient from "@screen/components/Buttons/ButtonGradient.vue";
import Pagination from "@screen/components/Pagination.vue";
import Table from "@screen/components/Table.vue";
import CommonPhrases from "./commonPhrases";
import DisposalProcess from "./disposalProcess";
import request from "@/utils/request";
import { Message } from 'element-ui'
import { Message } from "element-ui";
export default {
name: 'emergencyProcessManagement',
name: "emergencyProcessManagement",
components: {
ButtonGradient,
Pagination,
Table,
CommonPhrases,
DisposalProcess
DisposalProcess,
},
data() {
return {
@ -83,8 +103,8 @@ export default {
pageNum: 1,
},
phrasesData: [],
process: []
}
process: [],
};
},
created() {
this.initData();
@ -113,18 +133,18 @@ export default {
},
showPhrases(data) {
if (data?.processConfigList.length <= 0) {
Message.warning('请先配置流程!');
Message.warning("请先配置流程!");
return;
}
let process = []
data.processConfigList.forEach(it => {
let process = [];
data.processConfigList.forEach((it) => {
process.push({
id: it.id,
commonPhrases: it.commonPhrases,
label: it.processNode,
isActive: false,
})
})
});
});
this.process = process;
this.isShowPhrases = true;
this.eventType = data.eventType;
@ -134,19 +154,19 @@ export default {
this.eventType = eventType;
},
onClosePhrases() {
this.isShowPhrases = false
this.isShowPhrases = false;
},
onCloseDisposal() {
this.isShowDisposal = false;
},
onUpdatePhrasesData(phrasesData) {
this.phrasesData = phrasesData;
}
}
}
},
},
};
</script>
<style lang='scss' scoped>
<style lang="scss" scoped>
.emergencyProcessManagement {
padding: 21px;
@ -163,7 +183,7 @@ export default {
justify-content: space-between;
align-items: center;
>div {
> div {
display: flex;
gap: 6px;
}

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

@ -1,7 +1,7 @@
<template>
<div class="ScopeTable">
<el-row>
<el-col :span="2">
<el-row :gutter="5">
<el-col :span="3">
<p>设备资源:</p>
</el-col>
<el-col :span="4">
@ -19,7 +19,7 @@
</el-option>
</el-select>
</el-col>
<el-col :span="4">
<el-col :span="10">
<!-- 设备列表 -->
<el-select v-if="tableInfo.searchRule == 1" v-model="tableInfo.devList" placeholder="请选择设备" multiple
collapse-tags>
@ -36,8 +36,8 @@
<span v-if="tableInfo.searchRule == 4" style="width: 56px;">公里</span>
</el-col>
</el-row>
<el-row>
<el-col :span="2">
<el-row :gutter="5">
<el-col :span="3">
<p>执行操作:</p>
</el-col>
<!-- 可变信息标识 -->
@ -48,7 +48,8 @@
</el-select>
</el-col>
<el-col v-if="tableInfo.deviceType == 2 && tableInfo.zx_operationType == 1" :span="4">
<el-input @click.native="clickQbb('zx_content')" placeholder="请选择" v-model="tableInfo.zx_content"
<el-input @click.native="clickQbb('zx_dcInfoBoardTemplate')" placeholder="请选择"
:value="tableInfo.zx_dcInfoBoardTemplate?tableInfo.zx_dcInfoBoardTemplate.content:''"
readonly>
<i slot="suffix" class="el-input__icon el-icon-search"></i>
</el-input>
@ -99,8 +100,8 @@
</el-col>
</el-row>
<el-row v-if="tableInfo.deviceType !== 5">
<el-col :span="2">
<el-row :gutter="5" v-if="tableInfo.deviceType !== 5">
<el-col :span="3">
<p>恢复操作:</p>
</el-col>
<!-- 可变信息标识 -->
@ -111,7 +112,8 @@
</el-select>
</el-col>
<el-col v-if="tableInfo.deviceType == 2 && tableInfo.hf_operationType == 1" :span="4">
<el-input @click.native="clickQbb('hf_content')" placeholder="请选择" v-model="tableInfo.hf_content"
<el-input @click.native="clickQbb('hf_dcInfoBoardTemplate')" placeholder="请选择"
:value="tableInfo.hf_dcInfoBoardTemplate?tableInfo.hf_dcInfoBoardTemplate.content:''"
readonly>
<i slot="suffix" class="el-input__icon el-icon-search"></i>
</el-input>
@ -161,10 +163,7 @@
<el-input v-model="tableInfo.hf_content" placeholder="请输入发布内容"></el-input>
</el-col>
</el-row>
<!-- 情报板弹窗 -->
<QbbDialog :visible="isShowDialog" :info="qbbData" @close="onCloseDialog" @dialogSubmit="dialogSubmit" />
</div>
@ -178,6 +177,7 @@ import QbbDialog from "../qbbDialog/index.vue";
import { Message } from 'element-ui'
import { planDeviceOptions } from "@screen/utils/enum.js";
import { defaultTableInfo } from "../data";
import { dataTool } from 'echarts';
export default {
name: 'ScopeTable',
@ -287,14 +287,12 @@ export default {
watch: {
'tableInfo.deviceType': {
async handler(newValue) {
console.log('aaaaaaaaaaaaaaaaaa', 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 })
})
console.log('bbbbbbbbbbb', this.sbOptions)
},
immediate: true,
}
@ -343,8 +341,18 @@ export default {
this.isShowDialog = false;
},
dialogSubmit(data) {
console.log('qbbData', data)
this.tableInfo[this.clickQbbName] = data.content;
this.tableInfo[this.clickQbbName] = {
"fontType":data.fontType,
"screenSize":data.screenSize,
"fontSpacing":data.fontSpacing,
"stopTime":data.stopTime,
"fontSize":data.fontSize,
"inScreenMode":data.inScreenMode,
"formatStyle":data.formatStyle,
"content":data.content,
"fontColor":data.fontColor
};
// this.tableData[this.index].otherConfig = JSON.stringify(data);
}
}

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

@ -21,15 +21,15 @@
</div>
<div>
<el-row v-for="(item, index) in tableData" :key="item.id" class="rowBlock">
<el-col :span="22">
<div v-for="(item, index) in tableData" :key="item.id" class="rowBlock">
<div style="flex:1">
<ScopeTable :tableInfo="item"></ScopeTable>
</el-col>
<el-col :span="2">
</div>
<div style="width:100px">
<ElButton class="elButton" icon="el-icon-plus" plain size="mini" @click.native="onAdd()" />
<ElButton class="elButton" icon="el-icon-delete" plain size="mini" @click.native="onDel(index)" />
</el-col>
</el-row>
</div>
</div>
</div>
</ElForm>
@ -198,8 +198,6 @@ export default {
dcArr.push(action);
});
this.tableData = dcArr;
console.log("tableData", this.tableData);
})
// console.log('secondFormData', this.secondFormData)
// }).catch((err) => {
@ -268,6 +266,7 @@ export default {
return data;
},
handleSubmit() {
this.$refs["ruleForm"].validate((valid) => {
if (valid) {
let dcArr = [];
@ -278,13 +277,13 @@ export default {
searchRule: item.searchRule,
number: item.number
}
let zxData = {}, hfData = {};
if (this.dialogType == 2) {
dcData.emergencyPlansId = this.planId;
}
if (item.devList && item.devList.length > 0) {
dcData.deviceList = item.devList.join(",");
}
let zxData = {}, hfData = {};
Object.keys(item).forEach(key => {
if (/^zx_/.test(key)) {
let keyName = key.substring(3);
@ -304,11 +303,6 @@ export default {
dcArr.push(dcData);
})
console.log({
...this.formData,
dcExecuteAction: dcArr
});
// return;
if (this.dialogType == 1) {
//
request({
@ -359,7 +353,6 @@ export default {
});
},
areAllValuesEmpty(obj) {
console.log("ass", obj);
return Object.keys(obj).every(function (key) {
const value = obj[key];
return (
@ -387,7 +380,7 @@ export default {
.EventAddPlanDialog {
gap: 9px;
width: 1280px;
width: 100%;
height: 310px;
display: flex;
flex-direction: column;
@ -419,6 +412,8 @@ export default {
background-color: #296887;
padding: 5px 10px;
margin-bottom: 10px;
display: flex;
justify-content: space-between;
}
}

28
ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/smart/manage/data.js

@ -0,0 +1,28 @@
// import * as PresetFormItems from "@screen/pages/control/event/event/FormEvent/PresetFormItems.js";
import * as PresetFormItems from "@screen/common/PresetFormItems.js";
// import { merge, cloneDeep } from "lodash";
import {directionOptions} from '@screen/utils/enum.js';
export const searchFormList = [
{
label: "设备名称:",
key: "deviceName",
type: "input",
default: ""
},
{
label: "物联编号:",
key: "iotDeviceId",
type: "input",
default: ""
}, {
label: "设备方向:",
key: "direction",
type: "select",
options: {
options: directionOptions,
},
},
];

22
ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/smart/manage/images/refresh.svg

@ -0,0 +1,22 @@
<svg width="16" height="14" viewBox="0 0 16 14" fill="none" xmlns="http://www.w3.org/2000/svg">
<g id="Group 1142814398">
<g id="Group 1142814396">
<path id="Rectangle 1304" d="M1.0437 2.41495L4.5636 2.01738L4.91112 6.00562" stroke="white" stroke-linecap="round"/>
<g id="Ellipse 835">
<mask id="path-2-inside-1_290_77" fill="white">
<path d="M4.29579 2.52494C4.09359 2.27296 3.71712 2.25216 3.51748 2.50144C2.86315 3.31847 2.39514 4.30903 2.15904 5.38649C1.87758 6.67096 1.93836 8.02122 2.3337 9.26652C2.72904 10.5118 3.44118 11.5962 4.38007 12.3826C5.16561 13.0406 6.08036 13.4652 7.0411 13.6229C7.35243 13.674 7.61901 13.4293 7.63212 13.1145C7.64523 12.7997 7.39954 12.5346 7.08935 12.4765C6.32757 12.3339 5.60349 11.9884 4.97813 11.4646C4.19938 10.8124 3.6087 9.91289 3.28078 8.87998C2.95287 7.84706 2.90245 6.72709 3.13591 5.66169C3.33404 4.75752 3.72906 3.92712 4.28182 3.24492C4.4503 3.03698 4.46523 2.7361 4.29579 2.52494Z"/>
</mask>
<path d="M4.29579 2.52494C4.09359 2.27296 3.71712 2.25216 3.51748 2.50144C2.86315 3.31847 2.39514 4.30903 2.15904 5.38649C1.87758 6.67096 1.93836 8.02122 2.3337 9.26652C2.72904 10.5118 3.44118 11.5962 4.38007 12.3826C5.16561 13.0406 6.08036 13.4652 7.0411 13.6229C7.35243 13.674 7.61901 13.4293 7.63212 13.1145C7.64523 12.7997 7.39954 12.5346 7.08935 12.4765C6.32757 12.3339 5.60349 11.9884 4.97813 11.4646C4.19938 10.8124 3.6087 9.91289 3.28078 8.87998C2.95287 7.84706 2.90245 6.72709 3.13591 5.66169C3.33404 4.75752 3.72906 3.92712 4.28182 3.24492C4.4503 3.03698 4.46523 2.7361 4.29579 2.52494Z" stroke="white" stroke-width="2" mask="url(#path-2-inside-1_290_77)"/>
</g>
</g>
<g id="Group 1142814397">
<path id="Rectangle 1304_2" d="M15.0437 11.585L11.5238 11.9826L11.1763 7.99438" stroke="white" stroke-linecap="round"/>
<g id="Ellipse 835_2">
<mask id="path-4-inside-2_290_77" fill="white">
<path d="M11.7916 11.4751C11.9938 11.727 12.3703 11.7478 12.5699 11.4986C13.2242 10.6815 13.6923 9.69097 13.9284 8.61351C14.2098 7.32904 14.149 5.97878 13.7537 4.73348C13.3584 3.48817 12.6462 2.40376 11.7073 1.61737C10.9218 0.95942 10.007 0.534814 9.0463 0.377109C8.73497 0.326006 8.46839 0.570722 8.45528 0.885536C8.44218 1.20035 8.68786 1.46544 8.99805 1.5235C9.75983 1.6661 10.4839 2.01159 11.1093 2.53538C11.888 3.18765 12.4787 4.08711 12.8066 5.12002C13.1345 6.15294 13.1849 7.27291 12.9515 8.33831C12.7534 9.24248 12.3583 10.0729 11.8056 10.7551C11.6371 10.963 11.6222 11.2639 11.7916 11.4751Z"/>
</mask>
<path d="M11.7916 11.4751C11.9938 11.727 12.3703 11.7478 12.5699 11.4986C13.2242 10.6815 13.6923 9.69097 13.9284 8.61351C14.2098 7.32904 14.149 5.97878 13.7537 4.73348C13.3584 3.48817 12.6462 2.40376 11.7073 1.61737C10.9218 0.95942 10.007 0.534814 9.0463 0.377109C8.73497 0.326006 8.46839 0.570722 8.45528 0.885536C8.44218 1.20035 8.68786 1.46544 8.99805 1.5235C9.75983 1.6661 10.4839 2.01159 11.1093 2.53538C11.888 3.18765 12.4787 4.08711 12.8066 5.12002C13.1345 6.15294 13.1849 7.27291 12.9515 8.33831C12.7534 9.24248 12.3583 10.0729 11.8056 10.7551C11.6371 10.963 11.6222 11.2639 11.7916 11.4751Z" stroke="white" stroke-width="2" mask="url(#path-4-inside-2_290_77)"/>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.1 KiB

461
ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/smart/manage/index.vue

@ -1,33 +1,468 @@
<template>
<div class='developing'>
<p>功能开发中...</p>
<div class='board_record'>
<!-- 搜索栏 -->
<div class="filter">
<div>
<ButtonGradient @click.native="handleExport">
<template #prefix>
<img src="@screen/images/export.svg" />
</template>
导出
</ButtonGradient>
<ButtonGradient @click="onRefreshForm" class="refresh-btn">
<template #prefix>
<img src="./images/refresh.svg" />
</template>
刷新
</ButtonGradient>
</div>
<InputSearch ref="searchComp" style="width: 480px" :formList="searchFormList"
:formConfigOptions="{ dFormData: { eventState: '0' } }" @handleSearch="handleSearch" />
</div>
<!-- 内容 -->
<div class="body">
<Table :data="tableData" height="100%">
<el-table-column label="序号" type="index" :index="indexMethod" width="120" align="center"
header-align="center" />
<ElTableColumn label="设备名称" prop="deviceName" align="center" header-align="center" />
<ElTableColumn label="物联编号" prop="iotDeviceId" width="120" align="center" header-align="center" />
<ElTableColumn label="设备桩号" prop="stakeMark" width="120" align="center" header-align="center" />
<ElTableColumn label="设备方向" prop="direction" width="240" align="center" header-align="center">
<template slot-scope="scope">
{{ DirectionTypes[scope.row.direction] }}
</template>
</ElTableColumn>
<ElTableColumn label="IP地址" prop="deviceIp" width="120" align="center" header-align="center" />
<ElTableColumn label="安装位置" prop="installationSite" align="center" header-align="center" />
<ElTableColumn label="使用状态" prop="useState" width="120" align="center" header-align="center">
<template slot-scope="scope">
<el-switch
:value="scope.row.useState===1"
size="mini"
active-color="#13ce66"
inactive-color="#ff4949">
</el-switch>
</template>
</ElTableColumn>
<ElTableColumn label="设备状态" prop="deviceState" width="120" align="center" header-align="center">
<template slot-scope="scope">
<el-tag type="success" size="mini" effect="dark" v-if="scope.row.deviceState === '1'">在线</el-tag>
<el-tag type="danger" size="mini" effect="dark" v-else>异常</el-tag>
</template>
</ElTableColumn>
<ElTableColumn label="设备图片" prop="deviceImg" align="center" header-align="center">
<template slot-scope="scope">
<img :src="scope.row.deviceImg" style="width: 30px;height: 30px;" />
</template>
</ElTableColumn>
<el-table-column
label="操作"
align="center"
class-name="small-padding fixed-width"
>
<template slot-scope="scope">
<el-button
type="text"
@click="handleUpdate(scope.row)"
v-hasPermi="['device:protocol:edit']"
>修改
</el-button>
</template>
</el-table-column>
</Table>
</div>
<!-- 分页 -->
<div class="footer">
<Pagination @current-change="initData" @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="total">
</Pagination>
</div>
<!-- 添加或修改控制码对话框 -->
<Dialog title="设备修改" v-model="modelVisible" width="1000px" append-to-body>
<Form
column="3"
class="form"
ref="FormConfigRef"
:formList="formList"
:value="formData"
/>
<template #footer>
<Button
style="background-color: rgba(0, 179, 204, 0.3)"
@click.native="(modelVisible = false), (submitting = false)"
>
取消
</Button>
<Button @click.native="handleSubmit" :loading="submitting"> 确定 </Button>
</template>
</Dialog>
</div>
</template>
<script>
import ButtonGradient from '@screen/components/Buttons/ButtonGradient.vue';
import Pagination from '@screen/components/Pagination.vue';
import Table from '@screen/components/Table.vue';
import request from "@/utils/request";
import BoardRecordPreview from '@screen/components/infoBoard/BoardRecordPreview.vue'
import {DirectionTypes,deviceTypeOptions,directionOptions} from '@screen/utils/enum.js';
import InputSearch from "@screen/components/InputSearch/index.vue";
import { searchFormList } from "./data";
import moment from "moment";
import { delay, exportFile, confirm } from "@screen/utils/common";
import { Message } from "element-ui";
import Button from "@screen/components/Buttons/Button.vue";
import Form from "@screen/components/FormConfig";
import Dialog from "@screen/components/Dialog/index.vue";
export default {
name: 'InDevelopment',
name: 'boardRecord',
components: {
ButtonGradient,
Pagination,
Table,
Button,
Form,
Dialog,
BoardRecordPreview,
InputSearch
},
data() {
return {
DirectionTypes,
tableData: [],
searchFormList,
total: 20,
searchData: {
pageSize: 20,
pageNum: 1,
dcDeviceType: "2"
},
//
modelVisible:false,
submitting: false,
formList: [
{
required: true,
label: "设备名称:",
key: "deviceName",
type: "input"
}, {
label: "物联编号:",
key: "iotDeviceId",
type: "input",
options: {
disabled:true
},
}, {
label: "所属单位:",
key: "deptName",
type: "select",
options: {
options: [],
},
}, {
label: "产品型号:",
key: "deviceType",
type: "select",
options: {
disabled:true,
options: deviceTypeOptions,
},
},{
required: true,
label: "设备桩号:",
key: "stakeMark",
type: "input",
options: {
disabled:true
},
}, {
label: "范围桩号:",
key: "stakeMarkRange",
type: "input",
options: {
disabled:true
},
}, {
label: "设备方向:",
key: "direction",
type: "select",
options: {
disabled:true,
options: directionOptions,
},
},{
label: "网段:",
key: "networkSegment",
type: "input",
options: {
disabled:true
},
}, {
label: "安装位置:",
key: "installationSite",
type: "input"
}, {
label: "安装日期:",
key: "installationDate",
type: "datePicker",
options: {
type: "datetime",
format: "yyyy-MM-dd",
valueFormat: "yyyy-MM-dd",
},
}, {
label: "生产日期:",
key: "productionDate",
type: "datePicker",
options: {
type: "datetime",
format: "yyyy-MM-dd",
valueFormat: "yyyy-MM-dd",
},
}, {
label: "使用年限:",
key: "durableYears",
type: "input"
},{
label: "使用状态:",
key: "useState",
type: "RadioGroup",
options: {
activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)",
options: [
{
key: 1,
label: "在用",
},
{
key: 0,
label: "停用",
},
],
},
},{
label: "设备状态:",
key: "deviceState",
type: "RadioGroup",
options: {
disabled:true,
activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)",
options: [
{
key: '1',
label: "正常",
},
{
key: '0',
label: "异常",
},
],
},
}, {
label: "IP地址:",
key: "deviceIp",
type: "input",
options:{
disabled:true
}
},{
label: "其他配置:",
key: "otherConfig",
type: "input",
isAlone: true, //
options: {
disabled:true,
type: "textarea",
autosize: true,
maxlength: 60,
autosize: { minRows: 6, maxRows: 6 },
showWordLimit: true,
}
},{
label: "备注:",
key: "remark",
type: "input",
isAlone: true, //
options: {
type: "textarea",
autosize: true,
maxlength: 60,
autosize: { minRows: 6, maxRows: 6 },
showWordLimit: true,
},
}
],
formData:{}
}
},
created() {
this.initData();
},
mounted() {
mounted(){
this.getOptions();
},
methods: {
onRefreshForm(){
this.searchData.pageNum = 1;
this.$refs.searchComp.handleResetForm();
},
handleSearch(data) {
this.searchData = {
...this.searchData,
...data
};
this.initData();
},
indexMethod(index) {
return this.searchData.pageSize*(this.searchData.pageNum-1) + index + 1;
},
//
getOptions(){
request({
url: `/system/dept/list`,
method: "get"
}).then((result) => {
if (result.code != 200) return Message.error(result?.msg);
let _options = [];
result.data.forEach(e=>{
_options.push({label:e.deptName,value:e.deptId})
})
this.formList[2].options.options = _options;
});
},
/** 修改按钮操作 */
handleUpdate(row) {
console.log(row,'-------------------')
this.formData = row;
this.modelVisible = true;
},
/** 提交按钮 */
handleSubmit() {
this.$refs.FormConfigRef.validate().then((data) => {
this.submitting = true;
if (this.formData) {
data.id = this.formData.id
}
request({
url: `/business/device`,
method: "PUT",
data,
})
.then((result) => {
if (result.code != 200) return Message.error(`提交失败!`);
Message.success(`提交成功!`);
this.modelVisible = false;
this.searchData.pageNum = 1;
this.initData();
})
.catch((err) => {
Message.error(`提交失败!`);
})
.finally(() => {
this.submitting = false;
});
});
},
/** 导出按钮操作 */
handleExport() {
exportFile({
url: "/business/device/export",
filename: "设备列表",
data: this.getSearchData(),
});
},
getSearchData() {
let params = {
groupName: this.searchData?.word,
pageSize: this.pageSize,
pageNum: this.currentPage,
};
// params = {
// pageSize: 1000000,
// pageNum: 1
// };
return params;
},
initData() {
request({
url: `/business/device/list`,
method: "get",
params: this.searchData,
}).then((result) => {
if (result.code != 200) return Message.error(result?.msg);
result.rows.forEach(e=>{
e.deviceType = parseInt(e.deviceType)
})
this.tableData = result.rows;
this.total = result.total;
});
},
onSizeChange(pageSize) {
this.tableData = [];
this.searchData.pageSize = pageSize;
this.searchData.pageNum = 1;
this.initData();
}
}
}
</script>
<style lang='scss' scoped>
.developing {
width: 100%;
.board_record {
padding: 0 14px 14px;
width:100%;
height: 100%;
position: relative;
z-index: 6;
color: white;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
.filter {
height: 60px;
display: flex;
justify-content: space-between;
align-items: center;
p {
font-size: 24px;
>div {
display: flex;
gap: 6px;
}
}
.body {
flex: 1;
height: 0;
}
.footer {
margin-top: 15px;
height: 36px;
display: flex;
align-items: center;
justify-content: center;
}
.board_shower{
margin: 4px;
}
::v-deep .el-carousel__indicators--horizontal{
line-height: 0; height: 16px;
.el-carousel__indicator--horizontal{
padding: 7px 4px;
}
}
::v-deep .el-table__cell div.cell {
padding: 0 10px !important;
}
}
</style>

49
ruoyi-ui/src/views/JiHeExpressway/pages/perception/meteorologyCheck/components/sortFaceForecast/index.vue

@ -485,6 +485,7 @@ export default {
},
],
weatherList: [],
sort:['长清区','平阴县','东平县','汶上县','梁山县','嘉祥县','巨野县','郓城县']
};
},
@ -503,28 +504,10 @@ export default {
getWeatherFacts().then((response) => {
let obj = response.data;
let data = [];
for (let key in obj) {
// if (key === "weatherFacts1") {
// obj[key].name = "";
// } else if (key === "weatherFacts2") {
// obj[key].name = "";
// } else if (key === "weatherFacts3") {
// obj[key].name = "";
// } else if (key === "weatherFacts4") {
// obj[key].name = "";
// } else if (key === "weatherFacts5") {
// obj[key].name = "";
// } else if (key === "weatherFacts6") {
// obj[key].name = "";
// } else if (key === "weatherFacts7") {
// obj[key].name = "";
// } else if (key === "weatherFacts8") {
// obj[key].name = "";
// }
data.push(obj[key]);
for(let i of this.sort){
data.push(_.find(obj,{name:i}))
}
this.weatherList = data;
// console.log("weatherList", this.weatherList);
});
},
//
@ -533,30 +516,12 @@ export default {
let obj = response.data;
let data = [];
for (let key in obj) {
// if (key === "hourlyWeather1") {
// console.log("obj[key]", obj[key][id - 1]);
// obj[key][id - 1].name = "";
// } else if (key === "hourlyWeather2") {
// obj[key][id - 1].name = "";
// } else if (key === "hourlyWeather3") {
// obj[key][id - 1].name = "";
// } else if (key === "hourlyWeather4") {
// obj[key][id - 1].name = "";
// } else if (key === "hourlyWeather5") {
// obj[key][id - 1].name = "";
// } else if (key === "hourlyWeather6") {
// obj[key][id - 1].name = "";
// } else if (key === "hourlyWeather7") {
// obj[key][id - 1].name = "";
// } else if (key === "hourlyWeather8") {
// obj[key][id - 1].name = "";
// }
data.push(obj[key]);
data.push(obj[key][id-1]);
}
let newData = [];
data.forEach((item) => {
newData.push(item[id - 1]);
});
for(let i of this.sort){
newData.push(_.find(data,{name:i}))
}
this.weatherList = newData;
});
},

6
ruoyi-ui/src/views/JiHeExpressway/pages/service/publicService/components/record/index.vue

@ -33,6 +33,12 @@
<ElTableColumn label="位置/设备" prop="position" align="center" width="200" header-align="center" />
<ElTableColumn label="发布内容" prop="contentDetails" align="center" header-align="center" />
<ElTableColumn label="发布人" prop="publisher" width="120" align="center" header-align="center" />
<ElTableColumn label="发布结果" prop="status" width="140" align="center" header-align="center">
<template slot-scope="scope">
<i class="el-icon-success" style="font-size: 24px; color:#0c0;" v-if="scope.row.publishStatus == 1"></i>
<i class="el-icon-error" style="font-size: 24px; color:#BBB;" v-else></i>
</template>
</ElTableColumn>
<ElTableColumn label="操作" prop="status" width="100" align="center" header-align="center">
<template slot-scope="scope">
<i class="el-icon-delete" style="font-size: 12px; color:#ff0000;" @click="onDelete(scope.row.id)"></i>

6
ruoyi-ui/src/views/JiHeExpressway/pages/service/publicService/index.vue

@ -66,7 +66,7 @@ export default {
color: #ffffff;
min-width: 128px;
position: relative;
left: 10px;
// left: 10px;
}
::v-deep .el-tabs__active-bar {
@ -94,7 +94,9 @@ export default {
::v-deep .el-tabs__content{ flex: 1;}
}
.con_tab{width: 100%; height: 100%;}
.con_tab{
width: 100%; height: 100%;
}
.first_tab{
display: flex; flex-direction: column;
.line_01 {

8
ruoyi-ui/src/views/JiHeExpressway/scss/el-reset.scss

@ -64,7 +64,15 @@ div.el-popper {
.el-select-dropdown__item.is-disabled {
color: #c0c4cc !important;
background-color: #12242e;
}
.el-textarea.is-disabled {
.el-textarea__inner {
border: 1px solid #00799f !important;
color: #c0c4cc !important;
background-color: rgba(39, 94, 121, 0.3);
}
}
.el-input.is-disabled {
input.el-input__inner {
color: #c0c4cc !important;

Loading…
Cancel
Save