Browse Source

弹框宽度更改

wangqin
zhangzhang 2 years 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. 102
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Camera/components/CameraControlDialog.vue
  7. 54
      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. 152
      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. 125
      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. 92
      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. 185
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/emergencyProcessManagement/commonPhrases/index.vue
  30. 210
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/emergencyProcessManagement/disposalProcess/index.vue
  31. 318
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/EventDetailDialog/eventPlanDialog/index.vue
  32. 227
      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. 67
      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. 102
      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) { .el-dialog:not(.is-fullscreen) {
margin-top: 6vh !important; margin-top: 27vh !important;
margin-bottom: 1vh; margin-bottom: 1vh;
} }

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

@ -1,36 +1,48 @@
<template> <template>
<div class='BackgroundClip' <div
:style="{ '--clip-path': clipPath, '--border-path': borderPath, '--border-color': borderColor, '--bg-color': bgColor }" class="BackgroundClip"
:class="borderPath ? 'hasBorder' : 'noBoarder'"> :style="{
'--clip-path': clipPath,
'--border-path': borderPath,
'--border-color': borderColor,
'--bg-color': bgColor,
width: width,
}"
:class="borderPath ? 'hasBorder' : 'noBoarder'"
>
<slot /> <slot />
</div> </div>
</template> </template>
<script> <script>
export default { export default {
name: 'BackgroundClip', name: "BackgroundClip",
props: { props: {
width: {
type: String,
default: null,
},
clipPath: { clipPath: {
type: String, type: String,
default: null default: null,
}, },
borderPath: { borderPath: {
type: String, type: String,
default: null default: null,
}, },
borderColor: { borderColor: {
type: String, type: String,
default: null default: null,
}, },
bgColor: { bgColor: {
type: String, type: String,
default: null default: null,
}, },
} },
} };
</script> </script>
<style lang='scss' scoped> <style lang="scss" scoped>
.hasBorder { .hasBorder {
clip-path: var(--clip-path); clip-path: var(--clip-path);
position: relative; position: relative;
@ -51,9 +63,6 @@ export default {
} }
} }
.noBoarder { .noBoarder {
clip-path: var(--clip-path); clip-path: var(--clip-path);
position: relative; 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))" 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%)" bgColor="linear-gradient(180deg, rgba(14, 69, 92, 0.9) 0%, rgba(20, 89, 119, 0.9) 100%)"
ref="DialogContentRef" ref="DialogContentRef"
:width="width"
> >
<div class="dialog-title"> <div class="dialog-title">
<img <img
@ -59,6 +60,10 @@ export default {
}, },
name: "Dialog", name: "Dialog",
props: { props: {
width: {
type: String,
default: null,
},
title: { title: {
type: String, type: String,
}, },
@ -113,9 +118,9 @@ export default {
background: rgba(0, 0, 0, 0.36); background: rgba(0, 0, 0, 0.36);
border-radius: 0px 0px 0px 0px; border-radius: 0px 0px 0px 0px;
z-index: 100; z-index: 100;
display: flex; // display: flex;
align-items: center; // align-items: center;
justify-content: center; // justify-content: center;
--border-width: 1px; --border-width: 1px;
--clip-width-num: 24; --clip-width-num: 24;
@ -143,7 +148,10 @@ export default {
background-clip: padding-box; background-clip: padding-box;
position: relative; position: relative;
box-sizing: border-box; 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; pointer-events: all;

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

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

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

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

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

@ -1,34 +1,32 @@
<template> <template>
<Dialog v-model="modelVisible" title="相机控制" noneMask> <Dialog v-model="modelVisible" title="相机控制" noneMask width="23vw">
<div class='CameraControlDialog'> <div class="CameraControlDialog">
<div class="direction"> <div class="direction">
<div class="control-container top" @click="controlClick(21)"> <div class="control-container top" @click="controlClick(21)">
<div class="icon-horizontal" /> <div class="icon-horizontal" />
<img src="../images/top.svg"> <img src="../images/top.svg" />
</div> </div>
<div class="control-container right" @click="controlClick(24)"> <div class="control-container right" @click="controlClick(24)">
<div class="icon-vertical" /> <div class="icon-vertical" />
<img src="../images/right.svg"> <img src="../images/right.svg" />
</div> </div>
<div class="center"></div> <div class="center"></div>
<div class="control-container bottom" @click="controlClick(22)"> <div class="control-container bottom" @click="controlClick(22)">
<div class="icon-horizontal" style="transform: rotate(180deg);" /> <div class="icon-horizontal" style="transform: rotate(180deg)" />
<img src="../images/bottom.svg"> <img src="../images/bottom.svg" />
</div> </div>
<div class="control-container left" @click="controlClick(23)"> <div class="control-container left" @click="controlClick(23)">
<div class="icon-vertical" style="transform: rotate(180deg);" /> <div class="icon-vertical" style="transform: rotate(180deg)" />
<img src="../images/left.svg"> <img src="../images/left.svg" />
</div> </div>
</div> </div>
<div class="options"> <div class="options">
<div v-for="item in options" :key="item.key"> <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> <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> </div>
</div> </div>
</Dialog> </Dialog>
@ -36,26 +34,26 @@
<script> <script>
import Dialog from "@screen/components/Dialog/index.vue"; import Dialog from "@screen/components/Dialog/index.vue";
import { controlCamera } from "@screen/pages/Home/components/RoadAndEvents/utils/httpList.js" import { controlCamera } from "@screen/pages/Home/components/RoadAndEvents/utils/httpList.js";
import { throttle } from "lodash" import { throttle } from "lodash";
import Switcher from '@screen/pages/service/PublishingChannelManagement/components/Switcher.vue'; import Switcher from "@screen/pages/service/PublishingChannelManagement/components/Switcher.vue";
import Button from "@screen/components/Buttons/Button.vue"; import Button from "@screen/components/Buttons/Button.vue";
// 49 48 // 49 48
export default { export default {
name: 'CameraControlDialog', name: "CameraControlDialog",
components: { components: {
Dialog, Dialog,
Button Button,
}, },
model: { model: {
prop: 'visible', prop: "visible",
event: "update:value" event: "update:value",
}, },
props: { props: {
visible: Boolean, visible: Boolean,
deviceId: String, deviceId: String,
dialogData: Object dialogData: Object,
}, },
data() { data() {
return { return {
@ -64,69 +62,66 @@ export default {
label: "变倍", label: "变倍",
key: "zoom", key: "zoom",
add: "12", add: "12",
sub: "11" sub: "11",
}, },
{ {
label: "光圈", label: "光圈",
key: "aperture", key: "aperture",
add: "15", add: "15",
sub: "16" sub: "16",
}, },
{ {
label: "聚焦", label: "聚焦",
key: "focus", key: "focus",
add: "13", add: "13",
sub: "14" sub: "14",
}, },
], ],
activeOption: { activeOption: {
active: { active: {
text: "开" text: "开",
}, },
unActive: { unActive: {
text: "关" text: "关",
} },
}, },
data: { data: {
state: 0 state: 0,
} },
} };
}, },
computed: { computed: {
modelVisible: { modelVisible: {
get() { get() {
return this.visible return this.visible;
}, },
set(val) { set(val) {
this.$emit('update:value', val) this.$emit("update:value", val);
} },
} },
}, },
methods: { methods: {
controlClick: throttle(function (type) { controlClick: throttle(function (type) {
if (this.dialogData.deviceState != "0") if (this.dialogData.deviceState != "0")
controlCamera(this.deviceId, type) controlCamera(this.deviceId, type);
else this.$message.info("设备离线, 无法操作") else this.$message.info("设备离线, 无法操作");
}, 150), }, 150),
async handleSwitcherChange(value, data) { async handleSwitcherChange(value, data) {
let str = data.state ? "关闭" : "开启"; let str = data.state ? "关闭" : "开启";
data.state = value; data.state = value;
const isContinue = await confirm({ message: `${str}` }) const isContinue = await confirm({ message: `${str}` }).catch(() => {
.catch(() => { console.log(data.state, value, 333);
console.log(data.state, value, 333)
data.state = !value; data.state = !value;
}); });
if (!isContinue) return; if (!isContinue) return;
}, },
}, },
} };
</script> </script>
<style lang='scss' scoped> <style lang="scss" scoped>
.CameraControlDialog { .CameraControlDialog {
width: 360px; width: 360px;
height: 210px; height: 210px;
@ -147,7 +142,7 @@ export default {
&:active { &:active {
[class^="icon"] { [class^="icon"] {
background-color: #48B0CB; background-color: #48b0cb;
} }
} }
@ -156,18 +151,22 @@ export default {
position: absolute; position: absolute;
left: 0; left: 0;
top: 0; top: 0;
background-color: #006A96; background-color: #006a96;
z-index: -1; z-index: -1;
} }
.icon-horizontal { .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; width: 57px;
height: 21px; height: 21px;
} }
.icon-vertical { .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; width: 21px;
height: 57px; height: 57px;
} }
@ -182,7 +181,6 @@ export default {
gap: 3px; gap: 3px;
.top { .top {
grid-area: 1/2/1/2; grid-area: 1/2/1/2;
} }
@ -204,10 +202,10 @@ export default {
width: 66px; width: 66px;
height: 66px; height: 66px;
background: #006A96; background: #006a96;
border-radius: 50%; border-radius: 50%;
opacity: 1; opacity: 1;
border: 1px solid #3DE8FF border: 1px solid #3de8ff;
} }
} }
@ -217,18 +215,18 @@ export default {
justify-content: center; justify-content: center;
gap: 18px; gap: 18px;
>div { > div {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
gap: 9px; gap: 9px;
img { img {
background-color: #006A96; background-color: #006a96;
border-radius: 50%; border-radius: 50%;
&:active { &:active {
background-color: #48B0CB; background-color: #48b0cb;
} }
} }
} }

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -1,5 +1,5 @@
<template> <template>
<Dialog class="HighwayDetails"> <Dialog class="HighwayDetails" width="23vw">
<div class="video-presentations"> <div class="video-presentations">
<div class="video-item"></div> <div class="video-item"></div>
<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 // G3- K091+065
export default { export default {
name: 'HighwayDetails', name: "HighwayDetails",
} };
</script> </script>
<style lang='scss' scoped> <style lang="scss" scoped>
.HighwayDetails { .HighwayDetails {
.video-presentation { .video-presentation {
width: 100%; width: 100%;

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

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

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

@ -1,26 +1,43 @@
<template> <template>
<Dialog v-model="obverseVisible" title="感知事件"> <Dialog v-model="obverseVisible" title="感知事件" width="37vw">
<div class="PerceiveEvent"> <div class="PerceiveEvent">
<!-- <Video class="item-video" /> --> <!-- <Video class="item-video" /> -->
<div class="video-pic"> <div class="video-pic">
<Video style="height: 100%; flex: 1" :showHeader="false" :url="dialogData.formData.videoList[0]" <Video
videoType="mp4" /> style="height: 100%; flex: 1"
<Carousel style="flex: 1; height: 100%" :pictures="dialogData.formData.pictures" /> :showHeader="false"
:url="dialogData.formData.videoList[0]"
videoType="mp4"
/>
<Carousel
style="flex: 1; height: 100%"
:pictures="dialogData.formData.pictures"
/>
</div> </div>
<LineChart class="chart" /> <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> </div>
<template #footer> <template #footer>
<Button>误报</Button> <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> <Button @click.native="updateEvent" :loading="btnLoading">确定</Button>
</template> </template>
</Dialog> </Dialog>
</template> </template>
<script> <script>
import Dialog from "@screen/components/Dialog/index.vue"; import Dialog from "@screen/components/Dialog/index.vue";
import Button from "@screen/components/Buttons/Button.vue"; import Button from "@screen/components/Buttons/Button.vue";
import Descriptions from "@screen/components/Descriptions.vue"; import Descriptions from "@screen/components/Descriptions.vue";
@ -31,7 +48,12 @@ import request from "@/utils/request";
import { Message } from "element-ui"; import { Message } from "element-ui";
import moment from "moment"; import moment from "moment";
import Carousel from "@screen/pages/control/event/event/EventDetailDialog/Carousel"; 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 { getRoadInfoByStakeMark, getProduct } from "@screen/pages/Home/components/RoadAndEvents/utils/httpList.js"
import { dialogDelayVisible } from "./../mixin"; import { dialogDelayVisible } from "./../mixin";
@ -179,7 +201,7 @@ export default {
this.getDetails(); this.getDetails();
this.getVehicleTypeList(); this.getVehicleTypeList();
}, },
async mounted() { }, async mounted() {},
beforeDestroy() { beforeDestroy() {
clearInterval(this.interval); clearInterval(this.interval);
}, },
@ -202,7 +224,7 @@ export default {
}) })
); );
}) })
.catch((err) => { }); .catch((err) => {});
}, },
convertSecToHHmmss(sec) { convertSecToHHmmss(sec) {
let currentTime = moment.duration(sec, "seconds"); 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> <template>
<Dialog v-model="modelVisible" title="设备操作"> <Dialog v-model="modelVisible" title="设备操作" width="23vw">
<div class='DeviceControlDialog'> <div class="DeviceControlDialog">
<DeviceParams :dialogData="dialogData" /> <DeviceParams :dialogData="dialogData" />
</div> </div>
</Dialog> </Dialog>
@ -8,39 +8,39 @@
<script> <script>
import Dialog from "@screen/components/Dialog/index.vue"; import Dialog from "@screen/components/Dialog/index.vue";
import DeviceParams from "./DeviceParams.vue" import DeviceParams from "./DeviceParams.vue";
export default { export default {
name: 'DeviceControlDialog', name: "DeviceControlDialog",
components: { components: {
Dialog, Dialog,
DeviceParams DeviceParams,
}, },
model: { model: {
prop: 'visible', prop: "visible",
event: "update:value" event: "update:value",
}, },
props: { props: {
visible: Boolean, visible: Boolean,
dialogData: { dialogData: {
type: Object, type: Object,
default: () => ({}) default: () => ({}),
}, },
}, },
computed: { computed: {
modelVisible: { modelVisible: {
get() { get() {
return this.visible return this.visible;
}, },
set(val) { set(val) {
this.$emit('update:value', val) this.$emit("update:value", val);
} },
} },
} },
} };
</script> </script>
<style lang='scss' scoped> <style lang="scss" scoped>
.DeviceControlDialog { .DeviceControlDialog {
width: 510px; width: 510px;
display: flex; display: flex;

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

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

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

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

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

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

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

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

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

@ -1,5 +1,9 @@
<template> <template>
<Dialog v-model="visibleModel" :title="`${data ? '修改' : '新增'}值班信息表`"> <Dialog
v-model="visibleModel"
:title="`${data ? '修改' : '新增'}值班信息表`"
width="40vw"
>
<div class="ModifyDutyInformationTable"> <div class="ModifyDutyInformationTable">
<div class="body"> <div class="body">
<Form v-if="!data" :formList="formList" column="2" ref="FormRef" /> <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> <template>
<Dialog v-model="visibleModel" title="操作记录"> <Dialog v-model="visibleModel" title="操作记录" width="23vw">
<div class="OperateRecord"> <div class="OperateRecord">
<TimeLine <TimeLine
v-if="timeLine2List.length" v-if="timeLine2List.length"

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -1,9 +1,13 @@
<template> <template>
<Dialog v-model="modelVisible" :title="title"> <Dialog v-model="modelVisible" :title="title" width="35vw">
<div class="EventAddPlanDialog"> <div class="EventAddPlanDialog">
<div class="first"> <div class="first">
<el-radio-group v-model="planName" @input="changeRadio"> <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-button
v-for="item in info"
:key="item.id"
:label="item.planName"
></el-radio-button>
</el-radio-group> </el-radio-group>
</div> </div>
@ -13,7 +17,11 @@
<div class="text">联动设备:</div> <div class="text">联动设备:</div>
</el-col> </el-col>
<el-col :span="22"> <el-col :span="22">
<FormTable ref="secondFormTable" :tableData="secondFormData" :type="1"></FormTable> <FormTable
ref="secondFormTable"
:tableData="secondFormData"
:type="1"
></FormTable>
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
@ -23,7 +31,11 @@
<div class="text">恢复操作:</div> <div class="text">恢复操作:</div>
</el-col> </el-col>
<el-col :span="22"> <el-col :span="22">
<FormTable ref="thirdFormTable" :tableData="thirdFormData" :type="2"></FormTable> <FormTable
ref="thirdFormTable"
:tableData="thirdFormData"
:type="2"
></FormTable>
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
@ -32,72 +44,88 @@
<template #footer> <template #footer>
<!-- <Button v-if="isDisBtn" style="padding:0 24px; pointer-events: none; background-color: #C9C9C9;" <!-- <Button v-if="isDisBtn" style="padding:0 24px; pointer-events: none; background-color: #C9C9C9;"
@click.native="handleRestore" :loading="submitting">强制恢复</Button> --> @click.native="handleRestore" :loading="submitting">强制恢复</Button> -->
<Button style="padding:0 24px;" @click.native="handleSubmit(2)" :loading="submitting">强制恢复</Button> <Button
<Button style="padding:0 24px;" @click.native="handleSubmit(1)" :loading="submitting">确认</Button> style="padding: 0 24px"
<Button style="background: #C9C9C9;padding:0 24px;" @click.native="handleSubmit(2)"
@click.native="modelVisible = false, submitting = false">取消</Button> :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> </template>
</Dialog> </Dialog>
</template> </template>
<script> <script>
import Dialog from "@screen/components/Dialog/index"; import Dialog from "@screen/components/Dialog/index";
import FormTable from '../formTable/index.vue'; import FormTable from "../formTable/index.vue";
import Button from '@screen/components/Buttons/Button.vue'; import Button from "@screen/components/Buttons/Button.vue";
import request from '@/utils/request'; import request from "@/utils/request";
import { Message } from "element-ui"; import { Message } from "element-ui";
import { throttle } from "lodash" import { throttle } from "lodash";
export default { export default {
name: 'eventPlanDialog', name: "eventPlanDialog",
components: { components: {
Dialog, Dialog,
Button, Button,
FormTable FormTable,
}, },
model: { model: {
prop: 'visible', prop: "visible",
event: 'close' event: "close",
}, },
provide() { provide() {
return { return {
loadData: throttle(this.loadData, 1000), loadData: throttle(this.loadData, 1000),
getAutomatic: this.getTemplateAutomatic, getAutomatic: this.getTemplateAutomatic,
getOriginal: this.getBoardOriginal getOriginal: this.getBoardOriginal,
} };
}, },
props: { props: {
visible: Boolean, visible: Boolean,
activeName: String, activeName: String,
info: { info: {
type: Array, type: Array,
default: () => [] default: () => [],
}, },
eventFormData: { eventFormData: {
type: Object, type: Object,
default: () => { } default: () => {},
} },
}, },
data() { data() {
return { return {
title: '事件确认', title: "事件确认",
isDisBtn: true, isDisBtn: true,
dialogType: 1, dialogType: 1,
planId: 0, planId: 0,
planInfo: {}, planInfo: {},
submitting: false, submitting: false,
secondFormData: [{ secondFormData: [
{
deviceType: 1, deviceType: 1,
searchRule: 1, searchRule: 1,
qbb: '' qbb: "",
}], },
thirdFormData: [{ ],
thirdFormData: [
{
deviceType: 1, deviceType: 1,
searchRule: 1, searchRule: 1,
qbb: '' qbb: "",
}], },
planName: '', ],
planName: "",
automaticInfo: {}, automaticInfo: {},
dcExecuteAction: [], dcExecuteAction: [],
deviceData: [], deviceData: [],
@ -106,77 +134,79 @@ export default {
eventOptions: [ eventOptions: [
{ {
value: 1, value: 1,
label: '异常天气' label: "异常天气",
}, },
{ {
value: 2, value: 2,
label: '交通事故' label: "交通事故",
}, },
{ {
value: 3, value: 3,
label: '非法上路' label: "非法上路",
}, },
{ {
value: 4, value: 4,
label: '车辆故障' label: "车辆故障",
}, },
{ {
value: 5, value: 5,
label: '交通拥堵' label: "交通拥堵",
}, },
{ {
value: 6, value: 6,
label: '交通管制' label: "交通管制",
}, },
{ {
value: 7, value: 7,
label: '服务区异常' label: "服务区异常",
}, },
{ {
value: 8, value: 8,
label: '施工建设' label: "施工建设",
}, },
{ {
value: 9, value: 9,
label: '路障清除' label: "路障清除",
} },
], ],
mechanismOptions: [{ mechanismOptions: [
{
value: 1, value: 1,
label: '雨' label: "雨",
}, },
{ {
value: 2, value: 2,
label: '雪' label: "雪",
}, },
{ {
value: 3, value: 3,
label: '雾' label: "雾",
}, },
{ {
value: 4, value: 4,
label: '大风' label: "大风",
}, },
{ {
value: 5, value: 5,
label: '低温寒潮' label: "低温寒潮",
}, },
{ {
value: 6, value: 6,
label: '路面积雪' label: "路面积雪",
}, },
{ {
value: 7, value: 7,
label: '路面结冰' label: "路面结冰",
}, },
{ {
value: 8, value: 8,
label: '路面积水' label: "路面积水",
}, },
{ {
value: 9, value: 9,
label: '其他' label: "其他",
}], },
],
conditionOptions: [ conditionOptions: [
// { // {
// value: 1, // value: 1,
@ -184,20 +214,18 @@ export default {
// }, // },
{ {
value: 1, value: 1,
label: '小于(<)' label: "小于(<)",
}, },
], ],
} };
},
mounted() {
}, },
mounted() {},
computed: { computed: {
modelVisible: { modelVisible: {
get() { get() {
if (this.visible) { if (this.visible) {
if (this.info.length > 0) { if (this.info.length > 0) {
this.planName = this.info[0]?.planName || ''; this.planName = this.info[0]?.planName || "";
this.planInfo = this.info[0]; this.planInfo = this.info[0];
this.initData(this.info[0]); this.initData(this.info[0]);
} }
@ -205,23 +233,23 @@ export default {
return this.visible; return this.visible;
}, },
set(val) { set(val) {
this.$emit('close', val) this.$emit("close", val);
} },
}, },
}, },
methods: { methods: {
initData(data) { initData(data) {
console.log('data', data) console.log("data", data);
if (!data) return; if (!data) return;
// this.planId = data.id; // this.planId = data.id;
let dcExecuteAction = data.dcExecuteAction; let dcExecuteAction = data.dcExecuteAction;
let secondFormData = []; let secondFormData = [];
let thirdFormData = []; let thirdFormData = [];
dcExecuteAction.forEach(it => { dcExecuteAction.forEach((it) => {
let action = { ...it }; let action = { ...it };
if (it.otherConfig) { if (it.otherConfig) {
let config = JSON.parse(it.otherConfig); let config = JSON.parse(it.otherConfig);
let qbb = '' let qbb = "";
if (config.id) { if (config.id) {
qbb = config.content; qbb = config.content;
config = { dcInfoBoardTemplate: config }; config = { dcInfoBoardTemplate: config };
@ -232,14 +260,19 @@ export default {
action = { ...it, ...config, qbb: qbb }; action = { ...it, ...config, qbb: qbb };
} }
if (it.deviceList) { if (it.deviceList) {
action.deviceList = it.deviceList.split(',').map(str => Number(str)); action.deviceList = it.deviceList
.split(",")
.map((str) => Number(str));
} }
if (it.actionType == 1) { if (it.actionType == 1) {
secondFormData.push(action); secondFormData.push(action);
} else if (it.actionType == 2) { } else if (it.actionType == 2) {
thirdFormData.push({ ...action, qbb: '默认恢复该情报板上次常态化信息' }); thirdFormData.push({
...action,
qbb: "默认恢复该情报板上次常态化信息",
});
} }
}) });
this.secondFormData = secondFormData; this.secondFormData = secondFormData;
this.thirdFormData = thirdFormData; this.thirdFormData = thirdFormData;
}, },
@ -248,7 +281,7 @@ export default {
let result = await request({ let result = await request({
url: `business/device/query?deviceType=2`, url: `business/device/query?deviceType=2`,
method: "get", method: "get",
}) });
if (result.code != 200) return Message.error(result?.msg); if (result.code != 200) return Message.error(result?.msg);
// console.log('123'); // console.log('123');
this.deviceData = result.data; this.deviceData = result.data;
@ -257,101 +290,113 @@ export default {
return this.deviceData; return this.deviceData;
}, },
async getTemplateAutomatic() { async getTemplateAutomatic() {
let url = ''; let url = "";
let data = {}; let data = {};
let otherConfig = {}; let otherConfig = {};
let plan = this.info.find(it => it.planName == this.planName); let plan = this.info.find((it) => it.planName == this.planName);
console.log('plan', plan) console.log("plan", plan);
let action = plan.dcExecuteAction.find(it => it.actionType == 1 && it.deviceType == 2); let action = plan.dcExecuteAction.find(
(it) => it.actionType == 1 && it.deviceType == 2
);
if (action) { if (action) {
otherConfig = JSON.parse(action.otherConfig); otherConfig = JSON.parse(action.otherConfig);
if (this.activeName == '-1') {// if (this.activeName == "-1") {
url = '/business/plans/warning/confirm'; //
url = "/business/plans/warning/confirm";
data = { data = {
dcInfoBoardTemplate: otherConfig, dcInfoBoardTemplate: otherConfig,
dcWarning: this.eventFormData dcWarning: this.eventFormData,
} };
} else {// } else {
url = '/business/plans/event/automatic'; //
url = "/business/plans/event/automatic";
data = { data = {
dcInfoBoardTemplate: otherConfig, dcInfoBoardTemplate: otherConfig,
dcEvent: this.eventFormData dcEvent: this.eventFormData,
} };
} }
const result = await request({ const result = await request({
url: url, url: url,
method: "post", method: "post",
data: data data: data,
}) });
if (result.code != 200) return Message.error(result?.msg); if (result.code != 200) return Message.error(result?.msg);
this.automaticData = result.data; this.automaticData = result.data;
} else { } else {
console.log('没有情报板,不调用接口'); console.log("没有情报板,不调用接口");
this.automaticData = {}; this.automaticData = {};
} }
return this.automaticData; return this.automaticData;
}, },
async getBoardOriginal() { async getBoardOriginal() {
let url = ''; let url = "";
let data = {}; let data = {};
let plan = this.info.find(it => it.planName == this.planName); let plan = this.info.find((it) => it.planName == this.planName);
console.log('plan1', plan) console.log("plan1", plan);
let action = plan.dcExecuteAction.find(it => it.actionType == 1 && it.deviceType == 2); let action = plan.dcExecuteAction.find(
(it) => it.actionType == 1 && it.deviceType == 2
);
if (action) { if (action) {
if (this.activeName == '-1') {// if (this.activeName == "-1") {
url = '/business/plans/warning/board/confirm'; //
url = "/business/plans/warning/board/confirm";
data = { data = {
dcEmergencyPlans: { dcEmergencyPlans: {
...plan, ...plan,
executeAction: action executeAction: action,
}, },
dcWarning: this.eventFormData dcWarning: this.eventFormData,
} };
} else {// } else {
url = '/business/plans/event/board/confirm'; //
url = "/business/plans/event/board/confirm";
data = { data = {
dcEmergencyPlans: { dcEmergencyPlans: {
...plan, ...plan,
executeAction: action executeAction: action,
}, },
dcEvent: this.eventFormData dcEvent: this.eventFormData,
} };
} }
const result = await request({ const result = await request({
url: url, url: url,
method: "post", method: "post",
data: data data: data,
}) });
if (result.code != 200) return Message.error(result?.msg); if (result.code != 200) return Message.error(result?.msg);
this.boardOriginalData = result.data; this.boardOriginalData = result.data;
} else { } else {
console.log('没有情报板,不调用接口'); console.log("没有情报板,不调用接口");
this.boardOriginalData = {}; this.boardOriginalData = {};
} }
return this.boardOriginalData; return this.boardOriginalData;
}, },
changeRadio(value) { changeRadio(value) {
let plan = this.info.find(it => it.planName == value); let plan = this.info.find((it) => it.planName == value);
this.planInfo = plan; this.planInfo = plan;
this.initData(plan); this.initData(plan);
}, },
formatData(it, value = 1) { formatData(it, value = 1) {
let data = { ...it, actionType: value, emergencyPlansId: id } let data = { ...it, actionType: value, emergencyPlansId: id };
if (it.deviceList && typeof it.deviceList !== 'string' && it.deviceList.length > 0) { if (
data.deviceList = it.deviceList.join(','); it.deviceList &&
typeof it.deviceList !== "string" &&
it.deviceList.length > 0
) {
data.deviceList = it.deviceList.join(",");
} else { } else {
data.deviceList = ''; data.deviceList = "";
} }
if (it.content) { if (it.content) {
data.otherConfig = JSON.stringify({ content: it.content }) data.otherConfig = JSON.stringify({ content: it.content });
} }
if (it.controlModel) { if (it.controlModel) {
let other = { let other = {
controlModel: it.controlModel, controlModel: it.controlModel,
controlModelName: controlModelMap[it.controlModel], controlModelName: controlModelMap[it.controlModel],
state: it.state, state: it.state,
name: gzztMap[it.state] name: gzztMap[it.state],
} };
if (it.time && it?.time[0]) { if (it.time && it?.time[0]) {
other = { other = {
controlModel: it.controlModel, controlModel: it.controlModel,
@ -359,71 +404,72 @@ export default {
state: it.state, state: it.state,
name: gzztMap[it.state], name: gzztMap[it.state],
startTime: it.time[0], startTime: it.time[0],
endTime: it.time[1] endTime: it.time[1],
} };
} }
data.otherConfig = JSON.stringify(other) data.otherConfig = JSON.stringify(other);
} }
if (it.gzms) { if (it.gzms) {
data.otherConfig = JSON.stringify({ data.otherConfig = JSON.stringify({
state: it.gzms, state: it.gzms,
name: gzmsMap[it.gzms], name: gzmsMap[it.gzms],
operationDuration: it.operationDuration, operationDuration: it.operationDuration,
}) });
} }
return data; return data;
}, },
handleSubmit(value = 1) { handleSubmit(value = 1) {
// this.submitting = false; // this.submitting = false;
let plan = { ...this.planInfo }; let plan = { ...this.planInfo };
let actions = plan.dcExecuteAction.filter(it => it.actionType == value); let actions = plan.dcExecuteAction.filter((it) => it.actionType == value);
plan.dcExecuteAction = actions; plan.dcExecuteAction = actions;
let reqData = { let reqData = {
operationType: value,//1- 2- operationType: value, //1- 2-
dcEmergencyPlans: plan, dcEmergencyPlans: plan,
dcEvent: this.eventFormData dcEvent: this.eventFormData,
}; };
let url = ''; let url = "";
if (this.activeName == '-1') {// if (this.activeName == "-1") {
url = '/business/plans/warning/confirm'; //
reqData = { ...reqData, dcWarning: { ...reqData.dcEvent } } url = "/business/plans/warning/confirm";
} else {// reqData = { ...reqData, dcWarning: { ...reqData.dcEvent } };
url = '/business/plans/event/confirm'; } else {
//
url = "/business/plans/event/confirm";
} }
console.log('reqData', reqData) console.log("reqData", reqData);
// return; // return;
request({ request({
url: url, url: url,
method: "post", method: "post",
data: reqData data: reqData,
}).then((result) => { })
.then((result) => {
if (result.code != 200) return Message.error(result?.msg); if (result.code != 200) return Message.error(result?.msg);
Message.success("提交成功"); Message.success("提交成功");
this.$emit('close', false); this.$emit("close", false);
setTimeout(() => { setTimeout(() => {
this.$emit('reInitData', true); this.$emit("reInitData", true);
}, 100) }, 100);
}).catch(() => { })
.catch(() => {
Message.error("提交失败"); Message.error("提交失败");
}).finally(() => {
this.submitting = false;
}) })
.finally(() => {
this.submitting = false;
});
}, },
handleRestore() { handleRestore() {},
},
} };
}
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.fade-enter-active, .fade-enter-active,
.fade-leave-active { .fade-leave-active {
transition: opacity .24s; transition: opacity 0.24s;
} }
.fade-enter, .fade-enter,

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

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

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

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

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

@ -1,17 +1,25 @@
<template> <template>
<Dialog v-model="modelVisible" title="选择情报板"> <Dialog v-model="modelVisible" title="选择情报板" width="23vw">
<div class="EventAddPlanDialog"> <div class="EventAddPlanDialog">
<vuescroll :ops="scrollOptions" class="listBox"> <vuescroll :ops="scrollOptions" class="listBox">
<div v-for="(item) in templateAvailable" :key="item.dictValue"> <div v-for="item in templateAvailable" :key="item.dictValue">
<!-- 原来是<el-collapse v-model="activeNames"> --> <!-- 原来是<el-collapse v-model="activeNames"> -->
<h3>{{ item.dictLabel }}</h3> <h3>{{ item.dictLabel }}</h3>
<div v-for="(itm, indx) in item.list" :key="indx" class="tplItem"> <div v-for="(itm, indx) in item.list" :key="indx" class="tplItem">
<!-- 模板内容 --> <!-- 模板内容 -->
<BoardTplPreview class="boardPreview" boardWH="1400*200" :tpl="itm"></BoardTplPreview> <BoardTplPreview
class="boardPreview"
boardWH="1400*200"
:tpl="itm"
></BoardTplPreview>
<!-- 操作按钮 --> <!-- 操作按钮 -->
<div class="infoBtnBox infoBtnBoxSm"> <div class="infoBtnBox infoBtnBoxSm">
<p class="btn"> <p class="btn">
<el-radio v-model="radio1" :label="itm.id" @input="changeRadio(itm)" /> <el-radio
v-model="radio1"
:label="itm.id"
@input="changeRadio(itm)"
/>
</p> </p>
</div> </div>
</div> </div>
@ -20,9 +28,17 @@
</div> </div>
<template #footer> <template #footer>
<Button style="background: #C9C9C9;padding:0 24px;" <Button
@click.native="modelVisible = false, submitting = false">取消</Button> style="background: #c9c9c9; padding: 0 24px"
<Button style="padding:0 24px;" @click.native="handleSubmit" :loading="submitting">确认</Button> @click.native="(modelVisible = false), (submitting = false)"
>取消</Button
>
<Button
style="padding: 0 24px"
@click.native="handleSubmit"
:loading="submitting"
>确认</Button
>
</template> </template>
</Dialog> </Dialog>
</template> </template>
@ -32,27 +48,27 @@ import vuescroll from "vuescroll";
import scrollOptions from "@/common/scrollbar.js"; import scrollOptions from "@/common/scrollbar.js";
import BoardTplPreview from "@screen/components/infoBoard/BoardTplPreview.vue"; import BoardTplPreview from "@screen/components/infoBoard/BoardTplPreview.vue";
import Dialog from "@screen/components/Dialog/index"; 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"; import { getTemplateList } from "@/api/board/template";
export default { export default {
name: 'qbbDialog', name: "qbbDialog",
components: { components: {
Dialog, Dialog,
Button, Button,
vuescroll, vuescroll,
BoardTplPreview BoardTplPreview,
}, },
model: { model: {
prop: 'visible', prop: "visible",
event: 'close' event: "close",
}, },
props: { props: {
visible: Boolean, visible: Boolean,
info: { info: {
type: Object, type: Object,
default: () => { } default: () => {},
} },
}, },
data() { data() {
return { return {
@ -62,9 +78,9 @@ export default {
templateAvailable: null, templateAvailable: null,
tplCategory: [], tplCategory: [],
templateAll: [], templateAll: [],
radio1: '', radio1: "",
itmData: {} itmData: {},
} };
}, },
mounted() { mounted() {
this.initData(); this.initData();
@ -80,8 +96,8 @@ export default {
return this.visible; return this.visible;
}, },
set(val) { set(val) {
this.$emit('close', val) this.$emit("close", val);
} },
}, },
}, },
methods: { methods: {
@ -96,7 +112,6 @@ export default {
this.____setAvailableTemplate(); this.____setAvailableTemplate();
}); });
} }
}, },
// //
____getTemplateCategory() { ____getTemplateCategory() {
@ -136,12 +151,10 @@ export default {
}, },
handleSubmit() { handleSubmit() {
this.modelVisible = false; this.modelVisible = false;
this.$emit('dialogSubmit', this.itmData); this.$emit("dialogSubmit", this.itmData);
} },
},
};
}
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@ -234,7 +247,7 @@ export default {
.fade-enter-active, .fade-enter-active,
.fade-leave-active { .fade-leave-active {
transition: opacity .24s; transition: opacity 0.24s;
} }
.fade-enter, .fade-enter,

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

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

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

@ -1,62 +1,70 @@
<template> <template>
<Dialog v-model="modelVisible" :title="data ? '修改' : '新增'"> <Dialog v-model="modelVisible" :title="data ? '修改' : '新增'" width="23vw">
<div class='AddNEditDialog'> <div class="AddNEditDialog">
<Form :value="formData" class="form" ref="FormConfigRef" :formList="formList" column="1" labelWidth="80px" /> <Form
:value="formData"
class="form"
ref="FormConfigRef"
:formList="formList"
column="1"
labelWidth="80px"
/>
</div> </div>
<template #footer> <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>
<Button @click.native="handleSubmit" :loading="submitting"> <Button @click.native="handleSubmit" :loading="submitting"> 确定 </Button>
确定
</Button>
</template> </template>
</Dialog> </Dialog>
</template> </template>
<script> <script>
import Dialog from "@screen/components/Dialog/index.vue"; import Dialog from "@screen/components/Dialog/index.vue";
import Button from "@screen/components/Buttons/Button.vue" import Button from "@screen/components/Buttons/Button.vue";
import Form from '@screen/components/FormConfig'; import Form from "@screen/components/FormConfig";
import request from "@/utils/request"; import request from "@/utils/request";
import { Message } from "element-ui"; import { Message } from "element-ui";
import { addEditFormList } from "./../data" import { addEditFormList } from "./../data";
import { stakeMarkToArray, findPathIdByTreeId } from "@screen/utils/index.js" import { stakeMarkToArray, findPathIdByTreeId } from "@screen/utils/index.js";
export default { export default {
name: 'AddNEditDialog', name: "AddNEditDialog",
components: { components: {
Dialog, Dialog,
Button, Button,
Form Form,
}, },
model: { model: {
prop: 'visible', prop: "visible",
event: "update:value" event: "update:value",
}, },
props: { props: {
visible: Boolean, visible: Boolean,
data: Object, data: Object,
dataAll: Array dataAll: Array,
}, },
data() { data() {
return { return {
submitting: false, submitting: false,
formData: {}, formData: {},
formList: addEditFormList formList: addEditFormList,
} };
}, },
computed: { computed: {
modelVisible: { modelVisible: {
get() { get() {
return this.visible return this.visible;
}, },
set(val) { set(val) {
this.$emit('update:value', val) this.$emit("update:value", val);
} },
} },
}, },
watch: { watch: {
modelVisible: { modelVisible: {
@ -64,13 +72,15 @@ export default {
handler(bool) { handler(bool) {
if (!bool) return; if (!bool) return;
this.formData = !this.data ? {} : { this.formData = !this.data
...this.data ? {}
} : {
} ...this.data,
} };
}, },
mounted(){ },
},
mounted() {
// "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890".split('').forEach(item => { // "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890".split('').forEach(item => {
// request({ // request({
// url: `/business/dcInfoBoardVocabulary`, // url: `/business/dcInfoBoardVocabulary`,
@ -82,18 +92,21 @@ export default {
// }); // });
}, },
methods: { methods: {
checkRepeat(word){ checkRepeat(word) {
let temp = _.find(this.dataAll, { word: 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("该关键词已存在。"); this.$message.error("该关键词已存在。");
return false return false;
} else { } else {
return true; return true;
} }
}, },
handleSubmit() { handleSubmit() {
this.$refs.FormConfigRef.validate() this.$refs.FormConfigRef.validate().then((data) => {
.then((data) => {
data.word = data.word.trim(); data.word = data.word.trim();
this.submitting = true; this.submitting = true;
@ -105,32 +118,35 @@ export default {
request({ request({
url: `/business/dcInfoBoardVocabulary`, url: `/business/dcInfoBoardVocabulary`,
method: this.data ? 'PUT' : 'POST', method: this.data ? "PUT" : "POST",
data data,
}) })
.then(result => { .then((result) => {
if (result.code != 200) return; if (result.code != 200) return;
Message.success(`提交成功!`); Message.success(`提交成功!`);
this.$emit("onSuccess"); this.$emit("onSuccess");
this.modelVisible = false; this.modelVisible = false;
}) })
.catch((err) => { .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(`!`); // Message.error(`!`);
}) })
.finally(() => { .finally(() => {
this.submitting = false; this.submitting = false;
}) });
}) });
}
}, },
} },
};
</script> </script>
<style lang='scss' scoped> <style lang="scss" scoped>
.AddNEditDialog { .AddNEditDialog {
width: 450px; width: 450px;
display: flex; display: flex;

Loading…
Cancel
Save