Browse Source

感知事件增加持续时长,行车诱导增加工作状态

wangqin
王钦 10 months ago
parent
commit
cd9dd05931
  1. 12
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/DrivingGuidance/index.vue
  2. 17
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/PerceiveEvent/index.vue

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

@ -90,10 +90,19 @@ export default {
label: '工作模式', label: '工作模式',
key: "workMode", key: "workMode",
}, },
{
label: '上行工作状态',
key: "onWorkStatus",
},
{
label: '下行工作状态',
key: "inWorkStatus",
},
] ]
} }
}, },
async created() { async created() {
console.log(333,this.dialogData,444)
this.data = { ...this.dialogData, roadName: null } this.data = { ...this.dialogData, roadName: null }
getProduct(this.dialogData.productId) getProduct(this.dialogData.productId)
@ -107,6 +116,8 @@ export default {
this.requestURL(52) this.requestURL(52)
.then((result) => { .then((result) => {
this.data.workMode = { "00": "手动控制", "01": "自动控制", "02": "万年历" }[result.mode]; this.data.workMode = { "00": "手动控制", "01": "自动控制", "02": "万年历" }[result.mode];
this.data.onWorkStatus = result.onWorkStatus
this.data.inWorkStatus = result.inWorkStatus
}) })
.catch((err) => { .catch((err) => {
@ -123,7 +134,6 @@ export default {
request.post(`business/device/functions/${this.dialogData.iotDeviceId}/${functionId}`, options) request.post(`business/device/functions/${this.dialogData.iotDeviceId}/${functionId}`, options)
.then((result) => { .then((result) => {
if (result.code != 200) return reject(); if (result.code != 200) return reject();
resolve(result.data[0]); resolve(result.data[0]);
}) })
.catch((err) => { .catch((err) => {

17
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 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 { 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"
@ -128,7 +129,7 @@ export default {
}, },
{ {
label: "持续时长:", label: "持续时长:",
key: "parseOtherConfig.duration", key: "duration",
type: "text", 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() { getDetails() {
request({ request({
url: `/perceivedEvents/warning/getWarningById`, url: `/perceivedEvents/warning/getWarningById`,
@ -204,7 +213,7 @@ export default {
// "longitude": "116.493888", // "longitude": "116.493888",
// "latitude": "36.291145" // "latitude": "36.291145"
// }; // };
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] || [];
@ -213,8 +222,8 @@ export default {
this.$refs.FormConfigRef.reset(true); this.$refs.FormConfigRef.reset(true);
}); });
}) })
.catch(() => { .catch((e) => {
Message.error("详情获取失败"); Message.error("详情获取失败"+e);
}) })
.finally(() => { .finally(() => {
this.loading = false; this.loading = false;

Loading…
Cancel
Save