|
@ -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,17 +213,17 @@ 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] || []; |
|
|
|
|
|
|
|
|
setTimeout(() => { |
|
|
setTimeout(() => { |
|
|
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; |
|
|