Browse Source

弹框宽度更改

wangqin
zhangzhang 1 year ago
parent
commit
fb04710168
  1. 2
      ruoyi-ui/src/assets/styles/ruoyi.scss
  2. 37
      ruoyi-ui/src/views/JiHeExpressway/components/Decorations/BackgroundClip.vue
  3. 16
      ruoyi-ui/src/views/JiHeExpressway/components/Dialog/index.vue
  4. 111
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Broadcast/components/BroadcastReleases.vue
  5. 2
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Broadcast/index.vue
  6. 106
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Camera/components/CameraControlDialog.vue
  7. 60
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Camera/index.vue
  8. 13
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/CongestedRoadSections/index.vue
  9. 162
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/DrivingGuidance/components/DeviceControlDialog.vue
  10. 2
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/DrivingGuidance/index.vue
  11. 266
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/FatigueWakesUp/components/DeviceControlDialog.vue
  12. 24
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/FatigueWakesUp/index.vue
  13. 4
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/GuardrailCollision/index.vue
  14. 8
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/HighwayDetails/index.vue
  15. 2
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Intermodulation/index.vue
  16. 42
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/PerceiveEvent/index.vue
  17. 30
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SmartDevice/components/DeviceControlDialog.vue
  18. 2
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SmartDevice/index.vue
  19. 38
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/TrafficIncidents/index.vue
  20. 9
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/WakeUpLightCurtainInfo/index.vue
  21. 15
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/WeatherForecast/index.vue
  22. 6
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/dutyOfficer/components/ModifyDutyInformationTable.vue
  23. 2
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/dutyOfficer/components/OperateRecord.vue
  24. 2
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/emergencyAgencies/components/AddNEditDialog.vue
  25. 161
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/firstResponders/components/AddNEditDialog.vue
  26. 2
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/jurisdictionalManagement/components/AddNEditDialog.vue
  27. 108
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/dispatch/EventDetailDialog/index.vue
  28. 65
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/dispatch/EventDispatchDialog/index.vue
  29. 507
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/emergencyProcessManagement/commonPhrases/index.vue
  30. 594
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/emergencyProcessManagement/disposalProcess/index.vue
  31. 908
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/EventDetailDialog/eventPlanDialog/index.vue
  32. 243
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/EventDetailDialog/index.vue
  33. 2
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/addAndEditDialog/index.vue
  34. 457
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/qbbDialog/index.vue
  35. 2
      ruoyi-ui/src/views/JiHeExpressway/pages/service/PublishingChannelManagement/components/AddNEditDialog.vue
  36. 140
      ruoyi-ui/src/views/JiHeExpressway/pages/service/sensitive/components/AddNEditDialog.vue

2
ruoyi-ui/src/assets/styles/ruoyi.scss

@ -72,7 +72,7 @@ h6 {
}
.el-dialog:not(.is-fullscreen) {
margin-top: 6vh !important;
margin-top: 27vh !important;
margin-bottom: 1vh;
}

37
ruoyi-ui/src/views/JiHeExpressway/components/Decorations/BackgroundClip.vue

@ -1,36 +1,48 @@
<template>
<div class='BackgroundClip'
:style="{ '--clip-path': clipPath, '--border-path': borderPath, '--border-color': borderColor, '--bg-color': bgColor }"
:class="borderPath ? 'hasBorder' : 'noBoarder'">
<div
class="BackgroundClip"
:style="{
'--clip-path': clipPath,
'--border-path': borderPath,
'--border-color': borderColor,
'--bg-color': bgColor,
width: width,
}"
:class="borderPath ? 'hasBorder' : 'noBoarder'"
>
<slot />
</div>
</template>
<script>
export default {
name: 'BackgroundClip',
name: "BackgroundClip",
props: {
width: {
type: String,
default: null,
},
clipPath: {
type: String,
default: null
default: null,
},
borderPath: {
type: String,
default: null
default: null,
},
borderColor: {
type: String,
default: null
default: null,
},
bgColor: {
type: String,
default: null
default: null,
},
}
}
},
};
</script>
<style lang='scss' scoped>
<style lang="scss" scoped>
.hasBorder {
clip-path: var(--clip-path);
position: relative;
@ -51,9 +63,6 @@ export default {
}
}
.noBoarder {
clip-path: var(--clip-path);
position: relative;

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

@ -11,6 +11,7 @@
borderColor="linear-gradient(180deg, rgba(78, 174, 204, .9), rgba(78, 174, 204, 0))"
bgColor="linear-gradient(180deg, rgba(14, 69, 92, 0.9) 0%, rgba(20, 89, 119, 0.9) 100%)"
ref="DialogContentRef"
:width="width"
>
<div class="dialog-title">
<img
@ -59,6 +60,10 @@ export default {
},
name: "Dialog",
props: {
width: {
type: String,
default: null,
},
title: {
type: String,
},
@ -113,9 +118,9 @@ export default {
background: rgba(0, 0, 0, 0.36);
border-radius: 0px 0px 0px 0px;
z-index: 100;
display: flex;
align-items: center;
justify-content: center;
// display: flex;
// align-items: center;
// justify-content: center;
--border-width: 1px;
--clip-width-num: 24;
@ -143,7 +148,10 @@ export default {
background-clip: padding-box;
position: relative;
box-sizing: border-box;
margin: calc(var(--border-width) / 2);
top: 20%;
margin: auto;
padding-bottom: 20px;
// margin: calc(var(--border-width) / 2);
pointer-events: all;

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

@ -1,15 +1,20 @@
<template>
<Dialog v-model="modelVisible" title="广播发布">
<div class='BroadcastReleases'>
<Dialog v-model="modelVisible" title="广播发布" width="23vw">
<div class="BroadcastReleases">
<div class="body">
<div class="left">
<div class="title">路测广播列表</div>
<CheckboxGroup class="checkbox-group" gap="9px" :showIcon="true" v-model="checkList" :options="musicList"
id="otherConfig" label="deviceName">
<CheckboxGroup
class="checkbox-group"
gap="9px"
:showIcon="true"
v-model="checkList"
:options="musicList"
id="otherConfig"
label="deviceName"
>
<template #[otherConfig]="{ data }">
<span style="color: #6EE5FE;">
{{ data.deviceName }}(当前)
</span>
<span style="color: #6ee5fe"> {{ data.deviceName }}(当前) </span>
</template>
</CheckboxGroup>
</div>
@ -18,13 +23,21 @@
<Video class="item-video" :pileNum="pileNum" />
<label>发布内容: </label>
<ElInput type="textarea" v-model="releaseMessage" :autosize="{ minRows: 3, maxRows: 3 }" :maxlength="150"
showWordLimit placeholder="请输入发布内容" />
<ElInput
type="textarea"
v-model="releaseMessage"
:autosize="{ minRows: 3, maxRows: 3 }"
:maxlength="150"
showWordLimit
placeholder="请输入发布内容"
/>
</div>
<div class="footer">
<Button style="background-color: rgba(0, 179, 204, .3);"
@click.native="modelVisible = false, submitting = false">
<Button
style="background-color: rgba(0, 179, 204, 0.3)"
@click.native="(modelVisible = false), (submitting = false)"
>
取消
</Button>
<Button @click.native="handleSubmit" :loading="submitting">
@ -39,9 +52,9 @@
<script>
import Dialog from "@screen/components/Dialog/index.vue";
import Button from "@screen/components/Buttons/Button.vue"
import Video from "@screen/components/Video"
import CheckboxGroup from "@screen/components/FormConfig/components/ElCheckboxGroup.vue"
import Button from "@screen/components/Buttons/Button.vue";
import Video from "@screen/components/Video";
import CheckboxGroup from "@screen/components/FormConfig/components/ElCheckboxGroup.vue";
import request from "@/utils/request";
import { getDeviceList } from "@screen/pages/Home/components/RoadAndEvents/utils/httpList.js";
@ -49,52 +62,57 @@ import { getDeviceList } from "@screen/pages/Home/components/RoadAndEvents/utils
import { Message } from "element-ui";
export default {
name: 'BroadcastReleases',
name: "BroadcastReleases",
components: {
Dialog,
Button,
Video,
CheckboxGroup
CheckboxGroup,
},
model: {
prop: 'visible',
event: "update:value"
prop: "visible",
event: "update:value",
},
props: {
visible: Boolean,
deviceId: String,
pileNum: String,
currentId: [String, Number],
otherConfig: String
otherConfig: String,
},
data() {
return {
submitting: false,
checkList: [],
releaseMessage: null,
musicList: []
}
musicList: [],
};
},
computed: {
modelVisible: {
get() {
return this.visible
return this.visible;
},
set(val) {
this.$emit('update:value', val)
}
}
this.$emit("update:value", val);
},
},
},
created() {
getDeviceList(5)
.then(data => {
if (Array.isArray(data)) this.musicList = data.map((item) => ({ ...item, disabled: item.deviceState != 1 }));
})
getDeviceList(5).then((data) => {
if (Array.isArray(data))
this.musicList = data.map((item) => ({
...item,
disabled: item.deviceState != 1,
}));
});
},
methods: {
handleSubmit() {
if (!this.releaseMessage?.trim()) return Message.error("发布内容不能为空!");
if (!this.checkList.length) return Message.error("请至少选择一个广播设备!");
if (!this.releaseMessage?.trim())
return Message.error("发布内容不能为空!");
if (!this.checkList.length)
return Message.error("请至少选择一个广播设备!");
this.submitting = true;
@ -102,16 +120,16 @@ export default {
url: `/broadcast/broadcastFunctionCall`,
method: "post",
data: {
"name": "task-3",
"outVol": "6",
"priority": "1",
"text": this.releaseMessage.trim(),
"repeatTimes": "3",
"termList": this.checkList.map(str => JSON.parse(str)),
"functionType": "startPaTts"
}
name: "task-3",
outVol: "6",
priority: "1",
text: this.releaseMessage.trim(),
repeatTimes: "3",
termList: this.checkList.map((str) => JSON.parse(str)),
functionType: "startPaTts",
},
})
.then(data => {
.then((data) => {
// console.log(data);
if (data.retCode == "0") {
Message.success("广播设置成功!");
@ -122,13 +140,13 @@ export default {
})
.finally(() => {
this.submitting = false;
})
}
});
},
},
}
};
</script>
<style lang='scss' scoped>
<style lang="scss" scoped>
.BroadcastReleases {
// width: 450px;
height: 420px;
@ -144,7 +162,7 @@ export default {
.left {
width: 251px;
border-radius: 3px 3px 3px 3px;
border: 1px solid #3DE8FF;
border: 1px solid #3de8ff;
padding: 3px 12px;
display: flex;
flex-direction: column;
@ -214,11 +232,10 @@ export default {
font-size: 16px;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #3DE8FF;
color: #3de8ff;
line-height: 19px;
}
}
}
}

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

@ -1,5 +1,5 @@
<template>
<Dialog v-model="obverseVisible" title="语音广播">
<Dialog v-model="obverseVisible" title="语音广播" width="25.5vw">
<Video class="video-stream" :pileNum="dialogData.stakeMark" />
<div class="Broadcast">

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

@ -1,34 +1,32 @@
<template>
<Dialog v-model="modelVisible" title="相机控制" noneMask>
<div class='CameraControlDialog'>
<Dialog v-model="modelVisible" title="相机控制" noneMask width="23vw">
<div class="CameraControlDialog">
<div class="direction">
<div class="control-container top" @click="controlClick(21)">
<div class="icon-horizontal" />
<img src="../images/top.svg">
<img src="../images/top.svg" />
</div>
<div class="control-container right" @click="controlClick(24)">
<div class="icon-vertical" />
<img src="../images/right.svg">
<img src="../images/right.svg" />
</div>
<div class="center"></div>
<div class="control-container bottom" @click="controlClick(22)">
<div class="icon-horizontal" style="transform: rotate(180deg);" />
<img src="../images/bottom.svg">
<div class="icon-horizontal" style="transform: rotate(180deg)" />
<img src="../images/bottom.svg" />
</div>
<div class="control-container left" @click="controlClick(23)">
<div class="icon-vertical" style="transform: rotate(180deg);" />
<img src="../images/left.svg">
<div class="icon-vertical" style="transform: rotate(180deg)" />
<img src="../images/left.svg" />
</div>
</div>
<div class="options">
<div v-for="item in options" :key="item.key">
<img src="../images/sub.svg" @click="controlClick(item.sub)">
<img src="../images/sub.svg" @click="controlClick(item.sub)" />
<span>{{ item.label }}</span>
<img src="../images/add.svg" @click="controlClick(item.add)">
<img src="../images/add.svg" @click="controlClick(item.add)" />
</div>
</div>
</div>
</Dialog>
@ -36,26 +34,26 @@
<script>
import Dialog from "@screen/components/Dialog/index.vue";
import { controlCamera } from "@screen/pages/Home/components/RoadAndEvents/utils/httpList.js"
import { throttle } from "lodash"
import Switcher from '@screen/pages/service/PublishingChannelManagement/components/Switcher.vue';
import { controlCamera } from "@screen/pages/Home/components/RoadAndEvents/utils/httpList.js";
import { throttle } from "lodash";
import Switcher from "@screen/pages/service/PublishingChannelManagement/components/Switcher.vue";
import Button from "@screen/components/Buttons/Button.vue";
// 49 48
export default {
name: 'CameraControlDialog',
name: "CameraControlDialog",
components: {
Dialog,
Button
Button,
},
model: {
prop: 'visible',
event: "update:value"
prop: "visible",
event: "update:value",
},
props: {
visible: Boolean,
deviceId: String,
dialogData: Object
dialogData: Object,
},
data() {
return {
@ -64,69 +62,66 @@ export default {
label: "变倍",
key: "zoom",
add: "12",
sub: "11"
sub: "11",
},
{
label: "光圈",
key: "aperture",
add: "15",
sub: "16"
sub: "16",
},
{
label: "聚焦",
key: "focus",
add: "13",
sub: "14"
sub: "14",
},
],
activeOption: {
active: {
text: "开"
text: "开",
},
unActive: {
text: "关"
}
text: "关",
},
},
data: {
state: 0
}
}
state: 0,
},
};
},
computed: {
modelVisible: {
get() {
return this.visible
return this.visible;
},
set(val) {
this.$emit('update:value', val)
}
}
this.$emit("update:value", val);
},
},
},
methods: {
controlClick: throttle(function (type) {
if (this.dialogData.deviceState != "0")
controlCamera(this.deviceId, type)
else this.$message.info("设备离线, 无法操作")
controlCamera(this.deviceId, type);
else this.$message.info("设备离线, 无法操作");
}, 150),
async handleSwitcherChange(value, data) {
let str = data.state ? "关闭" : "开启";
data.state = value;
const isContinue = await confirm({ message: `${str}` })
.catch(() => {
console.log(data.state, value, 333)
data.state = !value;
});
const isContinue = await confirm({ message: `${str}` }).catch(() => {
console.log(data.state, value, 333);
data.state = !value;
});
if (!isContinue) return;
},
},
}
};
</script>
<style lang='scss' scoped>
<style lang="scss" scoped>
.CameraControlDialog {
width: 360px;
height: 210px;
@ -147,7 +142,7 @@ export default {
&:active {
[class^="icon"] {
background-color: #48B0CB;
background-color: #48b0cb;
}
}
@ -156,18 +151,22 @@ export default {
position: absolute;
left: 0;
top: 0;
background-color: #006A96;
background-color: #006a96;
z-index: -1;
}
.icon-horizontal {
clip-path: path('M53.807 19.0734C51.1049 21.3657 47.1722 21.2685 44.0948 19.512C35.7042 14.7227 25.2544 13.7636 15.6704 17.82C14.5092 18.3114 13.3921 18.8632 12.321 19.4703C9.23352 21.2201 5.29428 21.3087 2.59447 19.0054V19.0054C-0.433686 16.4219 -0.827317 11.8122 2.24787 9.28482C4.93936 7.07281 7.91063 5.2081 11.093 3.74265C16.4653 1.26882 22.3109 -0.00817108 28.2253 6.86646e-05C34.1398 0.0083065 39.9818 1.30157 45.3471 3.79036C48.527 5.26539 51.4944 7.13947 54.1807 9.36039C57.2464 11.8949 56.8402 16.5002 53.807 19.0734V19.0734Z');
clip-path: path(
"M53.807 19.0734C51.1049 21.3657 47.1722 21.2685 44.0948 19.512C35.7042 14.7227 25.2544 13.7636 15.6704 17.82C14.5092 18.3114 13.3921 18.8632 12.321 19.4703C9.23352 21.2201 5.29428 21.3087 2.59447 19.0054V19.0054C-0.433686 16.4219 -0.827317 11.8122 2.24787 9.28482C4.93936 7.07281 7.91063 5.2081 11.093 3.74265C16.4653 1.26882 22.3109 -0.00817108 28.2253 6.86646e-05C34.1398 0.0083065 39.9818 1.30157 45.3471 3.79036C48.527 5.26539 51.4944 7.13947 54.1807 9.36039C57.2464 11.8949 56.8402 16.5002 53.807 19.0734V19.0734Z"
);
width: 57px;
height: 21px;
}
.icon-vertical {
clip-path: path('M2.33992 53.8068C0.0475853 51.1047 0.14481 47.172 1.90137 44.0945C6.69064 35.7039 7.64974 25.2542 3.59338 15.6702C3.10192 14.509 2.55008 13.3918 1.94307 12.3208C0.193261 9.23327 0.1046 5.29403 2.40796 2.59423V2.59423C4.99146 -0.433928 9.60116 -0.827561 12.1285 2.24762C14.3405 4.93912 16.2052 7.91038 17.6707 11.0928C20.1445 16.465 21.4215 22.3106 21.4133 28.2251C21.405 34.1395 20.1117 39.9816 17.623 45.3469C16.1479 48.5267 14.2738 51.4941 12.0529 54.1805C9.51843 57.2461 4.91315 56.84 2.33992 53.8068V53.8068Z');
clip-path: path(
"M2.33992 53.8068C0.0475853 51.1047 0.14481 47.172 1.90137 44.0945C6.69064 35.7039 7.64974 25.2542 3.59338 15.6702C3.10192 14.509 2.55008 13.3918 1.94307 12.3208C0.193261 9.23327 0.1046 5.29403 2.40796 2.59423V2.59423C4.99146 -0.433928 9.60116 -0.827561 12.1285 2.24762C14.3405 4.93912 16.2052 7.91038 17.6707 11.0928C20.1445 16.465 21.4215 22.3106 21.4133 28.2251C21.405 34.1395 20.1117 39.9816 17.623 45.3469C16.1479 48.5267 14.2738 51.4941 12.0529 54.1805C9.51843 57.2461 4.91315 56.84 2.33992 53.8068V53.8068Z"
);
width: 21px;
height: 57px;
}
@ -182,7 +181,6 @@ export default {
gap: 3px;
.top {
grid-area: 1/2/1/2;
}
@ -204,10 +202,10 @@ export default {
width: 66px;
height: 66px;
background: #006A96;
background: #006a96;
border-radius: 50%;
opacity: 1;
border: 1px solid #3DE8FF
border: 1px solid #3de8ff;
}
}
@ -217,18 +215,18 @@ export default {
justify-content: center;
gap: 18px;
>div {
> div {
display: flex;
align-items: center;
justify-content: center;
gap: 9px;
img {
background-color: #006A96;
background-color: #006a96;
border-radius: 50%;
&:active {
background-color: #48B0CB;
background-color: #48b0cb;
}
}
}

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

@ -1,5 +1,9 @@
<template>
<Dialog v-model="obverseVisible" :title="dialogData.deviceName">
<Dialog
v-model="obverseVisible"
:title="dialogData.deviceName"
width="25.5vw"
>
<div class="Camera">
<Video class="video-stream" :camId="dialogData.iotDeviceId" />
<ElTabs v-model="activeName" class="tabs">
@ -7,31 +11,51 @@
<Descriptions :list="list" :data="data" style="gap: 18px">
<template #content-deviceName>
<span>{{ dialogData.deviceName || "-" }}</span>
<img @click="controlDialogVisible = true" v-if="[0, '0'].includes(
dialogData.parseOtherConfig &&
dialogData.parseOtherConfig.ptzCtrl
)
" src="@screen/images/camera-control-icon.svg" width="18px" height="18px" style="cursor: pointer" />
<img
@click="controlDialogVisible = true"
v-if="
[0, '0'].includes(
dialogData.parseOtherConfig &&
dialogData.parseOtherConfig.ptzCtrl
)
"
src="@screen/images/camera-control-icon.svg"
width="18px"
height="18px"
style="cursor: pointer"
/>
</template>
</Descriptions>
<div v-if="PanoramicCameraTypes.indexOf(dialogData.childType) == -1"
style="width: 50%; display: flex; margin-top: 18px">
<span style="
<div
v-if="PanoramicCameraTypes.indexOf(dialogData.childType) == -1"
style="width: 50%; display: flex; margin-top: 18px"
>
<span
style="
color: #3de8ff;
font-size: 15px;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
line-height: 18px;
">
"
>
雨刷:
</span>
<Button style="margin-left: 5px" @click.native="controlClick(49)"></Button>
<Button style="margin-left: 5px" @click.native="controlClick(48)"></Button>
<Button style="margin-left: 5px" @click.native="controlClick(49)"
></Button
>
<Button style="margin-left: 5px" @click.native="controlClick(48)"
></Button
>
</div>
</ElTabPane>
<!-- <ElTabPane label="摄相机参数" name="second">摄相机参数</ElTabPane> -->
<ElTabPane label="在线率统计" name="third">
<LineChart v-if="activeName === 'third'" :productId="dialogData.id" style="height: 180px" />
<LineChart
v-if="activeName === 'third'"
:productId="dialogData.id"
style="height: 180px"
/>
</ElTabPane>
</ElTabs>
@ -40,7 +64,11 @@
</div> -->
</div>
<CameraControlDialog :deviceId="dialogData.iotDeviceId" :dialogData="dialogData" v-model="controlDialogVisible" />
<CameraControlDialog
:deviceId="dialogData.iotDeviceId"
:dialogData="dialogData"
v-model="controlDialogVisible"
/>
</Dialog>
</template>
@ -143,7 +171,7 @@ export default {
// console.log(this.dialogData, "dialogData")
if (this.dialogData.deviceState != "0")
controlCamera(this.dialogData.iotDeviceId, type, false);
else this.$message.info("设备离线, 无法操作")
else this.$message.info("设备离线, 无法操作");
}, 150),
visibleClose(bool) {
if (bool) return;
@ -207,7 +235,7 @@ export default {
align-items: center;
justify-content: end;
>div {
> div {
font-size: 16px;
padding: 6px 12px;
}

13
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/CongestedRoadSections/index.vue

@ -1,8 +1,7 @@
<template>
<Dialog class="CongestedRoadSections">
<Dialog class="CongestedRoadSections" width="23vw">
<div class="video-presentations">
<div class="video-item">
</div>
<div class="video-item"></div>
<div class="video-item"></div>
</div>
<div class="list-content">
@ -43,15 +42,15 @@
</template>
<script>
import Dialog from "@screen/components/Dialog/index.vue"
import Dialog from "@screen/components/Dialog/index.vue";
//
export default {
name: 'CongestedRoadSections',
}
name: "CongestedRoadSections",
};
</script>
<style lang='scss' scoped>
<style lang="scss" scoped>
.CongestedRoadSections {
.video-presentations {
width: 100%;

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

@ -1,8 +1,14 @@
<template>
<Dialog v-model="modelVisible" title="设备操作">
<div class='DeviceControlDialog'>
<Form v-model="formData" class="form" ref="FormConfigRef" :formList="formList" column="1" labelWidth="120px" />
<Dialog v-model="modelVisible" title="设备操作" width="23vw">
<div class="DeviceControlDialog">
<Form
v-model="formData"
class="form"
ref="FormConfigRef"
:formList="formList"
column="1"
labelWidth="120px"
/>
<div class="tips" v-if="formData.controlType === '01'">
说明: 定时控制模式下,诱导灯在开始时间自动打开,结束时间自动关闭
@ -10,74 +16,74 @@
<div class="tips" v-if="formData.controlType === '02'">
说明: 万年历自动模式下,诱导灯在白天会自动关闭,夜晚会自动打开
</div>
</div>
<template #footer>
<Button style="background-color: rgba(0, 179, 204, .3);" @click.native="modelVisible = false, submitting = false">
<Button
style="background-color: rgba(0, 179, 204, 0.3)"
@click.native="(modelVisible = false), (submitting = false)"
>
取消
</Button>
<Button @click.native="handleSubmit" :loading="submitting">
确定
</Button>
<Button @click.native="handleSubmit" :loading="submitting"> 确定 </Button>
</template>
</Dialog>
</template>
<script>
import Dialog from "@screen/components/Dialog/index.vue";
import Button from "@screen/components/Buttons/Button.vue"
import Form from '@screen/components/FormConfig';
import Button from "@screen/components/Buttons/Button.vue";
import Form from "@screen/components/FormConfig";
import { cloneDeep } from "lodash"
import { delay } from "@screen/utils/common.js"
import { cloneDeep } from "lodash";
import { delay } from "@screen/utils/common.js";
import request from "@/utils/request";
import { Message } from "element-ui";
// import { axiosIns } from "@screen/utils/axios/auth.js";
import { handle3CResult } from "@screen/utils/deviceControl.js"
import { handle3CResult } from "@screen/utils/deviceControl.js";
const workStatus = [
{
key: "00",
label: "不更新状态",
disabled: false
disabled: false,
},
{
key: "01",
label: "常亮"
label: "常亮",
},
{
key: "02",
label: "流水"
label: "流水",
},
{
key: "03",
label: "闪烁"
label: "闪烁",
},
{
key: "04",
label: "关闭",
disabled: false
}
]
disabled: false,
},
];
export default {
name: 'DeviceControlDialog',
name: "DeviceControlDialog",
components: {
Dialog,
Button,
Form
Form,
},
model: {
prop: 'visible',
event: "update:value"
prop: "visible",
event: "update:value",
},
props: {
visible: Boolean,
deviceId: String
deviceId: String,
},
inject: ['requestURL'],
inject: ["requestURL"],
data() {
return {
submitting: false,
@ -95,27 +101,29 @@ export default {
this.formList[1].options.options.splice(-1, 1, {
...workStatus.slice(-1)[0],
disabled: value != "00"
})
disabled: value != "00",
});
this.formList[1].options.options.splice(0, 1, {
...workStatus[0],
disabled: value != "00"
})
disabled: value != "00",
});
switch (value) {
case "01":
if (["04", "00"].includes(data.onWorkStatus))
data.onWorkStatus = null;
if (["04", "00"].includes(data.inWorkStatus))
data.inWorkStatus = null;
if (['04', '00'].includes(data.onWorkStatus)) data.onWorkStatus = null;
if (['04', '00'].includes(data.inWorkStatus)) data.inWorkStatus = null;
Array.isArray(oldFormData.displayTime) && (data.displayTime = [...oldFormData.displayTime]);
Array.isArray(oldFormData.displayTime) &&
(data.displayTime = [...oldFormData.displayTime]);
break;
}
},
},
options: {
type: 'circle',
type: "circle",
options: [
{
key: "00",
@ -139,8 +147,8 @@ export default {
type: "select",
options: {
placeholder: "请选择",
options: workStatus
}
options: workStatus,
},
},
{
label: "下行工作状态:",
@ -149,8 +157,8 @@ export default {
type: "select",
options: {
placeholder: "请选择",
options: workStatus
}
options: workStatus,
},
},
{
label: "选择时间:",
@ -165,19 +173,19 @@ export default {
startPlaceholder: "开始时间",
endPlaceholder: "结束时间",
},
}
]
}
},
],
};
},
computed: {
modelVisible: {
get() {
return this.visible
return this.visible;
},
set(val) {
this.$emit('update:value', val)
}
}
this.$emit("update:value", val);
},
},
},
watch: {
modelVisible: {
@ -186,41 +194,44 @@ export default {
if (!bool) return;
this.reDisplay();
}
}
},
},
},
methods: {
reDisplay() {
this.requestURL()
.then(async (data) => {
await delay(0);
const formData = this.$refs.FormConfigRef?.formData;
this.requestURL().then(async (data) => {
await delay(0);
formData.controlType = data.mode;
const formData = this.$refs.FormConfigRef?.formData;
await handle3CResult(data, formData, this.requestURL);
formData.controlType = data.mode;
this.oldFormData = { ...formData };
await handle3CResult(data, formData, this.requestURL);
})
this.oldFormData = { ...formData };
});
},
handleSubmit() {
const result = {}, formData = this.$refs.FormConfigRef?.formData;
const result = {},
formData = this.$refs.FormConfigRef?.formData;
result.mode = formData.controlType;
delete result.controlType;
if (result.mode === '01') {
if (!formData.displayTime?.length) return Message.error(`时间不能为空!`);
if (result.mode === "01") {
if (!formData.displayTime?.length)
return Message.error(`时间不能为空!`);
}
if (!formData.onWorkStatus || !formData.inWorkStatus) return Message.error(`工作状态不能为空!`);
if (!formData.onWorkStatus || !formData.inWorkStatus)
return Message.error(`工作状态不能为空!`);
if (["01", "02"].includes(result.mode)) {
if (["04", "00"].includes(formData.onWorkStatus)) return Message.error(`上行工作状态不能选择当前类型!`);
if (["04", "00"].includes(formData.inWorkStatus)) return Message.error(`下行工作状态不能选择当前类型!`);
if (["04", "00"].includes(formData.onWorkStatus))
return Message.error(`上行工作状态不能选择当前类型!`);
if (["04", "00"].includes(formData.inWorkStatus))
return Message.error(`下行工作状态不能选择当前类型!`);
}
result.onWorkStatus = formData.onWorkStatus;
@ -240,14 +251,13 @@ export default {
switch (result.mode) {
case "00":
promise.push(this.requestURL("51", result))
promise.push(this.requestURL("51", result));
break;
case "01":
case "02":
const options = { mode: result.mode };
if (result.mode === '01') {
if (result.mode === "01") {
options.startDisplayTime = formData.displayTime[0];
options.endDisplayTime = formData.displayTime[1];
}
@ -257,8 +267,8 @@ export default {
onWorkStatus: result.onWorkStatus,
inWorkStatus: result.inWorkStatus,
}),
this.requestURL("51", options),
)
this.requestURL("51", options)
);
break;
}
Promise.all(promise)
@ -266,18 +276,22 @@ export default {
this.modelVisible = false;
})
.catch((err) => {
console.log("%c [ err ]-110-「DeviceControlDialog.vue」", "font-size:15px; background:#547bf2; color:#98bfff;", err);
console.log(
"%c [ err ]-110-「DeviceControlDialog.vue」",
"font-size:15px; background:#547bf2; color:#98bfff;",
err
);
Message.error(`设备操作失败!`);
})
.finally(() => {
this.submitting = false;
})
}
});
},
},
}
};
</script>
<style lang='scss' scoped>
<style lang="scss" scoped>
.DeviceControlDialog {
width: 450px;
height: 210px;

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

@ -1,5 +1,5 @@
<template>
<Dialog v-model="obverseVisible" title="行车诱导">
<Dialog v-model="obverseVisible" title="行车诱导" width="25.5vw">
<div class="DrivingGuidance">
<Video class="video-stream" :pileNum="dialogData.stakeMark" />

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

@ -1,127 +1,178 @@
<template>
<Dialog v-model="modelVisible" title="设备操作">
<div class='DeviceControlDialog'>
<Dialog v-model="modelVisible" title="设备操作" width="23vw">
<div class="DeviceControlDialog">
<ElTabs v-model="activeName" class="tabs" @tab-click="tabClick">
<ElTabPane label="一般模式" name="first">
<Form v-model="formData" class="form" ref="FormConfigRef" :formList="formList1" column="1"
labelWidth="120px" />
<Form
v-model="formData"
class="form"
ref="FormConfigRef"
:formList="formList1"
column="1"
labelWidth="120px"
/>
</ElTabPane>
<ElTabPane label="自定义模式" name="second">
<div style="display: flex; margin: 20px 0;">
<p style="width: 115px;">工作时长():</p>
<el-input-number v-model="onWorkStatus2" :min="0" :max="999" label="工作时长(s分):"></el-input-number>
<div style="display: flex; margin: 20px 0">
<p style="width: 115px">工作时长():</p>
<el-input-number
v-model="onWorkStatus2"
:min="0"
:max="999"
label="工作时长(s分):"
></el-input-number>
</div>
<Table :data="tableData">
<ElTableColumn prop="ds" label="段数"></ElTableColumn>
<ElTableColumn prop="time" width="120" label="时间(豪秒)">
<template slot-scope="scope">
<div style="display: flex;">
<el-input-number style="width: 120px;" v-model="scope.row.time" :min="0"></el-input-number>
<div style="display: flex">
<el-input-number
style="width: 120px"
v-model="scope.row.time"
:min="0"
></el-input-number>
</div>
</template>
</ElTableColumn>
<ElTableColumn prop="A" label="线路A">
<template slot-scope="scope">
<el-switch active-value="1" inactive-value="0" v-model="scope.row.A" active-color="#13ce66"
inactive-color="#C9C9C9">
<el-switch
active-value="1"
inactive-value="0"
v-model="scope.row.A"
active-color="#13ce66"
inactive-color="#C9C9C9"
>
</el-switch>
</template>
</ElTableColumn>
<ElTableColumn prop="B" label="线路B">
<template slot-scope="scope">
<el-switch active-value="1" inactive-value="0" v-model="scope.row.B" active-color="#13ce66"
inactive-color="#C9C9C9">
<el-switch
active-value="1"
inactive-value="0"
v-model="scope.row.B"
active-color="#13ce66"
inactive-color="#C9C9C9"
>
</el-switch>
</template>
</ElTableColumn>
<ElTableColumn prop="C" label="线路C">
<template slot-scope="scope">
<el-switch active-value="1" inactive-value="0" v-model="scope.row.C" active-color="#13ce66"
inactive-color="#C9C9C9">
<el-switch
active-value="1"
inactive-value="0"
v-model="scope.row.C"
active-color="#13ce66"
inactive-color="#C9C9C9"
>
</el-switch>
</template>
</ElTableColumn>
<ElTableColumn prop="D" label="线路D">
<template slot-scope="scope">
<el-switch active-value="1" inactive-value="0" v-model="scope.row.D" active-color="#13ce66"
inactive-color="#C9C9C9">
<el-switch
active-value="1"
inactive-value="0"
v-model="scope.row.D"
active-color="#13ce66"
inactive-color="#C9C9C9"
>
</el-switch>
</template>
</ElTableColumn>
<ElTableColumn prop="E" label="线路E">
<template slot-scope="scope">
<el-switch active-value="1" inactive-value="0" v-model="scope.row.E" active-color="#13ce66"
inactive-color="#C9C9C9">
<el-switch
active-value="1"
inactive-value="0"
v-model="scope.row.E"
active-color="#13ce66"
inactive-color="#C9C9C9"
>
</el-switch>
</template>
</ElTableColumn>
<ElTableColumn prop="F" label="线路F">
<template slot-scope="scope">
<el-switch active-value="1" inactive-value="0" v-model="scope.row.F" active-color="#13ce66"
inactive-color="#C9C9C9">
<el-switch
active-value="1"
inactive-value="0"
v-model="scope.row.F"
active-color="#13ce66"
inactive-color="#C9C9C9"
>
</el-switch>
</template>
</ElTableColumn>
<ElTableColumn prop="G" label="线路G">
<template slot-scope="scope">
<el-switch active-value="1" inactive-value="0" v-model="scope.row.G" active-color="#13ce66"
inactive-color="#C9C9C9">
<el-switch
active-value="1"
inactive-value="0"
v-model="scope.row.G"
active-color="#13ce66"
inactive-color="#C9C9C9"
>
</el-switch>
</template>
</ElTableColumn>
<ElTableColumn prop="H" label="线路H">
<template slot-scope="scope">
<el-switch active-value="1" inactive-value="0" v-model="scope.row.H" active-color="#13ce66"
inactive-color="#C9C9C9">
<el-switch
active-value="1"
inactive-value="0"
v-model="scope.row.H"
active-color="#13ce66"
inactive-color="#C9C9C9"
>
</el-switch>
</template>
</ElTableColumn>
</Table>
</ElTabPane>
</ElTabs>
</div>
<template #footer>
<Button style="background-color: rgba(0, 179, 204, .3);" @click.native="modelVisible = false, submitting = false">
<Button
style="background-color: rgba(0, 179, 204, 0.3)"
@click.native="(modelVisible = false), (submitting = false)"
>
取消
</Button>
<Button @click.native="handleSubmit" :loading="submitting">
确定
</Button>
<Button @click.native="handleSubmit" :loading="submitting"> 确定 </Button>
</template>
</Dialog>
</template>
<script>
import Table from '@screen/components/Table.vue';
import Table from "@screen/components/Table.vue";
import Dialog from "@screen/components/Dialog/index.vue";
import Button from "@screen/components/Buttons/Button.vue"
import Form from '@screen/components/FormConfig';
import Button from "@screen/components/Buttons/Button.vue";
import Form from "@screen/components/FormConfig";
import request from "@/utils/request";
import { Message } from "element-ui";
export default {
name: 'DeviceControlDialog',
name: "DeviceControlDialog",
components: {
Dialog,
Button,
Form,
Table
Table,
},
model: {
prop: 'visible',
event: "update:value"
prop: "visible",
event: "update:value",
},
props: {
visible: Boolean,
deviceId: String
deviceId: String,
},
data() {
return {
@ -129,7 +180,28 @@ export default {
activeName: "first",
onWorkStatus2: 0,
formData: {},
duan: ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T'],
duan: [
"A",
"B",
"C",
"D",
"E",
"F",
"G",
"H",
"I",
"J",
"K",
"L",
"M",
"N",
"O",
"P",
"Q",
"R",
"S",
"T",
],
tableData: [
// {
// ds: 'A',
@ -154,15 +226,15 @@ export default {
options: [
{
value: "0",
label: "激光关闭"
label: "激光关闭",
},
{
value: "1",
label: "常亮模式"
label: "常亮模式",
},
{
value: "2",
label: "间隔100ms闪烁模式"
label: "间隔100ms闪烁模式",
},
{
value: "3",
@ -174,11 +246,11 @@ export default {
},
{
value: "5",
label: "2次闪烁模式"
label: "2次闪烁模式",
},
{
value: "6",
label: "SOS模式"
label: "SOS模式",
},
],
},
@ -191,8 +263,8 @@ export default {
type: "inputNumber",
options: {
min: 0,
max: 999
}
max: 999,
},
},
],
formList2: [
@ -202,7 +274,7 @@ export default {
type: "RadioGroup",
default: "00",
options: {
type: 'circle',
type: "circle",
options: [
{
key: "00",
@ -211,7 +283,7 @@ export default {
{
key: "01",
label: "闪烁",
}
},
],
},
},
@ -222,7 +294,7 @@ export default {
type: "select",
options: {
placeholder: "请选择",
}
},
},
{
label: "工作时长:",
@ -231,15 +303,15 @@ export default {
type: "select",
options: {
placeholder: "请选择",
}
},
},
],
rules: {
onWorkStatus: [
{ required: true, message: '工作时长不能为空', trigger: 'blur' },
{ required: true, message: "工作时长不能为空", trigger: "blur" },
],
}
}
},
};
},
computed: {
modelVisible: {
@ -248,12 +320,12 @@ export default {
// this.deviceId = 'K82+285';
this.initData();
}
return this.visible
return this.visible;
},
set(val) {
this.$emit('update:value', val)
}
}
this.$emit("update:value", val);
},
},
},
// watch: {
// modelVisible: {
@ -268,16 +340,16 @@ export default {
methods: {
async initData() {
//
let result = await this.requestURL('ASKMD');
let result = await this.requestURL("ASKMD");
if (result.data == 7) {
this.activeName = 'second';
this.activeName = "second";
this.tabClick();
} else {
this.formData.controlType = result.data + "" || '1';
this.formData.controlType = result.data + "" || "1";
//
let resultTime = await this.requestURL('ASKTM');
let resultTime = await this.requestURL("ASKTM");
this.formData.onWorkStatus = resultTime.data || 0;
this.activeName = 'first';
this.activeName = "first";
}
},
async requestURL(functionId, options = {}) {
@ -288,11 +360,11 @@ export default {
});
if (result.code != 200) return Message.error(result?.msg);
//SETMDASKMDSETTMASKTMSETDFASKDF
console.log('aaaa', result);
console.log("aaaa", result);
return result;
},
async tabClick() {
if (this.activeName == 'second') {
if (this.activeName == "second") {
//
let result = await request({
url: `/business/device/properties/latest/${this.deviceId}`,
@ -302,39 +374,43 @@ export default {
this.tableData = [];
let tData = [];
result.data.forEach(item => {
if (item.property == 'TM') {
result.data.forEach((item) => {
if (item.property == "TM") {
this.onWorkStatus2 = item.value;
} else if (item.property == 'MD') {
} else if (item.property == "MD") {
} else {
let data = JSON.parse(item.formatValue || {});
tData.push({ ...data, ds: item.property })
tData.push({ ...data, ds: item.property });
}
})
});
this.tableData = tData;
} else {
//
let resultTime = await this.requestURL('ASKTM');
let resultTime = await this.requestURL("ASKTM");
this.formData.onWorkStatus = resultTime.data || 0;
this.activeName = 'first';
this.activeName = "first";
}
},
async handleSubmit() {
if (this.activeName == 'first') {//
if (this.activeName == "first") {
//
this.$refs.FormConfigRef.validate().then(async (formData) => {
console.log('formData', formData);
console.log("formData", formData);
//
await this.requestURL('SETMD', { SET: formData.controlType })
await this.requestURL("SETMD", { SET: formData.controlType });
//
let res = await this.requestURL('SETTM', { SET: formData.onWorkStatus })
console.log('res', res)
let res = await this.requestURL("SETTM", {
SET: formData.onWorkStatus,
});
console.log("res", res);
if (res.code == 200) {
Message.success('设置成功!');
this.$emit('update:value', false)
Message.success("设置成功!");
this.$emit("update:value", false);
}
});
} else if (this.activeName == 'second') {//
} else if (this.activeName == "second") {
//
let rData = [];
this.tableData.forEach((it, index) => {
@ -350,8 +426,8 @@ export default {
F: Number(it.F),
G: Number(it.G),
H: Number(it.H),
})
})
});
});
//
await request({
@ -359,27 +435,23 @@ export default {
method: "post",
data: {
deviceId: this.deviceId,
functionId: 'SETDF',
params: rData
}
functionId: "SETDF",
params: rData,
},
});
//
let res = await this.requestURL('SETTM', { SET: this.onWorkStatus2 });
let res = await this.requestURL("SETTM", { SET: this.onWorkStatus2 });
if (res.code == 200) {
Message.success('设置成功!')
this.$emit('update:value', false)
Message.success("设置成功!");
this.$emit("update:value", false);
}
}
},
},
}
};
</script>
<style lang='scss' scoped>
<style lang="scss" scoped>
.DeviceControlDialog {
width: 860px;
max-height: 78vh;

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

@ -1,14 +1,23 @@
<template>
<Dialog v-model="obverseVisible" title="疲劳唤醒弹窗">
<Dialog v-model="obverseVisible" title="疲劳唤醒弹窗" width="18.5vw">
<div class="FatigueWakesUp">
<Video class="video-stream" :pileNum="dialogData.stakeMark" />
<ElTabs v-model="activeName" @tab-click="handleClickTabs" class="tabs">
<ElTabPane label="基本信息" name="first">
<Descriptions labelWidth="72px" :list="list" :data="data" style="gap: 18px" />
<Descriptions
labelWidth="72px"
:list="list"
:data="data"
style="gap: 18px"
/>
</ElTabPane>
<!-- <ElTabPane label="设备参数" name="second">设备参数</ElTabPane> -->
<ElTabPane label="在线率统计" name="third">
<LineChart v-if="activeName === 'third'" :productId="dialogData.id" style="height: 180px" />
<LineChart
v-if="activeName === 'third'"
:productId="dialogData.id"
style="height: 180px"
/>
</ElTabPane>
</ElTabs>
</div>
@ -17,7 +26,10 @@
<Button @click.native="deviceControlVisible = true">设备操作</Button>
</template>
<!-- 设备操作弹窗 -->
<DeviceControlDialog v-model="deviceControlVisible" :deviceId="dialogData.iotDeviceId" />
<DeviceControlDialog
v-model="deviceControlVisible"
:deviceId="dialogData.iotDeviceId"
/>
</Dialog>
</template>
@ -102,7 +114,7 @@ export default {
if (roadInfo) this.$set(this.data, "roadName", roadInfo.roadName);
},
methods: {
handleClickTabs() { },
handleClickTabs() {},
},
};
</script>
@ -143,7 +155,7 @@ export default {
align-items: center;
justify-content: end;
>div {
> div {
font-size: 16px;
padding: 6px 12px;
}

4
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/GuardrailCollision/index.vue

@ -1,5 +1,5 @@
<template>
<Dialog v-model="obverseVisible" title="护栏碰撞弹窗">
<Dialog v-model="obverseVisible" title="护栏碰撞弹窗" width="23vw">
<Video class="video-stream" :pileNum="dialogData.stakeMark" />
<div class="GuardrailCollision">
@ -179,7 +179,7 @@ div.switcher {
align-items: center;
justify-content: end;
>div {
> div {
font-size: 16px;
padding: 6px 12px;
}

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

@ -1,5 +1,5 @@
<template>
<Dialog class="HighwayDetails">
<Dialog class="HighwayDetails" width="23vw">
<div class="video-presentations">
<div class="video-item"></div>
<div class="video-item"></div>
@ -30,11 +30,11 @@ import Dialog from "@screen/components/Dialog/index.vue";
// G3- K091+065
export default {
name: 'HighwayDetails',
}
name: "HighwayDetails",
};
</script>
<style lang='scss' scoped>
<style lang="scss" scoped>
.HighwayDetails {
.video-presentation {
width: 100%;

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

@ -1,5 +1,5 @@
<template>
<Dialog v-model="obverseVisible" title="一类交调站弹窗">
<Dialog v-model="obverseVisible" title="一类交调站弹窗" width="23vw">
<Video class="video-stream" :pileNum="dialogData.stakeMark" />
<div class="Intermodulation">

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

@ -1,26 +1,43 @@
<template>
<Dialog v-model="obverseVisible" title="感知事件">
<Dialog v-model="obverseVisible" title="感知事件" width="37vw">
<div class="PerceiveEvent">
<!-- <Video class="item-video" /> -->
<div class="video-pic">
<Video style="height: 100%; flex: 1" :showHeader="false" :url="dialogData.formData.videoList[0]"
videoType="mp4" />
<Carousel style="flex: 1; height: 100%" :pictures="dialogData.formData.pictures" />
<Video
style="height: 100%; flex: 1"
:showHeader="false"
:url="dialogData.formData.videoList[0]"
videoType="mp4"
/>
<Carousel
style="flex: 1; height: 100%"
:pictures="dialogData.formData.pictures"
/>
</div>
<LineChart class="chart" />
<Form class="form" v-loading="loading" v-model="data" ref="FormConfigRef" :formList="formList" column="1" />
<Form
class="form"
v-loading="loading"
v-model="data"
ref="FormConfigRef"
:formList="formList"
column="1"
/>
</div>
<template #footer>
<Button>误报</Button>
<Button style="background-color: rgba(0, 179, 204, 0.3)" @click.native="obverseVisible = false">取消</Button>
<Button
style="background-color: rgba(0, 179, 204, 0.3)"
@click.native="obverseVisible = false"
>取消</Button
>
<Button @click.native="updateEvent" :loading="btnLoading">确定</Button>
</template>
</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";
@ -31,7 +48,12 @@ import request from "@/utils/request";
import { Message } from "element-ui";
import moment from "moment";
import Carousel from "@screen/pages/control/event/event/EventDetailDialog/Carousel";
import { WarningTypeList, WarningSubclassList, LaneOccupancyList, DirectionTypes } from "@screen/utils/enum.js";
import {
WarningTypeList,
WarningSubclassList,
LaneOccupancyList,
DirectionTypes,
} from "@screen/utils/enum.js";
// import { getRoadInfoByStakeMark, getProduct } from "@screen/pages/Home/components/RoadAndEvents/utils/httpList.js"
import { dialogDelayVisible } from "./../mixin";
@ -179,7 +201,7 @@ export default {
this.getDetails();
this.getVehicleTypeList();
},
async mounted() { },
async mounted() {},
beforeDestroy() {
clearInterval(this.interval);
},
@ -202,7 +224,7 @@ export default {
})
);
})
.catch((err) => { });
.catch((err) => {});
},
convertSecToHHmmss(sec) {
let currentTime = moment.duration(sec, "seconds");

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

@ -1,6 +1,6 @@
<template>
<Dialog v-model="modelVisible" title="设备操作">
<div class='DeviceControlDialog'>
<Dialog v-model="modelVisible" title="设备操作" width="23vw">
<div class="DeviceControlDialog">
<DeviceParams :dialogData="dialogData" />
</div>
</Dialog>
@ -8,39 +8,39 @@
<script>
import Dialog from "@screen/components/Dialog/index.vue";
import DeviceParams from "./DeviceParams.vue"
import DeviceParams from "./DeviceParams.vue";
export default {
name: 'DeviceControlDialog',
name: "DeviceControlDialog",
components: {
Dialog,
DeviceParams
DeviceParams,
},
model: {
prop: 'visible',
event: "update:value"
prop: "visible",
event: "update:value",
},
props: {
visible: Boolean,
dialogData: {
type: Object,
default: () => ({})
default: () => ({}),
},
},
computed: {
modelVisible: {
get() {
return this.visible
return this.visible;
},
set(val) {
this.$emit('update:value', val)
}
}
}
}
this.$emit("update:value", val);
},
},
},
};
</script>
<style lang='scss' scoped>
<style lang="scss" scoped>
.DeviceControlDialog {
width: 510px;
display: flex;

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

@ -1,5 +1,5 @@
<template>
<Dialog v-model="obverseVisible" title="智能设备箱">
<Dialog v-model="obverseVisible" title="智能设备箱" width="23vw">
<Video class="video-stream" :pileNum="dialogData.stakeMark" />
<div class="SmartDevice">

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

@ -1,12 +1,32 @@
<template>
<Dialog v-model="obverseVisible" :title="dialogData._itemData && dialogData._itemData.title">
<Dialog
v-model="obverseVisible"
:title="dialogData._itemData && dialogData._itemData.title"
width="25.5vw"
>
<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
class="video-stream"
:pileNum="dialogData.stakeMark"
rangeIndex="upCamera"
:showHeader="false"
/>
<Video
class="video-stream"
:pileNum="dialogData.stakeMark"
rangeIndex="downCamera"
:showHeader="false"
/>
</div>
<Descriptions labelWidth="72px" :list="list" :data="data" style="gap: 18px" column="7" />
<Descriptions
labelWidth="72px"
:list="list"
:data="data"
style="gap: 18px"
column="7"
/>
</div>
</Dialog>
</template>
@ -119,12 +139,12 @@ export default {
if (code != 200) return;
this.data = { ...data, ...this.data };
console.log('trafficIncidents', data);
console.log("trafficIncidents", data);
})
.catch((err) => { });
.catch((err) => {});
},
methods: {
handleClickTabs() { },
handleClickTabs() {},
},
};
</script>
@ -145,7 +165,7 @@ export default {
display: flex;
gap: 9px;
>div.video-stream {
> div.video-stream {
height: 210px;
}
}
@ -173,7 +193,7 @@ export default {
align-items: center;
justify-content: end;
>div {
> div {
font-size: 16px;
padding: 6px 12px;
}

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

@ -1,5 +1,5 @@
<template>
<Dialog class="WakeUpLightCurtainInfo">
<Dialog class="WakeUpLightCurtainInfo" width="23vw">
<div class="operation-btn">
<div class="photo-btn">图像</div>
<div class="video-btn">视频</div>
@ -44,11 +44,11 @@ import Dialog from "@screen/components/Dialog/index.vue";
//
export default {
name: 'WakeUpLightCurtainInfo',
}
name: "WakeUpLightCurtainInfo",
};
</script>
<style lang='scss' scoped>
<style lang="scss" scoped>
.WakeUpLightCurtainInfo {
.video-presentation {
width: 100%;
@ -93,7 +93,6 @@ export default {
border: 1px solid #00bbd4;
background: #00bbd4;
}
}
.list-content {

15
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/WeatherForecast/index.vue

@ -1,18 +1,17 @@
<template>
<Dialog class="WeatherForecast">
s
</Dialog>
<Dialog class="WeatherForecast" width="23vw"> s </Dialog>
</template>
<script>
import Dialog from "@screen/components/Dialog/index.vue"
import Dialog from "@screen/components/Dialog/index.vue";
//
export default {
name: 'WeatherForecast',
}
name: "WeatherForecast",
};
</script>
<style lang='scss' scoped>
.WeatherForecast {}
<style lang="scss" scoped>
.WeatherForecast {
}
</style>

6
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/dutyOfficer/components/ModifyDutyInformationTable.vue

@ -1,5 +1,9 @@
<template>
<Dialog v-model="visibleModel" :title="`${data ? '修改' : '新增'}值班信息表`">
<Dialog
v-model="visibleModel"
:title="`${data ? '修改' : '新增'}值班信息表`"
width="40vw"
>
<div class="ModifyDutyInformationTable">
<div class="body">
<Form v-if="!data" :formList="formList" column="2" ref="FormRef" />

2
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/dutyOfficer/components/OperateRecord.vue

@ -1,5 +1,5 @@
<template>
<Dialog v-model="visibleModel" title="操作记录">
<Dialog v-model="visibleModel" title="操作记录" width="23vw">
<div class="OperateRecord">
<TimeLine
v-if="timeLine2List.length"

2
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/emergencyAgencies/components/AddNEditDialog.vue

@ -1,5 +1,5 @@
<template>
<Dialog v-model="modelVisible" :title="data ? '修改' : '新增'">
<Dialog v-model="modelVisible" :title="data ? '修改' : '新增'" width="23vw">
<div class="AddNEditDialog">
<Form
v-model="formData"

161
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/firstResponders/components/AddNEditDialog.vue

@ -1,45 +1,53 @@
<template>
<Dialog v-model="modelVisible" :title="data ? '修改' : '新增'">
<div class='AddNEditDialog'>
<Form v-model="formData" class="form" ref="FormConfigRef" :formList="formList" column="1" labelWidth="90px" />
<Dialog v-model="modelVisible" :title="data ? '修改' : '新增'" width="23vw">
<div class="AddNEditDialog">
<Form
v-model="formData"
class="form"
ref="FormConfigRef"
:formList="formList"
column="1"
labelWidth="90px"
/>
</div>
<template #footer>
<Button style="background-color: rgba(0, 179, 204, .3);" @click.native="modelVisible = false, submitting = false">
<Button
style="background-color: rgba(0, 179, 204, 0.3)"
@click.native="(modelVisible = false), (submitting = false)"
>
取消
</Button>
<Button @click.native="handleSubmit" :loading="submitting">
确定
</Button>
<Button @click.native="handleSubmit" :loading="submitting"> 确定 </Button>
</template>
</Dialog>
</template>
<script>
import Dialog from "@screen/components/Dialog/index.vue";
import Button from "@screen/components/Buttons/Button.vue"
import Form from '@screen/components/FormConfig';
import Button from "@screen/components/Buttons/Button.vue";
import Form from "@screen/components/FormConfig";
import request from "@/utils/request";
import { getSelectOptionsStation } from "@screen/pages/control/event/businessDataManagement/utils.js";
import { Message } from "element-ui";
export default {
name: 'AddNEditDialog',
name: "AddNEditDialog",
components: {
Dialog,
Button,
Form
Form,
},
model: {
prop: 'visible',
event: "update:value"
prop: "visible",
event: "update:value",
},
props: {
visible: Boolean,
data: Object
data: Object,
},
inject: ['setCurrentPage'],
inject: ["setCurrentPage"],
data() {
return {
submitting: false,
@ -48,7 +56,7 @@ export default {
{
label: "人员名称:",
key: "name",
required: true
required: true,
},
{
label: "手机号码:",
@ -56,9 +64,9 @@ export default {
required: true,
rules: [
{
type: 'phone'
}
]
type: "phone",
},
],
},
{
label: "岗位:",
@ -66,8 +74,8 @@ export default {
required: true,
type: "select",
options: {
options: []
}
options: [],
},
},
{
label: "机构:",
@ -75,21 +83,21 @@ export default {
required: true,
type: "select",
options: {
options: []
}
options: [],
},
},
]
}
],
};
},
computed: {
modelVisible: {
get() {
return this.visible
return this.visible;
},
set(val) {
this.$emit('update:value', val)
}
}
this.$emit("update:value", val);
},
},
},
watch: {
modelVisible: {
@ -98,12 +106,12 @@ export default {
if (!bool) return;
this.formData = {
...this.data
}
...this.data,
};
this.getOptions();
}
}
},
},
},
methods: {
getOptions() {
@ -112,64 +120,65 @@ export default {
request({
url: `/business/employees/sysPost`,
method: "post",
data: {}
data: {},
}),
// ,
getSelectOptionsStation(2)
])
.then(([post, organization]) => {
if (post.status === 'fulfilled' && post.value.code == 200) {
this.formList[2].options.options = post.value.data.map(item => ({
key: item.postId + "",
label: item.postName,
}))
}
getSelectOptionsStation(2),
]).then(([post, organization]) => {
if (post.status === "fulfilled" && post.value.code == 200) {
this.formList[2].options.options = post.value.data.map((item) => ({
key: item.postId + "",
label: item.postName,
}));
}
if (organization.status === 'fulfilled' && Array.isArray(organization.value)) {
this.formList[3].options.options = organization.value;
}
})
if (
organization.status === "fulfilled" &&
Array.isArray(organization.value)
) {
this.formList[3].options.options = organization.value;
}
});
},
handleSubmit() {
this.$refs.FormConfigRef.validate()
.then((data) => {
this.submitting = true;
if (this.data) data.id = this.data.id;
request({
url: `/business/employees`,
method: this.data ? 'PUT' : 'POST',
data
})
.then(result => {
if (result.code != 200) return Message.error(`提交失败!`);
Message.success(`提交成功!`);
this.$refs.FormConfigRef.validate().then((data) => {
this.submitting = true;
this.modelVisible = false;
if (this.data) data.id = this.data.id;
this.setCurrentPage(1)
})
.catch((err) => {
console.log("%c [ err ]-110-「DeviceControlDialog.vue」", "font-size:15px; background:#547bf2; color:#98bfff;", err);
Message.error(`提交失败!`);
})
.finally(() => {
this.submitting = false;
})
request({
url: `/business/employees`,
method: this.data ? "PUT" : "POST",
data,
})
.then((result) => {
if (result.code != 200) return Message.error(`提交失败!`);
Message.success(`提交成功!`);
this.modelVisible = false;
}
this.setCurrentPage(1);
})
.catch((err) => {
console.log(
"%c [ err ]-110-「DeviceControlDialog.vue」",
"font-size:15px; background:#547bf2; color:#98bfff;",
err
);
Message.error(`提交失败!`);
})
.finally(() => {
this.submitting = false;
});
});
},
},
}
};
</script>
<style lang='scss' scoped>
<style lang="scss" scoped>
.AddNEditDialog {
width: 450px;
height: 150px;

2
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/jurisdictionalManagement/components/AddNEditDialog.vue

@ -1,5 +1,5 @@
<template>
<Dialog v-model="modelVisible" :title="data ? '修改' : '新增11'">
<Dialog v-model="modelVisible" :title="data ? '修改' : '新增'" width="23vw">
<div class="AddNEditDialog">
<Form
:value="formData"

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

@ -1,18 +1,17 @@
<template>
<Dialog v-model="modelVisible" title="事件详情">
<Dialog v-model="modelVisible" title="事件详情" width="35vw">
<div class="EventDetail">
<Form :formList="formList" :dFormData="formData" label-width="100px" />
<div class="video">
<Video style="height: 100%; width: 600px;" />
<Video style="height: 100%; width: 600px" />
</div>
<div class="pic">
<Carousel style="flex: 1;height: 80%;" />
<Carousel style="flex: 1; height: 80%" />
</div>
<!-- <TimeLine1 :data="timeLine1List" />
<TimeLine2 :data="timeLine2List" style="flex: 1;" /> -->
</div>
<!-- <template #footer>
<Button style="padding: 0 24px;" @click.native="modelVisible = false">确认</Button>
@ -25,17 +24,17 @@
import Dialog from "@screen/components/Dialog/index";
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 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 Carousel from "./Carousel/index.vue"
import Button from '@screen/components/Buttons/Button.vue';
import Carousel from "./Carousel/index.vue";
import Button from "@screen/components/Buttons/Button.vue";
import request from "@/utils/request";
var moment = require("moment");
export default {
name: 'EventDetail',
name: "EventDetail",
components: {
Dialog,
Form,
@ -43,37 +42,39 @@ export default {
TimeLine2,
Video,
Carousel,
Button
Button,
},
model: {
prop: 'visible',
event: 'update:value'
prop: "visible",
event: "update:value",
},
props: {
visible: Boolean,
formData: {
type: Object,
default: () => { }
}
default: () => {},
},
},
data() {
return {
formList,
timeLine1List: [{
time: "",
label: "",
isActive: false,
}],
timeLine1List: [
{
time: "",
label: "",
isActive: false,
},
],
timeLine2List: [
{
time: "",
name: "",
desc: '',
desc: "",
posts: "",
direction: "left",
}
},
],
}
};
},
computed: {
modelVisible: {
@ -84,62 +85,55 @@ export default {
return this.visible;
},
set(val) {
this.$emit('update:value', val)
}
}
this.$emit("update:value", val);
},
},
},
methods: {
getProcess() {
let directionFlg = true;
request({
url: `/system/process/list`,
method: "get",
params: { eventId: this.formData.id }
}).then(result => {
params: { eventId: this.formData.id },
}).then((result) => {
if (result.code != 200) return Message.error(result?.msg);
const rows = result.rows;
this.timeLine1List = [];
this.timeLine2List = [];
this.formData?.processConfigList.forEach(it => {
const process = rows.find(row => it.nodeNode == row.processId);
this.formData?.processConfigList.forEach((it) => {
const process = rows.find((row) => it.nodeNode == row.processId);
if (process) {
this.timeLine1List.push(
{
time: moment(process.operationTime || new Date()).format('HH:mm'),
label: it.processNode,
isActive: true,
}
);
this.timeLine1List.push({
time: moment(process.operationTime || new Date()).format("HH:mm"),
label: it.processNode,
isActive: true,
});
this.timeLine2List.push({
time: moment(process.operationTime || new Date()).format('yyyy-MM-DD HH:mm:ss'),
time: moment(process.operationTime || new Date()).format(
"yyyy-MM-DD HH:mm:ss"
),
name: process.operator,
desc: process.context,
posts: "",
direction: directionFlg ? 'left' : 'right',
})
direction: directionFlg ? "left" : "right",
});
directionFlg = !directionFlg;
} else {
this.timeLine1List.push(
{
time: "",
label: it.processNode,
isActive: false,
}
)
this.timeLine1List.push({
time: "",
label: it.processNode,
isActive: false,
});
}
})
})
}
}
}
});
});
},
},
};
</script>
<style lang="scss" scoped>
@ -154,7 +148,7 @@ export default {
display: flex;
justify-content: center;
height: 300px;
gap: 15px
gap: 15px;
}
.pic {
height: 250px;

65
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/dispatch/EventDispatchDialog/index.vue

@ -1,26 +1,27 @@
<template>
<Dialog v-model="modelVisible" title="调度记录">
<Dialog v-model="modelVisible" title="调度记录" width="28vw">
<div class="EventDetail">
<BlackBar class="left">
<!-- <img src="./images/test.png" style="width: 100%;" /> -->
<div class="example">
<div class="title">
<h3>调度记录</h3>
<span>
{{ startTime }} {{ endTime }}
</span>
<span> {{ startTime }} {{ endTime }} </span>
</div>
<div class="body">
<p v-for="(item, index) in data" :key="index">{{ `${beautifyOperationTime(item.operationTime)}
${item.context}${item.operator}` }}
<p v-for="(item, index) in data" :key="index">
{{
`${beautifyOperationTime(item.operationTime)}
${item.context}${item.operator}`
}}
</p>
</div>
</div>
<!-- <div style="width: 900px;height: 900px; background-color: #0F191E;"></div> -->
</BlackBar>
<div class="right">
<img src="./images/image.svg">
<img src="./images/printer.svg">
<img src="./images/image.svg" />
<img src="./images/printer.svg" />
</div>
</div>
</Dialog>
@ -30,28 +31,28 @@
import Dialog from "@screen/components/Dialog/index";
import BlackBar from "@screen/components/Scrollbar/BlackBar.vue";
import request from "@/utils/request";
import moment from 'moment/moment';
import moment from "moment/moment";
export default {
name: 'EventDetail',
name: "EventDetail",
components: {
Dialog,
BlackBar
BlackBar,
},
model: {
prop: 'visible',
event: 'update:value'
prop: "visible",
event: "update:value",
},
props: {
visible: Boolean,
eventId: String
eventId: String,
},
data() {
return {
data: [],
startTime: '',
endTime: ''
}
startTime: "",
endTime: "",
};
},
computed: {
modelVisible: {
@ -60,9 +61,9 @@ export default {
return this.visible;
},
set(val) {
this.$emit('update:value', val)
}
}
this.$emit("update:value", val);
},
},
},
methods: {
initData() {
@ -75,19 +76,25 @@ export default {
this.data = result.rows;
let length = result.rows.length;
if (length > 0 && result.rows[0].operationTime) {
this.startTime = moment(result.rows[0].operationTime).format("YYYY年MM月DD日 HH时mm分ss秒") || '';
this.startTime =
moment(result.rows[0].operationTime).format(
"YYYY年MM月DD日 HH时mm分ss秒"
) || "";
}
if (length > 1 && result.rows[length - 1].operationTime) {
this.endTime = moment(result.rows[length - 1].operationTime).format("YYYY年MM月DD日 HH时mm分ss秒") || '';
this.endTime =
moment(result.rows[length - 1].operationTime).format(
"YYYY年MM月DD日 HH时mm分ss秒"
) || "";
}
// this.total = result.total;
});
},
beautifyOperationTime(time) {
return moment(time).format('YYYY-MM-DD HH:mm:ss')
}
}
}
return moment(time).format("YYYY-MM-DD HH:mm:ss");
},
},
};
</script>
<style lang="scss" scoped>
@ -105,17 +112,17 @@ export default {
flex-direction: column;
gap: 9px;
>div {
> div {
display: flex;
flex-direction: column;
}
>.body {
> .body {
gap: 6px;
font-size: 13px;
}
>.title {
> .title {
align-items: center;
border-bottom: 1px solid white;
padding-bottom: 6px;

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

@ -1,264 +1,297 @@
<template>
<Dialog v-model="modelVisible" title="配置常用语">
<!-- <Button style="margin: 10px 0 20px 20px; width: 100px;" @click.native="onAdd">添加</Button> -->
<div class="header">
<el-form ref="form" label-width="120px">
<el-form-item label="事件类型">
<el-select v-model="eventType" placeholder="请选择" style="width: 220px" disabled>
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</el-form-item>
</el-form>
</div>
<div>
<TimeLine1 :data="process" @update:tableData="updateTableData" />
</div>
<div class="EventDetail">
<Table :data="getTableData()" :show-header="false">
<ElTableColumn label="步骤" width="110" align="center">
<template slot-scope="scope">
{{ `${scope.$index + 1}` }}
</template>
</ElTableColumn>
<ElTableColumn prop="phrases" label="常用语" width="550" align="center">
<template slot-scope="scope">
<ElInput type="textarea" style="margin-top: 5px;" v-model="scope.row.phrases"
:autosize="{ minRows: 2, maxRows: 2 }" :maxlength="150" showWordLimit placeholder="请输入常用语内容" />
</template>
</ElTableColumn>
<ElTableColumn label="操作" width="160" align="center">
<template slot-scope="scope">
<ElButton class="elButton" icon="el-icon-plus" plain size="mini"
@click.native="onAdd(scope.row.id)" />
<ElButton class="elButton" icon="el-icon-delete" plain size="mini"
@click.native="onDel(scope.$index)" />
</template>
</ElTableColumn>
</Table>
</div>
<template #footer>
<Button :style="{ backgroundColor: '#C9C9C9', padding: '0 24px' }" @click.native="modelVisible = false">
取消</Button>
<Button style="padding: 0 24px;" @click.native="submitTable">确认</Button>
</template>
</Dialog>
<Dialog v-model="modelVisible" title="配置常用语" width="35vw">
<!-- <Button style="margin: 10px 0 20px 20px; width: 100px;" @click.native="onAdd">添加</Button> -->
<div class="header">
<el-form ref="form" label-width="120px">
<el-form-item label="事件类型">
<el-select
v-model="eventType"
placeholder="请选择"
style="width: 220px"
disabled
>
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
</el-form>
</div>
<div>
<TimeLine1 :data="process" @update:tableData="updateTableData" />
</div>
<div class="EventDetail">
<Table :data="getTableData()" :show-header="false">
<ElTableColumn label="步骤" width="110" align="center">
<template slot-scope="scope">
{{ `${scope.$index + 1}` }}
</template>
</ElTableColumn>
<ElTableColumn prop="phrases" label="常用语" width="550" align="center">
<template slot-scope="scope">
<ElInput
type="textarea"
style="margin-top: 5px"
v-model="scope.row.phrases"
:autosize="{ minRows: 2, maxRows: 2 }"
:maxlength="150"
showWordLimit
placeholder="请输入常用语内容"
/>
</template>
</ElTableColumn>
<ElTableColumn label="操作" width="160" align="center">
<template slot-scope="scope">
<ElButton
class="elButton"
icon="el-icon-plus"
plain
size="mini"
@click.native="onAdd(scope.row.id)"
/>
<ElButton
class="elButton"
icon="el-icon-delete"
plain
size="mini"
@click.native="onDel(scope.$index)"
/>
</template>
</ElTableColumn>
</Table>
</div>
<template #footer>
<Button
:style="{ backgroundColor: '#C9C9C9', padding: '0 24px' }"
@click.native="modelVisible = false"
>
取消</Button
>
<Button style="padding: 0 24px" @click.native="submitTable">确认</Button>
</template>
</Dialog>
</template>
<script>
import Dialog from "@screen/components/Dialog/index";
import Table from '@screen/components/Table.vue';
import Button from '@screen/components/Buttons/Button.vue';
import Table from "@screen/components/Table.vue";
import Button from "@screen/components/Buttons/Button.vue";
import request from "@/utils/request";
import TimeLine1 from "@screen/components/TimeLine/LineClick/index";
import { Message } from 'element-ui'
import { Message } from "element-ui";
export default {
name: 'EventDetail',
components: {
Dialog,
Button,
Table,
TimeLine1
},
model: {
prop: 'visible',
event: 'update:value'
},
props: {
visible: Boolean,
eventType: Number,
// process: {
// type: Array,
// default: () => []
// }
},
data() {
return {
tableData: [{
phrases: ''
}],
// eventType: 1,
options: [
{
value: 1,
label: '交通事故'
},
{
value: 2,
label: '车辆故障'
},
{
value: 3,
label: '交通管制'
},
{
value: 4,
label: '交通拥堵'
},
{
value: 5,
label: '非法上路'
},
{
value: 6,
label: '路障清除'
},
{
value: 7,
label: '施工建设'
},
{
value: 8,
label: '服务区异常'
},
{
value: 9,
label: '设施设备隐患'
},
{
value: 10,
label: '异常天气'
},
{
value: 11,
label: '其他事件'
}
],
process: [],
id: 0
}
},
computed: {
modelVisible: {
get() {
if (this.visible) {
this.getProcess();
}
return this.visible;
},
set(val) {
this.$emit('update:value', val)
}
}
},
methods: {
getProcess() {
this.tableData = [];
request({
url: `/business/dcEventType/${this.eventType}`,
method: "get",
}).then(result => {
if (result.code != 200) return Message.error(result.msg);
//
this.process = [];
this.tableData = [];
result.data.processConfigList?.forEach((it, index) => {
let commonPhrasesArr = it.commonPhrases ? it.commonPhrases.split(',') : [''];
let phrs = [];
commonPhrasesArr?.forEach(phr => {
phrs.push({ id: it.id, phrases: phr })
})
this.process.push({
...it,
phrs: phrs,
label: it.processNode,
isActive: index == 0 ? true : false,
})
if (index == 0) {
this.id = it.id;
this.tableData = phrs;
}
})
})
name: "EventDetail",
components: {
Dialog,
Button,
Table,
TimeLine1,
},
model: {
prop: "visible",
event: "update:value",
},
props: {
visible: Boolean,
eventType: Number,
// process: {
// type: Array,
// default: () => []
// }
},
data() {
return {
tableData: [
{
phrases: "",
},
],
// eventType: 1,
options: [
{
value: 1,
label: "交通事故",
},
{
value: 2,
label: "车辆故障",
},
{
value: 3,
label: "交通管制",
},
{
value: 4,
label: "交通拥堵",
},
getTableData() {
let rows = this.process.find(item => item.id == this.id);
return rows?.phrs || [];
{
value: 5,
label: "非法上路",
},
updateTableData(id = 1) {
this.id = id;
this.tableData = [];
let pros = this.process.find(item => item.id == id);
this.tableData = pros.phrs;
{
value: 6,
label: "路障清除",
},
onAdd(id) {
this.tableData.push({
id: id,
phrases: ''
})
{
value: 7,
label: "施工建设",
},
onDel(index) {
if (this.tableData.length <= 1) {
return Message.warning('最后一项不可删除!');
}
this.tableData.splice(index, 1)
{
value: 8,
label: "服务区异常",
},
submitTable() {
let data = []
this.process.forEach((lc) => {
let commonPhrases = [];
lc.phrs.forEach(phr => { if (phr.phrases) commonPhrases.push(phr.phrases) })
data.push({
commonPhrases: commonPhrases.join(','),
id: lc.id,
eventType: lc.eventType,
nodeNode: lc.nodeNode,
processNode: lc.processNode
})
})
console.log('data', data)
// return;
request({
url: `/business/dcEventType/updateDcProcessConfig`,
method: "post",
data: {
eventType: this.eventType,
processConfigList: data
}
}).then(result => {
if (result.code != 200) return Message.error(result.msg);
Message.success(result.msg);
this.modelVisible = false;
this.$emit('reInitData', true)
})
{
value: 9,
label: "设施设备隐患",
},
{
value: 10,
label: "异常天气",
},
{
value: 11,
label: "其他事件",
},
],
process: [],
id: 0,
};
},
computed: {
modelVisible: {
get() {
if (this.visible) {
this.getProcess();
}
}
}
return this.visible;
},
set(val) {
this.$emit("update:value", val);
},
},
},
methods: {
getProcess() {
this.tableData = [];
request({
url: `/business/dcEventType/${this.eventType}`,
method: "get",
}).then((result) => {
if (result.code != 200) return Message.error(result.msg);
//
this.process = [];
this.tableData = [];
result.data.processConfigList?.forEach((it, index) => {
let commonPhrasesArr = it.commonPhrases
? it.commonPhrases.split(",")
: [""];
let phrs = [];
commonPhrasesArr?.forEach((phr) => {
phrs.push({ id: it.id, phrases: phr });
});
this.process.push({
...it,
phrs: phrs,
label: it.processNode,
isActive: index == 0 ? true : false,
});
if (index == 0) {
this.id = it.id;
this.tableData = phrs;
}
});
});
},
getTableData() {
let rows = this.process.find((item) => item.id == this.id);
return rows?.phrs || [];
},
updateTableData(id = 1) {
this.id = id;
this.tableData = [];
let pros = this.process.find((item) => item.id == id);
this.tableData = pros.phrs;
},
onAdd(id) {
this.tableData.push({
id: id,
phrases: "",
});
},
onDel(index) {
if (this.tableData.length <= 1) {
return Message.warning("最后一项不可删除!");
}
this.tableData.splice(index, 1);
},
submitTable() {
let data = [];
this.process.forEach((lc) => {
let commonPhrases = [];
lc.phrs.forEach((phr) => {
if (phr.phrases) commonPhrases.push(phr.phrases);
});
data.push({
commonPhrases: commonPhrases.join(","),
id: lc.id,
eventType: lc.eventType,
nodeNode: lc.nodeNode,
processNode: lc.processNode,
});
});
console.log("data", data);
// return;
request({
url: `/business/dcEventType/updateDcProcessConfig`,
method: "post",
data: {
eventType: this.eventType,
processConfigList: data,
},
}).then((result) => {
if (result.code != 200) return Message.error(result.msg);
Message.success(result.msg);
this.modelVisible = false;
this.$emit("reInitData", true);
});
},
},
};
</script>
<style lang="scss" scoped>
.EventDetail {
display: flex;
gap: 9px;
width: 836px;
// height: 768px;
min-height: 500px;
margin-top: 20px;
flex-direction: column;
display: flex;
gap: 9px;
width: 836px;
// height: 768px;
min-height: 500px;
margin-top: 20px;
flex-direction: column;
.video-pic {
display: flex;
height: 150px;
gap: 15px
}
.video-pic {
display: flex;
height: 150px;
gap: 15px;
}
}
.elButton {
background: #2ba8c3;
border-radius: 2px 2px 2px 2px;
color: #FFFFFF;
background: #2ba8c3;
border-radius: 2px 2px 2px 2px;
color: #ffffff;
}
.elButton:hover,
.elButton:focus {
background: #2ba8c3;
border-radius: 2px 2px 2px 2px;
border-color: #FFFFFF;
color: #FFFFFF;
background: #2ba8c3;
border-radius: 2px 2px 2px 2px;
border-color: #ffffff;
color: #ffffff;
}
</style>

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

@ -1,31 +1,48 @@
<template>
<Dialog v-model="modelVisible" title="配置处置流程">
<div class="header">
<el-form ref="form" label-width="120px">
<el-form-item label="事件类型">
<el-select v-model="eventType" placeholder="请选择" style="width: 220px" disabled>
<el-option v-for="item in eventTypeOptions" :key="item.value" :label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
</el-form>
</div>
<div class="EventDetail">
<Table :data="tableData" :show-header="false">
<ElTableColumn label="步骤" width="110" align="center">
<template slot-scope="scope">
{{ `${scope.$index + 1}` }}
</template>
</ElTableColumn>
<ElTableColumn prop="phrases" label="处置流程" width="570" align="center">
<template slot-scope="scope">
<ElInput v-model="scope.row.processNode" placeholder="请输入流程名称" />
<ElForm :model="scope.row" inline :ref="'scopeForm' + scope.$index">
<!-- <ElFormItem label="流程名称" :rules="[{ required: true, message: '流程名称不能为空' }]">
<Dialog v-model="modelVisible" title="配置处置流程" width="35vw">
<div class="header">
<el-form ref="form" label-width="120px">
<el-form-item label="事件类型">
<el-select
v-model="eventType"
placeholder="请选择"
style="width: 220px"
disabled
>
<el-option
v-for="item in eventTypeOptions"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
</el-form>
</div>
<div class="EventDetail">
<Table :data="tableData" :show-header="false">
<ElTableColumn label="步骤" width="110" align="center">
<template slot-scope="scope">
{{ `${scope.$index + 1}` }}
</template>
</ElTableColumn>
<ElTableColumn
prop="phrases"
label="处置流程"
width="570"
align="center"
>
<template slot-scope="scope">
<ElInput
v-model="scope.row.processNode"
placeholder="请输入流程名称"
/>
<ElForm :model="scope.row" inline :ref="'scopeForm' + scope.$index">
<!-- <ElFormItem label="流程名称" :rules="[{ required: true, message: '流程名称不能为空' }]">
<ElInput v-model="scope.row.processNode" placeholder="请输入流程名称" />
</ElFormItem> -->
<!-- <ElFormItem label="常用语">
<!-- <ElFormItem label="常用语">
<ElSelect class="disposal-process-select" v-model="scope.row.commonPhrases" multiple
:collapse-tags="true">
<ElOption v-for="item in options" :key="item.key || item.value" :label="item.label"
@ -33,301 +50,310 @@
</ElOption>
</ElSelect>
</ElFormItem> -->
</ElForm>
<!-- <Form :formList="formList" :dFormData="scope.row" label-width="100px" /> -->
</template>
</ElTableColumn>
<ElTableColumn label="操作" width="150" align="center">
<template slot-scope="scope">
<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(scope.$index)" />
</template>
</ElTableColumn>
</Table>
</div>
<template #footer>
<Button :style="{ backgroundColor: '#C9C9C9', padding: '0 24px' }" @click.native="modelVisible = false">
取消</Button>
<Button style="padding: 0 24px;" @click.native="submitTable">确认</Button>
</template>
</Dialog>
</ElForm>
<!-- <Form :formList="formList" :dFormData="scope.row" label-width="100px" /> -->
</template>
</ElTableColumn>
<ElTableColumn label="操作" width="150" align="center">
<template slot-scope="scope">
<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(scope.$index)"
/>
</template>
</ElTableColumn>
</Table>
</div>
<template #footer>
<Button
:style="{ backgroundColor: '#C9C9C9', padding: '0 24px' }"
@click.native="modelVisible = false"
>
取消</Button
>
<Button style="padding: 0 24px" @click.native="submitTable">确认</Button>
</template>
</Dialog>
</template>
<script>
import Dialog from "@screen/components/Dialog/index";
import Table from '@screen/components/Table.vue';
import Button from '@screen/components/Buttons/Button.vue';
import Form from '@screen/components/FormConfig';
import { Message } from 'element-ui'
import Table from "@screen/components/Table.vue";
import Button from "@screen/components/Buttons/Button.vue";
import Form from "@screen/components/FormConfig";
import { Message } from "element-ui";
import request from "@/utils/request";
export default {
name: 'EventDetail',
components: {
Dialog,
Button,
Table,
Form
name: "EventDetail",
components: {
Dialog,
Button,
Table,
Form,
},
model: {
prop: "visible",
event: "update:value",
},
props: {
visible: Boolean,
phrasesData: {
type: Array,
default: () => [],
},
model: {
prop: 'visible',
event: 'update:value'
},
props: {
visible: Boolean,
phrasesData: {
type: Array,
default: () => []
eventType: Number,
},
data() {
return {
tableData: [
{
id: "",
eventType: "",
nodeNode: "",
processNode: "",
commonPhrases: "",
},
eventType: Number
},
data() {
return {
tableData: [{
id: '',
eventType: '',
nodeNode: '',
processNode: '',
commonPhrases: ''
}],
formList: [
{
label: "流程名称:",
key: "scope.row.processNode",
type: "input",
options: {
placeholder: ''
}
},
{
label: "常用语:",
key: "scope.row.commonPhrases",
type: "select",
options: {
options: [],
multiple: true
}
},
],
],
formList: [
{
label: "流程名称:",
key: "scope.row.processNode",
type: "input",
options: {
placeholder: "",
},
},
{
label: "常用语:",
key: "scope.row.commonPhrases",
type: "select",
options: {
options: [],
eventTypeOptions: [
{
value: 1,
label: '交通事故'
},
{
value: 2,
label: '车辆故障'
},
{
value: 3,
label: '交通管制'
},
{
value: 4,
label: '交通拥堵'
},
{
value: 5,
label: '非法上路'
},
{
value: 6,
label: '路障清除'
},
{
value: 7,
label: '施工建设'
},
{
value: 8,
label: '服务区异常'
},
{
value: 9,
label: '设施设备隐患'
},
{
value: 10,
label: '异常天气'
},
{
value: 11,
label: '其他事件'
}
]
}
},
computed: {
modelVisible: {
get() {
if (this.visible) {
this.getProcess();
}
return this.visible;
},
set(val) {
this.$emit('update:value', val)
}
multiple: true,
},
},
],
options: [],
eventTypeOptions: [
{
value: 1,
label: "交通事故",
},
{
value: 2,
label: "车辆故障",
},
{
value: 3,
label: "交通管制",
},
{
value: 4,
label: "交通拥堵",
},
{
value: 5,
label: "非法上路",
},
{
value: 6,
label: "路障清除",
},
{
value: 7,
label: "施工建设",
},
{
value: 8,
label: "服务区异常",
},
{
value: 9,
label: "设施设备隐患",
},
{
value: 10,
label: "异常天气",
},
{
value: 11,
label: "其他事件",
},
],
};
},
computed: {
modelVisible: {
get() {
if (this.visible) {
this.getProcess();
}
return this.visible;
},
set(val) {
this.$emit("update:value", val);
},
},
methods: {
getProcess() {
let addFlg = true;
this.tableData = [];
// this.phrasesData.forEach(it => {
// this.options.push({
// key: it.phrases
// })
// addFlg = false;
// })
request({
url: `/business/dcEventType/${this.eventType}`,
method: "get",
}).then(result => {
if (result.code != 200) return Message.error(result.msg);
// this.eventType = result.data.eventType;
// result.data.processConfigList?.forEach(it => {
// const phrs = it.commonPhrases.split(',');
// if (addFlg) {
// phrs?.forEach(phr => {
// if (phr && !this.options.find(op => op.key == phr)) this.options.push({ key: phr })
// })
// }
// if (phrs && phrs[0]) {
// it.commonPhrases = phrs
// }
// })
},
methods: {
getProcess() {
let addFlg = true;
this.tableData = [];
// this.phrasesData.forEach(it => {
// this.options.push({
// key: it.phrases
// })
// addFlg = false;
// })
if (result.data.processConfigList.length > 0) {
this.tableData = result.data.processConfigList;
} else {
this.tableData = [
{
id: '',
eventType: '',
nodeNode: '',
processNode: '',
commonPhrases: ''
}
]
}
request({
url: `/business/dcEventType/${this.eventType}`,
method: "get",
}).then((result) => {
if (result.code != 200) return Message.error(result.msg);
// this.eventType = result.data.eventType;
// console.log('this.tableData', this.tableData)
})
// result.data.processConfigList?.forEach(it => {
// const phrs = it.commonPhrases.split(',');
// if (addFlg) {
// phrs?.forEach(phr => {
// if (phr && !this.options.find(op => op.key == phr)) this.options.push({ key: phr })
// })
// }
// if (phrs && phrs[0]) {
// it.commonPhrases = phrs
// }
// })
if (result.data.processConfigList.length > 0) {
this.tableData = result.data.processConfigList;
} else {
this.tableData = [
{
id: "",
eventType: "",
nodeNode: "",
processNode: "",
commonPhrases: "",
},
];
}
// console.log('this.tableData', this.tableData)
});
},
onAdd() {
this.tableData.push({
// eventType: this.eventType,
commonPhrases: "",
processNode: "",
// nodeNode: 1
});
},
onDel(index) {
if (this.tableData.length <= 1) {
return Message.warning("最后一项不可删除!");
}
this.tableData.splice(index, 1);
},
submitTable() {
let data = [];
let flg = false;
this.tableData.forEach((it, index) => {
if (!it.processNode) return (flg = true);
data.push({
commonPhrases: it.commonPhrases,
eventType: this.eventType,
nodeNode: index + 1,
processNode: it.processNode,
});
});
if (flg) return Message.error("节点名称不能为空");
// console.log(data)
// return;
request({
url: `/business/dcEventType/updateDcProcessConfig`,
method: "post",
data: {
eventType: this.eventType,
processConfigList: data,
},
onAdd() {
this.tableData.push({
// eventType: this.eventType,
commonPhrases: '',
processNode: '',
// nodeNode: 1
})
},
onDel(index) {
if (this.tableData.length <= 1) {
return Message.warning('最后一项不可删除!');
}
this.tableData.splice(index, 1)
},
submitTable() {
let data = []
let flg = false;
this.tableData.forEach((it, index) => {
if (!it.processNode) return flg = true;
data.push({
commonPhrases: it.commonPhrases,
eventType: this.eventType,
nodeNode: index + 1,
processNode: it.processNode
})
})
if (flg) return Message.error('节点名称不能为空');
// console.log(data)
// return;
request({
url: `/business/dcEventType/updateDcProcessConfig`,
method: "post",
data: {
eventType: this.eventType,
processConfigList: data
}
}).then(result => {
if (result.code != 200) return Message.error(result.msg);
Message.success(result.msg);
this.modelVisible = false;
this.$emit('reInitData', true)
})
}
}
}
}).then((result) => {
if (result.code != 200) return Message.error(result.msg);
Message.success(result.msg);
this.modelVisible = false;
this.$emit("reInitData", true);
});
},
},
};
</script>
<style lang="scss" scoped>
.EventDetail {
display: flex;
gap: 9px;
width: 836px;
min-height: 500px;
// height: 768px;
flex-direction: column;
display: flex;
gap: 9px;
width: 836px;
min-height: 500px;
// height: 768px;
flex-direction: column;
.video-pic {
display: flex;
height: 150px;
gap: 15px
}
.video-pic {
display: flex;
height: 150px;
gap: 15px;
}
}
.elButton {
background: #2ba8c3;
border-radius: 2px 2px 2px 2px;
color: #FFFFFF;
background: #2ba8c3;
border-radius: 2px 2px 2px 2px;
color: #ffffff;
}
.elButton:hover,
.elButton:focus {
background: #2ba8c3;
border-radius: 2px 2px 2px 2px;
border-color: #FFFFFF;
color: #FFFFFF;
background: #2ba8c3;
border-radius: 2px 2px 2px 2px;
border-color: #ffffff;
color: #ffffff;
}
</style>
<style lang="scss">
.disposal-process-select {
//
.el-tag.el-tag--info {
background-color: #19546c !important;
border-color: #113b4e !important;
//
.el-tag.el-tag--info {
background-color: #19546C !important;
border-color: #113B4E !important;
//
.el-select__tags-text {
color: #fff;
}
//i
// .el-select .el-tag__close.el-icon-close {
// background-color: #2a7290 !important;
// }
//
.el-select__tags-text {
color: #fff;
}
// .el-tag.el-tag--info .el-tag__close {
// color: #fff;
// }
//i
// .el-select .el-tag__close.el-icon-close {
// background-color: #2a7290 !important;
// }
}
// .el-tag.el-tag--info .el-tag__close {
// color: #fff;
// }
}
}
.el-select-dropdown.is-multiple .el-select-dropdown__item.selected {
background-color: #0d5f79 !important;
background-color: #0d5f79 !important;
}
</style>

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

@ -1,475 +1,521 @@
<template>
<Dialog v-model="modelVisible" :title="title">
<div class="EventAddPlanDialog">
<div class="first">
<el-radio-group v-model="planName" @input="changeRadio">
<el-radio-button v-for="item in info" :key="item.id" :label="item.planName"></el-radio-button>
</el-radio-group>
</div>
<Dialog v-model="modelVisible" :title="title" width="35vw">
<div class="EventAddPlanDialog">
<div class="first">
<el-radio-group v-model="planName" @input="changeRadio">
<el-radio-button
v-for="item in info"
:key="item.id"
:label="item.planName"
></el-radio-button>
</el-radio-group>
</div>
<div class="second">
<el-row>
<el-col :span="2">
<div class="text">联动设备:</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">恢复操作:</div>
</el-col>
<el-col :span="22">
<FormTable ref="thirdFormTable" :tableData="thirdFormData" :type="2"></FormTable>
</el-col>
</el-row>
</div>
</div>
<div class="second">
<el-row>
<el-col :span="2">
<div class="text">联动设备:</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">恢复操作:</div>
</el-col>
<el-col :span="22">
<FormTable
ref="thirdFormTable"
:tableData="thirdFormData"
:type="2"
></FormTable>
</el-col>
</el-row>
</div>
</div>
<template #footer>
<!-- <Button v-if="isDisBtn" style="padding:0 24px; pointer-events: none; background-color: #C9C9C9;"
<template #footer>
<!-- <Button v-if="isDisBtn" style="padding:0 24px; pointer-events: none; background-color: #C9C9C9;"
@click.native="handleRestore" :loading="submitting">强制恢复</Button> -->
<Button style="padding:0 24px;" @click.native="handleSubmit(2)" :loading="submitting">强制恢复</Button>
<Button style="padding:0 24px;" @click.native="handleSubmit(1)" :loading="submitting">确认</Button>
<Button style="background: #C9C9C9;padding:0 24px;"
@click.native="modelVisible = false, submitting = false">取消</Button>
</template>
</Dialog>
<Button
style="padding: 0 24px"
@click.native="handleSubmit(2)"
:loading="submitting"
>强制恢复</Button
>
<Button
style="padding: 0 24px"
@click.native="handleSubmit(1)"
:loading="submitting"
>确认</Button
>
<Button
style="background: #c9c9c9; padding: 0 24px"
@click.native="(modelVisible = false), (submitting = false)"
>取消</Button
>
</template>
</Dialog>
</template>
<script>
import Dialog from "@screen/components/Dialog/index";
import FormTable from '../formTable/index.vue';
import Button from '@screen/components/Buttons/Button.vue';
import request from '@/utils/request';
import FormTable from "../formTable/index.vue";
import Button from "@screen/components/Buttons/Button.vue";
import request from "@/utils/request";
import { Message } from "element-ui";
import { throttle } from "lodash"
import { throttle } from "lodash";
export default {
name: 'eventPlanDialog',
components: {
Dialog,
Button,
FormTable
name: "eventPlanDialog",
components: {
Dialog,
Button,
FormTable,
},
model: {
prop: "visible",
event: "close",
},
provide() {
return {
loadData: throttle(this.loadData, 1000),
getAutomatic: this.getTemplateAutomatic,
getOriginal: this.getBoardOriginal,
};
},
props: {
visible: Boolean,
activeName: String,
info: {
type: Array,
default: () => [],
},
model: {
prop: 'visible',
event: 'close'
eventFormData: {
type: Object,
default: () => {},
},
provide() {
return {
loadData: throttle(this.loadData, 1000),
getAutomatic: this.getTemplateAutomatic,
getOriginal: this.getBoardOriginal
},
data() {
return {
title: "事件确认",
isDisBtn: true,
dialogType: 1,
planId: 0,
planInfo: {},
submitting: false,
secondFormData: [
{
deviceType: 1,
searchRule: 1,
qbb: "",
},
],
thirdFormData: [
{
deviceType: 1,
searchRule: 1,
qbb: "",
},
],
planName: "",
automaticInfo: {},
dcExecuteAction: [],
deviceData: [],
automaticData: {},
boardOriginalData: {},
eventOptions: [
{
value: 1,
label: "异常天气",
},
{
value: 2,
label: "交通事故",
},
{
value: 3,
label: "非法上路",
},
{
value: 4,
label: "车辆故障",
},
{
value: 5,
label: "交通拥堵",
},
{
value: 6,
label: "交通管制",
},
{
value: 7,
label: "服务区异常",
},
{
value: 8,
label: "施工建设",
},
{
value: 9,
label: "路障清除",
},
],
mechanismOptions: [
{
value: 1,
label: "雨",
},
{
value: 2,
label: "雪",
},
{
value: 3,
label: "雾",
},
{
value: 4,
label: "大风",
},
{
value: 5,
label: "低温寒潮",
},
{
value: 6,
label: "路面积雪",
},
{
value: 7,
label: "路面结冰",
},
{
value: 8,
label: "路面积水",
},
{
value: 9,
label: "其他",
},
],
conditionOptions: [
// {
// value: 1,
// label: '(>)'
// },
{
value: 1,
label: "小于(<)",
},
],
};
},
mounted() {},
computed: {
modelVisible: {
get() {
if (this.visible) {
if (this.info.length > 0) {
this.planName = this.info[0]?.planName || "";
this.planInfo = this.info[0];
this.initData(this.info[0]);
}
}
return this.visible;
},
set(val) {
this.$emit("close", val);
},
},
props: {
visible: Boolean,
activeName: String,
info: {
type: Array,
default: () => []
},
eventFormData: {
type: Object,
default: () => { }
},
methods: {
initData(data) {
console.log("data", data);
if (!data) return;
// this.planId = data.id;
let dcExecuteAction = data.dcExecuteAction;
let secondFormData = [];
let thirdFormData = [];
dcExecuteAction.forEach((it) => {
let action = { ...it };
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) {
secondFormData.push(action);
} else if (it.actionType == 2) {
thirdFormData.push({
...action,
qbb: "默认恢复该情报板上次常态化信息",
});
}
});
this.secondFormData = secondFormData;
this.thirdFormData = thirdFormData;
},
data() {
return {
title: '事件确认',
isDisBtn: true,
dialogType: 1,
planId: 0,
planInfo: {},
submitting: false,
secondFormData: [{
deviceType: 1,
searchRule: 1,
qbb: ''
}],
thirdFormData: [{
deviceType: 1,
searchRule: 1,
qbb: ''
}],
planName: '',
automaticInfo: {},
dcExecuteAction: [],
deviceData: [],
automaticData: {},
boardOriginalData: {},
eventOptions: [
{
value: 1,
label: '异常天气'
},
{
value: 2,
label: '交通事故'
},
{
value: 3,
label: '非法上路'
},
{
value: 4,
label: '车辆故障'
},
{
value: 5,
label: '交通拥堵'
},
{
value: 6,
label: '交通管制'
},
{
value: 7,
label: '服务区异常'
},
{
value: 8,
label: '施工建设'
},
{
value: 9,
label: '路障清除'
}
],
mechanismOptions: [{
value: 1,
label: '雨'
},
{
value: 2,
label: '雪'
},
{
value: 3,
label: '雾'
},
{
value: 4,
label: '大风'
},
{
value: 5,
label: '低温寒潮'
},
{
value: 6,
label: '路面积雪'
},
{
value: 7,
label: '路面结冰'
async loadData() {
if (this.deviceData.length <= 0) {
let result = await request({
url: `business/device/query?deviceType=2`,
method: "get",
});
if (result.code != 200) return Message.error(result?.msg);
// console.log('123');
this.deviceData = result.data;
// return result.data;
}
return this.deviceData;
},
async getTemplateAutomatic() {
let url = "";
let data = {};
let otherConfig = {};
let plan = this.info.find((it) => it.planName == this.planName);
console.log("plan", plan);
let action = plan.dcExecuteAction.find(
(it) => it.actionType == 1 && it.deviceType == 2
);
if (action) {
otherConfig = JSON.parse(action.otherConfig);
if (this.activeName == "-1") {
//
url = "/business/plans/warning/confirm";
data = {
dcInfoBoardTemplate: otherConfig,
dcWarning: this.eventFormData,
};
} else {
//
url = "/business/plans/event/automatic";
data = {
dcInfoBoardTemplate: otherConfig,
dcEvent: this.eventFormData,
};
}
const result = await request({
url: url,
method: "post",
data: data,
});
if (result.code != 200) return Message.error(result?.msg);
this.automaticData = result.data;
} else {
console.log("没有情报板,不调用接口");
this.automaticData = {};
}
return this.automaticData;
},
async getBoardOriginal() {
let url = "";
let data = {};
let plan = this.info.find((it) => it.planName == this.planName);
console.log("plan1", plan);
let action = plan.dcExecuteAction.find(
(it) => it.actionType == 1 && it.deviceType == 2
);
if (action) {
if (this.activeName == "-1") {
//
url = "/business/plans/warning/board/confirm";
data = {
dcEmergencyPlans: {
...plan,
executeAction: action,
},
{
value: 8,
label: '路面积水'
dcWarning: this.eventFormData,
};
} else {
//
url = "/business/plans/event/board/confirm";
data = {
dcEmergencyPlans: {
...plan,
executeAction: action,
},
{
value: 9,
label: '其他'
}],
conditionOptions: [
// {
// value: 1,
// label: '(>)'
// },
{
value: 1,
label: '小于(<)'
},
],
dcEvent: this.eventFormData,
};
}
const result = await request({
url: url,
method: "post",
data: data,
});
if (result.code != 200) return Message.error(result?.msg);
this.boardOriginalData = result.data;
} else {
console.log("没有情报板,不调用接口");
this.boardOriginalData = {};
}
return this.boardOriginalData;
},
mounted() {
changeRadio(value) {
let plan = this.info.find((it) => it.planName == value);
this.planInfo = plan;
this.initData(plan);
},
computed: {
modelVisible: {
get() {
if (this.visible) {
if (this.info.length > 0) {
this.planName = this.info[0]?.planName || '';
this.planInfo = this.info[0];
this.initData(this.info[0]);
}
}
return this.visible;
},
set(val) {
this.$emit('close', val)
}
},
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 });
}
if (it.controlModel) {
let other = {
controlModel: it.controlModel,
controlModelName: controlModelMap[it.controlModel],
state: it.state,
name: gzztMap[it.state],
};
if (it.time && it?.time[0]) {
other = {
controlModel: it.controlModel,
controlModelName: controlModelMap[it.controlModel],
state: it.state,
name: gzztMap[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;
},
methods: {
initData(data) {
console.log('data', data)
if (!data) return;
// this.planId = data.id;
let dcExecuteAction = data.dcExecuteAction;
let secondFormData = [];
let thirdFormData = [];
dcExecuteAction.forEach(it => {
let action = { ...it };
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) {
secondFormData.push(action);
} else if (it.actionType == 2) {
thirdFormData.push({ ...action, qbb: '默认恢复该情报板上次常态化信息' });
}
})
this.secondFormData = secondFormData;
this.thirdFormData = thirdFormData;
},
async loadData() {
if (this.deviceData.length <= 0) {
let result = await request({
url: `business/device/query?deviceType=2`,
method: "get",
})
if (result.code != 200) return Message.error(result?.msg);
// console.log('123');
this.deviceData = result.data;
// return result.data;
}
return this.deviceData;
},
async getTemplateAutomatic() {
let url = '';
let data = {};
let otherConfig = {};
let plan = this.info.find(it => it.planName == this.planName);
console.log('plan', plan)
let action = plan.dcExecuteAction.find(it => it.actionType == 1 && it.deviceType == 2);
if (action) {
otherConfig = JSON.parse(action.otherConfig);
if (this.activeName == '-1') {//
url = '/business/plans/warning/confirm';
data = {
dcInfoBoardTemplate: otherConfig,
dcWarning: this.eventFormData
}
} else {//
url = '/business/plans/event/automatic';
data = {
dcInfoBoardTemplate: otherConfig,
dcEvent: this.eventFormData
}
}
const result = await request({
url: url,
method: "post",
data: data
})
if (result.code != 200) return Message.error(result?.msg);
this.automaticData = result.data;
} else {
console.log('没有情报板,不调用接口');
this.automaticData = {};
}
return this.automaticData;
},
async getBoardOriginal() {
let url = '';
let data = {};
let plan = this.info.find(it => it.planName == this.planName);
console.log('plan1', plan)
let action = plan.dcExecuteAction.find(it => it.actionType == 1 && it.deviceType == 2);
if (action) {
if (this.activeName == '-1') {//
url = '/business/plans/warning/board/confirm';
data = {
dcEmergencyPlans: {
...plan,
executeAction: action
},
dcWarning: this.eventFormData
}
} else {//
url = '/business/plans/event/board/confirm';
data = {
dcEmergencyPlans: {
...plan,
executeAction: action
},
dcEvent: this.eventFormData
}
}
const result = await request({
url: url,
method: "post",
data: data
})
if (result.code != 200) return Message.error(result?.msg);
this.boardOriginalData = result.data;
} else {
console.log('没有情报板,不调用接口');
this.boardOriginalData = {};
}
return this.boardOriginalData;
},
changeRadio(value) {
let plan = this.info.find(it => it.planName == value);
this.planInfo = plan;
this.initData(plan);
},
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 })
}
if (it.controlModel) {
let other = {
controlModel: it.controlModel,
controlModelName: controlModelMap[it.controlModel],
state: it.state,
name: gzztMap[it.state]
}
if (it.time && it?.time[0]) {
other = {
controlModel: it.controlModel,
controlModelName: controlModelMap[it.controlModel],
state: it.state,
name: gzztMap[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(value = 1) {
// this.submitting = false;
let plan = { ...this.planInfo };
let actions = plan.dcExecuteAction.filter(it => it.actionType == value);
plan.dcExecuteAction = actions;
let reqData = {
operationType: value,//1- 2-
dcEmergencyPlans: plan,
dcEvent: this.eventFormData
};
handleSubmit(value = 1) {
// this.submitting = false;
let plan = { ...this.planInfo };
let actions = plan.dcExecuteAction.filter((it) => it.actionType == value);
plan.dcExecuteAction = actions;
let url = '';
if (this.activeName == '-1') {//
url = '/business/plans/warning/confirm';
reqData = { ...reqData, dcWarning: { ...reqData.dcEvent } }
} else {//
url = '/business/plans/event/confirm';
}
console.log('reqData', reqData)
// return;
request({
url: url,
method: "post",
data: reqData
}).then((result) => {
if (result.code != 200) return Message.error(result?.msg);
Message.success("提交成功");
this.$emit('close', false);
setTimeout(() => {
this.$emit('reInitData', true);
}, 100)
}).catch(() => {
Message.error("提交失败");
}).finally(() => {
this.submitting = false;
})
let reqData = {
operationType: value, //1- 2-
dcEmergencyPlans: plan,
dcEvent: this.eventFormData,
};
},
handleRestore() {
}
}
}
let url = "";
if (this.activeName == "-1") {
//
url = "/business/plans/warning/confirm";
reqData = { ...reqData, dcWarning: { ...reqData.dcEvent } };
} else {
//
url = "/business/plans/event/confirm";
}
console.log("reqData", reqData);
// return;
request({
url: url,
method: "post",
data: reqData,
})
.then((result) => {
if (result.code != 200) return Message.error(result?.msg);
Message.success("提交成功");
this.$emit("close", false);
setTimeout(() => {
this.$emit("reInitData", true);
}, 100);
})
.catch(() => {
Message.error("提交失败");
})
.finally(() => {
this.submitting = false;
});
},
handleRestore() {},
},
};
</script>
<style lang="scss" scoped>
.fade-enter-active,
.fade-leave-active {
transition: opacity .24s;
transition: opacity 0.24s;
}
.fade-enter,
.fade-leave-to {
opacity: 0;
opacity: 0;
}
.EventAddPlanDialog {
gap: 9px;
width: 1280px;
height: 310px;
display: flex;
flex-direction: column;
gap: 9px;
width: 1280px;
height: 310px;
display: flex;
flex-direction: column;
.first,
.second,
.third {
padding: 5px 10px 8px;
background-color: #296887;
margin-bottom: 15px;
.first,
.second,
.third {
padding: 5px 10px 8px;
background-color: #296887;
margin-bottom: 15px;
.text {
margin-top: 12px;
}
.text {
margin-top: 12px;
}
}
.form {
flex: 1;
overflow-y: auto;
}
.form {
flex: 1;
overflow-y: auto;
}
.footer {
display: flex;
justify-content: end;
gap: 15px;
}
.footer {
display: flex;
justify-content: end;
gap: 15px;
}
// .disabledBtn {
// height: 24px;
// border-radius: 48px;
// background: #C9C9C9;
// padding: 0 24px;
// color: white !important;
// display: flex;
// align-items: center;
// justify-content: center;
// }
// .disabledBtn {
// height: 24px;
// border-radius: 48px;
// background: #C9C9C9;
// padding: 0 24px;
// color: white !important;
// display: flex;
// align-items: center;
// justify-content: center;
// }
}
</style>
</style>

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

@ -1,33 +1,83 @@
<template>
<Dialog v-model="modelVisible" title="事件详情">
<div class="EventDetail" :style="{ height: (activeName == '-1' || activeName == '0') ? '380px' : '768px' }">
<Dialog v-model="modelVisible" title="事件详情" width="35vw">
<div
class="EventDetail"
:style="{
height: activeName == '-1' || activeName == '0' ? '380px' : '768px',
}"
>
<Form :formList="formList" :dFormData="formData" label-width="100px" />
<div class="video-pic">
<Video style="height: 100%; width: 380px;" :showHeader="false"
:url="(formData.videoList && formData.videoList.length > 0) ? formData.videoList[0] : ''" videoType="mp4" />
<Video v-if="activeName != '-1'" style="height: 100%; width: 380px;" :showHeader="false"
:url="(formData.videoList && formData.videoList.length > 0) ? formData.videoList[1] : ''" videoType="mp4" />
<Video
style="height: 100%; width: 380px"
:showHeader="false"
:url="
formData.videoList && formData.videoList.length > 0
? formData.videoList[0]
: ''
"
videoType="mp4"
/>
<Video
v-if="activeName != '-1'"
style="height: 100%; width: 380px"
:showHeader="false"
:url="
formData.videoList && formData.videoList.length > 0
? formData.videoList[1]
: ''
"
videoType="mp4"
/>
<Carousel v-else style="flex: 1" :pictures="formData.pictures" />
</div>
<!-- <div>{{ formData.videoList[0] }}</div> -->
<TimeLine1 v-if="activeName == '1' || activeName == '2'" :data="timeLine1List" />
<TimeLine2 v-if="activeName == '1' || activeName == '2'" :data="timeLine2List" style="flex: 1;" />
<TimeLine1
v-if="activeName == '1' || activeName == '2'"
:data="timeLine1List"
/>
<TimeLine2
v-if="activeName == '1' || activeName == '2'"
:data="timeLine2List"
style="flex: 1"
/>
</div>
<!-- 确认弹窗 -->
<EventPlanDialog :visible="isShowDialog" :info="info" :eventFormData="formData" :activeName="activeName"
@reInitData="() => { this.$emit('update:value', false); this.$emit('queryData', true); }" @close="onCloseAddNew" />
<EventPlanDialog
:visible="isShowDialog"
:info="info"
:eventFormData="formData"
:activeName="activeName"
@reInitData="
() => {
this.$emit('update:value', false);
this.$emit('queryData', true);
}
"
@close="onCloseAddNew"
/>
<template #footer>
<Button v-if="activeName == '-1' || activeName == '0'" style="padding: 0 24px;"
@click.native="onDelete">误报</Button>
<Button :style="{ backgroundColor: '#C9C9C9', padding: '0 24px' }"
@click.native="modelVisible = false">取消</Button>
<Button v-if="activeName == '-1' || activeName == '0'" style="padding: 0 24px;"
@click.native="onSubmit">确认</Button>
<Button
v-if="activeName == '-1' || activeName == '0'"
style="padding: 0 24px"
@click.native="onDelete"
>误报</Button
>
<Button
:style="{ backgroundColor: '#C9C9C9', padding: '0 24px' }"
@click.native="modelVisible = false"
>取消</Button
>
<Button
v-if="activeName == '-1' || activeName == '0'"
style="padding: 0 24px"
@click.native="onSubmit"
>确认</Button
>
</template>
</Dialog>
</template>
@ -36,19 +86,19 @@
import Dialog from "@screen/components/Dialog/index";
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 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 Carousel from "./Carousel/index.vue"
import EventPlanDialog from "./eventPlanDialog/index.vue"
import Button from '@screen/components/Buttons/Button.vue';
import Carousel from "./Carousel/index.vue";
import EventPlanDialog from "./eventPlanDialog/index.vue";
import Button from "@screen/components/Buttons/Button.vue";
import request from "@/utils/request";
import { Message } from "element-ui";
var moment = require("moment");
export default {
name: 'EventDetail',
name: "EventDetail",
components: {
Dialog,
Form,
@ -57,40 +107,42 @@ export default {
Video,
Carousel,
Button,
EventPlanDialog
EventPlanDialog,
},
model: {
prop: 'visible',
event: 'update:value'
prop: "visible",
event: "update:value",
},
props: {
visible: Boolean,
activeName: String,
formData: {
type: Object,
default: () => { }
}
default: () => {},
},
},
data() {
return {
formList,
isShowDialog: false,
info: [],
timeLine1List: [{
time: "",
label: "",
isActive: false,
}],
timeLine1List: [
{
time: "",
label: "",
isActive: false,
},
],
timeLine2List: [
{
time: "",
name: "",
desc: '',
desc: "",
posts: "",
direction: "left",
}
},
],
}
};
},
computed: {
modelVisible: {
@ -101,13 +153,13 @@ export default {
return this.visible;
},
set(val) {
this.$emit('update:value', val)
}
}
this.$emit("update:value", val);
},
},
},
methods: {
getProcess() {
if (this.activeName == '-1' || this.activeName == '0') {
if (this.activeName == "-1" || this.activeName == "0") {
this.timeLine1List = [];
this.timeLine2List = [];
return;
@ -118,113 +170,104 @@ export default {
request({
url: `/system/process/list`,
method: "get",
params: { eventId: this.formData.id }
}).then(result => {
params: { eventId: this.formData.id },
}).then((result) => {
if (result.code != 200) return Message.error(result?.msg);
const rows = result.rows;
this.timeLine1List = [];
this.timeLine2List = [];
this.formData?.processConfigList.forEach(it => {
const process = rows.find(row => it.nodeNode == row.processId);
this.formData?.processConfigList.forEach((it) => {
const process = rows.find((row) => it.nodeNode == row.processId);
if (process) {
this.timeLine1List.push(
{
time: moment(process.operationTime || new Date()).format('HH:mm'),
label: it.processNode,
isActive: true,
}
);
this.timeLine1List.push({
time: moment(process.operationTime || new Date()).format("HH:mm"),
label: it.processNode,
isActive: true,
});
this.timeLine2List.push({
time: moment(process.operationTime || new Date()).format('yyyy-MM-DD HH:mm:ss'),
time: moment(process.operationTime || new Date()).format(
"yyyy-MM-DD HH:mm:ss"
),
name: process.operator,
desc: process.context,
posts: "",
direction: directionFlg ? 'left' : 'right',
})
direction: directionFlg ? "left" : "right",
});
directionFlg = !directionFlg;
} else {
this.timeLine1List.push(
{
time: "",
label: it.processNode,
isActive: false,
}
)
this.timeLine1List.push({
time: "",
label: it.processNode,
isActive: false,
});
}
})
})
});
});
},
onCloseAddNew() {
this.isShowDialog = false;
},
onDelete() {
if (this.formData.id) {
this.$confirm('确定误报吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
this.$confirm("确定误报吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
// this.modelVisible = false;
// this.$emit('queryData', true);
// return;
if (this.activeName == '-1') {
if (this.activeName == "-1") {
request({
url: `/business/warning/delete`,
method: 'post',
data: { id: this.formData.id }
}).then(result => {
if (result.code == 200) Message.success('成功!');
method: "post",
data: { id: this.formData.id },
}).then((result) => {
if (result.code == 200) Message.success("成功!");
else Message.error(result?.msg);
this.modelVisible = false;
this.$emit('queryData', true);
})
this.$emit("queryData", true);
});
} else {
request({
url: `dc/system/event/${this.formData.eventType}/${this.formData.id}`,
method: 'delete',
}).then(result => {
if (result.code == 200) Message.success('成功!');
method: "delete",
}).then((result) => {
if (result.code == 200) Message.success("成功!");
else Message.error(result?.msg);
this.modelVisible = false;
this.$emit('queryData', true);
})
this.$emit("queryData", true);
});
}
})
});
}
},
onSubmit() {
let url = '/business/plans/list/warning/type'
if (this.activeName == '-1') {
url = '/business/plans/list/warning/type'
let url = "/business/plans/list/warning/type";
if (this.activeName == "-1") {
url = "/business/plans/list/warning/type";
} else {
url = '/business/plans/list/event/type'
url = "/business/plans/list/event/type";
}
request({
url: url,
method: "post",
data: this.formData
}).then(result => {
data: this.formData,
}).then((result) => {
if (result.code != 200) return Message.error(result?.msg);
this.info = result.data;
this.isShowDialog = true;
})
});
},
reInitData() {
console.log('reInitData')
this.$emit('update:value', false)
this.$emit('queryData', true);
}
}
}
console.log("reInitData");
this.$emit("update:value", false);
this.$emit("queryData", true);
},
},
};
</script>
<style lang="scss" scoped>

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

@ -1,5 +1,5 @@
<template>
<Dialog v-model="modelVisible" :title="title">
<Dialog v-model="modelVisible" :title="title" width="23vw">
<div class="EventAddPlanDialog">
<ElForm :model="formData" inline :rules="rules" ref="ruleForm">
<div class="first">

457
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/qbbDialog/index.vue

@ -1,30 +1,46 @@
<template>
<Dialog v-model="modelVisible" title="选择情报板">
<div class="EventAddPlanDialog">
<vuescroll :ops="scrollOptions" class="listBox">
<div v-for="(item) in templateAvailable" :key="item.dictValue">
<!-- 原来是<el-collapse v-model="activeNames"> -->
<h3>{{ item.dictLabel }}</h3>
<div v-for="(itm, indx) in item.list" :key="indx" class="tplItem">
<!-- 模板内容 -->
<BoardTplPreview class="boardPreview" boardWH="1400*200" :tpl="itm"></BoardTplPreview>
<!-- 操作按钮 -->
<div class="infoBtnBox infoBtnBoxSm">
<p class="btn">
<el-radio v-model="radio1" :label="itm.id" @input="changeRadio(itm)" />
</p>
</div>
</div>
</div>
</vuescroll>
<Dialog v-model="modelVisible" title="选择情报板" width="23vw">
<div class="EventAddPlanDialog">
<vuescroll :ops="scrollOptions" class="listBox">
<div v-for="item in templateAvailable" :key="item.dictValue">
<!-- 原来是<el-collapse v-model="activeNames"> -->
<h3>{{ item.dictLabel }}</h3>
<div v-for="(itm, indx) in item.list" :key="indx" class="tplItem">
<!-- 模板内容 -->
<BoardTplPreview
class="boardPreview"
boardWH="1400*200"
:tpl="itm"
></BoardTplPreview>
<!-- 操作按钮 -->
<div class="infoBtnBox infoBtnBoxSm">
<p class="btn">
<el-radio
v-model="radio1"
:label="itm.id"
@input="changeRadio(itm)"
/>
</p>
</div>
</div>
</div>
</vuescroll>
</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 #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>
@ -32,250 +48,247 @@ import vuescroll from "vuescroll";
import scrollOptions from "@/common/scrollbar.js";
import BoardTplPreview from "@screen/components/infoBoard/BoardTplPreview.vue";
import Dialog from "@screen/components/Dialog/index";
import Button from '@screen/components/Buttons/Button.vue';
import Button from "@screen/components/Buttons/Button.vue";
import { getTemplateList } from "@/api/board/template";
export default {
name: 'qbbDialog',
components: {
Dialog,
Button,
vuescroll,
BoardTplPreview
name: "qbbDialog",
components: {
Dialog,
Button,
vuescroll,
BoardTplPreview,
},
model: {
prop: "visible",
event: "close",
},
props: {
visible: Boolean,
info: {
type: Object,
default: () => {},
},
model: {
prop: 'visible',
event: 'close'
},
props: {
visible: Boolean,
info: {
type: Object,
default: () => { }
},
data() {
return {
submitting: false,
selectedSize: "",
scrollOptions,
templateAvailable: null,
tplCategory: [],
templateAll: [],
radio1: "",
itmData: {},
};
},
mounted() {
this.initData();
},
computed: {
modelVisible: {
get() {
if (this.visible) {
if (this.info && this.info.id) {
this.radio1 = Number(this.info.id);
}
}
return this.visible;
},
set(val) {
this.$emit("close", val);
},
},
data() {
return {
submitting: false,
selectedSize: "",
scrollOptions,
templateAvailable: null,
tplCategory: [],
templateAll: [],
radio1: '',
itmData: {}
}
},
methods: {
initData() {
if (this.tplCategory.length && this.templateAll.length) {
this.____setAvailableTemplate();
} else {
Promise.all([
this.____getTemplateCategory(),
this.____getAllTemplate(),
]).then((res) => {
this.____setAvailableTemplate();
});
}
},
mounted() {
this.initData();
//
____getTemplateCategory() {
return this.getDicts("iot_template_category").then((res) => {
this.tplCategory = res.data;
});
},
computed: {
modelVisible: {
get() {
if (this.visible) {
if (this.info && this.info.id) {
this.radio1 = Number(this.info.id);
}
}
return this.visible;
},
set(val) {
this.$emit('close', val)
}
},
//
____getAllTemplate() {
return getTemplateList().then((res) => {
this.templateAll = res.data;
});
},
methods: {
initData() {
if (this.tplCategory.length && this.templateAll.length) {
this.____setAvailableTemplate();
} else {
Promise.all([
this.____getTemplateCategory(),
this.____getAllTemplate(),
]).then((res) => {
this.____setAvailableTemplate();
});
//
____setAvailableTemplate() {
this.templateAvailable = [];
this.tplCategory.forEach((item, index) => {
let arr = this.templateAll["" + index];
if (arr.length > 0) {
let temp = [];
arr.forEach((tpl) => {
if (tpl.screenSize) {
temp.push(tpl);
}
},
//
____getTemplateCategory() {
return this.getDicts("iot_template_category").then((res) => {
this.tplCategory = res.data;
});
},
//
____getAllTemplate() {
return getTemplateList().then((res) => {
this.templateAll = res.data;
});
if (temp.length > 0) {
this.templateAvailable.push({
...item,
list: temp,
});
},
//
____setAvailableTemplate() {
this.templateAvailable = [];
this.tplCategory.forEach((item, index) => {
let arr = this.templateAll["" + index];
if (arr.length > 0) {
let temp = [];
arr.forEach((tpl) => {
if (tpl.screenSize) {
temp.push(tpl);
}
});
if (temp.length > 0) {
this.templateAvailable.push({
...item,
list: temp,
});
}
}
});
},
changeRadio(data) {
this.itmData = data;
},
handleSubmit() {
this.modelVisible = false;
this.$emit('dialogSubmit', this.itmData);
}
}
}
}
});
},
changeRadio(data) {
this.itmData = data;
},
handleSubmit() {
this.modelVisible = false;
this.$emit("dialogSubmit", this.itmData);
},
},
};
</script>
<style lang="scss" scoped>
.listBox {
padding: 20px;
padding: 20px;
.tplItem {
margin-right: 14px;
display: flex;
align-items: stretch;
padding-bottom: 10px;
.tplItem {
margin-right: 14px;
display: flex;
align-items: stretch;
padding-bottom: 10px;
.boardPreview {
border: 1px solid rgba(61, 232, 255, 0.5);
// width: 560px;
// height:80px;
flex: 1;
}
.boardPreview {
border: 1px solid rgba(61, 232, 255, 0.5);
// width: 560px;
// height:80px;
flex: 1;
}
.infoBtnBox {
&.infoBtnBoxSm {
width: 60px;
}
.infoBtnBox {
&.infoBtnBoxSm {
width: 60px;
}
width: 110px;
height: 80px;
display: flex;
margin-left: 10px;
/* // border: solid 1px #05afe3; */
border: 1px solid rgba(61, 232, 255, 0.5);
display: flex;
justify-content: space-around;
align-items: center;
width: 110px;
height: 80px;
display: flex;
margin-left: 10px;
/* // border: solid 1px #05afe3; */
border: 1px solid rgba(61, 232, 255, 0.5);
display: flex;
justify-content: space-around;
align-items: center;
.btn {
background-repeat: no-repeat;
background-size: 100% 100%;
width: 15px;
height: 30px;
.btn {
background-repeat: no-repeat;
background-size: 100% 100%;
width: 15px;
height: 30px;
&.btnApply {
background-image: url(~@/assets/jihe/images/button/toLeft.svg);
}
&.btnApply {
background-image: url(~@/assets/jihe/images/button/toLeft.svg);
}
&.btnEdit {
background-image: url(~@/assets/jihe/images/button/edit.svg);
}
&.btnEdit {
background-image: url(~@/assets/jihe/images/button/edit.svg);
}
&.btnDelete {
background-image: url(~@/assets/jihe/images/button/delete.svg);
}
}
&.btnDelete {
background-image: url(~@/assets/jihe/images/button/delete.svg);
}
}
i {
font-size: 24px;
color: #666;
padding-left: 4px;
cursor: pointer;
caret-color: rgba(0, 0, 0, 0);
user-select: none;
}
i {
font-size: 24px;
color: #666;
padding-left: 4px;
cursor: pointer;
caret-color: rgba(0, 0, 0, 0);
user-select: none;
}
i:hover {
color: #05afe3;
}
i:hover {
color: #05afe3;
}
.disabledClass {
pointer-events: none;
cursor: auto !important;
color: #ccc;
}
}
.disabledClass {
pointer-events: none;
cursor: auto !important;
color: #ccc;
}
}
}
.controlBox {
margin-top: 10px;
margin-bottom: 10px;
display: flex;
justify-content: center;
}
.controlBox {
margin-top: 10px;
margin-bottom: 10px;
display: flex;
justify-content: center;
}
.el-collapse {
max-height: 100% !important;
overflow: auto;
border-bottom: none;
border-top: none;
padding: 0 0.5vw;
}
.el-collapse {
max-height: 100% !important;
overflow: auto;
border-bottom: none;
border-top: none;
padding: 0 0.5vw;
}
}
.fade-enter-active,
.fade-leave-active {
transition: opacity .24s;
transition: opacity 0.24s;
}
.fade-enter,
.fade-leave-to {
opacity: 0;
opacity: 0;
}
.EventAddPlanDialog {
gap: 9px;
width: 650px;
height: 510px;
display: flex;
flex-direction: column;
gap: 9px;
width: 650px;
height: 510px;
display: flex;
flex-direction: column;
.first,
.second,
.third {
padding: 5px 10px 8px;
background-color: #296887;
margin-bottom: 15px;
.first,
.second,
.third {
padding: 5px 10px 8px;
background-color: #296887;
margin-bottom: 15px;
.text {
margin-top: 12px;
}
.text {
margin-top: 12px;
}
}
::v-deep {
.el-radio__label {
display: none;
}
::v-deep {
.el-radio__label {
display: none;
}
}
.form {
flex: 1;
overflow-y: auto;
}
.form {
flex: 1;
overflow-y: auto;
}
.footer {
display: flex;
justify-content: end;
gap: 15px;
}
.footer {
display: flex;
justify-content: end;
gap: 15px;
}
}
</style>
</style>

2
ruoyi-ui/src/views/JiHeExpressway/pages/service/PublishingChannelManagement/components/AddNEditDialog.vue

@ -1,5 +1,5 @@
<template>
<Dialog v-model="modelVisible" :title="data ? '修改' : '新增'">
<Dialog v-model="modelVisible" :title="data ? '修改' : '新增'" width="23vw">
<div class="AddNEditDialog">
<Form
v-model="formData"

140
ruoyi-ui/src/views/JiHeExpressway/pages/service/sensitive/components/AddNEditDialog.vue

@ -1,62 +1,70 @@
<template>
<Dialog v-model="modelVisible" :title="data ? '修改' : '新增'">
<div class='AddNEditDialog'>
<Form :value="formData" class="form" ref="FormConfigRef" :formList="formList" column="1" labelWidth="80px" />
<Dialog v-model="modelVisible" :title="data ? '修改' : '新增'" width="23vw">
<div class="AddNEditDialog">
<Form
:value="formData"
class="form"
ref="FormConfigRef"
:formList="formList"
column="1"
labelWidth="80px"
/>
</div>
<template #footer>
<Button style="background-color: rgba(0, 179, 204, .3);" @click.native="modelVisible = false, submitting = false">
<Button
style="background-color: rgba(0, 179, 204, 0.3)"
@click.native="(modelVisible = false), (submitting = false)"
>
取消
</Button>
<Button @click.native="handleSubmit" :loading="submitting">
确定
</Button>
<Button @click.native="handleSubmit" :loading="submitting"> 确定 </Button>
</template>
</Dialog>
</template>
<script>
import Dialog from "@screen/components/Dialog/index.vue";
import Button from "@screen/components/Buttons/Button.vue"
import Form from '@screen/components/FormConfig';
import Button from "@screen/components/Buttons/Button.vue";
import Form from "@screen/components/FormConfig";
import request from "@/utils/request";
import { Message } from "element-ui";
import { addEditFormList } from "./../data"
import { stakeMarkToArray, findPathIdByTreeId } from "@screen/utils/index.js"
import { addEditFormList } from "./../data";
import { stakeMarkToArray, findPathIdByTreeId } from "@screen/utils/index.js";
export default {
name: 'AddNEditDialog',
name: "AddNEditDialog",
components: {
Dialog,
Button,
Form
Form,
},
model: {
prop: 'visible',
event: "update:value"
prop: "visible",
event: "update:value",
},
props: {
visible: Boolean,
data: Object,
dataAll: Array
dataAll: Array,
},
data() {
return {
submitting: false,
formData: {},
formList: addEditFormList
}
formList: addEditFormList,
};
},
computed: {
modelVisible: {
get() {
return this.visible
return this.visible;
},
set(val) {
this.$emit('update:value', val)
}
}
this.$emit("update:value", val);
},
},
},
watch: {
modelVisible: {
@ -64,13 +72,15 @@ export default {
handler(bool) {
if (!bool) return;
this.formData = !this.data ? {} : {
...this.data
}
}
}
this.formData = !this.data
? {}
: {
...this.data,
};
},
},
},
mounted(){
mounted() {
// "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890".split('').forEach(item => {
// request({
// url: `/business/dcInfoBoardVocabulary`,
@ -82,55 +92,61 @@ export default {
// });
},
methods: {
checkRepeat(word){
checkRepeat(word) {
let temp = _.find(this.dataAll, { word: word });
if (temp && Object.keys(temp).length>0 && !(this.data && this.data.id==temp.id)) {
if (
temp &&
Object.keys(temp).length > 0 &&
!(this.data && this.data.id == temp.id)
) {
this.$message.error("该关键词已存在。");
return false
return false;
} else {
return true;
}
},
handleSubmit() {
this.$refs.FormConfigRef.validate()
.then((data) => {
data.word = data.word.trim();
this.$refs.FormConfigRef.validate().then((data) => {
data.word = data.word.trim();
this.submitting = true;
if (this.data) data.id = this.data.id;
this.submitting = true;
if (this.data) data.id = this.data.id;
// if (!this.checkRepeat(data.word)) {
// return;
// }
// if (!this.checkRepeat(data.word)) {
// return;
// }
request({
url: `/business/dcInfoBoardVocabulary`,
method: this.data ? 'PUT' : 'POST',
data
})
.then(result => {
if (result.code != 200) return;
Message.success(`提交成功!`);
this.$emit("onSuccess");
request({
url: `/business/dcInfoBoardVocabulary`,
method: this.data ? "PUT" : "POST",
data,
})
.then((result) => {
if (result.code != 200) return;
this.modelVisible = false;
Message.success(`提交成功!`);
this.$emit("onSuccess");
})
.catch((err) => {
console.log("%c [ err ]-110-「DeviceControlDialog.vue」", "font-size:15px; background:#547bf2; color:#98bfff;", err);
// Message.error(`!`);
})
.finally(() => {
this.submitting = false;
})
})
}
this.modelVisible = false;
})
.catch((err) => {
console.log(
"%c [ err ]-110-「DeviceControlDialog.vue」",
"font-size:15px; background:#547bf2; color:#98bfff;",
err
);
// Message.error(`!`);
})
.finally(() => {
this.submitting = false;
});
});
},
},
}
};
</script>
<style lang='scss' scoped>
<style lang="scss" scoped>
.AddNEditDialog {
width: 450px;
display: flex;

Loading…
Cancel
Save