Browse Source

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

wangqin
qingzhengli 8 months ago
parent
commit
6c25d7035c
  1. 3
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/DrivingGuidance/index.vue
  2. 126
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/PerceiveEvent/index.vue
  3. 4
      ruoyi-ui/src/views/JiHeExpressway/utils/enum.js

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

@ -91,7 +91,7 @@ export default {
}, },
{ {
label: "设备厂商", label: "设备厂商",
key: "brand", key: "manufacturer",
}, },
{ {
label: "工作模式", label: "工作模式",
@ -151,6 +151,7 @@ export default {
if (roadInfo) this.data.roadName = roadInfo.roadName; if (roadInfo) this.data.roadName = roadInfo.roadName;
}, },
methods: { methods: {
handleClickTabs() {},
requestURL(functionId = 52, options = {}) { requestURL(functionId = 52, options = {}) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
request request

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

@ -3,17 +3,35 @@
<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>
@ -21,20 +39,19 @@
<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";
import LineChart from './components/LineChart/index.vue'; import LineChart from "./components/LineChart/index.vue";
import Video from "@screen/components/Video"; import Video from "@screen/components/Video";
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 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 } from "@screen/utils/enum.js" import { WarningTypeList, WarningSubclassList } 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";
import { LaneOccupancyList, DirectionTypes } from "@screen/utils/enum.js" import { LaneOccupancyList, DirectionTypes } from "@screen/utils/enum.js";
let vehicleTypeList = []; let vehicleTypeList = [];
@ -61,7 +78,7 @@ function padZero(num) {
// //
export default { export default {
name: 'PerceiveEvent', name: "PerceiveEvent",
mixins: [dialogDelayVisible], mixins: [dialogDelayVisible],
components: { components: {
Dialog, Dialog,
@ -70,13 +87,13 @@ export default {
LineChart, LineChart,
Video, Video,
Carousel, Carousel,
Form Form,
}, },
data() { data() {
return { return {
interval: null, interval: null,
loading: true, loading: true,
activeName: 'first', activeName: "first",
deviceControlVisible: false, deviceControlVisible: false,
btnLoading: false, btnLoading: false,
data: { data: {
@ -103,13 +120,13 @@ export default {
label: "路段方向:", label: "路段方向:",
key: "direction", key: "direction",
type: "text", type: "text",
isAlone: true isAlone: true,
}, },
{ {
label: "事件来源:", label: "事件来源:",
key: "warningSource", key: "warningSource",
type: "text", type: "text",
enum: "InfoWarningSource" enum: "InfoWarningSource",
}, },
{ {
label: "事件类型:", label: "事件类型:",
@ -117,21 +134,22 @@ export default {
type: "select", type: "select",
options: { options: {
disabled: true, disabled: true,
options: WarningTypeList options: WarningTypeList,
}, },
ons: { ons: {
change: (value, { data }) => { change: (value, { data }) => {
this.formList[4].options.options = WarningSubclassList[value] || []; this.formList[4].options.options =
WarningSubclassList[value] || [];
data.warningSubclass = null; data.warningSubclass = null;
} },
} },
}, },
{ {
label: "细分类型:", label: "细分类型:",
key: "warningSubclass", key: "warningSubclass",
type: "select", type: "select",
options: { options: {
options: [] options: [],
}, },
}, },
// { // {
@ -150,7 +168,7 @@ export default {
maxlength: 100, maxlength: 100,
autosize: { minRows: 6, maxRows: 6 }, autosize: { minRows: 6, maxRows: 6 },
showWordLimit: true, showWordLimit: true,
} },
}, },
{ {
label: "影响车道:", label: "影响车道:",
@ -159,7 +177,7 @@ export default {
options: { options: {
// activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)", // activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)",
options: LaneOccupancyList, options: LaneOccupancyList,
gap: "12px" gap: "12px",
}, },
}, },
{ {
@ -172,15 +190,14 @@ export default {
// key: "weather", // key: "weather",
// type: "text", // type: "text",
// }, // },
] ],
} };
}, },
async created() { async created() {
this.getDetails(); this.getDetails();
this.getVehicleTypeList(); this.getVehicleTypeList();
}, },
async mounted() { async mounted() {},
},
beforeDestroy() { beforeDestroy() {
clearInterval(this.interval); clearInterval(this.interval);
}, },
@ -189,21 +206,21 @@ export default {
if (vehicleTypeList.length) return; if (vehicleTypeList.length) return;
request({ request({
url: `/system/dict/data/type/${'sys_vehicle_type'}`, url: `/system/dict/data/type/${"sys_vehicle_type"}`,
method: "GET", method: "GET",
params: {} params: {},
}) })
.then(({ data, code }) => { .then(({ data, code }) => {
if (code != 200) return Message.error("详情获取失败"); if (code != 200) return Message.error("详情获取失败");
vehicleTypeList = this.formList[5].options.options = data.map(item => ({ vehicleTypeList = this.formList[5].options.options = data.map(
(item) => ({
key: item.dictValue, key: item.dictValue,
label: item.dictLabel label: item.dictLabel,
}))
}) })
.catch((err) => { );
})
}); .catch((err) => {});
}, },
convertSecToHHmmss(sec) { convertSecToHHmmss(sec) {
let currentTime = moment.duration(sec, "seconds"); let currentTime = moment.duration(sec, "seconds");
@ -218,8 +235,8 @@ export default {
url: `/perceivedEvents/warning/getWarningById`, url: `/perceivedEvents/warning/getWarningById`,
method: "POST", method: "POST",
data: { data: {
id: this.dialogData.id id: this.dialogData.id,
} },
}) })
.then(({ data, code }) => { .then(({ data, code }) => {
if (code != 200) return Message.error("详情获取失败"); if (code != 200) return Message.error("详情获取失败");
@ -254,23 +271,30 @@ export default {
// "latitude": "36.291145" // "latitude": "36.291145"
// }; // };
data.duration = this.convertSecToHHmmss(data.duration); data.duration = this.convertSecToHHmmss(data.duration);
this.data = { ...data, roadName: null, lane: data.lane?.split(",") || [] }; this.data = {
...data,
roadName: null,
lane: data.lane?.split(",") || [],
};
this.formList[4].options.options = WarningSubclassList[data.warningType] || []; this.formList[4].options.options =
WarningSubclassList[data.warningType] || [];
setTimeout(() => { setTimeout(() => {
this.$refs.FormConfigRef.reset(true); this.$refs.FormConfigRef.reset(true);
}); });
this.data.direction = DirectionTypes[this.data.direction]; this.data.direction = DirectionTypes[this.data.direction];
this.data.duration = getDuration(this.data.warningTime); this.data.duration = getDuration(this.data.warningTime);
this.interval = setInterval(() => { this.data.duration = getDuration(this.data.warningTime); }, 1000) this.interval = setInterval(() => {
this.data.duration = getDuration(this.data.warningTime);
}, 1000);
}) })
.catch((e) => { .catch((e) => {
Message.error("详情获取失败" + e); Message.error("详情获取失败" + e);
}) })
.finally(() => { .finally(() => {
this.loading = false; this.loading = false;
}) });
}, },
updateEvent() { updateEvent() {
this.btnLoading = true; this.btnLoading = true;
@ -293,8 +317,8 @@ export default {
warningSubclass: this.data.warningSubclass, warningSubclass: this.data.warningSubclass,
// vehicleType: this.data.vehicleType, // vehicleType: this.data.vehicleType,
remark: this.data.remark, remark: this.data.remark,
lane: this.data.lane.join(",") lane: this.data.lane.join(","),
} },
}) })
.then(() => { .then(() => {
Message.success("提交成功"); Message.success("提交成功");
@ -304,13 +328,13 @@ export default {
}) })
.finally(() => { .finally(() => {
this.btnLoading = false; this.btnLoading = false;
}) });
} },
} },
} };
</script> </script>
<style lang='scss' scoped> <style lang="scss" scoped>
.PerceiveEvent { .PerceiveEvent {
width: 870px; width: 870px;
color: #fff; color: #fff;

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

@ -70,6 +70,10 @@ export const DeviceTypeEnum = {
text: "正常", text: "正常",
color: "#19E1B1", color: "#19E1B1",
}, },
null: {
text: "异常",
color: "#FF5F5F",
},
}; };
// 摄像 是否可控 是否有云台控制 0 有(球机) 1 ⽆(枪机) // 摄像 是否可控 是否有云台控制 0 有(球机) 1 ⽆(枪机)

Loading…
Cancel
Save