|
@ -29,7 +29,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 moment, { fn } from "moment"; |
|
|
import Carousel from "@screen/pages/control/event/event/EventDetailDialog/Carousel"; |
|
|
import Carousel from "@screen/pages/control/event/event/EventDetailDialog/Carousel"; |
|
|
import { |
|
|
import { |
|
|
WarningTypeList, |
|
|
WarningTypeList, |
|
@ -183,8 +183,10 @@ export default { |
|
|
}; |
|
|
}; |
|
|
}, |
|
|
}, |
|
|
async created() { |
|
|
async created() { |
|
|
this.getDetails(); |
|
|
let self = this; |
|
|
this.getVehicleTypeList(); |
|
|
this.getVehicleTypeList(function(){ |
|
|
|
|
|
self.getDetails(); |
|
|
|
|
|
}); |
|
|
}, |
|
|
}, |
|
|
async mounted() { }, |
|
|
async mounted() { }, |
|
|
beforeDestroy() { |
|
|
beforeDestroy() { |
|
@ -220,8 +222,11 @@ export default { |
|
|
}); |
|
|
}); |
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
|
getVehicleTypeList() { |
|
|
getVehicleTypeList(fn) { |
|
|
if (vehicleTypeList.length) return; |
|
|
if (vehicleTypeList.length) { |
|
|
|
|
|
fn() |
|
|
|
|
|
return |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
request({ |
|
|
request({ |
|
|
url: `/system/dict/data/type/${"sys_vehicle_type"}`, |
|
|
url: `/system/dict/data/type/${"sys_vehicle_type"}`, |
|
@ -230,13 +235,13 @@ export default { |
|
|
}) |
|
|
}) |
|
|
.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( |
|
|
vehicleTypeList = this.formList[5].options.options = data.map( |
|
|
(item) => ({ |
|
|
(item) => ({ |
|
|
key: item.dictValue, |
|
|
key: item.dictValue, |
|
|
label: item.dictLabel, |
|
|
label: item.dictLabel, |
|
|
}) |
|
|
}) |
|
|
); |
|
|
); |
|
|
|
|
|
fn(); |
|
|
}) |
|
|
}) |
|
|
.catch((err) => { }); |
|
|
.catch((err) => { }); |
|
|
}, |
|
|
}, |
|
@ -301,10 +306,6 @@ export default { |
|
|
setTimeout(() => { |
|
|
setTimeout(() => { |
|
|
this.$refs.FormConfigRef.reset(true); |
|
|
this.$refs.FormConfigRef.reset(true); |
|
|
}); |
|
|
}); |
|
|
setTimeout(() => { |
|
|
|
|
|
this.formList[5].options = { options: |
|
|
|
|
|
WarningSubclassList[data.warningType] || []}; |
|
|
|
|
|
}, 100); |
|
|
|
|
|
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.interval = setInterval(() => { |
|
|