From cd9dd05931ad1816c9886c50ba001fb6a91ceea0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E9=92=A6?= <360013221@qq.com> Date: Wed, 7 Feb 2024 11:03:52 +0800 Subject: [PATCH] =?UTF-8?q?=E6=84=9F=E7=9F=A5=E4=BA=8B=E4=BB=B6=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E6=8C=81=E7=BB=AD=E6=97=B6=E9=95=BF=EF=BC=8C=E8=A1=8C?= =?UTF-8?q?=E8=BD=A6=E8=AF=B1=E5=AF=BC=E5=A2=9E=E5=8A=A0=E5=B7=A5=E4=BD=9C?= =?UTF-8?q?=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Dialogs/DrivingGuidance/index.vue | 12 +++++++++++- .../Dialogs/PerceiveEvent/index.vue | 19 ++++++++++++++----- 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/DrivingGuidance/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/DrivingGuidance/index.vue index af8a36b3..04a31ad7 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/DrivingGuidance/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/DrivingGuidance/index.vue @@ -90,10 +90,19 @@ export default { label: '工作模式', key: "workMode", }, + { + label: '上行工作状态', + key: "onWorkStatus", + }, + { + label: '下行工作状态', + key: "inWorkStatus", + }, ] } }, async created() { + console.log(333,this.dialogData,444) this.data = { ...this.dialogData, roadName: null } getProduct(this.dialogData.productId) @@ -107,6 +116,8 @@ export default { this.requestURL(52) .then((result) => { this.data.workMode = { "00": "手动控制", "01": "自动控制", "02": "万年历" }[result.mode]; + this.data.onWorkStatus = result.onWorkStatus + this.data.inWorkStatus = result.inWorkStatus }) .catch((err) => { @@ -123,7 +134,6 @@ export default { request.post(`business/device/functions/${this.dialogData.iotDeviceId}/${functionId}`, options) .then((result) => { if (result.code != 200) return reject(); - resolve(result.data[0]); }) .catch((err) => { diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/PerceiveEvent/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/PerceiveEvent/index.vue index 735a1a83..57e87140 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/PerceiveEvent/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/PerceiveEvent/index.vue @@ -23,6 +23,7 @@ import Video from "@screen/components/Video"; import Form from '@screen/components/FormConfig'; import request from "@/utils/request"; import { Message } from "element-ui"; +import moment from "moment"; import { WarningTypeList, WarningSubclassList } from "@screen/utils/enum.js" // import { getRoadInfoByStakeMark, getProduct } from "@screen/pages/Home/components/RoadAndEvents/utils/httpList.js" @@ -128,7 +129,7 @@ export default { }, { label: "持续时长:", - key: "parseOtherConfig.duration", + key: "duration", type: "text", }, { @@ -164,6 +165,14 @@ export default { }); }, + convertSecToHHmmss(sec) { + let currentTime = moment.duration(sec, "seconds"); + return moment({ + h: currentTime.hours(), + m: currentTime.minutes(), + s: currentTime.seconds(), + }).format("HH:mm:ss"); + }, getDetails() { request({ url: `/perceivedEvents/warning/getWarningById`, @@ -204,17 +213,17 @@ export default { // "longitude": "116.493888", // "latitude": "36.291145" // }; - + data.duration = this.convertSecToHHmmss(data.duration); this.data = { ...data, roadName: null, lane: data.lane?.split(",") || [] }; - + this.formList[4].options.options = WarningSubclassList[data.warningType] || []; setTimeout(() => { this.$refs.FormConfigRef.reset(true); }); }) - .catch(() => { - Message.error("详情获取失败"); + .catch((e) => { + Message.error("详情获取失败"+e); }) .finally(() => { this.loading = false;